User:Juippis/The ultimate testing system with lxd

The ultimate way of testing ebuild contributions.

Summary: You keep a base container updated and in a tidy condition. You make copies of the base container, use the copies to test ebuild contributions, and delete the copies when you're done. This is automated as much as possible; in an ideal situation all you ever have to do, is give one command.

You can of course use this built environment to test your own ebuild modifications before pushing. Please see some examples how it works.

Installation
We're going to need LXD to be installed in the host system.

You should expect to have at least 2-4 GB space per container, especially if they pull rust-bin, gentoo-kernel-bin etc. Therefore it might be wise to mount --bind somewhere with more space available. Using an SSD/NVME is heavily suggested, as it makes all the operations happen in an instant compared to HDDs. Note that upstream suggests using mount --bind rather than symlinking a location, and you can obviously get the size down by making smart choices for pre-installed packages.

Configuring lxd
Add your user to newly created lxd group. your chosen lxd directory properly for this user.

We will use a binhost @ localhost to be used between host/container. Set up subuid & subgid for accessing binpkg repository from both in and outside the container.

Getting the correct container image
Make sure to choose an image suited for your testing needs.

This will download a default gentoo-x86_64 container image, set it up, name it as my-test-container and start it. You can check that it works,

But for now, we'll want to turn it off so we can configure it properly.

default profile
You can edit the 'default' profile which, by default, gets used by containers and contain some necessary options.

Note especially the network part. LXD

Accessing display from container to test GUI runtime
Edit the config file of your container.

Sharing host's disk to container
With the example above, we're sharing our host's distfiles and binpkg directories with the containers.

Launching the container
Now that we've configured the relevant parts, we can launch the container. We'll construct the base container image that is kept up-to-date and clean. We'll use that to create discardable copies, where the testing happens.

Initiate configuration
First thing, we need to get a portage tree.

Or alternatively, the latest portage tree from any of the mirror's  and extract it as.

Install dev-vcs/git and an editor of your choice:

Now we need to initiate the git-repo, and /etc/portage/ configuration for our container. There are two ways for it:

Automatic configuration via a script
A fast and simple way is to use this script:

When done, skip straight to updating your container.

Alternatively, manual configuration
Prepare the usage of git sync-repo.

Edit relevant files.

Edit all the relevant files you need to. ,, , , , etc.

Always find the latest container config files from https://github.com/juippis/my-gentoo-lxd-scripts/tree/master/container/etc/portage and use wget to get them.

If you wish to only the shell scripts used in testing pull requests, and not  files, follow these steps:

Binhost / binpkgs
With the above settings we are enabling binpkgs to be generated, and used, for everything other except packages we're actually testing. This will speed up testing process immensively. Make sure your user has correct permissions in your host to be able to write to shared binpkg directory.

Update your container
Start the update. Remember to switch profiles here if you need to.

Let's use the latest gcc.

Container-specific modifications to pkg-testing-tools
This step is optional.

Our testing depends heavily on https://github.com/slashbeast/pkg-testing-tools. To "configure" it for specific cases, we'll have to patch it directly utilizing.

Get the container-specific patches from here: https://github.com/juippis/my-gentoo-lxd-scripts/tree/master/pkg-testing-tool-patches

For example for general pull request testing, against =app-portage/pkg-testing-tools-0.1.0, we'd do:

Set up container scripts
If you've followed the steps above, your container should have directory with contents from https://github.com/juippis/my-gentoo-lxd-scripts/tree/master/container/bin - if you didn't use  add this $PATH to your container's  and :

Finishing touches for your container
We'll do a world update and depclean remnants after editing our. Then run to submit the initial list, and from now on running  from a snapshot-container or main container will only submit modified package list when comparing to base image.

Log out, turn off container.

(Ctrl+d works too)

Automatic way via git sync
You should now have the contents of https://github.com/juippis/my-gentoo-lxd-scripts/tree/master/host/bin in your host's user dir. occassionally to get updates.

Relog or invoke to get $PATH updated.

Manually by wgetting
Just take a look at https://github.com/juippis/my-gentoo-lxd-scripts/tree/master/host/bin and wget / copy-paste manually to your host user's bin dir. Add the script dir to your $PATH via and/or, relog or invoke  to get $PATH updated.

Cron job to keep container up-to-date automatically
Use your desired cron system to make the host's maintenance script a cron job. In other words, can be ran to keep the base image updated.

container_maintain_my-test-container.sh
Script that attempts to gather all container's base maintenance tasks. Can be cron'd or called manually before each "test session".

container_start_my-test-container.sh
Simple helper script to do manual tasks in the base container. Rarely used.

container_start_tmptestmycontainer.sh
Sets up a generic testing environment fast. You can use this for personal stuff.

test-pr.sh
Gets a Github pull request as a parameter, and sets up a new environment to test it. Attempts to include every necessary step to confirm that the PR builds.

disable-native-symlinks.sh
Quick and dirty script to disable native-symlinks. Ideally this gets called via.

errors_and_qa_notices.sh
Just an error grepper. Spams the screen for any pre-defined checks.

fixshm.sh
Required for some openrc systems to populate devices inside container.

fullget.sh
Gets the Github pull request and applies it onto ::gentoo tree. In future, any git-format patch should be appliable.

initialize_my-test-container.sh
Designed to be ran one-time only whenever a new container is launched. Makes boring tasks easier.

prtester.sh
Identifies .ebuild files that have changed against git-tree's HEAD state, and proceeds to test them.

rdeptester.sh
Give package as a parameter and it tests reverse dependencies of given package. By default it picks 6 rdeps, but with an -a flag it tests them all. Good for checking library updates which don't have test phase enabled.

Testing that everything works!
Choose any PR to your liking from https://github.com/gentoo/gentoo/pulls. Do note that it can't be CLOSED, in other words, merged to main tree as that will cause patch merging collision. And it should edit an .ebuild file, ideally adding a new .ebuild to the tree to be tested.

You can always, at any given time log in to the container and inspect / test everything manually. This is especially handy if you spot a mistake in the .ebuild file and need to test that your modification works.

Examples
A couple of real-life examples with full output below.

'''Example 1: Simple PR with no deps. Gets ran with  and  .'''

