From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-b.sr.ht (mail-b.sr.ht [173.195.146.151]) by sourceware.org (Postfix) with ESMTPS id 7B7F7385AE5A for ; Thu, 9 Jun 2022 05:50:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7B7F7385AE5A Received: from git.sr.ht (unknown [173.195.146.142]) by mail-b.sr.ht (Postfix) with ESMTPSA id 36C6611EE9A; Thu, 9 Jun 2022 05:50:48 +0000 (UTC) From: ~eschwartz Date: Thu, 02 Jun 2022 23:45:49 -0400 Subject: [PATCH bzip2 1/6] install relative symlinks Message-ID: <165475384722.17277.18269615533597437835-0@git.sr.ht> X-Mailer: git.sr.ht Reply-to: ~eschwartz To: bzip2-devel@sourceware.org Cc: eschwartz93@gmail.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DATE_IN_PAST_96_XX, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: bzip2-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Bzip2-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jun 2022 05:50:53 -0000 From: Eli Schwartz During `make install`, symlinks for command aliases are created which embed an absolute path to the installed location of the real file. This causes issues with relocation, for example when packaging for distros. Use symlinks that search for a file in the same directory as the symlink, instead. This is guaranteed to have the same results, except more accurate. --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index b0fef95..009463a 100644 --- a/Makefile +++ b/Makefile @@ -90,14 +90,14 @@ install: bzip2 bzip2recover cp -f libbz2.a $(PREFIX)/lib chmod a+r $(PREFIX)/lib/libbz2.a cp -f bzgrep $(PREFIX)/bin/bzgrep - ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep - ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep + ln -s -f bzgrep $(PREFIX)/bin/bzegrep + ln -s -f bzgrep $(PREFIX)/bin/bzfgrep chmod a+x $(PREFIX)/bin/bzgrep cp -f bzmore $(PREFIX)/bin/bzmore - ln -s -f $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless + ln -s -f bzmore $(PREFIX)/bin/bzless chmod a+x $(PREFIX)/bin/bzmore cp -f bzdiff $(PREFIX)/bin/bzdiff - ln -s -f $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp + ln -s -f bzdiff $(PREFIX)/bin/bzcmp chmod a+x $(PREFIX)/bin/bzdiff cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1 chmod a+r $(PREFIX)/man/man1/bzgrep.1 -- 2.34.2