Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 500248 - net-misc/memcached-1.4.7 no longer installs systemd service
Summary: net-misc/memcached-1.4.7 no longer installs systemd service
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-04 09:16 UTC by gentoo@danielquinn.org
Modified: 2014-02-17 08:10 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 gentoo@danielquinn.org 2014-02-04 09:16:05 UTC
Running older versions of Memcached worked just fine with systemd, but as of 1.4.7 the memcached.service no longers appears to be part of the package, which means systemd can't start it.

Reproducible: Always

Steps to Reproduce:
1. emerge net-misc/memcached
2. systemctl start memcached
3.
Actual Results:  
Failed to issue method call: Unit memcached.service failed to load: No such file or directory.


Expected Results:  
Started memcached

Portage 2.2.8-r1 (default/linux/amd64/13.0/desktop/gnome, gcc-4.8.2, glibc-2.18-r1, 3.12.5-gentoo x86_64)
=================================================================
System uname: Linux-3.12.5-gentoo-x86_64-Intel-R-_Core-TM-_i7-2620M_CPU_@_2.70GHz-with-gentoo-2.2
KiB Mem:     8056008 total,   1625940 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of tree: Fri, 31 Jan 2014 09:15:01 +0000
ld GNU ld (GNU Binutils) 2.24
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.9 [disabled]
app-shells/bash:          4.2_p45-r1
dev-java/java-config:     2.2.0
dev-lang/python:          2.6.8-r3, 2.7.6, 3.2.5-r3, 3.3.3
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.12.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, 1.14.1
sys-devel/binutils:       2.24-r2
sys-devel/gcc:            4.7.3-r1, 4.8.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.18-r1
Repositories: mozilla gentoo java steam-overlay
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
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"
CXXFLAGS="-march=core2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="   http://mirror.leaseweb.com/gentoo/   ftp://mirror.leaseweb.com/gentoo/   ftp://gentoo.tiscali.nl/pub/mirror/gentoo/   http://gentoo.tiscali.nl/   ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo   http://ftp.snt.utwente.nl/pub/os/linux/gentoo "
LANG="en_GB.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/mozilla /usr/portage /var/lib/layman/java /var/lib/layman/steam"
SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 aura bash-completion berkdb bluetooth branding bzip2 cairo cdda cdinstall cdr cli colord cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam firefox flac fortran gdbm gif gnome gnome-keyring gnome-online-accounts gnome-shell gpm gstreamer gtk gtk2 gtk3 iconv introspection ipv6 jpeg lcms libnotify libsecret mad matroska mmx mng modules mp3 mp4 mpeg mtp multilib nautilus ncurses nls nptl nsplugin ogg ogm opengl openmp pam pango pcre pdf png policykit ppds pulseaudio python qt3support rdp readline samba sdl session short-touchpad-timeout socialweb spell sqlite srt sse sse2 ssl startup-notification svg systemd tcpd theora threads tiff truetype udev udisks unicode upower usb v4l vaapi vim-syntax vorbis vpx webkit wxwidgets x264 xcb xml xpm xv xvid zeitgeist zlib" ABI_X86="64" 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 proxy proxy_http" 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 keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_GB en nl ko gr" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="intel v4l fbdev" 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 1 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2014-02-09 05:17:49 UTC
provide a file and I can install it
Comment 2 gentoo@danielquinn.org 2014-02-09 13:01:28 UTC
I'm not an experienced systemd dev, but I think this one they have on github should suffice:

https://github.com/memcached/memcached/blob/master/scripts/memcached.service
Comment 3 gentoo@danielquinn.org 2014-02-12 08:54:43 UTC
Correction.  The .service file they have in their github makes an assumption about the placement of the EnvironmentFile.  I did some testing of my own, and this appears to do the job:


[Unit]
Description=memcached daemon
After=network.target

[Service]
EnvironmentFile=/etc/conf.d/memcached
ExecStart=/usr/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS

[Install]
WantedBy=multi-user.target


I'm not sure what the best way to make it part of the ebuild is though.  Whether you should use a patch for their original file, or just copy/paste this -- you'd know better than me.

I can tell you though that this definitely works for me.
Comment 4 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2014-02-17 06:24:43 UTC
fixed in memcached-1.4.17-r2.ebuild
Comment 5 Pacho Ramos gentoo-dev 2014-02-17 07:23:50 UTC
It was using the one without EnvironmentFile on purpose:
https://wiki.gentoo.org/wiki/Systemd/Ebuild_policy#Unit_file_guidelines

I would use the old one:
[Unit]
After=network.target
Description=High-performance, distributed memory object caching system
Documentation=man:memcached(1)
Documentation=http://code.google.com/p/memcached/

[Service]
ExecStart=/usr/bin/memcached
User=memcached

[Install]
WantedBy=multi-user.target
Comment 6 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2014-02-17 08:00:12 UTC
fixed for real this time
Comment 7 Pacho Ramos gentoo-dev 2014-02-17 08:10:24 UTC
thanks!