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

Bug#1061280: sysvinit crashes podman container on install

7 views
Skip to first unread message

Sam Hartman

unread,
Jan 21, 2024, 9:10:05 PM1/21/24
to
package: sysvinit-core:
version: 3.08-5
severity: important
justification: breaks unrelated software in uncommon environment

I was curious about a discussion on debian-devel, so I tried to install
sysvinit and wdm at the same time.
I tried:

podman run --rm -ti debian:unstable
apt update
apt install sysvinit-core

And my container crashed when sysvinit-core was installed and restarted.
To get things "installed" I copied /dev/null over the sysvinit-core
postinst.

I'd like to be able to create a podman or docker image running sysvinit.
To do that I need to be able to install sysvinit with a container that
has /bin/bash or /bin/sh as an entry point and then image that container
into an image that has init as the entry point. For that to work
sysvinit-core has to be able to install even when there is no init
system.

--Sam

Mark Hindley

unread,
Jan 22, 2024, 12:00:05 PM1/22/24
to
Sam,

Thanks for this.

A quick look at sysvinit-core postinst reveals:

restart=yes

if ischroot --default-true ; then
restart=no
fi
if [ -n "${DPKG_ROOT:-}" ]; then
restart=no
fi

# If systemd is running, don't restart init or doing any initctl
# migration.
if [ -d "$DPKG_ROOT/run/systemd/system" ]; then
restart=no
fi
if [ "$(uname -s)" = "GNU" ]; then
restart=no
fi

if [ "$restart" = "yes" ]; then
do_restart
else
echo "Not restarting sysvinit"
fi

My initial thought is that restart should really be 'no' if it is a new
sysvinit-core installation. The attached patch fixes sysvinit-core installation
within a podman container for me. I need to do more testing to check that it
doesn't cause breakage elsewhere.

Can you confirm?

Thanks

Mark
0001-d-sysvinit-core.postinst-don-t-do_restart-for-new-in.patch

Mark Hindley

unread,
Jan 25, 2024, 12:40:05 PM1/25/24
to
Control: tags -1 patch

On Mon, Jan 22, 2024 at 02:37:39PM -0700, Sam Hartman wrote:
> >>>>> "Mark" == Mark Hindley <ma...@hindley.org.uk> writes:
>
> Mark> Can you confirm?
>
> I agree that should work.
> I have enough confidence and am busy enough today that I don't want to
> build just to apply the patch.

Thanks.

Mark
0 new messages