Creating of systemd service files instead of init scripts for new packages

classic Classic list List threaded Threaded
141 messages Options
1234 ... 8
Reply | Threaded
Open this post in threaded view
|

Creating of systemd service files instead of init scripts for new packages

Andreas Jaeger-8
Since we moved to systemd completely, I suggest that newly added files
will contain service files - and not init scripts anymore.

So, please only add service files to new packages and if you change your
init file, consider using a service file and dropping the init file,

Andreas
--
  Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
   SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
    GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
     GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Creating of systemd service files instead of init scripts for new packages

Cristian Rodríguez-2
El 29/03/13 14:43, Andreas Jaeger escribió:
> Since we moved to systemd completely, I suggest that newly added files
> will contain service files - and not init scripts anymore.
>
> So, please only add service files to new packages and if you change your
> init file, consider using a service file and dropping the init file,


Does anyone have access to a full unpacked tree of factory and can post
what packages contain init scripts but not service files so I can take
look at them ? there is no rpmlint check for that :-|


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Creating of systemd service files instead of init scripts for new packages

Michal Kubecek
On Fri, Mar 29, 2013 at 11:29:22PM -0300, Cristian Rodríguez wrote:
>
> Does anyone have access to a full unpacked tree of factory and can
> post what packages contain init scripts but not service files so I
> can take look at them ? there is no rpmlint check for that :-|

And not long ago I was being assured there won't be...

                                                      Michal Kubeček

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Creating of systemd service files instead of init scripts for new packages

Stephan Kulow-3
On 02.04.2013 10:06, Michal Kubecek wrote:
> On Fri, Mar 29, 2013 at 11:29:22PM -0300, Cristian Rodríguez wrote:
>>
>> Does anyone have access to a full unpacked tree of factory and can
>> post what packages contain init scripts but not service files so I
>> can take look at them ? there is no rpmlint check for that :-|
>
> And not long ago I was being assured there won't be...
>
We agreed not to enforce that. So your fine to have a package with init
scripts. But it's perfectly fine also to have a rpmlint warning that
a package has *only* init script and Cristian adding systemd services
for them - if the maintainer of the package disagrees to add it, then
we can talk again.

Greetings, Stephan



--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Creating of systemd service files instead of init scripts for new packages

Andreas Jaeger-8
In reply to this post by Michal Kubecek
On Tuesday, April 02, 2013 10:06:46 Michal Kubecek wrote:
> On Fri, Mar 29, 2013 at 11:29:22PM -0300, Cristian Rodríguez wrote:
> > Does anyone have access to a full unpacked tree of factory and can
> > post what packages contain init scripts but not service files so I
> > can take look at them ? there is no rpmlint check for that :-|
>
> And not long ago I was being assured there won't be...

You don't need to make it an error,

Andreas
--
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Creating of systemd service files instead of init scripts for new packages

Frederic Crozat-4
Le mardi 02 avril 2013 à 10:27 +0200, Andreas Jaeger a écrit :
> On Tuesday, April 02, 2013 10:06:46 Michal Kubecek wrote:
> > On Fri, Mar 29, 2013 at 11:29:22PM -0300, Cristian Rodríguez wrote:
> > > Does anyone have access to a full unpacked tree of factory and can
> > > post what packages contain init scripts but not service files so I
> > > can take look at them ? there is no rpmlint check for that :-|
> >
> > And not long ago I was being assured there won't be...
>
> You don't need to make it an error,

The only case where it should be an error is "early boot" initscripts
(the one named boot.*). Support for that has been removed in upstream
systemd and I'd prefer to not backport the support in our systemd, if we
can avoid it..

--
Frederic Crozat <[hidden email]>
SUSE

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Creating of systemd service files instead of init scripts for new packages

Cristian Rodríguez-2
El 02/04/13 06:05, Frederic Crozat escribió:
Support for that has been removed in upstream
> systemd and I'd prefer to not backport the support in our systemd, if we
> can avoid it..
>

As far as I understand, all those boot.* scripts that are not already
masked, are replaced by upstream provided integration with systemd and
dracut.

