Skip to content

Commit 7da8692

Browse files
committed
Add v3.0.2
1 parent d203cd9 commit 7da8692

14 files changed

+427
-7
lines changed

scripts/strip-cargo.bash

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@ set -eo pipefail
55
for package in *; do
66
[[ ! -d "$package" ]] && continue
77

8-
if [[ -f "$package/.cargo/config" ]]; then
9-
git -C "$package" rm "$(realpath "$package/.cargo/config")" || rm -f ""$package/.cargo/config""
10-
fi
8+
while read cargo_config; do
9+
echo -n > "$cargo_config"
10+
git -C "$package" add "$(realpath "$cargo_config")"
11+
done < <(find "$package" -wholename '*/.cargo/config')
12+
13+
while read cargo_config; do
14+
echo -n > "$cargo_config"
15+
git -C "$package" add "$(realpath "$cargo_config")"
16+
done < <(find "$package" -wholename '*/debian/cargo_home/config')
1117

1218
while read debian_control; do
1319
echo "Stripping '$debian_control'..."
@@ -26,10 +32,6 @@ for package in *; do
2632
git -C "$package" add "$(realpath "$debian_control")" || true
2733
done < <(find "$package" -wholename '*/debian/control')
2834

29-
while read cargo_config; do
30-
git -C "$package" rm -f "$(realpath "$cargo_config")" || rm -f "$cargo_config"
31-
done < <(find "$package" -wholename '*/debian/cargo_home/config')
32-
3335
if ! git -C "$package" diff --cached --exit-code --quiet; then
3436
git -C "$package" diff --cached | cat
3537
git -C "$package" commit -m "strip-cargo.bash"

versions/v3.0.2/Dockerfile

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

versions/v3.0.2/Dockerfile.client

Lines changed: 50 additions & 0 deletions
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.0.2/clone.bash

