Skip to content

Commit 96af60a

Browse files
committed
Add v3.3.2:
- Add missing `proxmox-ve-rs` required by v3.3.2 - Move revert h2 patch to v3.3.2 - Fix `src/fs/dir.rs` for i8 err on arm64 - Limit `build_test.yaml` only to `master`
1 parent d53f785 commit 96af60a

21 files changed

+514
-1
lines changed

.github/workflows/build_test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
on:
22
push:
33
branches:
4-
- '*'
4+
- master
55
paths-ignore:
66
- '*.md'
77
- .github/workflows/*.yaml

versions/v3.3.2/Dockerfile

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
ARG ARCH=
2+
FROM ${ARCH}debian:bookworm AS toolchain
3+
4+
RUN apt-get -y update && \
5+
apt-get -y install \
6+
build-essential git-core \
7+
lintian pkg-config quilt patch cargo \
8+
nodejs node-colors node-commander \
9+
libudev-dev libapt-pkg-dev \
10+
libacl1-dev libpam0g-dev libfuse3-dev \
11+
libsystemd-dev uuid-dev libssl-dev \
12+
libclang-dev libjson-perl libcurl4-openssl-dev \
13+
dh-exec dh-nodejs wget
14+
15+
ENV RUSTUP_TOOLCHAIN=stable
16+
RUN wget https://static.rust-lang.org/rustup/rustup-init.sh && \
17+
chmod +x rustup-init.sh && \
18+
./rustup-init.sh -y --default-toolchain "$RUSTUP_TOOLCHAIN"
19+
20+
WORKDIR /src
21+
22+
RUN for tool in /root/.cargo/bin/*; do ln -vsf $tool /usr/bin/; done
23+
RUN /usr/bin/rustc --version
24+
RUN git config --global user.email "[email protected]" && \
25+
git config --global user.name "Docker Compile"
26+
27+
FROM toolchain as builder
28+
29+
# Clone all sources
30+
ARG VERSION=master
31+
ADD /versions/${VERSION}/ /patches/
32+
RUN /patches/clone.bash
33+
34+
# Apply all patches
35+
ADD /scripts/ /scripts/
36+
RUN /scripts/apply-patches.bash /patches/server/*.patch
37+
RUN /scripts/strip-cargo.bash
38+
RUN /scripts/resolve-dependencies.bash
39+
40+
# A first required dep
41+
RUN apt-get -y build-dep $PWD/pve-eslint
42+
RUN cd pve-eslint/ && make dinstall
43+
44+
# A proxmox-perl-rs required deps
45+
RUN apt-get -y build-dep $PWD/perlmod/perlmod $PWD/perlmod/perlmod-bin $PWD/perlmod/perlmod-macro
46+
RUN cd perlmod/perlmod-bin && dpkg-buildpackage -us -uc -b && dpkg -i ../perlmod-bin*.deb
47+
48+
# A pve-common required deps
49+
RUN apt-get -y build-dep $PWD/proxmox-perl-rs/pve-rs
50+
RUN cd proxmox-perl-rs/pve-rs && make dinstall
51+
RUN cd proxmox-perl-rs/common/pkg && make deb && dpkg -i *.deb
52+
RUN apt-get -y build-dep $PWD/pve-common
53+
RUN cd pve-common/ && ( make dinstall || apt-get -f -y install && make dinstall )
54+
55+
# Install dev dependencies of widget toolkit
56+
RUN apt-get -y build-dep $PWD/proxmox-widget-toolkit
57+
RUN cd proxmox-widget-toolkit/ && make deb && dpkg -i proxmox-widget-toolkit-dev*.deb
58+
59+
# Deps for all rest
60+
RUN apt-get -y build-dep $PWD/proxmox-acme
61+
RUN apt-get -y build-dep $PWD/proxmox-backup
62+
RUN apt-get -y build-dep $PWD/proxmox-mini-journalreader
63+
RUN apt-get -y build-dep $PWD/extjs
64+
RUN apt-get -y build-dep $PWD/proxmox-i18n
65+
RUN apt-get -y build-dep $PWD/pve-xtermjs/termproxy
66+
RUN apt-get -y build-dep $PWD/pve-xtermjs/xterm.js
67+
RUN apt-get -y build-dep $PWD/libjs-qrcodejs
68+
69+
# Compile ALL
70+
RUN cd proxmox-backup/ && make deb
71+
RUN cd extjs/ && make deb
72+
RUN cd proxmox-i18n/ && make deb
73+
RUN cd pve-xtermjs/termproxy/ && make deb
74+
RUN cd pve-xtermjs/xterm.js/ && make deb
75+
RUN cd proxmox-mini-journalreader/ && make deb
76+
RUN cd libjs-qrcodejs/ && make deb
77+
RUN cd proxmox-acme/ && make deb
78+
79+
# Copy all debian packages
80+
RUN mkdir -p /deb && \
81+
find /src/ -name '*.deb' -exec cp -av {} /deb/ \;
82+
83+
#=================================
84+
85+
FROM ${ARCH}debian:bookworm
86+
COPY --from=builder /deb/ /deb/
87+
88+
# Install all packages
89+
RUN export DEBIAN_FRONTEND=noninteractive && \
90+
apt-get -y update && \
91+
apt install -y runit ssmtp /deb/*.deb
92+
93+
# Add default configs
94+
ADD /pbs/ /etc/proxmox-backup-default/
95+
96+
VOLUME /etc/proxmox-backup
97+
VOLUME /var/log/proxmox-backup
98+
VOLUME /var/lib/proxmox-backup
99+
100+
ADD runit/ /runit/
101+
CMD ["runsvdir", "/runit"]

versions/v3.3.2/Dockerfile.client

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
ARG DOCKER_ARCH
2+
FROM ${DOCKER_ARCH}/debian:bookworm AS builder
3+
4+
RUN apt-get -y update && \
5+
apt-get -y install \
6+
build-essential git-core \
7+
lintian pkg-config quilt patch cargo \
8+
nodejs node-colors node-commander \
9+
libudev-dev libapt-pkg-dev \
10+
libacl1-dev libpam0g-dev libfuse3-dev \
11+
libsystemd-dev uuid-dev libssl-dev \
12+
libclang-dev libjson-perl libcurl4-openssl-dev \
13+
dh-exec wget
14+
15+
WORKDIR /src
16+
17+
RUN /usr/bin/rustc --version
18+
RUN git config --global user.email "[email protected]" && \
19+
git config --global user.name "Docker Compile"
20+
21+
# Clone all sources
22+
ARG VERSION=master
23+
ADD /versions/${VERSION}/ /patches/
24+
RUN /patches/clone.bash
25+
26+
# Install valid rust toolchain
27+
ARG DOCKER_ARCH
28+
RUN \
29+
if [ "${DOCKER_ARCH}" != "arm32v7" ]; then \
30+
wget https://static.rust-lang.org/rustup/rustup-init.sh && \
31+
chmod +x rustup-init.sh && \
32+
./rustup-init.sh -y --default-toolchain nightly && \
33+
for tool in /root/.cargo/bin/*; do ln -vsf $tool /usr/bin/; done; \
34+
fi
35+
36+
# Apply all patches
37+
ADD /scripts/ /scripts/
38+
RUN /scripts/apply-patches.bash /patches/server/*.patch /patches/client/*.patch /patches/client-${DOCKER_ARCH}/*.patch
39+
RUN /scripts/strip-cargo.bash
40+
RUN /scripts/experimental-cargo.bash
41+
RUN /scripts/resolve-dependencies.bash
42+
43+
# Build
44+
RUN \
45+
. /root/.cargo/env; \
46+
cargo build --manifest-path proxmox-backup/proxmox-backup-client/Cargo.toml --release && \
47+
cargo build --manifest-path proxmox-backup/pxar-bin/Cargo.toml --release
48+
49+
# Bundle client
50+
RUN /scripts/bundle-client.bash

versions/v3.3.2/clone.bash

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/bin/bash
2+
3+
set -eo pipefail
4+
5+
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
6+
7+
if [[ "$1" == "show-sha" ]]; then
8+
VERSION="${2:-master}"
9+
VERSION_DATE=""
10+
11+
tmp_dir=$(mktemp -d -t ci-XXXXXXXXXX)
12+
cd "$tmp_dir/"
13+
trap 'cd ; rm -rf $tmp_dir' EXIT
14+
15+
perform() {
16+
git clone "git://git.proxmox.com/git/$1.git" 2>/dev/null
17+
if [[ -z "$VERSION_TIMESTAMP" ]]; then
18+
REVISION=$(git -C "$1" rev-parse "$VERSION")
19+
VERSION_TIMESTAMP=$(git -C "$1" log -1 --format=%ct "$VERSION")
20+
else
21+
while read TIMESTAMP REVISION; do
22+
if [[ $TIMESTAMP -le $VERSION_TIMESTAMP ]]; then
23+
break
24+
fi
25+
done < <(git -C "$1" log --format="%ct %H")
26+
fi
27+
28+
CHANGE_TIME=$(git -C "$1" log -1 --format="%cd" $REVISION)
29+
30+
echo "$1 $REVISION # $CHANGE_TIME"
31+
}
32+
else
33+
if [[ -n "$1" ]]; then
34+
cd "$1"
35+
fi
36+
37+
perform() {
38+
if [[ ! -d "$1" ]]; then
39+
git clone "git://git.proxmox.com/git/$1.git"
40+
else
41+
git -C "$1" fetch
42+
fi
43+
git -C "$1" checkout "$2" -f
44+
git -C "$1" clean -fdx
45+
}
46+
fi
47+
48+
if [[ ! -e "$SCRIPT_DIR/versions" ]]; then
49+
echo "Missing 'versions' file."
50+
exit 1
51+
fi
52+
53+
while read REPO COMMIT_SHA REST; do
54+
echo "$REPO $COMMIT_SHA..." 1>&2
55+
perform "$REPO" "$COMMIT_SHA"
56+
done < "$SCRIPT_DIR/versions"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
diff --git a/Makefile b/Makefile
2+
index dfbaacab..d233d4e2 100644
3+
--- a/Makefile
4+
+++ b/Makefile
5+
@@ -42,6 +42,7 @@ COMPILEDIR := target/$(DEB_HOST_RUST_TYPE)/release
6+
else
7+
COMPILEDIR := target/$(DEB_HOST_RUST_TYPE)/debug
8+
endif
9+
+CARGO_BUILD_ARGS += --target-dir target/$(DEB_HOST_RUST_TYPE)
10+
11+
ifeq ($(valgrind), yes)
12+
CARGO_BUILD_ARGS += --features valgrind
13+
diff --git a/debian/rules b/debian/rules
14+
index a03fe11b..f3f6c1b4 100755
15+
--- a/debian/rules
16+
+++ b/debian/rules
17+
@@ -8,7 +8,7 @@ include /usr/share/rustc/architecture.mk
18+
19+
export BUILD_MODE=release
20+
21+
-export CARGO=/usr/share/cargo/bin/cargo
22+
+export CARGO=/usr/bin/cargo
23+
24+
export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
25+
export DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/www/panel/NodeInfo.js b/www/panel/NodeInfo.js
2+
index 9d741e45..5196f64b 100644
3+
--- a/www/panel/NodeInfo.js
4+
+++ b/www/panel/NodeInfo.js
5+
@@ -150,7 +150,7 @@ Ext.define('PBS.NodeInfoPanel', {
6+
return data.kversion;
7+
}
8+
let kernel = data['current-kernel'];
9+
- let buildDate = kernel.version.match(/\((.+)\)\s*$/)?.[1] ?? 'unknown';
10+
+ let buildDate = kernel.version;
11+
return `${kernel.sysname} ${kernel.release} (${buildDate})`;
12+
},
13+
value: '',
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
diff --git a/www/NavigationTree.js b/www/NavigationTree.js
2+
index f10b0cd6..67ea1141 100644
3+
--- a/www/NavigationTree.js
4+
+++ b/www/NavigationTree.js
5+
@@ -89,12 +89,6 @@ Ext.define('PBS.store.NavigationStore', {
6+
expanded: true,
7+
leaf: false,
8+
children: [
9+
- {
10+
- text: gettext('Shell'),
11+
- iconCls: 'fa fa-terminal',
12+
- path: 'pbsXtermJsConsole',
13+
- leaf: true,
14+
- },
15+
{
16+
text: gettext('Storage / Disks'),
17+
iconCls: 'fa fa-hdd-o',
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
diff --git a/debian/proxmox-backup-file-restore.install b/debian/proxmox-backup-file-restore.install
2+
old mode 100644
3+
new mode 100755
4+
index 409988a3..8b4034bd
5+
--- a/debian/proxmox-backup-file-restore.install
6+
+++ b/debian/proxmox-backup-file-restore.install
7+
@@ -1,4 +1,5 @@
8+
+#! /usr/bin/dh-exec
9+
usr/bin/proxmox-file-restore
10+
-usr/lib/x86_64-linux-gnu/proxmox-backup/file-restore/proxmox-restore-daemon
11+
+usr/lib/${DEB_HOST_MULTIARCH}/proxmox-backup/file-restore/proxmox-restore-daemon
12+
usr/share/man/man1/proxmox-file-restore.1
13+
usr/share/zsh/vendor-completions/_proxmox-file-restore
14+
diff --git a/debian/proxmox-backup-server.install b/debian/proxmox-backup-server.install
15+
old mode 100644
16+
new mode 100755
17+
index ff581e3d..6bcd1f0b
18+
--- a/debian/proxmox-backup-server.install
19+
+++ b/debian/proxmox-backup-server.install
20+
@@ -1,3 +1,4 @@
21+
+#! /usr/bin/dh-exec
22+
etc/pbs-enterprise.list /etc/apt/sources.list.d/
23+
etc/proxmox-backup-banner.service /lib/systemd/system/
24+
etc/proxmox-backup-daily-update.service /lib/systemd/system/
25+
@@ -8,11 +9,11 @@ etc/[email protected] /lib/systemd/system/
26+
usr/bin/pmt
27+
usr/bin/pmtx
28+
usr/bin/proxmox-tape
29+
-usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-backup-api
30+
-usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-backup-banner
31+
-usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-backup-proxy
32+
-usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-daily-update
33+
-usr/lib/x86_64-linux-gnu/proxmox-backup/sg-tape-cmd
34+
+usr/lib/${DEB_HOST_MULTIARCH}/proxmox-backup/proxmox-backup-api
35+
+usr/lib/${DEB_HOST_MULTIARCH}/proxmox-backup/proxmox-backup-banner
36+
+usr/lib/${DEB_HOST_MULTIARCH}/proxmox-backup/proxmox-backup-proxy
37+
+usr/lib/${DEB_HOST_MULTIARCH}/proxmox-backup/proxmox-daily-update
38+
+usr/lib/${DEB_HOST_MULTIARCH}/proxmox-backup/sg-tape-cmd
39+
usr/sbin/pbs2to3
40+
usr/sbin/proxmox-backup-debug
41+
usr/sbin/proxmox-backup-manager
42+
diff --git a/debian/rules b/debian/rules
43+
index f3f6c1b4..93e98206 100755
44+
--- a/debian/rules
45+
+++ b/debian/rules
46+
@@ -2,6 +2,7 @@
47+
# See debhelper(7) (uncomment to enable)
48+
# output every command that modifies files on the build system.
49+
DH_VERBOSE = 1
50+
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
51+
52+
include /usr/share/dpkg/pkg-info.mk
53+
include /usr/share/rustc/architecture.mk
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/debian/rules b/debian/rules
2+
index 93e98206..f438901e 100755
3+
--- a/debian/rules
4+
+++ b/debian/rules
5+
@@ -28,7 +28,7 @@ endif
6+
override_dh_auto_configure:
7+
@perl -ne 'if (/^version\s*=\s*"(\d+(?:\.\d+)+)"/) { my $$v_cargo = $$1; my $$v_deb = "$(DEB_VERSION_UPSTREAM)"; \
8+
die "ERROR: d/changelog <-> Cargo.toml version mismatch: $$v_cargo != $$v_deb\n" if $$v_cargo ne $$v_deb; exit(0); }' Cargo.toml
9+
- $(CARGO) prepare-debian $(CURDIR)/debian/cargo_registry --link-from-system
10+
+ #$(CARGO) prepare-debian --help $(CURDIR)/debian/cargo_registry --link-from-system
11+
# `cargo build` and `cargo install` have different config precedence, symlink
12+
# the wrapper config into a place where `build` picks it up as well..
13+
# https://doc.rust-lang.org/cargo/commands/cargo-install.html#configuration-discovery
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/Cargo.toml b/Cargo.toml
2+
index 9354fb17..e638f5cf 100644
3+
--- a/Cargo.toml
4+
+++ b/Cargo.toml
5+
@@ -125,7 +125,7 @@ env_logger = "0.10"
6+
flate2 = "1.0"
7+
foreign-types = "0.3"
8+
futures = "0.3"
9+
-h2 = { version = "0.4", features = [ "stream" ] }
10+
+h2 = { version = "0.3", features = [ "stream" ] }
11+
handlebars = "3.0"
12+
hex = "0.4.3"
13+
http = "0.2"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/src/Makefile b/src/Makefile
2+
index 449004f..eeee305 100644
3+
--- a/src/Makefile
4+
+++ b/src/Makefile
5+
@@ -5,7 +5,7 @@ BIN_DIR ?= $(DESTDIR)/usr/bin
6+
MAN1_DIR ?= $(DESTDIR)/usr/share/man/man1
7+
8+
LIBS := libsystemd
9+
-CFLAGS += -Werror -Wall -Wextra -Wl,-z,relro -g -O2 --std=gnu11
10+
+CFLAGS += -Wall -Wextra -Wl,-z,relro -g -O2 --std=gnu11
11+
CFLAGS += -fstack-protector-strong -D_FORTIFY_SOURCE=2
12+
CFLAGS += $(shell pkg-config --cflags $(LIBS))
13+
LDFLAGS += $(shell pkg-config --libs $(LIBS))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
diff --git a/pve-rs/debian/rules b/pve-rs/debian/rules
2+
index bddb889..4e15f38 100755
3+
--- a/pve-rs/debian/rules
4+
+++ b/pve-rs/debian/rules
5+
@@ -21,5 +21,5 @@ export DEB_CARGO_PACKAGE=pve-rs
6+
override_dh_auto_configure:
7+
@perl -ne 'if (/^version\s*=\s*"(\d+(?:\.\d+)+)"/) { my $$v_cargo = $$1; my $$v_deb = "$(DEB_VERSION_UPSTREAM)"; \
8+
die "ERROR: d/changelog <-> Cargo.toml version mismatch: $$v_cargo != $$v_deb\n" if $$v_cargo ne $$v_deb; exit(0); }' Cargo.toml
9+
- $(CARGO) prepare-debian $(CURDIR)/debian/cargo_registry --link-from-system
10+
+ #$(CARGO) prepare-debian $(CURDIR)/debian/cargo_registry --link-from-system
11+
dh_auto_configure

0 commit comments

Comments
 (0)