We should just drop them and integrate upstream changes, however this
also implies getting rid of suse mkinitrd.

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Creating of systemd service files instead of init scripts for new packages

Christian Boltz-5
In reply to this post by Frederic Crozat-4
Hello,

Am Dienstag, 2. April 2013 schrieb Frederic Crozat:
> Le mardi 02 avril 2013 à 10:27 +0200, Andreas Jaeger a écrit :
> > On Tuesday, April 02, 2013 10:06:46 Michal Kubecek wrote:
> > > On Fri, Mar 29, 2013 Cristian Rodríguez wrote:
> > > > Does anyone have access to a full unpacked tree of factory and
> > > > can post what packages contain init scripts but not service
> > > > files so can take look at them ? there is no rpmlint check for
> > > > that :-|

grepping ARCHIVES.gz might be helpful ;-)

(and it might be helpful to have an ARCHIVES.gz for factory)

> The only case where it should be an error is "early boot" initscripts
> (the one named boot.*). Support for that has been removed in upstream
> systemd

Nice[tm]. What's the reason for this? (I assume "let's break some
initscripts from stone age" was not the reason - I seriously hope
Lennart is not evil enough for that ;-)

> and I'd prefer to not backport the support in our systemd, if
> we can avoid it..

At the moment you'll break lots of packages and, more important,
break lots of basic features like RAID and LVM.


I'll give you a short overview from my system (Factory, last updated
about 3 weeks ago):

# cd /etc/init.d && for file in boot.* ; do echo === $file ===; pac=$(rpm -qf $file); echo Package: $pac; rpm -ql $pac |grep '\.service$'; echo; done

=== boot.apparmor ===
Package: apparmor-parser-2.8.1-130.1.x86_64

=== boot.cycle ===
Package: bootcycle-0.3-244.1.x86_64

=== boot.d ===
Package: filesystem-12.3-11.1.x86_64

=== boot.device-mapper ===
Package: device-mapper-1.02.77-22.1.x86_64

=== boot.dmraid ===
Package: dmraid-1.0.0.rc16-23.1.x86_64

=== boot.kdump ===
Package: kdump-0.8.1-21.1.x86_64

=== boot.loadmodules ===
Package: mkinitrd-2.7.2-5.7.x86_64
/usr/lib/systemd/system/purge-kernels.service   # doesn't count ;-)

=== boot.local ===
Package: file /etc/init.d/boot.local is not owned by any package   # but should continue to work ;-)

=== boot.localnet ===
Package: aaa_base-12.3-17.1.x86_64

=== boot.lvm ===
Package: lvm2-2.02.98-22.1.x86_64

=== boot.md ===
Package: mdadm-3.2.6-0.x86_64

=== boot.scpm ===
Package: scpm-1.1.7-21.1.x86_64

=== boot.sysstat ===
Package: sysstat-10.0.5-7.1.x86_64
/usr/lib/systemd/system/sysstat.service

=== boot.udev ===
Package: udev-195-24.1.x86_64
/usr/lib/systemd/system/basic.target.wants/systemd-udev-root-symlink.service
/usr/lib/systemd/system/sysinit.target.wants/systemd-udev-trigger.service
/usr/lib/systemd/system/sysinit.target.wants/systemd-udevd.service
/usr/lib/systemd/system/systemd-udev-root-symlink.service
/usr/lib/systemd/system/systemd-udev-settle.service
/usr/lib/systemd/system/systemd-udev-trigger.service
/usr/lib/systemd/system/systemd-udevd.service
/usr/lib/systemd/system/udev.service


In other words: from the 14 packages owning boot.* initscripts on my
system, only 2 have service files.

I'm sure the maintainers of the other 12 will happily accept submit
requests that add the service file and do the migration in %post ;-)

Note that I didn't write anything about "remove the initscript" - for
AppArmor, I'd like to keep it for backwards compability with older
openSUSE releases. Other maintainers might or might not have similar
wishes.

BTW: is ExecStatus supported in the meantime?


(Needless to say that updating systemd is a no-go until all affected
packages have a service file.)


Regards,

