public inbox for bzip2-devel@sourceware.org
 help / color / mirror / Atom feed
From: ~eschwartz <eschwartz@git.sr.ht>
To: bzip2-devel@sourceware.org
Cc: eschwartz93@gmail.com
Subject: [PATCH bzip2 1/6] install relative symlinks
Date: Thu, 02 Jun 2022 23:45:49 -0400	[thread overview]
Message-ID: <165475384722.17277.18269615533597437835-0@git.sr.ht> (raw)

From: Eli Schwartz <eschwartz93@gmail.com>

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


             reply	other threads:[~2022-06-09  5:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-03  3:45 ~eschwartz [this message]
2022-06-03  4:20 ` [PATCH bzip2 2/6] port the build configuration to autoconf ~eschwartz
2022-06-09  5:56   ` Eli Schwartz
2022-06-03  4:48 ` [PATCH bzip2 4/6] make a couple program aliases symlinks instead of copies ~eschwartz
2022-06-03  4:54 ` [PATCH bzip2 5/6] install man page symlinks for a couple more symlinked commands ~eschwartz
2022-06-03  5:09 ` [PATCH bzip2 6/6] install a pkg-config file with instructions for linking to libbz2 ~eschwartz
2022-06-09  5:52   ` Eli Schwartz
2022-10-23 16:03     ` Sam James
2022-06-09  4:50 ` [PATCH bzip2 3/6] shared Makefile: add install rule ~eschwartz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=165475384722.17277.18269615533597437835-0@git.sr.ht \
    --to=eschwartz@git.sr.ht \
    --cc=bzip2-devel@sourceware.org \
    --cc=eschwartz93@gmail.com \
    --cc=eschwartz@archlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).