Skip to content

Find existing quadlets more precisely#71

Closed
traylenator wants to merge 1 commit intovoxpupuli:masterfrom
traylenator:find
Closed

Find existing quadlets more precisely#71
traylenator wants to merge 1 commit intovoxpupuli:masterfrom
traylenator:find

Conversation

@traylenator
Copy link
Collaborator

@traylenator traylenator commented Oct 30, 2025

Pull Request (PR) description

During validation of a new quadlet the existing quadlet must be copied to an ephemeral directory.

This could fail with:

cp: -r not specified; omitting directory '/etc/containers/systemd/users'

The extra directory should not be copied. The files to be copied with be of the form my.pod, my.container, ...

Particularly on Ubuntu and Debian the directory /etc/containers/systemd/users exists to store system provided user quadlets and that directory should be ignored.

Change is:

echo /etc/containers/systemd/*
/etc/containers/systemd/busybox.image /etc/containers/systemd/centos.container /etc/containers/systemd/good.volume /etc/containers/systemd/kubeycentos.kube /etc/containers/systemd/podcentos.pod /etc/containers/systemd/users

vs

echo /etc/containers/systemd/*.*
/etc/containers/systemd/busybox.image /etc/containers/systemd/centos.container /etc/containers/systemd/good.volume /etc/containers/systemd/kubeycentos.kube /etc/containers/systemd/podcentos.pod

During validation of a new quadlet the existing quadlet must
be copied to an ephemeral directory.

This failed with:

```
cp: -r not specified; omitting directory '/etc/containers/systemd/users'
```

The extra directory should not be copied. The actually files with
be `my.pod`, `my.container`, ...

Particularly on Ubuntu and Debian the directory `/etc/containers/systemd/users`
exists to store system provided user quadlets.
@traylenator traylenator added the bug Something isn't working label Oct 30, 2025
@traylenator traylenator marked this pull request as ready for review October 30, 2025 09:19
@traylenator traylenator marked this pull request as draft October 30, 2025 09:37
@traylenator
Copy link
Collaborator Author

This is the wrong strategy completly - I missed that. QUADLET_UNIT_DIRS can be set as multiple paths.

env QUADLET_UNIT_DIRS=/xyz/foo:/abc/bar /usr/lib/systemd/user-generators/podman-user-generator --dryrun
quadlet-generator[5085]: Error occurred resolving path "/xyz/foo": lstat /xyz: no such file or directory
quadlet-generator[5085]: Error occurred resolving path "/abc/bar": lstat /abc: no such file or directory
quadlet-generator[5085]: No files parsed from [/xyz/foo /abc/bar]

@traylenator
Copy link
Collaborator Author

#72 is much better solution to this.

@traylenator traylenator added skip-changelog Excluded from CHANGELOG and removed bug Something isn't working labels Oct 30, 2025
@traylenator traylenator deleted the find branch October 30, 2025 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Excluded from CHANGELOG

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant