Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 626578 - net-vpn/libreswan-3.20 - bin/bash: systemctl: command not found
Summary: net-vpn/libreswan-3.20 - bin/bash: systemctl: command not found
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: 2017-07-30 06:18 UTC by Martin Mokrejš
Modified: 2017-08-12 06:36 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Mokrejš 2017-07-30 06:18:45 UTC
Hi,
  during src_install() I see the following errors. I use OpenRC and not systemd:

...
mkdir -p /scratch/var/tmp/portage/net-vpn/libreswan-3.20/image//etc/init.d
install ipsec.init /scratch/var/tmp/portage/net-vpn/libreswan-3.20/image//etc/init.d/ipsec
checkenabled not yet implemented
make[2]: Leaving directory '/scratch/var/tmp/portage/net-vpn/libreswan-3.20/work/libreswan-3.20/OBJ.linux.amd64/initsystems/openrc'
make[1]: Leaving directory '/scratch/var/tmp/portage/net-vpn/libreswan-3.20/work/libreswan-3.20/initsystems'
make[1]: Entering directory '/scratch/var/tmp/portage/net-vpn/libreswan-3.20/work/libreswan-3.20/testing'
make[2]: Entering directory '/scratch/var/tmp/portage/net-vpn/libreswan-3.20/work/libreswan-3.20/testing/pluto'
make[2]: Leaving directory '/scratch/var/tmp/portage/net-vpn/libreswan-3.20/work/libreswan-3.20/testing/pluto'
make[1]: Leaving directory '/scratch/var/tmp/portage/net-vpn/libreswan-3.20/work/libreswan-3.20/testing'
make -j2 -C initsystems INITSYSTEM=systemd UNITDIR=/usr/lib/systemd/system DESTDIR=/scratch/var/tmp/portage/net-vpn/libreswan-3.20/image/ install 
make: Entering directory '/scratch/var/tmp/portage/net-vpn/libreswan-3.20/work/libreswan-3.20/initsystems'
make -C ../OBJ.linux.amd64/initsystems/systemd programs
make[1]: Entering directory '/scratch/var/tmp/portage/net-vpn/libreswan-3.20/work/libreswan-3.20/OBJ.linux.amd64/initsystems/systemd'
make[1]: Nothing to be done for 'programs'.
make[1]: Leaving directory '/scratch/var/tmp/portage/net-vpn/libreswan-3.20/work/libreswan-3.20/OBJ.linux.amd64/initsystems/systemd'
make -C ../OBJ.linux.amd64/initsystems/systemd install
make[1]: Entering directory '/scratch/var/tmp/portage/net-vpn/libreswan-3.20/work/libreswan-3.20/OBJ.linux.amd64/initsystems/systemd'
install --mode=0644 ipsec.service /scratch/var/tmp/portage/net-vpn/libreswan-3.20/image///usr/lib/systemd/system
/bin/bash: systemctl: command not found
************************** WARNING ***********************************
old  /scratch/var/tmp/portage/net-vpn/libreswan-3.20/image//etc/init.d/ipsec  files were found; these should be removed
**********************************************************************
/bin/bash: systemctl: command not found
/bin/bash: systemctl: command not found
/bin/bash: line 0: test: too many arguments
/bin/bash: line 7: test: too many arguments
/bin/bash: line 11: test: too many arguments
make[1]: Leaving directory '/scratch/var/tmp/portage/net-vpn/libreswan-3.20/work/libreswan-3.20/OBJ.linux.amd64/initsystems/systemd'
make: Leaving directory '/scratch/var/tmp/portage/net-vpn/libreswan-3.20/work/libreswan-3.20/initsystems'
>>> Completed installing libreswan-3.20 into /scratch/var/tmp/portage/net-vpn/libreswan-3.20/image/

 * Final size of build directory: 80628 KiB
 * Final size of installed tree: 4740 KiB