All looks good. Proceed to merge using pram (or if you share your ::gentoo repository between container/host, just do.

Example 2: PR bumping a package with some USE flags, and a test phase available.

All looks good. Proceed to merge using pram (or if you share your ::gentoo repository between container/host, just do.

Example 3: A PR with multiple commits touching different packages:

Example 4: One specific USE-flag causing build failures {{Cmd|test-pr.sh 20348|collapse-output=true|output= Initializing new test environment... this will take a while. Applying: dev-php/pecl-parallel: New package: v1.1.4 Packages to be tested: dev-php/pecl-parallel-1.1.4

[INFO] >>> Following testing jobs will be executed: =dev-php/pecl-parallel-1.1.4   USE: php_targets_php7-3 php_targets_php7-4 php_targets_php8-0 =dev-php/pecl-parallel-1.1.4   USE: -php_targets_php7-3 php_targets_php7-4 -php_targets_php8-0 =dev-php/pecl-parallel-1.1.4   USE: php_targets_php7-3 -php_targets_php7-4 -php_targets_php8-0 =dev-php/pecl-parallel-1.1.4   USE: -php_targets_php7-3 php_targets_php7-4 php_targets_php8-0 =dev-php/pecl-parallel-1.1.4   USE: php_targets_php7-3 -php_targets_php7-4 php_targets_php8-0 =dev-php/pecl-parallel-1.1.4   USE: -php_targets_php7-3 -php_targets_php7-4 php_targets_php8-0 =dev-php/pecl-parallel-1.1.4   USE:, FEATURES: test [INFO] >>> Running (1 of 7) =dev-php/pecl-parallel-1.1.4 with USE: php_targets_php7-3 php_targets_php7-4 php_targets_php8-0

These are the packages that would be merged, in order:

Calculating dependencies \[binary N     ] dev-libs/oniguruma-6.9.6-r1:0/5::gentoo  USE="-crnl-as-line-terminator -static-libs" ABI_X86="32 (64) (-x32)" 0 KiB [binary NS    ] sys-libs/db-5.3.28-r5:5.3::gentoo [6.0.35-r3:6.0::gentoo] USE="-cxx -doc -examples -java -tcl -test" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] app-admin/metalog-20200113-r1::gentoo  USE="(unicode)" 0 KiB [binary N     ] virtual/logger-0-r1::gentoo  0 KiB [binary N     ] dev-libs/apr-1.7.0-r1:1/1.7::gentoo  USE="urandom -doc -older-kernels-compatibility (-selinux) -static-libs" 0 KiB [binary N     ] dev-libs/apr-util-1.6.1-r6:1::gentoo  USE="berkdb gdbm -doc -ldap (-libressl) -mysql -nss -odbc -openssl -postgres -sqlite -static-libs" 0 KiB [binary N     ] app-admin/apache-tools-2.4.46::gentoo  USE="ssl (-libressl)" 0 KiB [binary N     ] mail-mta/nullmailer-2.2-r1::gentoo  USE="ssl -test" 0 KiB [binary N     ] virtual/mta-1-r2::gentoo  0 KiB [binary N     ] www-servers/apache-2.4.46-r6:2::gentoo  USE="gdbm (split-usr) ssl suexec-caps threads -debug -doc -ldap (-libressl) (-selinux) -static -suexec -suexec-syslog" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_core authn_dbm authn_file authz_core authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers http2 include info log_config logio mime mime_magic negotiation rewrite setenvif socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias -access_compat -asis -auth_digest -auth_form -authn_dbd -authn_socache -authz_dbd -brotli -cache_disk -cache_socache -cern_meta -charset_lite -dbd -dumpio -ident -imagemap -lbmethod_bybusyness -lbmethod_byrequests -lbmethod_bytraffic -lbmethod_heartbeat -log_forensic (-lua) -macro -md -proxy -proxy_ajp -proxy_balancer -proxy_connect -proxy_fcgi -proxy_ftp -proxy_html -proxy_http -proxy_http2 -proxy_scgi -proxy_wstunnel -ratelimit -remoteip -reqtimeout -session -session_cookie -session_crypto -session_dbd -slotmem_shm -socache_memcache -substitute -version -watchdog -xml2enc" APACHE2_MPMS="-event -prefork -worker" LUA_SINGLE_TARGET="lua5-1 -lua5-2 -lua5-3 -lua5-4" 0 KiB [binary N     ] app-eselect/eselect-php-0.9.7::gentoo  USE="apache2 -fpm" 0 KiB [ebuild N     ] dev-lang/php-7.3.27-r1:7.3::gentoo  USE="acl berkdb bzip2 cli ctype fileinfo filter flatfile gdbm hash iconv ipv6 jit json opcache phar posix readline session simplexml ssl threads tokenizer unicode xml zlib -apache2 -argon2 -bcmath -calendar -cdb -cgi -cjk -coverage -curl -debug -embed -enchant -exif -firebird -fpm -ftp -gd -gmp -imap -inifile -intl -iodbc -kerberos -ldap -ldap-sasl -libedit (-libressl) -lmdb -mhash -mssql -mysql -mysqli -nls -oci8-instant-client -odbc -pcntl -pdo -phpdbg -postgres -qdbm -recode (-selinux) -session-mm -sharedmem -snmp -soap -sockets -sodium -spell -sqlite -systemd -sysvipc -test -tidy -tokyocabinet -truetype -wddx -webp -xmlreader -xmlrpc -xmlwriter -xpm -xslt -zip -zip-encryption" 11854 KiB [ebuild N     ] dev-lang/php-8.0.3:8.0::gentoo  USE="acl berkdb bzip2 cli ctype fileinfo filter flatfile gdbm iconv ipv6 jit opcache phar posix readline session simplexml ssl threads tokenizer unicode xml zlib -apache2 -argon2 -bcmath -calendar -cdb -cgi -cjk -coverage -curl -debug -embed -enchant -exif -ffi -firebird -fpm -ftp -gd -gmp -imap -inifile -intl -iodbc -kerberos -ldap -ldap-sasl -libedit (-libressl) -lmdb -mhash -mssql -mysql -mysqli -nls -oci8-instant-client -odbc -pcntl -pdo -phpdbg -postgres -qdbm (-selinux) -session-mm -sharedmem -snmp -soap -sockets -sodium -spell -sqlite -systemd -sysvipc -test -tidy -tokyocabinet -truetype -webp -xmlreader -xmlwriter -xpm -xslt -zip" 10504 KiB [ebuild N     ] dev-lang/php-7.4.16:7.4::gentoo  USE="acl berkdb bzip2 cli ctype fileinfo filter flatfile gdbm iconv ipv6 jit json opcache phar posix readline session simplexml ssl threads tokenizer unicode xml zlib -apache2 -argon2 -bcmath -calendar -cdb -cgi -cjk -coverage -curl -debug -embed -enchant -exif -ffi -firebird -fpm -ftp -gd -gmp -imap -inifile -intl -iodbc -kerberos -ldap -ldap-sasl -libedit (-libressl) -lmdb -mhash -mssql -mysql -mysqli -nls -oci8-instant-client -odbc -pcntl -pdo -phpdbg -postgres -qdbm (-selinux) -session-mm -sharedmem -snmp -soap -sockets -sodium -spell -sqlite -systemd -sysvipc -test -tidy -tokyocabinet -truetype -webp -xmlreader -xmlrpc -xmlwriter -xpm -xslt -zip" 10093 KiB [ebuild N     ] dev-php/pecl-parallel-1.1.4::gentoo  USE="-test" PHP_TARGETS="php7-3 php7-4 php8-0" 58 KiB

Total: 15 packages (14 new, 1 in new slot, 11 binaries), Size of downloads: 32508 KiB

The following USE changes are necessary to proceed: (see "package.use" in the portage(5) man page for more details) >=dev-lang/php-7.3.27-r1:7.3 threads >=dev-lang/php-7.4.16:7.4 threads >=dev-lang/php-8.0.3 threads
 * 1) required by dev-php/pecl-parallel-1.1.4::gentoo[php_targets_php7-3,-test]
 * 2) required by =dev-php/pecl-parallel-1.1.4 (argument)
 * 1) required by dev-php/pecl-parallel-1.1.4::gentoo[-test,php_targets_php7-4]
 * 2) required by =dev-php/pecl-parallel-1.1.4 (argument)
 * 1) required by dev-php/pecl-parallel-1.1.4::gentoo[-test,php_targets_php8-0]
 * 2) required by =dev-php/pecl-parallel-1.1.4 (argument)

