mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH v2] strongswan: Version bump 5.6.1 -> 5.8.1
Date: Thu, 28 Nov 2019 17:21:35 +0100	[thread overview]
Message-ID: <20191128162135.lucbh6yyatebfyaz@pengutronix.de> (raw)
In-Reply-To: <CAKd8=GuWS_NzYD8Q914QyR0uEJMEPJ8j+mPq4crsJ_qs+MLgsQ@mail.gmail.com>

On Tue, Nov 26, 2019 at 11:21:41AM +0100, Lars Pedersen wrote:
> Thanks for the review.
> 
> On Mon, 25 Nov 2019 at 07:53, Michael Olbrich <m.olbrich@pengutronix.de> wrote:
> >
> > > -     @$(call install_lib, strongswan, 0, 0, 0644, libcharon)
> > > -     @$(call install_lib, strongswan, 0, 0, 0644, libstrongswan)
> > > +     @$(call install_tree, strongswan, 0, 0, -, /usr/bin)
> > > +     @$(call install_glob, strongswan, 0, 0, -, /usr/lib,,*.la)
> > > +     @$(call install_tree, strongswan, 0, 0, -, /usr/libexec)
> > > +     @$(call install_tree, strongswan, 0, 0, -, /usr/sbin)
> >
> > No, we deliberately install the files explicitly. For shared libraries,
> > this ensures that only the necessary links are installed.
> > For all other files, this makes sure that we notice issues with the build
> > configuration.
> >
> > Also, my check scripts noticed, that /usr/libexec/ipsec/xfrmi uses
> > libstrongswan-kernel-netlink.so but is missing the correct rpath for this.
> > It's in /usr/lib/plugins so not found by default.
> >
> > This can happen in ptxdist because we do tricks with the rpath to avoid
> > paths to the build tree. Pulseaudio has the same problem. Take a look how
> > it's handled there.
> >
> 
> So basically you want the install_glob of libraries to be reverted
> back into installing them all in a for loop using install_lib like
> before?

exactly.

> I'm unsure about the rpath for xfrmi. The paths looks similar using
> readelf if I compare it with the starter executable in the same dir.
> What does your script output? The xfrmi is a new executable in
> strongswan for policy based routing.
> 
> $readelf -a xfrmi
> ...
> Dynamic section at offset 0x1e38 contains 32 entries:
>   Tag        Type                         Name/Value
>  0x00000001 (NEEDED)                     Shared library:
> [libstrongswan-kernel-netlink.so]

This library is in a non-standard directory, so it won't be found by ld.so.
If you try to execute this xfrmi on the target you should get a 'file not
found' error or something like that.

To fix this, an rpath for /usr/lib/plugins (the directory containing this
lib) must be added.

Pulseaudio has the same problem (with two dirs instead of one).

Michael

>  0x00000001 (NEEDED)                     Shared library: [libstrongswan.so.0]
>  0x00000001 (NEEDED)                     Shared library: [libcharon.so.0]
>  0x00000001 (NEEDED)                     Shared library: [libc.so.6]
>  0x00000001 (NEEDED)                     Shared library: [ld-linux.so.3]
> ...
> 
> /Lars Pedersen
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2019-11-28 16:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-18 12:45 [ptxdist] [PATCH] " Lars Pedersen
2019-11-19 12:49 ` [ptxdist] [PATCH v2] " Lars Pedersen
2019-11-19 14:56   ` Bruno Thomsen
2019-11-25  6:53   ` Michael Olbrich
2019-11-26 10:21     ` Lars Pedersen
2019-11-28 16:21       ` Michael Olbrich [this message]
2019-12-05  9:34 ` Lars Pedersen
2019-12-05 15:45   ` Michael Olbrich

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=20191128162135.lucbh6yyatebfyaz@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /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