Christian Boltz
--
Doh, bad Steve, no donut! [...]
That's what I got for copy&wasting from a diff.
[Steve Beattie in apparmor]

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Creating of systemd service files instead of init scripts for new packages

Cristian Rodríguez-2
El 02/04/13 16:09, Christian Boltz escribió:

> Nice[tm]. What's the reason for this? (I assume "let's break some
> initscripts from stone age" was not the reason - I seriously hope
> Lennart is not evil enough for that ;-)

Early boot scripts were a distribution specific extension of sysvinit,
hence everybody does it differently.

To be more specific than Frederic, systemd no longer includes any
distribution-specific code, all distributions targets (in our case
TARGET_SUSE) are gone.

> At the moment you'll break lots of packages and, more important,
> break lots of basic features like RAID and LVM.

RAID and LVM already have systemd support upstream, to make it work,
last time I checked it required dracut.


> # cd /etc/init.d && for file in boot.* ; do echo === $file ===; pac=$(rpm -qf $file); echo Package: $pac; rpm -ql $pac |grep '\.service$'; echo; done


> === boot.cycle ===
> Package: bootcycle-0.3-244.1.x86_64

Not sure if that still works, the package consist of just an init script
and instructions for GRUB legacy that is no longer even installed by
default..

> === boot.d ===
> Package: filesystem-12.3-11.1.x86_64

Unused.

>
> === boot.device-mapper ===
> Package: device-mapper-1.02.77-22.1.x86_64
>
> === boot.dmraid ===
> Package: dmraid-1.0.0.rc16-23.1.x86_64

Supported with systemd/dracut

> === boot.kdump ===
> Package: kdump-0.8.1-21.1.x86_64

> === boot.loadmodules ===

Already sent a patch to replace it.

http://lists.opensuse.org/opensuse-kernel/2013-03/msg00016.html

Not merged yet :-( another reason to use dracut.

> Package: mkinitrd-2.7.2-5.7.x86_64
> /usr/lib/systemd/system/purge-kernels.service   # doesn't count ;-)
>
> === boot.local ===
> Package: file /etc/init.d/boot.local is not owned by any package   # but should continue to work ;-)

Could replace that by a generator, or just call it "local.service".. ;)

> === boot.localnet ===
> Package: aaa_base-12.3-17.1.x86_64

masked, I already sent a patch to remove it which was merged.

> === boot.lvm ===
> Package: lvm2-2.02.98-22.1.x86_64
>
> === boot.md ===
> Package: mdadm-3.2.6-0.x86_64

Supported with systemd/dracut.

> === boot.scpm ===
> Package: scpm-1.1.7-21.1.x86_64

No idea.

> === boot.sysstat ===
> Package: sysstat-10.0.5-7.1.x86_64
> /usr/lib/systemd/system/sysstat.service


already migrated.

> === boot.udev ===

Unused,


> Note that I didn't write anything about "remove the initscript" - for
> AppArmor, I'd like to keep it for backwards compability with older
> openSUSE releases. Other maintainers might or might not have similar
> wishes.
>
> BTW: is ExecStatus supported in the meantime?

selinux and smack LSMs have native support merged in systemd (by the
authors, Redhat and people from Intel respectively) kinda telling that
apparmor doesn't...:-|


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Creating of systemd service files instead of init scripts for new packages

Ludwig Nussel
In reply to this post by Stephan Kulow-3
Stephan Kulow wrote:

> On 02.04.2013 10:06, Michal Kubecek wrote:
>> On Fri, Mar 29, 2013 at 11:29:22PM -0300, Cristian Rodríguez wrote:
>>>
>>> Does anyone have access to a full unpacked tree of factory and can
>>> post what packages contain init scripts but not service files so I
>>> can take look at them ? there is no rpmlint check for that :-|
>>
>> And not long ago I was being assured there won't be...
>>
> We agreed not to enforce that. So your fine to have a package with init
> scripts. But it's perfectly fine also to have a rpmlint warning that
> a package has *only* init script and Cristian adding systemd services
> for them - if the maintainer of the package disagrees to add it, then
> we can talk again.

