git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [BUG] `make install' partly ignores `NO_INSTALL_HARDLINKS'

From
Đoàn Trần Công Danh <congdanhqx@gmail.com>
Date
Aug 14, 2020, 15:02 UTC
Message-ID
<20200814150214.GC9518@danh.dev>
In-Reply-To
<xmqqimdm1ae6.fsf@gitster.c.googlers.com>
On 2020-08-13 14:52:33-0700, Junio C Hamano <gitster@pobox.com> wrote:
Show 41 quoted lines
> Eric Sunshine <sunshine@sunshineco.com> writes:
> 
> > On Wed, Aug 12, 2020 at 4:16 AM Alexander Ost <ost@ieee.org> wrote:
> >> Despite installing with `make NO_INSTALL_HARDLINKS=1 install', the
> >> installation process tries to create hard links, and the installation
> >> fails (a quick workaround is `sed -i git-gui/Makefile -e "s/ln /ln -s
> >> /g"').
> >>
> >> make NO_INSTALL_HARDLINKS=1 install
> >> ln: failed to create hard link
> >> ‘/filesystem_without_hardlink_support/libexec/git-core/git-citool’ =>
> >> ‘/filesystem_without_hardlink_support/libexec/git-core/git-gui’:
> >> Operation not permitted
> >
> > Indeed, it appears that the git-gui Makefile does not respect
> > NO_INSTALL_HARDLINKS. The git-gui project is maintained and developed
> > outside of the Git project (even though it gets bundled with Git), so
> > it has its own issue tracker. It would probably be best to re-submit
> > this bug report there:
> >
> > https://github.com/prati0100/git-gui/issues
> 
> Thanks.  Perhaps something along this line (which is totally
> untested), as the top-level Makefile already exports
> NO_INSTALL_HARDLINKS to submakes?
> 
> 
> 
>  Makefile | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index f10caedaa7..1cdbf8e504 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -44,6 +44,11 @@ endif
>  ifndef INSTALL
>  	INSTALL = install
>  endif
> +ifdef NO_INSTALL_HARDLINKS
> +	LN = cp

Since both git-citool and git-gui will be installed into same directory "$(libexecdir)", I think it would make more sense to use:

	LN = ln -s
here instead?
Show 24 quoted lines
> +else
> +	LN = ln
> +endif
>  
>  RM_RF     ?= rm -rf
>  RMDIR     ?= rmdir
> @@ -57,7 +62,7 @@ INSTALL_X1 =
>  INSTALL_A0 = find # space is required here
>  INSTALL_A1 = | cpio -pud
>  INSTALL_L0 = rm -f # space is required here
> -INSTALL_L1 = && ln # space is required here
> +INSTALL_L1 = && $(LN) # space is required here
>  INSTALL_L2 =
>  INSTALL_L3 =
>  
> @@ -87,7 +92,7 @@ ifndef V
>  	INSTALL_L0 = dst=
>  	INSTALL_L1 = && src=
>  	INSTALL_L2 = && dst=
> -	INSTALL_L3 = && echo '   ' 'LINK       ' `basename "$$dst"` '->' `basename "$$src"` && rm -f "$$dst" && ln "$$src" "$$dst"
> +	INSTALL_L3 = && echo '   ' 'LINK       ' `basename "$$dst"` '->' `basename "$$src"` && rm -f "$$dst" && $(LN) "$$src" "$$dst"
>  
>  	CLEAN_DST = echo ' ' UNINSTALL
>  	REMOVE_D0 = dir=
-- 
Danh
Previous: Alexander OstNext: Junio C Hamano
Message 5 of 9 in “[BUG] `make install' partly ignores `NO_INSTALL_HARDLINKS'”
  1. Alexander OstAug 12, 2020
  2. Eric SunshineAug 13, 2020
  3. Junio C HamanoAug 13, 2020
  4. Alexander OstAug 14, 2020
  5. Đoàn Trần Công DanhAug 14, 2020
  6. Junio C HamanoAug 14, 2020
  7. Đoàn Trần Công DanhAug 15, 2020
  8. Junio C HamanoAug 17, 2020
  9. Đoàn Trần Công DanhAug 17, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.