Skip to content

Commit

Permalink
spec: create/own /etc/containers/networks
Browse files Browse the repository at this point in the history
In some cases if /etc/ is mounted read-only the non-existence
of the `/etc/containers/networks` directory will cause basic
functionality to fail.

```
bash-5.2# mount --bind -o ro /etc/containers/ /etc/containers/
bash-5.2# podman info
Error: mkdir /etc/containers/networks: read-only file system
```

Since it's going to get created anyway let's just have the
directory exist from the beginning.

Signed-off-by: Dusty Mabe <[email protected]>
(cherry picked from commit 9f2002b)
  • Loading branch information
dustymabe authored and Luap99 committed Dec 9, 2024
1 parent aefab14 commit 62b7d12
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rpm/containers-common.spec
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ done

%install
# install config and policy files for registries
install -dp %{buildroot}%{_sysconfdir}/containers/{certs.d,oci/hooks.d,systemd}
install -dp %{buildroot}%{_sysconfdir}/containers/{certs.d,oci/hooks.d,networks,systemd}
install -dp %{buildroot}%{_sharedstatedir}/containers/sigstore
install -dp %{buildroot}%{_datadir}/containers/systemd
install -dp %{buildroot}%{_prefix}/lib/containers/storage
Expand Down Expand Up @@ -187,6 +187,7 @@ ln -s ../../../..%{_sysconfdir}/yum.repos.d/redhat.repo %{buildroot}%{_datadir}/
%files
%dir %{_sysconfdir}/containers
%dir %{_sysconfdir}/containers/certs.d
%dir %{_sysconfdir}/containers/networks
%dir %{_sysconfdir}/containers/oci
%dir %{_sysconfdir}/containers/oci/hooks.d
%dir %{_sysconfdir}/containers/registries.conf.d
Expand Down

0 comments on commit 62b7d12

Please sign in to comment.