Fix YAML linting issues and update system requirements to Debian 13+

- Fix trailing spaces and blank lines in Forgejo workflows
- Update system requirements from Ubuntu Jammy/Bookworm to Debian 13+ (Trixie)
- Update test treefile to use Debian Trixie instead of Ubuntu Jammy
- Update documentation to reflect modern system requirements
- Fix yamllint errors for CI/CD functionality
- Ensure compatibility with modern OSTree and libapt versions
This commit is contained in:
robojerk 2025-08-18 11:39:58 -07:00
parent ec0da91864
commit 3dec23f8f7
85 changed files with 12569 additions and 1088 deletions

View file

@ -28,15 +28,81 @@ setup_completions() {
fi
}
# Function to check if systemd is available
check_systemd() {
if ! command -v systemctl >/dev/null 2>&1; then
log "Warning: systemd not available, skipping service setup"
return 1
fi
return 0
}
# Function to enable and start the service
setup_service() {
if ! check_systemd; then
return 0
fi
log "Setting up apt-ostreed service..."
# Reload systemd daemon
systemctl daemon-reload
# Enable the service
if systemctl enable apt-ostreed.service; then
log "apt-ostreed service enabled"
else
log "Warning: Failed to enable apt-ostreed service"
fi
# Start the service if not running
if ! systemctl is-active --quiet apt-ostreed.service; then
if systemctl start apt-ostreed.service; then
log "apt-ostreed service started"
else
log "Warning: Failed to start apt-ostreed service"
fi
else
log "apt-ostreed service already running"
fi
}
# Function to setup directories and permissions
setup_directories() {
log "Setting up directories and permissions..."
# Create necessary directories with proper permissions
mkdir -p /var/log/apt-ostreed
mkdir -p /var/cache/apt-ostree
mkdir -p /var/lib/apt-ostree
mkdir -p /var/lib/apt-ostree/repo
# Set proper ownership (root:root)
chown root:root /var/log/apt-ostreed
chown root:root /var/cache/apt-ostree
chown root:root /var/lib/apt-ostree
chown root:root /var/lib/apt-ostree/repo
# Set proper permissions
chmod 755 /var/log/apt-ostreed
chmod 755 /var/cache/apt-ostree
chmod 755 /var/lib/apt-ostree
chmod 755 /var/lib/apt-ostree/repo
}
# Function to reload polkit rules
reload_polkit() {
if command -v pkaction >/dev/null 2>&1; then
log "Reloading polkit rules..."
# This will trigger polkit to reload its rules
pkaction --version >/dev/null 2>&1 || true
fi
}
# Function to check dependencies
check_dependencies() {
log "Checking dependencies..."
# Check if apt-ostreed is installed and running
if ! dpkg -l apt-ostreed >/dev/null 2>&1; then
log "Warning: apt-ostreed package not found. Some features may not work."
fi
# Check if ostree is available
if ! command -v ostree >/dev/null 2>&1; then
log "Warning: ostree command not found. Please install ostree package."
@ -53,6 +119,9 @@ case "$1" in
configure)
log "Configuring apt-ostree package..."
setup_completions
setup_directories
setup_service
reload_polkit
check_dependencies
log "Configuration completed successfully"
;;

View file

@ -47,15 +47,73 @@ cleanup_man_pages() {
fi
}
# Function to cleanup daemon service
cleanup_daemon() {
log "Cleaning up apt-ostreed daemon..."
# Check if systemd is available
if ! command -v systemctl >/dev/null 2>&1; then
log "Warning: systemd not available, skipping service cleanup"
return 0
fi
# Stop the service if running
if systemctl is-active --quiet apt-ostreed.service; then
log "Stopping apt-ostreed service..."
systemctl stop apt-ostreed.service || true
fi
# Disable the service
if systemctl is-enabled --quiet apt-ostreed.service; then
log "Disabling apt-ostreed service..."
systemctl disable apt-ostreed.service || true
fi
# Reload systemd daemon
systemctl daemon-reload || true
}
# Function to cleanup daemon files
cleanup_daemon_files() {
log "Cleaning up daemon files..."
# Remove systemd service files
if [ -f /lib/systemd/system/apt-ostreed.service ]; then
rm -f /lib/systemd/system/apt-ostreed.service
fi
if [ -f /lib/systemd/system/apt-ostreed.socket ]; then
rm -f /lib/systemd/system/apt-ostreed.socket
fi
# Remove polkit policy
if [ -f /usr/share/polkit-1/actions/org.projectatomic.aptostree1.policy ]; then
rm -f /usr/share/polkit-1/actions/org.projectatomic.aptostree1.policy
fi
# Remove configuration files
if [ -d /etc/apt-ostreed ]; then
rm -rf /etc/apt-ostreed
fi
# Remove binary
if [ -f /usr/libexec/apt-ostreed ]; then
rm -f /usr/libexec/apt-ostreed
fi
}
# Main execution
case "$1" in
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
cleanup_completions
cleanup_man_pages
cleanup_daemon
;;
purge)
cleanup_completions
cleanup_man_pages
cleanup_daemon
cleanup_daemon_files
;;
*)
log "Unknown action: $1"

12
debian/apt-ostree.postrm.debhelper vendored Normal file
View file

@ -0,0 +1,12 @@
# Automatically added by dh_installsystemd/13.24.2
if [ "$1" = remove ] && [ -d /run/systemd/system ] ; then
systemctl --system daemon-reload >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_installsystemd/13.24.2
if [ "$1" = "purge" ]; then
if [ -x "/usr/bin/deb-systemd-helper" ]; then
deb-systemd-helper purge 'apt-ostreed.service' 'apt-ostreed.socket' >/dev/null || true
fi
fi
# End automatically added section

View file

