Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 756121 - net-vpn/libreswan-4.1-r1: uses rc-service despite USE=systemd
Summary: net-vpn/libreswan-4.1-r1: uses rc-service despite USE=systemd
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Hans de Graaff
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-22 19:51 UTC by Denis Lisov
Modified: 2021-05-01 07:12 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info output (emerge.info,18.38 KB, application/x-info)
2021-04-30 15:15 UTC, Vladimir
Details
output of emerge build log (libreswan-4.3-build.log,595.65 KB, text/x-log)
2021-04-30 15:16 UTC, Vladimir
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Lisov 2020-11-22 19:51:27 UTC
On a systemd-only system (openrc is not installed) during build net-vpn/libreswan-4.1-r1 (USE="networkmanager pam seccomp systemd -caps -curl -dnssec -ldap -selinux -test") records `openrc` as the initsystem in use and that results in the following error later when activating a VPN

NetworkManager[1977932]: whack: Pluto is not running (no "/run/pluto/pluto.ctl")
NetworkManager[1977935]: Redirecting to: rc-service ipsec restart
NetworkManager[1977935]: /usr/libexec/ipsec/setup: line 217: exec: rc-service: not found

This did not happen in 3.32-r1 because it does the initsystem detection at runtime.

Reproducible: Always
Comment 1 Denis Lisov 2021-04-02 21:20:20 UTC
Ping. This is still the case in libreswan-4.3. Is any additional information from me needed to fix this problem?
Comment 2 Vladimir 2021-04-30 14:25:36 UTC
Same issue here.

To make things work, I have to patch /usr/libexec/ipsec/setup and
replace line 30 to:

initsystem="systemd"

How's this was supposed to work? The script has huge switch with commands for different init systems, but no code to detect them.
Comment 3 Vladimir 2021-04-30 15:04:35 UTC
Some more details:

the problem script source is programs/setup/setup.in

running simple 'make -C programs/setup/' command
produces expected result in  'OBJ.linux.x86_64/programs/setup/setup'
where initsystem="systemd" 
(all this using unmodified tarball)
However, emerge 'emerge -v net-vpn/libreswan' produces 'setup' script
with 'initsystem="openrc"' in it.
Comment 4 Vladimir 2021-04-30 15:15:11 UTC
Created attachment 704541 [details]
emerge --info output
Comment 5 Vladimir 2021-04-30 15:16:06 UTC
Created attachment 704544 [details]
output of emerge build log
Comment 6 Vladimir 2021-04-30 15:16:37 UTC
also, I have openrc still installed
Comment 7 Larry the Git Cow gentoo-dev 2021-05-01 07:12:20 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5c7c9a782224f592c9f2521d766cf31322656c7

commit b5c7c9a782224f592c9f2521d766cf31322656c7
Author:     Hans de Graaff <graaff@gentoo.org>
AuthorDate: 2021-05-01 07:12:11 +0000
Commit:     Hans de Graaff <graaff@gentoo.org>
CommitDate: 2021-05-01 07:12:11 +0000

    net-vpn/libreswan: set INITSYSTEM correctly
    
    INITSYSTEM was hardcoded to always be openrc. This was ignored in
    libreswan 3.x where runtime detection was used, but in 4.x the
    INITSYSTEM is hardcoded in the setup script at installation time. Set
    INITSYSTEM based on the systemd USE flag instead.
    
    Closes: https://bugs.gentoo.org/756121
    Package-Manager: Portage-3.0.18, Repoman-3.0.2
    Signed-off-by: Hans de Graaff <graaff@gentoo.org>

 net-vpn/libreswan/libreswan-4.4-r1.ebuild | 120 ++++++++++++++++++++++++++++++
 1 file changed, 120 insertions(+)