Skip to content

Commit

Permalink
Switch references of /var/run -> /run
Browse files Browse the repository at this point in the history
Systemd is now complaining or mentioning /var/run as a legacy directory.
It has been many years where /var/run is a symlink to /run on all
most distributions, make the change to the default.

Partial fix for containers/podman#8369

Signed-off-by: Daniel J Walsh <[email protected]>
  • Loading branch information
rhatdan committed Dec 18, 2020
1 parent 6747061 commit 18f3e87
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion contrib/cirrus/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ remove_storage_mountopt() {
cat <<EOF> $FILEPATH
[storage]
driver = "overlay"
runroot = "/var/run/containers/storage"
runroot = "/run/containers/storage"
graphroot = "/var/lib/containers/storage"
[storage.options]
mountopt = ""
Expand Down
4 changes: 2 additions & 2 deletions docs/buildah-info.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ $ buildah info
"ImageStore": {
"number": 1
},
"RunRoot": "/var/run/containers/storage"
"RunRoot": "/run/containers/storage"
}
}
```

Run buildah info and retrieve only the store information:
```
$ buildah info --format={{".store"}}
map[GraphOptions:[overlay.override_kernel_check=true] GraphStatus:map[Backing Filesystem:extfs Supports d_type:true Native Overlay Diff:true] ImageStore:map[number:1] ContainerStore:map[number:2] GraphRoot:/var/lib/containers/storage RunRoot:/var/run/containers/storage GraphDriverName:overlay]
map[GraphOptions:[overlay.override_kernel_check=true] GraphStatus:map[Backing Filesystem:extfs Supports d_type:true Native Overlay Diff:true] ImageStore:map[number:1] ContainerStore:map[number:2] GraphRoot:/var/lib/containers/storage RunRoot:/run/containers/storage GraphDriverName:overlay]
```

## SEE ALSO
Expand Down
2 changes: 1 addition & 1 deletion docs/buildah-unshare.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ buildah unshare pwd

buildah unshare cat /proc/self/uid\_map /proc/self/gid\_map

buildah unshare rm -fr $HOME/.local/share/containers/storage /var/run/user/\`id -u\`/run
buildah unshare rm -fr $HOME/.local/share/containers/storage /run/user/\`id -u\`/run

buildah unshare --mount containerID sh -c 'cat ${containerID}/etc/os-release'

Expand Down
2 changes: 1 addition & 1 deletion docs/buildah.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Default root dir is configured in /etc/containers/storage.conf

**--runroot** **value**

Storage state dir (default: "/var/run/containers/storage" for UID 0, "/var/run/user/$UID" for other users)
Storage state dir (default: "/run/containers/storage" for UID 0, "/run/user/$UID" for other users)
Default state dir is configured in /etc/containers/storage.conf

**--storage-driver** **value**
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/03-on-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ The second container is now created and the `/bar` file will be created within i
STEP 1: FROM onbuild-image
STEP 2: RUN touch /bar # Note /bar created here based on the ONBUILD in Dockerfile
STEP 3: RUN touch /baz
STEP 4: COMMIT containers-storage:[overlay@/var/lib/containers/storage+/var/run/containers/storage:overlay.override_kernel_check=true]localhost/result-image:latest
STEP 4: COMMIT containers-storage:[overlay@/var/lib/containers/storage+/run/containers/storage:overlay.override_kernel_check=true]localhost/result-image:latest
{output edited for brevity}
$ container=$(sudo buildah from result-image:latest)
# buildah run $container ls /bar /foo /baz
Expand Down Expand Up @@ -98,7 +98,7 @@ The onbuild-image has been created, so now create a container from it using the
STEP 1: FROM onbuild-image
STEP 2: RUN touch /bar # Note /bar created here based on the ONBUILD in Dockerfile
STEP 3: RUN touch /baz
STEP 4: COMMIT containers-storage:[overlay@/var/lib/containers/storage+/var/run/containers/storage:overlay.override_kernel_check=true]localhost/result-image:latest
STEP 4: COMMIT containers-storage:[overlay@/var/lib/containers/storage+/run/containers/storage:overlay.override_kernel_check=true]localhost/result-image:latest
{output edited for brevity}
$ container=$(sudo buildah from result-image:latest)
# buildah run $container ls /bar /foo /baz
Expand Down

0 comments on commit 18f3e87

Please sign in to comment.