drtyhlpr / rpi23-gen-image

Advanced Debian "stretch" and "buster" bootstrap script for RPi 0/1/2/3 and QEMU
GNU General Public License v2.0
307 stars 123 forks source link

Why is systemd-sysv actively removed? #148

Closed BrainStone closed 5 years ago

BrainStone commented 6 years ago

I noticed that the package systemd-sysv is actively removed when using buster or stretch: https://github.com/drtyhlpr/rpi23-gen-image/blob/95ed69af46701df47875794c0dd4d6339c0c51a8/bootstrap.d/10-bootstrap.sh#L24

I noticed the comment above that says

Exclude packages if required by Debian release though I'm not sure what exactly that means. Does it mean that Debian mandates these packages to be removed?

burnbabyburn commented 6 years ago

Don't know the reason, but i like just having init OR systemd. Mixing up both is like Raspbian.

P.S. i can't find systemd-sysv on my "buildbox" installed wih debian testing. Maybe that exclusion is not even neccessary (anymore)

https://packages.debian.org/sid/systemd-sysv

BrainStone commented 6 years ago

I mean without it the commands like reboot, poweroff, shutdown are all missing and I have to revert to systemctl reboot.

From what I understand systemd-sysv is the package that provides these.

burnbabyburn commented 6 years ago

I am building your config atm. If you remove that exclude you get systemd-sysv automatically back. Your totally right with the commands above

/sbin/halt
/sbin/init
/sbin/poweroff
/sbin/reboot
/sbin/runlevel
/sbin/shutdown
/sbin/telinit
...

We could replace the fixed exclude with a variable EXCLUDE_PACKAGES (we already got INCLUDE_PACKAGES) Per default it excludes above packages.

or just remove it

BrainStone commented 6 years ago

I mean it's not urgent to have that package, though I'd love to have it eventually, and I think it should be installed by default.

So maybe add a config for it? Or remove it altogether. Don't really see a purpose in removing these packages.

And is it really included by default without having to specify it in APT_INCLUDES? Because in my config it is there.

burnbabyburn commented 6 years ago

I'll try https://github.com/burnbabyburn/rpi23-gen-image/commit/27e5e2634549c6292d62358b74c014a0c320835a

BrainStone commented 6 years ago

Well, doesn't that essentially just do the same? It forcefully adds init,systemd-sysv to the list of excludes.

burnbabyburn commented 6 years ago

Jap, i added ENABLE_SYSVINIT for this. Set it to ENABLE_SYSVINIT=true to get the desired packages. Default behaviour is still to remove them. Dirty Helper has to decide his defaults

BrainStone commented 6 years ago

Ah cool. I'm hoping this will get merged soon. Don't want to change the base repo of my submodule...

drtyhlpr commented 6 years ago

hi thanks for your report and answers. If I remember right this was added when a new debian release (stretch or buster) fully switched init to systemd and the building was broken if u did not exclude the systemd-sysv.

burnbabyburn commented 5 years ago

It can be added to buster. I didn't test jessie or stretch though

burnbabyburn commented 5 years ago

150 is merged this issue can be closed

drtyhlpr commented 5 years ago

perfect