diff --git a/debian/rules b/debian/rules index 4a6bd9a3..f5576718 100755 --- a/debian/rules +++ b/debian/rules @@ -111,9 +111,14 @@ override_dh_auto_install: debian/apt-ostree/lib/systemd/system/apt-ostreed-automatic.service install -D -m 644 src/daemon/apt-ostreed-automatic.timer \ debian/apt-ostree/lib/systemd/system/apt-ostreed-automatic.timer - # Install fix-shadow-mode service from debian-atomic-files - install -D -m 644 ../debian-atomic-files/apt-ostree-systemd/systemd/system/apt-ostree-fix-shadow-mode.service \ - debian/apt-ostree/lib/systemd/system/apt-ostree-fix-shadow-mode.service + # Install fix-shadow-mode service from debian-atomic-files (if available) + @if [ -f "../debian-atomic-files/apt-ostree-systemd/systemd/system/apt-ostree-fix-shadow-mode.service" ]; then \ + install -D -m 644 ../debian-atomic-files/apt-ostree-systemd/systemd/system/apt-ostree-fix-shadow-mode.service \ + debian/apt-ostree/lib/systemd/system/apt-ostree-fix-shadow-mode.service; \ + echo "Installed apt-ostree-fix-shadow-mode.service"; \ + else \ + echo "Warning: apt-ostree-fix-shadow-mode.service not found, skipping"; \ + fi # Check and install polkit policy @if [ ! -f "daemon/polkit/apt-ostree.policy" ]; then \ @@ -134,26 +139,56 @@ override_dh_auto_install: # Install kernel integration files @echo "Installing kernel integration files..." mkdir -p debian/apt-ostree/usr/lib/kernel/install.d - install -D -m 644 ../debian-atomic-files/apt-ostree-systemd/kernel/install.d/05-aptostree.install \ - debian/apt-ostree/usr/lib/kernel/install.d/05-aptostree.install - install -D -m 644 ../debian-atomic-files/apt-ostree-systemd/kernel/install.conf \ - debian/apt-ostree/usr/lib/kernel/install.conf + @if [ -f "../debian-atomic-files/apt-ostree-systemd/kernel/install.d/05-aptostree.install" ]; then \ + install -D -m 644 ../debian-atomic-files/apt-ostree-systemd/kernel/install.d/05-aptostree.install \ + debian/apt-ostree/usr/lib/kernel/install.d/05-aptostree.install; \ + echo "Installed kernel install hook"; \ + else \ + echo "Warning: kernel install hook not found, skipping"; \ + fi + @if [ -f "../debian-atomic-files/apt-ostree-systemd/kernel/install.conf" ]; then \ + install -D -m 644 ../debian-atomic-files/apt-ostree-systemd/kernel/install.conf \ + debian/apt-ostree/usr/lib/kernel/install.conf; \ + echo "Installed kernel install config"; \ + else \ + echo "Warning: kernel install config not found, skipping"; \ + fi # Install tmpfiles configuration @echo "Installing tmpfiles configuration..." mkdir -p debian/apt-ostree/usr/lib/tmpfiles.d - install -D -m 644 ../debian-atomic-files/apt-ostree-systemd/tmpfiles.d/apt-ostree-0-integration.conf \ - debian/apt-ostree/usr/lib/tmpfiles.d/apt-ostree-0-integration.conf - install -D -m 644 ../debian-atomic-files/apt-ostree-systemd/tmpfiles.d/apt-ostree-0-integration-opt-usrlocal.conf \ - debian/apt-ostree/usr/lib/tmpfiles.d/apt-ostree-0-integration-opt-usrlocal.conf - install -D -m 644 ../debian-atomic-files/apt-ostree-systemd/tmpfiles.d/apt-ostree-0-integration-opt-usrlocal-compat.conf \ - debian/apt-ostree/usr/lib/tmpfiles.d/apt-ostree-0-integration-opt-usrlocal-compat.conf + @if [ -f "../debian-atomic-files/apt-ostree-systemd/tmpfiles.d/apt-ostree-0-integration.conf" ]; then \ + install -D -m 644 ../debian-atomic-files/apt-ostree-systemd/tmpfiles.d/apt-ostree-0-integration.conf \ + debian/apt-ostree/usr/lib/tmpfiles.d/apt-ostree-0-integration.conf; \ + echo "Installed tmpfiles integration config"; \ + else \ + echo "Warning: tmpfiles integration config not found, skipping"; \ + fi + @if [ -f "../debian-atomic-files/apt-ostree-systemd/tmpfiles.d/apt-ostree-0-integration-opt-usrlocal.conf" ]; then \ + install -D -m 644 ../debian-atomic-files/apt-ostree-systemd/tmpfiles.d/apt-ostree-0-integration-opt-usrlocal.conf \ + debian/apt-ostree/usr/lib/tmpfiles.d/apt-ostree-0-integration-opt-usrlocal.conf; \ + echo "Installed tmpfiles usrlocal config"; \ + else \ + echo "Warning: tmpfiles usrlocal config not found, skipping"; \ + fi + @if [ -f "../debian-atomic-files/apt-ostree-systemd/tmpfiles.d/apt-ostree-0-integration-opt-usrlocal-compat.conf" ]; then \ + install -D -m 644 ../debian-atomic-files/apt-ostree-systemd/tmpfiles.d/apt-ostree-0-integration-opt-usrlocal-compat.conf \ + debian/apt-ostree/usr/lib/tmpfiles.d/apt-ostree-0-integration-opt-usrlocal-compat.conf; \ + echo "Installed tmpfiles usrlocal compat config"; \ + else \ + echo "Warning: tmpfiles usrlocal compat config not found, skipping"; \ + fi # Install D-Bus policy configuration @echo "Installing D-Bus policy configuration..." mkdir -p debian/apt-ostree/usr/share/dbus-1/system.d - install -D -m 644 ../debian-atomic-files/apt-ostree-systemd/org.debian.aptostree1.conf \ - debian/apt-ostree/usr/share/dbus-1/system.d/org.debian.aptostree1.conf + @if [ -f "../debian-atomic-files/apt-ostree-systemd/org.debian.aptostree1.conf" ]; then \ + install -D -m 644 ../debian-atomic-files/apt-ostree-systemd/org.debian.aptostree1.conf \ + debian/apt-ostree/usr/share/dbus-1/system.d/org.debian.aptostree1.conf; \ + echo "Installed D-Bus policy config"; \ + else \ + echo "Warning: D-Bus policy config not found, skipping"; \ + fi # Create additional directories mkdir -p debian/apt-ostree/usr/share/doc/apt-ostree