Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 500300

Summary: net-print/cups-1.7.1 - automagic linking to libsystemd-daemon.so.0
Product: Gentoo Linux Reporter: Ben Kohler <bkohler>
Component: [OLD] PrintingAssignee: Gentoo systemd Team <systemd>
Status: RESOLVED FIXED    
Severity: normal CC: nikoli, printing
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Ben Kohler gentoo-dev 2014-02-04 18:31:59 UTC
Without systemd installed:

# objdump -p /usr/sbin/cupsd | grep NEED
  NEEDED               libcupsmime.so.1
  NEEDED               libssl.so.1.0.0
  NEEDED               libcrypto.so.1.0.0
  NEEDED               libpam.so.0
  NEEDED               libpaper.so.1
  NEEDED               libacl.so.1
  NEEDED               libdbus-1.so.3
  NEEDED               libcups.so.2
  NEEDED               libpthread.so.0
  NEEDED               libc.so.6
  VERNEED              0x0000000000003c30
  VERNEEDNUM           0x0000000000000004
#

With systemd installed: 

# objdump -p /usr/sbin/cupsd | grep NEED
  NEEDED               libcupsmime.so.1
  NEEDED               libssl.so.1.0.0
  NEEDED               libcrypto.so.1.0.0
  NEEDED               libpam.so.0
  NEEDED               libpaper.so.1
  NEEDED               libacl.so.1
  NEEDED               libdbus-1.so.3
  NEEDED               libcups.so.2
  NEEDED               libpthread.so.0
  NEEDED               libsystemd-daemon.so.0
  NEEDED               libc.so.6
  VERNEED              0x0000000000003cb8
  VERNEEDNUM           0x0000000000000005
#
Comment 1 Andreas K. Hüttel gentoo-dev 2014-02-04 20:42:12 UTC
@systemd- I could need some help here. lxnay did the systemd patch etc in the first place... feel free to update things in net-print/cups in a revbump.
Comment 2 Pacho Ramos gentoo-dev 2014-02-15 12:36:58 UTC
Indeed, looks like the patch we are applying causes this automagic linking problem (as does in Fedora, Arch, openSuSE...) :S

Maybe we would need to add a "systemd" enable/disable switch (or apply the patch conditionally behind a systemd USE flag)
Comment 3 Andreas K. Hüttel gentoo-dev 2014-02-15 14:30:31 UTC
Well, I was happy adding Fabio's patches to ebuild and source to get rid of the systemd useflag some time ago, with the understanding that the systemd team will take care of resulting bugs.

Let's give them a chance (and btw bug 450282 and bug 494582 are also still pending).

If eventually noone takes care of this we'll go back to systemd useflag and stock cups with conditional patching. I realize this is a regression, but hey, fix and upstream please! I can't, I'm not running systemd anywhere so far.
Comment 4 Pacho Ramos gentoo-dev 2014-02-15 15:07:16 UTC
I think the patch we are carrying is the same as used in other distributions, for the other issues you point, I would simply apply the same patches as opensuse does:
https://build.opensuse.org/package/view_file/Printing/cups/cups-0001-systemd-add-systemd-socket-activation-and-unit-files.patch?expand=1
https://build.opensuse.org/package/view_file/Printing/cups/cups-0002-systemd-listen-only-on-localhost-for-socket-activation.patch?expand=1
https://build.opensuse.org/package/view_file/Printing/cups/cups-0003-systemd-secure-cups.service-unit-file.patch?expand=1

Upstream is aware of the issue but they still didn't fix it:
http://www.cups.org/str.php?L3917

And, then, most distributions are still needing to apply this patches.

For the automagic problem, I think that we will need to have a USE "systemd" for this as cups will behave differently when compiled against systemd to support the sockets stuff.

I see two options:
- Follow what major distros are doing and apply that patches. Due we hitting automagic problems, we would either need to fix the patch to add a --enable-systemd switch or simply apply the patches conditionally depending on "systemd" USE flag
- Only provide a simple cupsd.service file as exherbo people is doing (losing the sockets stuff completely)
Comment 5 Kai Wüstermann 2014-02-16 16:54:26 UTC
> ....
> I see two options:
> - Follow what major distros are doing and apply that patches. Due we hitting
> automagic problems, we would either need to fix the patch to add a
> --enable-systemd switch or simply apply the patches conditionally depending
> on "systemd" USE flag
> - Only provide a simple cupsd.service file as exherbo people is doing
> (losing the sockets stuff completely)

