├── LICENSE ├── Readme.md ├── container ├── bin │ ├── disable-native-symlinks.sh │ ├── errors_and_qa_notices.sh │ ├── fixshm.sh │ ├── fullget.sh │ ├── initialize_my-test-container.sh │ ├── prtester.sh │ └── rdeptester.sh └── etc │ └── portage │ ├── bashrc │ ├── env │ └── test.conf │ ├── make.conf │ ├── make.conf.custom.example │ ├── package.accept_keywords │ └── default │ ├── package.mask │ └── default │ ├── package.use │ └── default │ └── repos.conf │ └── gentoo.conf ├── host └── bin │ ├── container_maintain_my-test-container.sh │ ├── container_start_my-test-container.sh │ ├── container_start_tmptestmycontainer.sh │ ├── lxd-get-container-cpu-usage.sh │ └── test-pr.sh └── pkg-testing-tool-patches ├── arch ├── 0.1.0 │ ├── pkg-testing-tools-0.1.0-generic-at-flags-enable-autounmask-disable-systemd.patch │ ├── pkg-testing-tools-0.1.0-generic-at-flags-enable-autounmask.patch │ └── pkg-testing-tools-0.1.0-generic-at-flags.patch ├── 0.1.2 │ └── pkg-testing-tools-0.1.2-generic-at-flags.patch └── 0.2.0 │ └── pkg-testing-tool-0.2.0-toggle-more-at-flags.patch ├── mtc ├── 0.1.0 │ └── disable-systemd-enable-flags.patch ├── 0.1.2 │ ├── pkg-testing-tools-0.1.2-toggle-more-flags-generic.patch │ └── pkg-testing-tools-0.1.2-toggle-more-flags-non-systemd.patch └── 0.2.0 │ └── pkg-testing-tool-0.2.0-toggle-more-flags.patch └── pkg-testing-tools-0.1.0-trigger-default-use-flags-for-a-single-run-v2.patch /LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Legal Code 2 | 3 | CC0 1.0 Universal 4 | 5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN 7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS 10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM 11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED 12 | HEREUNDER. 13 | 14 | Statement of Purpose 15 | 16 | The laws of most jurisdictions throughout the world automatically confer 17 | exclusive Copyright and Related Rights (defined below) upon the creator 18 | and subsequent owner(s) (each and all, an "owner") of an original work of 19 | authorship and/or a database (each, a "Work"). 20 | 21 | Certain owners wish to permanently relinquish those rights to a Work for 22 | the purpose of contributing to a commons of creative, cultural and 23 | scientific works ("Commons") that the public can reliably and without fear 24 | of later claims of infringement build upon, modify, incorporate in other 25 | works, reuse and redistribute as freely as possible in any form whatsoever 26 | and for any purposes, including without limitation commercial purposes. 27 | These owners may contribute to the Commons to promote the ideal of a free 28 | culture and the further production of creative, cultural and scientific 29 | works, or to gain reputation or greater distribution for their Work in 30 | part through the use and efforts of others. 31 | 32 | For these and/or other purposes and motivations, and without any 33 | expectation of additional consideration or compensation, the person 34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she 35 | is an owner of Copyright and Related Rights in the Work, voluntarily 36 | elects to apply CC0 to the Work and publicly distribute the Work under its 37 | terms, with knowledge of his or her Copyright and Related Rights in the 38 | Work and the meaning and intended legal effect of CC0 on those rights. 39 | 40 | 1. Copyright and Related Rights. A Work made available under CC0 may be 41 | protected by copyright and related or neighboring rights ("Copyright and 42 | Related Rights"). Copyright and Related Rights include, but are not 43 | limited to, the following: 44 | 45 | i. the right to reproduce, adapt, distribute, perform, display, 46 | communicate, and translate a Work; 47 | ii. moral rights retained by the original author(s) and/or performer(s); 48 | iii. publicity and privacy rights pertaining to a person's image or 49 | likeness depicted in a Work; 50 | iv. rights protecting against unfair competition in regards to a Work, 51 | subject to the limitations in paragraph 4(a), below; 52 | v. rights protecting the extraction, dissemination, use and reuse of data 53 | in a Work; 54 | vi. database rights (such as those arising under Directive 96/9/EC of the 55 | European Parliament and of the Council of 11 March 1996 on the legal 56 | protection of databases, and under any national implementation 57 | thereof, including any amended or successor version of such 58 | directive); and 59 | vii. other similar, equivalent or corresponding rights throughout the 60 | world based on applicable law or treaty, and any national 61 | implementations thereof. 62 | 63 | 2. Waiver. To the greatest extent permitted by, but not in contravention 64 | of, applicable law, Affirmer hereby overtly, fully, permanently, 65 | irrevocably and unconditionally waives, abandons, and surrenders all of 66 | Affirmer's Copyright and Related Rights and associated claims and causes 67 | of action, whether now known or unknown (including existing as well as 68 | future claims and causes of action), in the Work (i) in all territories 69 | worldwide, (ii) for the maximum duration provided by applicable law or 70 | treaty (including future time extensions), (iii) in any current or future 71 | medium and for any number of copies, and (iv) for any purpose whatsoever, 72 | including without limitation commercial, advertising or promotional 73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each 74 | member of the public at large and to the detriment of Affirmer's heirs and 75 | successors, fully intending that such Waiver shall not be subject to 76 | revocation, rescission, cancellation, termination, or any other legal or 77 | equitable action to disrupt the quiet enjoyment of the Work by the public 78 | as contemplated by Affirmer's express Statement of Purpose. 79 | 80 | 3. Public License Fallback. Should any part of the Waiver for any reason 81 | be judged legally invalid or ineffective under applicable law, then the 82 | Waiver shall be preserved to the maximum extent permitted taking into 83 | account Affirmer's express Statement of Purpose. In addition, to the 84 | extent the Waiver is so judged Affirmer hereby grants to each affected 85 | person a royalty-free, non transferable, non sublicensable, non exclusive, 86 | irrevocable and unconditional license to exercise Affirmer's Copyright and 87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the 88 | maximum duration provided by applicable law or treaty (including future 89 | time extensions), (iii) in any current or future medium and for any number 90 | of copies, and (iv) for any purpose whatsoever, including without 91 | limitation commercial, advertising or promotional purposes (the 92 | "License"). The License shall be deemed effective as of the date CC0 was 93 | applied by Affirmer to the Work. Should any part of the License for any 94 | reason be judged legally invalid or ineffective under applicable law, such 95 | partial invalidity or ineffectiveness shall not invalidate the remainder 96 | of the License, and in such case Affirmer hereby affirms that he or she 97 | will not (i) exercise any of his or her remaining Copyright and Related 98 | Rights in the Work or (ii) assert any associated claims and causes of 99 | action with respect to the Work, in either case contrary to Affirmer's 100 | express Statement of Purpose. 101 | 102 | 4. Limitations and Disclaimers. 103 | 104 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 105 | surrendered, licensed or otherwise affected by this document. 106 | b. Affirmer offers the Work as-is and makes no representations or 107 | warranties of any kind concerning the Work, express, implied, 108 | statutory or otherwise, including without limitation warranties of 109 | title, merchantability, fitness for a particular purpose, non 110 | infringement, or the absence of latent or other defects, accuracy, or 111 | the present or absence of errors, whether or not discoverable, all to 112 | the greatest extent permissible under applicable law. 113 | c. Affirmer disclaims responsibility for clearing rights of other persons 114 | that may apply to the Work or any use thereof, including without 115 | limitation any person's Copyright and Related Rights in the Work. 116 | Further, Affirmer disclaims responsibility for obtaining any necessary 117 | consents, permissions or other rights required for any use of the 118 | Work. 119 | d. Affirmer understands and acknowledges that Creative Commons is not a 120 | party to this document and has no duty or obligation with respect to 121 | this CC0 or use of the Work. 122 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | # My Gentoo LXD scripts 2 | 3 | This repo collects the scripts and configs required to run ["ultimate lxd testing environment"](https://wiki.gentoo.org/wiki/User:Juippis/The_ultimate_testing_system_with_lxd). 4 | 5 | 6 | ## Repository structure: 7 | 8 | * container/bin 9 | 10 | Scripts to be executed inside the container. 11 | 12 | * container/etc/portage 13 | 14 | All relevant /etc/portage files. 15 | 16 | * host/bin 17 | 18 | Necessary scripts required to run from the host machine, in other words, outside the container. 19 | 20 | * pkg-testing-tool-patches 21 | 22 | Easy to access patches for different needs, e.g. general PR testing, stabilization work... 23 | 24 | 25 | ## Links 26 | * https://wiki.gentoo.org/wiki/User:Juippis/The_ultimate_testing_system_with_lxd 27 | * https://wiki.gentoo.org/wiki/LXD 28 | * https://linuxcontainers.org/lxd/getting-started-cli/ 29 | * https://packages.gentoo.org/packages/app-emulation/lxd 30 | * https://spdx.org/licenses/CC0-1.0.html 31 | 32 | 33 | ## License 34 | 35 | All of these scripts are licensed under ["CC0-1.0"](https://spdx.org/licenses/CC0-1.0.html). In other words, do **whatever** you want with them. No warranty given. ["See also"](https://wiki.creativecommons.org/wiki/CC0). 36 | 37 | 38 | ## TODO 39 | 40 | Nothing too ambitious. As long as it works... 41 | 42 | * General container: 43 | 44 | * I run often into multiple different build issues with packages in ::gentoo. A general bug reporting tool to automate bug reports would be nice. 45 | 46 | * container/bin/rdeptester.sh 47 | 48 | * Getting a list of only stable-rdeps, for better arch testing work. Eix can do this and should be utilized... 49 | 50 | * host/bin/test-pr.sh 51 | 52 | * Parameters for different kinds of testing, e.g., 53 | 54 | * **-n** for `-native-symlinks` run, since some PRs are made just for that. 55 | 56 | -------------------------------------------------------------------------------- /container/bin/disable-native-symlinks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Quick and dirty way for disabling native-symlinks. Intended to be used with 4 | # discardable containers, ie, does not "toggle" the state of native-symlinks. 5 | 6 | mkdir -p /etc/portage/profile/ 7 | { 8 | echo "dev-lang/python-exec -native-symlinks" 9 | echo "sys-devel/binutils-config -native-symlinks" 10 | echo "sys-devel/gcc-config -cc-wrappers -native-symlinks" 11 | } > /etc/portage/profile/package.use.force 12 | 13 | if [[ -d /etc/portage/package.use ]]; then 14 | { 15 | echo "dev-lang/python-exec -native-symlinks" 16 | echo "sys-devel/binutils-config -native-symlinks" 17 | echo "sys-devel/gcc-config -cc-wrappers -native-symlinks" 18 | } > /etc/portage/package.use/native-symlinks 19 | 20 | else 21 | { 22 | echo "dev-lang/python-exec -native-symlinks" 23 | echo "sys-devel/binutils-config -native-symlinks" 24 | echo "sys-devel/gcc-config -native-symlinks" 25 | } >> /etc/portage/package.use 26 | fi 27 | 28 | emerge -1av --usepkg-exclude dev-lang/python-exec --usepkg-exclude sys-devel/binutils-config --usepkg-exclude sys-devel/gcc-config dev-lang/python-exec sys-devel/binutils-config sys-devel/gcc-config 29 | -------------------------------------------------------------------------------- /container/bin/errors_and_qa_notices.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # prtester.sh: Find all build errors fast, find all QA notices after emerge for the 4 | # atom we just tested. 5 | # 6 | # rdeptester.sh: With pkg-testing-tool --report, and with a custom "test.conf", 7 | # find out exact errors easier. 8 | # 9 | 10 | if [[ -d "/var/tmp/portage/vbslogs/build/" ]]; then 11 | echo "Grepping through the logs for any errors or QA notices..." 12 | grep -r "QA Notice:" /var/tmp/portage/vbslogs/build/ 13 | grep -r "ERROR:" /var/tmp/portage/vbslogs/build/ | grep "failed" 14 | grep -r "* Failed to" /var/tmp/portage/vbslogs/build/ 15 | grep -r "installing to one or more unexpected paths" /var/tmp/portage/vbslogs/build/ 16 | grep -r "Permission denied" /var/tmp/portage/vbslogs/build/ 17 | grep -r "command not found" /var/tmp/portage/vbslogs/build/ 18 | grep -r "WARNING: Unknown options:" /var/tmp/portage/vbslogs/build/ 19 | grep -r "One or more CMake variables were not used by the project" /var/tmp/portage/vbslogs/build/ 20 | grep -r "QA:" /var/tmp/portage/vbslogs/build/ 21 | grep -r "fatal:" /var/tmp/portage/vbslogs/build/ 22 | echo "Finished grepping." 23 | 24 | else 25 | echo "No desired atoms were tested apparently? Exiting..." 26 | 27 | fi 28 | -------------------------------------------------------------------------------- /container/bin/fixshm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ### Simple snippet to populate required devices in container. Can also be done 4 | ### via your container/lxc.conf, see 5 | ### https://ahelpme.com/linux/tmpfs-mount-on-dev-shm-in-lxc-container-or-chroot-environment/ 6 | ### 7 | ### Add 8 | ### /root/bin/fixshm.sh 9 | ### to your /root/.bashrc or /root/.profile to execute this each time you log 10 | ### in to your container. 11 | 12 | mkdir -p /dev/shm 13 | mount -t tmpfs -o nodev,nosuid,noexec,mode=1777,size=6144m tmpfs /dev/shm 14 | -------------------------------------------------------------------------------- /container/bin/fullget.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Just a simple PR patch merger. It's much more wise to set up your git config with (any) 4 | # user.email and user.name, but this in general should work without setup everywhere. 5 | 6 | cd /var/db/repos/gentoo || exit 7 | 8 | curl -s -L https://patch-diff.githubusercontent.com/raw/gentoo/gentoo/pull/${1}.patch | git -c user.email=my@email -c user.name=MyName am --keep-cr -3 9 | -------------------------------------------------------------------------------- /container/bin/initialize_my-test-container.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "" 4 | echo "!! Getting scripts and git portage configuration from " 5 | echo "!! https://github.com/juippis/my-gentoo-lxd-scripts" 6 | echo "" 7 | 8 | sleep 5 9 | 10 | cd /root || exit 11 | git clone --depth=1 https://github.com/juippis/my-gentoo-lxd-scripts.git --no-checkout lxd-bin || exit 12 | cd lxd-bin/ || exit 13 | git config core.sparsecheckout true 14 | echo container/bin/* > .git/info/sparse-checkout 15 | echo container/etc/* >> .git/info/sparse-checkout 16 | git read-tree -m -u HEAD 17 | 18 | echo "" 19 | echo "!! Git configuration done." 20 | echo "" 21 | 22 | sleep 5 23 | 24 | echo "" 25 | echo "!! Symlinking new portage configuration and " 26 | echo "!! creating necessary directories." 27 | echo "" 28 | 29 | sleep 5 30 | 31 | rm -f /etc/portage/make.conf 32 | rmdir /etc/portage/package.use/ || return 33 | 34 | ln -s /root/lxd-bin/container/etc/portage/bashrc /etc/portage/bashrc 35 | ln -s /root/lxd-bin/container/etc/portage/env/ /etc/portage/env 36 | ln -s /root/lxd-bin/container/etc/portage/make.conf /etc/portage/make.conf 37 | ln -s /root/lxd-bin/container/etc/portage/package.accept_keywords/ /etc/portage/package.accept_keywords 38 | ln -s /root/lxd-bin/container/etc/portage/package.mask/ /etc/portage/package.mask 39 | ln -s /root/lxd-bin/container/etc/portage/package.use/ /etc/portage/package.use 40 | ln -s /root/lxd-bin/container/etc/portage/repos.conf/ /etc/portage/repos.conf 41 | 42 | mkdir -p /etc/portage/package.env/ 43 | mkdir -p /etc/portage/package.unmask/ 44 | mkdir -p /var/tmp/portage/vbslogs/ 45 | 46 | touch /etc/portage/make.conf.custom 47 | 48 | sleep 5 49 | 50 | echo "" 51 | echo "!! Modifying /root/.bashrc and /root/.profile to our needs." 52 | echo "" 53 | 54 | echo "PATH=\"\$PATH:~/lxd-bin/container/bin\"" >> /root/.bashrc 55 | echo "/root/lxd-bin/container/bin/fixshm.sh" >> /root/.bashrc 56 | /root/lxd-bin/container/bin/fixshm.sh 57 | cp /root/.bashrc /root/.profile 58 | 59 | echo "" 60 | echo "!! Switching portage tree to git, and syncing." 61 | echo "" 62 | 63 | sleep 5 64 | 65 | rm -r /var/db/repos/gentoo/* || exit 66 | rm -rf /var/db/repos/gentoo/.git || return 67 | rm -f /var/db/repos/gentoo/.gitignore || return 68 | rm -f /var/db/repos/gentoo/.editorconfig || return 69 | emerge --sync || exit 70 | 71 | echo "" 72 | echo "!! At this point, check /etc/portage " 73 | echo "!! (/root/lxd-bin/container/etc/portage/) files, and un-symlink " 74 | echo "!! files you have to edit to fit your needs. You WILL need to fill " 75 | echo "!! /etc/portage/make.conf.custom file with your personal configuration." 76 | echo "!!" 77 | echo "!! Also see /root/.bashrc / /root/.profile and add your preferred EDITOR, etc." 78 | echo "!!" 79 | echo "!! Then run:" 80 | echo "!! emerge -uavDN @world" 81 | echo "!! perl-cleaner --all" 82 | echo "!! eselect news read" 83 | echo "!! etc-update (or dispatch-conf)" 84 | echo "!! (gcc-config -l; gcc-config 2; source /etc/profile)" 85 | echo "!!" 86 | echo "!! and finally install the software you're going to use:" 87 | echo "!! emerge -av app-admin/eclean-kernel app-editors/emacs \\" 88 | echo " app-emacs/ebuild-mode app-editors/vim app-portage/gentoolkit \\" 89 | echo " app-portage/pfl app-portage/portage-utils app-portage/repoman \\" 90 | echo " app-text/ansifilter dev-util/pkgcheck sys-kernel/gentoo-kernel-bin \\" 91 | echo " app-portage/pkg-testing-tool app-portage/iwdevtools net-misc/dhcp" 92 | echo "" 93 | echo "Continue reading: " 94 | echo " https://wiki.gentoo.org/wiki/User:Juippis/The_ultimate_testing_system_with_lxd#Update_your_container" 95 | echo "" 96 | 97 | -------------------------------------------------------------------------------- /container/bin/prtester.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ### Gets non-pushed commits from the local git-tree, and tests every modified 4 | ### .ebuild. Uses pkg-testing-tool to test them, so it runs a compile test with 5 | ### FEATURES="-test" 6 | ### and 7 | ### FEATURES="test" 8 | ### and maximum of 6 runs with randomized USE flag combinations, given that the 9 | ### package has enough USE flags. 10 | ### 11 | 12 | cd /var/db/repos/gentoo || exit 13 | 14 | # git rev-list --quiet doesn't seem to work as intended (v2.44.1) 15 | if [[ -z "$(git rev-list origin/HEAD..HEAD)" ]]; then 16 | echo "Couldn't find new commits to test. Exiting..." 17 | exit 18 | fi 19 | 20 | candidates="$(git show --name-only --diff-filter=AMR --format=tformat: \ 21 | origin/HEAD..HEAD | sort -u | grep ebuild)" 22 | pkgstobetested=() 23 | for ebuild in ${candidates}; do 24 | [[ -f "${ebuild}" ]] && pkgstobetested+=("${ebuild}") 25 | done 26 | 27 | # Let's print what we're about to test. 28 | echo "Ebuilds to be tested:" 29 | printf "%s\n" "${pkgstobetested[@]}" 30 | echo "" 31 | 32 | commit="$(git rev-parse --short=8 HEAD)" 33 | pkg-testing-tool --append-emerge '--autounmask=y --oneshot' \ 34 | --extra-env-file 'test.conf' \ 35 | --test-feature-scope once --max-use-combinations 6 \ 36 | --report /var/tmp/portage/vbslogs/"${commit}".json \ 37 | "${pkgstobetested[@]/#/-f}" 38 | 39 | echo "Error reports for failed atoms, use errors_and_qa_notices.sh to find out exact errors:" 40 | # Print previous line after a pattern match using sed: https://unix.stackexchange.com/a/206887 41 | grep -e atom -e exit_code /var/tmp/portage/vbslogs/"${commit}".json | \ 42 | sed -n '/exit_code": 1/{x;p;d;}; x' | uniq | \ 43 | awk -F ": " '{print $2}' 44 | -------------------------------------------------------------------------------- /container/bin/rdeptester.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ### Usage: rdeptester.sh category/package 4 | ### Example: rdeptester.sh dev-libs/efl 5 | ### 6 | ### Matches the parameter to a list in 7 | ### https://qa-reports.gentoo.org/output/genrdeps/dindex/ 8 | ### 9 | ### By default tests 6 random reverse dependencies, can test ALL 10 | ### (not including-9999 packages) with an -a option. 11 | ### 12 | ### Example: rdeptester.sh -a dev-cpp/glibmm 13 | ### 14 | ### By default, we disable 'doc', 'examples, and 'gtk-doc' USE flags, 15 | ### because we're just interested in compile-test. We also don't run 16 | ### FEATURES="test", or test multiple USE flag combinations. 17 | ### 18 | ### Uses pkg-testing-tool, https://github.com/slashbeast/pkg-testing-tools 19 | ### 20 | 21 | main() { 22 | local all=0 23 | local atom="" 24 | 25 | while [[ ${#} -gt 0 ]]; do 26 | case ${1} in 27 | -a) 28 | all=1 29 | atom="${2}" 30 | ;; 31 | *) 32 | atom="${1}" 33 | ;; 34 | esac 35 | shift 36 | done 37 | 38 | local pkgname="" 39 | pkgname=$(echo "${atom}" | cut -d "/" -f 2) 40 | 41 | # Do necessary file manipulation. 42 | if [[ -f /tmp/"${pkgname}"-rdeps.txt ]]; then 43 | echo "/tmp/""${pkgname}""-rdeps.txt exists." 44 | echo "Won't overwrite. Please move or remove the file before continuing." 45 | exit 1 46 | fi 47 | 48 | wget https://qa-reports.gentoo.org/output/genrdeps/dindex/"${atom}" -O /tmp/"${pkgname}"-rdeps.txt 49 | 50 | # Remove live ebuilds as they can always be broken and aren't realiable in this test, 51 | # blockers because they mess up the whole tests e.g. by unmerging the atom we're testing with !, 52 | # some big random packages that take a long time to build and 53 | # virtuals because they don't compile anything. 54 | sed -e '/9999/d' \ 55 | -e '/[B]/d' \ 56 | -e '/dev-qt\/qtwebengine/d' -e '/app-office\/libreoffice/d' -e '/www-client\/chromium/d' \ 57 | -e '/virtual\//d' \ 58 | -i /tmp/"${pkgname}"-rdeps.txt 59 | 60 | mapfile -t allrdepsarray < <(cat /tmp/"${pkgname}"-rdeps.txt) 61 | 62 | if [[ ${all} == 0 ]] && [[ ${#allrdepsarray[@]} -ge 6 ]]; then 63 | local randomizedarraylength="${#allrdepsarray[@]}" 64 | mapfile -t randomizearray < <(shuf --input-range=0-"$((randomizedarraylength-1))") 65 | local shuffledarray=() 66 | for (( j=0; j<6; j++ )); do 67 | shuffledarray+=( "${allrdepsarray[${randomizearray[${j}]}]}" ) 68 | done 69 | 70 | for (( k=0; k<6; k++ )); do 71 | local testingpkgname="" 72 | local atomname="" 73 | local uses="" 74 | local exportlist="" 75 | 76 | atomname=$(echo "${shuffledarray[${k}]}" | awk -F ":" '{print $1}') 77 | uses=$(echo "${shuffledarray[${k}]}" | awk -F ":" '{print $2}') 78 | testingpkgname=$(echo "${atomname}" | cut -d "/" -f 2) 79 | 80 | if [[ -n ${uses} ]]; then 81 | exportlist=$(echo "${uses}" | sed 's/+/ /g' | sed 's/!/-/g') 82 | fi 83 | 84 | export USE="${exportlist}" 85 | pkg-testing-tool --append-emerge '--autounmask=y --oneshot' --extra-env-file 'test.conf' \ 86 | --test-feature-scope never --append-required-use '!doc !examples !gtk-doc !test' \ 87 | --max-use-combinations 1 --report /var/tmp/portage/vbslogs/"${testingpkgname}-${k}.json" \ 88 | -p "=${atomname}" 89 | unset USE 90 | done 91 | 92 | else 93 | for (( l=0; l<${#allrdepsarray[@]}; l++)); do 94 | local testingpkgname="" 95 | local atomname="" 96 | local uses="" 97 | local exportlist="" 98 | 99 | atomname=$(echo "${allrdepsarray[${l}]}" | awk -F ":" '{print $1}') 100 | uses=$(echo "${allrdepsarray[${l}]}" | awk -F ":" '{print $2}') 101 | testingpkgname=$(echo "${atomname}" | cut -d "/" -f 2) 102 | 103 | if [[ -n ${uses} ]]; then 104 | exportlist=$(echo "${uses}" | sed 's/+/ /g' | sed 's/!\w\+//g') 105 | fi 106 | 107 | export USE="${exportlist}" 108 | pkg-testing-tool --append-emerge '--autounmask=y --oneshot' --extra-env-file 'test.conf' \ 109 | --test-feature-scope never --append-required-use '!doc !examples !gtk-doc !test' \ 110 | --max-use-combinations 1 --report /var/tmp/portage/vbslogs/"${testingpkgname}-${l}.json" \ 111 | -p "=${atomname}" 112 | unset USE 113 | done 114 | fi 115 | 116 | echo "Error reports for failed atoms:" 117 | grep -r exit_code /var/tmp/portage/vbslogs/ | grep "1," 118 | 119 | # Finally clean the tmp file. 120 | rm /tmp/"${pkgname}"-rdeps.txt 121 | 122 | } 123 | 124 | main "${@}" 125 | -------------------------------------------------------------------------------- /container/etc/portage/bashrc: -------------------------------------------------------------------------------- 1 | source /usr/share/iwdevtools/qa-cmp.bashrc 2 | source /usr/share/iwdevtools/qa-sed.bashrc 3 | source /usr/share/iwdevtools/qa-vdb.bashrc 4 | 5 | post_pkg_preinst() { 6 | qa-cmp_post_pkg_preinst 7 | } 8 | 9 | post_pkg_postinst() { 10 | qa-vdb_post_pkg_postinst 11 | } 12 | -------------------------------------------------------------------------------- /container/etc/portage/env/test.conf: -------------------------------------------------------------------------------- 1 | CFLAGS="-march=native -O2 -pipe -frecord-gcc-switches" 2 | CXXFLAGS="${CFLAGS}" 3 | 4 | FFLAGS="${CFLAGS}" 5 | FCFLAGS="${CFLAGS}" 6 | 7 | LDFLAGS="${LDFLAGS} -Wl,--defsym=__gentoo_check_ldflags__=0" 8 | 9 | EMERGE_DEFAULT_OPTS="--autounmask=y --autounmask-write --autounmask-continue --autounmask-use=y" 10 | FEATURES="-buildpkg collision-protect ipc-sandbox network-sandbox -parallel-install qa-unresolved-soname-deps sandbox split-log split-elog strict userfetch userpriv usersandbox" 11 | ALLOW_TEST="network" 12 | 13 | PORTAGE_ELOG_CLASSES="log warn error qa" 14 | PORTAGE_ELOG_SYSTEM="echo:error,info,log,qa,warn save:*" 15 | PORTAGE_LOGDIR=/var/tmp/portage/vbslogs 16 | 17 | DISTUTILS_STRICT_ENTRY_POINTS=1 18 | 19 | QA_CMP=y 20 | QA_CMP_ARGS="-xS" 21 | 22 | QA_SED=y 23 | QA_VDB=y 24 | -------------------------------------------------------------------------------- /container/etc/portage/make.conf: -------------------------------------------------------------------------------- 1 | ACCEPT_KEYWORDS="~amd64" 2 | 3 | CFLAGS="-march=native -O2 -pipe" 4 | CXXFLAGS="${CFLAGS}" 5 | #LDFLAGS="${LDFLAGS}" 6 | FFLAGS="${CFLAGS}" 7 | FCFLAGS="${CFLAGS}" 8 | 9 | ACCEPT_LICENSE="*" 10 | 11 | GENTOO_MIRRORS="https://distfiles.gentoo.org" 12 | 13 | # NO_COLOR will disable all color output in portage. Great for logs, not so great for general 14 | # usage. 15 | PORTAGE_LOG_FILTER_FILE_CMD="bash -c 'ansifilter --ignore-clear; exec cat'" 16 | 17 | # PORTDIR="/usr/portage" 18 | DISTDIR="/var/cache/distfiles" 19 | # PKGDIR="${PORTDIR}/packages" 20 | PORTAGE_TMPDIR="/var/tmp" 21 | 22 | ABI_X86="64 32" 23 | 24 | PYTHON_SINGLE_TARGET="python3_11" 25 | PYTHON_TARGETS=" 26 | pypy3 27 | python3_10 28 | python3_11 29 | python3_12 30 | " 31 | 32 | QA_CMP=n 33 | QA_SED=n 34 | QA_VDB=n 35 | 36 | # Do you personal edits here; MAKEOPTS, USE flags, 37 | # LLVM_TARGETS, CPU_FLAGS_X86... 38 | # Any settings done in make.conf.custom will override make.conf. 39 | source /etc/portage/make.conf.custom 40 | -------------------------------------------------------------------------------- /container/etc/portage/make.conf.custom.example: -------------------------------------------------------------------------------- 1 | # Rename as /etc/portage/make.conf.custom which gets sourced. 2 | # Edit to your needs. 3 | # Settings here will override make.conf. 4 | 5 | EMERGE_DEFAULT_OPTS="--autounmask=y --autounmask-continue --autounmask-use=y --autounmask-write --binpkg-changed-deps=y --buildpkg-exclude virtual/* --buildpkg-exclude acct-* --buildpkg-exclude sys-kernel/* --complete-graph --nospinner --jobs=8 --usepkg" 6 | MAKEOPTS="-j16" 7 | FEATURES="binpkg-multi-instance buildpkg parallel-fetch parallel-install" 8 | 9 | # note that lz4 compression requires app-arch/lz4 to be installed. 10 | # BINPKG_COMPRESS="lz4" 11 | 12 | PORTAGE_SCHEDULING_POLICY="idle" 13 | 14 | CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sha sse sse2 15 | sse3 sse4_1 sse4_2 sse4a ssse3" 16 | 17 | INPUT_DEVICES="libinput" 18 | VIDEO_CARDS="amdgpu radeonsi" 19 | 20 | LLVM_TARGETS="AMDGPU BPF" 21 | 22 | L10N=" 23 | en 24 | en_US 25 | en-US 26 | fi 27 | sv 28 | " 29 | LINGUAS="${L10N}" 30 | 31 | USE="-consolekit dbus -doc elogind -examples -firmware -nls openrc -profile -systemd udev" 32 | -------------------------------------------------------------------------------- /container/etc/portage/package.accept_keywords/default: -------------------------------------------------------------------------------- 1 | # Optional, ~ ruby often breaks for me, breaking automation. 2 | 3 | dev-lang/ruby -~amd64 4 | -------------------------------------------------------------------------------- /container/etc/portage/package.mask/default: -------------------------------------------------------------------------------- 1 | # Optional. This will prefer rust-bin over rust, but if you use binpkg's, this 2 | # doesn't really make a difference. 3 | dev-lang/rust 4 | -------------------------------------------------------------------------------- /container/etc/portage/package.use/default: -------------------------------------------------------------------------------- 1 | # Optional examples of what you can do, try to avoid filling this file too 2 | # much, and only control what you have installed, or to get past popular 3 | # REQUIRED_USE constraints. 4 | app-editors/vim -X -gpm -python 5 | app-portage/pfl -network-cron 6 | dev-cpp/gtkmm X 7 | dev-lang/mono minimal 8 | dev-lang/perl ithreads 9 | dev-lang/python sqlite ssl xml 10 | dev-python/pypy3 sqlite 11 | dev-util/pkgcheck network 12 | dev-vcs/git -perl -python -webdav 13 | media-libs/libcanberra alsa udev 14 | net-libs/webkit-gtk X 15 | net-misc/asterisk -blocks 16 | sci-libs/pcl usb 17 | sys-apps/portage -gentoo-dev -rsync-verify 18 | sys-kernel/gentoo-kernel-bin -initramfs 19 | -------------------------------------------------------------------------------- /container/etc/portage/repos.conf/gentoo.conf: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | main-repo = gentoo 3 | 4 | [gentoo] 5 | location = /var/db/repos/gentoo 6 | sync-type = git 7 | #sync-uri = https://anongit.gentoo.org/git/repo/sync/gentoo.git 8 | sync-uri = https://github.com/gentoo-mirror/gentoo 9 | auto-sync = true 10 | sync-depth = 1 11 | -------------------------------------------------------------------------------- /host/bin/container_maintain_my-test-container.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Update the container. Sleeps are added just in case bringing network up is slow. 4 | # Adjust to your needs. 5 | lxc start my-test-container 6 | lxc exec my-test-container -- su -lc "(sleep 10 && cd ~/lxd-bin && git pull)" 7 | lxc exec my-test-container -- su -lc "emerge --sync" 8 | lxc exec my-test-container -- su -lc "(emerge -uvDN --binpkg-changed-deps=y --keep-going @world && emerge --depclean --with-bdeps=n)" 9 | lxc exec my-test-container -- su -lc "eclean-kernel -n 1" 10 | lxc exec my-test-container -- su -lc "(eselect news read && etc-update)" 11 | lxc exec my-test-container -- su -lc "pfl" 12 | lxc exec my-test-container -- su -lc "eclean packages --changed-deps" 13 | lxc stop my-test-container 14 | 15 | # Delete all old snapshots. Note that this will NOT delete active containers! 16 | lxc list | awk '{print $2}' | grep my-test-container-snap | xargs -I SNAP lxc delete SNAP 17 | 18 | # For problems with inittab, use 19 | #lxc exec my-test-container -- poweroff 20 | 21 | echo "All done." 22 | echo 23 | -------------------------------------------------------------------------------- /host/bin/container_start_my-test-container.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Start the container and launch root bash in it 4 | lxc start my-test-container 5 | lxc exec my-test-container bash 6 | lxc stop my-test-container 7 | #lxc exec my-test-container -- poweroff 8 | -------------------------------------------------------------------------------- /host/bin/container_start_tmptestmycontainer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Just a skeleton file to launch a "basic test environment". This will be 4 | # deleted normally by container_maintain_my-test-container.sh, unless this 5 | # container is powered on with lxc start. 6 | 7 | echo "Initializing new test environment... this will take a while." 8 | lxc copy my-test-container my-test-container-snap-tmp 9 | 10 | lxc start my-test-container-snap-tmp 11 | lxc exec my-test-container-snap-tmp bash 12 | 13 | echo "Uploading pfl data..." 14 | 15 | lxc exec my-test-container-snap-tmp -- su -lc "(sleep 10 && pfl &>/dev/null)" 16 | lxc stop my-test-container-snap-tmp 17 | -------------------------------------------------------------------------------- /host/bin/lxd-get-container-cpu-usage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ### Original script: 4 | ### https://discuss.linuxcontainers.org/t/script-to-get-cpu-usage-in-percentage/18428 5 | 6 | getCpuTime() { 7 | cpuStatPath="/sys/fs/cgroup/lxc.payload.${1}/cpu.stat" 8 | 9 | if [[ -f $cpuStatPath ]] ; then 10 | head -n1 /sys/fs/cgroup/lxc.payload."${1}"/cpu.stat | awk '{print $2}' 11 | else 12 | cat /sys/fs/cgroup/cpuacct/lxc.payload."${1}"/cpuacct.usage 13 | fi 14 | } 15 | 16 | getTimeConvert() { 17 | cpuStatPath="/sys/fs/cgroup/lxc.payload.${1}/cpu.stat" 18 | 19 | if [[ -f $cpuStatPath ]] ; then 20 | echo "1000000" 21 | else 22 | echo "1000000000" 23 | fi 24 | } 25 | 26 | getCpuCores() { 27 | nproc 28 | } 29 | 30 | getPercentage() { 31 | container="${1}" 32 | cpuCoresLxd=$(getCpuCores "${container}") 33 | cpu_usage=$(getCpuTime "${container}") 34 | sleep 1 35 | 36 | cpu_usage_after=$(getCpuTime "${container}") 37 | total_cpu_time=$((cpu_usage_after - cpu_usage)) 38 | timeConvert=$(getTimeConvert "${container}") 39 | cpu_percentage=$(echo "scale=2; (${total_cpu_time} / ${timeConvert}) / ${cpuCoresLxd} * 100" | bc ) 40 | 41 | echo "${container} - ${cpu_percentage} %" 42 | } 43 | 44 | mapfile -t containers < <(lxc list --format=json | jq -r '.[] | select(.state.status == "Running") | .name') 45 | 46 | for c in "${containers[@]}" ; do 47 | getPercentage "${c}" 48 | done 49 | 50 | wait 51 | -------------------------------------------------------------------------------- /host/bin/test-pr.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Test a https://github.com/gentoo/gentoo pull request, for example: 4 | # Input: test-pr.sh 12345 5 | # Would test https://github.com/gentoo/gentoo/pull/12345 6 | # 7 | # Input options: 8 | # -1: runs a single build test. Useful for testing minor fixes. 9 | # test-pr.sh -1 12345 10 | # 11 | # -i: interactive. Spawn a shell before launching tests, if need to modify 12 | # the ebuild somehow for example. Will merge the patch, call 13 | # "prtester.sh" manually afterwards. 14 | # test-pr.sh -i 12345 15 | # 16 | # (null): runs the default test suite. 17 | # test-pr.sh 12345 18 | # 19 | 20 | if [[ -z ${1} ]]; then 21 | echo "Please insert a GitHub PR number!" 22 | echo "https://github.com/gentoo/gentoo/pull/" 23 | exit 24 | fi 25 | 26 | main() { 27 | local run="" 28 | local prId="" 29 | 30 | while [[ ${#} -gt 0 ]]; do 31 | case ${1} in 32 | -1) 33 | run="1" 34 | prId="${2}" 35 | ;; 36 | -i) 37 | run="i" 38 | prId="${2}" 39 | ;; 40 | *) 41 | prId="${1}" 42 | ;; 43 | esac 44 | shift 45 | done 46 | 47 | echo "Initializing new test environment... this will take a while." 48 | lxc copy my-test-container my-test-container-snap-"${prId}" 49 | lxc start my-test-container-snap-"${prId}" 50 | lxc exec my-test-container-snap-"${prId}" -- su -lc "(sleep 10 && cd /var/db/repos/gentoo && curl -s -L https://patch-diff.githubusercontent.com/raw/gentoo/gentoo/pull/${prId}.patch | git -c user.email=my@email -c user.name=MyName am --keep-cr -3)" 51 | 52 | if [[ -z "${run}" ]]; then 53 | echo "INFO: Doing the default test runs." 54 | lxc exec my-test-container-snap-"${prId}" -- su -lc "(sleep 10 && ~/lxd-bin/container/bin/prtester.sh)" 55 | lxc exec my-test-container-snap-"${prId}" -- su -lc "(~/lxd-bin/container/bin/errors_and_qa_notices.sh)" 56 | lxc exec my-test-container-snap-"${prId}" bash 57 | 58 | elif [[ "${run}" == 1 ]]; then 59 | echo "INFO: -1 invoked - doing a single test-run." 60 | lxc exec my-test-container-snap-"${prId}" -- su -lc "(sleep 10 && sed -i -e 's/--max-use-combinations 6/--max-use-combinations 1/g' /root/lxd-bin/container/bin/prtester.sh)" 61 | lxc exec my-test-container-snap-"${prId}" -- su -lc "(sleep 10 && ~/lxd-bin/container/bin/prtester.sh)" 62 | lxc exec my-test-container-snap-"${prId}" -- su -lc "(~/lxd-bin/container/bin/errors_and_qa_notices.sh)" 63 | lxc exec my-test-container-snap-"${prId}" bash 64 | 65 | elif [[ "${run}" == "i" ]]; then 66 | echo "INFO: -i invoked - entering interactive mode." 67 | lxc exec my-test-container-snap-"${prId}" bash 68 | 69 | else 70 | echo "ERROR: Not sure what to do here. Insert proper inputs. Check help." 71 | exit 72 | 73 | fi 74 | 75 | lxc exec my-test-container-snap-"${prId}" -- su -lc "(sleep 10 && pfl &>/dev/null)" 76 | lxc stop my-test-container-snap-"${prId}" 77 | } 78 | 79 | main "${@}" 80 | -------------------------------------------------------------------------------- /pkg-testing-tool-patches/arch/0.1.0/pkg-testing-tools-0.1.0-generic-at-flags-enable-autounmask-disable-systemd.patch: -------------------------------------------------------------------------------- 1 | diff -Naur a/src/pkg_testing_tool/main.py b/src/pkg_testing_tool/main.py 2 | --- a/src/pkg_testing_tool/main.py 2021-07-11 21:31:18.000000000 +0300 3 | +++ b/src/pkg_testing_tool/main.py 2021-09-06 14:55:23.313431848 +0300 4 | @@ -142,7 +142,7 @@ 5 | emerge_cmdline = [ 6 | 'emerge', 7 | '--verbose', 'y', 8 | - '--autounmask', 'n', 9 | + '--oneshot', 10 | '--usepkg-exclude', job['cp'], 11 | '--deep', '--backtrack', '300', 12 | ] 13 | diff -Naur a/src/pkg_testing_tool/use.py b/src/pkg_testing_tool/use.py 14 | --- a/src/pkg_testing_tool/use.py 2021-07-11 21:31:18.000000000 +0300 15 | +++ b/src/pkg_testing_tool/use.py 2021-09-06 14:56:50.866543018 +0300 16 | @@ -40,9 +40,14 @@ 17 | ignore_flags = set([ 18 | 'debug', 19 | 'doc', 20 | + 'examples', 21 | + 'gtk-doc', 22 | + 'man', 23 | + 'profile', 24 | 'test', 25 | 'selinux', 26 | 'split-usr', 27 | + 'systemd', 28 | 'pic' 29 | ]) 30 | 31 | -------------------------------------------------------------------------------- /pkg-testing-tool-patches/arch/0.1.0/pkg-testing-tools-0.1.0-generic-at-flags-enable-autounmask.patch: -------------------------------------------------------------------------------- 1 | diff -Naur a/src/pkg_testing_tool/main.py b/src/pkg_testing_tool/main.py 2 | --- a/src/pkg_testing_tool/main.py 2021-07-11 21:31:18.000000000 +0300 3 | +++ b/src/pkg_testing_tool/main.py 2021-09-06 14:55:23.313431848 +0300 4 | @@ -142,7 +142,7 @@ 5 | emerge_cmdline = [ 6 | 'emerge', 7 | '--verbose', 'y', 8 | - '--autounmask', 'n', 9 | + '--oneshot', 10 | '--usepkg-exclude', job['cp'], 11 | '--deep', '--backtrack', '300', 12 | ] 13 | diff -Naur a/src/pkg_testing_tool/use.py b/src/pkg_testing_tool/use.py 14 | --- a/src/pkg_testing_tool/use.py 2021-07-11 21:31:18.000000000 +0300 15 | +++ b/src/pkg_testing_tool/use.py 2021-09-06 14:59:09.896192505 +0300 16 | @@ -40,6 +40,10 @@ 17 | ignore_flags = set([ 18 | 'debug', 19 | 'doc', 20 | + 'examples', 21 | + 'gtk-doc', 22 | + 'man', 23 | + 'profile', 24 | 'test', 25 | 'selinux', 26 | 'split-usr', 27 | -------------------------------------------------------------------------------- /pkg-testing-tool-patches/arch/0.1.0/pkg-testing-tools-0.1.0-generic-at-flags.patch: -------------------------------------------------------------------------------- 1 | diff -Naur a/src/pkg_testing_tool/use.py c/src/pkg_testing_tool/use.py 2 | --- a/src/pkg_testing_tool/use.py 2021-07-11 21:31:18.000000000 +0300 3 | +++ c/src/pkg_testing_tool/use.py 2021-09-06 15:00:31.982653668 +0300 4 | @@ -40,6 +40,10 @@ 5 | ignore_flags = set([ 6 | 'debug', 7 | 'doc', 8 | + 'examples', 9 | + 'gtk-doc', 10 | + 'man', 11 | + 'profile', 12 | 'test', 13 | 'selinux', 14 | 'split-usr', 15 | -------------------------------------------------------------------------------- /pkg-testing-tool-patches/arch/0.1.2/pkg-testing-tools-0.1.2-generic-at-flags.patch: -------------------------------------------------------------------------------- 1 | diff -Naur a/src/pkg_testing_tool/use.py b/src/pkg_testing_tool/use.py 2 | --- a/src/pkg_testing_tool/use.py 2023-03-02 19:45:48.000000000 +0200 3 | +++ b/src/pkg_testing_tool/use.py 2023-03-09 08:54:20.500291282 +0200 4 | @@ -31,6 +31,7 @@ 5 | 'l10n_', 6 | 'kernel_', 7 | 'abi_', 8 | + 'python_single_target_', 9 | 'python_target_', 10 | 'python_targets_', 11 | 'ruby_targets_', 12 | @@ -40,9 +41,14 @@ 13 | ignore_flags = set([ 14 | 'debug', 15 | 'doc', 16 | + 'examples', 17 | + 'gtk-doc', 18 | + 'man', 19 | + 'profile', 20 | 'test', 21 | 'selinux', 22 | 'split-usr', 23 | + 'systemd', 24 | 'pic' 25 | ]) 26 | 27 | -------------------------------------------------------------------------------- /pkg-testing-tool-patches/arch/0.2.0/pkg-testing-tool-0.2.0-toggle-more-at-flags.patch: -------------------------------------------------------------------------------- 1 | diff -Naur a/pkg_testing_tools/use.py b/pkg_testing_tools/use.py 2 | --- a/pkg_testing_tools/use.py 2023-11-28 23:16:57.000000000 +0200 3 | +++ b/pkg_testing_tools/use.py 2023-12-05 19:34:06.344777137 +0200 4 | @@ -31,6 +31,7 @@ 5 | 'l10n_', 6 | 'kernel_', 7 | 'abi_', 8 | + 'python_single_target_', 9 | 'python_target_', 10 | 'python_targets_', 11 | 'ruby_targets_', 12 | @@ -40,6 +41,10 @@ 13 | ignore_flags = set([ 14 | 'debug', 15 | 'doc', 16 | + 'examples', 17 | + 'gtk-doc', 18 | + 'man', 19 | + 'profile', 20 | 'test', 21 | 'selinux', 22 | 'split-usr', 23 | -------------------------------------------------------------------------------- /pkg-testing-tool-patches/mtc/0.1.0/disable-systemd-enable-flags.patch: -------------------------------------------------------------------------------- 1 | diff -Naur a/src/pkg_testing_tool/main.py b/src/pkg_testing_tool/main.py 2 | --- a/src/pkg_testing_tool/main.py 2021-07-11 21:31:18.000000000 +0300 3 | +++ b/src/pkg_testing_tool/main.py 2021-07-12 16:22:32.567105904 +0300 4 | @@ -142,7 +142,7 @@ 5 | emerge_cmdline = [ 6 | 'emerge', 7 | '--verbose', 'y', 8 | - '--autounmask', 'n', 9 | + '--oneshot', 10 | '--usepkg-exclude', job['cp'], 11 | '--deep', '--backtrack', '300', 12 | ] 13 | diff -Naur a/src/pkg_testing_tool/use.py b/src/pkg_testing_tool/use.py 14 | --- a/src/pkg_testing_tool/use.py 2021-07-11 21:31:18.000000000 +0300 15 | +++ b/src/pkg_testing_tool/use.py 2021-07-12 16:23:41.160041342 +0300 16 | @@ -39,10 +39,11 @@ 17 | 18 | ignore_flags = set([ 19 | 'debug', 20 | - 'doc', 21 | + 'profile', 22 | 'test', 23 | 'selinux', 24 | 'split-usr', 25 | + 'systemd', 26 | 'pic' 27 | ]) 28 | 29 | -------------------------------------------------------------------------------- /pkg-testing-tool-patches/mtc/0.1.2/pkg-testing-tools-0.1.2-toggle-more-flags-generic.patch: -------------------------------------------------------------------------------- 1 | diff -Naur a/src/pkg_testing_tool/use.py b/src/pkg_testing_tool/use.py 2 | --- a/src/pkg_testing_tool/use.py 2023-03-02 19:45:48.000000000 +0200 3 | +++ b/src/pkg_testing_tool/use.py 2023-03-07 09:09:10.947763818 +0200 4 | @@ -31,6 +31,7 @@ 5 | 'l10n_', 6 | 'kernel_', 7 | 'abi_', 8 | + 'python_single_target_', 9 | 'python_target_', 10 | 'python_targets_', 11 | 'ruby_targets_', 12 | @@ -39,7 +40,7 @@ 13 | 14 | ignore_flags = set([ 15 | 'debug', 16 | - 'doc', 17 | + 'profile', 18 | 'test', 19 | 'selinux', 20 | 'split-usr', 21 | -------------------------------------------------------------------------------- /pkg-testing-tool-patches/mtc/0.1.2/pkg-testing-tools-0.1.2-toggle-more-flags-non-systemd.patch: -------------------------------------------------------------------------------- 1 | diff -Naur a/src/pkg_testing_tool/use.py b/src/pkg_testing_tool/use.py 2 | --- a/src/pkg_testing_tool/use.py 2023-03-02 19:45:48.000000000 +0200 3 | +++ b/src/pkg_testing_tool/use.py 2023-03-07 09:09:54.066517071 +0200 4 | @@ -31,6 +31,7 @@ 5 | 'l10n_', 6 | 'kernel_', 7 | 'abi_', 8 | + 'python_single_target_', 9 | 'python_target_', 10 | 'python_targets_', 11 | 'ruby_targets_', 12 | @@ -39,10 +40,11 @@ 13 | 14 | ignore_flags = set([ 15 | 'debug', 16 | - 'doc', 17 | + 'profile', 18 | 'test', 19 | 'selinux', 20 | 'split-usr', 21 | + 'systemd', 22 | 'pic' 23 | ]) 24 | 25 | -------------------------------------------------------------------------------- /pkg-testing-tool-patches/mtc/0.2.0/pkg-testing-tool-0.2.0-toggle-more-flags.patch: -------------------------------------------------------------------------------- 1 | diff -Naur a/pkg_testing_tools/use.py b/pkg_testing_tools/use.py 2 | --- a/pkg_testing_tools/use.py 2023-11-28 23:16:57.000000000 +0200 3 | +++ b/pkg_testing_tools/use.py 2023-12-05 19:32:48.273830181 +0200 4 | @@ -31,6 +31,7 @@ 5 | 'l10n_', 6 | 'kernel_', 7 | 'abi_', 8 | + 'python_single_target_', 9 | 'python_target_', 10 | 'python_targets_', 11 | 'ruby_targets_', 12 | @@ -39,7 +40,7 @@ 13 | 14 | ignore_flags = set([ 15 | 'debug', 16 | - 'doc', 17 | + 'profile', 18 | 'test', 19 | 'selinux', 20 | 'split-usr', 21 | -------------------------------------------------------------------------------- /pkg-testing-tool-patches/pkg-testing-tools-0.1.0-trigger-default-use-flags-for-a-single-run-v2.patch: -------------------------------------------------------------------------------- 1 | diff -Naur a/src/pkg_testing_tool/main.py b/src/pkg_testing_tool/main.py 2 | --- a/src/pkg_testing_tool/main.py 2021-07-11 21:31:18.000000000 +0300 3 | +++ b/src/pkg_testing_tool/main.py 2022-11-24 20:14:36.486246175 +0200 4 | @@ -237,7 +237,7 @@ 5 | if args.append_required_use: 6 | package_metadata['ruse'].append(args.append_required_use) 7 | 8 | - if package_metadata['iuse']: 9 | + if package_metadata['iuse'] and args.max_use_combinations > 1: 10 | use_combinations = get_use_combinations(package_metadata['iuse'], package_metadata['ruse'], args.max_use_combinations) 11 | else: 12 | use_combinations = None 13 | --------------------------------------------------------------------------------