$(addprefix $(COMPILEDIR)/,$(SERVICE_BIN))
DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
-DSC=rust-$(PACKAGE)_$(DEB_VERSION).dsc
+DSC=$(PACKAGE)_$(DEB_VERSION).dsc
+
+BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
all: cargo-build $(SUBDIRS)
.PHONY: check
check: test
-.PHONY: san
-san:
- cargo +nightly fmt -- --check
- cargo clippy
- cargo test
-
$(COMPILED_BINS): cargo-build
install: $(COMPILED_BINS)
$(foreach i,$(SERVICE_BIN), \
install -m755 $(COMPILEDIR)/$(i) $(DESTDIR)$(LIBEXECDIR)/pve-lxc-syscalld/ ;)
-.PHONY: build
-build:
- rm -rf build
- debcargo package \
- --config debian/debcargo.toml \
- --changelog-ready \
- --no-overlay-write-back \
- --directory build \
- pve-lxc-syscalld \
- $(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
- echo system >build/rust-toolchain
- $(foreach i,$(SUBDIRS), \
- $(MAKE) -C build/$(i) clean ;)
+$(BUILDDIR): src debian etc Cargo.toml
+ rm -rf $(BUILDDIR) $(BUILDDIR).tmp
+ mkdir $(BUILDDIR).tmp
+ #mkdir $(BUILDDIR).tmp/.cargo
+ cp -a -t $(BUILDDIR).tmp $^ Makefile defines.mk
+ #cp -a -t $(BUILDDIR).tmp/.cargo .cargo/config
+ echo "git clone git://git.proxmox.com/git/pve-lxc-syscalld.git\\ngit checkout $(shell git rev-parse HEAD)" > $(BUILDDIR).tmp/debian/SOURCE
+ mv $(BUILDDIR).tmp $(BUILDDIR)
.PHONY: deb
deb: $(DEB)
-$(DEB): build
- cd build; dpkg-buildpackage -b -us -uc --no-pre-clean --build-profiles=nodoc
+$(DEB): $(BUILDDIR)
+ cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
lintian $(DEB)
-upload: deb
- dcmd --deb rust-pve-lxc-syscalld_*.changes \
- | grep -v '.changes$$' \
- | tar -cf- -T- \
- | ssh -X repoman@repo.proxmox.com upload --product pve --dist bullseye
-
.PHONY: dsc
dsc: $(DSC)
-$(DSC): build
- cd build; dpkg-buildpackage -S -us -uc -d -nc
+$(DSC): $(BUILDDIR)
+ cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
lintian $(DSC)
+sbuild: $(DSC)
+ sbuild $(DSC)
+
+.PHONY: upload
+upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
+upload: $(DEB)
+ dcmd --deb pve-lxc-syscalld_*.changes \
+ | grep -v '.changes$$' \
+ | tar -cf- -T- \
+ | ssh -X repoman@repo.proxmox.com upload --product pve --dist $(UPLOAD_DIST)
+
.PHONY: dinstall
dinstall:
$(MAKE) deb
clean:
$(foreach i,$(SUBDIRS), \
$(MAKE) -C $(i) clean ;)
- cargo clean
- rm -rf *.deb *.dsc *.tar.gz *.buildinfo *.changes build
+ rm -rf ./target
+ rm -rf ./$(BUILDDIR)
+ rm -f -- *.deb *.dsc *.tar.?z *.buildinfo *.build *.changes
--- /dev/null
+Source: pve-lxc-syscalld
+Section: admin
+Priority: optional
+Build-Depends: debhelper-compat (= 13),
+ bash-completion,
+ libsystemd-dev,
+ dh-cargo (>= 25),
+ cargo:native,
+ rustc:native,
+ libstd-rust-dev,
+ librust-anyhow-1+default-dev,
+ librust-bitflags-1+default-dev (>= 1.2-~~),
+ librust-lazy-static-1+default-dev (>= 1.4-~~),
+ librust-libc-0.2+default-dev,
+ librust-nix-0.26+default-dev,
+ librust-num-cpus-1+default-dev,
+ librust-tokio-1+default-dev,
+ librust-tokio-1+io-util-dev,
+ librust-tokio-1+net-dev,
+ librust-tokio-1+rt-multi-thread-dev,
+Maintainer: Proxmox Support Team <support@proxmox.com>
+Standards-Version: 4.6.1
+Vcs-Git: git://git.proxmox.com/git/pve-lxc-syscalld.git
+Vcs-Browser: https://git.proxmox.com/?p=pve-lxc-syscalld.git;a=summary
+Homepage: https://www.proxmox.com
+Rules-Requires-Root: no
+
+Package: pve-lxc-syscalld
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends},
+Description: PVE LXC syscall daemon
+ A daemon which handles a selected subset of syscalls for unprivileged
+ containers.
+++ /dev/null
-Package: pve-lxc-syscalld
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends},
-Description: PVE LXC syscall daemon
- A daemon which handles a selected subset of syscalls for unprivileged
- containers.
-Copyright (C) 2019,2020 Proxmox Server Solutions GmbH
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-This software is written by Proxmox Server Solutions GmbH <support@proxmox.com>
-
-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 <http://www.gnu.org/licenses/>.
+Files:
+ *
+Copyright: 2019 - 2023 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/>.
+++ /dev/null
-overlay = "."
-crate_src_path = ".."
-maintainer = "Proxmox Support Team <support@proxmox.com>"
-
-[source]
-section = "admin"
-build_depends = [ "debhelper (>= 12~)", "bash-completion", "libsystemd-dev" ]
-build_depends_excludes = [ "debhelper (>=11)" ]
-# TODO:
-vcs_git = ""
-vcs_browser = ""
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
-3.0 (quilt)
+3.0 (native)
+++ /dev/null
-edition = "2018"