Autounmask changes successfully written. ... done! [binary N     ] dev-libs/oniguruma-6.9.6-r1:0/5::gentoo  USE="-crnl-as-line-terminator -static-libs" ABI_X86="32 (64) (-x32)" 0 KiB [binary NS    ] sys-libs/db-5.3.28-r5:5.3::gentoo [6.0.35-r3:6.0::gentoo] USE="-cxx -doc -examples -java -tcl -test" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] app-admin/metalog-20200113-r1::gentoo  USE="(unicode)" 0 KiB [binary N     ] virtual/logger-0-r1::gentoo  0 KiB [binary N     ] dev-libs/apr-1.7.0-r1:1/1.7::gentoo  USE="urandom -doc -older-kernels-compatibility (-selinux) -static-libs" 0 KiB [binary N     ] dev-libs/apr-util-1.6.1-r6:1::gentoo  USE="berkdb gdbm -doc -ldap (-libressl) -mysql -nss -odbc -openssl -postgres -sqlite -static-libs" 0 KiB [binary N     ] app-admin/apache-tools-2.4.46::gentoo  USE="ssl (-libressl)" 0 KiB [binary N     ] mail-mta/nullmailer-2.2-r1::gentoo  USE="ssl -test" 0 KiB [binary N     ] virtual/mta-1-r2::gentoo  0 KiB [binary N     ] www-servers/apache-2.4.46-r6:2::gentoo  USE="gdbm (split-usr) ssl suexec-caps threads -debug -doc -ldap (-libressl) (-selinux) -static -suexec -suexec-syslog" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_core authn_dbm authn_file authz_core authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers http2 include info log_config logio mime mime_magic negotiation rewrite setenvif socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias -access_compat -asis -auth_digest -auth_form -authn_dbd -authn_socache -authz_dbd -brotli -cache_disk -cache_socache -cern_meta -charset_lite -dbd -dumpio -ident -imagemap -lbmethod_bybusyness -lbmethod_byrequests -lbmethod_bytraffic -lbmethod_heartbeat -log_forensic (-lua) -macro -md -proxy -proxy_ajp -proxy_balancer -proxy_connect -proxy_fcgi -proxy_ftp -proxy_html -proxy_http -proxy_http2 -proxy_scgi -proxy_wstunnel -ratelimit -remoteip -reqtimeout -session -session_cookie -session_crypto -session_dbd -slotmem_shm -socache_memcache -substitute -version -watchdog -xml2enc" APACHE2_MPMS="-event -prefork -worker" LUA_SINGLE_TARGET="lua5-1 -lua5-2 -lua5-3 -lua5-4" 0 KiB [binary N     ] app-eselect/eselect-php-0.9.7::gentoo  USE="apache2 -fpm" 0 KiB [ebuild N     ] dev-lang/php-7.3.27-r1:7.3::gentoo  USE="acl berkdb bzip2 cli ctype fileinfo filter flatfile gdbm hash iconv ipv6 jit json opcache phar posix readline session simplexml ssl threads tokenizer unicode xml zlib -apache2 -argon2 -bcmath -calendar -cdb -cgi -cjk -coverage -curl -debug -embed -enchant -exif -firebird -fpm -ftp -gd -gmp -imap -inifile -intl -iodbc -kerberos -ldap -ldap-sasl -libedit (-libressl) -lmdb -mhash -mssql -mysql -mysqli -nls -oci8-instant-client -odbc -pcntl -pdo -phpdbg -postgres -qdbm -recode (-selinux) -session-mm -sharedmem -snmp -soap -sockets -sodium -spell -sqlite -systemd -sysvipc -test -tidy -tokyocabinet -truetype -wddx -webp -xmlreader -xmlrpc -xmlwriter -xpm -xslt -zip -zip-encryption" 11854 KiB [ebuild N     ] dev-lang/php-8.0.3:8.0::gentoo  USE="acl berkdb bzip2 cli ctype fileinfo filter flatfile gdbm iconv ipv6 jit opcache phar posix readline session simplexml ssl threads tokenizer unicode xml zlib -apache2 -argon2 -bcmath -calendar -cdb -cgi -cjk -coverage -curl -debug -embed -enchant -exif -ffi -firebird -fpm -ftp -gd -gmp -imap -inifile -intl -iodbc -kerberos -ldap -ldap-sasl -libedit (-libressl) -lmdb -mhash -mssql -mysql -mysqli -nls -oci8-instant-client -odbc -pcntl -pdo -phpdbg -postgres -qdbm (-selinux) -session-mm -sharedmem -snmp -soap -sockets -sodium -spell -sqlite -systemd -sysvipc -test -tidy -tokyocabinet -truetype -webp -xmlreader -xmlwriter -xpm -xslt -zip" 10504 KiB [ebuild N     ] dev-lang/php-7.4.16:7.4::gentoo  USE="acl berkdb bzip2 cli ctype fileinfo filter flatfile gdbm iconv ipv6 jit json opcache phar posix readline session simplexml ssl threads tokenizer unicode xml zlib -apache2 -argon2 -bcmath -calendar -cdb -cgi -cjk -coverage -curl -debug -embed -enchant -exif -ffi -firebird -fpm -ftp -gd -gmp -imap -inifile -intl -iodbc -kerberos -ldap -ldap-sasl -libedit (-libressl) -lmdb -mhash -mssql -mysql -mysqli -nls -oci8-instant-client -odbc -pcntl -pdo -phpdbg -postgres -qdbm (-selinux) -session-mm -sharedmem -snmp -soap -sockets -sodium -spell -sqlite -systemd -sysvipc -test -tidy -tokyocabinet -truetype -webp -xmlreader -xmlrpc -xmlwriter -xpm -xslt -zip" 10093 KiB [ebuild N     ] dev-php/pecl-parallel-1.1.4::gentoo  USE="-test" PHP_TARGETS="php7-3 php7-4 php8-0" 58 KiB

Total: 15 packages (14 new, 1 in new slot, 11 binaries), Size of downloads: 32508 KiB

>>> Verifying ebuild manifests >>> Emerging binary (1 of 15) dev-libs/oniguruma-6.9.6-r1::gentoo >>> Emerging binary (2 of 15) sys-libs/db-5.3.28-r5::gentoo >>> Emerging binary (3 of 15) app-admin/metalog-20200113-r1::gentoo >>> Emerging binary (4 of 15) dev-libs/apr-1.7.0-r1::gentoo >>> Installing (2 of 15) sys-libs/db-5.3.28-r5::gentoo >>> Installing (1 of 15) dev-libs/oniguruma-6.9.6-r1::gentoo >>> Installing (3 of 15) app-admin/metalog-20200113-r1::gentoo >>> Installing (4 of 15) dev-libs/apr-1.7.0-r1::gentoo >>> Emerging binary (5 of 15) virtual/logger-0-r1::gentoo >>> Installing (5 of 15) virtual/logger-0-r1::gentoo >>> Emerging binary (6 of 15) mail-mta/nullmailer-2.2-r1::gentoo >>> Installing (6 of 15) mail-mta/nullmailer-2.2-r1::gentoo >>> Emerging binary (7 of 15) virtual/mta-1-r2::gentoo >>> Emerging binary (8 of 15) dev-libs/apr-util-1.6.1-r6::gentoo >>> Installing (7 of 15) virtual/mta-1-r2::gentoo >>> Installing (8 of 15) dev-libs/apr-util-1.6.1-r6::gentoo >>> Emerging binary (9 of 15) app-admin/apache-tools-2.4.46::gentoo >>> Installing (9 of 15) app-admin/apache-tools-2.4.46::gentoo >>> Emerging binary (10 of 15) www-servers/apache-2.4.46-r6::gentoo >>> Installing (10 of 15) www-servers/apache-2.4.46-r6::gentoo >>> Emerging binary (11 of 15) app-eselect/eselect-php-0.9.7::gentoo >>> Installing (11 of 15) app-eselect/eselect-php-0.9.7::gentoo >>> Emerging (12 of 15) dev-lang/php-7.3.27-r1::gentoo >>> Emerging (13 of 15) dev-lang/php-8.0.3::gentoo >>> Emerging (14 of 15) dev-lang/php-7.4.16::gentoo >>> Installing (14 of 15) dev-lang/php-7.4.16::gentoo >>> Installing (13 of 15) dev-lang/php-8.0.3::gentoo >>> Installing (12 of 15) dev-lang/php-7.3.27-r1::gentoo >>> Emerging (15 of 15) dev-php/pecl-parallel-1.1.4::gentoo >>> Failed to emerge dev-php/pecl-parallel-1.1.4, Log file: >>> '/var/tmp/portage/vbslogs/build/dev-php/pecl-parallel-1.1.4:20210414-114543.log' >>> Jobs: 14 of 15 complete, 1 failed              Load avg: 4.46, 3.44, 1.56 * Package:   dev-php/pecl-parallel-1.1.4 * Repository: gentoo * Maintainer: jaco@uls.co.za proxy-maint@gentoo.org * USE:       abi_x86_64 amd64 elibc_glibc kernel_linux php_targets_php7-3 php_targets_php7-4 php_targets_php8-0 userland_GNU * FEATURES:  network-sandbox preserve-libs sandbox userpriv usersandbox