ecompressdir: bzip2 -9 /usr/share/man
ecompressdir: bzip2 -9 /usr/share/doc

>>> Installing (1 of 1) net-vpn/libreswan-3.20::gentoo



# emerge --info

Portage 2.3.6 (python 2.7.12-final-0, default/linux/amd64/13.0, gcc-4.9.4, glibc-2.23-r3, 3.18.62-default x86_64)
=================================================================
System uname: Linux-3.18.62-default-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9650_@_3.00GHz-with-gentoo-2.3
KiB Mem:    16409500 total,   5184724 free
KiB Swap:   15647296 total,  15647296 free
Timestamp of repository gentoo: Fri, 28 Jul 2017 16:00:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.3_p48-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.22.3_rc4::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.26.3::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.4_p6-r1::gentoo, 1.5-r1::gentoo, 1.9.6-r3::gentoo, 1.10.3::gentoo, 1.11.6::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo, 2.28-r2::gentoo
sys-devel/gcc:            4.3.5::gentoo, 4.4.7::gentoo, 4.5.4::gentoo, 4.6.3::gentoo, 4.7.4::gentoo, 4.8.5::gentoo, 4.9.3::gentoo, 4.9.4::gentoo, 5.4.0-r3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 0

haskell
    location: /var/lib/layman/haskell
    masters: gentoo
    priority: 1

x-layman
    location: /var/lib/layman
    masters: gentoo
    priority: 2

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 sun-bcla-java-vm Oracle-BCLA-JavaSE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/easy-rsa /usr/share/maven-bin-3.3/conf /var/bind /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news nostrip parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="rsync://ftp.fi.muni.cz/pub/linux/gentoo/ rsync://gentoo.mirror.dkm.cz/gentoo/ ftp://gentoo.mirror.web4u.cz/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X accessibility alsa amd64 amr apache apache2 berkdb bzip2 cairo cgi cli cracklib crypt cups cxx dbus device-mapper dri encode ffmpeg flac fontconfig fortran gd gdbm geoip gnutls hal iconv id3tag innodb java jce jpeg jpg ladspa laptop mad maildir mmx modules mpi mpich2 multilib mysql ncurses nfs nls nptl nptlonly ogg opengl openmp openssl pam pcre perl php png policykit postfix procmail python readline seccomp server session sndfile spf sse sse2 ssl suexec svg syslog tcpd threads tiff truetype unicode usb wavpack xattr xml xorg xvfb zlib" ABI_X86="64 32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4_1 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en cs cz" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21 ruby22" USERLAND="GNU" VIDEO_CARDS="vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Hans de Graaff gentoo-dev Security 2017-07-30 07:20:22 UTC
This looks like a cosmetic issue (this part of the Makefile tries to give advice on what to do next and can handle the failure).

Cc'ing systemd since they may have advice or policies on this issue.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-07-30 13:01:14 UTC
Generally packages shouldn't play with systemctl. If upstream wants to check if systemd is running, the canonical way of doing that is to check if /run/systemd/system exists.
Comment 3 Mike Gilbert gentoo-dev 2017-07-30 13:56:53 UTC
I agree, the errors are harmless.

This target seems a bit dangerous:

installsystemdservice:
    @mkdir -p $(SYSTEMDDIR)
    $(INSTALL) $(INSTCONFFLAGS) $(SYSTEMDFILE) $(SYSTEMDDIR)
    @if test $(SYSTEMDDIR) = ${UNITDIR} ; then \
        systemctl --system daemon-reload ; \
    fi

However, the systemctl command is only executed if DESTDIR is empty, so this can be ignored.
Comment 4 Hans de Graaff gentoo-dev Security 2017-08-12 06:36:07 UTC
Libreswan 3.21 also starts to complain about obsolete openrc files, so in this version I've removed these post checks altogether. The build system doesn't seem to take into account that people may want to install files for multiple init  systems at the same time. :-)