Skip to content

Commit 540fe68

Browse files
bump pve-container to 5.3.0
1 parent 5bfcc6e commit 540fe68

9 files changed

Lines changed: 140 additions & 93 deletions

packages/pve-container/patches/001-add-loongarch-support.patch renamed to packages/pve-container/patches/0001-Add-loongarch-support.patch

Lines changed: 38 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,35 @@
1-
From 6c3157c3324c5e47cb0a8c3df0aaa59b753a2f2f Mon Sep 17 00:00:00 2001
1+
From b177ce84f9c0c7198a3db8eee28a1b1f83425ddc Mon Sep 17 00:00:00 2001
22
From: jiangcuo <jiangcuo@bingsin.com>
33
Date: Thu, 5 Dec 2024 11:31:29 +0800
4-
Subject: [PATCH] Add loongarch support
4+
Subject: [PATCH 1/6] Add loongarch support
55

66
---
7-
src/PVE/LXC/Config.pm | 2 +-
8-
src/PVE/LXC/Setup.pm | 11 ----------
7+
src/PVE/LXC/Config.pm | 10 ++++-----
98
src/PVE/LXC/Setup/Plugin.pm | 44 ++++++++++++++++++++++++++++++++++++-
10-
src/PVE/LXC/Tools.pm | 1 +
11-
4 files changed, 45 insertions(+), 13 deletions(-)
9+
src/PVE/LXC/Tools.pm | 11 +++++-----
10+
3 files changed, 54 insertions(+), 11 deletions(-)
1211

