Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 366179 - app-admin/rsyslog should use systemd.eclass to install systemd units
Summary: app-admin/rsyslog 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: Ultrabug
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: systemd-consumers
  Show dependency tree
 
Reported: 2011-05-06 05:48 UTC by Michał Górny
Modified: 2011-05-16 11:06 UTC (History)
1 user (show)

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


Attachments
Fix autotools-utils & EAPI=4 usage (0001-Fix-autotools-utils-EAPI-4-usage.patch,6.40 KB, patch)
2011-05-11 19:15 UTC, Michał Górny
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:48:47 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 Ultrabug gentoo-dev 2011-05-11 14:43:23 UTC
Hi Michal,

I've reworked the latest ebuild to use autotools-utils and systemd eclasses. Would you please give it a try from my overlay (ultrabug) and confirm it's right on your point of view before I move the other ebuilds to this ?

Thanks
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-05-11 19:15:06 UTC
Created attachment 272887 [details, diff]
Fix autotools-utils & EAPI=4 usage

(In reply to comment #1)
> I've reworked the latest ebuild to use autotools-utils and systemd eclasses.
> Would you please give it a try from my overlay (ultrabug) and confirm it's
> right on your point of view before I move the other ebuilds to this ?

I'm attaching a patch applying few fixes I mentioned in PM. You should put a real bugnumber/upstream bugzie URI for the in-source build failure bug.
Comment 3 Ultrabug gentoo-dev 2011-05-16 10:58:45 UTC
The new unstable line of rsyslog ebuilds now support this mate, thanks again for your explanations and help.

+*rsyslog-5.8.0-r1 (16 May 2011)
+
+  16 May 2011; Ultrabug <ultrabug@gentoo.org> -rsyslog-5.8.0.ebuild,
+  +rsyslog-5.8.0-r1.ebuild:
+  EAPI4 and use of systemd eclass, fix #366179.

Are you okay to close the bug ?
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-05-16 11:06:14 UTC
(In reply to comment #3)
> The new unstable line of rsyslog ebuilds now support this mate, thanks again
> for your explanations and help.
> 
> +*rsyslog-5.8.0-r1 (16 May 2011)
> +
> +  16 May 2011; Ultrabug <ultrabug@gentoo.org> -rsyslog-5.8.0.ebuild,
> +  +rsyslog-5.8.0-r1.ebuild:
> +  EAPI4 and use of systemd eclass, fix #366179.
> 
> Are you okay to close the bug ?

Yes, closing now.