Lines changed: 56 additions & 0 deletions
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"
Lines changed: 17 additions & 0 deletions
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 576d05ab..7ba9955a 100644
3+
--- a/www/NavigationTree.js
4+
+++ b/www/NavigationTree.js
5+
@@ -77,12 +77,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',
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
commit 1b425b8fd31147524f81c549ccbf0318a75f1c9e
2+
Author: Kamil Trzciński <[email protected]>
3+
Date: Sat May 1 14:40:06 2021 +0200
4+
5+
Support local compile
6+
7+
diff --git a/debian/proxmox-backup-file-restore.install b/debian/proxmox-backup-file-restore.install
8+
old mode 100644
9+
new mode 100755
10+
index d952836e..e6888c5f
11+
--- a/debian/proxmox-backup-file-restore.install
12+
+++ b/debian/proxmox-backup-file-restore.install
13+
@@ -1,4 +1,5 @@
14+
+#! /usr/bin/dh-exec
15+
usr/bin/proxmox-file-restore
16+
-usr/lib/x86_64-linux-gnu/proxmox-backup/file-restore/proxmox-restore-daemon
17+
+usr/lib/${DEB_HOST_MULTIARCH}/proxmox-backup/file-restore/proxmox-restore-daemon
18+
usr/share/man/man1/proxmox-file-restore.1
19+
usr/share/zsh/vendor-completions/_proxmox-file-restore
20+
diff --git a/debian/proxmox-backup-server.install b/debian/proxmox-backup-server.install
21+
old mode 100644
22+
new mode 100755
23+
index cebf84a3..fa96f93e
24+
--- a/debian/proxmox-backup-server.install
25+
+++ b/debian/proxmox-backup-server.install
26+
@@ -1,17 +1,18 @@
27+
+#! /usr/bin/dh-exec
28+
etc/pbs-enterprise.list /etc/apt/sources.list.d/
29+
etc/proxmox-backup-banner.service /lib/systemd/system/
30+
etc/proxmox-backup-daily-update.service /lib/systemd/system/
31+
etc/proxmox-backup-daily-update.timer /lib/systemd/system/
32+
etc/proxmox-backup-proxy.service /lib/systemd/system/
33+
etc/proxmox-backup.service /lib/systemd/system/
34+
usr/bin/pmt
35+
usr/bin/pmtx
36+
usr/bin/proxmox-tape
37+
-usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-backup-api
38+
-usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-backup-banner
39+
-usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-backup-proxy
40+
-usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-daily-update
41+
-usr/lib/x86_64-linux-gnu/proxmox-backup/sg-tape-cmd
42+
+usr/lib/${DEB_HOST_MULTIARCH}/proxmox-backup/proxmox-backup-api
43+
+usr/lib/${DEB_HOST_MULTIARCH}/proxmox-backup/proxmox-backup-banner
44+
+usr/lib/${DEB_HOST_MULTIARCH}/proxmox-backup/proxmox-backup-proxy
45+
+usr/lib/${DEB_HOST_MULTIARCH}/proxmox-backup/proxmox-daily-update
46+
+usr/lib/${DEB_HOST_MULTIARCH}/proxmox-backup/sg-tape-cmd
47+
usr/sbin/pbs2to3
48+
usr/sbin/proxmox-backup-debug
49+
usr/sbin/proxmox-backup-manager
50+
diff --git a/debian/rules b/debian/rules
51+
index 4fc6de8f..fcbf7e93 100755
52+
--- a/debian/rules
53+
+++ b/debian/rules
54+
@@ -2,6 +2,7 @@
55+
# See debhelper(7) (uncomment to enable)
56+
# output every command that modifies files on the build system.
57+
DH_VERBOSE = 1
58+
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
59+
60+
include /usr/share/dpkg/pkg-info.mk
61+
include /usr/share/rustc/architecture.mk
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
commit 1b425b8fd31147524f81c549ccbf0318a75f1c9e
2+
Author: Kamil Trzciński <[email protected]>
3+
Date: Sat May 1 14:40:06 2021 +0200
4+
5+
Support local compile
6+
7+
diff --git a/debian/rules b/debian/rules
8+
index 4fc6de8f..fcbf7e93 100755
9+
--- a/debian/rules
10+
+++ b/debian/rules
11+
@@ -21,7 +22,7 @@ export DEB_CARGO_PACKAGE=proxmox-backup
12+
override_dh_auto_configure:
13+
@perl -ne 'if (/^version\s*=\s*"(\d+(?:\.\d+)+)"/) { my $$v_cargo = $$1; my $$v_deb = "$(DEB_VERSION_UPSTREAM)"; \
14+
die "ERROR: d/changelog <-> Cargo.toml version mismatch: $$v_cargo != $$v_deb\n" if $$v_cargo ne $$v_deb; exit(0); }' Cargo.toml
15+
- $(CARGO) prepare-debian $(CURDIR)/debian/cargo_registry --link-from-system
16+
+ #$(CARGO) prepare-debian --help $(CURDIR)/debian/cargo_registry --link-from-system
17+
dh_auto_configure
18+
19+
override_dh_auto_build:
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/src/Makefile b/src/Makefile
2+
index ea8af24..d7f1351 100644
3+
--- a/src/Makefile
4+
+++ b/src/Makefile
5+
@@ -2,7 +2,7 @@ PROGRAM=mini-journalreader
6+
SOURCES=mini-journalreader.c
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+
LFLAGS += $(shell pkg-config --libs ${LIBS})
Lines changed: 11 additions & 0 deletions
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
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
diff --git a/proxmox-router/src/cli/command.rs b/proxmox-router/src/cli/command.rs
2+
index 906ec0c..2a396e2 100644
3+
--- a/proxmox-router/src/cli/command.rs
4+
+++ b/proxmox-router/src/cli/command.rs
5+
@@ -2,6 +2,7 @@ use anyhow::*;
6+
use serde_json::Value;
7+
use std::cell::RefCell;
8+
use std::sync::Arc;
9+
+use std::result::Result::Ok;
10+
11+
use proxmox_schema::*;
12+
use proxmox_schema::format::DocumentationFormat;
13+
diff --git a/proxmox-sys/src/linux/procfs/mod.rs b/proxmox-sys/src/linux/procfs/mod.rs
14+
index 5784e0e..e503b5f 100644
15+
--- a/proxmox-sys/src/linux/procfs/mod.rs
16+
+++ b/proxmox-sys/src/linux/procfs/mod.rs
17+
@@ -1,3 +1,4 @@
18+
+use std::result::Result::Ok;
19+
use std::collections::HashSet;
20+
use std::convert::TryFrom;
21+
use std::fmt;
22+
diff --git a/proxmox/src/sys/linux/tty.rs b/proxmox-sys/src/sys/linux/tty.rs
23+
index 0b4a3c1..e7a7847 100644
24+
--- a/proxmox-sys/src/linux/tty.rs
25+
+++ b/proxmox-sys/src/linux/tty.rs
26+
@@ -1,3 +1,4 @@
27+
+use std::result::Result::Ok;
28+
use std::io::{self, Read, Write};
29+
use std::mem::MaybeUninit;
30+
use std::os::unix::io::AsRawFd;

0 commit comments

Comments
 (0)