forked from proxmox-mirrors/proxmox-backup
Compare commits
No commits in common. "pxvirt-cross" and "master" have entirely different histories.
pxvirt-cro
...
master
@ -1,32 +1,8 @@
|
||||
[source]
|
||||
[source.debian-packages]
|
||||
directory = "/usr/share/cargo/registry"
|
||||
[source.crates-io]
|
||||
replace-with = "dh-cargo-registry"
|
||||
|
||||
[source.dh-cargo-registry]
|
||||
directory = "/root/proxmox-backup/debian/cargo_registry"
|
||||
|
||||
[build]
|
||||
rustflags = ['-C', 'debuginfo=2', '-C', 'strip=none', '--cap-lints', 'warn', '--remap-path-prefix', '/root/proxmox-backup=/usr/share/cargo/registry/proxmox-backup-4.0.6', '--remap-path-prefix', '/root/proxmox-backup/debian/cargo_registry=/usr/share/cargo/registry']
|
||||
replace-with = "debian-packages"
|
||||
|
||||
[profile.release]
|
||||
debug = true
|
||||
|
||||
[target.x86_64-unknown-linux-gnu]
|
||||
linker = "x86_64-linux-gnu-gcc"
|
||||
ar = "x86_64-linux-gnu-ar"
|
||||
rustflags = [
|
||||
"-L", "/usr/lib/x86_64-linux-gnu",
|
||||
]
|
||||
|
||||
[target.riscv64gc-unknown-linux-gnu]
|
||||
linker = "riscv64-linux-gnu-gcc"
|
||||
ar = "riscv64-linux-gnu-ar"
|
||||
rustflags = [
|
||||
"-L", "/usr/lib/riscv64-linux-gnu",
|
||||
]
|
||||
|
||||
[target.aarch64-unknown-linux-gnu]
|
||||
linker = "aarch64-linux-gnu-gcc"
|
||||
ar = "aarch64-linux-gnu-ar"
|
||||
rustflags = [
|
||||
"-L", "/usr/lib/aarch64-linux-gnu",
|
||||
]
|
||||
debug=true
|
||||
|
||||
22
Makefile
22
Makefile
@ -3,8 +3,7 @@ include /usr/share/rustc/architecture.mk
|
||||
include defines.mk
|
||||
|
||||
PACKAGE := proxmox-backup
|
||||
ARCH := $(DEB_HOST_ARCH)
|
||||
CPU := $(DEB_HOST_GNU_CPU)
|
||||
ARCH := $(DEB_BUILD_ARCH)
|
||||
export DEB_HOST_RUST_TYPE
|
||||
|
||||
SUBDIRS := etc www docs templates
|
||||
@ -90,7 +89,7 @@ DESTDIR=
|
||||
|
||||
tests ?= --workspace
|
||||
|
||||
all: $(SUBDIRS)
|
||||
all: proxmox-backup-client-static $(SUBDIRS)
|
||||
|
||||
.PHONY: $(SUBDIRS)
|
||||
$(SUBDIRS):
|
||||
@ -110,10 +109,6 @@ build:
|
||||
rm -rf build
|
||||
mkdir build
|
||||
git rev-parse HEAD > build/.repoid
|
||||
sed -i "s/x86_64/$(CPU)/g" debian/proxmox-backup-server.install
|
||||
sed -i "s/x86_64/$(CPU)/g" debian/proxmox-backup-file-restore.postinst
|
||||
sed -i "s/x86_64/$(CPU)/g" debian/proxmox-backup-file-restore.install
|
||||
sed -i "s/x86_64/$(CPU)/g" debian/lintian-overrides
|
||||
cp -a debian \
|
||||
Cargo.toml src \
|
||||
$(SUBCRATES) \
|
||||
@ -129,21 +124,21 @@ build:
|
||||
.PHONY: proxmox-backup-docs
|
||||
$(DOC_DEB) $(DEBS): proxmox-backup-docs
|
||||
proxmox-backup-docs: build
|
||||
cd build; dpkg-buildpackage -b -us -uc --no-pre-clean -a$(ARCH)
|
||||
cd build; dpkg-buildpackage -b -us -uc --no-pre-clean
|
||||
lintian $(DOC_DEB)
|
||||
|
||||
.PHONY: deb dsc deb-nodoc deb-nostrip
|
||||
deb-nodoc: build
|
||||
cd build; dpkg-buildpackage -b -us -uc --no-pre-clean --build-profiles=nodoc -a$(ARCH)
|
||||
cd build; dpkg-buildpackage -b -us -uc --no-pre-clean --build-profiles=nodoc
|
||||
lintian $(DEBS)
|
||||
|
||||
deb-nostrip: build
|
||||
cd build; DEB_BUILD_OPTIONS=nostrip dpkg-buildpackage -b -us -uc -a$(ARCH)
|
||||
cd build; DEB_BUILD_OPTIONS=nostrip dpkg-buildpackage -b -us -uc
|
||||
lintian $(DEBS) $(DOC_DEB)
|
||||
|
||||
$(DEBS): deb
|
||||
deb: build
|
||||
cd build; dpkg-buildpackage -b -us -uc -a$(ARCH)
|
||||
cd build; dpkg-buildpackage -b -us -uc
|
||||
lintian $(DEBS) $(DOC_DEB)
|
||||
|
||||
.PHONY: dsc
|
||||
@ -212,7 +207,6 @@ $(COMPILED_BINS) $(COMPILEDIR)/dump-catalog-shell-cli $(COMPILEDIR)/docgen &:
|
||||
|
||||
.PHONY: proxmox-backup-client-static
|
||||
proxmox-backup-client-static:
|
||||
export CRATE_CC_NO_DEFAULTS=0
|
||||
$(MAKE) $(STATIC_BINS)
|
||||
|
||||
$(STATIC_BINS) &:
|
||||
@ -248,8 +242,8 @@ install: $(COMPILED_BINS) $(STATIC_BINS)
|
||||
install -m4755 -o root -g root $(COMPILEDIR)/sg-tape-cmd $(DESTDIR)$(LIBEXECDIR)/proxmox-backup/sg-tape-cmd
|
||||
$(foreach i,$(SERVICE_BIN), \
|
||||
install -m755 $(COMPILEDIR)/$(i) $(DESTDIR)$(LIBEXECDIR)/proxmox-backup/ ;)
|
||||
# install -m755 $(STATIC_COMPILEDIR)/proxmox-backup-client $(DESTDIR)$(BINDIR)/proxmox-backup-client-static
|
||||
# install -m755 $(STATIC_COMPILEDIR)/pxar $(DESTDIR)$(BINDIR)/pxar-static
|
||||
install -m755 $(STATIC_COMPILEDIR)/proxmox-backup-client $(DESTDIR)$(BINDIR)/proxmox-backup-client-static
|
||||
install -m755 $(STATIC_COMPILEDIR)/pxar $(DESTDIR)$(BINDIR)/pxar-static
|
||||
$(MAKE) -C www install
|
||||
$(MAKE) -C docs install
|
||||
$(MAKE) -C templates install
|
||||
|
||||
4
debian/control
vendored
4
debian/control
vendored
@ -65,7 +65,7 @@ Build-Depends: bash-completion,
|
||||
librust-proxmox-apt-0.99+default-dev,
|
||||
librust-proxmox-apt-api-types-2+default-dev,
|
||||
librust-proxmox-async-0.5+default-dev,
|
||||
librust-proxmox-auth-api-1+api-dev ,
|
||||
librust-proxmox-auth-api-1+api-dev (>= 1.0.2),
|
||||
librust-proxmox-auth-api-1+default-dev,
|
||||
librust-proxmox-auth-api-1+pam-authenticator-dev,
|
||||
librust-proxmox-base64-1+default-dev,
|
||||
@ -161,9 +161,11 @@ Build-Depends: bash-completion,
|
||||
librust-zstd-0.13+default-dev,
|
||||
librust-zstd-safe-7+default-dev,
|
||||
libsgutils2-dev,
|
||||
libstd-rust-dev,
|
||||
libsystemd-dev (>= 246-~~),
|
||||
patchelf,
|
||||
proxmox-widget-toolkit-dev <!nodoc>,
|
||||
proxmox-biome,
|
||||
python3-docutils,
|
||||
python3-pygments,
|
||||
python3-sphinx <!nodoc>,
|
||||
|
||||
2
debian/lintian-overrides
vendored
2
debian/lintian-overrides
vendored
@ -1,6 +1,6 @@
|
||||
proxmox-backup-server: elevated-privileges 4755 root/root [usr/lib/x86_64-linux-gnu/proxmox-backup/sg-tape-cmd]
|
||||
proxmox-backup-server: mail-transport-agent-dependency-does-not-specify-default-mta
|
||||
proxmox-backup-server: package-installs-apt-sources [etc/apt/sources.list.d/pbs-sources.list]
|
||||
proxmox-backup-server: package-installs-apt-sources [etc/apt/sources.list.d/pbs-enterprise.sources]
|
||||
proxmox-backup-server: systemd-service-file-refers-to-unusual-wantedby-target getty.target [usr/lib/systemd/system/proxmox-backup-banner.service]
|
||||
proxmox-backup-server: uses-dpkg-database-directly [usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-backup-api]
|
||||
proxmox-backup-server: uses-dpkg-database-directly [usr/lib/x86_64-linux-gnu/proxmox-backup/proxmox-backup-proxy]
|
||||
|
||||
2
debian/proxmox-backup-file-restore.install
vendored
2
debian/proxmox-backup-file-restore.install
vendored
@ -1,4 +1,4 @@
|
||||
usr/bin/proxmox-file-restore
|
||||
usr/lib/riscv64-linux-gnu/proxmox-backup/file-restore/proxmox-restore-daemon
|
||||
usr/lib/x86_64-linux-gnu/proxmox-backup/file-restore/proxmox-restore-daemon
|
||||
usr/share/man/man1/proxmox-file-restore.1
|
||||
usr/share/zsh/vendor-completions/_proxmox-file-restore
|
||||
|
||||
2
debian/proxmox-backup-server.install
vendored
2
debian/proxmox-backup-server.install
vendored
@ -1,4 +1,4 @@
|
||||
etc/pbs-sources.list /etc/apt/sources.list.d/
|
||||
etc/pbs-enterprise.sources /etc/apt/sources.list.d/
|
||||
etc/proxmox-backup-banner.service /usr/lib/systemd/system/
|
||||
etc/proxmox-backup-daily-update.service /usr/lib/systemd/system/
|
||||
etc/proxmox-backup-daily-update.timer /usr/lib/systemd/system/
|
||||
|
||||
47
debian/rules
vendored
47
debian/rules
vendored
@ -22,50 +22,6 @@ export CARGO=/usr/share/cargo/bin/cargo
|
||||
|
||||
export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
|
||||
export DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE
|
||||
export CRATE_CC_NO_DEFAULTS=1
|
||||
# Set cross-compilation environment variables for OpenSSL and C libraries
|
||||
# ifeq ($(DEB_HOST_ARCH),riscv64)
|
||||
# export CC_riscv64gc_unknown_linux_gnu=riscv64-linux-gnu-gcc
|
||||
# export CXX_riscv64gc_unknown_linux_gnu=riscv64-linux-gnu-g++
|
||||
# export AR_riscv64gc_unknown_linux_gnu=riscv64-linux-gnu-ar
|
||||
# export CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_LINKER=riscv64-linux-gnu-gcc
|
||||
# export CRATE_CC_NO_DEFAULTS=1
|
||||
# export CFLAGS_riscv64gc_unknown_linux_gnu=-fPIC
|
||||
# export CXXFLAGS_riscv64gc_unknown_linux_gnu=-fPIC
|
||||
# export PKG_CONFIG_riscv64gc_unknown_linux_gnu=riscv64-linux-gnu-pkg-config
|
||||
# export PKG_CONFIG_PATH_riscv64gc_unknown_linux_gnu=/usr/lib/riscv64-linux-gnu/pkgconfig
|
||||
# export PKG_CONFIG_LIBDIR_riscv64gc_unknown_linux_gnu=/usr/lib/riscv64-linux-gnu/pkgconfig
|
||||
# export RISCV64GC_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR=/usr/lib/riscv64-linux-gnu
|
||||
# export RISCV64GC_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR=/usr/include
|
||||
# endif
|
||||
# ifeq ($(DEB_HOST_ARCH),arm64)
|
||||
# export CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc
|
||||
# export CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++
|
||||
# export AR_aarch64_unknown_linux_gnu=aarch64-linux-gnu-ar
|
||||
# export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
|
||||
# export CFLAGS_aarch64_unknown_linux_gnu=-fPIC
|
||||
# export CXXFLAGS_aarch64_unknown_linux_gnu=-fPIC
|
||||
# export PKG_CONFIG_aarch64_unknown_linux_gnu=aarch64-linux-gnu-pkg-config
|
||||
# export PKG_CONFIG_PATH_aarch64_unknown_linux_gnu=/usr/lib/aarch64-linux-gnu/pkgconfig
|
||||
# export PKG_CONFIG_LIBDIR_aarch64_unknown_linux_gnu=/usr/lib/aarch64-linux-gnu/pkgconfig
|
||||
# export AARCH64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR=/usr/lib/aarch64-linux-gnu
|
||||
# export AARCH64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR=/usr/include
|
||||
# endif
|
||||
|
||||
# ifeq ($(DEB_HOST_ARCH),loong64)
|
||||
# export CC_loongarch64_unknown_linux_gnu=loongarch64-linux-gnu-gcc
|
||||
# export CXX_loongarch64_unknown_linux_gnu=loongarch64-linux-gnu-g++
|
||||
# export AR_loongarch64_unknown_linux_gnu=loongarch64-linux-gnu-ar
|
||||
# export CARGO_TARGET_LOONGARCH64_UNKNOWN_LINUX_GNU_LINKER=loongarch64-linux-gnu-gcc
|
||||
# export CFLAGS_loongarch64_unknown_linux_gnu=-fPIC
|
||||
# export CXXFLAGS_loongarch64_unknown_linux_gnu=-fPIC
|
||||
# export PKG_CONFIG_loongarch64_unknown_linux_gnu=loongarch64-linux-gnu-pkg-config
|
||||
# export PKG_CONFIG_PATH_loongarch64_unknown_linux_gnu=/usr/lib/loongarch64-linux-gnu/pkgconfig
|
||||
# export PKG_CONFIG_LIBDIR_loongarch64_unknown_linux_gnu=/usr/lib/loongarch64-linux-gnu/pkgconfig
|
||||
# export LOONGARCH64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR=/usr/lib/loongarch64-linux-gnu
|
||||
# export LOONGARCH64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR=/usr/include
|
||||
# endif
|
||||
|
||||
export CARGO_HOME = $(CURDIR)/debian/cargo_home
|
||||
|
||||
export DEB_CARGO_CRATE=proxmox-backup_$(DEB_VERSION_UPSTREAM)
|
||||
@ -104,6 +60,9 @@ override_dh_auto_install:
|
||||
dh_auto_install -- \
|
||||
PROXY_USER=backup \
|
||||
LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
|
||||
mkdir -p debian/proxmox-backup-client-static/usr/bin
|
||||
mv debian/tmp/usr/bin/proxmox-backup-client-static debian/proxmox-backup-client-static/usr/bin/proxmox-backup-client
|
||||
mv debian/tmp/usr/bin/pxar-static debian/proxmox-backup-client-static/usr/bin/pxar
|
||||
|
||||
override_dh_installsystemd:
|
||||
dh_installsystemd -pproxmox-backup-server proxmox-backup-daily-update.timer
|
||||
|
||||
@ -10,7 +10,7 @@ DYNAMIC_UNITS := \
|
||||
proxmox-backup.service \
|
||||
proxmox-backup-proxy.service
|
||||
|
||||
all: $(UNITS) $(DYNAMIC_UNITS) pbs-sources.list
|
||||
all: $(UNITS) $(DYNAMIC_UNITS) pbs-enterprise.sources
|
||||
|
||||
clean:
|
||||
rm -f $(DYNAMIC_UNITS)
|
||||
|
||||
5
etc/pbs-enterprise.sources
Normal file
5
etc/pbs-enterprise.sources
Normal file
@ -0,0 +1,5 @@
|
||||
Types: deb
|
||||
URIs: https://enterprise.proxmox.com/debian/pbs
|
||||
Suites: trixie
|
||||
Components: pbs-enterprise
|
||||
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
|
||||
@ -1 +0,0 @@
|
||||
deb https://mirrors.lierfang.com/pxcloud/pbs trixie main
|
||||
@ -53,8 +53,8 @@ macro_rules! PROXMOX_BACKUP_CACHE_DIR_M {
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! PROXMOX_BACKUP_FILE_RESTORE_BIN_DIR_M {
|
||||
($arch:expr) => {
|
||||
format!("/usr/lib/{}-linux-gnu/proxmox-backup/file-restore", $arch)
|
||||
() => {
|
||||
"/usr/lib/x86_64-linux-gnu/proxmox-backup/file-restore"
|
||||
};
|
||||
}
|
||||
|
||||
@ -93,16 +93,8 @@ pub const PROXMOX_BACKUP_INITRAMFS_DBG_FN: &str = concat!(
|
||||
);
|
||||
|
||||
/// filename of the kernel to use for booting single file restore VMs
|
||||
pub fn PROXMOX_BACKUP_KERNEL_FN() -> String {
|
||||
let arch = std::env::consts::ARCH;
|
||||
let file_restore_dir = PROXMOX_BACKUP_FILE_RESTORE_BIN_DIR_M!(arch);
|
||||
|
||||
if arch == "x86_64" {
|
||||
format!("{}/bzImage", file_restore_dir)
|
||||
} else {
|
||||
format!("{}/Image", file_restore_dir)
|
||||
}
|
||||
}
|
||||
pub const PROXMOX_BACKUP_KERNEL_FN: &str =
|
||||
concat!(PROXMOX_BACKUP_FILE_RESTORE_BIN_DIR_M!(), "/bzImage");
|
||||
|
||||
pub const PROXMOX_BACKUP_SUBSCRIPTION_FN: &str = configdir!("/subscription");
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
//! Helper to start a QEMU VM for single file restore.
|
||||
use std::env;
|
||||
use std::fs::{File, OpenOptions};
|
||||
use std::io::prelude::*;
|
||||
use std::os::unix::io::AsRawFd;
|
||||
use std::path::PathBuf;
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
|
||||
use anyhow::{bail, format_err, Error};
|
||||
use serde_json::json;
|
||||
use tokio::{
|
||||
@ -54,7 +52,7 @@ fn create_restore_log_dir() -> Result<String, Error> {
|
||||
}
|
||||
|
||||
fn validate_img_existence(debug: bool) -> Result<(), Error> {
|
||||
let kernel = PathBuf::from(pbs_buildcfg::PROXMOX_BACKUP_KERNEL_FN());
|
||||
let kernel = PathBuf::from(pbs_buildcfg::PROXMOX_BACKUP_KERNEL_FN);
|
||||
let initramfs = PathBuf::from(if debug {
|
||||
pbs_buildcfg::PROXMOX_BACKUP_INITRAMFS_DBG_FN
|
||||
} else {
|
||||
@ -214,7 +212,6 @@ pub async fn start_vm(
|
||||
}
|
||||
|
||||
let debug = debug_mode();
|
||||
let arch = std::env::consts::ARCH;
|
||||
|
||||
validate_img_existence(debug)?;
|
||||
|
||||
@ -256,8 +253,9 @@ pub async fn start_vm(
|
||||
"chardev:log",
|
||||
"-vnc",
|
||||
"none",
|
||||
"-enable-kvm",
|
||||
"-kernel",
|
||||
&pbs_buildcfg::PROXMOX_BACKUP_KERNEL_FN(),
|
||||
pbs_buildcfg::PROXMOX_BACKUP_KERNEL_FN,
|
||||
"-initrd",
|
||||
&ramfs_path,
|
||||
"-append",
|
||||
@ -299,50 +297,34 @@ pub async fn start_vm(
|
||||
|
||||
// a PCI bus can only support 32 devices, so add a new one every 32
|
||||
let bus = (id / 32) + 2;
|
||||
if arch == "x86_64" {
|
||||
if id % 32 == 0 {
|
||||
drives.push("-device".to_owned());
|
||||
drives.push(format!("pci-bridge,id=bridge{bus},chassis_nr={bus}"));
|
||||
}
|
||||
if id % 32 == 0 {
|
||||
drives.push("-device".to_owned());
|
||||
drives.push(format!("pci-bridge,id=bridge{bus},chassis_nr={bus}"));
|
||||
}
|
||||
|
||||
drives.push("-device".to_owned());
|
||||
// drive serial is used by VM to map .fidx files to /dev paths
|
||||
let serial = file.strip_suffix(".img.fidx").unwrap_or(&file);
|
||||
drives.push(format!(
|
||||
"virtio-blk-pci,drive=drive{id},serial={serial}"
|
||||
"virtio-blk-pci,drive=drive{id},serial={serial},bus=bridge{bus}"
|
||||
));
|
||||
id += 1;
|
||||
}
|
||||
|
||||
let mut ram = if debug {
|
||||
let ram = if debug {
|
||||
1024
|
||||
} else {
|
||||
// add more RAM if many drives are given
|
||||
// We need more memory for !x86 device
|
||||
match id {
|
||||
f if f < 20 => 512,
|
||||
_ => 768,
|
||||
f if f < 20 => 256,
|
||||
_ => 384,
|
||||
}
|
||||
};
|
||||
|
||||
// loongarch minimum memeory is 1024
|
||||
if arch == "loongarch64" {
|
||||
ram = 1024;
|
||||
}
|
||||
|
||||
let edk2_path = match arch {
|
||||
"loongarch64" => "/usr/share/pve-edk2-firmware/LOONGARCH64_VIRT_CODE.fd",
|
||||
"aarch64" => "/usr/share/pve-edk2-firmware/AAVMF_CODE.fd",
|
||||
"riscv64" => "/usr/share/pve-edk2-firmware/RISCV_VIRT_CODE.fd",
|
||||
_ => "/usr/share/pve-edk2-firmware/bios.fd",
|
||||
};
|
||||
|
||||
// Try starting QEMU in a loop to retry if we fail because of a bad 'cid' value
|
||||
let qemu_bin = format!("qemu-system-{}", arch);
|
||||
let mut attempts = 0;
|
||||
loop {
|
||||
let mut qemu_cmd = std::process::Command::new(&qemu_bin);
|
||||
let mut qemu_cmd = std::process::Command::new("qemu-system-x86_64");
|
||||
qemu_cmd.args(base_args.iter());
|
||||
qemu_cmd.arg("-m");
|
||||
qemu_cmd.arg(format!(
|
||||
@ -362,16 +344,7 @@ pub async fn start_vm(
|
||||
));
|
||||
qemu_cmd.arg("-mon");
|
||||
qemu_cmd.arg("chardev=qmp,mode=control");
|
||||
if arch != "x86_64" {
|
||||
qemu_cmd.arg("-M");
|
||||
qemu_cmd.arg("virt");
|
||||
qemu_cmd.arg("-cpu");
|
||||
qemu_cmd.arg("max");
|
||||
qemu_cmd.arg("-smp");
|
||||
qemu_cmd.arg("1");
|
||||
qemu_cmd.arg("-bios");
|
||||
qemu_cmd.arg(format!("{}",edk2_path));
|
||||
}
|
||||
|
||||
if debug {
|
||||
let debug_args = [
|
||||
"-chardev",
|
||||
@ -384,13 +357,6 @@ pub async fn start_vm(
|
||||
];
|
||||
qemu_cmd.args(debug_args.iter());
|
||||
}
|
||||
if arch != "riscv64" {
|
||||
qemu_cmd.arg("-accel");
|
||||
qemu_cmd.arg("kvm");
|
||||
}else{
|
||||
qemu_cmd.arg("-accel");
|
||||
qemu_cmd.arg("tcg");
|
||||
}
|
||||
|
||||
qemu_cmd.stdout(std::process::Stdio::null());
|
||||
qemu_cmd.stderr(std::process::Stdio::piped());
|
||||
|
||||
@ -285,9 +285,8 @@ impl TapeDriver for LtoTapeHandle {
|
||||
}
|
||||
|
||||
fn run_sg_tape_cmd(subcmd: &str, args: &[&str], fd: RawFd) -> Result<String, Error> {
|
||||
let arch = std::env::consts::ARCH;
|
||||
let mut command =
|
||||
std::process::Command::new(format!("/usr/lib/{arch}-linux-gnu/proxmox-backup/sg-tape-cmd"));
|
||||
std::process::Command::new("/usr/lib/x86_64-linux-gnu/proxmox-backup/sg-tape-cmd");
|
||||
command.args([subcmd]);
|
||||
command.args(["--stdin"]);
|
||||
command.args(args);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user