>>> Unpacking source... >>> Unpacking pecl-parallel-1.1.4.tgz to /var/tmp/portage/dev-php/pecl-parallel-1.1.4/work >>> Source unpacked in /var/tmp/portage/dev-php/pecl-parallel-1.1.4/work >>> Preparing source in /var/tmp/portage/dev-php/pecl-parallel-1.1.4/work/parallel-1.1.4 ... * Running '/usr/lib64/php7.3/bin/phpize' ... [ ok ] * Running eautoreconf in '/var/tmp/portage/dev-php/pecl-parallel-1.1.4/work/php7.3' ... * Running 'libtoolize --install --copy --force' ... [ ok ] * Running 'aclocal' ... [ ok ] * Running 'autoconf --force' ... [ ok ] * Running 'autoheader' ... [ ok ] * Running elibtoolize in: php7.3/ *  Applying portage/1.2.0 patch ... *   Applying sed/1.5.6 patch ... *   Applying as-needed/2.4.3 patch ... * Running '/usr/lib64/php7.4/bin/phpize' ... [ ok ] * Running 'autoconf --force' ... [ ok ] * Running 'autoheader' ... [ ok ] * Running '/usr/lib64/php8.0/bin/phpize' ... [ ok ] * Running 'autoconf --force' ... [ ok ] * Running 'autoheader' ... [ ok ] >>> Source prepared. >>> Configuring source in /var/tmp/portage/dev-php/pecl-parallel-1.1.4/work/parallel-1.1.4 ... * econf: updating php7.4/config.guess with /usr/share/gnuconfig/config.guess * econf: updating php7.4/build/config.guess with /usr/share/gnuconfig/config.guess * econf: updating php7.4/build/config.sub with /usr/share/gnuconfig/config.sub * econf: updating php7.4/config.sub with /usr/share/gnuconfig/config.sub * econf: updating php8.0/config.guess with /usr/share/gnuconfig/config.guess * econf: updating php8.0/build/config.guess with /usr/share/gnuconfig/config.guess * econf: updating php8.0/build/config.sub with /usr/share/gnuconfig/config.sub * econf: updating php8.0/config.sub with /usr/share/gnuconfig/config.sub * econf: updating php7.3/config.guess with /usr/share/gnuconfig/config.guess * econf: updating php7.3/config.sub with /usr/share/gnuconfig/config.sub ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --docdir=/usr/share/doc/pecl-parallel-1.1.4 --htmldir=/usr/share/doc/pecl-parallel-1.1.4/html --with-sysroot=/ --libdir=/usr/lib64 --with-php-config=/usr/lib64/php7.3/bin/php-config ... ... it prints the whole build.log ... ... /var/tmp/portage/dev-php/pecl-parallel-1.1.4/work/php8.0/src/cache.c:276:30: error: incompatible types when assigning to type 'zend_type' from type 'int' /var/tmp/portage/dev-php/pecl-parallel-1.1.4/work/php8.0/src/check.c:129:85: warning: implicit declaration of function 'ZEND_TYPE_IS_CLASS'; did you mean 'ZEND_TYPE_HAS_CLASS'? [-Wimplicit-function-declaration] 129 |    if (ZEND_TYPE_IS_SET(it->type) && (ZEND_TYPE_CODE(it->type) == IS_OBJECT || ZEND_TYPE_IS_CLASS(it->type))) { |                                                                                ^      |                                                                                 ZEND_TYPE_HAS_CLASS /var/tmp/portage/dev-php/pecl-parallel-1.1.4/work/php8.0/src/check.c:139:15: error: 'zend_arg_info' {aka 'struct _zend_arg_info'} has no member named 'pass_by_reference' 139 |        if (it->pass_by_reference) { |              ^~ /var/tmp/portage/dev-php/pecl-parallel-1.1.4/work/php8.0/src/check.c:165:15: error: 'zend_arg_info' {aka 'struct _zend_arg_info'} has no member named 'pass_by_reference' 165 |        if (it->pass_by_reference) { |              ^~ /bin/sh /var/tmp/portage/dev-php/pecl-parallel-1.1.4/work/php8.0/libtool --mode=compile x86_64-pc-linux-gnu-gcc -I. -I/var/tmp/portage/dev-php/pecl-parallel-1.1.4/work/php8.0 -I/var/tmp/portage/dev-php/pecl-parallel-1.1.4/work/php8.0/include -I/var/tmp/portage/dev-php/pecl-parallel-1.1.4/work/php8.0/main -I/var/tmp/portage/dev-php/pecl-parallel-1.1.4/work/php8.0 -I/usr/lib64/php8.0/include/php -I/usr/lib64/php8.0/include/php/main -I/usr/lib64/php8.0/include/php/TSRM -I/usr/lib64/php8.0/include/php/Zend -I/usr/lib64/php8.0/include/php/ext -I/usr/lib64/php8.0/include/php/ext/date/lib -I/var/tmp/portage/dev-php/pecl-parallel-1.1.4/work/php8.0 -DHAVE_CONFIG_H  -march=native -O2 -pipe -frecord-gcc-switches   -Wall -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1  -c /var/tmp/portage/dev-php/pecl-parallel-1.1.4/work/php8.0/src/loop.c -o src/loop.lo /var/tmp/portage/dev-php/pecl-parallel-1.1.4/work/php8.0/src/check.c: In function 'php_parallel_check_class_inline': /var/tmp/portage/dev-php/pecl-parallel-1.1.4/work/php8.0/src/check.c:538:13: warning: implicit declaration of function 'ZEND_TYPE_IS_CE'; did you mean 'ZEND_TYPE_IS_SET'? [-Wimplicit-function-declaration] 538 |        if (ZEND_TYPE_IS_CE(info->type)) { |            ^      |             ZEND_TYPE_IS_SET make: *** Error 1 make: *** Waiting for unfinished jobs.... make: *** Error 1 make: *** Error 1 x86_64-pc-linux-gnu-gcc -I. -I/var/tmp/portage/dev-php/pecl-parallel-1.1.4/work/php8.0 -I/var/tmp/portage/dev-php/pecl-parallel-1.1.4/work/php8.0/include -I/var/tmp/portage/dev-php/pecl-parallel-1.1.4/work/php8.0/main -I/var/tmp/portage/dev-php/pecl-parallel-1.1.4/work/php8.0 -I/usr/lib64/php8.0/include/php -I/usr/lib64/php8.0/include/php/main -I/usr/lib64/php8.0/include/php/TSRM -I/usr/lib64/php8.0/include/php/Zend -I/usr/lib64/php8.0/include/php/ext -I/usr/lib64/php8.0/include/php/ext/date/lib -I/var/tmp/portage/dev-php/pecl-parallel-1.1.4/work/php8.0 -DHAVE_CONFIG_H -march=native -O2 -pipe -frecord-gcc-switches -Wall -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /var/tmp/portage/dev-php/pecl-parallel-1.1.4/work/php8.0/src/loop.c -fPIC -DPIC -o src/.libs/loop.o * ERROR: dev-php/pecl-parallel-1.1.4::gentoo failed (compile phase): *  emake failed * * If you need support, post the output of `emerge --info '=dev-php/pecl-parallel-1.1.4::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-php/pecl-parallel-1.1.4::gentoo'`. * The complete build log is located at '/var/tmp/portage/vbslogs/build/dev-php/pecl-parallel-1.1.4:20210414-114543.log'. * For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-php/pecl-parallel-1.1.4/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-php/pecl-parallel-1.1.4/temp/environment'. * Working directory: '/var/tmp/portage/dev-php/pecl-parallel-1.1.4/work/php8.0' * S: '/var/tmp/portage/dev-php/pecl-parallel-1.1.4/work/parallel-1.1.4' ... ... continues normally to test other USE flag combinations ... ... These are the packages that would be merged, in order:

Calculating dependencies... done! [ebuild  R    ] dev-php/pecl-parallel-1.1.4::gentoo  USE="test*" PHP_TARGETS="php7-3 php7-4* -php8-0" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

>>> Verifying ebuild manifests >>> Emerging (1 of 1) dev-php/pecl-parallel-1.1.4::gentoo >>> Installing (1 of 1) dev-php/pecl-parallel-1.1.4::gentoo >>> Jobs: 1 of 1 complete                          Load avg: 2.51, 3.04, 1.57 >>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

* GNU info directory index is up-to-date.

* IMPORTANT: 1 news items need reading for repository 'gentoo'. * Use eselect news read to view new items.

[ERROR] >>> Not all runs were successful. atom: =dev-php/pecl-parallel-1.1.4, USE flags: 'php_targets_php7-3 php_targets_php7-4 php_targets_php8-0' atom: =dev-php/pecl-parallel-1.1.4, USE flags: '-php_targets_php7-3 php_targets_php7-4 php_targets_php8-0' atom: =dev-php/pecl-parallel-1.1.4, USE flags: 'php_targets_php7-3 -php_targets_php7-4 php_targets_php8-0' atom: =dev-php/pecl-parallel-1.1.4, USE flags: '-php_targets_php7-3 -php_targets_php7-4 php_targets_php8-0' Grepping through the logs for any errors or QA notices... /var/tmp/portage/vbslogs/build/dev-php/pecl-parallel-1.1.4:20210414-114543.log: * ERROR: dev-php/pecl-parallel-1.1.4::gentoo failed (compile phase): /var/tmp/portage/vbslogs/build/dev-php/pecl-parallel-1.1.4:20210414-114625.log: * ERROR: dev-php/pecl-parallel-1.1.4::gentoo failed (compile phase): /var/tmp/portage/vbslogs/build/dev-php/pecl-parallel-1.1.4:20210414-114637.log: * ERROR: dev-php/pecl-parallel-1.1.4::gentoo failed (compile phase): /var/tmp/portage/vbslogs/build/dev-php/pecl-parallel-1.1.4:20210414-114650.log: * ERROR: dev-php/pecl-parallel-1.1.4::gentoo failed (compile phase): /var/tmp/portage/vbslogs/elog/dev-php/pecl-parallel-1.1.4:20210414-114647.log:ERROR: dev-php/pecl-parallel-1.1.4::gentoo failed (compile phase): /var/tmp/portage/vbslogs/elog/dev-php/pecl-parallel-1.1.4:20210414-114558.log:ERROR: dev-php/pecl-parallel-1.1.4::gentoo failed (compile phase): /var/tmp/portage/vbslogs/elog/dev-php/pecl-parallel-1.1.4:20210414-114655.log:ERROR: dev-php/pecl-parallel-1.1.4::gentoo failed (compile phase): /var/tmp/portage/vbslogs/elog/dev-php/pecl-parallel-1.1.4:20210414-114634.log:ERROR: dev-php/pecl-parallel-1.1.4::gentoo failed (compile phase): Finished grepping. }}

It's easy to spot in here, that a single enabled USE flag causes build failures.

Example 5: QA notices. {{Cmd|test-pr.sh 19702|collapse-output=true|output= Initializing new test environment... this will take a while. Applying: app-misc/rox-filer-2.11 libSM dependency Packages to be tested: app-misc/rox-filer-2.11

[INFO] >>> Following testing jobs will be executed: =app-misc/rox-filer-2.11   USE: [INFO] >>> Running (1 of 1) =app-misc/rox-filer-2.11 with USE:

These are the packages that would be merged, in order:

Calculating dependencies... done! [binary N     ] media-gfx/graphite2-1.3.14::gentoo  USE="-perl -test" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] gnome-base/gsettings-desktop-schemas-3.38.0::gentoo  USE="introspection" 0 KiB [binary N     ] x11-themes/hicolor-icon-theme-0.17::gentoo  0 KiB [binary N     ] dev-libs/fribidi-1.0.9::gentoo  USE="-static-libs" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] dev-libs/lzo-2.10:2::gentoo  USE="(split-usr) -examples -static-libs" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] media-fonts/liberation-fonts-2.1.2::gentoo  USE="X -fontforge" 0 KiB [binary N     ] media-libs/libpng-1.6.37-r2:0/16::gentoo  USE="-apng -static-libs" ABI_X86="32 (64) (-x32)" CPU_FLAGS_X86="sse" 0 KiB [binary N     ] virtual/ttf-fonts-1-r1::gentoo  0 KiB [binary N     ] x11-themes/gnome-themes-standard-3.28::gentoo  0 KiB [binary N     ] media-libs/freetype-2.10.4:2::gentoo  USE="X adobe-cff bzip2 cleartype_hinting png -bindist -brotli -debug -doc -fontforge -harfbuzz -infinality -static-libs -utils" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] sys-libs/binutils-libs-2.35.2-1:0/2.35.2::gentoo  USE="-64-bit-bfd (-cet) -multitarget -nls -static-libs" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] x11-libs/libXcomposite-0.4.5::gentoo  USE="-doc" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] x11-libs/libXcursor-1.2.0::gentoo  USE="-doc" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] x11-libs/libXdamage-1.1.5::gentoo  ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] x11-libs/libXi-1.7.10::gentoo  USE="-doc" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] x11-libs/gdk-pixbuf-2.42.2:2::gentoo  USE="introspection -gtk-doc -jpeg -tiff" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] dev-libs/atk-2.36.0::gentoo  USE="introspection -gtk-doc" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] dev-util/gtk-update-icon-cache-3.24.26-1::gentoo  0 KiB [binary N     ] media-libs/fontconfig-2.13.1-r2:1.0::gentoo  USE="-doc -static-libs" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] app-eselect/eselect-fontconfig-1.1-r1::gentoo  0 KiB [binary N     ] x11-libs/cairo-1.16.0-r4::gentoo  USE="X glib svg (-aqua) -debug (-gles2-only) -opengl -static-libs -utils -valgrind" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] x11-libs/libXft-2.3.3::gentoo  USE="-doc" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] media-libs/harfbuzz-2.7.4-1:0/0.9.18::gentoo  USE="cairo glib graphite introspection truetype -debug -doc -icu -static-libs -test" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] x11-libs/pango-1.42.4-r2::gentoo  USE="X introspection -test" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] gnome-base/librsvg-2.50.3:2::gentoo  USE="introspection vala" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] x11-themes/adwaita-icon-theme-3.38.0::gentoo  USE="-branding" 0 KiB [binary N     ] x11-libs/gtk+-2.24.32-r1:2::gentoo  USE="introspection (-aqua) -cups -examples -test -vim-syntax -xinerama" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] x11-themes/gtk-engines-adwaita-3.28::gentoo  ABI_X86="32 (64) (-x32)" 0 KiB [ebuild N     ] gnome-base/libglade-2.6.4-r3:2.0::gentoo  USE="-static-libs -test" ABI_X86="32 (64) (-x32)" 348 KiB [ebuild N     ] app-misc/rox-filer-2.11::gentoo  USE="-test" 1863 KiB

