build: add DESTDIR to vx_bin_links
PATCH 1/1 build: add DESTDIR to vx_bin_links
Fixes dangling symlinks when using DESTDIR.
--- iptables/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
iptables/Makefile.am +1 -1
@@ -49,6 +49,6 @@ pkgconfig_DATA = xtables.pc install-exec-hook: -if test -z "${DESTDIR}"; then /sbin/ldconfig; fi; ${INSTALL} -dm0755 "${DESTDIR}${bindir}"; - for i in ${vx_bin_links}; do ${LN_S} -f "${sbindir}/xtables-multi" "${DESTDIR}${bindir}/$$i"; done; + for i in ${vx_bin_links}; do ${LN_S} -f "${DESTDIR}${sbindir}/xtables-multi" "${DESTDIR}${bindir}/$$i"; done; for i in ${v4_sbin_links}; do ${LN_S} -f xtables-multi "${DESTDIR}${sbindir}/$$i"; done; for i in ${v6_sbin_links}; do ${LN_S} -f xtables-multi "${DESTDIR}${sbindir}/$$i"; done;
Signature · 1 line
1.8.4.rc3
Review
Quoted 7 lines · Laurence J. Lane
Fixes dangling symlinks when using DESTDIR.
Signed-off-by Laurence J. Lane <[email protected]>(quoted diff) +1
-1- for i in ${vx_bin_links}; do ${LN_S} -f \ "${sbindir}/xtables-multi" "${DESTDIR}${bindir}/$$i"; done; + for i in ${vx_bin_links}; do ${LN_S} -f \ "${DESTDIR}${sbindir}/xtables-multi" "${DESTDIR}${bindir}/$$i"; done;
This seems totally incorrect. By including DESTDIR in the symlink target, you are *creating* a dangling symlink. RPM, DEB (and whatever other packages) would suddenly contain a file that goes like
$ rpm -ql iptables lrwxrwxrwx 1 root root 13 Jan 27 2013 /usr/sbin/iptables -> /home/abuild/rpmbuild/BUILDROOT/iptables-1.4.20/usr/bin/xtables-multi
You're right. Withdrawn.
Quoted 22 lines · Jan Engelhardt
Review
Quoted 7 lines · Laurence J. Lane
Fixes dangling symlinks when using DESTDIR.
Signed-off-by Laurence J. Lane <[email protected]>(quoted diff) +1
-1- for i in ${vx_bin_links}; do ${LN_S} -f \ "${sbindir}/xtables-multi" "${DESTDIR}${bindir}/$$i"; done; + for i in ${vx_bin_links}; do ${LN_S} -f \ "${DESTDIR}${sbindir}/xtables-multi" "${DESTDIR}${bindir}/$$i"; done;This seems totally incorrect. By including DESTDIR in the symlink target, you are *creating* a dangling symlink. RPM, DEB (and whatever other packages) would suddenly contain a file that goes like
$ rpm -ql iptables lrwxrwxrwx 1 root root 13 Jan 27 2013 /usr/sbin/iptables -> /home/abuild/rpmbuild/BUILDROOT/iptables-1.4.20/usr/bin/xtables-multi!DSPAM:522a78438821787114786!
It should probably be a relative link, but that's probably hard to do seeing as we don't know how many levels up you need to go...
Quoted 29 lines · Laurence J. Lane
You're right. Withdrawn.
Quoted 15 lines · Jan Engelhardt
Review
Quoted 7 lines · Laurence J. Lane
Fixes dangling symlinks when using DESTDIR.
Signed-off-by Laurence J. Lane <[email protected]>(quoted diff) +1
-1- for i in ${vx_bin_links}; do ${LN_S} -f \ "${sbindir}/xtables-multi" "${DESTDIR}${bindir}/$$i"; done; + for i in ${vx_bin_links}; do ${LN_S} -f \ "${DESTDIR}${sbindir}/xtables-multi" "${DESTDIR}${bindir}/$$i"; done;This seems totally incorrect. By including DESTDIR in the symlink target, you are *creating* a dangling symlink. RPM, DEB (and whatever other packages) would suddenly contain a file that goes like
Quoted 7 lines
$ rpm -ql iptables lrwxrwxrwx 1 root root 13 Jan 27 2013 /usr/sbin/iptables -> /home/abuild/rpmbuild/BUILDROOT/iptables-1.4.20/usr/bin/xtables-multi!DSPAM:522a78438821787114786!
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html