* Re: [RFC] systemd units packaging
2011-05-06 13:39 [RFC] systemd units packaging Koen Kooi
@ 2011-05-06 13:51 ` Chris Larson
2011-05-06 13:54 ` Martin Jansa
2011-05-06 14:07 ` Mark Hatle
2011-05-06 14:20 ` Richard Purdie
2 siblings, 1 reply; 12+ messages in thread
From: Chris Larson @ 2011-05-06 13:51 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Fri, May 6, 2011 at 6:39 AM, Koen Kooi <koen@dominion.thruhere.net> wrote:
> And related to this: how do I get the "installed but not packaged" output back? The bitbake logging changes are hiding it now, which is counterproductive.
Could change those messages from info to warnings, then they'd show up.
--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC] systemd units packaging
2011-05-06 13:51 ` Chris Larson
@ 2011-05-06 13:54 ` Martin Jansa
2011-05-06 14:32 ` Koen Kooi
0 siblings, 1 reply; 12+ messages in thread
From: Martin Jansa @ 2011-05-06 13:54 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 573 bytes --]
On Fri, May 06, 2011 at 06:51:58AM -0700, Chris Larson wrote:
> On Fri, May 6, 2011 at 6:39 AM, Koen Kooi <koen@dominion.thruhere.net> wrote:
> > And related to this: how do I get the "installed but not packaged" output back? The bitbake logging changes are hiding it now, which is counterproductive.
>
> Could change those messages from info to warnings, then they'd show up.
Agreed, please change it. I'm using -v since those were not shown, but -v
brings much more noise then I need.
Regards,
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC] systemd units packaging
2011-05-06 13:54 ` Martin Jansa
@ 2011-05-06 14:32 ` Koen Kooi
2011-05-06 14:43 ` Martin Jansa
0 siblings, 1 reply; 12+ messages in thread
From: Koen Kooi @ 2011-05-06 14:32 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
Op 6 mei 2011, om 15:54 heeft Martin Jansa het volgende geschreven:
> On Fri, May 06, 2011 at 06:51:58AM -0700, Chris Larson wrote:
>> On Fri, May 6, 2011 at 6:39 AM, Koen Kooi <koen@dominion.thruhere.net> wrote:
>>> And related to this: how do I get the "installed but not packaged" output back? The bitbake logging changes are hiding it now, which is counterproductive.
>>
>> Could change those messages from info to warnings, then they'd show up.
>
> Agreed, please change it. I'm using -v since those were not shown, but -v
> brings much more noise then I need.
Like this?
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -676,7 +676,7 @@ python populate_packages () {
unshipped.append(path)
if unshipped != []:
- bb.note("the following files were installed but not shipped in any package:")
+ bb.warn("the following files were installed but not shipped in any package:")
for f in unshipped:
bb.note(" " + f)
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [RFC] systemd units packaging
2011-05-06 14:32 ` Koen Kooi
@ 2011-05-06 14:43 ` Martin Jansa
0 siblings, 0 replies; 12+ messages in thread
From: Martin Jansa @ 2011-05-06 14:43 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 1443 bytes --]
On Fri, May 06, 2011 at 04:32:08PM +0200, Koen Kooi wrote:
>
> Op 6 mei 2011, om 15:54 heeft Martin Jansa het volgende geschreven:
>
> > On Fri, May 06, 2011 at 06:51:58AM -0700, Chris Larson wrote:
> >> On Fri, May 6, 2011 at 6:39 AM, Koen Kooi <koen@dominion.thruhere.net> wrote:
> >>> And related to this: how do I get the "installed but not packaged" output back? The bitbake logging changes are hiding it now, which is counterproductive.
> >>
> >> Could change those messages from info to warnings, then they'd show up.
> >
> > Agreed, please change it. I'm using -v since those were not shown, but -v
> > brings much more noise then I need.
>
> Like this?
>
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -676,7 +676,7 @@ python populate_packages () {
> unshipped.append(path)
>
> if unshipped != []:
> - bb.note("the following files were installed but not shipped in any package:")
> + bb.warn("the following files were installed but not shipped in any package:")
> for f in unshipped:
I prefer also with files
- bb.note(" " + f)
+ bb.warn(" " + f)
because later when reading logs from build I can see if it was something
important or just some file I don't need
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC] systemd units packaging
2011-05-06 13:39 [RFC] systemd units packaging Koen Kooi
2011-05-06 13:51 ` Chris Larson
@ 2011-05-06 14:07 ` Mark Hatle
2011-05-06 14:20 ` Richard Purdie
2 siblings, 0 replies; 12+ messages in thread
From: Mark Hatle @ 2011-05-06 14:07 UTC (permalink / raw)
To: openembedded-core
On 5/6/11 8:39 AM, Koen Kooi wrote:
> Hi,
>
> The past few days I have gotten systemd to work in OE.dev and I have some questions on how to do in the oe-core universe. First some background:
>
> Systemd is a /sbin/init replacement using ideas from apples launchd like socket activation. Startup scripts are replaced by .ini like files:
I really want to start experimenting with systemd inside of oe-core. Can we use
something like the distro flags we had briefly talked about in the TSC meetings
to control which init system is used?
Also a somewhat related question, does this belong in meta-oe or oe-core...
(This might be a good example in meta-oe of extending items within oe-core,
besides being a good place to experiment and prove out the functionality before
it goes into oe-core.)
...
> Now onto my issues:
>
> packaging:
> In OE .dev I added FILES_${PN} += "${base_libdir}/systemd" to
> udev, dbus, rsyslog and avahi. This means we end up with both sysV script
> and systemd units. What I would like to have is ${PN}-sysvinit and
> ${PN}-systemd and the image recipe can choose which init systems gets used.
> Is something like that possible? Are there better ways? Note that systemd
> support sysV initscripts as well, but it needs some care with naming. As I
> understand it, if a unit is found with the same name as a sysV script, only
> the unit will get used. A rootfs postprocess command that deletes /etc/init.d
> won't work, since itwill come back when upgrading the packages.>
This is where I think the distro flags could be useful..
The question is what is the best way to control the initscript files. Should
they be bundled in with the base FILES_${PN}, and then at build-time it's
selected which type of initscript/configuration is enabled -- or should we add a
runtime requirement of ${PN}-init, and provide two alternative ways of
satisfying this.. one sysvinit and one systemd.. (both with appropriate run-time
dependencies)... of course that leads to rootfs construction issues, how does it
know which to select.. <thinking outloud a bit on this>
> building:
> At the moment systemd enabled software installs the units regardless or
> config options. What should be do with software that has an option for that?
> And what if we need to patch the units files in? The initsystem is a choice
> at the image level, so artificially limiting it to a distro choice is not a
> good idea.
I think we need to define what the distro flags/choices end up meaning. And if
we want the policy to be image generation time or distribution build-time.
While it would be possible to build a distro both ways, and determine strategy
at image creation time, the complexities noted above may help make a decision.
> sharing:
> The Arch people have a github with their custom units:
> https://github.com/falconindy/systemd-arch-units/ Do we use those? Do we use
> fedora ones https://bugzilla.redhat.com/show_bug.cgi?id=697698 ? People on
> #systemd are talking about a shared repo on fd.o, but nothing tangible yet.
We've got a few people starting to look into PAM. I think it's somewhat similar
in that there are different ways things can be patches and configured -- we just
have to find a strategy and determine whats best. If we don't have a systemd
lead within OE, then the best approach is likely to pick a distro that is close
enough to our needs to be used as a starting point. (For something like PAM,
that is likely Fedora... while for systemd, Arch might be a good choice.. but I
don't know for sure.)
I'm definitely for re-use, but it'd be nice to have someone to champion this and
help define and describe policies.
> And related to this: how do I get the "installed but not packaged" output
> back? The bitbake logging changes are hiding it now, which is
> counterproductive.
Looks like this may have been a bit too aggressive of filtering. IMHO this
should be a warning not "info" which is filter out.
--Mark
>
> So, what are your thoughts on all this?
>
> regards,
>
> Koen
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [RFC] systemd units packaging
2011-05-06 13:39 [RFC] systemd units packaging Koen Kooi
2011-05-06 13:51 ` Chris Larson
2011-05-06 14:07 ` Mark Hatle
@ 2011-05-06 14:20 ` Richard Purdie
2011-05-06 14:51 ` Koen Kooi
2 siblings, 1 reply; 12+ messages in thread
From: Richard Purdie @ 2011-05-06 14:20 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Fri, 2011-05-06 at 15:39 +0200, Koen Kooi wrote:
> Now onto my issues:
>
> packaging:
> In OE .dev I added FILES_${PN} += "${base_libdir}/systemd" to udev,
> dbus, rsyslog and avahi. This means we end up with both sysV script
> and systemd units. What I would like to have is ${PN}-sysvinit and
> ${PN}-systemd and the image recipe can choose which init systems gets
> used. Is something like that possible?
I'm not sure that it is to be honest. We simply don't have the
capability in the package managers to be able to say "if systemd is
installed, install *-systemd where * is any currently installed
package". Its the same problem we have with locales.
Now if we had that functionality, great, but we simply don't :(.
> Are there better ways? Note that systemd support sysV initscripts as
> well, but it needs some care with naming. As I understand it, if a
> unit is found with the same name as a sysV script, only the unit will
> get used.
> A rootfs postprocess command that deletes /etc/init.d won't work,
> since it will come back when upgrading the packages.
>
> building:
> At the moment systemd enabled software installs the units regardless
> or config options. What should be do with software that has an option
> for that? And what if we need to patch the units files in? The
> initsystem is a choice at the image level, so artificially limiting it
> to a distro choice is not a good idea.
Its an artificial limit but our tools don't give us any other option,
for now I think this has to be a distro config choice.
> And related to this: how do I get the "installed but not packaged"
> output back? The bitbake logging changes are hiding it now, which is
> counterproductive.
As others have said, this should be a bb.warn.
Cheers,
Richard
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [RFC] systemd units packaging
2011-05-06 14:20 ` Richard Purdie
@ 2011-05-06 14:51 ` Koen Kooi
2011-05-06 15:36 ` Otavio Salvador
2011-05-09 13:12 ` Koen Kooi
0 siblings, 2 replies; 12+ messages in thread
From: Koen Kooi @ 2011-05-06 14:51 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
Op 6 mei 2011, om 16:20 heeft Richard Purdie het volgende geschreven:
> On Fri, 2011-05-06 at 15:39 +0200, Koen Kooi wrote:
>> Now onto my issues:
>>
>> packaging:
>> In OE .dev I added FILES_${PN} += "${base_libdir}/systemd" to udev,
>> dbus, rsyslog and avahi. This means we end up with both sysV script
>> and systemd units. What I would like to have is ${PN}-sysvinit and
>> ${PN}-systemd and the image recipe can choose which init systems gets
>> used. Is something like that possible?
>
> I'm not sure that it is to be honest. We simply don't have the
> capability in the package managers to be able to say "if systemd is
> installed, install *-systemd where * is any currently installed
> package". Its the same problem we have with locales.
>
> Now if we had that functionality, great, but we simply don't :(.
>
>> Are there better ways? Note that systemd support sysV initscripts as
>> well, but it needs some care with naming. As I understand it, if a
>> unit is found with the same name as a sysV script, only the unit will
>> get used.
>> A rootfs postprocess command that deletes /etc/init.d won't work,
>> since it will come back when upgrading the packages.
>>
>> building:
>> At the moment systemd enabled software installs the units regardless
>> or config options. What should be do with software that has an option
>> for that? And what if we need to patch the units files in? The
>> initsystem is a choice at the image level, so artificially limiting it
>> to a distro choice is not a good idea.
>
> Its an artificial limit but our tools don't give us any other option,
> for now I think this has to be a distro config choice.
Not quite, if we name the units correctly (or just alias them inside) the sysv scripts will get skipped. So if having both systemd and sysv files installed isn't a dealbreaker them we can make it an image choice. On debian and gentoo it's parallel installable with sysvinit, making it a matter of doing either init=/sbin/init or init=/bin/systemd in your bootloader.
So, is having both sets inside ${PN} a dealbreaker?
regards,
Koen
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [RFC] systemd units packaging
2011-05-06 14:51 ` Koen Kooi
@ 2011-05-06 15:36 ` Otavio Salvador
2011-05-06 16:06 ` Koen Kooi
2011-05-09 13:12 ` Koen Kooi
1 sibling, 1 reply; 12+ messages in thread
From: Otavio Salvador @ 2011-05-06 15:36 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Fri, May 6, 2011 at 11:51, Koen Kooi <koen@dominion.thruhere.net> wrote:
> So, is having both sets inside ${PN} a dealbreaker?
I think it is not BUT this choice could be a distro choice. So I see as:
USE_INIT=(sysv|systemd|both)
Being both the default.
--
Otavio Salvador O.S. Systems
E-mail: otavio@ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [RFC] systemd units packaging
2011-05-06 15:36 ` Otavio Salvador
@ 2011-05-06 16:06 ` Koen Kooi
2011-05-06 16:56 ` Otavio Salvador
0 siblings, 1 reply; 12+ messages in thread
From: Koen Kooi @ 2011-05-06 16:06 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
Op 6 mei 2011, om 17:36 heeft Otavio Salvador het volgende geschreven:
> On Fri, May 6, 2011 at 11:51, Koen Kooi <koen@dominion.thruhere.net> wrote:
>> So, is having both sets inside ${PN} a dealbreaker?
>
> I think it is not BUT this choice could be a distro choice.
Everything can be a distro choice, you can make gtk/qt or even qt-x11/qt-e a distro choice. The point is to see what is an image choice and what isn't. Defaulting to distro choice is a recipe for disaster (pun intended)
I do *NOT* want to write a new distro.conf for every silly option out there.
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [RFC] systemd units packaging
2011-05-06 16:06 ` Koen Kooi
@ 2011-05-06 16:56 ` Otavio Salvador
0 siblings, 0 replies; 12+ messages in thread
From: Otavio Salvador @ 2011-05-06 16:56 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Fri, May 6, 2011 at 13:06, Koen Kooi <koen@dominion.thruhere.net> wrote:
>
> Op 6 mei 2011, om 17:36 heeft Otavio Salvador het volgende geschreven:
>
>> On Fri, May 6, 2011 at 11:51, Koen Kooi <koen@dominion.thruhere.net> wrote:
>>> So, is having both sets inside ${PN} a dealbreaker?
>>
>> I think it is not BUT this choice could be a distro choice.
>
> Everything can be a distro choice, you can make gtk/qt or even qt-x11/qt-e a distro choice. The point is to see what is an image choice and what isn't. Defaulting to distro choice is a recipe for disaster (pun intended)
>
> I do *NOT* want to write a new distro.conf for every silly option out there.
Sure and I agree; that's why I said to default to 'both' so most
common case would be fulfill by the image choice of putting sysv or
systemd but giving the option to "disable" sysv or systemd at distro
level allow for minimal and very space contrain systems to be done
without needing to hack too much.
--
Otavio Salvador O.S. Systems
E-mail: otavio@ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC] systemd units packaging
2011-05-06 14:51 ` Koen Kooi
2011-05-06 15:36 ` Otavio Salvador
@ 2011-05-09 13:12 ` Koen Kooi
1 sibling, 0 replies; 12+ messages in thread
From: Koen Kooi @ 2011-05-09 13:12 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
Op 6 mei 2011, om 16:51 heeft Koen Kooi het volgende geschreven:
>
> Op 6 mei 2011, om 16:20 heeft Richard Purdie het volgende geschreven:
>
>> On Fri, 2011-05-06 at 15:39 +0200, Koen Kooi wrote:
>>> Now onto my issues:
>>>
>>> packaging:
>>> In OE .dev I added FILES_${PN} += "${base_libdir}/systemd" to udev,
>>> dbus, rsyslog and avahi. This means we end up with both sysV script
>>> and systemd units. What I would like to have is ${PN}-sysvinit and
>>> ${PN}-systemd and the image recipe can choose which init systems gets
>>> used. Is something like that possible?
>>
>> I'm not sure that it is to be honest. We simply don't have the
>> capability in the package managers to be able to say "if systemd is
>> installed, install *-systemd where * is any currently installed
>> package". Its the same problem we have with locales.
>>
>> Now if we had that functionality, great, but we simply don't :(.
>>
>>> Are there better ways? Note that systemd support sysV initscripts as
>>> well, but it needs some care with naming. As I understand it, if a
>>> unit is found with the same name as a sysV script, only the unit will
>>> get used.
>>> A rootfs postprocess command that deletes /etc/init.d won't work,
>>> since it will come back when upgrading the packages.
>>>
>>> building:
>>> At the moment systemd enabled software installs the units regardless
>>> or config options. What should be do with software that has an option
>>> for that? And what if we need to patch the units files in? The
>>> initsystem is a choice at the image level, so artificially limiting it
>>> to a distro choice is not a good idea.
>>
>> Its an artificial limit but our tools don't give us any other option,
>> for now I think this has to be a distro config choice.
>
> Not quite, if we name the units correctly (or just alias them inside) the sysv scripts will get skipped. So if having both systemd and sysv files installed isn't a dealbreaker them we can make it an image choice. On debian and gentoo it's parallel installable with sysvinit, making it a matter of doing either init=/sbin/init or init=/bin/systemd in your bootloader.
From #systemd:
15:08 < koen> how can I have systemd skip sysv scripts with a slightly different name?
15:08 < koen> e.g. udevd vs udev
15:09 < sztanpet> symlink udevd.service to dev null, that should mask it
15:10 < sztanpet> automatically i dont know
15:10 < Mithrandir> add Names=udevd to udev.service?
15:10 < Mithrandir> Names=udevd.service, even
15:10 < Mithrandir> or symlink the .service file to the alias name
^ permalink raw reply [flat|nested] 12+ messages in thread