Total: 30 packages (30 new, 28 binaries), Size of downloads: 2211 KiB

>>> Verifying ebuild manifests >>> Emerging binary (1 of 30) media-gfx/graphite2-1.3.14::gentoo >>> Emerging binary (2 of 30) gnome-base/gsettings-desktop-schemas-3.38.0::gentoo >>> Emerging binary (3 of 30) x11-themes/hicolor-icon-theme-0.17::gentoo >>> Emerging binary (4 of 30) dev-libs/fribidi-1.0.9::gentoo >>> Emerging binary (5 of 30) dev-libs/lzo-2.10::gentoo >>> Emerging binary (6 of 30) media-fonts/liberation-fonts-2.1.2::gentoo >>> Emerging binary (7 of 30) media-libs/libpng-1.6.37-r2::gentoo >>> Emerging binary (8 of 30) sys-libs/binutils-libs-2.35.2::gentoo >>> Installing (8 of 30) sys-libs/binutils-libs-2.35.2::gentoo >>> Emerging binary (9 of 30) x11-libs/libXcomposite-0.4.5::gentoo >>> Installing (9 of 30) x11-libs/libXcomposite-0.4.5::gentoo >>> Emerging binary (10 of 30) x11-libs/libXcursor-1.2.0::gentoo >>> Installing (3 of 30) x11-themes/hicolor-icon-theme-0.17::gentoo >>> Emerging binary (11 of 30) x11-libs/libXdamage-1.1.5::gentoo >>> Installing (4 of 30) dev-libs/fribidi-1.0.9::gentoo >>> Emerging binary (12 of 30) x11-libs/libXi-1.7.10::gentoo >>> Installing (6 of 30) media-fonts/liberation-fonts-2.1.2::gentoo >>> Emerging binary (13 of 30) dev-libs/atk-2.36.0::gentoo >>> Installing (7 of 30) media-libs/libpng-1.6.37-r2::gentoo >>> Emerging binary (14 of 30) virtual/ttf-fonts-1-r1::gentoo >>> Installing (2 of 30) gnome-base/gsettings-desktop-schemas-3.38.0::gentoo >>> Emerging binary (15 of 30) media-libs/freetype-2.10.4::gentoo >>> Installing (1 of 30) media-gfx/graphite2-1.3.14::gentoo >>> Emerging binary (16 of 30) x11-themes/gnome-themes-standard-3.28::gentoo >>> Installing (5 of 30) dev-libs/lzo-2.10::gentoo >>> Emerging binary (17 of 30) x11-libs/gdk-pixbuf-2.42.2::gentoo >>> Installing (10 of 30) x11-libs/libXcursor-1.2.0::gentoo >>> Installing (11 of 30) x11-libs/libXdamage-1.1.5::gentoo >>> Installing (12 of 30) x11-libs/libXi-1.7.10::gentoo >>> Installing (13 of 30) dev-libs/atk-2.36.0::gentoo >>> Installing (14 of 30) virtual/ttf-fonts-1-r1::gentoo >>> Installing (15 of 30) media-libs/freetype-2.10.4::gentoo >>> Emerging binary (18 of 30) media-libs/fontconfig-2.13.1-r2::gentoo >>> Installing (16 of 30) x11-themes/gnome-themes-standard-3.28::gentoo >>> Installing (17 of 30) x11-libs/gdk-pixbuf-2.42.2::gentoo >>> Emerging binary (19 of 30) dev-util/gtk-update-icon-cache-3.24.26::gentoo >>> Installing (18 of 30) media-libs/fontconfig-2.13.1-r2::gentoo >>> Emerging binary (20 of 30) app-eselect/eselect-fontconfig-1.1-r1::gentoo >>> Installing (19 of 30) dev-util/gtk-update-icon-cache-3.24.26::gentoo >>> Installing (20 of 30) app-eselect/eselect-fontconfig-1.1-r1::gentoo >>> Emerging binary (21 of 30) x11-libs/cairo-1.16.0-r4::gentoo >>> Emerging binary (22 of 30) x11-libs/libXft-2.3.3::gentoo >>> Installing (21 of 30) x11-libs/cairo-1.16.0-r4::gentoo >>> Installing (22 of 30) x11-libs/libXft-2.3.3::gentoo >>> Emerging binary (23 of 30) media-libs/harfbuzz-2.7.4::gentoo >>> Installing (23 of 30) media-libs/harfbuzz-2.7.4::gentoo >>> Emerging binary (24 of 30) x11-libs/pango-1.42.4-r2::gentoo >>> Installing (24 of 30) x11-libs/pango-1.42.4-r2::gentoo >>> Emerging binary (25 of 30) gnome-base/librsvg-2.50.3::gentoo >>> Installing (25 of 30) gnome-base/librsvg-2.50.3::gentoo >>> Emerging binary (26 of 30) x11-themes/adwaita-icon-theme-3.38.0::gentoo >>> Installing (26 of 30) x11-themes/adwaita-icon-theme-3.38.0::gentoo >>> Emerging binary (27 of 30) x11-libs/gtk+-2.24.32-r1::gentoo >>> Installing (27 of 30) x11-libs/gtk+-2.24.32-r1::gentoo >>> Emerging binary (28 of 30) x11-themes/gtk-engines-adwaita-3.28::gentoo >>> Installing (28 of 30) x11-themes/gtk-engines-adwaita-3.28::gentoo >>> Emerging (29 of 30) gnome-base/libglade-2.6.4-r3::gentoo >>> Installing (29 of 30) gnome-base/libglade-2.6.4-r3::gentoo >>> Emerging (30 of 30) app-misc/rox-filer-2.11::gentoo >>> Installing (30 of 30) app-misc/rox-filer-2.11::gentoo >>> Recording app-misc/rox-filer in "world" favorites file... >>> Jobs: 30 of 30 complete                        Load avg: 0.86, 0.39, 0.15

* Messages for package media-fonts/liberation-fonts-2.1.2:

* The following fontconfig configuration files have been installed: * *   60-liberation.conf * * Use `eselect fontconfig` to enable/disable them.

* Messages for package media-libs/fontconfig-2.13.1-r2:

* Please make fontconfig configuration changes using `eselect * fontconfig`. Any changes made to /etc/fonts/fonts.conf will be * overwritten. If you need to reset your configuration to upstream * defaults, delete the directory /etc/fonts/conf.d/ and re-emerge * fontconfig. * * (Note: Above message is only printed the first time package is * installed. Please look at /usr/share/doc/fontconfig-2.13.1-r2/README.gentoo* * for future reference)

* Messages for package x11-libs/gtk+-2.24.32-r1:

* Please install app-text/evince for print preview functionality. * Alternatively, check "gtk-print-preview-command" documentation and * add it to your gtkrc. * To make the gtk2 file chooser use 'current directory' mode by default, * edit ~/.config/gtk-2.0/gtkfilechooser.ini to contain the following: * [Filechooser Settings] * StartupMode=cwd * * (Note: Above message is only printed the first time package is * installed. Please look at /usr/share/doc/gtk+-2.24.32-r1/README.gentoo* * for future reference)

* Messages for package app-misc/rox-filer-2.11: * Log file: /var/tmp/portage/vbslogs/build/app-misc/rox-filer-2.11:20210305-174048.log

* QA Notice: Files built without respecting LDFLAGS have been detected * Please include the following list of files in your report: * /usr/bin/rox * QA Notice: Pre-stripped files found: * /usr/bin/rox >>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

* Regenerating GNU info directory index... * Processed 86 info files.

[INFO] >>> All good. Grepping through the logs for any errors or QA notices... /var/tmp/portage/vbslogs/build/app-misc/rox-filer-2.11:20210305-174048.log: * QA Notice: Files built without respecting LDFLAGS have been detected /var/tmp/portage/vbslogs/build/app-misc/rox-filer-2.11:20210305-174048.log: * QA Notice: Pre-stripped files found: /var/tmp/portage/vbslogs/elog/app-misc/rox-filer-2.11:20210305-174058.log:QA Notice: Files built without respecting LDFLAGS have been detected /var/tmp/portage/vbslogs/elog/app-misc/rox-filer-2.11:20210305-174058.log:QA Notice: Pre-stripped files found: Finished grepping. my-test-container-snap-19702 ~ # emacs /var/tmp/portage/vbslogs/build/app-misc/rox-filer-2.11:20210305-174048.log }}

'''Example 6: Typo in the ebuild results in a build failure. Requires interaction. A simple, fast fix. Test.''' {{Cmd|test-pr.sh 23619|collapse-output=true|output= Initializing new test environment... this will take a while. Applying: x11-terms/zutty: add 0.11 Applying: x11-terms/zutty: drop 0.9-r1 Applying: net-mail/mu: drop 1.6.6, 1.6.7, 1.6.9 Applying: dev-util/rebar-bin: drop 3.16.1 Applying: net-proxy/mitmproxy: drop 7.0.3 Packages to be tested: x11-terms/zutty-0.11

[INFO] >>> Following testing jobs will be executed: =x11-terms/zutty-0.11   USE: [INFO] >>> Running (1 of 1) =x11-terms/zutty-0.11 with USE:

These are the packages that would be merged, in order:

Calculating dependencies .... done! [binary N     ] x11-base/xorg-proto-2021.5-2::gentoo  USE="-test" 0 KiB [binary N     ] x11-libs/xtrans-1.4.0-2::gentoo  USE="-doc" 0 KiB [binary N     ] app-crypt/libmd-1.0.4-1::gentoo  ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] x11-misc/compose-tables-1.7.3-2::gentoo  0 KiB [binary N     ] x11-libs/libXau-1.0.9-r1-2::gentoo  USE="-doc" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] dev-util/pkgconf-1.8.0-r1-1:0/3::gentoo  USE="-test" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] x11-libs/libdrm-2.4.109-2::gentoo  USE="-libkms -valgrind" ABI_X86="32 (64) (-x32)" VIDEO_CARDS="amdgpu radeon (-exynos) (-freedreno) -intel -nouveau (-omap) (-tegra) (-vc4) (-vivante) -vmware" 0 KiB [binary N     ] x11-libs/libxshmfence-1.3-r2-2::gentoo  ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] sys-devel/llvm-common-13.0.0-1::gentoo  0 KiB [binary N     ] dev-libs/libbsd-0.11.3-2::gentoo  USE="-static-libs" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] media-libs/libpng-1.6.37-r2-1:0/16::gentoo  USE="-apng -static-libs" ABI_X86="32 (64) (-x32)" CPU_FLAGS_X86="sse" 0 KiB [binary N     ] virtual/pkgconfig-2-r1-1::gentoo  0 KiB [binary N     ] x11-libs/libICE-1.0.10-1::gentoo  USE="ipv6" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] media-libs/freetype-2.11.1-2:2::gentoo  USE="adobe-cff bzip2 cleartype-hinting png -X -brotli -debug -doc -fontforge -harfbuzz (-infinality) -static-libs -utils" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] x11-libs/libXdmcp-1.1.3-2::gentoo  USE="-doc" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] x11-libs/libxcb-1.14-2:0/1.12::gentoo  USE="xkb -doc (-selinux) -test" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] x11-libs/libX11-1.7.3-2::gentoo  USE="ipv6 -doc -test" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] x11-libs/libXext-1.3.4-2::gentoo  USE="-doc" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] x11-libs/libXfixes-6.0.0-2::gentoo  USE="-doc" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] media-libs/libglvnd-1.4.0-2::gentoo  USE="X -test" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] x11-libs/libXxf86vm-1.1.4-r2-2::gentoo  USE="-doc" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] sys-devel/llvm-13.0.0-2:13::gentoo  USE="gold libffi ncurses -debug -doc -exegesis -libedit -test -xar -xml -z3" ABI_X86="32 (64) (-x32)" LLVM_TARGETS="AMDGPU BPF (X86) -AArch64 (-ARC) -ARM -AVR (-CSKY) -Hexagon -Lanai (-M68k) -MSP430 -Mips -NVPTX -PowerPC -RISCV -Sparc -SystemZ (-VE) -WebAssembly -XCore" 0 KiB [binary N     ] sys-devel/llvmgold-13-r1-2::gentoo  0 KiB [binary N     ] media-libs/mesa-21.3.4-2::gentoo  USE="X classic gallium gles2 llvm zstd -d3d9 -debug -gles1 -lm-sensors -opencl -osmesa (-selinux) -test -unwind -vaapi -valgrind -vdpau -vulkan -vulkan-overlay -wayland -xa -xvmc -zink" ABI_X86="32 (64) (-x32)" CPU_FLAGS_X86="sse2" VIDEO_CARDS="radeonsi -crocus (-freedreno) -i915 -i965 -intel -iris (-lima) -nouveau (-panfrost) -r100 -r200 -r300 -r600 -radeon (-v3d) (-vc4) -virgl (-vivante) -vmware" 0 KiB [binary N     ] virtual/opengl-7.0-r2-1::gentoo  ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] x11-libs/libSM-1.2.3-r1-1::gentoo  USE="ipv6 uuid -doc" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] x11-libs/libXt-1.2.1-1::gentoo  USE="-doc -test" ABI_X86="32 (64) (-x32)" 0 KiB [binary N     ] x11-libs/libXmu-1.1.3-1::gentoo  USE="ipv6 -doc" ABI_X86="32 (64) (-x32)" 0 KiB [ebuild N     ] x11-terms/zutty-0.11::gentoo  0 KiB

