Skip to content
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

container/commit: Auto-clean /var/tmp, /tmp, /run #367

Merged
merged 3 commits into from
Sep 15, 2022

Commits on Sep 15, 2022

  1. container/commit: Auto-clean /var/{tmp,cache}, /tmp, /run

    The original command here was just scoped to `/var`, but we also
    don't want content in `/run`.  Extend the tooling to handle that
    and the other two temporary directories.
    
    Also, let's be a bit nicer here and auto-clean empty directories
    in `/var`.
    
    I was testing out the
    https://github.com/coreos/coreos-layering-examples/blob/main/tailscale/Dockerfile
    example and today we have this:
    
    ```
    drwxr-xr-x root/root         0 2022-09-13 18:53 run/
    drwxr-xr-x root/root         0 2022-09-13 18:51 run/rpm-ostree/
    drwxr-xr-x root/root         0 2022-09-13 18:53 run/rpm-ostree/lock/
    drwxr-xr-x root/root         0 2022-09-13 18:51 run/systemd/
    drwxr-xr-x root/root         0 2022-09-13 18:51 run/systemd/resolve/
    -rwx------ root/root         0 2022-09-13 18:51 run/systemd/resolve/stub-resolv.conf
    ...
    drwxr-xr-x root/root         0 2022-09-13 18:53 var/
    drwxr-xr-x root/root         0 2022-09-13 18:53 var/cache/
    drwx------ root/root         0 2022-09-13 18:53 var/cache/ldconfig/
    -rw------- root/root     22000 2022-09-13 18:53 var/cache/ldconfig/aux-cache
    drwxr-xr-x root/root         0 2022-09-08 23:10 var/cache/tailscale/
    drwxr-xr-x root/root         0 2022-09-13 18:53 var/tmp/
    ```
    
    In this set, we can auto-clean the leftover locking directories
    rpm-ostree (erroneously) leaves in `/run`, as well as
    `/var/cache/ldconfig`.
    cgwalters committed Sep 15, 2022
    Configuration menu
    Copy the full SHA
    a913ab0 View commit details
    Browse the repository at this point in the history
  2. Make commit module public

    I think it makes sense for us to use this in rpm-ostree directly
    too at build time for example.
    cgwalters committed Sep 15, 2022
    Configuration menu
    Copy the full SHA
    1440264 View commit details
    Browse the repository at this point in the history
  3. ci: Add a flow that tests ostree container commit

    To verify our changes there too.
    cgwalters committed Sep 15, 2022
    Configuration menu
    Copy the full SHA
    972a134 View commit details
    Browse the repository at this point in the history