For me a systemd USE flag seems the better way, because in future there will be more packages with special extensions for systemd.

On my system net-print/cups-1.7.1 stops while econf:

-----------------------------------------------------
 * Messages for package net-print/cups-1.7.1:

 * ERROR: net-print/cups-1.7.1::gentoo failed (configure phase):
 *   econf failed
 * 
 * Call stack:
 *          ebuild.sh, line   93:  Called src_configure
 *        environment, line 6910:  Called econf '--libdir=/usr/lib64' '--localstatedir=/var' '--with-rundir=/run/cups' '--with-cups-user=lp' '--with-cups-group=lp' '--with-docdir=/usr/share/cups/html' '--with-languages=' '--with-system-groups=lpadmin' '--enable-acl' '--disable-avahi' '--enable-dbus' '--disable-debug' '--disable-debug-guards' '--disable-gssapi' '--enable-pam' '--disable-static' '--enable-threads' '--enable-libusb' '--disable-dnssd' '--with-java' '--without-perl' '--without-php' '--with-python=/usr/bin/python2.7' '--without-xinetd' '--enable-libpaper' '--with-systemdsystemunitdir=/usr/lib/systemd/system' '--enable-gnutls' '--disable-openssl'
 *   phase-helpers.sh, line  577:  Called die
 * The specific snippet of code:
 *   			die "econf failed"
 * 
 * If you need support, post the output of `emerge --info '=net-print/cups-1.7.1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-print/cups-1.7.1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/net-print/cups-1.7.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-print/cups-1.7.1/temp/environment'.
 * Working directory: '/var/tmp/portage/net-print/cups-1.7.1/work/cups-1.7.1'
 * S: '/var/tmp/portage/net-print/cups-1.7.1/work/cups-1.7.1'
------------------------------------------------

Look at:
'--with-systemdsystemunitdir=/usr/lib/systemd/system'


emerge --info '=net-print/cups-1.7.1::gentoo'
Portage 2.2.7 (default/linux/amd64/13.0/desktop, gcc-4.7.3, glibc-2.17, 3.10.25-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.10.25-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q8200_@_2.33GHz-with-gentoo-2.2
KiB Mem:     4047828 total,    992968 free
KiB Swap:    4192928 total,   4192928 free
Timestamp of tree: Sun, 16 Feb 2014 15:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.5-r3, 3.3.3
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.11.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3, 1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo science
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA Oracle-BCLA-JavaSE PUEL dlj-1.1 AdobeFlash-11.x"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib/latex2html /usr/share/gnupg/qualified.txt /usr/share/texmf-site/tex/latex/html /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /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="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS=" -j4  --load-average 4"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://de-mirror.org/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo"
LANG="de_DE.UTF-8"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/science"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 amr berkdb branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cupsddk cxx dbus dri dts dvd dvdr dvi emboss encode exif fam firefox flac fortran g3dvl gdbm gif gimp gnutls gpm gstreamer gtk gtk3 hddtemp hpijs hunspell iconv ipv6 java jpeg jpg latex lcms libnotify lm_sensors lyx mad midi mime mmx mng modules mono mp3 mp4 mpeg mtp multilib ncurses nls nptl nsplugin nvidia odbc odf ogg opencl opengl openmp pam pango pcre pdf pmu png policykit ppds python qt3support raw readline scanner sdl session smp spell sse sse2 ssl startup-notification svg symlink system-cairo system-icu system-jpeg system-sqlite tcpd theora thunar thunderbird tiff truetype udev udisks unicode upower usb vorbis win32codecs wmf wxwidgets x264 xcb xinerama xml xpm xscreensaver xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="hda-intel" 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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby18" SANE_BACKENDS="epson2 net" USERLAND="GNU" VIDEO_CARDS="nvidia" 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:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 6 Andreas K. Hüttel gentoo-dev 2014-05-04 19:36:47 UTC
This is fixed in 1.7.1-r1 where the systemd patch is only applied conditionally.