Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 366173 - net-dns/avahi should use systemd.eclass to install systemd units
Summary: net-dns/avahi should use systemd.eclass to install systemd units
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: systemd-consumers
  Show dependency tree
 
Reported: 2011-05-06 05:43 UTC by Michał Górny
Modified: 2013-02-03 14:56 UTC (History)
3 users (show)

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


Attachments
avahi-0.6.30-r301.ebuild.patch (avahi-0.6.30-r301.ebuild.patch,701 bytes, patch)
2011-07-24 07:39 UTC, Christoph Brill (egore) (RESIGNED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-05-06 05:43:30 UTC
Upstream does supply a set of systemd unit files in the distribution tarball and an ability to control installation of those files through the --with/--without-systemdsystemunitdir option. The ebuild is currently unaware of these options, making installation of systemd units pkgconfig file dependant and thus automagic.

The ebuild shall use systemd.eclass to handle installation of the systemd unit files in a clean and unified way.

The preferred way to handle that is to use autotools-utils eclass, and call `systemd_to_myeconfargs' before `autotools-utils_src_configure', as in:

	inherit autotools-utils systemd

	src_configure() {
		local myeconfargs=(
			$(use_enable foo)
			--with-bar
		)

		systemd_to_myeconfargs
		autotools-utils_src_configure
	}

If you're not interested in migrating to autotools-utils, there is also a legacy `systemd_with_unitdir' function, which could be used like that:

	inherit systemd

	src_configure() {
		econf \
			$(use_enable foo) \
			--with-bar \
			"$(systemd_with_unitdir)"
	}

Currently introduction of the eclass will cause the package to install systemd unit files unconditionally. If you don't like that concept, feel free to take a vote on the appropriate gentoo-dev ml topic. The eclass behaviour might change in future.
Comment 1 Christoph Brill (egore) (RESIGNED) 2011-07-24 07:39:42 UTC
Created attachment 280797 [details, diff]
avahi-0.6.30-r301.ebuild.patch

Attached is a ebuild for the master branch of the gnome-overlay. Works fine for me.
Comment 2 Anthony Basile gentoo-dev 2013-01-19 17:50:22 UTC
This bugs a bit old, and I'm not a systemd user.  Nonetheless, if people want this, I'll add it.  I just need testers to make sure its working with systemd.
Comment 3 Markus Rathgeb 2013-01-21 08:05:27 UTC
I am using avahi and systemd, so testing is no problem.
Comment 4 Mario Kicherer 2013-01-31 19:52:39 UTC
I can confirm that this works on amd64. Shouldn't be a problem for other arches too, as it only installs the three .service text files into /usr/lib/systemd/system/.

Having these files installed and adjusting them, if necessary, is much easier than searching the web for a draft. :) Thank you!
Comment 5 Anthony Basile gentoo-dev 2013-02-02 02:57:36 UTC
Okay I added this to avahi-0.6.31.  Please test.
Comment 6 Mario Kicherer 2013-02-03 14:55:42 UTC
(In reply to comment #5)
> Okay I added this to avahi-0.6.31.  Please test.

Works here, thank you!