* [pbs-devel] [PATCH proxmox-backup-restore-image 1/2] init: update nix to 0.26
@ 2023-01-24 10:05 Fabian Grünbichler
2023-01-24 10:05 ` [pbs-devel] [PATCH proxmox-backup-restore-image 2/2] build: use system toolchain and rust dependencies Fabian Grünbichler
2023-01-30 10:19 ` [pbs-devel] applied-series: [PATCH proxmox-backup-restore-image 1/2] init: update nix to 0.26 Thomas Lamprecht
0 siblings, 2 replies; 3+ messages in thread
From: Fabian Grünbichler @ 2023-01-24 10:05 UTC (permalink / raw)
To: pbs-devel
and stop tracking Cargo.lock file
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
src/init-shim-rs/Cargo.lock | 51 -------------------------------------
src/init-shim-rs/Cargo.toml | 2 +-
2 files changed, 1 insertion(+), 52 deletions(-)
delete mode 100644 src/init-shim-rs/Cargo.lock
diff --git a/src/init-shim-rs/Cargo.lock b/src/init-shim-rs/Cargo.lock
deleted file mode 100644
index a293b3c..0000000
--- a/src/init-shim-rs/Cargo.lock
+++ /dev/null
@@ -1,51 +0,0 @@
-# This file is automatically @generated by Cargo.
-# It is not intended for manual editing.
-[[package]]
-name = "anyhow"
-version = "1.0.34"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf8dcb5b4bbaa28653b647d8c77bd4ed40183b48882e130c1f1ffb73de069fd7"
-
-[[package]]
-name = "bitflags"
-version = "1.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
-
-[[package]]
-name = "cc"
-version = "1.0.62"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f1770ced377336a88a67c473594ccc14eca6f4559217c34f64aac8f83d641b40"
-
-[[package]]
-name = "cfg-if"
-version = "0.1.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
-
-[[package]]
-name = "init-shim-rs"
-version = "1.0.0"
-dependencies = [
- "anyhow",
- "nix",
-]
-
-[[package]]
-name = "libc"
-version = "0.2.80"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614"
-
-[[package]]
-name = "nix"
-version = "0.19.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "85db2feff6bf70ebc3a4793191517d5f0331100a2f10f9bf93b5e5214f32b7b7"
-dependencies = [
- "bitflags",
- "cc",
- "cfg-if",
- "libc",
-]
diff --git a/src/init-shim-rs/Cargo.toml b/src/init-shim-rs/Cargo.toml
index 013395c..eee6c0f 100644
--- a/src/init-shim-rs/Cargo.toml
+++ b/src/init-shim-rs/Cargo.toml
@@ -6,4 +6,4 @@ edition = "2018"
[dependencies]
anyhow = "1.0"
-nix = "0.19"
+nix = "0.26"
--
2.30.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pbs-devel] [PATCH proxmox-backup-restore-image 2/2] build: use system toolchain and rust dependencies
2023-01-24 10:05 [pbs-devel] [PATCH proxmox-backup-restore-image 1/2] init: update nix to 0.26 Fabian Grünbichler
@ 2023-01-24 10:05 ` Fabian Grünbichler
2023-01-30 10:19 ` [pbs-devel] applied-series: [PATCH proxmox-backup-restore-image 1/2] init: update nix to 0.26 Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Fabian Grünbichler @ 2023-01-24 10:05 UTC (permalink / raw)
To: pbs-devel
instead of using crates.io - the build still requires network access and
depends on configured APT sources in the build environment, so there's room for
further improvement.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
debian/control | 8 +++++++-
debian/rules | 17 +++++++++++++++++
src/build_initramfs.sh | 2 +-
3 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/debian/control b/debian/control
index 55781a4..b2750fd 100644
--- a/debian/control
+++ b/debian/control
@@ -7,8 +7,10 @@ Build-Depends: apt-rdepends,
automake,
bc,
bison,
+ cargo,
cpio,
debhelper (>= 12~),
+ dh-cargo,
dh-python,
flex,
gcc (>= 8.3.0-6),
@@ -16,10 +18,14 @@ Build-Depends: apt-rdepends,
libblkid-dev,
libdw-dev,
libelf-dev,
+ librust-anyhow-1+default-dev,
+ librust-nix-0.26+default-dev,
+ libssl-dev,
libtool,
lintian,
perl-modules,
- python3-minimal,
+ python3,
+ rustc,
sed,
sphinx-common,
tar,
diff --git a/debian/rules b/debian/rules
index 657234c..4fdf855 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,5 +3,22 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
+include /usr/share/dpkg/architecture.mk
+include /usr/share/dpkg/buildflags.mk
+include /usr/share/rustc/architecture.mk
+
+export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
+export DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE
+PATH := /usr/share/cargo/bin:$(PATH)
+
+export PATH
+
+export CARGO_HOME=$(CURDIR)/debian/cargo_home
+export DEB_CARGO_CRATE=init-shim-rs
+
%:
dh $@
+
+override_dh_auto_configure:
+ cargo prepare-debian $(CARGO_HOME)/registry --link-from-system
+ dh_auto_configure
diff --git a/src/build_initramfs.sh b/src/build_initramfs.sh
index 4d81b39..b7caf81 100755
--- a/src/build_initramfs.sh
+++ b/src/build_initramfs.sh
@@ -4,7 +4,7 @@ set -e
ROOT="root"
BUILDDIR="build/initramfs"
-INIT="../../init-shim-rs/target/release/init-shim-rs"
+INIT="../../init-shim-rs/target/x86_64-unknown-linux-gnu/release/init-shim-rs"
echo "Using build dir: $BUILDDIR"
rm -rf "$BUILDDIR"
--
2.30.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pbs-devel] applied-series: [PATCH proxmox-backup-restore-image 1/2] init: update nix to 0.26
2023-01-24 10:05 [pbs-devel] [PATCH proxmox-backup-restore-image 1/2] init: update nix to 0.26 Fabian Grünbichler
2023-01-24 10:05 ` [pbs-devel] [PATCH proxmox-backup-restore-image 2/2] build: use system toolchain and rust dependencies Fabian Grünbichler
@ 2023-01-30 10:19 ` Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2023-01-30 10:19 UTC (permalink / raw)
To: Proxmox Backup Server development discussion, Fabian Grünbichler
Am 24/01/2023 um 11:05 schrieb Fabian Grünbichler:
> and stop tracking Cargo.lock file
>
> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
> ---
> src/init-shim-rs/Cargo.lock | 51 -------------------------------------
> src/init-shim-rs/Cargo.toml | 2 +-
> 2 files changed, 1 insertion(+), 52 deletions(-)
> delete mode 100644 src/init-shim-rs/Cargo.lock
>
>
applied both patches, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-30 10:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-24 10:05 [pbs-devel] [PATCH proxmox-backup-restore-image 1/2] init: update nix to 0.26 Fabian Grünbichler
2023-01-24 10:05 ` [pbs-devel] [PATCH proxmox-backup-restore-image 2/2] build: use system toolchain and rust dependencies Fabian Grünbichler
2023-01-30 10:19 ` [pbs-devel] applied-series: [PATCH proxmox-backup-restore-image 1/2] init: update nix to 0.26 Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal