Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 489990 - net-fs/netatalk-3.0.5 generates incorrect netatalk.service for systemd
Summary: net-fs/netatalk-3.0.5 generates incorrect netatalk.service for systemd
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Justin Lecher (RETIRED)
URL: https://sourceforge.net/p/netatalk/bu...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: 480076
  Show dependency tree
 
Reported: 2013-10-31 18:20 UTC by Sergey Galkin
Modified: 2013-11-02 11:35 UTC (History)
1 user (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 Sergey Galkin 2013-10-31 18:20:09 UTC
After build netatalk.service is not correct and include string 
PIDFile=:PATH_NETATALK_LOCK:
correct is
PIDFile=/var/lock/netatalk

Reproducible: Always

Steps to Reproduce:
1.Install netatalk 3.0.5




--- netatalk-3.0.5.ebuild	2013-10-31 22:15:03.482737391 +0400
+++ netatalk-3.0.5.ebuild-new	2013-10-31 22:16:34.624811751 +0400
@@ -116,7 +116,8 @@
 	# The pamd file isn't what we need, use pamd_mimic_system
 	rm -rf "${D}/etc/pam.d"
 	pamd_mimic_system netatalk auth account password session
-
+    sed -ie "s|:PATH_NETATALK_LOCK:|/var/lock/netatalk|g" \
+             distrib/initscripts/service.systemd.tmpl 
 	sed \
 		-e "s|:SBINDIR:|${EPREFIX}/usr/sbin|g" \
 		distrib/initscripts/service.systemd.tmpl \
Comment 1 Emery Hemingway 2013-11-01 21:46:41 UTC
I think the lock/PID file should be moved to /run/lock.

I don't have a /var/lock, but I do have a /run/lock. /run/lock get wiped out during reboots, which is a plus.

--- /usr/portage/net-fs/netatalk/netatalk-3.0.5.ebuild	2013-10-19 17:31:24.000000000 -0400
+++ netatalk-3.0.5-r1.ebuild	2013-11-01 17:08:41.121043485 -0400
@@ -100,6 +100,7 @@
 		--with-uams-path=/usr/$(get_libdir)/${PN}
 		--disable-silent-rules
 		--with-init-style=gentoo
+		--with-lockfile=/run/lock/${PN}
 		)
 	autotools-utils_src_configure
 }
@@ -120,6 +121,8 @@
 	sed \
 		-e "s|:SBINDIR:|${EPREFIX}/usr/sbin|g" \
 		distrib/initscripts/service.systemd.tmpl \
+		| sed \
+		-e "s|:PATH_NETATALK_LOCK:|/run/lock/netatalk|g" \
 		> "${T}"/service.systemd || die
 	systemd_newunit "${T}"/service.systemd ${PN}.service
Comment 2 Justin Lecher (RETIRED) gentoo-dev 2013-11-02 11:07:42 UTC
you are right. I think it happens, because we are using the 

--with-init-style=gentoo

and not 

--with-init-style=systemd.

I will look into that.
Comment 3 Justin Lecher (RETIRED) gentoo-dev 2013-11-02 11:34:42 UTC
+*netatalk-3.0.5-r1 (02 Nov 2013)
+
+  02 Nov 2013; Justin Lecher <jlec@gentoo.org> -netatalk-3.0.5.ebuild,
+  +netatalk-3.0.5-r1.ebuild:
+  Fix borked systemd unit, #489990
+
Comment 4 Justin Lecher (RETIRED) gentoo-dev 2013-11-02 11:35:23 UTC
Thanks for the patches guys. Hopefully upstream will allow multiple init systems in parallel for the next version.