Summary: | net-misc/memcached-1.4.10 doesn't installs systemd service file | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Maksim 'max_posedon' Melnikau <maxposedon> |
Component: | New packages | Assignee: | Robin Johnson <robbat2> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | systemd |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 448882 | ||
Attachments: |
memcached.ebuild.patch
memcached.service memcached.service |
Description
Maksim 'max_posedon' Melnikau
2011-12-18 21:14:22 UTC
How can I help to move it? (In reply to Maksim 'max_posedon' Melnikau from comment #1) > How can I help to move it? Providing an ebuild diff working for you would be nice Created attachment 353794 [details, diff]
memcached.ebuild.patch
Created attachment 353796 [details]
memcached.service
memcached.service based on variant provided by fedora-19, but fixed a bit to fix /etc/conf.d/memcached variables (s/$USER/$MEMCACHED_RUNAS)
(In reply to Pacho Ramos from comment #2) Works for me with attached ebuild patch and service: # systemctl status memcached.service memcached.service - Memcached Loaded: loaded (/usr/lib64/systemd/system/memcached.service; disabled) Active: active (running) since Mon 2013-07-22 00:35:44 FET; 4min 16s ago Main PID: 20626 (memcached) CGroup: /system.slice/memcached.service └─20626 /usr/bin/memcached -u memcached -p 11211 -m -c 1024 Jul 22 00:35:44 m_melnikau-M11xR3 systemd[1]: Started Memcached. Will test and commit in a week if nobody disagrees. Thanks! There is one problem here: right now memcached.service will use /etc/conf.d/memcached, which is nice in compatibility reasons. But systemd users may use INSTALL_MASK="/etc/init.d /etc/conf.d /etc/runlevels", like https://github.com/canek-pelaez/gentoo-systemd-only suggest for example (as many others gentoo systemd manualsa) Should I provide another service, which don't use variables from /etc/conf.d/memcached? It will be more "systemdish", if we will put all this variables inside service. You should fix memcached to use config files. (In reply to Michał Górny from comment #8) > You should fix memcached to use config files. I'm sorry I didn't understand which config files you mean, attached service file uses /etc/conf.d/memcached, is it ok? (In reply to Maksim 'max_posedon' Melnikau from comment #9) > (In reply to Michał Górny from comment #8) > > You should fix memcached to use config files. > I'm sorry I didn't understand which config files you mean, attached service > file uses /etc/conf.d/memcached, is it ok? No. memcached should have its *own* config file which will be read by memcached. RC is supposed to *start* services, not *configure* them. > (In reply to Maksim 'max_posedon' Melnikau from comment #9)
> No. memcached should have its *own* config file which will be read by
> memcached. RC is supposed to *start* services, not *configure* them.
But memcached haven't such config files by design, and all configuration should be done by command line.
And frankly speaking it could work (with default configuration) without any options at all.
(In reply to Maksim 'max_posedon' Melnikau from comment #11) > > (In reply to Maksim 'max_posedon' Melnikau from comment #9) > > No. memcached should have its *own* config file which will be read by > > memcached. RC is supposed to *start* services, not *configure* them. > But memcached haven't such config files by design, and all configuration > should be done by command line. > > And frankly speaking it could work (with default configuration) without any > options at all. And that's a major design flaw that needs to be fixed upstream. Otherwise, you end up with software that you can't properly move to another distro without converting configuration to a different format used by the local flavor of RC. And if you really want to get it wrong, use the format used by Fedora. It's likely to end up being the most portable one even if it introduces /etc/sysconfig in Gentoo. (In reply to Michał Górny from comment #12) > And that's a major design flaw that needs to be fixed upstream. Otherwise, > you end up with software that you can't properly move to another distro > without converting configuration to a different format used by the local > flavor of RC. As I understand, this is thing, which systemd trying to fix. There is no reason to have 2 separate config files - app's one, and service --- if its easy and possible to move all configuration to service file and unify many options. > And if you really want to get it wrong, use the format used by Fedora. It's > likely to end up being the most portable one even if it introduces > /etc/sysconfig in Gentoo. I expecting that fedora will deprecate /etc/sysconfig at least for systemd. So, I'm asking, which variant in the best for Gentoo? As for me - move all configuration in nice service file, and configure systemd via Environment and EnvironmentFile or even via simple Exec=. And expecting from user to changing configuration via standard systemd way - service inheritance. We also have some units relying on cond.f files, I see no gain on having a new file in a new subdirectory providing exact same functionality (and I don't see /etc/sysconfig any better than conf.d) Also, this specific .service file is broken and won't work for me (I use UNIX sockets only). If we're to provide a file for this, I suggest providing one with sane defaults and possibly a /etc/systemd/system/memcached.service.d/gentoo.conf with commented out sample how to specify more options. However, we should not at all think about providing configuration wrapper variables. Let's just let people pass command-line options directly, e.g. via overriding ExecStart=. Created attachment 356956 [details]
memcached.service
"systeming" memcached.service
(In reply to Michał Górny from comment #15) > ... and possibly a /etc/systemd/system/memcached.service.d/gentoo.conf > with commented out sample how to specify more options. I think its not required, because overriding settings via /etc/systemd/system/<service>.service.d/ is the standard way for systemd's services. I don't think providing a commented file as example to edit and tweak will hurt, and will surely help to people making configuration easier +*memcached-1.4.13-r1 (31 Aug 2013) + + 31 Aug 2013; Pacho Ramos <pacho@gentoo.org> +files/memcached.service, + +memcached-1.4.13-r1.ebuild: + Add unit file (#395209 by Maksim 'max_posedon' Melnikau) + OK, I have seen neither Arch people let people play so much with memcached starting |