Re: [PATCH iptables] iptables-xml: fix symlink path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Dec 22, 2018 at 10:50 AM Joel Carlson <joelsoncarl@xxxxxxxxx> wrote:
>
> On Fri, Dec 21, 2018 at 4:04 PM Joel Carlson <joelsoncarl@xxxxxxxxx> wrote:
> >
> > The symlinks for vx_bin_links should prepend ${DESTDIR} so it links
> > against the installed xtables-multi binary if installing to a location
> > specified via ${DESTDIR}.
> >
> > Signed-off-by: Joel Carlson <JoelsonCarl@xxxxxxxxx>
> > ---
> >  iptables/Makefile.am | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/iptables/Makefile.am b/iptables/Makefile.am
> > index 4d59c489..a71e550a 100644
> > --- a/iptables/Makefile.am
> > +++ b/iptables/Makefile.am
> > @@ -98,7 +98,7 @@ 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-legacy-multi" "${DESTDIR}${bindir}/$$i"; done;
> > +       for i in ${vx_bin_links}; do ${LN_S} -f "${DESTDIR}${sbindir}/xtables-legacy-multi" "${DESTDIR}${bindir}/$$i"; done;
> >         for i in ${v4_sbin_links}; do ${LN_S} -f xtables-legacy-multi "${DESTDIR}${sbindir}/$$i"; done;
> >         for i in ${v6_sbin_links}; do ${LN_S} -f xtables-legacy-multi "${DESTDIR}${sbindir}/$$i"; done;
> >         for i in ${x_sbin_links}; do ${LN_S} -f xtables-nft-multi "${DESTDIR}${sbindir}/$$i"; done;
> > --
> > 2.17.1
> >
>
> My apologies, but please disregard this patch. It fixed the one case I
> was concerned about but broke another.
>
> The issue: when iptables was getting pulled into a buildroot build, it
> gets installed in both the staging folder (can be used to produce an
> SDK) and the target folder (used to produce the rootfs of the target
> system).
> When forming the SDK from staging, a script will turn all absolute
> path links into relative links so that the SDK can be relocated
> anywhere appropriately. It will error out if the path exists outside
> of staging, which is what my proposed change here fixes.  However,
> this will then break the target folder, as when the rootfs is produced
> instead of /usr/sbin/xtables-legacy-multi being the path of the link,
> it will be /path/to/buildroot/build/target/usr/sbin/xtables-legacy-multi.
>
> Someone suggested that the symlink installed here be made a relative
> one, and I will think through that and possibly submit a new patch.

In reality we only care about certain things in staging for the SDK
(headers and libraries, mostly), so over in buildroot we're looking at
a solution to ignore those symlinks such as the ones in /bin or /sbin,
etc. We don't care what the symlink for iptables-xml is in the SDK. So
I probably will not send any new patches.  Sorry for the unnecessary
emails on your list.
-Joel



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux