Skip to content

Install systemd unit files to /usr/local/lib/systemd instead #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 27, 2025
Merged
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
27 changes: 11 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
SHELL := /usr/bin/env bash

PODMAN_IMAGE_NAME ?= mgoltzsche/podman
PODMAN_IMAGE ?= $(PODMAN_IMAGE_NAME):latest
PODMAN_IMAGE_TARGET ?= podmanall
Expand Down Expand Up @@ -106,27 +108,20 @@ install:

tar: .podman-from-container
rm -f $(ASSET_DIR).tar.gz
mkdir -p $(ASSET_DIR)/usr/lib/systemd/system
mkdir -p $(ASSET_DIR)/usr/lib/systemd/user
cp -f conf/systemd/podman-restart.service $(ASSET_DIR)/usr/lib/systemd/system/podman-restart.service
cp -f conf/systemd/podman.service $(ASSET_DIR)/usr/lib/systemd/system/podman.service
cp -f conf/systemd/podman.socket $(ASSET_DIR)/usr/lib/systemd/system/podman.socket
cp -f conf/systemd/podman.service $(ASSET_DIR)/usr/lib/systemd/user/podman.service
cp -f conf/systemd/podman.socket $(ASSET_DIR)/usr/lib/systemd/user/podman.socket
install -Dm644 -t $(ASSET_DIR)/usr/local/lib/systemd/system \
conf/systemd/{podman-restart.service,podman.service,podman.socket}
install -Dm644 -t $(ASSET_DIR)/usr/local/lib/systemd/user \
conf/systemd/{podman-restart.service,podman.service,podman.socket}
tar -C $(ASSET_DIR)/.. -czvf $(ASSET_DIR).tar.gz $(ASSET_NAME)

.podman-from-container: IMAGE_ROOTFS = $(BUILD_DIR)/images/podman/linux_$(ARCH)
.podman-from-container: podman-tar-image
rm -rf $(ASSET_DIR)
mkdir -p $(ASSET_DIR)/etc $(ASSET_DIR)/usr/local
mkdir -p $(ASSET_DIR)/etc $(ASSET_DIR)/usr/lib/systemd/user-generators/
mkdir -p $(ASSET_DIR)/etc $(ASSET_DIR)/usr/lib/systemd/system-generators/
cp -r $(IMAGE_ROOTFS)/etc/containers $(ASSET_DIR)/etc/containers
cp -r $(IMAGE_ROOTFS)/usr/local/lib $(ASSET_DIR)/usr/local/lib
cp -r $(IMAGE_ROOTFS)/usr/local/libexec $(ASSET_DIR)/usr/local/libexec
ln -s ../../../local/libexec/podman/quadlet $(ASSET_DIR)/usr/lib/systemd/user-generators/podman-user-generator
ln -s ../../../local/libexec/podman/quadlet $(ASSET_DIR)/usr/lib/systemd/system-generators/podman-system-generator
cp -r $(IMAGE_ROOTFS)/usr/local/bin $(ASSET_DIR)/usr/local/bin
mkdir -p $(ASSET_DIR)/etc $(ASSET_DIR)/usr/local/lib/systemd/{system,user}-generators
cp -rt $(ASSET_DIR)/etc $(IMAGE_ROOTFS)/etc/containers
cp -rt $(ASSET_DIR)/usr/local $(IMAGE_ROOTFS)/usr/local/{bin,lib,libexec}
ln -s ../../../libexec/podman/quadlet $(ASSET_DIR)/usr/local/lib/systemd/user-generators/podman-user-generator
ln -s ../../../libexec/podman/quadlet $(ASSET_DIR)/usr/local/lib/systemd/system-generators/podman-system-generator
cp README.md $(ASSET_DIR)/

signed-tar: tar .gpg
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,8 @@ Next, remove all the copied binaries from the following folders:

```sh
sudo rm -rf /etc/containers/*
sudo rm -rf /usr/lib/systemd/system/podman*
sudo rm -rf /usr/lib/systemd/user/podman*
sudo rm -rf /usr/local/bin/{crun,fuse-overlayfs,fusermount3,pasta,pasta.avx2,podman,runc}
sudo rm -rf /usr/local/lib/podman
sudo rm -rf /usr/local/libexec/podman
sudo rm /usr/lib/systemd/{user,system}-generators/podman-user-generator
sudo rm -rf /usr/local/{lib,libexec}/podman
sudo rm -rf /usr/local/lib/systemd/{system,user}/podman*
sudo rm /usr/local/lib/systemd/{system,user}-generators/podman-*-generator
```
Loading