Skip to content

Commit 6778e54

Browse files
committed
add pve-qemu zfsonlinux pve-common package
1 parent 916b838 commit 6778e54

11 files changed

Lines changed: 246 additions & 0 deletions

File tree

‎.gitmodules‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,12 @@
44
[submodule "packages/qemu-server/qemu-server"]
55
path = packages/qemu-server/qemu-server
66
url = https://git.proxmox.com/git/qemu-server.git
7+
[submodule "packages/zfsonlinux/zfsonlinux"]
8+
path = packages/zfsonlinux/zfsonlinux
9+
url = https://git.proxmox.com/git/zfsonlinux.git
10+
[submodule "packages/pve-qemu/pve-qemu"]
11+
path = packages/pve-qemu/pve-qemu
12+
url = https://git.proxmox.com/git/pve-qemu.git
13+
[submodule "packages/pve-common/pve-common"]
14+
path = packages/pve-common/pve-common
15+
url = https://git.proxmox.com/git/pve-common
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
diff --git a/src/PVE/Syscall.pm b/src/PVE/Syscall.pm
2+
index 9ef3d5d..d7b0b3f 100644
3+
--- a/src/PVE/Syscall.pm
4+
+++ b/src/PVE/Syscall.pm
5+
@@ -16,7 +16,6 @@ BEGIN {
6+
openat => &SYS_openat,
7+
close => &SYS_close,
8+
mkdirat => &SYS_mkdirat,
9+
- mknod => &SYS_mknod,
10+
faccessat => &SYS_faccessat,
11+
setresuid => &SYS_setresuid,
12+
fchownat => &SYS_fchownat,
13+
diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm
14+
index bd305bd..2aab9e2 100644
15+
--- a/src/PVE/Tools.pm
16+
+++ b/src/PVE/Tools.pm
17+
@@ -1753,7 +1753,8 @@ sub mkdirat($$$) {
18+
19+
sub mknod($$$) {
20+
my ($filename, $mode, $dev) = @_;
21+
- return syscall(PVE::Syscall::mknod, $filename, int($mode), int($dev)) == 0;
22+
+ die "https://github.com/jiangcuo/Proxmox-Arm64/issues/58";
23+
+ #return syscall(PVE::Syscall::SYS_mknod, $filename, int($mode), int($dev)) == 0;
24+
}
25+
26+
sub fchownat($$$$$) {
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
diff --git a/debian/changelog b/debian/changelog
2+
index e628a2a..ff213c4 100644
3+
--- a/debian/changelog
4+
+++ b/debian/changelog
5+
@@ -158,6 +158,12 @@ libpve-common-perl (8.0.2) bookworm; urgency=medium
6+
* remove unused SysFSTools::pci_cleanup_mdev_device
7+
8+
-- Proxmox Support Team <support@proxmox.com> Wed, 07 Jun 2023 13:12:18 +0200
9+
+
10+
+libpve-common-perl (8.1.0-1) bookworm; urgency=medium
11+
+
12+
+ * tools: remove mknod syscall#
13+
+
14+
+ -- Jiangcuo <jiangcuo@bingsin.com> Tue, 21 Nov 2023 13:04:21 +0100
15+
16+
libpve-common-perl (8.0.1) bookworm; urgency=medium
17+

‎packages/pve-common/pve-common‎

Submodule pve-common added at f291dcd

‎packages/pve-qemu/.DS_Store‎

6 KB
Binary file not shown.
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
diff --git a/Makefile b/Makefile
2+
index f23b041..8a5d68d 100644
3+
--- a/Makefile
4+
+++ b/Makefile
5+
@@ -22,25 +22,6 @@ ifeq ($(shell test -f "$(SRCDIR)/configure" && echo 1 || echo 0), 0)
6+
cd $(SRCDIR); meson subprojects download
7+
endif
8+
9+
-PC_BIOS_FW_PURGE_LIST_IN = \
10+
- hppa-firmware.img \
11+
- hppa-firmware64.img \
12+
- openbios-ppc \
13+
- openbios-sparc32 \
14+
- openbios-sparc64 \
15+
- palcode-clipper \
16+
- s390-ccw.img \
17+
- s390-netboot.img \
18+
- u-boot.e500 \
19+
- .*[a-zA-Z0-9]\.dtb \
20+
- .*[a-zA-Z0-9]\.dts \
21+
- qemu_vga.ndrv \
22+
- slof.bin \
23+
- opensbi-riscv.*-generic-fw_dynamic.bin \
24+
-
25+
-BLOB_PURGE_SED_CMDS = $(foreach FILE,$(PC_BIOS_FW_PURGE_LIST_IN),-e "/$(FILE)/d")
26+
-BLOB_PURGE_FILTER = $(foreach FILE,$(PC_BIOS_FW_PURGE_LIST_IN),-e "$(FILE)")
27+
-
28+
$(BUILDDIR): submodule
29+
# check if qemu/ was used for a build
30+
# if so, please run 'make distclean' in the submodule and try again
31+
@@ -49,8 +30,6 @@ $(BUILDDIR): submodule
32+
cp -a $(SRCDIR) $@.tmp
33+
cp -a debian $@.tmp/debian
34+
rm -rf $@.tmp/roms/edk2 # packaged separately
35+
- find $@.tmp/pc-bios -type f | grep $(BLOB_PURGE_FILTER) | xargs rm -f
36+
- sed -i $(BLOB_PURGE_SED_CMDS) $@.tmp/pc-bios/meson.build
37+
echo "git clone git://git.proxmox.com/git/pve-qemu.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE
38+
mv $@.tmp $@
39+
40+
diff --git a/debian/control b/debian/control
41+
index b228c00..01c6621 100644
42+
--- a/debian/control
43+
+++ b/debian/control
44+
@@ -13,6 +13,7 @@ Build-Depends: debhelper-compat (= 13),
45+
libfdt-dev,
46+
libgbm-dev,
47+
libglusterfs-dev (>= 5.2-2),
48+
+ libgtk-3-dev,
49+
libgnutls28-dev,
50+
libiscsi-dev (>= 1.12.0),
51+
libjpeg-dev,
52+
diff --git a/debian/parse-machines.pl b/debian/parse-machines.pl
53+
index a0f449c..e179f9b 100755
54+
--- a/debian/parse-machines.pl
55+
+++ b/debian/parse-machines.pl
56+
@@ -14,11 +14,11 @@ while (<STDIN>) {
57+
58+
s/^\s+//;
59+
my @machine = split(/\s+/);
60+
- next if $machine[0] !~ m/^pc-(i440fx|q35)-(.+)$/;
61+
+ next if $machine[0] !~ m/^virt-(.+)$/;
62+
push @$machines, {
63+
'id' => $machine[0],
64+
- 'type' => $1,
65+
- 'version' => $2,
66+
+ 'type' => 'virt',
67+
+ 'version' => $1,
68+
};
69+
}
70+
71+
diff --git a/debian/pve-qemu-kvm.links b/debian/pve-qemu-kvm.links
72+
index 7314aa4..2c4b8e1 100644
73+
--- a/debian/pve-qemu-kvm.links
74+
+++ b/debian/pve-qemu-kvm.links
75+
@@ -1,6 +1,5 @@
76+
# also use aarch64 for 32 bit arm
77+
usr/bin/qemu-system-aarch64 usr/bin/qemu-system-arm
78+
-usr/bin/qemu-system-x86_64 usr/bin/kvm
79+
# qemu-system-i386 and qemu-system-x86_64 provides the same hardware emulation
80+
usr/bin/qemu-system-x86_64 usr/bin/qemu-system-i386
81+
# upstream provides a qemu man page,
82+
diff --git a/debian/rules b/debian/rules
83+
index 51f56c5..2988432 100755
84+
--- a/debian/rules
85+
+++ b/debian/rules
86+
@@ -12,7 +12,7 @@ PACKAGE=pve-qemu-kvm
87+
destdir := $(CURDIR)/debian/$(PACKAGE)
88+
89+
flagfile := $(destdir)/usr/share/kvm/recognized-CPUID-flags-x86_64
90+
-machinefile := $(destdir)/usr/share/kvm/machine-versions-x86_64.json
91+
+machinefile := $(destdir)/usr/share/kvm/machine-versions-aarch64.json
92+
93+
# default QEMU out-of-tree build directory is ./build
94+
BUILDDIR=build
95+
@@ -35,7 +35,7 @@ endif
96+
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
97+
cp -f /usr/share/misc/config.guess config.guess
98+
endif
99+
-
100+
+ echo "usr/bin/qemu-system-${HOST_CPU} usr/bin/kvm" >> debian/pve-qemu-kvm.links
101+
# guest-agent is only required for guest systems
102+
./configure \
103+
--disable-download \
104+
@@ -43,14 +43,13 @@ endif
105+
--localstatedir=/var \
106+
--prefix=/usr \
107+
--sysconfdir=/etc \
108+
- --target-list=$(HOST_CPU)-softmmu,aarch64-softmmu \
109+
--with-suffix="kvm" \
110+
--with-pkgversion="${DEB_SOURCE}_${DEB_VERSION_UPSTREAM_REVISION}" \
111+
--audio-drv-list="alsa" \
112+
--datadir=/usr/share \
113+
--libexecdir=/usr/lib/kvm \
114+
--disable-capstone \
115+
- --disable-gtk \
116+
+ --enable-gtk \
117+
--disable-guest-agent \
118+
--disable-guest-agent-msi \
119+
--disable-libnfs \
120+
@@ -121,7 +120,7 @@ install: build
121+
122+
# CPU flags are static for QEMU version, allows avoiding more costly checks
123+
$(destdir)/usr/bin/qemu-system-x86_64 -cpu help | ./debian/parse-cpu-flags.pl > $(flagfile)
124+
- $(destdir)/usr/bin/qemu-system-x86_64 -machine help | ./debian/parse-machines.pl > $(machinefile)
125+
+ $(destdir)/usr/bin/qemu-system-aarch64 -machine help | ./debian/parse-machines.pl > $(machinefile)
126+
127+
# Build architecture-independent files here.
128+
binary-indep: build install

‎packages/pve-qemu/pve-qemu‎

Submodule pve-qemu added at 7446610

‎packages/pve-qemu/series‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
patches/001-add-pve-port-version.patch
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
diff --git a/Makefile b/Makefile
2+
index 82630da..8c47b77 100644
3+
--- a/Makefile
4+
+++ b/Makefile
5+
@@ -1,29 +1,31 @@
6+
include /usr/share/dpkg/default.mk
7+
# source form https://github.com/zfsonlinux/
8+
9+
+ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
10+
+
11+
PACKAGE = zfs-linux
12+
13+
SRCDIR = upstream
14+
BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
15+
ORIG_SRC_TAR = $(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz
16+
17+
-ZFS_DEB1= libnvpair3linux_$(DEB_VERSION)_amd64.deb
18+
+ZFS_DEB1= libnvpair3linux_$(DEB_VERSION)_$(ARCH).deb
19+
20+
ZFS_DEB_BINARY = \
21+
-libpam-zfs_$(DEB_VERSION)_amd64.deb \
22+
-libuutil3linux_$(DEB_VERSION)_amd64.deb \
23+
-libzfs4linux_$(DEB_VERSION)_amd64.deb \
24+
-libzfsbootenv1linux_$(DEB_VERSION)_amd64.deb \
25+
-libzpool5linux_$(DEB_VERSION)_amd64.deb \
26+
-zfs-test_$(DEB_VERSION)_amd64.deb \
27+
-zfsutils-linux_$(DEB_VERSION)_amd64.deb \
28+
-zfs-zed_$(DEB_VERSION)_amd64.deb
29+
+libpam-zfs_$(DEB_VERSION)_$(ARCH).deb \
30+
+libuutil3linux_$(DEB_VERSION)_$(ARCH).deb \
31+
+libzfs4linux_$(DEB_VERSION)_$(ARCH).deb \
32+
+libzfsbootenv1linux_$(DEB_VERSION)_$(ARCH).deb \
33+
+libzpool5linux_$(DEB_VERSION)_$(ARCH).deb \
34+
+zfs-test_$(DEB_VERSION)_$(ARCH).deb \
35+
+zfsutils-linux_$(DEB_VERSION)_$(ARCH).deb \
36+
+zfs-zed_$(DEB_VERSION)_$(ARCH).deb
37+
38+
-ZFS_DBG_DEBS = $(patsubst %_$(DEB_VERSION)_amd64.deb, %-dbgsym_$(DEB_VERSION)_amd64.deb, $(ZFS_DEB1) $(ZFS_DEB_BINARY))
39+
+ZFS_DBG_DEBS = $(patsubst %_$(DEB_VERSION)_$(ARCH).deb, %-dbgsym_$(DEB_VERSION)_$(ARCH).deb, $(ZFS_DEB1) $(ZFS_DEB_BINARY))
40+
41+
ZFS_DEB2= $(ZFS_DEB_BINARY) \
42+
-libzfslinux-dev_$(DEB_VERSION)_amd64.deb \
43+
-python3-pyzfs_$(DEB_VERSION)_amd64.deb \
44+
+libzfslinux-dev_$(DEB_VERSION)_$(ARCH).deb \
45+
+python3-pyzfs_$(DEB_VERSION)_$(ARCH).deb \
46+
pyzfs-doc_$(DEB_VERSION)_all.deb \
47+
spl_$(DEB_VERSION)_all.deb \
48+
zfs-initramfs_$(DEB_VERSION)_all.deb
49+
@@ -62,7 +64,12 @@ zfs: $(DEBS)
50+
$(ZFS_DEB2) $(ZFS_DBG_DEBS): $(ZFS_DEB1)
51+
$(ZFS_DEB1): $(BUILDDIR)
52+
cd $(BUILDDIR); dpkg-buildpackage -b -uc -us
53+
+ifeq ($(ARCH), loong64)
54+
+ echo "Architecture is loongarch64. Skipping lintian."
55+
+else
56+
lintian $(DEBS)
57+
+endif
58+
+
59+
60+
$(ORIG_SRC_TAR): $(BUILDDIR)
61+
tar czf $(ORIG_SRC_TAR) --exclude="$(BUILDDIR)/debian" $(BUILDDIR)

‎packages/zfsonlinux/series‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
patches/001-Update-makefile-for-all-architecture.patch

0 commit comments

Comments
 (0)