1312
diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
14-
index 5cc37f7..0452d4a 100644
13+
index 7bdb8b9..0b12587 100644
1514
--- a/src/PVE/LXC/Config.pm
1615
+++ b/src/PVE/LXC/Config.pm
17-
@@ -473,7 +473,7 @@ my $confdesc = {
16+
@@ -507,11 +507,11 @@ my $confdesc = {
17+
default => 0,
18+
},
1819
arch => {
19-
optional => 1,
20-
type => 'string',
21-
- enum => ['amd64', 'i386', 'arm64', 'armhf', 'riscv32', 'riscv64'],
20+
- optional => 1,
21+
- type => 'string',
22+
- enum => ['amd64', 'i386', 'arm64', 'armhf', 'riscv32', 'riscv64'],
23+
- description => "OS architecture type.",
24+
- default => 'amd64',
25+
+ optional => 1,
26+
+ type => 'string',
2227
+ enum => ['amd64', 'i386', 'arm64', 'armhf', 'riscv32', 'riscv64', 'loongarch64'],
23-
description => "OS architecture type.",
24-
default => 'amd64',
28+
+ description => "OS architecture type.",
29+
+ default => 'amd64',
2530
},
26-
diff --git a/src/PVE/LXC/Setup.pm b/src/PVE/LXC/Setup.pm
27-
index dc58990..78272be 100644
28-
--- a/src/PVE/LXC/Setup.pm
29-
+++ b/src/PVE/LXC/Setup.pm
30-
@@ -141,17 +141,6 @@ sub new {
31-
if (!defined($conf->{arch})) {
32-
my $arch = eval { $self->protected_call(sub { $plugin->detect_architecture() }) };
33-
34-
- if (my $err = $@) {
35-
- warn "Architecture detection failed: $err" if $err;
36-
- }
37-
-
38-
- if (!defined($arch)) {
39-
- $arch = 'amd64';
40-
- print "Falling back to $arch.\nUse `pct set VMID --arch ARCH` to change.\n";
41-
- } else {
42-
- print "Detected container architecture: $arch\n";
43-
- }
44-
-
45-
$conf->{arch} = $arch;
46-
}
47-
31+
ostype => {
32+
optional => 1,
4833
diff --git a/src/PVE/LXC/Setup/Plugin.pm b/src/PVE/LXC/Setup/Plugin.pm
4934
index b9d9c2d..f413d91 100644
5035
--- a/src/PVE/LXC/Setup/Plugin.pm
@@ -108,14 +93,27 @@ index b9d9c2d..f413d91 100644
10893

10994
# hooks
11095
diff --git a/src/PVE/LXC/Tools.pm b/src/PVE/LXC/Tools.pm
111-
index 3380c62..a9aa942 100644
96+
index 40dd270..ee4ae5a 100644
11297
--- a/src/PVE/LXC/Tools.pm
11398
+++ b/src/PVE/LXC/Tools.pm
114-
@@ -179,6 +179,7 @@ sub detect_elf_architecture {
115-
0x28 => 'armhf',
116-
0xb7 => 'arm64',
117-
0xf3 => 'riscv',
99+
@@ -174,11 +174,12 @@ sub detect_elf_architecture {
100+
# see https://en.wikipedia.org/wiki/Executable_and_Linkable_Format
101+
102+
my $supported_elf_machine = {
103+
- 0x03 => 'i386',
104+
- 0x3e => 'amd64',
105+
- 0x28 => 'armhf',
106+
- 0xb7 => 'arm64',
107+
- 0xf3 => 'riscv',
108+
+ 0x03 => 'i386',
109+
+ 0x3e => 'amd64',
110+
+ 0x28 => 'armhf',
111+
+ 0xb7 => 'arm64',
112+
+ 0xf3 => 'riscv',
118113
+ 0x2 => 'loongarch64',
119114
};
120115

121116
my $detect_arch = sub {
117+
--
118+
2.39.5
119+

packages/pve-container/patches/002-add-anolis.patch renamed to packages/pve-container/patches/0002-add-anolis.patch

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
From a5fec2b01a76ae3ba33704f9f8037c332bd30966 Mon Sep 17 00:00:00 2001
1+
From f5c3a304c2c0e1689d7ab0314e4de5d4191ad75b Mon Sep 17 00:00:00 2001
22
From: jiangcuo <jiangcuo@bingsin.com>
33
Date: Thu, 5 Dec 2024 12:17:37 +0800
4-
Subject: [PATCH] add anolis
4+
Subject: [PATCH 2/6] add anolis
55

66
---
7-
src/PVE/LXC/Setup.pm | 2 ++
7+
src/PVE/LXC/Setup.pm | 12 +++++++-----
88
src/PVE/LXC/Setup/Anolis.pm | 34 ++++++++++++++++++++++++++++++++++
99
src/PVE/LXC/Setup/Makefile | 1 +
10-
3 files changed, 37 insertions(+)
10+
3 files changed, 42 insertions(+), 5 deletions(-)
1111
create mode 100644 src/PVE/LXC/Setup/Anolis.pm
1212

1313
diff --git a/src/PVE/LXC/Setup.pm b/src/PVE/LXC/Setup.pm
14-
index 78272be..98398f8 100644
14+
index 87330c4..c3ada9d 100644
1515
--- a/src/PVE/LXC/Setup.pm
1616
+++ b/src/PVE/LXC/Setup.pm
1717
@@ -10,6 +10,7 @@ use PVE::Tools;
@@ -22,14 +22,24 @@ index 78272be..98398f8 100644
2222
use PVE::LXC::Setup::CentOS;
2323
use PVE::LXC::Setup::Debian;
2424
use PVE::LXC::Setup::Devuan;
25-
@@ -24,6 +25,7 @@ use PVE::LXC::Setup::Unmanaged;
25+
@@ -24,11 +25,12 @@ use PVE::LXC::Setup::Unmanaged;
2626
my $plugins = {
27-
alpine => 'PVE::LXC::Setup::Alpine',
27+
alpine => 'PVE::LXC::Setup::Alpine',
2828
archlinux => 'PVE::LXC::Setup::ArchLinux',
29+
- centos => 'PVE::LXC::Setup::CentOS',
30+
- debian => 'PVE::LXC::Setup::Debian',
31+
- devuan => 'PVE::LXC::Setup::Devuan',
32+
- fedora => 'PVE::LXC::Setup::Fedora',
33+
- gentoo => 'PVE::LXC::Setup::Gentoo',
2934
+ anolis => 'PVE::LXC::Setup::Anolis',
30-
centos => 'PVE::LXC::Setup::CentOS',
31-
debian => 'PVE::LXC::Setup::Debian',
32-
devuan => 'PVE::LXC::Setup::Devuan',
35+
+ centos => 'PVE::LXC::Setup::CentOS',
36+
+ debian => 'PVE::LXC::Setup::Debian',
37+
+ devuan => 'PVE::LXC::Setup::Devuan',
38+
+ fedora => 'PVE::LXC::Setup::Fedora',
39+
+ gentoo => 'PVE::LXC::Setup::Gentoo',
40+
openeuler => 'PVE::LXC::Setup::OpenEuler',
41+
opensuse => 'PVE::LXC::Setup::SUSE',
42+
ubuntu => 'PVE::LXC::Setup::Ubuntu',
3343
diff --git a/src/PVE/LXC/Setup/Anolis.pm b/src/PVE/LXC/Setup/Anolis.pm
3444
new file mode 100644
3545
index 0000000..7c482b5
@@ -82,3 +92,6 @@ index 688b547..9ff3de9 100644
8292

8393
.PHONY: install
8494
install:
95+
--
96+
2.39.5
97+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 91e647009d1e9c27d88bd84b9664448e1d9f80b2 Mon Sep 17 00:00:00 2001
2+
From: jiangcuo <jiangcuo@bingsin.com>
3+
Date: Thu, 5 Dec 2024 12:21:23 +0800
4+
Subject: [PATCH 3/6] set unknown ostype to unmanaged
5+
6+
---
7+
src/PVE/LXC/Setup.pm | 2 --
8+
1 file changed, 2 deletions(-)
9+
10+
diff --git a/src/PVE/LXC/Setup.pm b/src/PVE/LXC/Setup.pm
11+
index c3ada9d..47ce400 100644
12+
--- a/src/PVE/LXC/Setup.pm
13+
+++ b/src/PVE/LXC/Setup.pm
14+
@@ -89,8 +89,6 @@ my $autodetect_type = sub {
15+
return "nixos";
16+
} elsif (-f "$rootdir/etc/openEuler-release") {
17+
return "openeuler";
18+
- } elsif (-f "$rootdir/etc/os-release") {
19+
- die "unable to detect OS distribution\n";
20+
} else {
21+
warn
22+
"/etc/os-release file not found and autodetection failed, falling back to 'unmanaged'\n";
23+
--
24+
2.39.5
25+

packages/pve-container/patches/changelog/001-bump-version-to-5.2.2+port1.patch renamed to packages/pve-container/patches/0004-bump-version-to-5.2.2-port1.patch

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1+
From 8ea94d26ece3115a7536f350809942938308a78b Mon Sep 17 00:00:00 2001
2+
From: jiangcuo <jiangcuo@bingsin.com>
3+
Date: Thu, 5 Dec 2024 12:22:17 +0800
4+
Subject: [PATCH 4/6] bump version to 5.2.2+port1
5+
6+
---
7+
debian/changelog | 8 ++++++++
8+
1 file changed, 8 insertions(+)
9+
110
diff --git a/debian/changelog b/debian/changelog
2-
index 8b587d5..7681158 100644
11+
index 03b61e9..8c6b995 100644
312
--- a/debian/changelog
413
+++ b/debian/changelog
5-
@@ -32,6 +32,14 @@ pve-container (5.2.3) bookworm; urgency=medium
14+
@@ -66,6 +66,14 @@ pve-container (5.2.3) bookworm; urgency=medium
615

716
-- Proxmox Support Team <support@proxmox.com> Thu, 19 Dec 2024 15:16:59 +0100
817

@@ -17,3 +26,6 @@ index 8b587d5..7681158 100644
1726
pve-container (5.2.2) bookworm; urgency=medium
1827

1928
* network config: avoid committing invalid config on hotplug failure, rather
29+
--
30+
2.39.5
31+
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
From a6fc1c64d9a4ed0b773d0ae21e854614099e74bf Mon Sep 17 00:00:00 2001
2+
From: jiangcuo <jiangcuo@bingsin.com>
3+
Date: Thu, 5 Dec 2024 18:55:13 +0800
4+
Subject: [PATCH 5/6] add openeuler anolis in lxc config
5+
6+
---
7+
src/PVE/LXC/Config.pm | 11 ++++-------
8+
1 file changed, 4 insertions(+), 7 deletions(-)
9+
10+
diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
11+
index 0b12587..f02b1f6 100644
12+
--- a/src/PVE/LXC/Config.pm
13+
+++ b/src/PVE/LXC/Config.pm
14+
@@ -514,13 +514,10 @@ my $confdesc = {
15+
default => 'amd64',
16+
},
17+
ostype => {
18+
- optional => 1,
19+
- type => 'string',
20+
- enum => [
21+
- qw(debian devuan ubuntu centos fedora opensuse archlinux alpine gentoo nixos unmanaged)
22+
- ],
23+
- description =>
24+
- "OS type. This is used to setup configuration inside the container, and corresponds to lxc setup scripts in /usr/share/lxc/config/<ostype>.common.conf. Value 'unmanaged' can be used to skip and OS specific setup.",
25+
+ optional => 1,
26+
+ type => 'string',
27+
+ enum => [qw(debian devuan ubuntu centos fedora opensuse archlinux alpine gentoo nixos openeuler anolis unmanaged)],
28+
+ description => "OS type. This is used to setup configuration inside the container, and corresponds to lxc setup scripts in /usr/share/lxc/config/<ostype>.common.conf. Value 'unmanaged' can be used to skip and OS specific setup.",
29+
},
30+
console => {
31+
optional => 1,
32+
--
33+
2.39.5
34+

‎packages/pve-container/patches/003-set-unknown-ostype-to-unmanaged.patch‎

Lines changed: 0 additions & 22 deletions
This file was deleted.

‎packages/pve-container/patches/004-add-openeuler-anolis-in-lxc-config.patch‎

Lines changed: 0 additions & 13 deletions
This file was deleted.
Submodule pve-container updated from bd401ac to fa4cc7d

‎packages/pve-container/series‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
patches/001-add-loongarch-support.patch
2-
patches/002-add-anolis.patch
3-
patches/003-set-unknown-ostype-to-unmanaged.patch
4-
patches/changelog/001-bump-version-to-5.2.2+port1.patch
5-
patches/004-add-openeuler-anolis-in-lxc-config.patch
1+
patches/0001-Add-loongarch-support.patch
2+
patches/0002-add-anolis.patch
3+
patches/0003-set-unknown-ostype-to-unmanaged.patch
4+
patches/0004-bump-version-to-5.2.2-port1.patch
5+
patches/0005-add-openeuler-anolis-in-lxc-config.patch

0 commit comments

Comments
 (0)