Message ID | 1378503540-16134-1-git-send-email-ljlane@debian.org |
---|---|
State | Not Applicable |
Headers | show |
On Friday 2013-09-06 23:39, Laurence J. Lane wrote: >Fixes dangling symlinks when using DESTDIR. > >Signed-off-by: Laurence J. Lane <ljlane@debian.org> >- 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 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
You're right. Withdrawn. On Fri, Sep 6, 2013 at 8:49 PM, Jan Engelhardt <jengelh@inai.de> wrote: > > On Friday 2013-09-06 23:39, Laurence J. Lane wrote: > >>Fixes dangling symlinks when using DESTDIR. >> >>Signed-off-by: Laurence J. Lane <ljlane@debian.org> >>- 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! > > -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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... On Fri, Sep 6, 2013 at 7:14 PM, Laurence J. Lane <ljlane@debian.org> wrote: > You're right. Withdrawn. > > On Fri, Sep 6, 2013 at 8:49 PM, Jan Engelhardt <jengelh@inai.de> wrote: >> >> On Friday 2013-09-06 23:39, Laurence J. Lane wrote: >> >>>Fixes dangling symlinks when using DESTDIR. >>> >>>Signed-off-by: Laurence J. Lane <ljlane@debian.org> >>>- 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! >> >> > -- > To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/iptables/Makefile.am b/iptables/Makefile.am index a4246eb..ec53443 100644 --- a/iptables/Makefile.am +++ b/iptables/Makefile.am @@ -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;
Fixes dangling symlinks when using DESTDIR. Signed-off-by: Laurence J. Lane <ljlane@debian.org> --- iptables/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)