The refusal said "Trying to unlock <path> failed after N retries", which is
the reverse of what acquire was doing, and the previous commit changed it
to "Cannot lock <path>: still held after N retries by <owner>". Seven
checks in t/genesis_openembedded_consumer.t and native/openeuler-srpm.t
match the old text, so the CI failed on five of them; the two in
native/openeuler-srpm.t are in a block the earlier run did not reach.
One of the seven is an unlike(). It passed for the wrong reason, because
the pattern it refuses to see cannot appear any more, so it also names the
lock it must not report.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Every openEuler section of packages-manifest.conf must list uftp. The
ppc64le section is no longer exempt from the package parity check with
the EL10 ppc64le section, so its native input catalog must declare an
owner for uftp.
native/uftp-openeuler.t runs mockbuild-all.pl --dry-run and checks that
an openEuler target plans the uftp builder in its own mock config, and
only when its manifest section lists uftp. CI runs it with the other
native tests.
Fail when an EL section of packages-manifest.conf lacks uftp, which
BUILD.md documents for every EL target. CI now compiles
uftp/mockbuild.pl, parses uftp.spec and runs perlcritic on the builder.
native/uftp-fixes.t builds the sender, the receiver and the proxy from
the archive and the patches with AddressSanitizer, and gives the
functions that handle each fixed message the message that broke them. It
checks that each client list of the proxy fits in its packet buffer, and
that the proxy forwards the NAKs of plain, TFMCC and short client STATUS
messages in a whole NAK list. It sends the receiver files with short,
repeated and lost blocks, file names that try to leave the destination
directory, and names of that directory itself, then checks the files on
disk. It also covers a file with more sections than the protocol holds,
a seek of the sender past block 2^31, a group with more than 10000
entries, and the STATUS of the receiver for a full section. It ends a
group after another group replaced its file or changed its path, and a
restarted group after it changed the path of its unused file. It backs
up files below a symbolic link in the backup directory, and along a
backup path longer than 300 bytes. The built programs must carry the
xCAT build mark. CI runs it with the native tests and installs the
compiler and the OpenSSL headers for it.
mock loads its configuration as the user that sudo names, so a
configuration without chrootuid builds as SUDO_UID. mock_chroot_uid
runs the loader as root and reports uid 0, and mock_result_dirs then
gives the result directories to root.
Under umask 077, mock_result_dirs creates the work and package
directories as 0700. The build user cannot reach the result
directories below them.
Add a sudo-caller case to the native mock test, and a fresh-tree case
under umask 077 to the result-directory test. Move writable_as into
t/lib so both tests share it.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
mock_chroot_uid reads the configuration files itself and processes each
include() after the file that names it. A configuration that includes a file
with chrootuid 1000 and then sets chrootuid 1001 returns 1000, but mock builds
as 1001. mockbuild-perl-packages.pl then gives the result directories to the
wrong uid, and mock cannot write its logs in them.
native/mock-chroot-uid.t compares mock_chroot_uid with that case, with a
wrapper that only includes, and with a configuration that sets no chrootuid.
Ubuntu ships no mock, so the workflow runs the test in a Fedora container.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
native/openeuler-power-inputs.t gates its whole native owner section on
"from mockbuild.util import load_config". mock 6.8 keeps load_config in
mockbuild.config, so the import fails, $can_owner is false and 52 assertions skip
on the only architecture that can run them. native/fixtures/power-mock.py imports
it the same way and cannot start at all.
The fake mock also created --resultdir as the user that started it and wrote no
logs, so it could not see what mock 6.8 does: it reloads its uid manager from
chrootuid, then creates --resultdir and opens state.log, build.log and root.log in
it as that uid.
Both now use mockbuild.config, and the fake mock creates --resultdir and opens
those three logs as chrootuid. Against the unfixed tree the native owner fails:
mock: [Errno 13] Permission denied:
.../native-results/native-leaf/state.log
ERROR: Step failed (rc=1): Build native prerequisite: native-leaf
Failed 14/115 subtests
The directory is root root 755 and chrootuid is 1000, which is the catalog's
declared build_uid for that node.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The published x86_64 goconserver is compiled GOAMD64=v3, and that binary stops
a pre-AVX2 management node with SIGILL. Nothing caught it. A grep for an export
line in the build script is no help: it passes when the export stops reaching
the compiler, which is the failure itself.
native/goconserver-openeuler.t now drives the cross path with an amd64 target
and reads the setting out of the compiled binary. The stubbed compiler reports
the setting the build asked for, and FIXTURE_GOAMD64 lets a case report a
different one -- what a compiler that ignores the request looks like. Two more
assertions hold the in-chroot gate down, because no unit test executes the
generated spec.
Twelve assertions fail on this tree. The fix that follows makes all 160 pass.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
openeuler-20.03sp4-x86_64 and openeuler-22.03sp4-x86_64 build nothing. Both exit 3
at "Could not find included config file:
/etc/mock/templates/openeuler-20.03-sp4.tpl", and both targets report that every
build step failed. mock-core-configs names its openEuler templates by release
alone, openeuler-20.03.tpl and openeuler-22.03.tpl, and each already sets
releasever to the newest service pack. The two configurations spelled the service
pack into the template name, which matches no file in any mock package.
openeuler-24.03sp4-x86_64.cfg already includes openeuler-24.03.tpl, which is why
that target builds.
The ppc64le target fails before any package is built, for two further reasons.
rpmkeys --dbpath cannot import the publisher key: rpm takes an fcntl transaction
lock on <dbpath>/.rpm.lock, the staging directory is NFS mounted local_lock=none,
and that lock answers errno 524 there. The keyring database moves to local
temporary storage, keyed on the staging directory so two targets of one run do not
share it. The staged source RPMs and the gpg home do not move.
A verified publisher RPM is rejected as unreadable: reject_elf_payload read the
exit status of rpm2cpio as the verdict on the payload, and on rpm 4.19 rpm2cpio
writes the whole payload and still exits 1 with nothing on stderr. The cpio walk
moves into scan_cpio_for_elf, which returns its own answer. A truncated stream
never reaches the trailer and still dies, which is the case the exit status stood
in for, and verify_input has already matched the sha256 and run rpmkeys --checksig
before this point.
Each fix has a test that fails without it. openeuler_mock_template_include.t reads
the configurations only. openeuler_native_trust_dbpath.t and
openeuler_native_cpio_scan.t run no rpmkeys and no rpm2cpio: the second builds its
cpio streams in Perl and refuses an ELF member, a truncated stream, data after the
trailer and a stream that is not cpio, each by name.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
mock --init failed for every openEuler target. repo.openeuler.org is the only
source the chroots have, and it served a build host at 7 kB/s, then reset
connections mid-transfer: "Curl error (28) Operation too slow", "Curl error
(56) SSL_read: SSL_ERROR_SYSCALL", "Curl error (92) INTERNAL_ERROR". All three
attempts per package failed, so the openEuler core build could not start.
mock-configs/templates/openeuler-lts-xcat.tpl builds dnf.conf, so baseurl now
lists two mirrors before repo.openeuler.org, which stays last as the authority
of record, and timeout rises to 300. minrate stays at dnf's default: the rate
abort is the only signal that moves dnf to the next baseurl. gpgcheck stays on
and gpgkey still names repo.openeuler.org, so a mirror cannot change what is
built. Measured on one host, same gcc rpm: repo.openeuler.org 7 kB/s,
mirrors.tuna 2.8 MB/s, mirror.nju 3.9 MB/s. A cold mock --init then completed
in 2m38s.
native/mock-configs.t asserts the slowest host is not first, the canonical url
is present, every url names the same release and architecture, and minrate is
unset. It could not run before: native/fixtures/mock-configs.py copied two
templates no source ships and raised FileNotFoundError, so the test measured no
config at all.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Exercise mixed repository finalization and changed publisher inputs on x86_64. Check native manifest selection and use File::Slurper in the goconserver fixture.