forked from coreos/rpm-ostree
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: Don't try to apply non-root uid/gid when run as non-root
In an unprivileged case, we can't do this on the real filesystem. For `ex container`, we want to completely ignore uid/gid. I added a test installing `httpd` which failed previously. TODO: For non-root `--ex-unified-core` we need to do it as a commit modifier.
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/bash | ||
set -xeuo pipefail | ||
|
||
cd ${test_tmpdir} | ||
|
||
dn=$(cd $(dirname $0) && pwd) | ||
. ${dn}/../common/libtest-core.sh | ||
|
||
cat >httpd.conf <<EOF | ||
[tree] | ||
ref=httpd | ||
packages=httpd; | ||
repos=fedora; | ||
EOF | ||
|
||
# This one has non-root ownership in some of the dependencies, but we shouldn't | ||
# try to apply them; see apply_rpmfi_overrides(). | ||
rpm-ostree ex container assemble httpd.conf | ||
ostree --repo=repo ls httpd /usr/sbin/httpd |