* [pve-devel] [PATCH manager master stable-7] pve7to8: Fix Fedora 38 systemd unified cgroupv2 check
@ 2023-08-28 7:54 Christian Ebner
2023-09-27 6:58 ` Christian Ebner
2023-09-27 17:08 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 2 replies; 3+ messages in thread
From: Christian Ebner @ 2023-08-28 7:54 UTC (permalink / raw)
To: pve-devel
For Fedora 38 the systemd shared object files used to check the systemd
version are located at /usr/lib64/systemd or /usr/lib/systemd.
Therefore, include /usr/lib64/systemd in the list of directories to
check.
Further, Fedora 38 adds a fc38 postfix to the filename, so expand the
regex to cover that as well.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
Reported by users via the forum:
https://forum.proxmox.com/threads/128721/#post-584456
PVE/CLI/pve7to8.pm | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/PVE/CLI/pve7to8.pm b/PVE/CLI/pve7to8.pm
index ff8e6045..3947b260 100644
--- a/PVE/CLI/pve7to8.pm
+++ b/PVE/CLI/pve7to8.pm
@@ -1022,12 +1022,18 @@ sub check_containers_cgroup_compat {
my $get_systemd_version = sub {
my ($self) = @_;
+ my @dirs = (
+ '/lib/systemd',
+ '/usr/lib/systemd',
+ '/usr/lib/x86_64-linux-gnu/systemd',
+ '/usr/lib64/systemd'
+ );
my $libsd;
- for my $dir ('/lib/systemd', '/usr/lib/systemd', '/usr/lib/x86_64-linux-gnu/systemd') {
+ for my $dir (@dirs) {
$libsd = PVE::Tools::dir_glob_regex($dir, "libsystemd-shared-.+\.so");
last if defined($libsd);
}
- if (defined($libsd) && $libsd =~ /libsystemd-shared-(\d+)(\.\d-\d)?\.so/) {
+ if (defined($libsd) && $libsd =~ /libsystemd-shared-(\d+)(\.\d-\d)?(\.fc\d\d)?\.so/) {
return $1;
}
--
2.39.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [pve-devel] [PATCH manager master stable-7] pve7to8: Fix Fedora 38 systemd unified cgroupv2 check
2023-08-28 7:54 [pve-devel] [PATCH manager master stable-7] pve7to8: Fix Fedora 38 systemd unified cgroupv2 check Christian Ebner
@ 2023-09-27 6:58 ` Christian Ebner
2023-09-27 17:08 ` [pve-devel] applied: " Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Christian Ebner @ 2023-09-27 6:58 UTC (permalink / raw)
To: pve-devel
Ping, see also https://forum.proxmox.com/threads/128721/
> On 28.08.2023 09:54 CEST Christian Ebner <c.ebner@proxmox.com> wrote:
>
>
> For Fedora 38 the systemd shared object files used to check the systemd
> version are located at /usr/lib64/systemd or /usr/lib/systemd.
> Therefore, include /usr/lib64/systemd in the list of directories to
> check.
>
> Further, Fedora 38 adds a fc38 postfix to the filename, so expand the
> regex to cover that as well.
>
> Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
> ---
>
> Reported by users via the forum:
> https://forum.proxmox.com/threads/128721/#post-584456
>
> PVE/CLI/pve7to8.pm | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/PVE/CLI/pve7to8.pm b/PVE/CLI/pve7to8.pm
> index ff8e6045..3947b260 100644
> --- a/PVE/CLI/pve7to8.pm
> +++ b/PVE/CLI/pve7to8.pm
> @@ -1022,12 +1022,18 @@ sub check_containers_cgroup_compat {
> my $get_systemd_version = sub {
> my ($self) = @_;
>
> + my @dirs = (
> + '/lib/systemd',
> + '/usr/lib/systemd',
> + '/usr/lib/x86_64-linux-gnu/systemd',
> + '/usr/lib64/systemd'
> + );
> my $libsd;
> - for my $dir ('/lib/systemd', '/usr/lib/systemd', '/usr/lib/x86_64-linux-gnu/systemd') {
> + for my $dir (@dirs) {
> $libsd = PVE::Tools::dir_glob_regex($dir, "libsystemd-shared-.+\.so");
> last if defined($libsd);
> }
> - if (defined($libsd) && $libsd =~ /libsystemd-shared-(\d+)(\.\d-\d)?\.so/) {
> + if (defined($libsd) && $libsd =~ /libsystemd-shared-(\d+)(\.\d-\d)?(\.fc\d\d)?\.so/) {
> return $1;
> }
>
> --
> 2.39.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pve-devel] applied: [PATCH manager master stable-7] pve7to8: Fix Fedora 38 systemd unified cgroupv2 check
2023-08-28 7:54 [pve-devel] [PATCH manager master stable-7] pve7to8: Fix Fedora 38 systemd unified cgroupv2 check Christian Ebner
2023-09-27 6:58 ` Christian Ebner
@ 2023-09-27 17:08 ` Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2023-09-27 17:08 UTC (permalink / raw)
To: Proxmox VE development discussion, Christian Ebner
Am 28/08/2023 um 09:54 schrieb Christian Ebner:
> For Fedora 38 the systemd shared object files used to check the systemd
> version are located at /usr/lib64/systemd or /usr/lib/systemd.
> Therefore, include /usr/lib64/systemd in the list of directories to
> check.
>
> Further, Fedora 38 adds a fc38 postfix to the filename, so expand the
> regex to cover that as well.
>
> Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
> ---
>
> Reported by users via the forum:
> https://forum.proxmox.com/threads/128721/#post-584456
>
> PVE/CLI/pve7to8.pm | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-27 17:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-28 7:54 [pve-devel] [PATCH manager master stable-7] pve7to8: Fix Fedora 38 systemd unified cgroupv2 check Christian Ebner
2023-09-27 6:58 ` Christian Ebner
2023-09-27 17:08 ` [pve-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox