Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 366171

Summary: net-mail/dovecot should use systemd.eclass to install systemd units
Product: Gentoo Linux Reporter: Michał Górny <mgorny>
Component: Current packagesAssignee: Eray Aslan <eras>
Status: RESOLVED FIXED    
Severity: enhancement CC: net-mail+disabled, systemd
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 365937    

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-05-06 05:40:25 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 Eray Aslan gentoo-dev 2011-05-06 08:42:44 UTC
(In reply to comment #0)
> The ebuild is currently unaware
> of these options, making installation of systemd units pkgconfig file dependant and thus automagic.

Not really:

$ grep systemd dovecot-*
dovecot-2.0.11.ebuild:          --without-systemdsystemunitdir \
dovecot-2.0.12-r1.ebuild:               --without-systemdsystemunitdir \
dovecot-2.0.12-r2.ebuild:               --without-systemdsystemunitdir \
dovecot-2.0.12.ebuild:          --without-systemdsystemunitdir \

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

Aye aye capt'n.

[...]
> 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.

I will decide later when there is a final decision on how to handle systemd.  Leaving this bug open for now as a reminder.
Comment 2 Eray Aslan gentoo-dev 2012-03-16 23:17:59 UTC
+*dovecot-2.1.3 (16 Mar 2012)
+
+  16 Mar 2012; Eray Aslan <eras@gentoo.org> +dovecot-2.1.3.ebuild:
+  Version bump. Add systemd unit files - bug #366171
+