Well, the truth is that it doesn't make much sense anymore to keep
the sysv scripts if there is a service file. It only adds potential
code duplication and confusion. So I'd vote for having either
.service files or init scripts in a package but not both.
However, adding service files that break previous features or just
add the init script shell code 1:1 as ExecStartPre should be avoided
too.

cu
Ludwig

--
  (o_   Ludwig Nussel
  //\
  V_/_  http://www.suse.de/
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Creating of systemd service files instead of init scripts for new packages

Ludwig Nussel
In reply to this post by Cristian Rodríguez-2
Cristian Rodríguez wrote:
> El 02/04/13 16:09, Christian Boltz escribió:
>
>> At the moment you'll break lots of packages and, more important,
>> break lots of basic features like RAID and LVM.
>
> RAID and LVM already have systemd support upstream, to make it work,
> last time I checked it required dracut.

What exactly is dracut needed for there? Or to put it the other way
around what's missing from mkinitrd?

cu
Ludwig

--
  (o_   Ludwig Nussel
  //\
  V_/_  http://www.suse.de/
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Creating of systemd service files instead of init scripts for new packages

Stephan Kulow-3
On 03.04.2013 09:26, Ludwig Nussel wrote:

> Cristian Rodríguez wrote:
>> El 02/04/13 16:09, Christian Boltz escribió:
>>
>>> At the moment you'll break lots of packages and, more important,
>>> break lots of basic features like RAID and LVM.
>>
>> RAID and LVM already have systemd support upstream, to make it work,
>> last time I checked it required dracut.
>
> What exactly is dracut needed for there? Or to put it the other way
> around what's missing from mkinitrd?

A maintainer. I for one would like to see us switching to dracut yesterday.

Greetings, Stephan



--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Creating of systemd service files instead of init scripts for new packages

Cristian Rodríguez-2
In reply to this post by Ludwig Nussel
On 04/03/2013 04:26 AM, Ludwig Nussel wrote:

> Cristian Rodríguez wrote:
>> El 02/04/13 16:09, Christian Boltz escribió:
>>
>>> At the moment you'll break lots of packages and, more important,
>>> break lots of basic features like RAID and LVM.
>>
>> RAID and LVM already have systemd support upstream, to make it work,
>> last time I checked it required dracut.
>
> What exactly is dracut needed for there? Or to put it the other way
> around what's missing from mkinitrd?

Technically I would have to take a look more deeply to figure out
exactly what. however.. what I know is that a bunch a people worked
together making it work and took all upstream. thing that..well.we never
did.


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Creating of systemd service files instead of init scripts for new packages

Cristian Rodríguez-2
On 04/03/2013 04:42 AM, Cristian Rodríguez wrote:

> what I know is that a bunch a people worked
> together making it work and took all upstream. thing that..well.we never
> did.
Of course this people did it for reason, they need it for for RHEL 7 ;)


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Creating of systemd service files instead of init scripts for new packages

Frederic Crozat-4
In reply to this post by Cristian Rodríguez-2
Le mardi 02 avril 2013 à 14:02 -0300, Cristian Rodríguez a écrit :

> El 02/04/13 06:05, Frederic Crozat escribió:
> Support for that has been removed in upstream
> > systemd and I'd prefer to not backport the support in our systemd, if we
> > can avoid it..
> >
>
> As far as I understand, all those boot.* scripts that are not already
> masked, are replaced by upstream provided integration with systemd and
> dracut.
>
> We should just drop them and integrate upstream changes, however this
> also implies getting rid of suse mkinitrd.

Well, I would still like to see dracut replacing mkinitrd..
--
Frederic Crozat <[hidden email]>
SUSE

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Creating of systemd service files instead of init scripts for new packages

Frederic Crozat-4
In reply to this post by Christian Boltz-5
Le mardi 02 avril 2013 à 21:09 +0200, Christian Boltz a écrit :

> BTW: is ExecStatus supported in the meantime?

No.

I remember some systemd folks had idea to implement it but it isn't very
high on their TODO list.

> (Needless to say that updating systemd is a no-go until all affected
> packages have a service file.)

You better hurry then, I'd like to update systemd next week in
Factory ;)

--
Frederic Crozat <[hidden email]>
SUSE

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Creating of systemd service files instead of init scripts for new packages

