Skip to content

meson: install compat symlinks for systemctl - #8300

Merged
poettering merged 1 commit into
systemd:masterfrom
keszybz:meson-install-symlinks
Feb 28, 2018
Merged

poettering merged 1 commit into
systemd:masterfrom
keszybz:meson-install-symlinks

Conversation

@keszybz

@keszybz keszybz commented Feb 27, 2018

Copy link
Copy Markdown
Member

No description provided.

@keszybz keszybz added the meson label Feb 27, 2018
@yuwata

yuwata commented Feb 28, 2018

Copy link
Copy Markdown
Member

lgtm.

@yuwata yuwata added the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label Feb 28, 2018
Comment thread meson.build Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note. Currently, init is a symlink to /usr/lib/systemd/systemd on Fedora, not systemctl.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, oh, oh. Thanks for catching this. Of course.

@keszybz keszybz removed the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label Feb 28, 2018
v2:
- init is a symlink to systemd, not systemctl!
@keszybz
keszybz force-pushed the meson-install-symlinks branch from 9d1e1e9 to dc3fb37 Compare February 28, 2018 07:49
@keszybz

keszybz commented Feb 28, 2018

Copy link
Copy Markdown
Member Author

Updated.

@yuwata yuwata added the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label Feb 28, 2018
@yuwata

yuwata commented Feb 28, 2018

Copy link
Copy Markdown
Member

lgtm.

BTW, I thought that init can be symlink to systemctl. Is it not true?

@keszybz

keszybz commented Feb 28, 2018

Copy link
Copy Markdown
Member Author

No. /sbin/init must be a binary that can start the system, and systemctl has no code for that.

With sysvinit, /sbin/init also provided an implementation of /sbin/telinit, so /sbin/telinit was a symlink to /sbin/init. But we split those two roles, into systemd-init group, and systemctl-telinit-runlevel-... group.

yuwata added a commit to yuwata/systemd that referenced this pull request Feb 28, 2018
`init` should be a symlink to `systemd` not `systemctl`.
See comments in systemd#8300.
@yuwata

yuwata commented Feb 28, 2018

Copy link
Copy Markdown
Member

I see. Thank you for the explanation. Maybe an origin of my confusion is that systemctl accepts init instead of telinit as program_invocation_short_name. Please see #8305.

@poettering

Copy link
Copy Markdown
Member

this breaks the rawhide CI, but I figure that's kinda expected.

Thanks for fixing this!

@poettering
poettering merged commit ba7f4ae into systemd:master Feb 28, 2018
@yuwata yuwata mentioned this pull request Mar 1, 2018
@bl33pbl0p

Copy link
Copy Markdown
Contributor

It seems after this change the symlinks are now set up in /usr/sbin/ instead, and since that is a symlink to /usr/bin on Exherbo and Arch atleast, installation of the produced image/tarball fails (since it tries to write to /usr/sbin making it a directory while it should be a symlink).

@keszybz
keszybz deleted the meson-install-symlinks branch March 1, 2018 08:47
@keszybz

keszybz commented Mar 1, 2018

Copy link
Copy Markdown
Member Author

Oh, I didn't consider this case. Fedora is still suffering from the bin-sbin split.

@keszybz

keszybz commented Mar 1, 2018

Copy link
Copy Markdown
Member Author

This is not a problem when installing into the real root, where /usr/sbin and /usr/bin already exist, right? It's only an issue when using DESTDIR?

@bl33pbl0p

Copy link
Copy Markdown
Contributor

I think so, yes.

@keszybz

keszybz commented Mar 1, 2018

Copy link
Copy Markdown
Member Author

#8319

@bl33pbl0p

Copy link
Copy Markdown
Contributor

I'll try testing it.

@poettering

Copy link
Copy Markdown
Member

@bl33pbl0p i merged #8319 now. BTW, if you merge bin+sbin like this (which I very much sympathize with), then i figure you might want to #ifdef out a few places in the systemd tree where we refer to the directory. I'd welcome a patch adding the necessary iffdeffery for dealing with that the same way as we already have #ifdef HAVE_SPLIT_USR at various places.

For example, /sbin is currently mentioned in src/core/namespace.c where it should suppressed if the dir is merged like that. Similar in src/basic/path-util.h and possibly others.

@keszybz

keszybz commented Mar 1, 2018

Copy link
Copy Markdown
Member Author

#8324

@keszybz keszybz removed the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label Mar 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

4 participants