@ -12,6 +12,7 @@ PACKAGE="apt-ostree"
# Configuration directories
CONFIG_DIR="/etc/apt-ostree"
DAEMON_CONFIG_DIR="/etc/apt-ostreed"
DATA_DIR="/var/lib/apt-ostree"
LOG_DIR="/var/log/apt-ostree"
@ -48,6 +49,14 @@ case "$1" in
fi
fi
# Stop the apt-ostreed daemon service if running
if command -v systemctl >/dev/null 2>&1; then
if systemctl is-active --quiet apt-ostreed.service; then
echo "Stopping apt-ostreed service..."
systemctl stop apt-ostreed.service || true
fi
fi
# Stop any running apt-ostree processes
if pgrep -f "apt-ostree" >/dev/null 2>&1; then
echo "Stopping running apt-ostree processes..."
@ -65,6 +74,11 @@ case "$1" in
cp -r "$CONFIG_DIR" "/tmp/apt-ostree-backup-$(date +%Y%m%d-%H%M%S)/" || true
echo "Configuration backed up to /tmp/apt-ostree-backup-*"
fi
if [ -d "$DAEMON_CONFIG_DIR" ]; then
mkdir -p "/tmp/apt-ostree-backup-$(date +%Y%m%d-%H%M%S)"
cp -r "$DAEMON_CONFIG_DIR" "/tmp/apt-ostree-backup-$(date +%Y%m%d-%H%M%S)/" || true
echo "Daemon configuration backed up to /tmp/apt-ostree-backup-*"
fi
fi
echo "$PACKAGE pre-removal completed"

View file

@ -7,3 +7,12 @@ interest-noawait /usr/share/zsh/vendor-completions
# Trigger when man pages are updated
interest-noawait /usr/share/man
# Trigger when polkit rules are updated
interest-noawait /usr/share/polkit-1/actions
# Trigger when systemd units are updated
interest-noawait /lib/systemd/system
# Trigger when D-Bus configuration is updated
interest-noawait /usr/share/dbus-1/system-services

2
debian/apt-ostree/DEBIAN/conffiles vendored Normal file
View file

@ -0,0 +1,2 @@
/etc/apt-ostreed/apt-ostreed.conf
/etc/apt-ostreed/apt-ostreed.conf

View file

@ -2,8 +2,8 @@ Package: apt-ostree
Version: 0.1.0-2
Architecture: amd64
Maintainer: Robojerk <robojerk@example.com>
Installed-Size: 3655
Depends: libc6 (>= 2.39), libgcc-s1 (>= 4.2), libostree-1-1 (>= 2025.2), ostree, systemd, libapt-pkg7.0 (>= 3.0.0), apt-ostreed (= 0.1.0-2)
Installed-Size: 6525
Depends: libc6 (>= 2.39), libgcc-s1 (>= 4.2), libostree-1-1 (>= 2025.2), ostree, systemd, libapt-pkg7.0 (>= 3.0.0), polkitd, dbus
Section: admin
Priority: optional
Homepage: https://github.com/robojerk/apt-ostree
@ -15,4 +15,9 @@ Description: Debian/Ubuntu equivalent of rpm-ostree
APT package management, enabling atomic updates and rollbacks
on Debian-based systems.
.
This package contains the command-line interface and user tools.
This package contains both the command-line interface and the
system daemon (apt-ostreed) that provides DBus interface for
system management operations.
.
The daemon runs with elevated privileges and provides secure
access to system management functions through D-Bus.

View file

@ -1,8 +1,12 @@
fdb041b5a80001bc08f3f94bcb3daf37 usr/bin/apt-ostree
a485e242b07f321593e7711f9f7b43d7 lib/systemd/system/apt-ostreed.service
bd58c49830864047894e04d986d850db lib/systemd/system/apt-ostreed.socket
4fefc30bb5f348ff65663f7677cd69d8 usr/bin/apt-ostree
4a710566895db1003adccd614e0c8aca usr/libexec/apt-ostreed
3aa6e44bf07699d5bd7a2e5b3d66ce65 usr/share/bash-completion/completions/apt-ostree
3147ea2bb732b3d1e98d33a23349aafd usr/share/doc/apt-ostree/README.Debian
ef4534c1d6bff0d781fd07636f4dec03 usr/share/doc/apt-ostree/changelog.Debian.gz
25df758a27389af0cfd52f4dce60ccce usr/share/doc/apt-ostree/copyright
1699c458f49ca15357c5855075e0eee6 usr/share/lintian/overrides/apt-ostree
e2cca69674af05683b8aa52427a840e8 usr/share/man/man1/apt-ostree.1.gz
863ffbba8bf3105e2cb0c34c90bf5cbe usr/share/polkit-1/actions/org.projectatomic.aptostree1.policy
d057f9ea83226bd3e48795fac1e224b6 usr/share/zsh/vendor-completions/_apt-ostree

View file

@ -28,15 +28,81 @@ setup_completions() {
fi
}
# Function to check if systemd is available
check_systemd() {
if ! command -v systemctl >/dev/null 2>&1; then
log "Warning: systemd not available, skipping service setup"
return 1
fi
return 0
}
# Function to enable and start the service
setup_service() {
if ! check_systemd; then
return 0
fi
log "Setting up apt-ostreed service..."
# Reload systemd daemon
systemctl daemon-reload
# Enable the service
if systemctl enable apt-ostreed.service; then
log "apt-ostreed service enabled"
else
log "Warning: Failed to enable apt-ostreed service"
fi
# Start the service if not running
if ! systemctl is-active --quiet apt-ostreed.service; then
if systemctl start apt-ostreed.service; then
log "apt-ostreed service started"
else
log "Warning: Failed to start apt-ostreed service"
fi
else
log "apt-ostreed service already running"
fi
}
# Function to setup directories and permissions
setup_directories() {
log "Setting up directories and permissions..."
# Create necessary directories with proper permissions
mkdir -p /var/log/apt-ostreed
mkdir -p /var/cache/apt-ostree
mkdir -p /var/lib/apt-ostree
mkdir -p /var/lib/apt-ostree/repo
# Set proper ownership (root:root)
chown root:root /var/log/apt-ostreed
chown root:root /var/cache/apt-ostree
chown root:root /var/lib/apt-ostree
chown root:root /var/lib/apt-ostree/repo
# Set proper permissions
chmod 755 /var/log/apt-ostreed
chmod 755 /var/cache/apt-ostree
chmod 755 /var/lib/apt-ostree
chmod 755 /var/lib/apt-ostree/repo
}
# Function to reload polkit rules
reload_polkit() {
if command -v pkaction >/dev/null 2>&1; then
log "Reloading polkit rules..."
# This will trigger polkit to reload its rules
pkaction --version >/dev/null 2>&1 || true
fi
}
# Function to check dependencies
check_dependencies() {
log "Checking dependencies..."
# Check if apt-ostreed is installed and running
if ! dpkg -l apt-ostreed >/dev/null 2>&1; then
log "Warning: apt-ostreed package not found. Some features may not work."
fi
# Check if ostree is available
if ! command -v ostree >/dev/null 2>&1; then
log "Warning: ostree command not found. Please install ostree package."
@ -53,6 +119,9 @@ case "$1" in
configure)
log "Configuring apt-ostree package..."
setup_completions
setup_directories
setup_service
reload_polkit
check_dependencies
log "Configuration completed successfully"
;;

View file

@ -47,15 +47,73 @@ cleanup_man_pages() {
fi
}
# Function to cleanup daemon service
cleanup_daemon() {
log "Cleaning up apt-ostreed daemon..."
# Check if systemd is available
if ! command -v systemctl >/dev/null 2>&1; then
log "Warning: systemd not available, skipping service cleanup"
return 0
fi
# Stop the service if running
if systemctl is-active --quiet apt-ostreed.service; then
log "Stopping apt-ostreed service..."
systemctl stop apt-ostreed.service || true
fi
# Disable the service
if systemctl is-enabled --quiet apt-ostreed.service; then
log "Disabling apt-ostreed service..."
systemctl disable apt-ostreed.service || true
fi
# Reload systemd daemon
systemctl daemon-reload || true
}
# Function to cleanup daemon files
cleanup_daemon_files() {
log "Cleaning up daemon files..."
# Remove systemd service files
if [ -f /lib/systemd/system/apt-ostreed.service ]; then
rm -f /lib/systemd/system/apt-ostreed.service
fi
if [ -f /lib/systemd/system/apt-ostreed.socket ]; then
rm -f /lib/systemd/system/apt-ostreed.socket
fi
# Remove polkit policy
if [ -f /usr/share/polkit-1/actions/org.projectatomic.aptostree1.policy ]; then
rm -f /usr/share/polkit-1/actions/org.projectatomic.aptostree1.policy
fi
# Remove configuration files
if [ -d /etc/apt-ostreed ]; then
rm -rf /etc/apt-ostreed
fi
# Remove binary
if [ -f /usr/libexec/apt-ostreed ]; then
rm -f /usr/libexec/apt-ostreed
fi
}
# Main execution
case "$1" in
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
cleanup_completions
cleanup_man_pages
cleanup_daemon
;;
purge)
cleanup_completions
cleanup_man_pages
cleanup_daemon
cleanup_daemon_files
;;
*)
log "Unknown action: $1"

View file

@ -12,6 +12,7 @@ PACKAGE="apt-ostree"
# Configuration directories
CONFIG_DIR="/etc/apt-ostree"
DAEMON_CONFIG_DIR="/etc/apt-ostreed"
DATA_DIR="/var/lib/apt-ostree"
LOG_DIR="/var/log/apt-ostree"
@ -48,6 +49,14 @@ case "$1" in
fi
fi
# Stop the apt-ostreed daemon service if running
if command -v systemctl >/dev/null 2>&1; then
if systemctl is-active --quiet apt-ostreed.service; then
echo "Stopping apt-ostreed service..."
systemctl stop apt-ostreed.service || true
fi
fi
# Stop any running apt-ostree processes
if pgrep -f "apt-ostree" >/dev/null 2>&1; then
echo "Stopping running apt-ostree processes..."
@ -65,6 +74,11 @@ case "$1" in
cp -r "$CONFIG_DIR" "/tmp/apt-ostree-backup-$(date +%Y%m%d-%H%M%S)/" || true
echo "Configuration backed up to /tmp/apt-ostree-backup-*"
fi
if [ -d "$DAEMON_CONFIG_DIR" ]; then
mkdir -p "/tmp/apt-ostree-backup-$(date +%Y%m%d-%H%M%S)"
cp -r "$DAEMON_CONFIG_DIR" "/tmp/apt-ostree-backup-$(date +%Y%m%d-%H%M%S)/" || true
echo "Daemon configuration backed up to /tmp/apt-ostree-backup-*"
fi
fi
echo "$PACKAGE pre-removal completed"

View file

@ -7,3 +7,12 @@ interest-noawait /usr/share/zsh/vendor-completions
# Trigger when man pages are updated
interest-noawait /usr/share/man
# Trigger when polkit rules are updated
interest-noawait /usr/share/polkit-1/actions
# Trigger when systemd units are updated
interest-noawait /lib/systemd/system
# Trigger when D-Bus configuration is updated
interest-noawait /usr/share/dbus-1/system-services

View file

@ -0,0 +1,44 @@
# apt-ostreed Configuration File
# This file configures the apt-ostree daemon behavior
[Daemon]
# OSTree repository path
RepoPath=/var/lib/apt-ostree/repo
# APT configuration
AptCacheDir=/var/cache/apt-ostree
AptStateDir=/var/lib/apt-ostree/apt
# Transaction management
TransactionTimeout=300
MaxConcurrentTransactions=1
# Automatic update settings
AutomaticEnabled=false
AutomaticSecurityOnly=true
AutomaticReboot=false
# Logging configuration
LogLevel=info
LogFile=/var/log/apt-ostreed.log
# D-Bus configuration
DbusName=org.aptostree.dev
DbusPath=/org/aptostree/dev
# Security settings
RequireAuthentication=true
AllowUnprivilegedRead=true
# Debian/Ubuntu specific settings
Distribution=ubuntu
Release=24.04
Architecture=x86_64
# Package management
DefaultRepositories=main,universe,multiverse,restricted
SecurityRepositories=security
# OSTree settings
OstreeMode=bare
OstreeRef=ubuntu/24.04/x86_64

View file

@ -0,0 +1,30 @@
[Unit]
Description=apt-ostree System Management Daemon
Documentation=man:apt-ostree(1)
ConditionPathExists=/ostree
RequiresMountsFor=/boot
[Service]
# See similar code in apt-ostree-countme.service
User=apt-ostree
DynamicUser=yes
# Our primary API is DBus
Type=dbus
BusName=org.projectatomic.aptostree1
# To use the read-only sysroot bits
MountFlags=slave
# We have no business accessing /var/roothome or /var/home
ProtectHome=true
NotifyAccess=main
# Significantly bump this timeout from the default because
# we do a lot of stuff on daemon startup.
TimeoutStartSec=5m
# We start this main process with full privileges; it may spawn unprivileged processes
# with the apt-ostree user.
ExecStart=+apt-ostree start-daemon
ExecReload=apt-ostree reload
# disable/enable downloading filelists
Environment="DOWNLOAD_FILELISTS=false"
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,12 @@
[Unit]
Description=apt-ostree System Management Daemon Socket
Documentation=man:apt-ostree(1)
[Socket]
ListenStream=/run/apt-ostreed.sock
SocketMode=0660
SocketUser=apt-ostree
SocketGroup=apt-ostree
[Install]
WantedBy=sockets.target

View file

@ -0,0 +1,143 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
<policyconfig>
<vendor>Project Atomic</vendor>
<vendor_url>https://www.projectatomic.io/</vendor_url>
<icon_name>package-x-generic</icon_name>
<action id="org.projectatomic.aptostree1.install-uninstall-packages">
<description>Install and remove packages</description>
<message>Authentication is required to install and remove software</message>
<icon_name>package-x-generic</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
</action>
<action id="org.projectatomic.aptostree1.install-local-packages">
<description>Install local packages</description>
<message>Authentication is required to install software</message>
<icon_name>package-x-generic</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
</action>
<action id="org.projectatomic.aptostree1.override">
<description>Override packages</description>
<message>Authentication is required to override base OS software</message>
<icon_name>package-x-generic</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
</action>
<action id="org.projectatomic.aptostree1.deploy">
<description>Update base OS</description>
<message>Authentication is required to update software</message>
<icon_name>package-x-generic</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
</action>
<action id="org.projectatomic.aptostree1.upgrade">
<description>Update base OS</description>
<message>Authentication is required to update software</message>
<icon_name>package-x-generic</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
</action>
<action id="org.projectatomic.aptostree1.rebase">
<description>Switch to a different base OS</description>
<message>Authentication is required to switch to a different base OS</message>
<icon_name>package-x-generic</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
</action>
<action id="org.projectatomic.aptostree1.rollback">
<description>Rollback OS updates</description>
<message>Authentication is required to roll back software updates</message>
<icon_name>package-x-generic</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
</action>
<action id="org.projectatomic.aptostree1.bootconfig">
<description>Change boot configuration</description>
<message>Authentication is required to change boot configuration</message>
<icon_name>package-x-generic</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
</action>
<action id="org.projectatomic.aptostree1.reload-daemon">
<description>Reload the daemon state</description>
<message>Authentication is required to reload the daemon</message>
<icon_name>package-x-generic</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
</action>
<action id="org.projectatomic.aptostree1.cleanup">
<description>Clean up system state</description>
<message>Authentication is required to clean up system state</message>
<icon_name>package-x-generic</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
</action>
<action id="org.projectatomic.aptostree1.initramfs">
<description>Manage initramfs</description>
<message>Authentication is required to manage initramfs</message>
<icon_name>package-x-generic</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
</action>
<action id="org.projectatomic.aptostree1.kargs">
<description>Manage kernel arguments</description>
<message>Authentication is required to manage kernel arguments</message>
<icon_name>package-x-generic</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
</action>
</policyconfig>

View file

@ -1,104 +0,0 @@
#!/bin/sh
set -e
# Source debconf library
. /usr/share/debconf/confmodule
# Define package name
PACKAGE="apt-ostreed"
# Function to log messages
log() {
echo "$PACKAGE: $1" >&2
}
# Function to check if systemd is available
check_systemd() {
if ! command -v systemctl >/dev/null 2>&1; then
log "Warning: systemd not available, skipping service setup"
return 1
fi
return 0
}
# Function to enable and start the service
setup_service() {
if ! check_systemd; then
return 0
fi
log "Setting up apt-ostreed service..."
# Reload systemd daemon
systemctl daemon-reload
# Enable the service
if systemctl enable apt-ostreed.service; then
log "apt-ostreed service enabled"
else
log "Warning: Failed to enable apt-ostreed service"
fi
# Start the service if not running
if ! systemctl is-active --quiet apt-ostreed.service; then
if systemctl start apt-ostreed.service; then
log "apt-ostreed service started"
else
log "Warning: Failed to start apt-ostreed service"
fi
else
log "apt-ostreed service already running"
fi
}
# Function to setup directories and permissions
setup_directories() {
log "Setting up directories and permissions..."
# Create necessary directories with proper permissions
mkdir -p /var/log/apt-ostreed
mkdir -p /var/cache/apt-ostree
mkdir -p /var/lib/apt-ostree
mkdir -p /var/lib/apt-ostree/repo
# Set proper ownership (root:root)
chown root:root /var/log/apt-ostreed
chown root:root /var/cache/apt-ostree
chown root:root /var/lib/apt-ostree
chown root:root /var/lib/apt-ostree/repo
# Set proper permissions
chmod 755 /var/log/apt-ostreed
chmod 755 /var/cache/apt-ostree
chmod 755 /var/lib/apt-ostree
chmod 755 /var/lib/apt-ostree/repo
}
# Function to reload polkit rules
reload_polkit() {
if command -v pkaction >/dev/null 2>&1; then
log "Reloading polkit rules..."
# This will trigger polkit to reload its rules
pkaction --version >/dev/null 2>&1 || true
fi
}
# Main execution
case "$1" in
configure)
log "Configuring apt-ostreed package..."
setup_directories
setup_service
reload_polkit
log "Configuration completed successfully"
;;
abort-upgrade|abort-remove|abort-deconfigure)
# Do nothing on abort
;;
*)
log "Unknown action: $1"
exit 1
;;
esac
exit 0

View file

