Skip to content

Commit b70700e

Browse files
committed
update proxmox-backup-3.2.8-1
Signed-off-by: Wolfgang <github@linux-dude.de>
1 parent 21fa632 commit b70700e

5 files changed

+97
-148
lines changed

build.sh

+8-3
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,9 @@ EOF
274274

275275
cd "${SOURCES}"
276276

277-
PROXMOX_BACKUP_VER="3.2.7-1"
278-
PROXMOX_BACKUP_GIT="cb3d41e838dec0e1002aaf5ee4c0e6cd28284c74"
279-
PROXMOX_GIT="0652d81977a3a35a6f1b046faf0768246a71a8bf"
277+
PROXMOX_BACKUP_VER="3.2.8-1"
278+
PROXMOX_BACKUP_GIT="6c44f3e584ceefdb24dd7ae016965542229200f2"
279+
PROXMOX_GIT="1b70270b2d5ca6ee38c8ea8610135b74cd786d30"
280280
PATHPATTERNS_GIT="281894a5b66099e919d167cd5f0644fff6aca234" # 0.3.0-1
281281
PXAR_GIT="ebe402c01c736eb6b822d984cda48538c0b7bf87" # 0.12.0-1
282282
PROMXOX_FUSE_GIT="8d57fb64f044ea3dcfdef77ed5f1888efdab0708" # 0.1.4
@@ -298,6 +298,11 @@ if [ ! -e "${PACKAGES}/proxmox-backup-${BUILD_PACKAGE}_${PROXMOX_BACKUP_VER}_${P
298298
sed -i '/dh-cargo\|cargo:native\|rustc:native\|librust-/d' proxmox-backup/debian/control
299299
sed -i 's/\(patchelf\|xindy\)\b/\1:native/' proxmox-backup/debian/control
300300
sed -i 's/\(latexmk\|proxmox-widget-toolkit-dev\|pve-eslint\|python3-sphinx\)/\1:all/' proxmox-backup/debian/control
301+
sed -i '/patch.crates-io/,/pxar/s/^#//' proxmox-backup/Cargo.toml
302+
# Add missing proxmox-shared-cache in 3.2.8-1
303+
sed -i '/^proxmox-shared-memory.*path/aproxmox-shared-cache = { path = "../proxmox/proxmox-shared-cache" }' proxmox-backup/Cargo.toml
304+
# fix compile error due different http versions
305+
sed -i 's#^h2 = { version = "0.4"#h2 = { version = "0.3"#' proxmox-backup/Cargo.toml
301306
patch -p1 -d proxmox-backup/ < "${PATCHES}/proxmox-backup-build.patch"
302307
if [ "${BUILD_PACKAGE}" = "client" ]; then
303308
patch -p1 -d proxmox-backup/ < "${PATCHES}/proxmox-backup-client.patch"

patches/proxmox-arm64.patch

+12-21
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,13 @@
1-
diff --git a/proxmox-sys/src/crypt.rs b/proxmox-sys/src/crypt.rs
2-
index 3313f668..c254e761 100644
3-
--- a/proxmox-sys/src/crypt.rs
4-
+++ b/proxmox-sys/src/crypt.rs
5-
@@ -71,7 +71,7 @@ pub fn crypt(password: &[u8], salt: &[u8]) -> Result<String, Error> {
6-
// > output field of their data argument, and crypt writes an invalid hash to its static
7-
// > storage area. This string will be shorter than 13 characters, will begin with a ‘*’,
8-
// > and will not compare equal to setting.
9-
- if data.output.first().is_none() || Some(&('*' as i8)) == data.output.first() {
10-
+ if data.output.first().is_none() || Some(&('*' as u8)) == data.output.first() {
11-
bail!("internal error: crypt_r returned invalid hash");
12-
}
13-
CStr::from_ptr(&data.output as *const _)
14-
@@ -133,7 +133,7 @@ pub fn crypt_gensalt(prefix: &str, count: u64, rbytes: &[u8]) -> Result<String,
15-
// while it states that this is "in addition" to returning a null pointer, this isn't how
16-
// `crypt_r` seems to behave (sometimes only setting an invalid hash) so add this here too just
17-
// in case.
18-
- if output.first().is_none() || Some(&('*' as i8)) == output.first() {
19-
+ if output.first().is_none() || Some(&('*' as u8)) == output.first() {
20-
bail!("internal error: crypt_gensalt_rn could not create a valid salt");
21-
}
1+
diff --git a/proxmox-sys/src/fs/dir.rs b/proxmox-sys/src/fs/dir.rs
2+
index c903ab87..0e8611bc 100644
3+
--- a/proxmox-sys/src/fs/dir.rs
4+
+++ b/proxmox-sys/src/fs/dir.rs
5+
@@ -208,7 +208,7 @@ pub fn make_tmp_dir<P: AsRef<Path>>(
6+
// Push NULL byte so that we have a proper NULL-terminated string
7+
template.push(0);
228

9+
- let returned_buffer = unsafe { libc::mkdtemp(template.as_mut_ptr() as *mut i8) };
10+
+ let returned_buffer = unsafe { libc::mkdtemp(template.as_mut_ptr() as *mut u8) };
11+
12+
// Check errno immediately, so that nothing else can overwrite it.
13+
let err = std::io::Error::last_os_error();

patches/proxmox-backup-build.patch

+7-74
Original file line numberDiff line numberDiff line change
@@ -27,80 +27,8 @@ index a439c97b..a95ae483 100644
2727

2828
[profile.release]
2929
debug=true
30-
diff --git a/Cargo.toml b/Cargo.toml
31-
index 7013a468..632f3b80 100644
32-
--- a/Cargo.toml
33-
+++ b/Cargo.toml
34-
@@ -247,37 +247,37 @@ proxmox-rrd.workspace = true
35-
# NOTE: You must run `cargo update` after changing this for it to take effect!
36-
[patch.crates-io]
37-
38-
-#proxmox-apt = { path = "../proxmox/proxmox-apt" }
39-
-#proxmox-async = { path = "../proxmox/proxmox-async" }
40-
-#proxmox-auth-api = { path = "../proxmox/proxmox-auth-api" }
41-
-#proxmox-borrow = { path = "../proxmox/proxmox-borrow" }
42-
-#proxmox-compression = { path = "../proxmox/proxmox-compression" }
43-
-#proxmox-fuse = { path = "../proxmox-fuse" }
44-
-#proxmox-http = { path = "../proxmox/proxmox-http" }
45-
-#proxmox-human-byte = { path = "../proxmox/proxmox-human-byte" }
46-
-#proxmox-io = { path = "../proxmox/proxmox-io" }
47-
-#proxmox-lang = { path = "../proxmox/proxmox-lang" }
48-
-#proxmox-ldap = { path = "../proxmox/proxmox-ldap" }
49-
-#proxmox-metrics = { path = "../proxmox/proxmox-metrics" }
50-
-#proxmox-notify = { path = "../proxmox/proxmox-notify" }
51-
-#proxmox-openid = { path = "../proxmox/proxmox-openid" }
52-
-#proxmox-rest-server = { path = "../proxmox/proxmox-rest-server" }
53-
-#proxmox-router = { path = "../proxmox/proxmox-router" }
54-
-#proxmox-rrd = { path = "../proxmox/proxmox-rrd" }
55-
-#proxmox-schema = { path = "../proxmox/proxmox-schema" }
56-
-#proxmox-section-config = { path = "../proxmox/proxmox-section-config" }
57-
-#proxmox-serde = { path = "../proxmox/proxmox-serde" }
58-
-#proxmox-shared-memory = { path = "../proxmox/proxmox-shared-memory" }
59-
-#proxmox-sortable-macro = { path = "../proxmox/proxmox-sortable-macro" }
60-
-#proxmox-subscription = { path = "../proxmox/proxmox-subscription" }
61-
-#proxmox-sys = { path = "../proxmox/proxmox-sys" }
62-
-#proxmox-tfa = { path = "../proxmox/proxmox-tfa" }
63-
-#proxmox-time = { path = "../proxmox/proxmox-time" }
64-
-#proxmox-uuid = { path = "../proxmox/proxmox-uuid" }
65-
+proxmox-apt = { path = "../proxmox/proxmox-apt" }
66-
+proxmox-async = { path = "../proxmox/proxmox-async" }
67-
+proxmox-auth-api = { path = "../proxmox/proxmox-auth-api" }
68-
+proxmox-borrow = { path = "../proxmox/proxmox-borrow" }
69-
+proxmox-compression = { path = "../proxmox/proxmox-compression" }
70-
+proxmox-fuse = { path = "../proxmox-fuse" }
71-
+proxmox-http = { path = "../proxmox/proxmox-http" }
72-
+proxmox-human-byte = { path = "../proxmox/proxmox-human-byte" }
73-
+proxmox-io = { path = "../proxmox/proxmox-io" }
74-
+proxmox-lang = { path = "../proxmox/proxmox-lang" }
75-
+proxmox-ldap = { path = "../proxmox/proxmox-ldap" }
76-
+proxmox-metrics = { path = "../proxmox/proxmox-metrics" }
77-
+proxmox-notify = { path = "../proxmox/proxmox-notify" }
78-
+proxmox-openid = { path = "../proxmox/proxmox-openid" }
79-
+proxmox-rest-server = { path = "../proxmox/proxmox-rest-server" }
80-
+proxmox-router = { path = "../proxmox/proxmox-router" }
81-
+proxmox-rrd = { path = "../proxmox/proxmox-rrd" }
82-
+proxmox-schema = { path = "../proxmox/proxmox-schema" }
83-
+proxmox-section-config = { path = "../proxmox/proxmox-section-config" }
84-
+proxmox-serde = { path = "../proxmox/proxmox-serde" }
85-
+proxmox-shared-memory = { path = "../proxmox/proxmox-shared-memory" }
86-
+proxmox-sortable-macro = { path = "../proxmox/proxmox-sortable-macro" }
87-
+proxmox-subscription = { path = "../proxmox/proxmox-subscription" }
88-
+proxmox-sys = { path = "../proxmox/proxmox-sys" }
89-
+proxmox-tfa = { path = "../proxmox/proxmox-tfa" }
90-
+proxmox-time = { path = "../proxmox/proxmox-time" }
91-
+proxmox-uuid = { path = "../proxmox/proxmox-uuid" }
92-
93-
-#proxmox-acme = { path = "../proxmox/proxmox-acme" }
94-
-#pathpatterns = {path = "../pathpatterns" }
95-
-#pxar = { path = "../pxar" }
96-
+proxmox-acme = { path = "../proxmox/proxmox-acme" }
97-
+pathpatterns = {path = "../pathpatterns" }
98-
+pxar = { path = "../pxar" }
99-
100-
[features]
101-
default = []
10230
diff --git a/debian/rules b/debian/rules
103-
index a82c3e12..79c1ad76 100755
31+
index a03fe11b..79c1ad76 100755
10432
--- a/debian/rules
10533
+++ b/debian/rules
10634
@@ -4,12 +4,9 @@
@@ -116,11 +44,16 @@ index a82c3e12..79c1ad76 100755
11644
export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
11745
export DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE
11846
export CARGO_HOME = $(CURDIR)/debian/cargo_home
119-
@@ -27,7 +24,6 @@ endif
47+
@@ -27,12 +24,6 @@ endif
12048
override_dh_auto_configure:
12149
@perl -ne 'if (/^version\s*=\s*"(\d+(?:\.\d+)+)"/) { my $$v_cargo = $$1; my $$v_deb = "$(DEB_VERSION_UPSTREAM)"; \
12250
die "ERROR: d/changelog <-> Cargo.toml version mismatch: $$v_cargo != $$v_deb\n" if $$v_cargo ne $$v_deb; exit(0); }' Cargo.toml
12351
- $(CARGO) prepare-debian $(CURDIR)/debian/cargo_registry --link-from-system
52+
- # `cargo build` and `cargo install` have different config precedence, symlink
53+
- # the wrapper config into a place where `build` picks it up as well..
54+
- # https://doc.rust-lang.org/cargo/commands/cargo-install.html#configuration-discovery
55+
- mkdir -p .cargo
56+
- ln -s $(CARGO_HOME)/config.toml $(CURDIR)/.cargo/config.toml
12457
dh_auto_configure
12558

12659
override_dh_auto_build:

patches/proxmox-backup-client.patch

+39-39
Original file line numberDiff line numberDiff line change
@@ -210,64 +210,64 @@ index 79c1ad76..95b1b1bf 100755
210210
override_dh_fixperms:
211211
dh_fixperms --exclude sg-tape-cmd
212212
diff --git a/docs/Makefile b/docs/Makefile
213-
index d23796b7..950cd644 100644
213+
index d98302ff..8ee7d4e9 100644
214214
--- a/docs/Makefile
215215
+++ b/docs/Makefile
216-
@@ -1,53 +1,15 @@
216+
@@ -1,57 +1,18 @@
217217
include ../defines.mk
218218

219219
GENERATED_SYNOPSIS := \
220-
- proxmox-tape/synopsis.rst \
221-
proxmox-backup-client/synopsis.rst \
222-
proxmox-backup-client/catalog-shell-synopsis.rst \
223-
- proxmox-backup-manager/synopsis.rst \
224-
- proxmox-backup-debug/synopsis.rst \
225-
- proxmox-file-restore/synopsis.rst \
226-
- pxar/synopsis.rst \
227-
- pmtx/synopsis.rst \
228-
- pmt/synopsis.rst \
220+
- config/acl/roles.rst \
221+
- config/datastore/config.rst \
222+
- config/domains/config.rst \
229223
- config/media-pool/config.rst \
224+
- config/notifications-priv/config.rst \
230225
- config/notifications/config.rst \
231-
- config/notifications-priv/config.rst \
232-
- config/tape/config.rst \
233-
- config/tape-job/config.rst \
234-
- config/user/config.rst \
235226
- config/remote/config.rst \
236227
- config/sync/config.rst \
228+
- config/tape-job/config.rst \
229+
- config/tape/config.rst \
230+
- config/user/config.rst \
237231
- config/verification/config.rst \
238-
- config/acl/roles.rst \
239-
- config/datastore/config.rst \
240-
- config/domains/config.rst
241-
+ pxar/synopsis.rst
232+
- pmt/synopsis.rst \
233+
- pmtx/synopsis.rst \
234+
proxmox-backup-client/catalog-shell-synopsis.rst \
235+
proxmox-backup-client/synopsis.rst \
236+
- proxmox-backup-debug/synopsis.rst \
237+
- proxmox-backup-manager/synopsis.rst \
238+
- proxmox-file-restore/synopsis.rst \
239+
- proxmox-tape/synopsis.rst \
240+
pxar/synopsis.rst \
242241

243242
MAN1_PAGES := \
244-
pxar.1 \
245-
- pmtx.1 \
243+
- pbs2to3.1 \
246244
- pmt.1 \
247-
- proxmox-tape.1 \
248-
- proxmox-backup-proxy.1 \
249-
- proxmox-backup-client.1 \
245+
- pmtx.1 \
246+
proxmox-backup-client.1 \
247+
- proxmox-backup-debug.1 \
250248
- proxmox-backup-manager.1 \
249+
- proxmox-backup-proxy.1 \
251250
- proxmox-file-restore.1 \
252-
- proxmox-backup-debug.1 \
253-
- pbs2to3.1 \
254-
-
255-
-MAN5_PAGES := \
256-
- media-pool.cfg.5 \
257-
- tape.cfg.5 \
258-
- tape-job.cfg.5 \
251+
- proxmox-tape.1 \
252+
pxar.1 \
253+
254+
# FIXME: prefix all man pages that are not directly relating to an existing executable with
255+
# `proxmox-backup.`, like the newer added proxmox-backup.node.cfg but add backwards compatible
256+
# symlinks, e.g. with a "5pbs" man page "suffix section".
257+
MAN5_PAGES := \
259258
- acl.cfg.5 \
260-
- user.cfg.5 \
261-
- remote.cfg.5 \
262-
- sync.cfg.5 \
263-
- verification.cfg.5 \
264259
- datastore.cfg.5 \
265260
- domains.cfg.5 \
266-
- notifications.cfg.5 \
261+
- media-pool.cfg.5 \
262+
- proxmox-backup.node.cfg.5 \
267263
- notifications-priv.cfg.5 \
268-
+ proxmox-backup-client.1
269-
+
270-
+MAN5_PAGES :=
264+
- notifications.cfg.5 \
265+
- remote.cfg.5 \
266+
- sync.cfg.5 \
267+
- tape-job.cfg.5 \
268+
- tape.cfg.5 \
269+
- user.cfg.5 \
270+
- verification.cfg.5 \
271271

272272
PRUNE_SIMULATOR_FILES := \
273273
prune-simulator/index.html \

patches/proxmox-backup-cross.patch

+31-11
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/docs/Makefile b/docs/Makefile
2-
index 950cd644..1ba51c00 100644
2+
index d98302ff..72af586d 100644
33
--- a/docs/Makefile
44
+++ b/docs/Makefile
5-
@@ -65,16 +65,16 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(SPHINXOPTS) .
5+
@@ -107,16 +107,16 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(SPHINXOPTS) .
66
all: ${MAN1_PAGES} ${MAN5_PAGES}
77

88
config/%/config.rst: ${COMPILEDIR}/docgen
@@ -23,7 +23,7 @@ index 950cd644..1ba51c00 100644
2323

2424
${MAN1_PAGES} ${MAN5_PAGES}: man-pages
2525

26-
@@ -89,7 +89,7 @@ onlinehelpinfo:
26+
@@ -131,7 +131,7 @@ onlinehelpinfo:
2727
@echo "Build finished. OnlineHelpInfo.js is in $(BUILDDIR)/scanrefs."
2828

2929
api-viewer/apidata.js: ${COMPILEDIR}/docgen
@@ -33,7 +33,7 @@ index 950cd644..1ba51c00 100644
3333
api-viewer/apidoc.js: ${API_VIEWER_FILES}
3434
cat ${API_VIEWER_FILES} >$@.tmp
3535
diff --git a/pxar-bin/tests/pxar.rs b/pxar-bin/tests/pxar.rs
36-
index 23559bad..2b6f9a4a 100644
36+
index 2da02990..0d54716d 100644
3737
--- a/pxar-bin/tests/pxar.rs
3838
+++ b/pxar-bin/tests/pxar.rs
3939
@@ -17,7 +17,8 @@ fn pxar_create_and_extract() {
@@ -56,13 +56,33 @@ index 23559bad..2b6f9a4a 100644
5656
.arg("extract")
5757
.arg("./tests/archive.pxar")
5858
.arg("--target")
59-
@@ -91,7 +93,8 @@ fn pxar_list_with_payload_input() {
60-
format!("../target/{target_subdir}/release/pxar")
61-
};
59+
@@ -96,7 +98,8 @@ fn pxar_split_archive_test() {
6260

63-
- let output = Command::new(exec_path)
61+
println!("run '{exec_path} create archive.mpxar {src_dir} --payload-output archive.ppxar'");
62+
63+
- Command::new(&exec_path)
64+
+ Command::new("qemu-aarch64")
65+
+ .arg(&exec_path)
66+
.arg("create")
67+
.arg("./tests/archive.mpxar")
68+
.arg(src_dir)
69+
@@ -104,7 +107,8 @@ fn pxar_split_archive_test() {
70+
.status()
71+
.unwrap_or_else(|err| panic!("Failed to invoke '{exec_path}': {err}"));
72+
73+
- let output = Command::new(&exec_path)
6474
+ let output = Command::new("qemu-aarch64")
6575
+ .arg(&exec_path)
66-
.args([
67-
"list",
68-
"../tests/pxar/backup-client-pxar-expected.mpxar",
76+
.arg("list")
77+
.arg("./tests/archive.mpxar")
78+
.arg("--payload-input=./tests/archive.ppxar")
79+
@@ -125,7 +129,8 @@ fn pxar_split_archive_test() {
80+
81+
println!("run '{exec_path} extract archive.mpxar {dest_dir} --payload-input archive.ppxar'");
82+
83+
- Command::new(&exec_path)
84+
+ Command::new("qemu-aarch64")
85+
+ .arg(&exec_path)
86+
.arg("extract")
87+
.arg("./tests/archive.mpxar")
88+
.arg("--payload-input=./tests/archive.ppxar")

0 commit comments

Comments
 (0)