12 November 2016

Git

System: Microsoft Windows XP Home Edition
CPUs: Intel(R) Atom(TM) CPU N270 @1.60GHz.
Deps: Git-2.10.0-32-bit.exe

I thought to compile emacs-25.1, and manually installed the gcc-6.1.0-1 and dependency
packages, but when I ran the configure script with CFLAGS and examined the config.log
the CFLAGS had been appended with a duplicate entry for -mtune=. Therefore I do not
recommend using this [the MSYS2] distribution's toolchain on i686; obviously on x86_64
one wouldn't use a CFLAG as -mtune=. The below is written simply to provide the reader
with access to Github, and owing to it's inclusion of shells, Tcl/Tk, and UNIX utlities.


Owing to the newer Git releases' reliance on CancelSynchronousIo
in KERNEL32.dll, Git-2.10.0-32-bit is the last version supporting
MS® XP

https://github.com/git-for-windows/git/releases/tag/v2.10.0.windows.1
Git-2.10.0-32-bit.exe

I opt out of Window Explorer integration and file associations, Use Git from Git Bash
Only, Checkout as-is, commit Unix-style line endings, Use Windows' default console
window, and Enable file system caching. As I don't have .NET framework v4.5.1 on
the computer - XP doesn't support that version - I opt out of using the Git Credential
Manager.

C:\Programmer\Git
458 MB (480.484.174 byte)

The download ships with Perl 5.22.1 and Tcl/Tk 8.6.5.

The .pod files (perldiag.pod, perlfunc.pod, perlop.pod) needed
in Perl scripts for 'use diagnostics;' and for, e.g., the command
'perldoc -f sprintf' are not included; so create a 'pods' directory
in /usr/share/perl5/core_perl and copy them there.

If you want to run tclsh86.exe and/or wish86.exe from Git CMD
modify the %PATH% adding C:\Programmer\Git\mingw32\bin.

C:\DOCUME~1\UserName>TYPE tcl.bat
@ECHO OFF
ECHO Loading Tcl/Tk variables...
SET PATH=C:\Programmer\Git\mingw32\bin;%PATH%

C:\DOCUME~1\UserName>

Installing csh/tcsh, libcatgets, and tzcode.

https://sourceforge.net/projects/msys2/files/REPOS/MSYS2/i686/
libcatgets-1.1-2-i686.pkg.tar.xz

Copy the above file to C:\Programmer\Git and extract it,
then delete the files .MTREE and .PKGINFO.

Append your file package-versions.txt

Eric@Erics-Netbook MINGW32 ~
$ echo libcatgets 1.1-2 >> /etc/package-versions.txt

Eric@Erics-Netbook MINGW32 ~
$

https://sourceforge.net/projects/msys2/files/REPOS/MSYS2/i686/
tcsh-6.19.00-1-i686.pkg.tar.xz

Copy the above file to C:\Programmer\Git and extract it, then
delete the files .INSTALL, .MTREE, and .PKGINFO.

Append your file package-versions.txt

Eric@Erics-Netbook MINGW32 ~
$ echo tcsh 6.19.00-1 >> /etc/package-versions.txt

Eric@Erics-Netbook MINGW32 ~
$

https://sourceforge.net/projects/msys2/files/REPOS/MSYS2/i686/
tzcode-2015.e-1-i686.pkg.tar.xz

Copy the above file to C:\Programmer\Git and extract it,
then delete the files .MTREE and .PKGINFO.

Append your file package-versions.txt

Eric@Erics-Netbook MINGW32 ~
$ echo tzcode 2015.e-1 >> /etc/package-versions.txt

Eric@Erics-Netbook MINGW32 ~
$ exit

Running tcsh as a login shell.

http://mirrors.slackware.com/slackware/slackware-14.0/source/a/
tcsh-6.18.01.tar.xz

Extact the tcsh-6.18.01 archive above and modify csh.login to read /usr/bin/tcsh,
then copy csh.cshrc and csh.login to both C:\Programmer\Git\etc and to your home
directory, on the latter renaming these, respectively, to .cshrc and .login; bindkey.tcsh
and complete.tcsh should go in \etc\profile.d. Line 40 with the 'goto' statement should
be commented out in .cshrc for the customisations below that line to have any effect.

C:\Programmer\Git\etc\>TYPE csh.cshrc
#
# Example /etc/csh.cshrc for Cygwin
#
onintr -

