Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
# Cargo build directory
/target

# Local Debian packages
/dist/debian/

# Prefetched crates and debhelper build state
/.debian-cargo-home/
/debian/.debhelper/
/debian/debhelper-build-stamp
/debian/files
/debian/podlet/
/debian/podlet-dbgsym/
/debian/*.debhelper
/debian/*.log
/debian/*.substvars

# VS Code user settings
/.vscode

Expand Down
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
podlet (0.3.2-1) UNRELEASED; urgency=medium

* Add debhelper packaging with locked, offline Cargo builds.

-- Joe Ma <rikkaneko23@gmail.com> Tue, 10 Nov 2026 14:51:56 +0800
1 change: 1 addition & 0 deletions debian/clean
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/debian/
19 changes: 19 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Source: podlet
Section: utils
Priority: optional
Maintainer: Joe Ma <rikkaneko23@gmail.com>
Build-Depends:
debhelper-compat (= 13),
cargo (>= 1.85),
rustc (>= 1.85),
Standards-Version: 4.7.0
Rules-Requires-Root: no
Homepage: https://github.com/containers/podlet

Package: podlet
Architecture: amd64 arm64
Depends: ${shlibs:Depends}, ${misc:Depends}
Recommends: podman
Description: Generate Podman Quadlet files
Converts Podman commands, Compose files, and existing Podman objects
into Podman Quadlet files.
380 changes: 380 additions & 0 deletions debian/copyright

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions debian/podlet.docs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
README.md
1 change: 1 addition & 0 deletions debian/podlet.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/debian/${env:DEB_HOST_RUST_TYPE}/release/podlet usr/bin
42 changes: 42 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk
include /usr/share/rustc/architecture.mk

# These definitions support native Debian 13 builds on the two published architectures.
ifeq ($(filter $(DEB_HOST_ARCH),amd64 arm64),)
$(error Unsupported architecture $(DEB_HOST_ARCH); use amd64 or arm64)
endif
ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
$(error Cross-compilation is not supported; build on the target architecture)
endif

export DEB_BUILD_MAINT_OPTIONS := hardening=+all
include /usr/share/dpkg/buildflags.mk

# Prefetch into this local cache before dpkg-buildpackage; build and test never fetch crates.
export CARGO_HOME := $(CURDIR)/.debian-cargo-home
export CARGO_TARGET_DIR := $(CURDIR)/target/debian
export CARGO_NET_OFFLINE := true
export DEB_HOST_RUST_TYPE
export CARGO_PROFILE_RELEASE_DEBUG := 2
export CARGO_PROFILE_RELEASE_STRIP := none
export RUSTFLAGS := -C debuginfo=2 $(foreach flag,$(LDFLAGS),-C link-arg=$(flag))
unexport CARGO_ENCODED_RUSTFLAGS
JOBS := $(or $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))),1)

# Inline make recipes avoid tab indentation; dh owns the standard packaging sequence.
%:; dh $@ --buildsystem=none;

override_dh_auto_build:; cargo build --release --locked --offline --target $(DEB_HOST_RUST_TYPE) --jobs $(JOBS);

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:; cargo test --release --locked --offline --target $(DEB_HOST_RUST_TYPE) --jobs $(JOBS);
else
override_dh_auto_test:;
endif

override_dh_installchangelogs:; dh_installchangelogs CHANGELOG.md;

# dpkg-buildpackage cleans before building; the prefetched registry must survive that clean.
override_dh_clean:; dh_clean --exclude=.debian-cargo-home;
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)