Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#781155: openbsd-inetd: openbsd-inetd.service should be the main service file

76 views
Skip to first unread message

Raphaël Hertzog

unread,
Mar 25, 2015, 7:00:03 AM3/25/15
to
Package: openbsd-inetd
Version: 0.20140418-2
Severity: serious
User: de...@kali.org
Usertags: origin-kali

systemd doesn't seem to handle having two service files for the same
service very well.

For example, "systemctl disable openbsd-inetd" does not work since
inetd.service is the unit enabled by default:

$ ls -al /etc/systemd/system/multi-user.target.wants/inetd.service
lrwxrwxrwx 1 root root 33 mars 25 11:08 /etc/systemd/system/multi-user.target.wants/inetd.service -> /lib/systemd/system/inetd.service
$ sudo systemctl status openbsd-inetd
● inetd.service - Internet superserver
Loaded: loaded (/lib/systemd/system/inetd.service; enabled)
Active: active (running) since sam. 2015-03-21 16:27:25 CET; 3 days ago
Docs: man:inetd(8)
Main PID: 728 (inetd)
CGroup: /system.slice/inetd.service
└─728 /usr/sbin/inetd -i
$ sudo systemctl disable openbsd-inetd
Synchronizing state for openbsd-inetd.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d openbsd-inetd defaults
insserv: warning: current start runlevel(s) (empty) of script `openbsd-inetd' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `openbsd-inetd' overrides LSB defaults (0 1 6).
Executing /usr/sbin/update-rc.d openbsd-inetd disable
insserv: warning: current start runlevel(s) (empty) of script `openbsd-inetd' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `openbsd-inetd' overrides LSB defaults (0 1 6).
$ sudo systemctl status openbsd-inetd
● inetd.service - Internet superserver
Loaded: loaded (/lib/systemd/system/inetd.service; enabled)
Active: active (running) since sam. 2015-03-21 16:27:25 CET; 3 days ago
Docs: man:inetd(8)
Main PID: 728 (inetd)
CGroup: /system.slice/inetd.service
└─728 /usr/sbin/inetd -i

I believe that the the main service file should be openbsd-inetd.service and
that you should not ship any symlink. Instead you should add "Alias=inetd.service"
to the openbsd-inetd.service file (in section [Install]).

That's the only setup that seems to work reasonably well. I tried having inetd.service
only with Alias=openbsd-inetd.service but that is not enough to disable the creation
of the openbsd-inetd SysV compat service file
(/run/systemd/generator.late/openbsd-inetd.service).

But even with this setup, you can't use "systemctl enable|disable inetd" since
that would not touch the openbsd-inetd.symlinks...

I have put serious severity because the above behaviour means that administrator
can't rely on "update-rc.d disable" doing the right thing (even if update-rc.d
is fixed, cf #746580) and that we should really fix this for jessie IMO.

-- System Information:
Debian Release: 8.0
APT prefers squeeze-lts
APT policy: (500, 'squeeze-lts'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages openbsd-inetd depends on:
ii init-system-helpers 1.22
ii libbsd0 0.7.0-2
ii libc6 2.19-16
ii libwrap0 7.6.q-25
ii lsb-base 4.1+Debian13+nmu1
ii tcpd 7.6.q-25
ii update-inetd 4.43

openbsd-inetd recommends no packages.

openbsd-inetd suggests no packages.

-- no debconf information


--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Niels Thykier

unread,
Apr 11, 2017, 11:30:03 AM4/11/17
to
On Tue, 3 Jan 2017 09:59:10 +0100 Raphael Hertzog <her...@debian.org>
wrote:
> Hi Marco,
>
> On Mon, 26 Dec 2016, Marco d'Itri wrote:
> > On Apr 10, Michael Biebl <bi...@debian.org> wrote:
> >
> > > Ideally, the .service file name and sysv init script do match.
> > > If that is not the case, because upstream chose a different name, my
> > > recommendation is to create a symlink and ship that statically in the
> > > package, i.e. not create it via Alias=.
> > Such a link already exists.
> > Is there anything else that I should do or should I close this bug?
>
> As long as #746580 is not fixed, it's a bad idea to use "inetd.service"
> as main unit instead of just "openbsd-inetd.service".
>
> I verified that modern versions of systemd do the right thing with
> "systemctl disable/enable openbsd-ined.service" (thus on the symlink)
> but it's still not possible to disable/enable the service with
> "update-rc.d openbsd-inetd disable/enable" due to this discrepancy.
>
> Cheers,
> --
> Raphaël Hertzog ◈ Debian Developer
>
> Support Debian LTS: http://www.freexian.com/services/debian-lts.html
> Learn to master Debian: http://debian-handbook.info/get/
>
>


Hi,

Are there any updates on this bug? If not, then we will be inclined to
remove openbsd-inetd from testing.

Thanks,
~Niels

Marco d'Itri

unread,
Apr 11, 2017, 11:40:03 AM4/11/17
to
On Apr 11, Niels Thykier <ni...@thykier.net> wrote:

> Are there any updates on this bug? If not, then we will be inclined to
I do not think that there is anything I can or should do in
openbsd-inetd: the bug should either be closed or downgraded.

> remove openbsd-inetd from testing.
Bad idea, since it is our "good" inetd package.

--
ciao,
Marco
signature.asc

Raphael Hertzog

unread,
Apr 11, 2017, 12:10:02 PM4/11/17
to
On Tue, 11 Apr 2017, Marco d'Itri wrote:
> On Apr 11, Niels Thykier <ni...@thykier.net> wrote:
>
> > Are there any updates on this bug? If not, then we will be inclined to
> I do not think that there is anything I can or should do in
> openbsd-inetd: the bug should either be closed or downgraded.

Why aren't you providing openbsd-inetd.service as the real file and
inetd.service as a symlink ?

Cheers,
--
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: https://www.freexian.com/services/debian-lts.html
Learn to master Debian: https://debian-handbook.info/get/

Michael Biebl

unread,
Apr 11, 2017, 1:30:02 PM4/11/17
to
Am 11.04.2017 um 19:17 schrieb Michael Biebl:
> Renaming the .service file so the SysV init script and systemd service
> unit name align is a valid solution for this particular case. But then
> again, we have other packages where the names don't align.

That said, my recommendation is still that the names should align where
possible. I wouldn't rename a service unit which is provided by
upstream, but if the Debian package maintainer has control over the
names, then making them align seems sensible.

So my recommendation would be to clone this bug report and reassign it
to update-rc.d. I would keep this one (as wishlist) for the renaming part.

The update-rc.d bug should be severity normal or important.

Michael

--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

signature.asc

Raphael Hertzog

unread,
Apr 13, 2017, 5:20:04 AM4/13/17
to
On Thu, 13 Apr 2017, Marco d'Itri wrote:
> On Apr 11, Raphael Hertzog <her...@debian.org> wrote:
>
> > Why aren't you providing openbsd-inetd.service as the real file and
> > inetd.service as a symlink ?
> Because naming the init script "openbsd-inetd" was an historical
> accident caused by problems when replacing the old netkit-inetd.
> Since we had this in jessie and it did not cause noticeable problems
> I would rather keep the names as they are.

This bug report is the proof of a real problem that I encountered.

Consistency between package name and init script and service file
has no reason to be classified as "historical accident", it seems
to be nice bonus point to me...
0 new messages