Andrei Borzenkov
In reply to this post by Stephan Kulow-3
On Wed, Apr 3, 2013 at 11:35 AM, Stephan Kulow <[hidden email]> wrote:

> On 03.04.2013 09:26, Ludwig Nussel wrote:
>> Cristian Rodríguez wrote:
>>> El 02/04/13 16:09, Christian Boltz escribió:
>>>
>>>> At the moment you'll break lots of packages and, more important,
>>>> break lots of basic features like RAID and LVM.
>>>
>>> RAID and LVM already have systemd support upstream, to make it work,
>>> last time I checked it required dracut.
>>
>> What exactly is dracut needed for there? Or to put it the other way
>> around what's missing from mkinitrd?
>
> A maintainer. I for one would like to see us switching to dracut yesterday.
>

I'm not sure I understand, what lacks maintainer - mkinitrd or dracut?
In case of dracut I'd tentatively volunteer to (co-)maintain it.
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Creating of systemd service files instead of init scripts for new packages

Frederic Crozat-4
Le mercredi 03 avril 2013 à 12:13 +0400, Andrey Borzenkov a écrit :

> On Wed, Apr 3, 2013 at 11:35 AM, Stephan Kulow <[hidden email]> wrote:
> > On 03.04.2013 09:26, Ludwig Nussel wrote:
> >> Cristian Rodríguez wrote:
> >>> El 02/04/13 16:09, Christian Boltz escribió:
> >>>
> >>>> At the moment you'll break lots of packages and, more important,
> >>>> break lots of basic features like RAID and LVM.
> >>>
> >>> RAID and LVM already have systemd support upstream, to make it work,
> >>> last time I checked it required dracut.
> >>
> >> What exactly is dracut needed for there? Or to put it the other way
> >> around what's missing from mkinitrd?
> >
> > A maintainer. I for one would like to see us switching to dracut yesterday.
> >
>
> I'm not sure I understand, what lacks maintainer - mkinitrd or dracut?
> In case of dracut I'd tentatively volunteer to (co-)maintain it.

For mkinitrd (both package and sources).

--
Frederic Crozat <[hidden email]>
SUSE

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Creating of systemd service files instead of init scripts for new packages

Raymond Wooninck-2
In reply to this post by Andrei Borzenkov
On Wednesday 03 April 2013 12:13:50 Andrey Borzenkov wrote:
> >> What exactly is dracut needed for there? Or to put it the other way
> >> around what's missing from mkinitrd?
> >
> > A maintainer. I for one would like to see us switching to dracut
> > yesterday.
>
> I'm not sure I understand, what lacks maintainer - mkinitrd or dracut?
> In case of dracut I'd tentatively volunteer to (co-)maintain it.

Hi Andrey,

As Frederic already indicated mkinitrd seems to be the one missing the
maintainership. However we would welcome any help we can get to really exploit
dracut and to have it replace mkinitrd in openSUSE 13.1.

The main devel package is in the Base:System repository and currently  
Christian Rodriguez and I are maintaining it. A couple of months ago I took it
upon me to get dracut into openSUSE, but unfortunately due to an work overload
at my normal job, I am not able to spend that much time on it.

We are tracking the releases and the package is in openSUSE Factory.  I guess
the main thing to do is to validate if all angles are covered when using
dracut to generate the inird instead of mkinitrd.  This would be specifically
with LUKS/crypt support.

Another topic would be not to increase the size of the initrd and to get the
right default settings for dracut. These can then be integrated in the other
packages that are currently calling mkinitrd.

So still some work to do, but in general things should work out-of-the-box.

Regards

Raymond
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Creating of systemd service files instead of init scripts for new packages

Andreas Jaeger-8
In reply to this post by Andreas Jaeger-8
I've added now at
https://en.opensuse.org/openSUSE:Packaging_guidelines#Init_scripts the
following:

Since openSUSE 12.3 has switched completely to systemd, no more new
SysV-style init scripts should be written. Existing init scripts should
be replaced with systemd service files and new packages should get only
systemd service files.

Andreas
--
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

1234 ... 8