From: Aaron Lauterer <a.lauterer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH proxmox-rrd-migration-tool v4 3/3] add debian packaging
Date: Sat, 26 Jul 2025 03:05:58 +0200 [thread overview]
Message-ID: <20250726010626.1496866-4-a.lauterer@proxmox.com> (raw)
In-Reply-To: <20250726010626.1496866-1-a.lauterer@proxmox.com>
based on the termproxy packaging. Nothing fancy so far.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
Notes:
I added the links to the repos even though they don't exist yet. So if
the package and repo name is to change. make sure to adapt those :)
Cargo.toml | 4 +-
Makefile | 89 ++++++++++++++++++++++++++++++++++++++++++++
debian/changelog | 5 +++
debian/control | 27 ++++++++++++++
debian/copyright | 19 ++++++++++
debian/docs | 1 +
debian/links | 1 +
debian/rules | 30 +++++++++++++++
debian/source/format | 1 +
9 files changed, 175 insertions(+), 2 deletions(-)
create mode 100644 Makefile
create mode 100644 debian/changelog
create mode 100644 debian/control
create mode 100644 debian/copyright
create mode 100644 debian/docs
create mode 100644 debian/links
create mode 100755 debian/rules
create mode 100644 debian/source/format
diff --git a/Cargo.toml b/Cargo.toml
index a24b79c..e2d49a9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
-name = "proxmox_rrd_migration_8-9"
-version = "0.1.0"
+name = "proxmox-rrd-migration-tool"
+version = "1.0.0"
edition = "2021"
authors = [
"Aaron Lauterer <a.lauterer@proxmox.com>",
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..abce415
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,89 @@
+include /usr/share/dpkg/default.mk
+
+PACKAGE="proxmox-rrd-migration-tool"
+CRATENAME="proxmox-rrd-migration-tool"
+
+BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
+ORIG_SRC_TAR=$(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz
+
+DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
+DBG_DEB=$(PACKAGE)-dbgsym_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
+DSC=$(PACKAGE)_$(DEB_VERSION).dsc
+
+CARGO ?= cargo
+ifeq ($(BUILD_MODE), release)
+CARGO_BUILD_ARGS += --release
+COMPILEDIR := target/release
+else
+COMPILEDIR := target/debug
+endif
+
+PREFIX = /usr
+LIBEXECDIR = $(PREFIX)/libexec
+PROXMOX_LIBEXECDIR = $(LIBEXECDIR)/proxmox
+
+PROXMOX_RRD_MIGRATION_TOOL_BIN := $(addprefix $(COMPILEDIR)/,proxmox-rrd-migration-tool)
+
+all:
+
+install: $(PROXMOX_RRD_MIGRATION_TOOL_BIN)
+ install -dm755 $(DESTDIR)$(PROXMOX_LIBEXECDIR)
+ install -m755 $(PROXMOX_RRD_MIGRATION_TOOL_BIN) $(DESTDIR)$(PROXMOX_LIBEXECDIR)/
+
+$(PROXMOX_RRD_MIGRATION_TOOL_BIN): .do-cargo-build
+.do-cargo-build:
+ $(CARGO) build $(CARGO_BUILD_ARGS)
+ touch .do-cargo-build
+
+
+.PHONY: cargo-build
+cargo-build: .do-cargo-build
+
+$(BUILDDIR):
+ rm -rf $@ $@.tmp
+ mkdir $@.tmp
+ cp -a debian/ src/ Makefile Cargo.toml wrapper.h build.rs $@.tmp
+ echo "git clone git://git.proxmox.com/git/proxmox-rrd-migration-tool.git\\ngit checkout $$(git rev-parse HEAD)" \
+ > $@.tmp/debian/SOURCE
+ mv $@.tmp $@
+
+
+$(ORIG_SRC_TAR): $(BUILDDIR)
+ tar czf $(ORIG_SRC_TAR) --exclude="$(BUILDDIR)/debian" $(BUILDDIR)
+
+.PHONY: deb
+deb: $(DEB)
+$(DEB) $(DBG_DEB) &: $(BUILDDIR)
+ cd $(BUILDDIR); dpkg-buildpackage -b -uc -us
+ lintian $(DEB)
+ @echo $(DEB)
+
+.PHONY: dsc
+dsc:
+ rm -rf $(DSC) $(BUILDDIR)
+ $(MAKE) $(DSC)
+ lintian $(DSC)
+
+$(DSC): $(BUILDDIR) $(ORIG_SRC_TAR)
+ cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
+
+sbuild: $(DSC)
+ sbuild $(DSC)
+
+.PHONY: upload
+upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
+upload: $(DEB) $(DBG_DEB)
+ tar cf - $(DEB) $(DBG_DEB) |ssh -X repoman@repo.proxmox.com -- upload --product pve --dist $(UPLOAD_DIST) --arch $(DEB_HOST_ARCH)
+
+.PHONY: clean distclean
+distclean: clean
+clean:
+ $(CARGO) clean
+ rm -rf $(PACKAGE)-[0-9]*/ build/
+ rm -f *.deb *.changes *.dsc *.tar.* *.buildinfo *.build .do-cargo-build
+ rm -rf tmp_tests
+ rm -rf target
+
+.PHONY: dinstall
+dinstall: deb
+ dpkg -i $(DEB)
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..b82648a
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+proxmox-rrd-migration-tool (1.0.0) unstable; urgency=medium
+
+ * Initial release.
+
+ -- Proxmox Support Team <support@proxmox.com> Mon, 21 Jul 2025 13:56:37 +0200
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..8f26878
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,27 @@
+Source: proxmox-rrd-migration-tool
+Section: admin
+Priority: optional
+Build-Depends: cargo:native,
+ debhelper-compat (= 13),
+ dh-cargo (>= 25),
+ librust-anyhow-1+default-dev,
+ librust-bindgen-dev,
+ librust-libc-0.2+default-dev (>= 0.2.107-~~),
+ librust-pico-args-0.5+default-dev,
+ librust-pkg-config-dev,
+ librust-proxmox-async-dev,
+ libstd-rust-dev,
+ rustc:native,
+Maintainer: Proxmox Support Team <support@proxmox.com>
+Standards-Version: 4.6.1
+Vcs-Git: git://git.proxmox.com/git/proxmox-rrd-migration-tool.git
+Vcs-Browser: https://git.proxmox.com/?p=proxmox-rrd-migration-tool.git;a=summary
+Homepage: https://www.proxmox.com
+Rules-Requires-Root: no
+
+Package: proxmox-rrd-migration-tool
+Architecture: any
+Multi-Arch: allowed
+Depends: ${misc:Depends}, ${shlibs:Depends},
+Description: Tool to migrate RRD data on Proxmox VE hosts from pre version 8
+ to new version 9 files.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..451848c
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,19 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Source: https://git.proxmox.com/git/proxmox-rrd-migration-tool.git;a=summary
+
+Files:
+ *
+Copyright: 2017 - 2025 Proxmox Server Solutions GmbH <support@proxmox.com>
+License: AGPL-3.0-or-later
+ This program is free software: you can redistribute it and/or modify it under
+ the terms of the GNU Affero General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option) any
+ later version.
+ .
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
+ details.
+ .
+ You should have received a copy of the GNU Affero General Public License along
+ with this program. If not, see <https://www.gnu.org/licenses/>.
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..8696672
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1 @@
+debian/SOURCE
diff --git a/debian/links b/debian/links
new file mode 100644
index 0000000..9e59b57
--- /dev/null
+++ b/debian/links
@@ -0,0 +1 @@
+usr/libexec/proxmox/proxmox-rrd-migration-tool usr/bin/proxmox-rrd-migration-tool
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..ec264eb
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,30 @@
+#!/usr/bin/make -f
+# See debhelper(7) (uncomment to enable)
+# output every command that modifies files on the build system.
+DH_VERBOSE = 1
+
+include /usr/share/dpkg/pkg-info.mk
+include /usr/share/rustc/architecture.mk
+
+export BUILD_MODE=release
+
+CARGO=/usr/share/cargo/bin/cargo
+
+export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
+export DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE
+export CARGO_HOME = $(CURDIR)/debian/cargo_home
+
+export DEB_CARGO_CRATE=proxmox-rrd-migration-tool_$(DEB_VERSION_UPSTREAM)
+export DEB_CARGO_PACKAGE=proxmox-rrd-migration-tool
+
+%:
+ dh $@
+
+override_dh_auto_configure:
+ @perl -ne 'if (/^version\s*=\s*"(\d+(?:\.\d+)+)"/) { my $$v_cargo = $$1; my $$v_deb = "$(DEB_VERSION_UPSTREAM)"; \
+ die "ERROR: d/changelog <-> Cargo.toml version mismatch: $$v_cargo != $$v_deb\n" if $$v_cargo ne $$v_deb; exit(0); }' Cargo.toml
+ $(CARGO) prepare-debian $(CURDIR)/debian/cargo_registry --link-from-system
+ dh_auto_configure
+
+override_dh_missing:
+ dh_missing --fail-missing
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-07-26 1:05 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-26 1:05 [pve-devel] [PATCH many v4 00/31] Expand and migrate RRD data and add/change summary graphs Aaron Lauterer
2025-07-26 1:05 ` [pve-devel] [PATCH proxmox-rrd-migration-tool v4 1/3] create proxmox-rrd-migration-tool Aaron Lauterer
2025-07-28 14:25 ` Lukas Wagner
2025-07-26 1:05 ` [pve-devel] [PATCH proxmox-rrd-migration-tool v4 2/3] add first tests Aaron Lauterer
2025-07-28 14:52 ` Lukas Wagner
2025-07-26 1:05 ` Aaron Lauterer [this message]
2025-07-28 14:36 ` [pve-devel] [PATCH proxmox-rrd-migration-tool v4 3/3] add debian packaging Lukas Wagner
2025-07-29 9:29 ` Thomas Lamprecht
2025-07-29 9:49 ` Lukas Wagner
2025-07-30 17:57 ` [pve-devel] applied: " Thomas Lamprecht
2025-07-26 1:05 ` [pve-devel] [PATCH cluster v4 1/2] status: introduce new pve-{type}- rrd and metric format Aaron Lauterer
2025-07-29 9:44 ` Lukas Wagner
2025-07-30 11:21 ` Lukas Wagner
2025-07-31 3:23 ` Thomas Lamprecht
2025-07-26 1:06 ` [pve-devel] [PATCH cluster v4 2/2] rrd: adapt to new RRD format with different aggregation windows Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH widget-toolkit v4 1/4] rrdchart: allow to override the series object Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH widget-toolkit v4 2/4] rrdchart: use reference for undo button Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH widget-toolkit v4 3/4] rrdchard: set cursor pointer for legend Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH widget-toolkit v4 4/4] rrdchart: add dummy listener for legend clicks Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 01/15] pvestatd: collect and distribute new pve-{type}-9.0 metrics Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 02/15] api: nodes: rrd and rrddata add decade option and use new pve-node-9.0 rrd files Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 03/15] api2tools: extract_vm_status add new vm memhost column Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 04/15] ui: rrdmodels: add new columns and update existing Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 05/15] ui: node summary: use stacked memory graph with zfs arc Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 06/15] ui: add pressure graphs to node and guest summary Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 07/15] ui: GuestStatusView: add memhost for VM guests Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 08/15] ui: GuestSummary: memory switch to stacked and add hostmem Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 09/15] ui: GuestSummary: remember visibility of host memory view Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 10/15] ui: nodesummary: guestsummary: add tooltip info buttons Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 11/15] ui: summaries: use titles for disk and network series Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 12/15] fix #6068: ui: utils: calculate and render host memory usage correctly Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 13/15] d/control: require proxmox-rrd-migration-tool >= 1.0.0 Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 14/15] d/postinst: run promox-rrd-migration-tool Aaron Lauterer
2025-07-29 12:09 ` Lukas Wagner
2025-07-26 1:06 ` [pve-devel] [PATCH manager stabe-8+master v4 15/15] pve8to9: add checkfs for RRD migration Aaron Lauterer
2025-07-29 8:15 ` Lukas Wagner
2025-07-29 9:16 ` Thomas Lamprecht
2025-07-26 1:06 ` [pve-devel] [PATCH storage v4 1/1] status: rrddata: use new pve-storage-9.0 rrd location if file is present Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH qemu-server v4 1/4] metrics: add pressure to metrics Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH qemu-server v4 2/4] vmstatus: add memhost for host view of vm mem consumption Aaron Lauterer
2025-07-29 12:49 ` Lukas Wagner
2025-07-31 3:37 ` Thomas Lamprecht
2025-07-31 6:51 ` Lukas Wagner
2025-07-26 1:06 ` [pve-devel] [PATCH qemu-server v4 3/4] vmstatus: switch mem stat to PSS of VM cgroup Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH qemu-server v4 4/4] rrddata: use new pve-vm-9.0 rrd location if file is present Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH container v4 1/2] metrics: add pressures to metrics Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH container v4 2/2] rrddata: use new pve-vm-9.0 rrd location if file is present Aaron Lauterer
2025-07-28 14:42 ` [pve-devel] [PATCH many v4 00/31] Expand and migrate RRD data and add/change summary graphs Thomas Lamprecht
2025-07-29 12:19 ` Lukas Wagner
2025-07-31 4:12 ` [pve-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250726010626.1496866-4-a.lauterer@proxmox.com \
--to=a.lauterer@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.