Total: 29 packages (29 new, 28 binaries), Size of downloads: 0 KiB

>>> Verifying ebuild manifests >>> Running pre-merge checks for media-libs/mesa-21.3.4 >>> Emerging binary (1 of 29) x11-base/xorg-proto-2021.5::gentoo >>> Emerging binary (2 of 29) x11-libs/xtrans-1.4.0::gentoo >>> Emerging binary (3 of 29) app-crypt/libmd-1.0.4::gentoo >>> Emerging binary (4 of 29) x11-misc/compose-tables-1.7.3::gentoo >>> Emerging binary (5 of 29) x11-libs/libXau-1.0.9-r1::gentoo >>> Emerging binary (6 of 29) dev-util/pkgconf-1.8.0-r1::gentoo >>> Emerging binary (7 of 29) x11-libs/libdrm-2.4.109::gentoo >>> Emerging binary (8 of 29) x11-libs/libxshmfence-1.3-r2::gentoo >>> Installing (3 of 29) app-crypt/libmd-1.0.4::gentoo >>> Emerging binary (9 of 29) sys-devel/llvm-common-13.0.0::gentoo >>> Installing (2 of 29) x11-libs/xtrans-1.4.0::gentoo >>> Emerging binary (10 of 29) media-libs/libpng-1.6.37-r2::gentoo >>> Installing (1 of 29) x11-base/xorg-proto-2021.5::gentoo >>> Emerging binary (11 of 29) dev-libs/libbsd-0.11.3::gentoo >>> Installing (4 of 29) x11-misc/compose-tables-1.7.3::gentoo >>> Installing (6 of 29) dev-util/pkgconf-1.8.0-r1::gentoo >>> Installing (7 of 29) x11-libs/libdrm-2.4.109::gentoo >>> Emerging binary (12 of 29) virtual/pkgconfig-2-r1::gentoo >>> Installing (5 of 29) x11-libs/libXau-1.0.9-r1::gentoo >>> Installing (8 of 29) x11-libs/libxshmfence-1.3-r2::gentoo >>> Installing (9 of 29) sys-devel/llvm-common-13.0.0::gentoo >>> Installing (10 of 29) media-libs/libpng-1.6.37-r2::gentoo >>> Emerging binary (13 of 29) sys-devel/llvm-13.0.0::gentoo >>> Emerging binary (14 of 29) media-libs/freetype-2.11.1::gentoo >>> Installing (11 of 29) dev-libs/libbsd-0.11.3::gentoo >>> Installing (12 of 29) virtual/pkgconfig-2-r1::gentoo >>> Emerging binary (15 of 29) x11-libs/libICE-1.0.10::gentoo >>> Emerging binary (16 of 29) x11-libs/libXdmcp-1.1.3::gentoo >>> Installing (14 of 29) media-libs/freetype-2.11.1::gentoo >>> Installing (13 of 29) sys-devel/llvm-13.0.0::gentoo >>> Emerging binary (17 of 29) sys-devel/llvmgold-13-r1::gentoo >>> Installing (15 of 29) x11-libs/libICE-1.0.10::gentoo >>> Installing (16 of 29) x11-libs/libXdmcp-1.1.3::gentoo >>> Emerging binary (18 of 29) x11-libs/libSM-1.2.3-r1::gentoo >>> Emerging binary (19 of 29) x11-libs/libxcb-1.14::gentoo >>> Installing (17 of 29) sys-devel/llvmgold-13-r1::gentoo >>> Installing (18 of 29) x11-libs/libSM-1.2.3-r1::gentoo >>> Installing (19 of 29) x11-libs/libxcb-1.14::gentoo >>> Emerging binary (20 of 29) x11-libs/libX11-1.7.3::gentoo >>> Installing (20 of 29) x11-libs/libX11-1.7.3::gentoo >>> Emerging binary (21 of 29) x11-libs/libXext-1.3.4::gentoo >>> Emerging binary (22 of 29) x11-libs/libXfixes-6.0.0::gentoo >>> Emerging binary (23 of 29) x11-libs/libXt-1.2.1::gentoo >>> Installing (21 of 29) x11-libs/libXext-1.3.4::gentoo >>> Installing (23 of 29) x11-libs/libXt-1.2.1::gentoo >>> Emerging binary (24 of 29) media-libs/libglvnd-1.4.0::gentoo >>> Emerging binary (25 of 29) x11-libs/libXxf86vm-1.1.4-r2::gentoo >>> Emerging binary (26 of 29) x11-libs/libXmu-1.1.3::gentoo >>> Installing (22 of 29) x11-libs/libXfixes-6.0.0::gentoo >>> Installing (24 of 29) media-libs/libglvnd-1.4.0::gentoo >>> Installing (25 of 29) x11-libs/libXxf86vm-1.1.4-r2::gentoo >>> Installing (26 of 29) x11-libs/libXmu-1.1.3::gentoo >>> Emerging binary (27 of 29) media-libs/mesa-21.3.4::gentoo >>> Installing (27 of 29) media-libs/mesa-21.3.4::gentoo >>> Emerging binary (28 of 29) virtual/opengl-7.0-r2::gentoo >>> Installing (28 of 29) virtual/opengl-7.0-r2::gentoo >>> Emerging (29 of 29) x11-terms/zutty-0.11::gentoo >>> Failed to emerge x11-terms/zutty-0.11, Log file: >>> '/var/tmp/portage/vbslogs/build/x11-terms/zutty-0.11:20220121-062814.log' >>> Jobs: 28 of 29 complete, 1 failed              Load avg: 0.45, 0.19, 0.07 * Package:   x11-terms/zutty-0.11 * Repository: gentoo * Maintainer: matt@offtopica.uk proxy-maint@gentoo.org * USE:       abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU * FEATURES:  network-sandbox preserve-libs sandbox userpriv usersandbox * Using python3.10 to build >>> Unpacking source... >>> Unpacking zutty-0.11.tar.gz to /var/tmp/portage/x11-terms/zutty-0.11/work >>> Source unpacked in /var/tmp/portage/x11-terms/zutty-0.11/work >>> Preparing source in /var/tmp/portage/x11-terms/zutty-0.11/work/zutty-0.11 ... * Applying zutty-0.11-cxxflags.patch ... /var/tmp/portage/x11-terms/zutty-0.11/temp/environment: line 854: /var/tmp/portage/x11-terms/zutty-0.11/files/zutty-0.11-cxxflags.patch: No such file or directory /var/tmp/portage/x11-terms/zutty-0.11/temp/environment: line 857: /var/tmp/portage/x11-terms/zutty-0.11/files/zutty-0.11-cxxflags.patch: No such file or directory [ !! ] * ERROR: x11-terms/zutty-0.11::gentoo failed (prepare phase): *  patch -p1  failed with /var/tmp/portage/x11-terms/zutty-0.11/files/zutty-0.11-cxxflags.patch * * Call stack: *              ebuild.sh, line  127:  Called src_prepare *            environment, line 2144:  Called default *     phase-functions.sh, line  858:  Called default_src_prepare *     phase-functions.sh, line  923:  Called __eapi6_src_prepare *            environment, line  213:  Called eapply '/var/tmp/portage/x11-terms/zutty-0.11/files/zutty-0.11-cxxflags.patch' *            environment, line  922:  Called _eapply_patch '/var/tmp/portage/x11-terms/zutty-0.11/files/zutty-0.11-cxxflags.patch' *            environment, line  860:  Called __helpers_die 'patch -p1  failed with /var/tmp/portage/x11-terms/zutty-0.11/files/zutty-0.11-cxxflags.patch' *  isolated-functions.sh, line  112:  Called die * The specific snippet of code: *  		die "$@" * * If you need support, post the output of `emerge --info '=x11-terms/zutty-0.11::gentoo'`, * the complete build log and the output of `emerge -pqv '=x11-terms/zutty-0.11::gentoo'`. * The complete build log is located at '/var/tmp/portage/vbslogs/build/x11-terms/zutty-0.11:20220121-062814.log'. * For convenience, a symlink to the build log is located at '/var/tmp/portage/x11-terms/zutty-0.11/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/x11-terms/zutty-0.11/temp/environment'. * Working directory: '/var/tmp/portage/x11-terms/zutty-0.11/work/zutty-0.11' * S: '/var/tmp/portage/x11-terms/zutty-0.11/work/zutty-0.11'