if ( -d /etc/profile.d ) then
  set nonomatch
  foreach _s ( /etc/profile.d/*.csh )
    if ( -r $_s ) then
      source $_s
    endif
  end
  unset _s nonomatch
endif

if (! ${?prompt}) goto end

# This is an interactive session

# Now read in the key bindings of the tcsh
if ($?tcsh && -r /etc/profile.d/bindkey.tcsh) then
  source /etc/profile.d/bindkey.tcsh
endif

# On Cygwin it's possible to start tcsh without having any Cygwin /bin
# path in $PATH.  This breaks complete.tcsh starting with tcsh 6.15.00.
# For that reason we add /bin to $PATH temporarily here.  We remove it
# afterwards because it's added again (and correctly so) in /etc/csh.login.
set path=( /bin $path:q )

# Source the completion extension for tcsh
if ($?tcsh && -r /etc/profile.d/complete.tcsh) then
  source /etc/profile.d/complete.tcsh
endif

# Reset $PATH.
set path=( $path[2-]:q )

# If we find $HOME/.{t}cshrc we skip our settings used for interactive sessions.
if (-r "$HOME/.cshrc" || -r "$HOME/.tcshrc") goto end

# Set prompt
if ($?tcsh) then
  set prompt='[%n@%m %c02]$ '
else
  set prompt=\[`id -un`@`hostname`\]\$\
endif

# Some neat default settings.
set autocorrect=1
set autolist=ambiguous
unset autologout
set complete=enhance
set correct=cmd
set echo_style=both
set ellipsis
set fignore=(.o \~)
set histdup=erase
set history=100
unset ignoreeof
set listjobs=long
set listmaxrows=23
#set noglob
set notify=1
set rmstar=1
set savehist=( $history merge )
set showdots=1
set symlinks=expand

# Some neat aliases
alias ++ pushd
alias -- popd
alias d dirs
alias h history
alias j jobs
alias l 'ls -C'
alias la 'ls -a'
alias ll 'ls -l'
alias ls 'ls --color'

end:
  onintr

C:\Programmer\Git\etc\>

C:\Programmer\Git\etc\>TYPE csh.login
#
# Example /etc/csh.login for Cygwin
#
unsetenv TEMP
unsetenv TMP

set path=( /usr/local/bin /usr/bin /bin $path:q )

if ( ! ${?USER} ) then
  set user="`id -un`"
endif
if ( ! ${?HOME} ) then
  set home=/home/$USER
endif
if ( ! -d "$HOME" ) then
  mkdir -p "$HOME"
endif

if ( ! ${?term} || "$term" == "unknown"  || "$tty" == "conin" ) then
  set term=cygwin
endif

setenv MAKE_MODE unix

setenv SHELL /usr/bin/tcsh

umask 022

cd

C:\Programmer\Git\etc\>

Create a Desktop Shortcut for mintty.exe and modify it as follows:

Destination: C:\Programmer\Git\usr\bin\mintty.exe /usr/bin/tcsh -l

Start i: %HOMEDRIVE%%HOMEPATH%

If instead you want an interactive session change the tcsh argument to '-i'.

NB: In /tcsh-6.18.01/cygwin/csh.cshrc the first 'if' block complains when sourcing MSYS2's
/etc/profile.d/perlbin.csh, so rename that file to perlbin.csh.bak, and in your .login file before
'umask 022' add these lines:

setenv PATH "${PATH}":/usr/bin/vendor_perl:/usr/bin/core_perl

# If you have modules in non-standard directories you can add them here.
# setenv PERLLIB dir1:dir2

Git-2.10.0-32 does not include a .csh equivalent for /etc/profile.d/lang.sh, Martell Malone has one at
https://github.com/martell/MSYS2-Base/blob/master/etc/defaults/etc/profile.d/lang.csh, but I prefer
using a modified (for the PATH) copy of Slackware's.

C:\Programmer\Git\etc>TYPE profile.d\lang.csh
#!/usr/bin/csh
# Set the system locale.  (no, we don't have a menu for this ;-)
# For a list of locales which are supported by this machine, type:
#   locale -a

# en_US is the Slackware default locale:
setenv LANG en_US

# 'C' is the old Slackware (and UNIX) default, which is 127-bit
# ASCII with a charmap setting of ANSI_X3.4-1968.  These days,
# it's better to use en_US or another modern $LANG setting to
# support extended character sets.
#setenv LANG C

# There is also support for UTF-8 locales, but be aware that
# some programs are not yet able to handle UTF-8 and will fail to
# run properly.  In those cases, you can set LANG=C before
# starting them.  Still, I'd avoid UTF unless you actually need it.
#setenv LANG en_US.UTF-8

# Another option for en_US:
#setenv LANG en_US.ISO8859-1

# One side effect of the newer locales is that the sort order
# is no longer according to ASCII values, so the sort order will
# change in many places.  Since this isn't usually expected and
# can break scripts, we'll stick with traditional ASCII sorting.
# If you'd prefer the sort algorithm that goes with your $LANG
# setting, comment this out.
setenv LC_COLLATE C

# End of /etc/profile.d/lang.csh

C:\Programmer\Git\etc>

A (modified) Slackware coreutils-dircolors.csh file.

C:\Programmer\Git\etc>TYPE profile.d\coreutils-dircolors.csh
# Slackware color ls profile script for /bin/csh-like shells.

# Set up LS_OPTIONS environment variable.
# This contains extra command line options to use with ls.
# The default ones are:
#  -F = show '/' for dirs, '*' for executables, etc.
#  -T 0 = don't trust tab spacing when formatting ls output.
#  -b = better support for special characters
setenv OPTIONS "-F -b -T 0"

# COLOR needs one of these arguments:
# 'auto' colorizes output to ttys, but not pipes.
# 'always' adds color characters to all output.
# 'never' shuts colorization off.
setenv COLOR auto

# This section shouldn't require any user adjustment since it is
# simply setting the LS_OPTIONS variable using the information
# already given above:
setenv LS_OPTIONS " $OPTIONS --color=$COLOR "
unsetenv COLOR
unsetenv OPTIONS

# Set up aliases to use color ls by default.  A few additional
# aliases like 'dir', 'vdir', etc, are some ancient artifacts
# from 1992 or so...  possibly they should be disabled, but maybe
# someone out there is actually using them?  :-)
alias ls '/bin/ls $LS_OPTIONS';
alias dir '/bin/ls $LS_OPTIONS --format=vertical';
alias vdir '/bin/ls $LS_OPTIONS --format=long';
alias d dir;
alias v vdir;
unsetenv noglob;

# Set up the LS_COLORS environment:
# [ -f $HOME/.dir_colors ]
# if ($status == 0) then
#   eval `/bin/dircolors -c $HOME/.dir_colors`
# endif
# [ -f /etc/DIR_COLORS ]
# if ($status == 0) then
eval `/bin/dircolors -c /etc/DIR_COLORS`
# endif
# [ ! -f $HOME/.dir_colors -a ! -f /etc/DIR_COLORS ]
# if ($status == 0) then
#   eval `/bin/dircolors -c`
# endif

C:\Programmer\Git\etc>

https://github.com/martell/MSYS2-Base/blob/master/etc/defaults/etc/profile.d/
tzset.csh
tzset.sh

Add Martell Malone's tzset.csh and tzset.sh files.

C:\Programmer\Git\etc>TYPE profile.d\tzset.csh

# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software.
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

# base-files version 4.1-1

# /etc/profile.d/tzset.csh: sourced by /etc/profile.

# The latest version as installed by the Cygwin Setup program can
# always be found at /etc/defaults/etc/profile.d/tzset.csh

# Modifying /etc/profile.d/tzset.csh directly will prevent
# setup from updating it.

# System-wide tzset.csh file

#Uses the geographical location setting of the user to find the right
#mapping, rather than the locale setting.  Only on Windows 2000 which
#doesn't know about the user's geographical location, or if fetching
#the geographical location fails, it falls back to the user's locale.
if ( $?TZ == 0 ) setenv TZ `/usr/bin/tzset`


C:\Programmer\Git\etc>TYPE profile.d\tzset.sh
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software.
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

# base-files version 4.1-1

# /etc/profile.d/tzset.sh: sourced by /etc/profile.

# The latest version as installed by the Cygwin Setup program can
# always be found at /etc/defaults/etc/profile.d/tzset.sh

# Modifying /etc/profile.d/tzset.sh directly will prevent
# setup from updating it.

# System-wide tzset.sh file

#Uses the geographical location setting of the user to find the right
#mapping, rather than the locale setting.  Only on Windows 2000 which
#doesn't know about the user's geographical location, or if fetching
#the geographical location fails, it falls back to the user's locale.
test -z "$TZ" && export TZ=$(/usr/bin/tzset)


C:\Programmer\Git\etc>

And for consistency with MSYS2 lets add their format /etc/shells file.

C:\Programmer\Git\etc>TYPE shells
$ cat shells
#
# /etc/shells
#

/usr/bin/sh
/usr/bin/bash

# End of file
/usr/bin/dash
/usr/bin/csh
/usr/bin/tcsh

C:\Programmer\Git\etc>EXIT



NB: Git Bash as I have a Danish MS® system, reads the /profile.d/lang.sh file
when starting, and exports to the shell 'LANG=da_DK.UTF-8'.

Though in certain circumstances there are problems using mintty.exe, as from the
above lang.csh, there are sometimes problems with LANG set to UTF variants.