Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-arch/tar/
Date: Sun, 30 Oct 2022 15:51:48
Message-Id: 1667145018.d1d2f9c32ada1cfb0c2f4d77a60427684989c7f6.sam@gentoo
1 commit: d1d2f9c32ada1cfb0c2f4d77a60427684989c7f6
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 30 14:25:20 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 30 15:50:18 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1d2f9c3
7
8 app-arch/tar: Use --program-prefix=g to avoid mv
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11 Closes: https://github.com/gentoo/gentoo/pull/28044
12 Signed-off-by: Sam James <sam <AT> gentoo.org>
13
14 app-arch/tar/tar-1.34-r1.ebuild | 24 ++++++++++++------------
15 1 file changed, 12 insertions(+), 12 deletions(-)
16
17 diff --git a/app-arch/tar/tar-1.34-r1.ebuild b/app-arch/tar/tar-1.34-r1.ebuild
18 index d197850acc05..35df40e4465b 100644
19 --- a/app-arch/tar/tar-1.34-r1.ebuild
20 +++ b/app-arch/tar/tar-1.34-r1.ebuild
21 @@ -43,6 +43,12 @@ src_configure() {
22 $(use_enable nls)
23 $(use_with selinux)
24 $(use_with xattr xattrs)
25 +
26 + # autoconf looks for gtar before tar (in configure scripts), hence
27 + # in Prefix it is important that it is there, otherwise, a gtar from
28 + # the host system (FreeBSD, Solaris, Darwin) will be found instead
29 + # of the Prefix provided (GNU) tar
30 + --program-prefix=g
31 )
32
33 FORCE_UNSAFE_CONFIGURE=1 econf "${myeconfargs[@]}"
34 @@ -55,30 +61,24 @@ src_install() {
35 exeinto /etc
36 doexe "${FILESDIR}"/rmt
37
38 - mv "${ED}"/usr/sbin/backup{,-tar} || die
39 - mv "${ED}"/usr/sbin/restore{,-tar} || die
40 + mv "${ED}"/usr/sbin/{gbackup,backup-tar} || die
41 + mv "${ED}"/usr/sbin/{grestore,restore-tar} || die
42 + mv "${ED}"/usr/sbin/{g,}backup.sh || die
43 + mv "${ED}"/usr/sbin/{g,}dump-remind || die
44
45 if use minimal ; then
46 find "${ED}"/etc "${ED}"/*bin/ "${ED}"/usr/*bin/ \
47 - -type f -a '!' '(' -name tar -o -name tar ')' \
48 + -type f -a '!' -name gtar \
49 -delete || die
50 fi
51
52 - # autoconf looks for gtar before tar (in configure scripts), hence
53 - # in Prefix it is important that it is there, otherwise, a gtar from
54 - # the host system (FreeBSD, Solaris, Darwin) will be found instead
55 - # of the Prefix provided (GNU) tar
56 - # rename tar to gtar, and make tar a symlink
57 - mv "${ED}"/bin/{,g}tar || die
58 + # make tar a symlink
59 dosym gtar /bin/tar
60
61 if ! use minimal; then
62 - mv "${ED}"/usr/sbin/{,g}rmt || die
63 dosym grmt /usr/sbin/rmt
64 fi
65
66 - mv "${ED}"/usr/share/man/man1/{,g}tar.1 || die
67 dosym gtar.1 /usr/share/man/man1/tar.1
68 - mv "${ED}"/usr/share/man/man8/{,g}rmt.8 || die
69 dosym grmt.8 /usr/share/man/man8/rmt.8
70 }