* Messages for package sys-devel/llvm-13.0.0:

* You can find additional opt-viewer utility scripts in: *  /usr/lib/llvm/13/share/opt-viewer * To use these scripts, you will need Python along with the following * packages: *  dev-python/pygments (for opt-viewer) *  dev-python/pyyaml (for all of them)

* Messages for package x11-terms/zutty-0.11: * Log file: /var/tmp/portage/vbslogs/build/x11-terms/zutty-0.11:20220121-062814.log

* Package:   x11-terms/zutty-0.11 * Repository: gentoo * Maintainer: matt@offtopica.uk proxy-maint@gentoo.org * USE:       abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU * FEATURES:  network-sandbox preserve-libs sandbox userpriv usersandbox * Using python3.10 to build * Applying zutty-0.11-cxxflags.patch ... * ERROR: x11-terms/zutty-0.11::gentoo failed (prepare phase): *  patch -p1  failed with /var/tmp/portage/x11-terms/zutty-0.11/files/zutty-0.11-cxxflags.patch * * Call stack: *              ebuild.sh, line  127:  Called src_prepare *            environment, line 2144:  Called default *     phase-functions.sh, line  858:  Called default_src_prepare *     phase-functions.sh, line  923:  Called __eapi6_src_prepare *            environment, line  213:  Called eapply '/var/tmp/portage/x11-terms/zutty-0.11/files/zutty-0.11-cxxflags.patch' *            environment, line  922:  Called _eapply_patch '/var/tmp/portage/x11-terms/zutty-0.11/files/zutty-0.11-cxxflags.patch' *            environment, line  860:  Called __helpers_die 'patch -p1  failed with /var/tmp/portage/x11-terms/zutty-0.11/files/zutty-0.11-cxxflags.patch' *  isolated-functions.sh, line  112:  Called die * The specific snippet of code: *  		die "$@" * * If you need support, post the output of `emerge --info '=x11-terms/zutty-0.11::gentoo'`, * the complete build log and the output of `emerge -pqv '=x11-terms/zutty-0.11::gentoo'`. * The complete build log is located at '/var/tmp/portage/vbslogs/build/x11-terms/zutty-0.11:20220121-062814.log'. * For convenience, a symlink to the build log is located at '/var/tmp/portage/x11-terms/zutty-0.11/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/x11-terms/zutty-0.11/temp/environment'. * Working directory: '/var/tmp/portage/x11-terms/zutty-0.11/work/zutty-0.11' * S: '/var/tmp/portage/x11-terms/zutty-0.11/work/zutty-0.11'

[ERROR] >>> Not all runs were successful. atom: =x11-terms/zutty-0.11, USE flags: '' Error reports for failed atoms, use errors_and_qa_notices.sh to find out exact errors: /var/tmp/portage/vbslogs/zutty-0.11-0.json:       "exit_code": 1, Grepping through the logs for any errors or QA notices... /var/tmp/portage/vbslogs/build/x11-terms/zutty-0.11:20220121-062814.log: * ERROR: x11-terms/zutty-0.11::gentoo failed (prepare phase): Finished grepping. my-test-container-snap-23619 ~ # cd /var/db/repos/gentoo/x11-terms/zutty/ my-test-container-snap-23619 /var/db/repos/gentoo/x11-terms/zutty # ls Manifest metadata.xml  zutty-0.10.ebuild  zutty-0.11-cxxflags.patch  zutty-0.11.ebuild my-test-container-snap-23619 /var/db/repos/gentoo/x11-terms/zutty # mkdir files my-test-container-snap-23619 /var/db/repos/gentoo/x11-terms/zutty # mv zutty-0.11-cxxflags.patch files/ my-test-container-snap-23619 /var/db/repos/gentoo/x11-terms/zutty # prtester.sh Packages to be tested: x11-terms/zutty-0.11

[INFO] >>> Following testing jobs will be executed: =x11-terms/zutty-0.11   USE: [INFO] >>> Running (1 of 1) =x11-terms/zutty-0.11 with USE:

These are the packages that would be merged, in order:

Calculating dependencies ... done! [ebuild N     ] x11-terms/zutty-0.11::gentoo  0 KiB

Total: 1 package (1 new), Size of downloads: 0 KiB

!!! The following binary packages have been ignored due to non matching USE:

=media-libs/libpng-1.6.37-r2 apng

NOTE: The --binpkg-respect-use=n option will prevent emerge from ignoring these binary packages if possible. Using --binpkg-respect-use=y will silence this warning.

>>> Verifying ebuild manifests >>> Emerging (1 of 1) x11-terms/zutty-0.11::gentoo >>> Installing (1 of 1) x11-terms/zutty-0.11::gentoo >>> Jobs: 1 of 1 complete                          Load avg: 0.19, 0.14, 0.07

* Messages for package x11-terms/zutty-0.11: * Log file: /var/tmp/portage/vbslogs/build/x11-terms/zutty-0.11:20220121-063033.log

* Package:   x11-terms/zutty-0.11 * Repository: gentoo * Maintainer: matt@offtopica.uk proxy-maint@gentoo.org * USE:       abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU * FEATURES:  network-sandbox preserve-libs sandbox userpriv usersandbox * Using python3.10 to build * Applying zutty-0.11-cxxflags.patch ... * Skipping make test/check due to ebuild restriction. * Final size of build directory: 2920 KiB (2.8 MiB) * Final size of installed tree:  476 KiB >>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

[INFO] >>> All good. Error reports for failed atoms, use errors_and_qa_notices.sh to find out exact errors: my-test-container-snap-23619 /var/db/repos/gentoo/x11-terms/zutty # }}

'''Example 7: Patch doesn't get applied - most likely due to network not being set up, or due to slow network setup. This can happen if you launch multiple containers at once. Requires interaction and manual calling of scripts.

{{Cmd|test-pr.sh 22234|collapse-output=true|output= Initializing new test environment... this will take a while. Couldn't find new commits to test. Exiting... No desired atoms were tested apparently? Exiting... my-test-container-snap-22234 ~ # fullget.sh 22234 Applying: media-plugins/vdr-imonlcd: version bump to 1.0.3 my-test-container-snap-22234 ~ # prtester.sh Packages to be tested: media-plugins/vdr-imonlcd-1.0.3

[INFO] >>> Following testing jobs will be executed: =media-plugins/vdr-imonlcd-1.0.3   USE: [INFO] >>> Running (1 of 1) =media-plugins/vdr-imonlcd-1.0.3 with USE: ... ... etc, continues normally }}

Acknowledgements / TODO

 * The scripts are most likely awful, but after I've gotten them to work, I haven't looked back. https://imgs.xkcd.com/comics/is_it_worth_the_time.png
 * The  itself can be used to build a tinderbox checking all commits, but an automated bug-reporting system would be needed then. However, it might be good for overlays. You'll need to store the git checkout of a previous run, then compare that to.
 * could run  before applying patches, but it's not needed for my own workflow since I usually do all testing once a day.
 * I need better error handling with . Take example list from https://github.com/toralf/tinderbox/blob/master/data/CATCH_QA and work with that. Also the rundown could use enhancements.
 * I'm making this public to hear feedback! Ideally I'd want an infra-hosted service with Github hook that tests PRs on-demand. After a Gentoo developer has reviewed the PR, they could launch a build-test from Github, which would then return PASS or FAIL to the PR with web-browsable logs.
 * TODO: Study possibility to use SquashFS to reduce container image sizes.
 * TODO: Switch to tatt instead, with custom scripts?
 * (TODO in Github)