Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 479496 - sys-libs/glibc - add systemd unit for nscd
Summary: sys-libs/glibc - add systemd unit for nscd
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: install-systemd-unit
  Show dependency tree
 
Reported: 2013-08-02 11:38 UTC by Charles Nérot
Modified: 2013-10-06 08:51 UTC (History)
4 users (show)

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


Attachments
/usr/lib/systemd/system/nscd.service (nscd.service,131 bytes, text/plain)
2013-08-12 15:18 UTC, Charles Nérot
Details
/etc/tmpfiles.d/nscd.tmpfiles.conf (nscd.tmpfiles.conf,33 bytes, text/plain)
2013-08-12 15:18 UTC, Charles Nérot
Details
nscd.service from arch (nscd.service,375 bytes, text/plain)
2013-08-13 07:50 UTC, redneb
Details
glibc-2.16.0.ebuild.patch (glibc-2.16.0.ebuild.patch,868 bytes, patch)
2013-09-20 11:15 UTC, Alexander Tsoy
Details | Diff
nscd.service (nscd.service,337 bytes, text/plain)
2013-09-20 11:16 UTC, Alexander Tsoy
Details
glibc-2.16.0.ebuild.patch (glibc-2.16.0.ebuild.patch,949 bytes, patch)
2013-09-20 12:15 UTC, Alexander Tsoy
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Nérot 2013-08-02 11:38:56 UTC
net-firewall/iptables should provide systemd unit file for the nscd daemon.

Reproducible: Always
Comment 1 Charles Nérot 2013-08-02 11:40:25 UTC
Should only be done whith the nscd USE.
Comment 2 Pacho Ramos gentoo-dev 2013-08-02 14:48:15 UTC

*** This bug has been marked as a duplicate of bug 479490 ***
Comment 3 Alexander Tsoy 2013-08-02 14:55:41 UTC
This is not a dublicate, but a typo in comment 0 :)
Comment 4 Charles Nérot 2013-08-02 14:59:30 UTC
(In reply to Charles Nérot from comment #0)
> net-firewall/iptables should provide systemd unit file for the nscd daemon.
> 
> Reproducible: Always

Title is good but description is ko.
Same comment without Typo :
sys-libs/glibc should provide systemd unit file for the nscd daemon.
Comment 5 Charles Nérot 2013-08-12 15:18:03 UTC
Created attachment 355778 [details]
/usr/lib/systemd/system/nscd.service
Comment 6 Charles Nérot 2013-08-12 15:18:43 UTC
Created attachment 355780 [details]
/etc/tmpfiles.d/nscd.tmpfiles.conf
Comment 7 redneb 2013-08-13 07:48:34 UTC
(In reply to Charles Nérot from comment #5)
> Created attachment 355778 [details]
> /usr/lib/systemd/system/nscd.service

This doesn't work for me. In my system (with glibc-2.15-r3, the current stable), /usr/sbin/nscd doesn't understand the -F flag.
Comment 8 redneb 2013-08-13 07:50:05 UTC
Created attachment 355842 [details]
nscd.service from arch

This is the nscd.service unit file from arch. It does work correctly in my system. Additionally, it supports reloading the service.
Comment 9 redneb 2013-08-13 07:51:02 UTC
(In reply to Charles Nérot from comment #6)
> Created attachment 355780 [details]
> /etc/tmpfiles.d/nscd.tmpfiles.conf

This should be installed as /usr/lib/systemd/system/nscd.service, not in /etc
Comment 10 redneb 2013-08-13 07:51:52 UTC
(In reply to redneb from comment #9)
> (In reply to Charles Nérot from comment #6)
> > Created attachment 355780 [details]
> > /etc/tmpfiles.d/nscd.tmpfiles.conf
> 
> This should be installed as /usr/lib/systemd/system/nscd.service, not in /etc

Sorry, I meant /usr/lib/tmpfiles.d/nscd.conf
Comment 11 Pacho Ramos gentoo-dev 2013-08-31 12:31:08 UTC
This will probably take some time as:
1. I cannot update to test if it works with latest testing version (I usually commit for the latest and only backport if needed).
2. glibc ebuilds are a bit different than current ebuilds as phases are defined outside them. Also, since it's so central to the system, I want to be cautious
Comment 12 Pacho Ramos gentoo-dev 2013-09-18 21:27:16 UTC
A diff for the ebuild would be interesting (I am new to the "eblit-run" stuff :/)
Comment 13 Alexander Tsoy 2013-09-20 10:36:16 UTC
(In reply to redneb from comment #8)
> Created attachment 355842 [details]
> nscd.service from arch
> 
> This is the nscd.service unit file from arch. It does work correctly in my
> system. Additionally, it supports reloading the service.

"After=syslog.target" is deprecated and not recommended to use, >=glibc-2.16 ships nscd that understand "-F" option.
Comment 14 Alexander Tsoy 2013-09-20 11:15:24 UTC
Created attachment 359120 [details, diff]
glibc-2.16.0.ebuild.patch
Comment 15 Alexander Tsoy 2013-09-20 11:16:37 UTC
Created attachment 359122 [details]
nscd.service
Comment 16 Alexander Tsoy 2013-09-20 11:27:21 UTC
(In reply to Alexander Tsoy from comment #14)
> Created attachment 359120 [details, diff] [details, diff]
> glibc-2.16.0.ebuild.patch

Or may be place systemd unit for >=glibc-2.16 (with "-F" option) in "${FILESDIR}"/2.16 and unit for earlier versions in "${FILESDIR}"/2.10 if you plan to add systemd units for old glibcs.
Comment 17 Alexander Tsoy 2013-09-20 12:15:48 UTC
Created attachment 359130 [details, diff]
glibc-2.16.0.ebuild.patch

added forgotten tmpfiles.d config =/
Comment 18 Pacho Ramos gentoo-dev 2013-09-21 13:55:56 UTC
Thanks for the patch, will wait for toolchain maintainers to review if it's the way for doing that
Comment 19 SpanKY gentoo-dev 2013-09-30 00:48:22 UTC
Comment on attachment 359130 [details, diff]
glibc-2.16.0.ebuild.patch

i'd imagine you'd want to just add it to files/eblits/src_install.eblit
Comment 20 Pacho Ramos gentoo-dev 2013-10-01 20:33:30 UTC
(In reply to SpanKY from comment #19)
> Comment on attachment 359130 [details, diff] [details, diff]
> glibc-2.16.0.ebuild.patch
> 
> i'd imagine you'd want to just add it to files/eblits/src_install.eblit

But, how should I inherit systemd eclass then? If I add the call to systemd_dounit to src_install.eblit, it will fail if systemd.eclass isn't inherit by some ebuild
Comment 21 SpanKY gentoo-dev 2013-10-02 22:17:37 UTC
(In reply to Pacho Ramos from comment #20)

you can do:
  if [[ $(type -t systemd_dounit) == "function" ]] ; then

and then add the inherit to the versions you care about
Comment 22 Pacho Ramos gentoo-dev 2013-10-06 08:51:23 UTC
+  06 Oct 2013; Pacho Ramos <pacho@gentoo.org> +files/nscd.service,
+  +files/nscd.tmpfilesd, files/eblits/src_install.eblit, glibc-2.16.0.ebuild,
+  glibc-2.17.ebuild, glibc-2.18.ebuild:
+  Add unit file (#479496 by Alexander Tsoy, redneb, Charles Nérot and SpanKY)
+