@ -1,86 +0,0 @@
#!/bin/sh
set -e
# Source debconf library
. /usr/share/debconf/confmodule
# Define package name
PACKAGE="apt-ostreed"
# Function to log messages
log() {
echo "$PACKAGE: $1" >&2
}
# Function to check if systemd is available
check_systemd() {
if ! command -v systemctl >/dev/null 2>&1; then
return 1
fi
return 0
}
# Function to stop and disable the service
cleanup_service() {
if ! check_systemd; then
return 0
fi
log "Cleaning up apt-ostreed service..."
# Stop the service if running
if systemctl is-active --quiet apt-ostreed.service; then
if systemctl stop apt-ostreed.service; then
log "apt-ostreed service stopped"
else
log "Warning: Failed to stop apt-ostreed service"
fi
fi
# Disable the service
if systemctl is-enabled --quiet apt-ostreed.service; then
if systemctl disable apt-ostreed.service; then
log "apt-ostreed service disabled"
else
log "Warning: Failed to disable apt-ostreed service"
fi
fi
# Reload systemd daemon
systemctl daemon-reload
}
# Function to cleanup directories (only on purge)
cleanup_directories() {
if [ "$1" = "purge" ]; then
log "Purging apt-ostreed directories..."
# Remove log files (but keep directory structure)
rm -f /var/log/apt-ostreed/*
# Remove cache files (but keep directory structure)
rm -rf /var/cache/apt-ostree/*
# Remove state files (but keep directory structure)
rm -rf /var/lib/apt-ostree/*
log "Directory cleanup completed"
fi
}
# Main execution
case "$1" in
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
cleanup_service
;;
purge)
cleanup_service
cleanup_directories "$1"
;;
*)
log "Unknown action: $1"
exit 1
;;
esac
exit 0

View file

@ -1,3 +0,0 @@
shlibs:Depends=libc6 (>= 2.39), libgcc-s1 (>= 4.2)
misc:Depends=
misc:Pre-Depends=

View file

@ -1,11 +0,0 @@
# apt-ostreed package triggers
# This file defines triggers that are activated when certain events occur
# Trigger when polkit rules are updated
interest-noawait /usr/share/polkit-1/actions
# Trigger when systemd units are updated
interest-noawait /lib/systemd/system
# Trigger when D-Bus configuration is updated
interest-noawait /usr/share/dbus-1/system-services

29
debian/control vendored
View file

@ -18,6 +18,7 @@ Build-Depends: debhelper (>= 13),
libpolkit-gobject-1-dev,
libdbus-1-dev
Standards-Version: 4.6.2
Testsuite: autopkgtest-pkg-rust
Homepage: https://github.com/robojerk/apt-ostree
Vcs-Git: https://github.com/robojerk/apt-ostree.git
Vcs-Browser: https://github.com/robojerk/apt-ostree
@ -30,7 +31,12 @@ Depends: ${shlibs:Depends},
ostree,
systemd,
libapt-pkg7.0 (>= 3.0.0),
apt-ostreed (= ${binary:Version})
polkitd,
dbus
Recommends: bubblewrap, binutils
Suggests: bash-completion, zsh-common
Breaks: apt-ostree (<< 0.1.0-2)
Replaces: apt-ostree (<< 0.1.0-2)
Description: Debian/Ubuntu equivalent of rpm-ostree
apt-ostree is a tool for managing atomic, immutable deployments
on Debian and Ubuntu systems using OSTree as the backend.
@ -39,24 +45,9 @@ Description: Debian/Ubuntu equivalent of rpm-ostree
APT package management, enabling atomic updates and rollbacks
on Debian-based systems.
.
This package contains the command-line interface and user tools.
Package: apt-ostreed
Architecture: any
Depends: ${shlibs:Depends},
${misc:Depends},
libostree-1-1 (>= 2025.2),
ostree,
systemd,
libapt-pkg7.0 (>= 3.0.0),
polkitd,
dbus
Description: apt-ostree system management daemon
apt-ostreed is the system daemon for apt-ostree that provides
DBus interface for system management operations.
.
This package contains the daemon service and related system
integration files.
This package contains both the command-line interface and the
system daemon (apt-ostreed) that provides DBus interface for
system management operations.
.
The daemon runs with elevated privileges and provides secure
access to system management functions through D-Bus.

View file

@ -1,2 +1 @@
apt-ostree
apt-ostreed

2
debian/files vendored
View file

@ -1,5 +1,3 @@
apt-ostree-dbgsym_0.1.0-2_amd64.deb debug optional automatic=yes
apt-ostree_0.1.0-2_amd64.buildinfo admin optional
apt-ostree_0.1.0-2_amd64.deb admin optional
apt-ostreed-dbgsym_0.1.0-2_amd64.deb debug optional automatic=yes
apt-ostreed_0.1.0-2_amd64.deb admin optional

150
debian/man/apt-ostree-dev.1 vendored Normal file
View file

@ -0,0 +1,150 @@
.TH APT-OSTREE-DEV 1 "2025-08-13" "apt-ostree 0.1.0" "System Administration"
.SH NAME
apt-ostree-dev \- Development and debugging commands for apt-ostree
.SH SYNOPSIS
.B apt-ostree
\fICOMMAND\fR [\fIARGS\fR]
.SH DESCRIPTION
.B apt-ostree-dev
describes the development and debugging commands available in apt-ostree.
These commands are hidden from normal help output and are intended for
developers and system administrators debugging apt-ostree installations.
.PP
These commands provide low-level access to system internals, testing utilities,
and diagnostic tools that are not part of the standard user interface.
.SH DEVELOPMENT COMMANDS
.SS "testutils"
Development and testing utilities for apt-ostree.
.TP
.B testutils inject-pkglist \fICOMMIT\fR \fIPACKAGES\fR
Inject a package list into an OSTree commit's metadata.
.TP
.B testutils script-shell \fISCRIPT\fR [\fIARGS\fR] [\fIOPTIONS\fR]
Execute a script in a bubblewrap container with various options.
.TP
.B testutils generate-synthetic-upgrade
Generate a synthetic upgrade for testing purposes.
.TP
.B testutils integration-read-only
Run integration tests in read-only mode.
.TP
.B testutils c-units
Run C unit tests if available.
.TP
.B testutils moo
Perform basic functionality tests.
.SS "shlib-backend"
Shared library backend operations for IPC and system integration.
.TP
.B shlib-backend get-basearch
Get the system's base architecture.
.TP
.B shlib-backend varsubst-basearch \fISOURCE\fR
Perform variable substitution for architecture-specific strings.
.TP
.B shlib-backend packagelist-from-commit \fICOMMIT\fR
Extract package list from an OSTree commit.
.SS "internals"
Internal system diagnostics and validation.
.TP
.B internals diagnostics
Run comprehensive system diagnostics.
.TP
.B internals validate-state
Validate system state consistency.
.TP
.B internals debug-dump
Dump comprehensive system information for debugging.
.SH OPTIONS
.TP
.B \-\-rootpath \fIPATH\fR
Set the root path for script execution (default: /).
.TP
.B \-\-read-only
Execute in read-only mode.
.TP
.B \-\-user \fIUSER\fR
Execute as specified user.
.TP
.B \-\-group \fIGROUP\fR
Execute as specified group.
.TP
.B \-\-cwd \fIPATH\fR
Set working directory for execution.
.TP
.B \-\-env \fIKEY=VALUE\fR
Set environment variables.
.SH EXAMPLES
.TP
Inject package list into commit:
.B apt-ostree testutils inject-pkglist abc123 "apt,curl,nginx"
.TP
Execute script in container:
.B apt-ostree testutils script-shell /tmp/test.sh --read-only
.TP
Get system architecture:
.B apt-ostree shlib-backend get-basearch
.TP
Run system diagnostics:
.B apt-ostree internals diagnostics
.SH FILES
.TP
.B /usr/bin/bubblewrap
Bubblewrap binary for containerization.
.TP
.B /usr/bin/objcopy
Binutils objcopy for ELF manipulation.
.TP
.B /var/lib/apt-ostree/
Data directory for apt-ostree.
.SH ENVIRONMENT
.TP
.B APT_OSTREE_DEV_MODE
Enable development mode features.
.TP
.B APT_OSTREE_LOG_LEVEL
Set logging level for debugging.
.SH EXIT STATUS
.TP
.B 0
Success.
.TP
.B 1
General error.
.TP
.B 2
Invalid arguments.
.TP
.B 3
System operation failed.
.SH SECURITY
These commands provide low-level access to system internals and should only
be used by trusted administrators. The script-shell command executes code in
isolated containers, but care should be taken with the scripts being executed.
.SH BUGS
Report bugs to the project issue tracker at
.IR https://github.com/robojerk/apt-ostree/issues .
.SH AUTHOR
Written by Robojerk <robojerk@example.com>.
.SH COPYRIGHT
Copyright \(co 2025 Robojerk. License GPL-3.0-or-later: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.SH SEE ALSO
.BR apt-ostree (1),
.BR bubblewrap (1),
.BR objcopy (1),
.BR ostree (1)

240
debian/man/apt-ostree.1 vendored Normal file
View file

@ -0,0 +1,240 @@
.TH APT-OSTREE 1 "2025-08-13" "apt-ostree 0.1.0" "System Administration"
.SH NAME
apt-ostree \- Debian/Ubuntu equivalent of rpm-ostree
.SH SYNOPSIS
.B apt-ostree
[\fIOPTIONS\fR] \fICOMMAND\fR [\fIARGS\fR]
.SH DESCRIPTION
.B apt-ostree
is a tool for managing atomic, immutable deployments on Debian and Ubuntu systems
using OSTree as the backend. It provides functionality similar to rpm-ostree but
adapted for APT package management, enabling atomic updates and rollbacks on
Debian-based systems.
.PP
The tool integrates APT package management with OSTree's atomic deployment model,
allowing system administrators to maintain immutable system images while still
benefiting from Debian's package ecosystem.
.SH COMMANDS
.SS "Package Management Commands"
.TP
.B info \fIPACKAGE\fR
Display detailed information about a package, including dependencies, conflicts,
and metadata.
.TP
.B search \fIQUERY\fR
Search for packages in the APT repositories.
.TP
.B install \fIPACKAGES\fR
Install packages and create a new OSTree deployment.
.TP
.B remove \fIPACKAGES\fR
Remove packages and create a new OSTree deployment.
.TP
.B upgrade
Upgrade all packages and create a new OSTree deployment.
.TP
.B rollback
Rollback to the previous OSTree deployment.
.TP
.B status
Show the current OSTree deployment status.
.SS "System Management Commands"
.TP
.B deploy \fIDEPLOYMENT\fR
Deploy a specific OSTree deployment.
.TP
.B rebase \fIREPO\fR [\fIBRANCH\fR]
Rebase to a different OSTree repository or branch.
.TP
.B cleanup
Clean up old deployments and unused objects.
.TP
.B log
Show deployment history and changes.
.TP
.B remote
Manage OSTree remotes.
.TP
.B refs
List available references in the OSTree repository.
.SS "Kernel and Boot Commands"
.TP
.B kargs
Manage kernel command-line arguments.
.TP
.B initramfs
Manage initial RAM filesystem regeneration.
.SS "Transaction Management Commands"
.TP
.B transaction
Manage atomic transactions for system changes.
.TP
.B start-daemon
Start the apt-ostreed system daemon.
.SS "Development Commands (Hidden)"
.TP
.B testutils
Development and testing utilities (hidden command).
.TP
.B shlib-backend
Shared library backend operations (hidden command).
.TP
.B internals
Internal system diagnostics (hidden command).
.SS "Experimental Commands"
.TP
.B compose
Compose new OSTree trees.
.TP
.B db
Query package database.
.TP
.B override
Manage package overrides.
.TP
.B reset
Reset system to clean state.
.TP
.B refresh-md
Refresh metadata.
.SS "Container Commands"
.TP
.B container
Manage container operations.
.SS "Telemetry Commands"
.TP
.B metrics
Export system metrics.
.TP
.B health
Check system health status.
.SH OPTIONS
.TP
.B \-h, \-\-help
Show help message and exit.
.TP
.B \-V, \-\-version
Show version information and exit.
.TP
.B \-\-verbose
Enable verbose output.
.TP
.B \-\-quiet
Suppress non-error messages.
.TP
.B \-\-json
Output in JSON format.
.TP
.B \-\-pretty
Pretty-print output.
.SH EXAMPLES
.TP
Show package information:
.B apt-ostree info apt
.TP
Search for packages:
.B apt-ostree search curl
.TP
Install a package:
.B apt-ostree install nginx
.TP
Remove a package:
.B apt-ostree remove apache2
.TP
Upgrade all packages:
.B apt-ostree upgrade
.TP
Rollback to previous deployment:
.B apt-ostree rollback
.TP
Manage kernel arguments:
.B apt-ostree kargs --append "console=ttyS0"
.TP
Start the daemon:
.B apt-ostree start-daemon
.SH FILES
.TP
.B /etc/apt-ostree/
Configuration directory for apt-ostree.
.TP
.B /var/lib/apt-ostree/
Data directory for apt-ostree.
.TP
.B /ostree/
OSTree repository and deployments.
.TP
.B /etc/systemd/system/apt-ostreed.service
Systemd service file for the daemon.
.SH ENVIRONMENT
.TP
.B APT_OSTREE_CONFIG
Path to configuration file (default: /etc/apt-ostree/config.toml).
.TP
.B APT_OSTREE_DATA_DIR
Path to data directory (default: /var/lib/apt-ostree).
.TP
.B APT_OSTREE_LOG_LEVEL
Log level for debugging (default: info).
.TP
.B APT_OSTREE_DAEMON_SOCKET
Path to daemon socket (default: /run/apt-ostreed.sock).
.SH EXIT STATUS
.TP
.B 0
Success.
.TP
.B 1
General error.
.TP
.B 2
Configuration error.
.TP
.B 3
Package operation failed.
.TP
.B 4
OSTree operation failed.
.TP
.B 77
No changes detected (for --unchanged-exit-77 option).
.SH BUGS
Report bugs to the project issue tracker at
.IR https://github.com/robojerk/apt-ostree/issues .
.SH AUTHOR
Written by Robojerk <robojerk@example.com>.
.SH COPYRIGHT
Copyright \(co 2025 Robojerk. License GPL-3.0-or-later: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.SH SEE ALSO
.BR ostree (1),
.BR apt (8),
.BR dpkg (1),
.BR rpm-ostree (1),
.BR systemctl (1),
.BR polkit (8)
.PP
The full documentation for apt-ostree is maintained as a Texinfo manual.
If the info and apt-ostree programs are properly installed at your site,
the command
.IP
.B info apt-ostree
.PP
should give you access to the complete manual.

179
debian/man/apt-ostree.conf.5 vendored Normal file
View file

@ -0,0 +1,179 @@
.TH APT-OSTREE.CONF 5 "2025-08-13" "apt-ostree 0.1.0" "File Formats"
.SH NAME
apt-ostree.conf \- Configuration file for apt-ostree
.SH SYNOPSIS
.B /etc/apt-ostree/config.toml
.SH DESCRIPTION
The
.B apt-ostree.conf
file contains configuration settings for apt-ostree. The file is written in TOML
format and controls various aspects of the system's behavior.
.PP
If no configuration file is specified, apt-ostree will use default values.
.SH CONFIGURATION SECTIONS
.SS "[system]"
System-wide configuration settings.
.TP
.B data_dir = \fIPATH\fR
Path to the data directory (default: /var/lib/apt-ostree).
.TP
.B log_level = \fILEVEL\fR
Logging level: debug, info, warn, error (default: info).
.TP
.B daemon_socket = \fIPATH\fR
Path to the daemon socket (default: /run/apt-ostreed.sock).
.TP
.B max_deployments = \fINUMBER\fR
Maximum number of deployments to keep (default: 3).
.SS "[ostree]"
OSTree-specific configuration.
.TP
.B repo_path = \fIPATH\fR
Path to the OSTree repository (default: /ostree/repo).
.TP
.B deploy_path = \fIPATH\fR
Path to deployments (default: /ostree/deploy).
.TP
.B booted_deployment = \fINAME\fR
Name of the currently booted deployment.
.TP
.B default_branch = \fIBRANCH\fR
Default branch for deployments (default: debian/13/amd64).
.SS "[apt]"
APT package management configuration.
.TP
.B sources_list = \fIPATH\fR
Path to APT sources list (default: /etc/apt/sources.list).
.TP
.B apt_conf = \fIPATH\fR
Path to APT configuration (default: /etc/apt/apt.conf).
.TP
.B cache_dir = \fIPATH\fR
APT cache directory (default: /var/cache/apt).
.TP
.B state_dir = \fIPATH\fR
APT state directory (default: /var/lib/apt).
.SS "[security]"
Security and authentication settings.
.TP
.B polkit_enabled = \fIBOOL\fR
Enable Polkit authentication (default: true).
.TP
.B require_auth = \fIBOOL\fR
Require authentication for privileged operations (default: true).
.TP
.B allowed_users = \fIUSERS\fR
List of users allowed to perform operations.
.TP
.B allowed_groups = \fIGROUPS\fR
List of groups allowed to perform operations.
.SS "[daemon]"
Daemon service configuration.
.TP
.B user = \fIUSER\fR
User to run the daemon as (default: root).
.TP
.B group = \fIGROUP\fR
Group to run the daemon as (default: root).
.TP
.B pid_file = \fIPATH\fR
Path to PID file (default: /run/apt-ostreed.pid).
.TP
.B log_file = \fIPATH\fR
Path to log file (default: /var/log/apt-ostreed.log).
.SS "[development]"
Development and debugging features.
.TP
.B enable_dev_commands = \fIBOOL\fR
Enable development commands (default: false).
.TP
.B debug_mode = \fIBOOL\fR
Enable debug mode (default: false).
.TP
.B test_mode = \fIBOOL\fR
Enable test mode (default: false).
.SH EXAMPLE CONFIGURATION
.nf
# System configuration
[system]
data_dir = "/var/lib/apt-ostree"
log_level = "info"
max_deployments = 5
# OSTree configuration
[ostree]
repo_path = "/ostree/repo"
deploy_path = "/ostree/deploy"
default_branch = "debian/13/amd64"
# APT configuration
[apt]
sources_list = "/etc/apt/sources.list"
cache_dir = "/var/cache/apt"
# Security configuration
[security]
polkit_enabled = true
require_auth = true
allowed_users = ["admin", "root"]
# Daemon configuration
[daemon]
user = "root"
group = "root"
log_file = "/var/log/apt-ostreed.log"
# Development features
[development]
enable_dev_commands = false
debug_mode = false
.fi
.SH FILES
.TP
.B /etc/apt-ostree/config.toml
Default configuration file location.
.TP
.B /etc/apt-ostree/
Configuration directory.
.TP
.B ~/.config/apt-ostree/config.toml
User-specific configuration file.
.SH ENVIRONMENT
.TP
.B APT_OSTREE_CONFIG
Override the default configuration file path.
.SH NOTES
The configuration file is read when apt-ostree starts. Changes to the
configuration file require restarting the daemon to take effect.
.PP
Boolean values can be specified as true/false, yes/no, or 1/0.
.PP
Paths can be absolute or relative to the configuration file location.
.SH BUGS
Report bugs to the project issue tracker at
.IR https://github.com/robojerk/apt-ostree/issues .
.SH AUTHOR
Written by Robojerk <robojerk@example.com>.
.SH COPYRIGHT
Copyright \(co 2025 Robojerk. License GPL-3.0-or-later: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.SH SEE ALSO
.BR apt-ostree (1),
.BR apt-ostree-dev (1),
.BR ostree (1),
.BR apt (8)

37
debian/rules vendored
View file

@ -48,10 +48,19 @@ override_dh_auto_install:
mkdir -p debian/apt-ostree/usr/share/zsh/vendor-completions
mkdir -p debian/apt-ostree/usr/share/apt-ostree
@echo "apt-ostree package directories created successfully"
# Install man page if it exists
# Install man pages if they exist
@if [ -f "debian/apt-ostree.1" ]; then \
install -D -m 644 debian/apt-ostree.1 debian/apt-ostree/usr/share/man/man1/apt-ostree.1; \
fi
@if [ -f "debian/man/apt-ostree.1" ]; then \
install -D -m 644 debian/man/apt-ostree.1 debian/apt-ostree/usr/share/man/man1/apt-ostree.1; \
fi
@if [ -f "debian/man/apt-ostree-dev.1" ]; then \
install -D -m 644 debian/man/apt-ostree-dev.1 debian/apt-ostree/usr/share/man/man1/apt-ostree-dev.1; \
fi
@if [ -f "debian/man/apt-ostree.conf.5" ]; then \
install -D -m 644 debian/man/apt-ostree.conf.5 debian/apt-ostree/usr/share/man/man5/apt-ostree.conf.5; \
fi
# Install bash completion if it exists
@if [ -f "debian/apt-ostree.bash-completion" ]; then \
install -D -m 644 debian/apt-ostree.bash-completion \
@ -63,15 +72,15 @@ override_dh_auto_install:
debian/apt-ostree/usr/share/zsh/vendor-completions/_apt-ostree; \
fi
@echo "Installing apt-ostreed daemon..."
@echo "Installing apt-ostreed daemon into apt-ostree package..."
# Check if binary exists
@if [ ! -f "debian/cargo/target/release/apt-ostreed" ]; then \
echo "Error: apt-ostreed binary not found. Build failed."; \
exit 1; \
fi
# Install the apt-ostreed binary
# Install the apt-ostreed binary into the apt-ostree package
install -D -m 755 debian/cargo/target/release/apt-ostreed \
debian/apt-ostreed/usr/libexec/apt-ostreed
debian/apt-ostree/usr/libexec/apt-ostreed
# Check and install systemd service files
@if [ ! -f "daemon/systemd/apt-ostreed.service" ]; then \
echo "Error: apt-ostreed.service not found."; \
@ -82,9 +91,9 @@ override_dh_auto_install:
exit 1; \
fi
install -D -m 644 daemon/systemd/apt-ostreed.service \
debian/apt-ostreed/lib/systemd/system/apt-ostreed.service
debian/apt-ostree/lib/systemd/system/apt-ostreed.service
install -D -m 644 daemon/systemd/apt-ostreed.socket \
debian/apt-ostreed/lib/systemd/system/apt-ostreed.socket
debian/apt-ostree/lib/systemd/system/apt-ostreed.socket
# Check and install polkit policy
@if [ ! -f "daemon/polkit/apt-ostree.policy" ]; then \
@ -92,24 +101,24 @@ override_dh_auto_install:
exit 1; \
fi
install -D -m 644 daemon/polkit/apt-ostree.policy \
debian/apt-ostreed/usr/share/polkit-1/actions/org.projectatomic.aptostree1.policy
debian/apt-ostree/usr/share/polkit-1/actions/org.projectatomic.aptostree1.policy
# Check and install configuration files
@if [ ! -f "src/daemon/apt-ostreed.conf" ]; then \
echo "Error: apt-ostreed.conf not found."; \
exit 1; \
fi
install -d -m 755 debian/apt-ostreed/etc/apt-ostreed
install -d -m 755 debian/apt-ostree/etc/apt-ostreed
install -D -m 644 src/daemon/apt-ostreed.conf \
debian/apt-ostreed/etc/apt-ostreed/apt-ostreed.conf
debian/apt-ostree/etc/apt-ostreed/apt-ostreed.conf
# Create additional directories
mkdir -p debian/apt-ostreed/usr/share/doc/apt-ostreed
mkdir -p debian/apt-ostree/usr/share/doc/apt-ostree
# Create log directory
mkdir -p debian/apt-ostreed/var/log
mkdir -p debian/apt-ostree/var/log
# Create cache directory
mkdir -p debian/apt-ostreed/var/cache/apt-ostree
mkdir -p debian/apt-ostree/var/cache/apt-ostree
# Create state directory
mkdir -p debian/apt-ostreed/var/lib/apt-ostree
@echo "apt-ostreed package directories created successfully"
mkdir -p debian/apt-ostree/var/lib/apt-ostree
@echo "apt-ostreed components installed into apt-ostree package successfully"
# Skip dh_auto_install since we've handled installation manually
@echo "Package installation completed successfully!"