mirror of
https://github.com/xcat2/xcat-dep.git
synced 2026-10-17 17:20:31 +00:00
5d3fcfe9064edb303afedc16103209b93fd8ccb4
Every xcat-dep-build-openeuler24.03-ppc64le build fails at the first native
prerequisite:
PermissionError: [Errno 13] Permission denied:
.../native-results/procenv/state.log
mock 6.8 reloads its uid manager from chrootuid ("fix: reload uidManager with
chrootuid/chrootgid from config"), so mock now creates --resultdir and opens its own
state.log, build.log and root.log there as chrootuid, which the openEuler ppc64le
overlay sets to the catalog's build_uid. mockbuild-all.pl creates those directories
as root, mode 755, so mock cannot open a log in them and dies in resetLogging before
the build starts. It is not specific to the shared filesystem: the same failure
reproduces on /tmp.
make_native_path gives every directory mock writes the native build gid and makes it
group writable, and MockBuildUtils::native_owner_command runs the step under setpriv
--regid with a 0002 umask, so what the step creates below those directories inherits
both. The uid a step builds as now comes from the catalog's build_uid instead of the
step id, which also builds xnba-undi as root, as its own declaration says.
t/openeuler_native_result_permissions.t fails five of its six assertions without this
change. native/openeuler-power-inputs.t fails too, with "mock: [Errno 13] Permission
denied: .../native-results/native-leaf/state.log", but only on ppc64le: its native
owner section skips 52 of its assertions on x86_64, which is the architecture the
GitHub workflow runs on. The unit test is what keeps the fix covered there.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Description
No description provided
Languages
Perl
80.2%
JavaScript
7.4%
Shell
3.7%
SQLPL
2.4%
CSS
2.1%
Other
4.2%