]> git.proxmox.com Git - proxmox-backup.git/commitdiff
switch to debcargo for generating d/control
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 15 Jan 2020 09:29:57 +0000 (10:29 +0100)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 21 Jan 2020 10:45:26 +0000 (11:45 +0100)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Cargo.toml
Makefile
debian/changelog
debian/control [deleted file]
debian/control.in [new file with mode: 0644]
debian/debcargo.toml [new file with mode: 0644]
debian/rules

index f343091ff283fe23c71aae58b55fa6be2d67b987..076fe0cac099e43419faaae6c4bfb758b639d7bc 100644 (file)
@@ -3,6 +3,11 @@ name = "proxmox-backup"
 version = "0.1.2"
 authors = ["Dietmar Maurer <dietmar@proxmox.com>"]
 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"]
index 93fb19ab92090b78b089117eff895fe807192650..537d34f781cc887f2fa12fae1c2954b80f668d75 100644 (file)
--- 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
index 26f7f4e2af14b625ee7f17fb1608073eb5fca327..aa448bd2f941bf8af535837f063d3c2a9f16423d 100644 (file)
@@ -1,3 +1,9 @@
+rust-proxmox-backup (0.1.2-1) unstable; urgency=medium
+
+  * switch to debcargo to generate build-dependencies
+
+ -- Proxmox Support Team <support@proxmox.com>  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 (file)
index 2802a87..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-Source: proxmox-backup
-Section: admin
-Priority: optional
-Maintainer: Proxmox Support Team <support@proxmox.com>
-Build-Depends: bash-completion,
-               debhelper (>= 12),
-               graphviz <!nodoc>,
-               latexmk <!nodoc>,
-               libacl1-dev,
-               libfuse3-dev,
-               libsystemd-dev,
-               uuid-dev,
-               pkg-config,
-               python3-docutils <!nodoc>,
-               python3-sphinx <!nodoc>,
-               rsync,
-               texlive-latex-extra <!nodoc>,
-               texlive-latex-recommended <!nodoc>,
-               texlive-fonts-recommended <!nodoc>,
-               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: <!nodoc>
-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 (file)
index 0000000..6fc7461
--- /dev/null
@@ -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: <!nodoc>
+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 (file)
index 0000000..43eb88c
--- /dev/null
@@ -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 <support@proxmox.com>"
+section = "admin"
+build_depends = [ "debhelper (>= 12~)", "bash-completion" ]
+build_depends_excludes = [ "debhelper (>=11)" ]
+
+[packages.lib]
+depends = [ "libacl1-dev", "libsystemd-dev", "libfuse3-dev", "uuid-dev" ]
index 9f5cc20aa8f5c48b28a4839ca7e34db229680554..7d0067dbc74c3ee621d815f10a2186240da1e436 100755 (executable)
@@ -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