Skip to content

meson: use meson-make-symlink.sh helper script instead of install_symlink()#327

Merged
slyon merged 1 commit into
canonical:mainfrom
slyon:meson-link
Feb 27, 2023
Merged

meson: use meson-make-symlink.sh helper script instead of install_symlink()#327
slyon merged 1 commit into
canonical:mainfrom
slyon:meson-link

Conversation

@slyon

@slyon slyon commented Feb 27, 2023

Copy link
Copy Markdown
Contributor

Description

meson: use meson-make-symlink.sh helper script instead of install_symlink()

This will allow to dynamically adopt the symlinks for usrmerged and non-usrmerged installations, especially:
root@ll:~# pkgconf --variable=systemdsystemgeneratordir systemd /lib/systemd/system-generators

[root@f37 ~]# pkgconf --variable=systemdsystemgeneratordir systemd /usr/lib/systemd/system-generators

Helper script inspired by util-linux 238.1-5 (tools/meson-make-symlink.sh)

Related to #323

Checklist

  • Runs make check successfully.
  • Retains 100% code coverage (make check-coverage).
  • New/changed keys in YAML format are documented.
  • (Optional) Adds example YAML for new feature.
  • (Optional) Closes an open bug in Launchpad.

…link()

This will allow to dynamically adopt the symlinks for usrmerged and
non-usrmerged installations, especially:
root@ll:~# pkgconf --variable=systemdsystemgeneratordir systemd
/lib/systemd/system-generators

[root@f37 ~]# pkgconf --variable=systemdsystemgeneratordir systemd
/usr/lib/systemd/system-generators

Helper script inspired by util-linux 238.1-5 (tools/meson-make-symlink.sh)
@slyon

slyon commented Feb 27, 2023

Copy link
Copy Markdown
Contributor Author

This seems to be working for both cases:

$ tree tmproot/
tmproot/                                                   
├── lib                                                    
│   └── systemd                                            
│       └── system-generators
│           └── netplan -> ../../../usr/libexec/netplan/generate
└── usr
    ├── libexec
    │   └── netplan
    │       ├── generate

$ tree tmproot/
tmproot/                                                   
└── usr                                                    
    ├── lib
    │   ├── systemd
    │   │   └── system-generators
    │   │       └── netplan -> ../../../libexec/netplan/generate
    │   └── [...]
    ├── libexec
    │   └── netplan
    │       ├── generate

@slyon

slyon commented Feb 27, 2023

Copy link
Copy Markdown
Contributor Author

I've also talked to our systemd maintainer, and we will coordinate with Debian to adopt the systemd packaging to install stuff in /usr/lib/systemd/... instead of /lib/systemd/... (+ adopting corresponding pkgconf files).

@slyon slyon requested a review from daniloegea February 27, 2023 15:29
@slyon

slyon commented Feb 27, 2023

Copy link
Copy Markdown
Contributor Author

cc @Conan-Kudo @xnox WDYT about this?

@Conan-Kudo

Copy link
Copy Markdown
Contributor

I've also talked to our systemd maintainer, and we will coordinate with Debian to adopt the systemd packaging to install stuff in /usr/lib/systemd/... instead of /lib/systemd/... (+ adopting corresponding pkgconf files).

This needs to be done anyway, since systemd is ripping out support for non-usrmerged systems soon. It'd be great to see this in place for Lunar at least.

@xnox xnox left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yeah, --relative is best, as this avoids the need for distro packaging tools to fix things up later, like rpm scriplets do, or like dh_link in debian world.

@slyon

slyon commented Feb 27, 2023

Copy link
Copy Markdown
Contributor Author

This needs to be done anyway, since systemd is ripping out support for non-usrmerged systems soon. It'd be great to see this in place for Lunar at least.

Agreed. Lunar is post-FeatureFreeze already, so unfortunately I doubt the systemd change will still be landed in Lunar. But should be in Lunar+1

@slyon slyon merged commit 2cded2f into canonical:main Feb 27, 2023
@Conan-Kudo

Copy link
Copy Markdown
Contributor

This needs to be done anyway, since systemd is ripping out support for non-usrmerged systems soon. It'd be great to see this in place for Lunar at least.

Agreed. Lunar is post-FeatureFreeze already, so unfortunately I doubt the systemd change will still be landed in Lunar. But should be in Lunar+1

I think this is honestly worthy of an exception, but my voice doesn't really matter here...

@slyon

slyon commented Feb 27, 2023

Copy link
Copy Markdown
Contributor Author

This needs to be done anyway, since systemd is ripping out support for non-usrmerged systems soon. It'd be great to see this in place for Lunar at least.

Agreed. Lunar is post-FeatureFreeze already, so unfortunately I doubt the systemd change will still be landed in Lunar. But should be in Lunar+1

I think this is honestly worthy of an exception, but my voice doesn't really matter here...

Your voice and input is highly appreciated! I've been told that some discussion around this usrmerge change has been happening in IRC #debian-systemd recently. But as both Debian and Ubuntu are currently in freeze, I assume the maintainers won't land such impactful change anymore (it will require changes to many more packages, like Netplan, which use systemd's pkgconf data). I'll try to re-ping people about, tho, and make them aware of this discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants