patch for AIX system
Subsystems (2)
Find attached a small patch to make git install cleanly on an AIX system
Signature · 4 lines
_______________________________________________Norbert Nemec
Lilienstr. 5a ... 12203 Berlin-Lichterfelde ... Germany
Tel: +49-30-5483 3143 Mobile: +49-176-5502 5643
eMail:<[email protected]>Quoted 1 line
From
def4428ad827d1e6550634a2fe1f035c1b148426Mon Sep 17 00:00:00 2001
From: Norbert Nemec <[email protected]>
Date: Wed, 17 Nov 2010 08:25:44 +0100
Subject: [PATCH] Fix for installation on AIX
The BSD style 'install' command is call 'installbsd' and does not support the -d option. Therefore '$(INSTALL) -d' is replaced by a new variable '$(INSTALLDIR)' in all Makefiles which can be changed independently of $(INSTALL).
--- Documentation/Makefile | 10 +++++----- Makefile | 7 +++++-- git-gui/Makefile | 4 ++-- gitk-git/Makefile | 2 +- gitweb/Makefile | 4 ++-- templates/Makefile | 2 +- 6 files changed, 16 insertions(+), 13 deletions(-)
Documentation/Makefile +5 -5
@@ -180,15 +180,15 @@ pdf: user-manual.pdf install: install-man install-man: man - $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir) - $(INSTALL) -d -m 755 $(DESTDIR)$(man5dir) - $(INSTALL) -d -m 755 $(DESTDIR)$(man7dir) + $(INSTALLDIR) -m 755 $(DESTDIR)$(man1dir) + $(INSTALLDIR) -m 755 $(DESTDIR)$(man5dir) + $(INSTALLDIR) -m 755 $(DESTDIR)$(man7dir) $(INSTALL) -m 644 $(DOC_MAN1) $(DESTDIR)$(man1dir) $(INSTALL) -m 644 $(DOC_MAN5) $(DESTDIR)$(man5dir) $(INSTALL) -m 644 $(DOC_MAN7) $(DESTDIR)$(man7dir) install-info: info - $(INSTALL) -d -m 755 $(DESTDIR)$(infodir) + $(INSTALLDIR) -m 755 $(DESTDIR)$(infodir) $(INSTALL) -m 644 git.info gitman.info $(DESTDIR)$(infodir) if test -r $(DESTDIR)$(infodir)/dir; then \ $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) git.info ;\
@@ -198,7 +198,7 @@ install-info: info fi install-pdf: pdf - $(INSTALL) -d -m 755 $(DESTDIR)$(pdfdir) + $(INSTALLDIR) -m 755 $(DESTDIR)$(pdfdir) $(INSTALL) -m 644 user-manual.pdf $(DESTDIR)$(pdfdir) install-html: html
Makefile +5 -2
@@ -308,6 +308,7 @@ DIFF = diff TAR = tar FIND = find INSTALL = install +INSTALLDIR = install -d RPMBUILD = rpmbuild TCL_PATH = tclsh TCLTK_PATH = wish
@@ -953,6 +954,8 @@ ifeq ($(uname_S),AIX) NO_MKSTEMPS = YesPlease NO_STRLCPY = YesPlease NO_NSEC = YesPlease + INSTALL = installbsd + INSTALLDIR = mkdir -p FREAD_READS_DIRECTORIES = UnfortunatelyYes INTERNAL_QSORT = UnfortunatelyYes NEEDS_LIBICONV=YesPlease
@@ -2103,8 +2106,8 @@ export gitexec_instdir install_bindir_programs := $(patsubst %,%$X,$(BINDIR_PROGRAMS_NEED_X)) $(BINDIR_PROGRAMS_NO_X) install: all - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' + $(INSTALLDIR) -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' + $(INSTALLDIR) -m 755 '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' $(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' $(INSTALL) -m 644 $(SCRIPT_LIB) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' $(INSTALL) $(install_bindir_programs) '$(DESTDIR_SQ)$(bindir_SQ)'
git-gui/Makefile +2 -2
@@ -48,7 +48,7 @@ endif RM_RF ?= rm -rf RMDIR ?= rmdir -INSTALL_D0 = $(INSTALL) -d -m 755 # space is required here +INSTALL_D0 = $(INSTALLDIR) -m 755 # space is required here INSTALL_D1 = INSTALL_R0 = $(INSTALL) -m 644 # space is required here INSTALL_R1 =
@@ -76,7 +76,7 @@ ifndef V QUIET_2DEVNULL = 2>/dev/null INSTALL_D0 = dir= - INSTALL_D1 = && echo ' ' DEST $$dir && $(INSTALL) -d -m 755 "$$dir" + INSTALL_D1 = && echo ' ' DEST $$dir && $(INSTALLDIR) -m 755 "$$dir" INSTALL_R0 = src= INSTALL_R1 = && echo ' ' INSTALL 644 `basename $$src` && $(INSTALL) -m 644 $$src INSTALL_X0 = src=
gitk-git/Makefile +1 -1
@@ -41,7 +41,7 @@ all:: gitk-wish $(ALL_MSGFILES) install:: all $(INSTALL) -m 755 gitk-wish '$(DESTDIR_SQ)$(bindir_SQ)'/gitk - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(msgsdir_SQ)' + $(INSTALLDIR) -m 755 '$(DESTDIR_SQ)$(msgsdir_SQ)' $(foreach p,$(ALL_MSGFILES), $(INSTALL) -m 644 $p '$(DESTDIR_SQ)$(msgsdir_SQ)' &&) true uninstall::
gitweb/Makefile +2 -2
@@ -148,9 +148,9 @@ gitweb.cgi: gitweb.perl GITWEB-BUILD-OPTIONS ### Installation rules install: all - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitwebdir_SQ)' + $(INSTALLDIR) -m 755 '$(DESTDIR_SQ)$(gitwebdir_SQ)' $(INSTALL) -m 755 $(GITWEB_PROGRAMS) '$(DESTDIR_SQ)$(gitwebdir_SQ)' - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitwebstaticdir_SQ)' + $(INSTALLDIR) -m 755 '$(DESTDIR_SQ)$(gitwebstaticdir_SQ)' $(INSTALL) -m 644 $(GITWEB_FILES) '$(DESTDIR_SQ)$(gitwebstaticdir_SQ)' ### Cleaning rules
templates/Makefile +1 -1
@@ -61,6 +61,6 @@ clean: $(RM) -r blt boilerplates.made install: all - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(template_instdir_SQ)' + $(INSTALLDIR) -m 755 '$(DESTDIR_SQ)$(template_instdir_SQ)' (cd blt && $(TAR) cf - .) | \ (cd '$(DESTDIR_SQ)$(template_instdir_SQ)' && umask 022 && $(TAR) xof -)
Signature · 1 line
1.7.1
Quoted 1 line · Norbert Nemec
Find attached a small patch to make git install cleanly on an AIX system
A few comments, some from Documentation/SubmittingPatches.
Quoted 4 lines
From
def4428ad827d1e6550634a2fe1f035c1b148426Mon Sep 17 00:00:00 2001
From: Norbert Nemec <[email protected]>
Date: Wed, 17 Nov 2010 08:25:44 +0100
Subject: [PATCH] Fix for installation on AIX
Please don't do this; instead, make sure that From/Date/Subject of your e-mail usable as the metainfo for the resulting commit (in this case only the Subject needs a change) and drop these lines, i.e. make the patch inline, not an attachment.
Also make the subject more specific, to make it clear _what_ you fixed; phrase it like "Makefile: On AIX, bsdinstall does not understand -d" or something, perhaps.
Quoted 3 lines
The BSD style 'install' command is call 'installbsd' and does not support the -d option. Therefore '$(INSTALL) -d' is replaced by a new variable '$(INSTALLDIR)' in all Makefiles which can be changed independently of $(INSTALL).
These lines are tad too long; please wrap at around 66-72 cols.
Missing sign-off.
Quoted 13 lines
--- Documentation/Makefile | 10 +++++----- Makefile | 7 +++++-- git-gui/Makefile | 4 ++-- gitk-git/Makefile | 2 +- gitweb/Makefile | 4 ++-- templates/Makefile | 2 +- 6 files changed, 16 insertions(+), 13 deletions(-)Documentation/Makefile +0
-0
Documentation/Makefile
Quoted 7 lines
Documentation/Makefile +1
-1install-pdf: pdf - $(INSTALL) -d -m 755 $(DESTDIR)$(pdfdir) + $(INSTALLDIR) -m 755 $(DESTDIR)$(pdfdir) $(INSTALL) -m 644 user-manual.pdf $(DESTDIR)$(pdfdir) install-html: html
In the main Makefile, we have this line:
export DIFF TAR INSTALL DESTDIR SHELL_PATH
so that they can be used in "$(MAKE) -C Documentaiton install-frotz" invocations in subdirectories, but I do not see an addition of export in your patch, and you do not define INSTALLDIR in Documentation/Makefile either. I wonder how this could possibly work...
Makefile ifeq ($(uname_S),AIX) · line 961
Quoted 13 lines
Makefile +2
-0@@ -953,6 +954,8 @@ ifeq ($(uname_S),AIX) NO_MKSTEMPS = YesPlease NO_STRLCPY = YesPlease NO_NSEC = YesPlease + INSTALL = installbsd + INSTALLDIR = mkdir -p FREAD_READS_DIRECTORIES = UnfortunatelyYes INTERNAL_QSORT = UnfortunatelyYes NEEDS_LIBICONV=YesPlease
I'd defer this section to AIX experts; I've always assumed that people on non-gnu platforms used ginstall, but perhaps AIX doesn't have one?
Other changes looked mostly OK, but I am still wondering how your INSTALLDIR is passed down to submakes.
... spends quality 30-minutes digging ...
No, your patch does not work. Have you even tested it?
The attached patch on top of yours makes things working, it seems.
Points to note:
- People may have already used "make INSTALL=ginstall" and been expecting it to work. Defining "INSTALLDIR = install -d" as the default will break them (see how I defined it in the attached);
- "cd gitweb && make" is supposed to work, so you would need fallback definitions in Makefiles in subdirectories; and
- When coming from the toplevel make, submakes do want the INSTALLDIR definition passed from it (see how "export" is used).
Thanks.
Documentation/Makefile | 3 ++- Makefile | 4 ++-- git-gui/Makefile | 3 +++ gitk-git/Makefile | 1 + gitweb/Makefile | 1 + templates/Makefile | 1 + 6 files changed, 10 insertions(+), 3 deletions(-)
Documentation/Makefile +2 -1
@@ -44,7 +44,8 @@ ASCIIDOC=asciidoc ASCIIDOC_EXTRA = MANPAGE_XSL = manpage-normal.xsl XMLTO_EXTRA = -INSTALL?=install +INSTALL ?= install +INSTALLDIR ?= $(INSTALL) -d RM ?= rm -f DOC_REF = origin/man HTML_REF = origin/html
Makefile +2 -2
@@ -308,7 +308,7 @@ DIFF = diff TAR = tar FIND = find INSTALL = install -INSTALLDIR = install -d +INSTALLDIR = $(INSTALL) -d RPMBUILD = rpmbuild TCL_PATH = tclsh TCLTK_PATH = wish
@@ -1573,7 +1573,7 @@ endif ALL_CFLAGS += $(BASIC_CFLAGS) ALL_LDFLAGS += $(BASIC_LDFLAGS) -export DIFF TAR INSTALL DESTDIR SHELL_PATH +export DIFF TAR INSTALL INSTALLDIR DESTDIR SHELL_PATH ### Build rules
git-gui/Makefile +3 -0
@@ -44,6 +44,9 @@ endif ifndef INSTALL INSTALL = install endif +ifndef INSTALLDIR + INSTALLDIR = $(INSTALL) -d +endif RM_RF ?= rm -rf RMDIR ?= rmdir
gitk-git/Makefile +1 -0
@@ -11,6 +11,7 @@ msgsdir_SQ = $(subst ','\'',$(msgsdir)) TCL_PATH ?= tclsh TCLTK_PATH ?= wish INSTALL ?= install +INSTALLDIR ?= $(INSTALL) -d RM ?= rm -f DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
gitweb/Makefile +1 -0
@@ -16,6 +16,7 @@ gitwebdir ?= /var/www/cgi-bin RM ?= rm -f INSTALL ?= install +INSTALLDIR ?= $(INSTALL) -d # default configuration for gitweb GITWEB_CONFIG = gitweb_config.perl
templates/Makefile +1 -0
@@ -5,6 +5,7 @@ ifndef V endif INSTALL ?= install +INSTALLDIR ?= $(INSTALL) -d TAR ?= tar RM ?= rm -f prefix ?= $(HOME)
Sorry about that and thanks for the patient reply. I'll crank up my standard of quality and address the issues with another submission.
Greetings,
Norbert
Quoted 187 lines · Junio C Hamano
Quoted 1 line · Norbert Nemec
Find attached a small patch to make git install cleanly on an AIX system
A few comments, some from
Documentation/SubmittingPatches.Quoted 4 lines
From
def4428ad827d1e6550634a2fe1f035c1b148426Mon Sep 17 00:00:00 2001
From: Norbert Nemec<[email protected]>
Date: Wed, 17 Nov 2010 08:25:44 +0100
Subject: [PATCH] Fix for installation on AIXPlease don't do this; instead, make sure that From/Date/Subject of your e-mail usable as the metainfo for the resulting commit (in this case only the Subject needs a change) and drop these lines, i.e. make the patch inline, not an attachment.
Also make the subject more specific, to make it clear _what_ you fixed; phrase it like "
Makefile: On AIX, bsdinstall does not understand -d" or something, perhaps.Quoted 3 lines
The BSD style 'install' command is call 'installbsd' and does not support the -d option. Therefore '$(INSTALL) -d' is replaced by a new variable '$(INSTALLDIR)' in all Makefiles which can be changed independently of $(INSTALL).
These lines are tad too long; please wrap at around 66-72 cols.
Missing sign-off.
Quoted 13 lines
--- Documentation/Makefile | 10 +++++----- Makefile | 7 +++++-- git-gui/Makefile | 4 ++-- gitk-git/Makefile | 2 +- gitweb/Makefile | 4 ++-- templates/Makefile | 2 +- 6 files changed, 16 insertions(+), 13 deletions(-)Documentation/Makefile +0
-0Documentation/Makefile
Quoted 7 lines
Documentation/Makefile +1
-1install-pdf: pdf - $(INSTALL) -d -m 755 $(DESTDIR)$(pdfdir) + $(INSTALLDIR) -m 755 $(DESTDIR)$(pdfdir) $(INSTALL) -m 644 user-manual.pdf $(DESTDIR)$(pdfdir) install-html: htmlIn the main
Makefile, we have this line:export DIFF TAR INSTALL DESTDIR
SHELL_PATHso that they can be used in "$(MAKE) -C Documentaiton install-frotz" invocations in subdirectories, but I do not see an addition of export in your patch, and you do not define INSTALLDIR in
Documentation/Makefileeither. I wonder how this could possibly work...Makefile ifeq ($(uname_S),AIX) · line 961
Quoted 13 lines
Makefile +2
-0@@ -953,6 +954,8 @@ ifeq ($(uname_S),AIX) NO_MKSTEMPS = YesPlease NO_STRLCPY = YesPlease NO_NSEC = YesPlease + INSTALL = installbsd + INSTALLDIR = mkdir -p FREAD_READS_DIRECTORIES = UnfortunatelyYes INTERNAL_QSORT = UnfortunatelyYes NEEDS_LIBICONV=YesPleaseI'd defer this section to AIX experts; I've always assumed that people on non-gnu platforms used ginstall, but perhaps AIX doesn't have one?
Other changes looked mostly OK, but I am still wondering how your INSTALLDIR is passed down to submakes.
... spends quality 30-minutes digging ...
No, your patch does not work. Have you even tested it?
The attached patch on top of yours makes things working, it seems.
Points to note:
- People may have already used "make INSTALL=ginstall" and been expecting it to work. Defining "INSTALLDIR = install -d" as the default will break them (see how I defined it in the attached);
- "cd gitweb&& make" is supposed to work, so you would need fallback definitions in Makefiles in subdirectories; and
- When coming from the toplevel make, submakes do want the INSTALLDIR definition passed from it (see how "export" is used).
Thanks.
Documentation/Makefile | 3 ++- Makefile | 4 ++-- git-gui/Makefile | 3 +++ gitk-git/Makefile | 1 + gitweb/Makefile | 1 + templates/Makefile | 1 + 6 files changed, 10 insertions(+), 3 deletions(-)Documentation/Makefile +2
-1@@ -44,7 +44,8 @@ ASCIIDOC=asciidoc ASCIIDOC_EXTRA = MANPAGE_XSL = manpage-normal.xsl XMLTO_EXTRA = -INSTALL?=install +INSTALL ?= install +INSTALLDIR ?= $(INSTALL) -d RM ?= rm -f DOC_REF = origin/man HTML_REF = origin/htmlMakefile +2
-2@@ -308,7 +308,7 @@ DIFF = diff TAR = tar FIND = find INSTALL = install -INSTALLDIR = install -d +INSTALLDIR = $(INSTALL) -d RPMBUILD = rpmbuild TCL_PATH = tclsh TCLTK_PATH = wish@@ -1573,7 +1573,7 @@ endif ALL_CFLAGS += $(BASIC_CFLAGS) ALL_LDFLAGS += $(BASIC_LDFLAGS) -export DIFF TAR INSTALL DESTDIR SHELL_PATH +export DIFF TAR INSTALL INSTALLDIR DESTDIR SHELL_PATH ### Build rulesgit-gui/Makefile +3
-0@@ -44,6 +44,9 @@ endif ifndef INSTALL INSTALL = install endif +ifndef INSTALLDIR + INSTALLDIR = $(INSTALL) -d +endif RM_RF ?= rm -rf RMDIR ?= rmdirgitk-git/Makefile +1
-0@@ -11,6 +11,7 @@ msgsdir_SQ = $(subst ','\'',$(msgsdir)) TCL_PATH ?= tclsh TCLTK_PATH ?= wish INSTALL ?= install +INSTALLDIR ?= $(INSTALL) -d RM ?= rm -f DESTDIR_SQ = $(subst ','\'',$(DESTDIR))gitweb/Makefile +1
-0@@ -16,6 +16,7 @@ gitwebdir ?= /var/www/cgi-bin RM ?= rm -f INSTALL ?= install +INSTALLDIR ?= $(INSTALL) -d # default configuration for gitweb GITWEB_CONFIG = gitweb_config.perltemplates/Makefile +1
-0@@ -5,6 +5,7 @@ ifndef V endif INSTALL ?= install +INSTALLDIR ?= $(INSTALL) -d TAR ?= tar RM ?= rm -f prefix ?= $(HOME)
Signature · 4 lines
_______________________________________________Norbert Nemec
Lilienstr. 5a ... 12203 Berlin-Lichterfelde ... Germany
Tel: +49-30-5483 3143 Mobile: +49-176-5502 5643
eMail:<[email protected]>Quoted 2 lines · Junio C Hamano
I'd defer this section to AIX experts; I've always assumed that people on non-gnu platforms used ginstall, but perhaps AIX doesn't have one?
All my AIX systems have the coreutils RPM from the IBM Toolbox installed (extra CD, or, these days, from ftp.software.ibm.com), so I never ran into the incompatible install issue.
However, for those without coreutils a patch to make installbsd work (with comments from Junio taken into account) would be reasonable I guess. Particularly if the patch could be made so that it's easy enough to switch to coreutils install if you wish to.
-Tor
Quoted 10 lines · Tor Arntsen
Quoted 2 lines · Junio C Hamano
I'd defer this section to AIX experts; I've always assumed that people on non-gnu platforms used ginstall, but perhaps AIX doesn't have one?
All my AIX systems have the coreutils RPM from the IBM Toolbox installed (extra CD, or, these days, from ftp.software.ibm.com), so I never ran into the incompatible install issue.
However, for those without coreutils a patch to make installbsd work (with comments from Junio taken into account) would be reasonable I guess. Particularly if the patch could be made so that it's easy enough to switch to coreutils install if you wish to.
A new version of the patch is in preparation.
Indeed - I don't have root access on the machine in question, so installing a RPM is not an option. Apart from that - keeping a dependency on coreutils just to have ginstall available does not seem such a good idea. Anyway - the patch allows changing to ginstall simply by changing the INSTALLDIR variable.
Signature · 4 lines
_______________________________________________Norbert Nemec
Lilienstr. 5a ... 12203 Berlin-Lichterfelde ... Germany
Tel: +49-30-5483 3143 Mobile: +49-176-5502 5643
eMail:<[email protected]>Quoted 5 lines · Tor Arntsen
Quoted 2 lines · Junio C Hamano
I'd defer this section to AIX experts; I've always assumed that people on non-gnu platforms used ginstall, but perhaps AIX doesn't have one?
Quoted 7 lines
All my AIX systems have the coreutils RPM from the IBM Toolbox installed (extra CD, or, these days, from ftp.software.ibm.com), so I never ran into the incompatible install issue.
However, for those without coreutils a patch to make installbsd work (with comments from Junio taken into account) would be reasonable I guess. Particularly if the patch could be made so that it's easy enough to switch to coreutils install if you wish to.
Hmm, would that suggest that it might be a better idea to just mention "install coreutils RPM from the IBM Toolbox" somewhere in INSTALL instead of the INSTALLDIR patch, i.e. not support "bsdinstall/mkdir -p" way but require "coreutils"? Or is it an unconditionally better way of life for AIX folks, even for the ones who do have it installed, not to rely on the "coreutils" package?
If the answers to the above two questions are both "no", then we would need to make the patch more complicated (i.e. detect if "coreutils" is there and if not use "bsdinstall/mkdir -p" way), which I'd rather avoid if we do not have to.