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

Bug#998893: orphan-sysvinit-scripts: fails to configure: "not replacing deleted config file /etc/init.d/rsyslog"

30 views
Skip to first unread message

Adam Borowski

unread,
Nov 9, 2021, 10:30:04 AM11/9/21
to
Package: orphan-sysvinit-scripts
Version: 0.08
Severity: important

Hi!
On two different setups, I get:

Not replacing deleted config file /etc/init.d/rsyslog
update-rc.d: error: initscript does not exist: /etc/init.d/rsyslog
dpkg: error processing package orphan-sysvinit-scripts (--configure):
installed orphan-sysvinit-scripts package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
orphan-sysvinit-scripts

Both happen to be lxc with openrc. I don't happen to have a bare-metal
openrc install left thus I did not check if the problem is lxc related.

The rsyslog init script hasn't been deleted by me.


Meow!
-- System Information:
Debian Release: bookworm/sid
APT prefers unstable
APT policy: (500, 'unstable'), (150, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-8-amd64 (SMP w/4 CPU threads)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: OpenRC (via /run/openrc), PID 1: init

Versions of packages orphan-sysvinit-scripts depends on:
ii ucf 3.0043

orphan-sysvinit-scripts recommends no packages.

orphan-sysvinit-scripts suggests no packages.

-- no debconf information

gregor herrmann

unread,
Nov 9, 2021, 10:50:04 AM11/9/21
to
On Tue, 09 Nov 2021 16:17:31 +0100, Adam Borowski wrote:

> On two different setups, I get:
>
> Not replacing deleted config file /etc/init.d/rsyslog
> update-rc.d: error: initscript does not exist: /etc/init.d/rsyslog
> dpkg: error processing package orphan-sysvinit-scripts (--configure):
> installed orphan-sysvinit-scripts package post-installation script subprocess returned error exit status 1
> Errors were encountered while processing:
> orphan-sysvinit-scripts
>
> Both happen to be lxc with openrc. I don't happen to have a bare-metal
> openrc install left thus I did not check if the problem is lxc related.

Same here, no lxc or openrc or anything, just bare-metal and
sysvinit.

> The rsyslog init script hasn't been deleted by me.

Same here, that was the rsyslog update:

#v+
rsyslog (8.2110.0-2) unstable; urgency=medium

* Remove SysV init script

-- Michael Biebl <bi...@debian.org> Fri, 05 Nov 2021 23:29:45 +0100
#v-

and

#v+
Setting up rsyslog (8.2110.0-2) ...
Removing obsolete conffile /etc/init.d/rsyslog ...
#v-


With -x I get:

#v+
# bash -x /usr/lib/orphan-sysvinit-scripts/update_init_d.sh
+ set -e
+ '[' -z '' ']'
+ action=add
[…]
+ read -r systemd sysv rcd rest
+ [[ rsyslog.service =~ ^# ]]
+ '[' -n '' ']'
+ '[' -e /lib/systemd/system/rsyslog.service ']'
+ '[' add = add ']'
+ ucf /usr/share/orphan-sysvinit-scripts/rsyslog /etc/init.d/rsyslog
/usr/bin/which: this version of `which' is deprecated; use `command -v' in scripts instead.
/usr/bin/which: this version of `which' is deprecated; use `command -v' in scripts instead.
Not replacing deleted config file /etc/init.d/rsyslog
+ ucfr orphan-sysvinit-scripts /etc/init.d/rsyslog
+ update-rc.d rsyslog defaults
update-rc.d: error: initscript does not exist: /etc/init.d/rsyslog
#v-

Seems like ucf is unhappy …

A bit more verbosity:

#v+
# ucf -v /usr/share/orphan-sysvinit-scripts/rsyslog /etc/init.d/rsyslog
ucf: The new file is /usr/share/orphan-sysvinit-scripts/rsyslog
ucf: The Destination file is /etc/init.d/rsyslog
ucf: The Source directory is /usr/share/orphan-sysvinit-scripts
/usr/bin/which: this version of `which' is deprecated; use `command -v' in scripts instead.
ucf: The State directory is /var/lib/ucf
The hash file exists
egrep [[:space:]]\/etc\/init\.d\/rsyslog$ /var/lib/ucf/hashfile
bd41a0654a192d74dfb9c551b06fa855 /etc/init.d/rsyslog
ucf: The new file is /usr/share/orphan-sysvinit-scripts/rsyslog
ucf: The Destination file is /etc/init.d/rsyslog
ucf: The Source directory is /usr/share/orphan-sysvinit-scripts
/usr/bin/which: this version of `which' is deprecated; use `command -v' in scripts instead.
ucf: The State directory is /var/lib/ucf
The hash file exists
egrep [[:space:]]\/etc\/init\.d\/rsyslog$ /var/lib/ucf/hashfile
bd41a0654a192d74dfb9c551b06fa855 /etc/init.d/rsyslog
Not replacing deleted config file /etc/init.d/rsyslog
md5sums match, nothing needs be done.
#v-

Mhm, /etc/init.d/rsyslog is known to /var/lib/ucf/hashfile.

Let's try something:

#v+
# ucf -v --purge /etc/init.d/rsyslog
ucf: The Destination file is /etc/init.d/rsyslog
ucf: The Source directory is /tmp
/usr/bin/which: this version of `which' is deprecated; use `command -v' in scripts instead.
ucf: The State directory is /var/lib/ucf
The hash file exists
egrep [[:space:]]\/etc\/init\.d\/rsyslog$ /var/lib/ucf/hashfile
bd41a0654a192d74dfb9c551b06fa855 /etc/init.d/rsyslog
Preparing to purge /etc/init.d/rsyslog
egrep -v [[:space:]]\/etc\/init\.d\/rsyslog$ /var/lib/ucf/hashfile
94922d77c255c019c828392b500b73cb /etc/default/rcS
ddcb1fbb90a14ff9850f22eed0127a10 /etc/default/nfs-common
dfaf90cd2b9295854aac7dafc43d3ef1 /etc/gconf/2/path
a12bbc3dd60650ec7ff0a0a3e239e1c4 /etc/gpm.conf
72a09b2f30c4b1cab7e9a366ee50988c /etc/default/sysstat
399113133d83c2a5b5211d93044a5193 /etc/debtree/skiplist
2a4eeb5ee3159f4ea1ae0c7779c780f9 /etc/locale.nopurge
2f1ad364c25bfd8dcee21c2d6ea97a3a /etc/papersize
6e4c2dde6c6970f124de9493e2c286fa /etc/idmapd.conf
28b246c71879fce752d9fdeb1ff69ed3 /etc/apt/listchanges.conf
c6f24888518ffbd02afd0a672e914f56 /etc/default/grub
ae7ec5229304cf8614d48609afd04ec9 /etc/debtree/endlist
e4548a9832cdf7369fb0140657a67189 /etc/libreoffice/registry/pdfimport.xcd
08fc253e0a7fec62adf634f127434ac1 /etc/libreoffice/registry/xsltfilter.xcd
8a4dd3b6d9e20ebb9054c5e23efd7591 /etc/libreoffice/registry/lingucomponent.xcd
53e93e89aa75d406312d63adc9a4ac8c /etc/libreoffice/registry/Langpack-en-US.xcd
027a4498dcf04ae46bd4e0d65f280230 /etc/libreoffice/registry/res/fcfg_langpack_en-US.xcd
544fa57476ebb3a56c1caa7514712992 /etc/libreoffice/registry/math.xcd
6225d108cbed9afe9b047754d0975b44 /etc/libreoffice/registry/graphicfilter.xcd
af4badb19ce1b9328b1cb0e3dca73ceb /etc/libreoffice/registry/ogltrans.xcd
3a3e2c4e53d44f81626bd1f752eaae29 /etc/libreoffice/registry/pyuno.xcd
b1bb45b31cf1af831d2bf22153459c22 /etc/mercurial/hgrc.d/hgext.rc
3bae9463ad2b17495526a6851099dc14 /etc/libreoffice/registry/Langpack-en-GB.xcd
01570747c3b3c3694ecb24f46d2aae19 /etc/libreoffice/registry/res/fcfg_langpack_en-GB.xcd
cd0c99110c07a2fbc94fcd3128b826e1 /etc/perl/XML/SAX/ParserDetails.ini
db0ee33260282f6f580a68ba8fa7468f /etc/samba/smb.conf
4a2766122d68f9ec5bdc88fdb30a73ff /etc/init.d/gpsd
c6963f383c60fe8a19c07f9a20cbf53d /etc/profile.d/debuginfod.sh
52e7eefc5d8616c95ee1801cfcb35af5 /etc/profile.d/debuginfod.csh
961b3e135a0283f65b9d56dd8f575b7e /etc/libreoffice/registry/draw.xcd
85e312f6c1c7de460f396e98c85173f6 /etc/libreoffice/registry/reportbuilder.xcd
3924e9fd235bc58f8fc74f64ea306c6f /etc/libreoffice/registry/res/registry_en-GB.xcd
3c64b71d0986b0ae186e4c32c56daf3a /etc/libreoffice/registry/impress.xcd
f88ba99b6e5d4e792367c6d04b1c7072 /etc/libreoffice/registry/calc.xcd
12022cfb3d286fc59829ba9b6f0127a7 /etc/libreoffice/registry/base.xcd
ebe462c70600ff41e9beba77e22be355 /etc/libreoffice/registry/writer.xcd
0bac4a11a83f80561802acd95f84381f /etc/libreoffice/registry/main.xcd
fe83fd23553510bb632dc8e6e35ab41a /etc/ssh/sshd_config
The cache file is :etc:init.d:rsyslog

# ucf -v /usr/share/orphan-sysvinit-scripts/rsyslog /etc/init.d/rsyslog
ucf: The new file is /usr/share/orphan-sysvinit-scripts/rsyslog
ucf: The Destination file is /etc/init.d/rsyslog
ucf: The Source directory is /usr/share/orphan-sysvinit-scripts
/usr/bin/which: this version of `which' is deprecated; use `command -v' in scripts instead.
ucf: The State directory is /var/lib/ucf
The hash file exists
egrep [[:space:]]\/etc\/init\.d\/rsyslog$ /var/lib/ucf/hashfile
ucf: The new file is /usr/share/orphan-sysvinit-scripts/rsyslog
ucf: The Destination file is /etc/init.d/rsyslog
ucf: The Source directory is /usr/share/orphan-sysvinit-scripts
/usr/bin/which: this version of `which' is deprecated; use `command -v' in scripts instead.
ucf: The State directory is /var/lib/ucf
The hash file exists
egrep [[:space:]]\/etc\/init\.d\/rsyslog$ /var/lib/ucf/hashfile

Creating config file /etc/init.d/rsyslog with new version
(egrep -v "[[:space:]]\/etc\/init\.d\/rsyslog$" "/var/lib/ucf/hashfile";
94922d77c255c019c828392b500b73cb /etc/default/rcS
ddcb1fbb90a14ff9850f22eed0127a10 /etc/default/nfs-common
dfaf90cd2b9295854aac7dafc43d3ef1 /etc/gconf/2/path
a12bbc3dd60650ec7ff0a0a3e239e1c4 /etc/gpm.conf
72a09b2f30c4b1cab7e9a366ee50988c /etc/default/sysstat
399113133d83c2a5b5211d93044a5193 /etc/debtree/skiplist
2a4eeb5ee3159f4ea1ae0c7779c780f9 /etc/locale.nopurge
2f1ad364c25bfd8dcee21c2d6ea97a3a /etc/papersize
6e4c2dde6c6970f124de9493e2c286fa /etc/idmapd.conf
28b246c71879fce752d9fdeb1ff69ed3 /etc/apt/listchanges.conf
c6f24888518ffbd02afd0a672e914f56 /etc/default/grub
ae7ec5229304cf8614d48609afd04ec9 /etc/debtree/endlist
e4548a9832cdf7369fb0140657a67189 /etc/libreoffice/registry/pdfimport.xcd
08fc253e0a7fec62adf634f127434ac1 /etc/libreoffice/registry/xsltfilter.xcd
8a4dd3b6d9e20ebb9054c5e23efd7591 /etc/libreoffice/registry/lingucomponent.xcd
53e93e89aa75d406312d63adc9a4ac8c /etc/libreoffice/registry/Langpack-en-US.xcd
027a4498dcf04ae46bd4e0d65f280230 /etc/libreoffice/registry/res/fcfg_langpack_en-US.xcd
544fa57476ebb3a56c1caa7514712992 /etc/libreoffice/registry/math.xcd
6225d108cbed9afe9b047754d0975b44 /etc/libreoffice/registry/graphicfilter.xcd
af4badb19ce1b9328b1cb0e3dca73ceb /etc/libreoffice/registry/ogltrans.xcd
3a3e2c4e53d44f81626bd1f752eaae29 /etc/libreoffice/registry/pyuno.xcd
b1bb45b31cf1af831d2bf22153459c22 /etc/mercurial/hgrc.d/hgext.rc
3bae9463ad2b17495526a6851099dc14 /etc/libreoffice/registry/Langpack-en-GB.xcd
01570747c3b3c3694ecb24f46d2aae19 /etc/libreoffice/registry/res/fcfg_langpack_en-GB.xcd
cd0c99110c07a2fbc94fcd3128b826e1 /etc/perl/XML/SAX/ParserDetails.ini
db0ee33260282f6f580a68ba8fa7468f /etc/samba/smb.conf
4a2766122d68f9ec5bdc88fdb30a73ff /etc/init.d/gpsd
c6963f383c60fe8a19c07f9a20cbf53d /etc/profile.d/debuginfod.sh
52e7eefc5d8616c95ee1801cfcb35af5 /etc/profile.d/debuginfod.csh
961b3e135a0283f65b9d56dd8f575b7e /etc/libreoffice/registry/draw.xcd
85e312f6c1c7de460f396e98c85173f6 /etc/libreoffice/registry/reportbuilder.xcd
3924e9fd235bc58f8fc74f64ea306c6f /etc/libreoffice/registry/res/registry_en-GB.xcd
3c64b71d0986b0ae186e4c32c56daf3a /etc/libreoffice/registry/impress.xcd
f88ba99b6e5d4e792367c6d04b1c7072 /etc/libreoffice/registry/calc.xcd
12022cfb3d286fc59829ba9b6f0127a7 /etc/libreoffice/registry/base.xcd
ebe462c70600ff41e9beba77e22be355 /etc/libreoffice/registry/writer.xcd
0bac4a11a83f80561802acd95f84381f /etc/libreoffice/registry/main.xcd
fe83fd23553510bb632dc8e6e35ab41a /etc/ssh/sshd_config
bd41a0654a192d74dfb9c551b06fa855 /etc/init.d/rsyslog

# update-rc.d rsyslog defaults
[…]
#v-


Better.
Not sure what that means for the orphan-sysvinit-scripts script.
(And what role `ucfr' plays in the game.)


Cheers,
gregor


--
.''`. https://info.comodo.priv.at -- Debian Developer https://www.debian.org
: :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06
`. `' Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
`- NP: Don McLean: Every Day
signature.asc

Matthew Vernon

unread,
Nov 9, 2021, 12:40:03 PM11/9/21
to
On 09/11/2021 15:45, gregor herrmann wrote:
> On Tue, 09 Nov 2021 16:17:31 +0100, Adam Borowski wrote:
>
>> On two different setups, I get:
>>
>> Not replacing deleted config file /etc/init.d/rsyslog
>> update-rc.d: error: initscript does not exist: /etc/init.d/rsyslog
>> dpkg: error processing package orphan-sysvinit-scripts (--configure):
>> installed orphan-sysvinit-scripts package post-installation script subprocess returned error exit status 1
>> Errors were encountered while processing:
>> orphan-sysvinit-scripts

Hm, I wonder if this is because rsyslog is more vigorous than it should
be about removing the init script?

[we've not seen this with any other package to date]

Matthew

Dirk Griesbach

unread,
Nov 10, 2021, 2:50:03 AM11/10/21
to
Hi,

While rsyslog doesn't ship its init script anymore, ucf is still having
a reference to that script after the rsyslog upgrade.

,----
| # ls -l /var/lib/ucf/cache/*rsyslog*
| -rwxr-xr-x 1 root root 2864 5. Nov 01:24 /var/lib/ucf/cache/:etc:init.d:rsyslog
`----

For ucf, the case is clear. The configuration file is under its control
and the file was changed (deleted) and per policy, all changes to
configuration files must be preserved. So, orphan-sysvinit-scripts isn't
allowed to "overwrite" this change by creating a new file.

As a workaround, the environment variable UCF_FORCE_CONFFMISS=1 can be set
and then the upgrade will run through.

I guess, rsyslog eventually needs to de-register that file from ucf
correctly when removing the init script.

Cheers,
Dirk

Matthew Vernon

unread,
Nov 10, 2021, 5:10:03 AM11/10/21
to
Hi,

On 09/11/2021 15:17, Adam Borowski wrote:

> Not replacing deleted config file /etc/init.d/rsyslog

This is the problem - ucf thinks that it knew about /etc/init.d/rsyslog
before it got deleted (and so it thinks you deliberately removed it).

AFAICT:

This should happen if and only iff /etc/init.d/rsyslog was already
recorded in /var/lib/ucf/hashfile - then ucf will deduce that the admin
removed the file and leave it alone

On my testing system (which hasn't yet had this upgrade applied), that
isn't the case - ucf knows nothing about this file.

If you look in /var/lib/ucf you should see old hashfile and registry
entries.

Is it possible to see in there if /etc/init.d/rsyslog was recorded in
hashfile and/or registry before you did this upgrade? And if so, which
package had registered it?

rsyslog has
rm_conffile /etc/init.d/rsyslog 8.2110.0-2~

in debian/rsyslog.maintscript (which dh_installdeb arranges to feed to
dpkg-maintscript-helper), which ought to only remove an unmodified
conffile and not touch ucf at all.

Regards,

Matthew

Matthew Vernon

unread,
Nov 10, 2021, 6:00:03 AM11/10/21
to
Hi,

On 10/11/2021 07:35, Dirk Griesbach wrote:

> While rsyslog doesn't ship its init script anymore, ucf is still having
> a reference to that script after the rsyslog upgrade.
>
> ,----
> | # ls -l /var/lib/ucf/cache/*rsyslog*
> | -rwxr-xr-x 1 root root 2864  5. Nov 01:24
> /var/lib/ucf/cache/:etc:init.d:rsyslog
> `----

You may be right, but it's not clear from that snippet alone - that just
tells us that ucf became aware of that file on the 5th of November.

Is rsyslog present in /var/lib/ucf/hashfile* and/or
/var/lib/ucf/registry* particularly from before you attempted the upgrade?

My system doesn't think that file belongs to rsyslog.

[see also my later message to this bug from earlier today]

Regards,

Matthew

Matthew Vernon

unread,
Nov 10, 2021, 6:40:04 AM11/10/21
to
Hi,

On 10/11/2021 09:37, Matthew Vernon wrote:
> On 09/11/2021 15:17, Adam Borowski wrote:
>
>> Not replacing deleted config file /etc/init.d/rsyslog
>
> This is the problem - ucf thinks that it knew about /etc/init.d/rsyslog
> before it got deleted (and so it thinks you deliberately removed it).

This is correct, but I now understand _why_ it happened - I uploaded
orphan-sysvinit-scripts 0.08 before Michael uploaded rsyslog 8.2110-2

So:

orphan-sysvinit-scripts registers /etc/init.d/rsyslogd with ucf
then
rsyslog upgrade remove the unmodified config file (with
dpkg-maintscript-helper which knows nothing of ucf)
so
ucf thinks the user did this

We've not seen this before, because previously scripts have only made it
into orphan-sysvinit-scripts after removal by other packagers, not
beforehand.

So:

I think the bit in update_init_d.sh that adds new scripts:
if [ -e "/lib/systemd/system/$systemd" ] && [ "$action" = "add" ]; then
ucf "/usr/share/orphan-sysvinit-scripts/$sysv" "/etc/init.d/$sysv"
ucfr orphan-sysvinit-scripts "/etc/init.d/$sysv"
update-rc.d "$sysv" "${rcd:-defaults}" >/dev/null

needs to also check something like dpkg-query -S /etc/init.d/$sysv
returns 1 (i.e. the file is not still registered by dpkg as belonging to
another package)

Seem sensible?

Regards,

Matthew

Adam Borowski

unread,
Nov 10, 2021, 12:00:04 PM11/10/21
to
On Wed, Nov 10, 2021 at 12:21:09PM +0000, Debian Bug Tracking System wrote:
> #998893: orphan-sysvinit-scripts: fails to configure: "not replacing deleted config file /etc/init.d/rsyslog"
> It has been closed by Debian FTP Masters <ftpm...@ftp-master.debian.org> (reply to Matthew Vernon <mat...@debian.org>).

Alas, systems that were affected by this bug still fail to upgrade:

dpkg-query: no path found matching pattern /etc/init.d/rsyslog
Not replacing deleted config file /etc/init.d/rsyslog
update-rc.d: error: initscript does not exist: /etc/init.d/rsyslog
dpkg: error processing package orphan-sysvinit-scripts (--configure):
installed orphan-sysvinit-scripts package post-installation script subprocess returned error exit status 1
Processing triggers for man-db (2.9.4-2) ...
Errors were encountered while processing:
orphan-sysvinit-scripts
E: Sub-process /usr/bin/dpkg returned an error code (1)

Not sure how many folks have upgraded in the meantime, but I guess we should
check for upgrades from 0.08 and recover.


Meow!
--
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ If you ponder doing what Jesus did, remember than flipping tables
⢿⡄⠘⠷⠚⠋⠀ and chasing people with a whip is a prime choice.
⠈⠳⣄⠀⠀⠀⠀

Matthew Vernon

unread,
Nov 10, 2021, 1:10:03 PM11/10/21
to
On 10/11/2021 16:51, Adam Borowski wrote:
> On Wed, Nov 10, 2021 at 12:21:09PM +0000, Debian Bug Tracking System wrote:
>> #998893: orphan-sysvinit-scripts: fails to configure: "not replacing deleted config file /etc/init.d/rsyslog"
>> It has been closed by Debian FTP Masters <ftpm...@ftp-master.debian.org> (reply to Matthew Vernon <mat...@debian.org>).
>
> Alas, systems that were affected by this bug still fail to upgrade:

Yes, I'm afraid that's expected (because ucf still "knows" that the user
deleted /etc/init.d/rsyslog). Sorry!

> dpkg-query: no path found matching pattern /etc/init.d/rsyslog
> Not replacing deleted config file /etc/init.d/rsyslog
> update-rc.d: error: initscript does not exist: /etc/init.d/rsyslog
> dpkg: error processing package orphan-sysvinit-scripts (--configure):
> installed orphan-sysvinit-scripts package post-installation script subprocess returned error exit status 1
> Processing triggers for man-db (2.9.4-2) ...
> Errors were encountered while processing:
> orphan-sysvinit-scripts
> E: Sub-process /usr/bin/dpkg returned an error code (1)

I think the easiest fix is:
ln -s /usr/share/orphan-sysvinit-scripts/rsyslog /etc/init.d/rsyslog

And then dpkg --pending --configure should work OK

Regards,

Matthew

Axel Beckert

unread,
Nov 20, 2021, 8:20:03 PM11/20/21
to
Hi,

On Wed, Nov 10, 2021 at 05:48:38PM +0000, Matthew Vernon wrote:
> On 10/11/2021 16:51, Adam Borowski wrote:
> > On Wed, Nov 10, 2021 at 12:21:09PM +0000, Debian Bug Tracking System wrote:
> > > #998893: orphan-sysvinit-scripts: fails to configure: "not replacing deleted config file /etc/init.d/rsyslog"
> > > It has been closed by Debian FTP Masters <ftpm...@ftp-master.debian.org> (reply to Matthew Vernon <mat...@debian.org>).
> >
> > Alas, systems that were affected by this bug still fail to upgrade:
>
> Yes, I'm afraid that's expected (because ucf still "knows" that the user
> deleted /etc/init.d/rsyslog). Sorry!

Seems to have worked for me, but now I get the same error for /etc/init.d/nftables:

Setting up orphan-sysvinit-scripts (0.10) ...
/usr/bin/which: this version of `which' is deprecated; use `command -v' in scripts instead.
/usr/bin/which: this version of `which' is deprecated; use `command -v' in scripts instead.
Not replacing deleted config file /etc/init.d/nftables
update-rc.d: error: initscript does not exist: /etc/init.d/nftables
dpkg: error processing package orphan-sysvinit-scripts (--configure):
installed orphan-sysvinit-scripts package post-installation script subprocess returned error exit status 1

Shall I open a new bug or is this considered the same issue?

Hmm, after reading the changelog entry for this fix:

* Check for scripts still owned by another package (Closes: #998893)

This sounds like a quite generic fix.

> > dpkg-query: no path found matching pattern /etc/init.d/rsyslog
> > Not replacing deleted config file /etc/init.d/rsyslog
> > update-rc.d: error: initscript does not exist: /etc/init.d/rsyslog
> > dpkg: error processing package orphan-sysvinit-scripts (--configure):
> > installed orphan-sysvinit-scripts package post-installation script subprocess returned error exit status 1
> > Processing triggers for man-db (2.9.4-2) ...
> > Errors were encountered while processing:
> > orphan-sysvinit-scripts
> > E: Sub-process /usr/bin/dpkg returned an error code (1)
>
> I think the easiest fix is:
> ln -s /usr/share/orphan-sysvinit-scripts/rsyslog /etc/init.d/rsyslog
>
> And then dpkg --pending --configure should work OK

So I tried this for nftables as well, but it seems to have made things
worse:

# ln -s /usr/share/orphan-sysvinit-scripts/nftables /etc/init.d/nftables
# dpkg --pending --configure
Setting up orphan-sysvinit-scripts (0.10) ...
/usr/bin/which: this version of `which' is deprecated; use `command -v' in scripts instead.
/usr/bin/which: this version of `which' is deprecated; use `command -v' in scripts instead.
cp: '/usr/share/orphan-sysvinit-scripts/nftables' and '/usr/share/orphan-sysvinit-scripts/nftables' are the same file
dpkg: error processing package orphan-sysvinit-scripts (--configure):
installed orphan-sysvinit-scripts package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
orphan-sysvinit-scripts

Any adivce here?

Regards, Axel
--
,''`. | Axel Beckert <a...@debian.org>, https://people.debian.org/~abe/
: :' : | Debian Developer, ftp.ch.debian.org Admin
`. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5
`- | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE

tito

unread,
Nov 21, 2021, 2:10:03 AM11/21/21
to
Hi,
couldn't renaming the scripts in the orphan-sysvinit-scripts package be a solution to solve this?
E.g from nftables to nftables-sv or nftables.sh or nftables-s5i or nftables-orphan.
Just my 0,2 cents.
Ciao,
Tito

Thorsten Glaser

unread,
Nov 21, 2021, 6:00:04 PM11/21/21
to
On Sun, 21 Nov 2021, tito wrote:

> couldn't renaming the scripts in the orphan-sysvinit-scripts package
> be a solution to solve this?

I think that breaks user expectations and should only be a
very last resort.

I think both the “cp”, which I cannot find in the binary package
at all so where does it come from?, and the advice to “ln -s”,
are wrong. It would be better to fix the process.

bye,
//mirabilos
--
Infrastrukturexperte • tarent solutions GmbH
Am Dickobskreuz 10, D-53121 Bonn • http://www.tarent.de/
Telephon +49 228 54881-393 • Fax: +49 228 54881-235
HRB AG Bonn 5168 • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg

****************************************************
/⁀\ The UTF-8 Ribbon
╲ ╱ Campaign against Mit dem tarent-Newsletter nichts mehr verpassen:
 ╳  HTML eMail! Also, https://www.tarent.de/newsletter
╱ ╲ header encryption!
****************************************************

Matthew Vernon

unread,
Nov 30, 2021, 12:30:04 PM11/30/21
to
Hi,

On 21/11/2021 01:09, Axel Beckert wrote:

> Seems to have worked for me, but now I get the same error for /etc/init.d/nftables:

> Setting up orphan-sysvinit-scripts (0.10) ...
> /usr/bin/which: this version of `which' is deprecated; use `command -v' in scripts instead.
> /usr/bin/which: this version of `which' is deprecated; use `command -v' in scripts instead.
> Not replacing deleted config file /etc/init.d/nftables
> update-rc.d: error: initscript does not exist: /etc/init.d/nftables

So I'm wondering what deleted /etc/init.d/nftables - AFAICT it hasn't
been in the Debian package for a while.

> This sounds like a quite generic fix.

It is - but it only works for future changes - it can't retroactively
fix a file that orphan-sysvinit-scripts registered with ucf while the
associated package was still claiming the file itself (and so able to
remove it); I don't think it's plausible to try and retroactively fix
that, but it should be fixed from 0.09 onwards.

> # ln -s /usr/share/orphan-sysvinit-scripts/nftables /etc/init.d/nftables
> # dpkg --pending --configure
> Setting up orphan-sysvinit-scripts (0.10) ...
> /usr/bin/which: this version of `which' is deprecated; use `command -v' in scripts instead.
> /usr/bin/which: this version of `which' is deprecated; use `command -v' in scripts instead.
> cp: '/usr/share/orphan-sysvinit-scripts/nftables' and '/usr/share/orphan-sysvinit-scripts/nftables' are the same file

What do:
ls -l /etc/init.d/nftables
ucf -d /usr/share/orphan-sysvinit-scripts/nftables /etc/init.d/nftables

say?

Regards,

Matthew

Matthew Vernon

unread,
Nov 30, 2021, 12:40:03 PM11/30/21
to
On 21/11/2021 22:48, Thorsten Glaser wrote:
> On Sun, 21 Nov 2021, tito wrote:
>
>> couldn't renaming the scripts in the orphan-sysvinit-scripts package
>> be a solution to solve this?
>
> I think that breaks user expectations and should only be a
> very last resort.

I agree.

> I think both the “cp”, which I cannot find in the binary package
> at all so where does it come from?, and the advice to “ln -s”,
> are wrong. It would be better to fix the process.

I _think_:

#tell ucf to forget this file
ucf --purge /etc/init.d/nftables
/usr/lib/orphan-sysvinit-scripts/update_init_d.sh

will fix this - is that right, Axel?

Regards,

Matthew
0 new messages