Skip to content

Commit b51dc2d

Browse files
committed
build.sh: move chmod /usr/lib/containers/storage/overlay-* to install_rpms
We already have a few other `chmod`s in `install_rpms` to loosen restrictions. This should fix supermin for people like me who run cosa in their pet containers and only run _some_ of the build.sh commands (notably we run `install_rpms`, but not `configure_user`).
1 parent 00d6b27 commit b51dc2d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

build.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ install_rpms() {
9696
fi
9797
# Similarly for kernel data and SELinux policy, which we want to inject into supermin
9898
chmod -R a+rX /usr/lib/modules /usr/share/selinux/targeted
99+
# And a few more from the containers stack we want to inject into supermin too.
100+
# Remove when https://github.com/containers/common/pull/2507 has merged
101+
chmod 755 /usr/lib/containers/storage/overlay-images
102+
chmod 755 /usr/lib/containers/storage/overlay-layers
99103

100104
# Symlink the CentOS Stream GPG keys to /etc to make it easier to build
101105
# CentOS-based artifacts.
@@ -177,11 +181,6 @@ configure_user(){
177181
# Lifted from: https://github.com/containers/podman/blob/6e382d9ec2e6eb79a72537544341e496368b6c63/contrib/podmanimage/stable/Containerfile#L25-L26
178182
echo -e "builder:1:999\nbuilder:1001:64535" > /etc/subuid
179183
echo -e "builder:1:999\nbuilder:1001:64535" > /etc/subgid
180-
181-
# Allow a few directories to be accessed by unprivileged users.
182-
# Remove when https://github.com/containers/common/pull/2507 has merged
183-
chmod 755 /usr/lib/containers/storage/overlay-images
184-
chmod 755 /usr/lib/containers/storage/overlay-layers
185184
}
186185

187186
write_archive_info() {

0 commit comments

Comments
 (0)