From e881b8a5efa6249839aaa9f4dfa59b3fe9f0b13a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Wed, 15 Jan 2020 10:29:57 +0100 Subject: [PATCH] switch to debcargo for generating d/control MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabian Grünbichler --- Cargo.toml | 9 +++- Makefile | 14 +++--- debian/changelog | 6 +++ debian/control | 104 ------------------------------------------- debian/control.in | 28 ++++++++++++ debian/debcargo.toml | 18 ++++++++ debian/rules | 2 - 7 files changed, 68 insertions(+), 113 deletions(-) delete mode 100644 debian/control create mode 100644 debian/control.in create mode 100644 debian/debcargo.toml diff --git a/Cargo.toml b/Cargo.toml index f343091f..076fe0ca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,11 @@ name = "proxmox-backup" version = "0.1.2" authors = ["Dietmar Maurer "] edition = "2018" +license = "AGPL-3" +description = "Proxmox Backup" +homepage = "https://www.proxmox.com" + +exclude = [ "build", "debian", "tests/catar_data/test_symlink/symlink1"] [lib] name = "proxmox_backup" @@ -43,11 +48,11 @@ tokio-openssl = "0.4.0" tokio-util = { version = "0.2.0", features = [ "codec" ] } tower-service = "0.3.0" url = "2.1" -valgrind_request = { git = "https://github.com/edef1c/libvalgrind_request", version = "1.1.0", optional = true } +#valgrind_request = { git = "https://github.com/edef1c/libvalgrind_request", version = "1.1.0", optional = true } walkdir = "2" xdg = "2.2" zstd = { version = "0.4", features = [ "bindgen" ] } [features] default = [] -valgrind = ["valgrind_request"] +#valgrind = ["valgrind_request"] diff --git a/Makefile b/Makefile index 93fb19ab..537d34f7 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ include /usr/share/dpkg/default.mk include defines.mk -PACKAGE := $(DEB_SOURCE) +PACKAGE := proxmox-backup ARCH := $(DEB_BUILD_ARCH) SUBDIRS := etc www docs @@ -39,7 +39,7 @@ DEBS= ${PACKAGE}-server_${DEB_VERSION}_${ARCH}.deb ${PACKAGE}-client_${DEB_VERSI DOC_DEB=${PACKAGE}-docs_${DEB_VERSION}_all.deb -DSC = ${PACKAGE}_${DEB_VERSION}.dsc +DSC = rust-${PACKAGE}_${DEB_VERSION}.dsc DESTDIR= @@ -61,12 +61,16 @@ doc: .PHONY: build build: rm -rf build - rsync -a debian Makefile defines.mk Cargo.toml \ - src $(SUBDIRS) \ - tests build/ + debcargo package --config debian/debcargo.toml --changelog-ready --no-overlay-write-back --directory build proxmox-backup $(shell dpkg-parsechangelog -l debian/changelog -SVersion | sed -e 's/-.*//') + sed -e '1,/^$$/ ! d' build/debian/control > build/debian/control.src + cat build/debian/control.src build/debian/control.in > build/debian/control + rm build/debian/control.in build/debian/control.src + rm build/Cargo.lock + find build/debian -name "*.hint" -delete $(foreach i,$(SUBDIRS), \ $(MAKE) -C build/$(i) clean ;) + .PHONY: proxmox-backup-docs proxmox-backup-docs: $(DOC_DEB) $(DOC_DEB): build diff --git a/debian/changelog b/debian/changelog index 26f7f4e2..aa448bd2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +rust-proxmox-backup (0.1.2-1) unstable; urgency=medium + + * switch to debcargo to generate build-dependencies + + -- Proxmox Support Team Mon, 13 Jan 2020 13:04:46 +0100 + proxmox-backup (0.1.2) unstable; urgency=medium * proxmox-backup-api: create cert here diff --git a/debian/control b/debian/control deleted file mode 100644 index 2802a87d..00000000 --- a/debian/control +++ /dev/null @@ -1,104 +0,0 @@ -Source: proxmox-backup -Section: admin -Priority: optional -Maintainer: Proxmox Support Team -Build-Depends: bash-completion, - debhelper (>= 12), - graphviz , - latexmk , - libacl1-dev, - libfuse3-dev, - libsystemd-dev, - uuid-dev, - pkg-config, - python3-docutils , - python3-sphinx , - rsync, - texlive-latex-extra , - texlive-latex-recommended , - texlive-fonts-recommended , - dh-cargo (>= 21~), - cargo:native, - rustc:native, - libstd-rust-dev, - librust-base64-0.10+default-dev, - librust-bytes-0.5+default-dev, - librust-chrono-0.4+default-dev, - librust-crc32fast-1+default-dev, - librust-endian-trait-0.6+arrays-dev, - librust-endian-trait-0.6+default-dev, - librust-failure-0.1+default-dev, - librust-h2-0.2+stream-dev, - librust-h2-0.2+default-dev, - librust-http-0.2+default-dev, - librust-hyper-0.13+default-dev, - librust-lazy-static-1.4+default-dev, - librust-libc-0.2+default-dev, - librust-log-0.4+default-dev, - librust-native-tls-0.2+default-dev, - librust-nix-0.16+default-dev, - librust-openssl-0.10+default-dev, - librust-pam-0.7+default-dev, - librust-pam-sys-0.5+default-dev, - librust-percent-encoding-2.1+default-dev, - librust-pin-utils-0.1.0+default-dev, - librust-proxmox-0.1.4+default-dev, - librust-proxmox-0.1.4+sortable-macro-dev, - librust-proxmox-0.1.4+api-macro-dev, - librust-regex-1.2+default-dev, - librust-rustyline-5.0.5+default-dev, - librust-serde-1.0+default-dev, - librust-serde-1.0+derive-dev, - librust-serde-json-1.0+default-dev, - librust-siphasher-0.3+default-dev, - librust-syslog-4.0+default-dev, - librust-tokio-0.2.9+default-dev, - librust-tokio-0.2.9+blocking-dev, - librust-tokio-0.2.9+fs-dev, - librust-tokio-0.2.9+io-util-dev, - librust-tokio-0.2.9+macros-dev, - librust-tokio-0.2.9+rt-threaded-dev, - librust-tokio-0.2.9+signal-dev, - librust-tokio-0.2.9+stream-dev, - librust-tokio-0.2.9+tcp-dev, - librust-tokio-0.2.9+time-dev, - librust-tokio-0.2.9+uds-dev, - librust-tokio-openssl-0.4.0+default-dev, - librust-tokio-util-0.2.0+default-dev, - librust-tokio-util-0.2.0+codec-dev, - librust-tower-service-0.3.0+default-dev, - librust-url-2.1+default-dev, - librust-walkdir-2+default-dev, - librust-xdg-2.2+default-dev, - librust-zstd-0.4+default-dev, -Standards-Version: 4.3.0 -Homepage: https://www.proxmox.com - -Package: proxmox-backup-server -Architecture: any -Depends: fonts-font-awesome, - libjs-extjs (>= 6.0.1), - libzstd1 (>= 1.3.8), - proxmox-mini-journalreader, - proxmox-widget-toolkit, - ${misc:Depends}, - ${shlibs:Depends}, -Description: Proxmox Backup Server daemon with tools and GUI - This package contains the Proxmox Backup Server daemons and related - tools. This includes a web-based graphical user interface. - -Package: proxmox-backup-client -Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends} -Description: Proxmox Backup Client tools - This package contains the Proxmox Backup client, which provides a - simple command line tool to create and restore backups. - -Package: proxmox-backup-docs -Build-Profiles: -Section: doc -Depends: libjs-extjs, - ${misc:Depends}, -Architecture: all -Description: Proxmox Backup Documentation - This package contains the Proxmox Backup Documentation files. diff --git a/debian/control.in b/debian/control.in new file mode 100644 index 00000000..6fc7461a --- /dev/null +++ b/debian/control.in @@ -0,0 +1,28 @@ +Package: proxmox-backup-server +Architecture: any +Depends: fonts-font-awesome, + libjs-extjs (>= 6.0.1), + libzstd1 (>= 1.3.8), + proxmox-mini-journalreader, + proxmox-widget-toolkit, + ${misc:Depends}, + ${shlibs:Depends}, +Description: Proxmox Backup Server daemon with tools and GUI + This package contains the Proxmox Backup Server daemons and related + tools. This includes a web-based graphical user interface. + +Package: proxmox-backup-client +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Proxmox Backup Client tools + This package contains the Proxmox Backup client, which provides a + simple command line tool to create and restore backups. + +Package: proxmox-backup-docs +Build-Profiles: +Section: doc +Depends: libjs-extjs, + ${misc:Depends}, +Architecture: all +Description: Proxmox Backup Documentation + This package contains the Proxmox Backup Documentation files. diff --git a/debian/debcargo.toml b/debian/debcargo.toml new file mode 100644 index 00000000..43eb88ce --- /dev/null +++ b/debian/debcargo.toml @@ -0,0 +1,18 @@ +overlay = "." +crate_src_path = ".." +whitelist = ["tests/*.c"] + +# needed for pinutils alpha +allow_prerelease_deps = true + +[source] +# TODO: update once public +vcs_git = "" +vcs_browser = "" +maintainer = "Proxmox Support Team " +section = "admin" +build_depends = [ "debhelper (>= 12~)", "bash-completion" ] +build_depends_excludes = [ "debhelper (>=11)" ] + +[packages.lib] +depends = [ "libacl1-dev", "libsystemd-dev", "libfuse3-dev", "uuid-dev" ] diff --git a/debian/rules b/debian/rules index 9f5cc20a..7d0067db 100755 --- a/debian/rules +++ b/debian/rules @@ -21,8 +21,6 @@ export DEB_CARGO_PACKAGE=proxmox-backup dh $@ --with=bash-completion override_dh_auto_configure: - sed -ie 's!proxmox = { git = "ssh://gitolite3@proxdev.maurer-it.com/rust/proxmox",!proxmox = {!' Cargo.toml - sed -ie 's!valgrind.*!!' Cargo.toml $(CARGO) prepare-debian $(CURDIR)/debian/cargo_registry --link-from-system dh_auto_configure