diff --git a/sdk_container/src/third_party/portage-stable/.gitignore b/sdk_container/src/third_party/portage-stable/.gitignore new file mode 100644 index 0000000000..70cffbf46e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/.gitignore @@ -0,0 +1 @@ +metadata/md5-cache diff --git a/sdk_container/src/third_party/portage-stable/CHANGELOG.md b/sdk_container/src/third_party/portage-stable/CHANGELOG.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sdk_container/src/third_party/portage-stable/MAINTAINERS.md b/sdk_container/src/third_party/portage-stable/MAINTAINERS.md new file mode 100644 index 0000000000..170f832519 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/MAINTAINERS.md @@ -0,0 +1,8 @@ +# Maintainers + +* Krzesimir Nowak @krnowak +* Thilo Fromm @t-lo + +See [Governance](https://github.com/flatcar/Flatcar/blob/main/governance.md) for governance, commit, and vote guidelines as well as maintainer responsibilities. Everybody listed in this file is a committer as per governance definition. + +The contents of this file are synchronized from [Flatcar/MAINTAINERS.md](https://github.com/flatcar/Flatcar/blob/main/MAINTAINERS.md). diff --git a/sdk_container/src/third_party/portage-stable/README.md b/sdk_container/src/third_party/portage-stable/README.md new file mode 100644 index 0000000000..70d6f21243 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/README.md @@ -0,0 +1,93 @@ +# Overview + +This overlay contains curated unmodified Gentoo packages that are part +of the Container Linux build and are exact copies of upstream Gentoo packages. + +# Updating packages + +Use `src/scripts/update_ebuilds` to fetch the latest copy from Gentoo: + + cd ~/trunk/src/scripts + repo start update-foo ../third-party/portage-stable + ./update_ebuilds --commit app-fun/foo + +Note: `update_ebuilds` can fetch from either Gentoo's Github mirror or +Rsync services. +If you'd prefer to use a local copy of the portage tree, you can point +`update_ebuilds` at a local filepath: + + rsync -rtlv rsync://rsync.gentoo.org/gentoo-portage ~/gentoo-portage + ./update_ebuilds --commit --portage ~/gentoo-portage app-fun/foo + +Licensing information can be found in the respective files, so consult +them directly. Most ebuilds are licensed under the GPL version 2. + +Upstream Gentoo sources: http://sources.gentoo.org/gentoo-x86/ + +# Removing packages + +Be careful when removing packages. The following section offers tips for preventing +breakage, but they are by no means exhaustive. Be especially careful with packages that +might affect `sys-devel/binutils`, `sys-devel/gcc`, `sys-kernel/linux-headers`, and +`sys-libs/glibc` (see `TOOLCHAIN_PKGS` in `scripts/build_library/toolchain_util.sh`). + +## git log + +`git log /` will show commits that touched that directory. These can give +clues about why a package was included in the first place and where to look to ensure it really +is unused. + +## equery d + +`equery d -a ` will tell you what packages depend on `package-name`. It will +also generate a lot of false positives, since it considers all dependencies for all use flags, +even ones we do not use, such as `test`. + +## emerge --emptytree + +`emerge --pretend --verbose --emptytree ` _should_ give a list of all the dependencies +for a given package. Use this to test if `board-packages`, `sdk-depends`, and `@system` can still be +emerged after removing an ebuild and package. +Remember to use the `emerge--usr` commands to check `board-packages` and `emerge` to check +`sdk-depends`. Use both when checking `@system`. + +Furthermore, the SDK bootstrapping process uses a list of packages defined the by SDK profile's packages.build +file. Install `dev-util/catalyst` and run `/usr/lib64/catalyst/targets/stage1/build.py` to get a list of packages +needed for the boostrapping process, then run `emerge --emptytree` on that list. + +A package's ebuild must be removed from `portage-stable` _and_ the package must be removed locally. If only the +ebuild is removed, the package will be silently elided in the `emerge --emptytree` dependency list. +To see if there are any packages installed without ebuilds run `eix -tTc`. There are no `eix--usr` wrappers, so double +check the packages are also unmerged via the `emerge--usr` commands. Make sure to run +`eix-update` before running other `eix` commands. + +`emerge --emptytree` also has unintuitive behavior when handling virtual packages. +When making changes affecting virtual packages (removing a provider, changing use flags that affect +a provider or virtual, etc), `emerge --emptytree` will always prefer an already installed +provider (unless it is masked or otherwise disabled), so unmerge the current provider before +running `emerge --emptytree` to ensure the virtuals are resolved correctly. Look at the virtual package's +ebuild to see what providers it has and use `emerge --search` to see what is the currently installed provider. +See [this bug](https://bugs.gentoo.org/127956). + +## grep, git grep, repo grep, ripgrep, find, etc + +Use your favorite grep variant to see if the package is used anywhere. Good places to double check are +coreos-overlay, manifest, scripts, and portage-stable, as well as anything specific to the package. + +Be sure to check `coreos-overlay` to ensure there are no use flags, accept_keywords, or other leftover bits +relating to the package being removed. + +## Updating the metadata cache + +If you remove a package, make sure to delete the corresponding files in +metadata/md5cache, or run use egencache to do it for you: +``` + egencache --update --repo portage-stable +``` +There is also `scripts/update_metadata` which will update both `portage-stable` and `coreos-overlay` +and optionally generate a commit message. + +## Testing changes + +If you have Jenkins running with [this configuration](https://github.com/coreos/jenkins-os), you can make pull requests with your changes and +test them according to the instructions in the [jenkins-os README](https://github.com/coreos/jenkins-os#usage-examples) diff --git a/sdk_container/src/third_party/portage-stable/acct-group/adm/adm-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/adm/adm-0-r1.ebuild new file mode 100644 index 0000000000..7aecab7fd0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/adm/adm-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=4 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/adm/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/adm/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/adm/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/audio/audio-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/audio/audio-0-r1.ebuild new file mode 100644 index 0000000000..ee027720bf --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/audio/audio-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=18 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/audio/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/audio/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/audio/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/cdrom/cdrom-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/cdrom/cdrom-0-r1.ebuild new file mode 100644 index 0000000000..8d402a923a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/cdrom/cdrom-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=19 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/cdrom/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/cdrom/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/cdrom/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/dialout/dialout-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/dialout/dialout-0-r1.ebuild new file mode 100644 index 0000000000..3c1316aa58 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/dialout/dialout-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=20 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/dialout/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/dialout/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/dialout/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/disk/disk-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/disk/disk-0-r1.ebuild new file mode 100644 index 0000000000..a5568d65c0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/disk/disk-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=6 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/disk/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/disk/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/disk/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/dnsmasq/dnsmasq-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/dnsmasq/dnsmasq-0-r1.ebuild new file mode 100644 index 0000000000..d765927def --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/dnsmasq/dnsmasq-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=275 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/dnsmasq/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/dnsmasq/metadata.xml new file mode 100644 index 0000000000..bd6443d4a3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/dnsmasq/metadata.xml @@ -0,0 +1,8 @@ + + + + + chutzpah@gentoo.org + Patrick McLean + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/input/input-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/input/input-0-r1.ebuild new file mode 100644 index 0000000000..9ef06e8444 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/input/input-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=97 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/input/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/input/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/input/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/kmem/kmem-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/kmem/kmem-0-r1.ebuild new file mode 100644 index 0000000000..b07239c3b2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/kmem/kmem-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=9 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/kmem/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/kmem/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/kmem/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/kvm/kvm-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/kvm/kvm-0-r1.ebuild new file mode 100644 index 0000000000..eadc9b037d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/kvm/kvm-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=78 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/kvm/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/kvm/metadata.xml new file mode 100644 index 0000000000..c12cdf945f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/kvm/metadata.xml @@ -0,0 +1,10 @@ + + + + + virtualization@gentoo.org + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/lp/lp-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/lp/lp-0-r1.ebuild new file mode 100644 index 0000000000..9af7c058ba --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/lp/lp-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=7 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/lp/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/lp/metadata.xml new file mode 100644 index 0000000000..ba8bc47cd6 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/lp/metadata.xml @@ -0,0 +1,10 @@ + + + + + systemd@gentoo.org + + + printing@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/man/man-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/man/man-0-r1.ebuild new file mode 100644 index 0000000000..77c58e22ae --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/man/man-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=15 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/man/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/man/metadata.xml new file mode 100644 index 0000000000..65e1fc82d8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/man/metadata.xml @@ -0,0 +1,7 @@ + + + + + base-system@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/messagebus/messagebus-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/messagebus/messagebus-0-r1.ebuild new file mode 100644 index 0000000000..3e335b8068 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/messagebus/messagebus-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=101 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/messagebus/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/messagebus/metadata.xml new file mode 100644 index 0000000000..d4390c2eb5 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/messagebus/metadata.xml @@ -0,0 +1,7 @@ + + + + + freedesktop-bugs@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/netperf/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/netperf/metadata.xml new file mode 100644 index 0000000000..d5af4bcfaf --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/netperf/metadata.xml @@ -0,0 +1,8 @@ + + + + + netmon@gentoo.org + Gentoo network monitoring and analysis project + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/netperf/netperf-0.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/netperf/netperf-0.ebuild new file mode 100644 index 0000000000..f4a3499b16 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/netperf/netperf-0.ebuild @@ -0,0 +1,10 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +DESCRIPTION="A group for net-analyzer/netperf" + +ACCT_GROUP_ID="168" diff --git a/sdk_container/src/third_party/portage-stable/acct-group/nobody/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/nobody/metadata.xml new file mode 100644 index 0000000000..65e1fc82d8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/nobody/metadata.xml @@ -0,0 +1,7 @@ + + + + + base-system@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/nobody/nobody-0.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/nobody/nobody-0.ebuild new file mode 100644 index 0000000000..29b11e8db9 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/nobody/nobody-0.ebuild @@ -0,0 +1,9 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=65534 +ACCT_GROUP_ENFORCE_ID=yes diff --git a/sdk_container/src/third_party/portage-stable/acct-group/ntp/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/ntp/metadata.xml new file mode 100644 index 0000000000..bc93e527e2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/ntp/metadata.xml @@ -0,0 +1,8 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/ntp/ntp-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/ntp/ntp-0-r1.ebuild new file mode 100644 index 0000000000..d8f17217cd --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/ntp/ntp-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=123 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/pcap/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/pcap/metadata.xml new file mode 100644 index 0000000000..641cbd3703 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/pcap/metadata.xml @@ -0,0 +1,8 @@ + + + + + sam@gentoo.org + Sam James + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/pcap/pcap-0.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/pcap/pcap-0.ebuild new file mode 100644 index 0000000000..7c6ece3961 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/pcap/pcap-0.ebuild @@ -0,0 +1,9 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit acct-group + +DESCRIPTION="Group for capturing network traffic" +ACCT_GROUP_ID=377 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/polkitd/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/polkitd/metadata.xml new file mode 100644 index 0000000000..d4390c2eb5 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/polkitd/metadata.xml @@ -0,0 +1,7 @@ + + + + + freedesktop-bugs@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/polkitd/polkitd-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/polkitd/polkitd-0-r1.ebuild new file mode 100644 index 0000000000..7e7baeaeb4 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/polkitd/polkitd-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=102 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/portage/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/portage/metadata.xml new file mode 100644 index 0000000000..66da907ee8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/portage/metadata.xml @@ -0,0 +1,7 @@ + + + + + dev-portage@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/portage/portage-0.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/portage/portage-0.ebuild new file mode 100644 index 0000000000..802a74d187 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/portage/portage-0.ebuild @@ -0,0 +1,8 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=250 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/render/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/render/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/render/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/render/render-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/render/render-0-r1.ebuild new file mode 100644 index 0000000000..6e31b13263 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/render/render-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=28 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/root/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/root/metadata.xml new file mode 100644 index 0000000000..65e1fc82d8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/root/metadata.xml @@ -0,0 +1,7 @@ + + + + + base-system@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/root/root-0.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/root/root-0.ebuild new file mode 100644 index 0000000000..4c5ed4b346 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/root/root-0.ebuild @@ -0,0 +1,9 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=0 +ACCT_GROUP_ENFORCE_ID=yes diff --git a/sdk_container/src/third_party/portage-stable/acct-group/sgx/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/sgx/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/sgx/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/sgx/sgx-0.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/sgx/sgx-0.ebuild new file mode 100644 index 0000000000..6a9d9ac0c9 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/sgx/sgx-0.ebuild @@ -0,0 +1,10 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +DESCRIPTION="System group: used for SGX enclaves" + +ACCT_GROUP_ID=405 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/sshd/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/sshd/metadata.xml new file mode 100644 index 0000000000..bc93e527e2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/sshd/metadata.xml @@ -0,0 +1,8 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/sshd/sshd-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/sshd/sshd-0-r1.ebuild new file mode 100644 index 0000000000..d54032fc8a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/sshd/sshd-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=22 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/systemd-coredump/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/systemd-coredump/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/systemd-coredump/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/systemd-coredump/systemd-coredump-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/systemd-coredump/systemd-coredump-0-r1.ebuild new file mode 100644 index 0000000000..1189996095 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/systemd-coredump/systemd-coredump-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=194 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/systemd-journal-remote/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/systemd-journal-remote/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/systemd-journal-remote/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/systemd-journal-remote/systemd-journal-remote-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/systemd-journal-remote/systemd-journal-remote-0-r1.ebuild new file mode 100644 index 0000000000..8ddee6ec32 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/systemd-journal-remote/systemd-journal-remote-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=191 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/systemd-journal/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/systemd-journal/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/systemd-journal/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/systemd-journal/systemd-journal-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/systemd-journal/systemd-journal-0-r1.ebuild new file mode 100644 index 0000000000..c439156e2f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/systemd-journal/systemd-journal-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=190 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/systemd-network/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/systemd-network/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/systemd-network/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/systemd-network/systemd-network-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/systemd-network/systemd-network-0-r1.ebuild new file mode 100644 index 0000000000..6f88d3ca98 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/systemd-network/systemd-network-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=192 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/systemd-oom/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/systemd-oom/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/systemd-oom/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/systemd-oom/systemd-oom-0.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/systemd-oom/systemd-oom-0.ebuild new file mode 100644 index 0000000000..175d26d66e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/systemd-oom/systemd-oom-0.ebuild @@ -0,0 +1,8 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=198 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/systemd-resolve/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/systemd-resolve/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/systemd-resolve/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/systemd-resolve/systemd-resolve-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/systemd-resolve/systemd-resolve-0-r1.ebuild new file mode 100644 index 0000000000..903603df62 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/systemd-resolve/systemd-resolve-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=193 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/systemd-timesync/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/systemd-timesync/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/systemd-timesync/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/systemd-timesync/systemd-timesync-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/systemd-timesync/systemd-timesync-0-r1.ebuild new file mode 100644 index 0000000000..50abd93715 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/systemd-timesync/systemd-timesync-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=195 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/tape/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/tape/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/tape/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/tape/tape-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/tape/tape-0-r1.ebuild new file mode 100644 index 0000000000..e7aa561286 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/tape/tape-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=26 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/tss/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/tss/metadata.xml new file mode 100644 index 0000000000..fdd29c016a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/tss/metadata.xml @@ -0,0 +1,12 @@ + + + + + salah.coronya@gmail.com + Christopher Byrne + + + proxy-maint@gentoo.org + Proxy Maintainers + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/tss/tss-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/tss/tss-0-r1.ebuild new file mode 100644 index 0000000000..3ecc4e5494 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/tss/tss-0-r1.ebuild @@ -0,0 +1,9 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +DESCRIPTION="Trusted Software Stack for TPMs group" +ACCT_GROUP_ID=59 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/tty/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/tty/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/tty/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/tty/tty-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/tty/tty-0-r1.ebuild new file mode 100644 index 0000000000..2133d92cfa --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/tty/tty-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=5 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/users/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/users/metadata.xml new file mode 100644 index 0000000000..65e1fc82d8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/users/metadata.xml @@ -0,0 +1,7 @@ + + + + + base-system@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/users/users-0.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/users/users-0.ebuild new file mode 100644 index 0000000000..50b573c262 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/users/users-0.ebuild @@ -0,0 +1,8 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=100 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/utmp/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/utmp/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/utmp/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/utmp/utmp-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/utmp/utmp-0-r1.ebuild new file mode 100644 index 0000000000..2466461664 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/utmp/utmp-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=406 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/video/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/video/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/video/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/video/video-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/video/video-0-r1.ebuild new file mode 100644 index 0000000000..3b06b5be9d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/video/video-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=27 diff --git a/sdk_container/src/third_party/portage-stable/acct-group/wheel/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-group/wheel/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/wheel/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-group/wheel/wheel-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-group/wheel/wheel-0-r1.ebuild new file mode 100644 index 0000000000..8f5f3e4f88 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-group/wheel/wheel-0-r1.ebuild @@ -0,0 +1,8 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=10 diff --git a/sdk_container/src/third_party/portage-stable/acct-user/dnsmasq/dnsmasq-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-user/dnsmasq/dnsmasq-0-r1.ebuild new file mode 100644 index 0000000000..bf98c0fc92 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/dnsmasq/dnsmasq-0-r1.ebuild @@ -0,0 +1,13 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-user + +DESCRIPTION="User for net-dns/dnsmasq" + +ACCT_USER_ID=275 +ACCT_USER_GROUPS=( dnsmasq ) + +acct-user_add_deps diff --git a/sdk_container/src/third_party/portage-stable/acct-user/dnsmasq/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-user/dnsmasq/metadata.xml new file mode 100644 index 0000000000..bd6443d4a3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/dnsmasq/metadata.xml @@ -0,0 +1,8 @@ + + + + + chutzpah@gentoo.org + Patrick McLean + + diff --git a/sdk_container/src/third_party/portage-stable/acct-user/man/man-1-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-user/man/man-1-r1.ebuild new file mode 100644 index 0000000000..7fc43e801d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/man/man-1-r1.ebuild @@ -0,0 +1,11 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-user + +ACCT_USER_ID=13 +ACCT_USER_GROUPS=( man ) + +acct-user_add_deps diff --git a/sdk_container/src/third_party/portage-stable/acct-user/man/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-user/man/metadata.xml new file mode 100644 index 0000000000..8f8127182c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/man/metadata.xml @@ -0,0 +1,7 @@ + + + + + base-system@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-user/messagebus/messagebus-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-user/messagebus/messagebus-0-r1.ebuild new file mode 100644 index 0000000000..4dbd5fc104 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/messagebus/messagebus-0-r1.ebuild @@ -0,0 +1,11 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-user + +ACCT_USER_ID=101 +ACCT_USER_GROUPS=( messagebus ) + +acct-user_add_deps diff --git a/sdk_container/src/third_party/portage-stable/acct-user/messagebus/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-user/messagebus/metadata.xml new file mode 100644 index 0000000000..d4390c2eb5 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/messagebus/metadata.xml @@ -0,0 +1,7 @@ + + + + + freedesktop-bugs@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-user/netperf/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-user/netperf/metadata.xml new file mode 100644 index 0000000000..d5af4bcfaf --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/netperf/metadata.xml @@ -0,0 +1,8 @@ + + + + + netmon@gentoo.org + Gentoo network monitoring and analysis project + + diff --git a/sdk_container/src/third_party/portage-stable/acct-user/netperf/netperf-0.ebuild b/sdk_container/src/third_party/portage-stable/acct-user/netperf/netperf-0.ebuild new file mode 100644 index 0000000000..479d3788db --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/netperf/netperf-0.ebuild @@ -0,0 +1,13 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-user + +DESCRIPTION="A user for net-analyzer/netperf" + +ACCT_USER_GROUPS=( "netperf" ) +ACCT_USER_ID="168" + +acct-user_add_deps diff --git a/sdk_container/src/third_party/portage-stable/acct-user/nobody/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-user/nobody/metadata.xml new file mode 100644 index 0000000000..65e1fc82d8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/nobody/metadata.xml @@ -0,0 +1,7 @@ + + + + + base-system@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-user/nobody/nobody-0.ebuild b/sdk_container/src/third_party/portage-stable/acct-user/nobody/nobody-0.ebuild new file mode 100644 index 0000000000..444addd883 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/nobody/nobody-0.ebuild @@ -0,0 +1,17 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-user + +ACCT_USER_ID=65534 +ACCT_USER_ENFORCE_ID=yes +ACCT_USER_HOME="/var/empty" +ACCT_USER_HOME_OWNER="root:root" +ACCT_USER_HOME_PERMS=0755 +ACCT_USER_GROUPS=( nobody ) + +acct-user_add_deps + +RDEPEND+=" acct-user/root" diff --git a/sdk_container/src/third_party/portage-stable/acct-user/ntp/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-user/ntp/metadata.xml new file mode 100644 index 0000000000..bc93e527e2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/ntp/metadata.xml @@ -0,0 +1,8 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + diff --git a/sdk_container/src/third_party/portage-stable/acct-user/ntp/ntp-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-user/ntp/ntp-0-r1.ebuild new file mode 100644 index 0000000000..cd5fe5a72d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/ntp/ntp-0-r1.ebuild @@ -0,0 +1,12 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-user + +DESCRIPTION="user for ntp daemon" +ACCT_USER_ID=123 +ACCT_USER_GROUPS=( ntp ) + +acct-user_add_deps diff --git a/sdk_container/src/third_party/portage-stable/acct-user/pcap/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-user/pcap/metadata.xml new file mode 100644 index 0000000000..641cbd3703 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/pcap/metadata.xml @@ -0,0 +1,8 @@ + + + + + sam@gentoo.org + Sam James + + diff --git a/sdk_container/src/third_party/portage-stable/acct-user/pcap/pcap-0.ebuild b/sdk_container/src/third_party/portage-stable/acct-user/pcap/pcap-0.ebuild new file mode 100644 index 0000000000..781fd31919 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/pcap/pcap-0.ebuild @@ -0,0 +1,12 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit acct-user + +DESCRIPTION="User for capturing network traffic" +ACCT_USER_ID=377 +ACCT_USER_GROUPS=( pcap ) + +acct-user_add_deps diff --git a/sdk_container/src/third_party/portage-stable/acct-user/polkitd/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-user/polkitd/metadata.xml new file mode 100644 index 0000000000..d4390c2eb5 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/polkitd/metadata.xml @@ -0,0 +1,7 @@ + + + + + freedesktop-bugs@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-user/polkitd/polkitd-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-user/polkitd/polkitd-0-r1.ebuild new file mode 100644 index 0000000000..2d441cd426 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/polkitd/polkitd-0-r1.ebuild @@ -0,0 +1,12 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-user + +ACCT_USER_ID=102 +ACCT_USER_GROUPS=( polkitd ) +ACCT_USER_HOME=/var/lib/polkit-1 + +acct-user_add_deps diff --git a/sdk_container/src/third_party/portage-stable/acct-user/portage/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-user/portage/metadata.xml new file mode 100644 index 0000000000..66da907ee8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/portage/metadata.xml @@ -0,0 +1,7 @@ + + + + + dev-portage@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-user/portage/portage-0.ebuild b/sdk_container/src/third_party/portage-stable/acct-user/portage/portage-0.ebuild new file mode 100644 index 0000000000..505c3f3b85 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/portage/portage-0.ebuild @@ -0,0 +1,12 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-user + +ACCT_USER_ID=250 +ACCT_USER_HOME="/var/lib/portage/home" +ACCT_USER_GROUPS=( portage ) + +acct-user_add_deps diff --git a/sdk_container/src/third_party/portage-stable/acct-user/root/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-user/root/metadata.xml new file mode 100644 index 0000000000..65e1fc82d8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/root/metadata.xml @@ -0,0 +1,7 @@ + + + + + base-system@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-user/root/root-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-user/root/root-0-r1.ebuild new file mode 100644 index 0000000000..ea2e82dfcf --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/root/root-0-r1.ebuild @@ -0,0 +1,24 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-user + +ACCT_USER_ID=0 +ACCT_USER_ENFORCE_ID=yes +ACCT_USER_SHELL="/bin/bash" +ACCT_USER_HOME="/root" +ACCT_USER_HOME_PERMS=0700 +ACCT_USER_GROUPS=( root ) + +# Avoid reverting changes by the sysadmin. +# https://bugs.gentoo.org/827813 +ACCT_USER_NO_MODIFY=1 + +acct-user_add_deps + +pkg_prerm() { + # Don't lock out the superuser + : +} diff --git a/sdk_container/src/third_party/portage-stable/acct-user/sshd/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-user/sshd/metadata.xml new file mode 100644 index 0000000000..bc93e527e2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/sshd/metadata.xml @@ -0,0 +1,8 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + diff --git a/sdk_container/src/third_party/portage-stable/acct-user/sshd/sshd-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-user/sshd/sshd-0-r1.ebuild new file mode 100644 index 0000000000..06703c1956 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/sshd/sshd-0-r1.ebuild @@ -0,0 +1,15 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-user + +DESCRIPTION="User for ssh" + +ACCT_USER_ID=22 +ACCT_USER_HOME=/var/empty +ACCT_USER_HOME_OWNER=root:root +ACCT_USER_GROUPS=( sshd ) + +acct-user_add_deps diff --git a/sdk_container/src/third_party/portage-stable/acct-user/systemd-coredump/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-user/systemd-coredump/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/systemd-coredump/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-user/systemd-coredump/systemd-coredump-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-user/systemd-coredump/systemd-coredump-0-r1.ebuild new file mode 100644 index 0000000000..24e1948da8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/systemd-coredump/systemd-coredump-0-r1.ebuild @@ -0,0 +1,11 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-user + +ACCT_USER_ID=194 +ACCT_USER_GROUPS=( systemd-coredump ) + +acct-user_add_deps diff --git a/sdk_container/src/third_party/portage-stable/acct-user/systemd-journal-remote/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-user/systemd-journal-remote/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/systemd-journal-remote/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-user/systemd-journal-remote/systemd-journal-remote-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-user/systemd-journal-remote/systemd-journal-remote-0-r1.ebuild new file mode 100644 index 0000000000..b05096297b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/systemd-journal-remote/systemd-journal-remote-0-r1.ebuild @@ -0,0 +1,11 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-user + +ACCT_USER_ID=191 +ACCT_USER_GROUPS=( systemd-journal-remote ) + +acct-user_add_deps diff --git a/sdk_container/src/third_party/portage-stable/acct-user/systemd-network/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-user/systemd-network/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/systemd-network/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-user/systemd-network/systemd-network-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-user/systemd-network/systemd-network-0-r1.ebuild new file mode 100644 index 0000000000..bf308627c4 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/systemd-network/systemd-network-0-r1.ebuild @@ -0,0 +1,11 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-user + +ACCT_USER_ID=192 +ACCT_USER_GROUPS=( systemd-network ) + +acct-user_add_deps diff --git a/sdk_container/src/third_party/portage-stable/acct-user/systemd-oom/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-user/systemd-oom/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/systemd-oom/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-user/systemd-oom/systemd-oom-0.ebuild b/sdk_container/src/third_party/portage-stable/acct-user/systemd-oom/systemd-oom-0.ebuild new file mode 100644 index 0000000000..9c3f3e3651 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/systemd-oom/systemd-oom-0.ebuild @@ -0,0 +1,11 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-user + +ACCT_USER_ID=198 +ACCT_USER_GROUPS=( systemd-oom ) + +acct-user_add_deps diff --git a/sdk_container/src/third_party/portage-stable/acct-user/systemd-resolve/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-user/systemd-resolve/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/systemd-resolve/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-user/systemd-resolve/systemd-resolve-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-user/systemd-resolve/systemd-resolve-0-r1.ebuild new file mode 100644 index 0000000000..5eb0b3096d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/systemd-resolve/systemd-resolve-0-r1.ebuild @@ -0,0 +1,11 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-user + +ACCT_USER_ID=193 +ACCT_USER_GROUPS=( systemd-resolve ) + +acct-user_add_deps diff --git a/sdk_container/src/third_party/portage-stable/acct-user/systemd-timesync/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-user/systemd-timesync/metadata.xml new file mode 100644 index 0000000000..31123d01cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/systemd-timesync/metadata.xml @@ -0,0 +1,7 @@ + + + + + systemd@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/acct-user/systemd-timesync/systemd-timesync-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-user/systemd-timesync/systemd-timesync-0-r1.ebuild new file mode 100644 index 0000000000..3a09984648 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/systemd-timesync/systemd-timesync-0-r1.ebuild @@ -0,0 +1,11 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-user + +ACCT_USER_ID=195 +ACCT_USER_GROUPS=( systemd-timesync ) + +acct-user_add_deps diff --git a/sdk_container/src/third_party/portage-stable/acct-user/tss/metadata.xml b/sdk_container/src/third_party/portage-stable/acct-user/tss/metadata.xml new file mode 100644 index 0000000000..fdd29c016a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/tss/metadata.xml @@ -0,0 +1,12 @@ + + + + + salah.coronya@gmail.com + Christopher Byrne + + + proxy-maint@gentoo.org + Proxy Maintainers + + diff --git a/sdk_container/src/third_party/portage-stable/acct-user/tss/tss-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/acct-user/tss/tss-0-r1.ebuild new file mode 100644 index 0000000000..55a6438895 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/acct-user/tss/tss-0-r1.ebuild @@ -0,0 +1,12 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-user + +DESCRIPTION="Trusted Software Stack for TPMs user" +ACCT_USER_ID=59 +ACCT_USER_GROUPS=( tss ) + +acct-user_add_deps diff --git a/sdk_container/src/third_party/portage-stable/app-admin/eselect/Manifest b/sdk_container/src/third_party/portage-stable/app-admin/eselect/Manifest new file mode 100644 index 0000000000..c648030ffb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-admin/eselect/Manifest @@ -0,0 +1,2 @@ +DIST eselect-1.4.17.tar.xz 178980 BLAKE2B d905ac88bc009080912af75e64c7920d745788866fa3cb35466d68a652efbbd6984d6e1efeed76d9a344aed94705b74c85aa43e9c037d4d548d2e24afa69bd7a SHA512 35dc4c52f44c4f64db9c0dc2aec57b3055a6d36760b1bbbd094ad11b3f9e71a731444802632817b89c3b511f1dc9bb92046b59322d177e13fdc501ed767b591e +DIST eselect-1.4.20.tar.xz 180272 BLAKE2B 424653d00eda45335c3aaae50f6fbf2e89486da4529f657596516352f3b7fcb9859ceb2dc5b9762a34c44fb64e645fa27c46b86453bf50be6e8ae820664a4289 SHA512 9589ed89c4d5d31f71d535886eb50da67b84dec8a13a5df081e7569efee861dede4eaa43a0bfb9930c5b95d4f334e19245cb8820a73f7361527da262da1d1fb2 diff --git a/sdk_container/src/third_party/portage-stable/app-admin/eselect/eselect-1.4.17.ebuild b/sdk_container/src/third_party/portage-stable/app-admin/eselect/eselect-1.4.17.ebuild new file mode 100644 index 0000000000..aa18836510 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-admin/eselect/eselect-1.4.17.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit bash-completion-r1 + +DESCRIPTION="Gentoo's multi-purpose configuration and management tool" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Eselect" +SRC_URI="https://dev.gentoo.org/~ulm/eselect/${P}.tar.xz" + +LICENSE="GPL-2+ || ( GPL-2+ CC-BY-SA-4.0 )" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="doc emacs vim-syntax" + +DEPEND="sys-apps/sed + || ( + sys-apps/coreutils + app-misc/realpath + )" +RDEPEND="${DEPEND} + sys-apps/file + sys-libs/ncurses:0" +BDEPEND="doc? ( dev-python/docutils )" +PDEPEND="emacs? ( app-emacs/eselect-mode ) + vim-syntax? ( app-vim/eselect-syntax )" + +src_compile() { + emake + use doc && emake html +} + +src_install() { + emake DESTDIR="${D}" install + newbashcomp misc/${PN}.bashcomp ${PN} + dodoc AUTHORS ChangeLog NEWS README TODO doc/*.txt + if use doc; then + docinto html + dodoc *.html doc/*.html doc/*.css + fi + + # needed by news module + keepdir /var/lib/gentoo/news + if ! use prefix; then + fowners root:portage /var/lib/gentoo/news + fperms g+w /var/lib/gentoo/news + fi +} + +pkg_postinst() { + # fowners in src_install doesn't work for the portage group: + # merging changes the group back to root + if ! use prefix; then + chgrp portage "${EROOT}/var/lib/gentoo/news" \ + && chmod g+w "${EROOT}/var/lib/gentoo/news" + fi +} diff --git a/sdk_container/src/third_party/portage-stable/app-admin/eselect/eselect-1.4.20.ebuild b/sdk_container/src/third_party/portage-stable/app-admin/eselect/eselect-1.4.20.ebuild new file mode 100644 index 0000000000..68a003da8b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-admin/eselect/eselect-1.4.20.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit bash-completion-r1 + +DESCRIPTION="Gentoo's multi-purpose configuration and management tool" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Eselect" +SRC_URI="https://dev.gentoo.org/~ulm/eselect/${P}.tar.xz" + +LICENSE="GPL-2+ || ( GPL-2+ CC-BY-SA-4.0 )" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="doc emacs vim-syntax" + +DEPEND="sys-apps/sed + || ( + sys-apps/coreutils + app-misc/realpath + )" +RDEPEND="${DEPEND} + sys-apps/file + sys-libs/ncurses:0" +BDEPEND="doc? ( dev-python/docutils )" +PDEPEND="emacs? ( app-emacs/eselect-mode ) + vim-syntax? ( app-vim/eselect-syntax )" + +src_compile() { + emake + use doc && emake html +} + +src_install() { + emake DESTDIR="${D}" install + newbashcomp misc/${PN}.bashcomp ${PN} + dodoc AUTHORS ChangeLog NEWS README TODO doc/*.txt + if use doc; then + docinto html + dodoc *.html doc/*.html doc/*.css + fi + + # needed by news module + keepdir /var/lib/gentoo/news + if ! use prefix; then + fowners root:portage /var/lib/gentoo/news + fperms g+w /var/lib/gentoo/news + fi +} + +pkg_postinst() { + # fowners in src_install doesn't work for the portage group: + # merging changes the group back to root + if ! use prefix; then + chgrp portage "${EROOT}/var/lib/gentoo/news" \ + && chmod g+w "${EROOT}/var/lib/gentoo/news" + fi +} diff --git a/sdk_container/src/third_party/portage-stable/app-admin/eselect/eselect-9999.ebuild b/sdk_container/src/third_party/portage-stable/app-admin/eselect/eselect-9999.ebuild new file mode 100644 index 0000000000..5922f93c46 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-admin/eselect/eselect-9999.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/eselect.git" + +inherit autotools git-r3 bash-completion-r1 + +DESCRIPTION="Gentoo's multi-purpose configuration and management tool" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Eselect" + +LICENSE="GPL-2+ || ( GPL-2+ CC-BY-SA-4.0 )" +SLOT="0" +IUSE="doc emacs vim-syntax" + +DEPEND="sys-apps/sed + || ( + sys-apps/coreutils + app-misc/realpath + )" +RDEPEND="${DEPEND} + sys-apps/file + sys-libs/ncurses:0" +BDEPEND="doc? ( dev-python/docutils )" +PDEPEND="emacs? ( app-emacs/eselect-mode ) + vim-syntax? ( app-vim/eselect-syntax )" + +src_prepare() { + default + eautoreconf +} + +src_compile() { + emake + use doc && emake html +} + +src_install() { + emake DESTDIR="${D}" install + newbashcomp misc/${PN}.bashcomp ${PN} + dodoc AUTHORS ChangeLog NEWS README TODO doc/*.txt + if use doc; then + docinto html + dodoc *.html doc/*.html doc/*.css + fi + + # needed by news module + keepdir /var/lib/gentoo/news + if ! use prefix; then + fowners root:portage /var/lib/gentoo/news + fperms g+w /var/lib/gentoo/news + fi +} + +pkg_postinst() { + # fowners in src_install doesn't work for the portage group: + # merging changes the group back to root + if ! use prefix; then + chgrp portage "${EROOT}/var/lib/gentoo/news" \ + && chmod g+w "${EROOT}/var/lib/gentoo/news" + fi +} diff --git a/sdk_container/src/third_party/portage-stable/app-admin/eselect/metadata.xml b/sdk_container/src/third_party/portage-stable/app-admin/eselect/metadata.xml new file mode 100644 index 0000000000..7ee8a2c806 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-admin/eselect/metadata.xml @@ -0,0 +1,8 @@ + + + + + eselect@gentoo.org + eselect configuration and management tool + + diff --git a/sdk_container/src/third_party/portage-stable/app-admin/perl-cleaner/Manifest b/sdk_container/src/third_party/portage-stable/app-admin/perl-cleaner/Manifest new file mode 100644 index 0000000000..4d0f6ffb4e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-admin/perl-cleaner/Manifest @@ -0,0 +1 @@ +DIST perl-cleaner-2.30.tar.bz2 6963 BLAKE2B 8983060c7a904266ac82a67eba7b5d2184803b59c077f947a35d07e9af3046953705d31840b9508116578b8f3e8a8b97d77cf21eeac3b70f1c3fb5c1d71ae64e SHA512 436d26727bbb598bcd3c4f31e6b81e415a797cdba82dccfd55e54ee179bd2d6c1dc443e865f6f0a05b59f47ffd231dd10e55d5ea97a9a6875235ea1b49b68898 diff --git a/sdk_container/src/third_party/portage-stable/app-admin/perl-cleaner/metadata.xml b/sdk_container/src/third_party/portage-stable/app-admin/perl-cleaner/metadata.xml new file mode 100644 index 0000000000..d1aa590a84 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-admin/perl-cleaner/metadata.xml @@ -0,0 +1,8 @@ + + + + + perl@gentoo.org + Gentoo Perl Project + + diff --git a/sdk_container/src/third_party/portage-stable/app-admin/perl-cleaner/perl-cleaner-2.30.ebuild b/sdk_container/src/third_party/portage-stable/app-admin/perl-cleaner/perl-cleaner-2.30.ebuild new file mode 100644 index 0000000000..26172c5340 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-admin/perl-cleaner/perl-cleaner-2.30.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit prefix + +DESCRIPTION="User land tool for cleaning up old perl installs" +HOMEPAGE="https://www.gentoo.org/proj/en/perl/" + +if [[ "${PV}" == "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/gentoo-perl/perl-cleaner.git" +else + SRC_URI="mirror://gentoo/${P}.tar.bz2 https://dev.gentoo.org/~dilfridge/distfiles/${P}.tar.bz2" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="" + +[[ "${PV}" == "9999" ]] && DEPEND="sys-apps/help2man" + +RDEPEND="app-shells/bash + dev-lang/perl + || ( + ( sys-apps/portage app-portage/portage-utils ) + sys-apps/pkgcore + ) +" + +src_prepare() { + default + eprefixify ${PN} +} + +src_install() { + dosbin perl-cleaner + doman perl-cleaner.1 +} diff --git a/sdk_container/src/third_party/portage-stable/app-admin/perl-cleaner/perl-cleaner-9999.ebuild b/sdk_container/src/third_party/portage-stable/app-admin/perl-cleaner/perl-cleaner-9999.ebuild new file mode 100644 index 0000000000..a7624afba0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-admin/perl-cleaner/perl-cleaner-9999.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit prefix + +DESCRIPTION="User land tool for cleaning up old perl installs" +HOMEPAGE="https://www.gentoo.org/proj/en/perl/" + +if [[ "${PV}" == "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/gentoo-perl/perl-cleaner.git" +else + SRC_URI="mirror://gentoo/${P}.tar.bz2 https://dev.gentoo.org/~dilfridge/distfiles/${P}.tar.bz2" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="" + +[[ "${PV}" == "9999" ]] && DEPEND="sys-apps/help2man" + +RDEPEND="app-shells/bash + dev-lang/perl + || ( + ( sys-apps/portage app-portage/portage-utils ) + sys-apps/pkgcore + ) +" + +src_prepare() { + default + eprefixify ${PN} +} + +src_install() { + dosbin perl-cleaner + doman perl-cleaner.1 +} diff --git a/sdk_container/src/third_party/portage-stable/app-alternatives/awk/awk-4.ebuild b/sdk_container/src/third_party/portage-stable/app-alternatives/awk/awk-4.ebuild new file mode 100644 index 0000000000..1407a6fc46 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-alternatives/awk/awk-4.ebuild @@ -0,0 +1,95 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ALTERNATIVES=( + gawk:sys-apps/gawk + busybox:sys-apps/busybox + mawk:sys-apps/mawk + nawk:sys-apps/nawk +) + +inherit app-alternatives + +DESCRIPTION="/bin/awk and /usr/bin/awk symlinks" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="split-usr" + +RDEPEND=" + !app-eselect/eselect-awk +" + +src_install() { + local alt=$(get_alternative) + local root_prefix= + use split-usr && root_prefix=../../bin/ + + # We could consider setting AWK=... like we do for yacc & lex, + # but it would need some testing with a fair amount of packages first, + # as autoconf prefers gawk. + case ${alt} in + busybox) + dosym "${root_prefix}busybox" /usr/bin/awk + ;; + *) + dosym "${alt}" /usr/bin/awk + ;; + esac + + newman - awk.1 <<<".so ${alt}.1" + + if use split-usr; then + dosym ../usr/bin/awk /bin/awk + fi +} + +pkg_preinst() { + HAD_MAWK=0 + + has_version "app-alternatives/awk[mawk]" && HAD_MAWK=1 + + local v + for v in ${REPLACING_VERSIONS}; do + if ver_test "${v}" -lt 4; then + SHOW_MAWK_WARNING=1 + fi + + # if we are upgrading from a new enough version, leftover manpage + # symlink cleanup was done already + if ver_test "${v}" -ge 3; then + return + fi + done + + # otherwise, remove leftover files/symlinks created by eselect-awk (sic!) + shopt -s nullglob + local files=( "${EROOT}"/usr/share/man/man1/awk.1* ) + shopt -u nullglob + + if [[ ${files[@]} ]]; then + einfo "Cleaning up leftover manpage symlinks from eselect-awk ..." + rm -v "${files[@]}" || die + fi +} + +pkg_postinst() { + # Show the warning on new installs if using mawk, or older installs + # if upgrading from < app-alternatives/awk-4[mawk]. + if [[ -z ${REPLACING_VERSIONS} || ${SHOW_MAWK_WARNING} -eq 1 || ${HAD_MAWK} -eq 0 ]] && use mawk; then + ewarn "mawk (incompletely) implements awk, as it was defined by the now-obsolete" + ewarn "POSIX 1003.2 (draft 11.3) specification. It does not fully implement the standard" + ewarn "extended regular expression syntax and there are other known issues pertaining to POSIX conformance." + fi +} + +pkg_postrm() { + # make sure we don't leave the user without the symlinks, since + # they've not been owned by any other package + if [[ ! -h ${EROOT}/usr/bin/awk ]]; then + ln -s gawk "${EROOT}/usr/bin/awk" || die + fi + if [[ ! -h ${EROOT}/bin/awk ]]; then + ln -s ../usr/bin/awk "${EROOT}/bin/awk" || die + fi +} diff --git a/sdk_container/src/third_party/portage-stable/app-alternatives/awk/metadata.xml b/sdk_container/src/third_party/portage-stable/app-alternatives/awk/metadata.xml new file mode 100644 index 0000000000..0cf5fbf0d2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-alternatives/awk/metadata.xml @@ -0,0 +1,31 @@ + + + + + junghans@gentoo.org + Christoph Junghans + + + base-system@gentoo.org + Gentoo Base System + + + mgorny@gentoo.org + Michał Górny + + + + Symlink to sys-apps/busybox + + + Symlink to sys-apps/gawk + + + Symlink to sys-apps/mawk (warning: mawk is + not fully POSIX-compliant) + + + Symlink to sys-apps/nawk + + + diff --git a/sdk_container/src/third_party/portage-stable/app-alternatives/bc/bc-0.ebuild b/sdk_container/src/third_party/portage-stable/app-alternatives/bc/bc-0.ebuild new file mode 100644 index 0000000000..0a4314eb3f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-alternatives/bc/bc-0.ebuild @@ -0,0 +1,28 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ALTERNATIVES=( + "gnu:>=sys-devel/bc-1.07.1-r6" + gh:sci-calculators/bc-gh +) + +inherit app-alternatives + +DESCRIPTION="bc symlink" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +RDEPEND=" + ! + + + + base-system@gentoo.org + Gentoo Base System + + + mgorny@gentoo.org + Michał Górny + + + + Symlink to GNU bc (sys-devel/bc) + + + Symlink to bc-gh from sci-calculators/bc-gh + + + diff --git a/sdk_container/src/third_party/portage-stable/app-alternatives/bzip2/bzip2-1.ebuild b/sdk_container/src/third_party/portage-stable/app-alternatives/bzip2/bzip2-1.ebuild new file mode 100644 index 0000000000..57852459ae --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-alternatives/bzip2/bzip2-1.ebuild @@ -0,0 +1,45 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ALTERNATIVES=( + "reference:>=app-arch/bzip2-1.0.8-r4" + "lbzip2:app-arch/lbzip2[-symlink(-)]" + "pbzip2:app-arch/pbzip2[-symlink(-)]" +) + +inherit app-alternatives + +DESCRIPTION="bzip2 symlink" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="split-usr" + +RDEPEND=" + ! + + + + base-system@gentoo.org + Gentoo Base System + + + mgorny@gentoo.org + Michał Górny + + + + Symlink to app-arch/lbzip2. + + + Symlink to app-arch/pbzip2. + + + Symlink to app-arch/bzip2. + + + diff --git a/sdk_container/src/third_party/portage-stable/app-alternatives/cpio/cpio-0.ebuild b/sdk_container/src/third_party/portage-stable/app-alternatives/cpio/cpio-0.ebuild new file mode 100644 index 0000000000..a7b0273d1d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-alternatives/cpio/cpio-0.ebuild @@ -0,0 +1,35 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ALTERNATIVES=( + "gnu:>=app-arch/cpio-2.13-r4" + libarchive:app-arch/libarchive +) + +inherit app-alternatives + +DESCRIPTION="CPIO symlink" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="split-usr" + +RDEPEND=" + ! + + + + base-system@gentoo.org + Gentoo Base System + + + mgorny@gentoo.org + Michał Górny + + + + Symlink to GNU cpio (app-arch/cpio) + + + Symlink to bsdcpio from app-arch/libarchive + + + diff --git a/sdk_container/src/third_party/portage-stable/app-alternatives/gzip/gzip-0.ebuild b/sdk_container/src/third_party/portage-stable/app-alternatives/gzip/gzip-0.ebuild new file mode 100644 index 0000000000..4d19fb28ba --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-alternatives/gzip/gzip-0.ebuild @@ -0,0 +1,44 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ALTERNATIVES=( + "reference:>=app-arch/gzip-1.12-r3" + "pigz:app-arch/pigz[-symlink(-)]" +) + +inherit app-alternatives + +DESCRIPTION="gzip symlinks" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="split-usr" + +RDEPEND=" + ! + + + + base-system@gentoo.org + Gentoo Base System + + + mgorny@gentoo.org + Michał Górny + + + + Symlink to app-arch/pigz. + + + Symlink to app-arch/gzip. + + + diff --git a/sdk_container/src/third_party/portage-stable/app-alternatives/lex/lex-0-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-alternatives/lex/lex-0-r1.ebuild new file mode 100644 index 0000000000..74bc784559 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-alternatives/lex/lex-0-r1.ebuild @@ -0,0 +1,29 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ALTERNATIVES=( + "flex:>=sys-devel/flex-2.6.4-r5" + reflex:sys-devel/reflex +) + +inherit app-alternatives + +DESCRIPTION="lex symlinks" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +RDEPEND=" + ! + + + + base-system@gentoo.org + Gentoo Base System + + + mgorny@gentoo.org + Michał Górny + + + + Symlink to sys-devel/flex. + + + Symlink to sys-devel/reflex. + + + diff --git a/sdk_container/src/third_party/portage-stable/app-alternatives/sh/metadata.xml b/sdk_container/src/third_party/portage-stable/app-alternatives/sh/metadata.xml new file mode 100644 index 0000000000..ab59369a30 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-alternatives/sh/metadata.xml @@ -0,0 +1,32 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + mgorny@gentoo.org + Michał Górny + + + + Symlink to app-shells/bash + + + Symlink to sys-apps/busybox + + + Symlink to app-shells/dash + + + Symlink to app-shells/ksh + + + Symlink to lksh from app-shells/mksh + + + Symlink to mksh from app-shells/mksh + + + diff --git a/sdk_container/src/third_party/portage-stable/app-alternatives/sh/sh-0.ebuild b/sdk_container/src/third_party/portage-stable/app-alternatives/sh/sh-0.ebuild new file mode 100644 index 0000000000..f51bc5622d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-alternatives/sh/sh-0.ebuild @@ -0,0 +1,47 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ALTERNATIVES=( + bash:app-shells/bash + busybox:sys-apps/busybox + dash:app-shells/dash + ksh:app-shells/ksh + "lksh:app-shells/mksh[lksh]" + mksh:app-shells/mksh +) + +inherit app-alternatives + +DESCRIPTION="/bin/sh (POSIX shell) symlink" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +RDEPEND=" + !app-eselect/eselect-sh +" + +pkg_setup() { + if [[ -z ${ROOT} ]] && use busybox ; then + # Needed to avoid busybox preferring internal applets over PATH lookups. + # https://web.archive.org/web/20221206223848/https://busybox.net/FAQ.html#standalone_shell. + if busybox bbconfig | grep -q "CONFIG_FEATURE_SH_STANDALONE=y" ; then + ewarn "busybox is configured with CONFIG_FEATURE_SH_STANDALONE=y!" + ewarn "This is not a safe configuration for busybox as /bin/sh." + ewarn "Please use savedconfig to disable CONFIG_FEATURE_SH_STANDALONE on busybox." + die "Aborting due to unsafe Busybox configuration (CONFIG_FEATURE_SH_STANDALONE=y)!" + fi + fi +} + +src_install() { + dosym "$(get_alternative)" /bin/sh || die +} + +pkg_postrm() { + # make sure we don't leave the user without /bin/sh, since it's not + # been owned by any other package + if [[ ! -h ${EROOT}/bin/sh ]]; then + ln -s bash "${EROOT}/bin/sh" || die + fi +} diff --git a/sdk_container/src/third_party/portage-stable/app-alternatives/tar/metadata.xml b/sdk_container/src/third_party/portage-stable/app-alternatives/tar/metadata.xml new file mode 100644 index 0000000000..3bf8c90505 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-alternatives/tar/metadata.xml @@ -0,0 +1,20 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + mgorny@gentoo.org + Michał Górny + + + + Symlink to GNU tar (app-arch/tar) + + + Symlink to bsdtar from app-arch/libarchive + + + diff --git a/sdk_container/src/third_party/portage-stable/app-alternatives/tar/tar-0.ebuild b/sdk_container/src/third_party/portage-stable/app-alternatives/tar/tar-0.ebuild new file mode 100644 index 0000000000..a62d6ee204 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-alternatives/tar/tar-0.ebuild @@ -0,0 +1,35 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ALTERNATIVES=( + "gnu:>=app-arch/tar-1.34-r2" + libarchive:app-arch/libarchive +) + +inherit app-alternatives + +DESCRIPTION="Tar symlink" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="split-usr" + +RDEPEND=" + ! + + + + base-system@gentoo.org + Gentoo Base System + + + mgorny@gentoo.org + Michał Górny + + + + Symlink to sys-devel/bison. + + + Symlink to dev-util/byacc. + + + Symlink to dev-util/yacc. + + + diff --git a/sdk_container/src/third_party/portage-stable/app-alternatives/yacc/yacc-1-r2.ebuild b/sdk_container/src/third_party/portage-stable/app-alternatives/yacc/yacc-1-r2.ebuild new file mode 100644 index 0000000000..2ea1759121 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-alternatives/yacc/yacc-1-r2.ebuild @@ -0,0 +1,44 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ALTERNATIVES=( + "bison:>=sys-devel/bison-3.8.2-r1" + byacc:dev-util/byacc + "reference:>=dev-util/yacc-1.9.1-r7" +) + +inherit app-alternatives + +DESCRIPTION="yacc symlinks" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +RDEPEND=" + ! + #include + #include ++#include + #include + #include "bzlib.h" + +@@ -301,6 +302,7 @@ + Char progNameReally[FILE_NAME_LEN]; + FILE *outputHandleJustInCase; + Int32 workFactor; ++Char showProgress; + + static void panic ( Char* ) NORETURN; + static void ioError ( void ) NORETURN; +@@ -425,6 +427,12 @@ + UInt32 nbytes_in_lo32, nbytes_in_hi32; + UInt32 nbytes_out_lo32, nbytes_out_hi32; + Int32 bzerr, bzerr_dummy, ret; ++ double fileSize = 0; /* initialized to make the compiler stop crying */ ++ /* double because big files might otherwhise give ++ * overflows. not long long since not all compilers ++ * support that one ++ */ ++ time_t startTime, currentTime; + + SET_BINARY_MODE(stream); + SET_BINARY_MODE(zStream); +@@ -432,12 +440,21 @@ + if (ferror(stream)) goto errhandler_io; + if (ferror(zStream)) goto errhandler_io; + ++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) { ++ (void)fseek(stream, 0, SEEK_END); ++ fileSize = ftello(stream); ++ rewind(stream); ++ if (verbosity >= 1) ++ fprintf(stderr, "Input-file size: %ld\n", (long)fileSize); ++ } ++ + bzf = BZ2_bzWriteOpen ( &bzerr, zStream, + blockSize100k, verbosity, workFactor ); + if (bzerr != BZ_OK) goto errhandler; + + if (verbosity >= 2) fprintf ( stderr, "\n" ); + ++ time(&startTime); + while (True) { + + if (myfeof(stream)) break; +@@ -446,6 +463,22 @@ + if (nIbuf > 0) BZ2_bzWrite ( &bzerr, bzf, (void*)ibuf, nIbuf ); + if (bzerr != BZ_OK) goto errhandler; + ++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) { ++ time(¤tTime); ++ ++ if ((currentTime - startTime) > 1) { /* show progress every 2 seconds */ ++ double curInPos = ftello(stream); ++ double curOutPos = ftello(zStream); ++ ++ startTime = currentTime; ++ ++ fprintf(stderr, "%.2f%% done", (curInPos * 100.0) / fileSize); ++ if (srcMode == SM_F2F) ++ fprintf(stderr, ", new size: %.2f%%", (curOutPos * 100.0) / curInPos); ++ ++ fprintf(stderr, " \r"); ++ } ++ } + } + + BZ2_bzWriteClose64 ( &bzerr, bzf, 0, +@@ -526,6 +559,8 @@ + UChar unused[BZ_MAX_UNUSED]; + Int32 nUnused; + UChar* unusedTmp; ++ double fileSize = 0; /* initialized to make the compiler stop crying */ ++ time_t startTime, currentTime; + + nUnused = 0; + streamNo = 0; +@@ -533,9 +568,19 @@ + SET_BINARY_MODE(stream); + SET_BINARY_MODE(zStream); + ++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) { ++ off_t dummy = ftello(zStream); ++ (void)fseeko(zStream, 0, SEEK_END); ++ fileSize = ftello(zStream); ++ (void)fseeko(zStream, dummy, SEEK_SET); ++ if (verbosity >= 1) ++ fprintf(stderr, "Input-file size: %ld\n", (long)fileSize); ++ } ++ + if (ferror(stream)) goto errhandler_io; + if (ferror(zStream)) goto errhandler_io; + ++ time(&startTime); + while (True) { + + bzf = BZ2_bzReadOpen ( +@@ -551,6 +596,16 @@ + if ((bzerr == BZ_OK || bzerr == BZ_STREAM_END) && nread > 0) + fwrite ( obuf, sizeof(UChar), nread, stream ); + if (ferror(stream)) goto errhandler_io; ++ ++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) { ++ time(¤tTime); ++ if ((currentTime - startTime) >= 2) { ++ double curInPos = ftello(zStream); ++ startTime = currentTime; ++ ++ fprintf(stderr, "%.2f%% done\r", (curInPos * 100.0) / fileSize); ++ } ++ } + } + if (bzerr != BZ_STREAM_END) goto errhandler; + +@@ -1872,6 +1927,7 @@ + deleteOutputOnInterrupt = False; + exitValue = 0; + i = j = 0; /* avoid bogus warning from egcs-1.1.X */ ++ showProgress = False; + + /*-- Set up signal handlers for mem access errors --*/ + signal (SIGSEGV, mySIGSEGVorSIGBUScatcher); +@@ -1949,6 +2005,7 @@ + case 'k': keepInputFiles = True; break; + case 's': smallMode = True; break; + case 'q': noisy = False; break; ++ case 'p': showProgress = True; break; + case '1': blockSize100k = 1; break; + case '2': blockSize100k = 2; break; + case '3': blockSize100k = 3; break; +@@ -1985,6 +2042,7 @@ + if (ISFLAG("--keep")) keepInputFiles = True; else + if (ISFLAG("--small")) smallMode = True; else + if (ISFLAG("--quiet")) noisy = False; else ++ if (ISFLAG("--show-progress")) showProgress = True; else + if (ISFLAG("--version")) license(); else + if (ISFLAG("--license")) license(); else + if (ISFLAG("--exponential")) workFactor = 1; else diff --git a/sdk_container/src/third_party/portage-stable/app-arch/bzip2/files/bzip2-1.0.8-mingw.patch b/sdk_container/src/third_party/portage-stable/app-arch/bzip2/files/bzip2-1.0.8-mingw.patch new file mode 100644 index 0000000000..b512a8f466 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/bzip2/files/bzip2-1.0.8-mingw.patch @@ -0,0 +1,16 @@ +make it build for mingw targets + +https://bugs.gentoo.org/393573 + +--- a/bzlib.h ++++ b/bzlib.h +@@ -81,6 +81,9 @@ typedef + /* windows.h define small to char */ + # undef small + # endif ++# ifndef WINAPI ++# define WINAPI ++# endif + # ifdef BZ_EXPORT + # define BZ_API(func) WINAPI func + # define BZ_EXTERN extern diff --git a/sdk_container/src/third_party/portage-stable/app-arch/bzip2/files/bzip2-1.0.8-out-of-tree-build.patch b/sdk_container/src/third_party/portage-stable/app-arch/bzip2/files/bzip2-1.0.8-out-of-tree-build.patch new file mode 100644 index 0000000000..04818265b7 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/bzip2/files/bzip2-1.0.8-out-of-tree-build.patch @@ -0,0 +1,76 @@ +--- bzip2-1.0.8/Makefile ++++ bzip2-1.0.8/Makefile +@@ -54,7 +54,6 @@ + + check: test + test: bzip2 +- @cat words1 + ./bzip2 -1 < sample1.ref > sample1.rb2 + ./bzip2 -2 < sample2.ref > sample2.rb2 + ./bzip2 -3 < sample3.ref > sample3.rb2 +@@ -67,7 +66,6 @@ + cmp sample1.tst sample1.ref + cmp sample2.tst sample2.ref + cmp sample3.tst sample3.ref +- @cat words3 + + install: bzip2 bzip2recover + if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi +@@ -113,25 +111,8 @@ + sample1.rb2 sample2.rb2 sample3.rb2 \ + sample1.tst sample2.tst sample3.tst + +-blocksort.o: blocksort.c +- @cat words0 +- $(CC) $(CFLAGS) -c blocksort.c +-huffman.o: huffman.c +- $(CC) $(CFLAGS) -c huffman.c +-crctable.o: crctable.c +- $(CC) $(CFLAGS) -c crctable.c +-randtable.o: randtable.c +- $(CC) $(CFLAGS) -c randtable.c +-compress.o: compress.c +- $(CC) $(CFLAGS) -c compress.c +-decompress.o: decompress.c +- $(CC) $(CFLAGS) -c decompress.c +-bzlib.o: bzlib.c +- $(CC) $(CFLAGS) -c bzlib.c +-bzip2.o: bzip2.c +- $(CC) $(CFLAGS) -c bzip2.c +-bzip2recover.o: bzip2recover.c +- $(CC) $(CFLAGS) -c bzip2recover.c ++%.o: %.c ++ $(CC) $(CFLAGS) -c $< + + + distclean: clean +--- bzip2-1.0.8/Makefile-libbz2_so ++++ bzip2-1.0.8/Makefile-libbz2_so +@@ -36,24 +36,10 @@ + + all: $(OBJS) + $(CC) $(LDFLAGS) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.8 $(OBJS) +- $(CC) $(LDFLAGS) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.8 +- rm -f libbz2.so.1.0 +- ln -s libbz2.so.1.0.8 libbz2.so.1.0 ++ ln -sf libbz2.so.1.0.8 libbz2.so.1.0 + + clean: + rm -f $(OBJS) bzip2.o libbz2.so.1.0.8 libbz2.so.1.0 bzip2-shared + +-blocksort.o: blocksort.c +- $(CC) $(CFLAGS) -c blocksort.c +-huffman.o: huffman.c +- $(CC) $(CFLAGS) -c huffman.c +-crctable.o: crctable.c +- $(CC) $(CFLAGS) -c crctable.c +-randtable.o: randtable.c +- $(CC) $(CFLAGS) -c randtable.c +-compress.o: compress.c +- $(CC) $(CFLAGS) -c compress.c +-decompress.o: decompress.c +- $(CC) $(CFLAGS) -c decompress.c +-bzlib.o: bzlib.c +- $(CC) $(CFLAGS) -c bzlib.c ++%.o: %.c ++ $(CC) $(CFLAGS) -c $< diff --git a/sdk_container/src/third_party/portage-stable/app-arch/bzip2/files/bzip2-1.0.8-saneso.patch b/sdk_container/src/third_party/portage-stable/app-arch/bzip2/files/bzip2-1.0.8-saneso.patch new file mode 100644 index 0000000000..63409f5a85 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/bzip2/files/bzip2-1.0.8-saneso.patch @@ -0,0 +1,13 @@ +--- bzip2-1.0.8/Makefile-libbz2_so ++++ bzip2-1.0.8/Makefile-libbz2_so +@@ -35,8 +35,8 @@ + bzlib.o + + all: $(OBJS) +- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.8 $(OBJS) +- $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.8 ++ $(CC) $(LDFLAGS) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.8 $(OBJS) ++ $(CC) $(LDFLAGS) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.8 + rm -f libbz2.so.1.0 + ln -s libbz2.so.1.0.8 libbz2.so.1.0 + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/bzip2/metadata.xml b/sdk_container/src/third_party/portage-stable/app-arch/bzip2/metadata.xml new file mode 100644 index 0000000000..e3880e673f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/bzip2/metadata.xml @@ -0,0 +1,12 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + cpe:/a:bzip:bzip2 + bzip2/bzip2 + + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/cpio/Manifest b/sdk_container/src/third_party/portage-stable/app-arch/cpio/Manifest new file mode 100644 index 0000000000..1bc147148d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/cpio/Manifest @@ -0,0 +1,2 @@ +DIST cpio-2.13-CVE-2021-38185.patch.xz 7844 BLAKE2B e338950e03c3eed3b4288435c9c75af8f0c3497b43680be4ee347e628db7cfac616b437a848094bf82cfc2c7f29d59b388bf0f6368b3b99770022e3f9533be11 SHA512 4d2cafefcd1ae9d86cb5171de2896799713490dfd9ed27d3dce0886fa4588c8df2b16ad8508a5dbb9155c9de6e40b6d1083bdb4774d967193a270a1dcbe37a33 +DIST cpio-2.13.tar.bz2 1354559 BLAKE2B 45d77723acb55f15c8574ab5a2fdff6fb1767629d177dd3416b0268e9f82ee6bdd11b4fa591ef020efccbdc3f4918cf77263169da1a0f6422dfe1a9712295778 SHA512 459398e69f7f48201c04d1080218c50f75edcf114ffcbb236644ff6fcade5fcc566929bdab2ebe9be5314828d6902e43b348a8adf28351df978c8989590e93a3 diff --git a/sdk_container/src/third_party/portage-stable/app-arch/cpio/cpio-2.13-r5.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/cpio/cpio-2.13-r5.ebuild new file mode 100644 index 0000000000..b184309b5c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/cpio/cpio-2.13-r5.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="A file archival tool which can also read and write tar files" +HOMEPAGE="https://www.gnu.org/software/cpio/cpio.html" +SRC_URI="mirror://gnu/cpio/${P}.tar.bz2" +SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-CVE-2021-38185.patch.xz" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="nls" + +PDEPEND=" + app-alternatives/cpio +" + +PATCHES=( + "${FILESDIR}"/${PN}-2.12-non-gnu-compilers.patch #275295 + "${WORKDIR}"/${P}-CVE-2021-38185.patch + "${FILESDIR}"/${PN}-2.13-sysmacros-glibc-2.26.patch + "${FILESDIR}"/${PN}-2.13-fix-no-absolute-filenames-revert-CVE-2015-1197-handling.patch + "${FILESDIR}"/${PN}-2.13-wincompatible-function-pointer-types.patch +) + +src_prepare() { + default + + # Drop after 2.13 (only here for CVE patch) + eautoreconf +} + +src_configure() { + local myeconfargs=( + $(use_enable nls) + --bindir="${EPREFIX}"/bin + --with-rmt="${EPREFIX}"/usr/sbin/rmt + # install as gcpio for better compatibility with non-GNU userland + --program-prefix=g + ) + + econf "${myeconfargs[@]}" +} + +pkg_postinst() { + # ensure to preserve the symlink before app-alternatives/cpio + # is installed + if [[ ! -h ${EROOT}/bin/cpio ]]; then + ln -s gcpio "${EROOT}/bin/cpio" || die + fi +} diff --git a/sdk_container/src/third_party/portage-stable/app-arch/cpio/files/cpio-2.12-non-gnu-compilers.patch b/sdk_container/src/third_party/portage-stable/app-arch/cpio/files/cpio-2.12-non-gnu-compilers.patch new file mode 100644 index 0000000000..c7fc7f95b4 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/cpio/files/cpio-2.12-non-gnu-compilers.patch @@ -0,0 +1,11 @@ +--- cpio-2.12/src/cpiohdr.h ++++ cpio-2.12/src/cpiohdr.h +@@ -25,6 +25,8 @@ + + # ifdef HAVE_ATTRIB_PACKED + # define ATTRIB_PACKED __attribute__((packed)) ++# else ++# define ATTRIB_PACKED + # endif + + # ifdef HAVE_PRAGMA_PACK diff --git a/sdk_container/src/third_party/portage-stable/app-arch/cpio/files/cpio-2.13-fix-no-absolute-filenames-revert-CVE-2015-1197-handling.patch b/sdk_container/src/third_party/portage-stable/app-arch/cpio/files/cpio-2.13-fix-no-absolute-filenames-revert-CVE-2015-1197-handling.patch new file mode 100644 index 0000000000..326489a549 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/cpio/files/cpio-2.13-fix-no-absolute-filenames-revert-CVE-2015-1197-handling.patch @@ -0,0 +1,47 @@ +https://sources.debian.org/patches/cpio/2.13%2Bdfsg-7.1/revert-CVE-2015-1197-handling.patch/ +https://bugs.gentoo.org/700020 + +From: Chris Lamb +Date: Sat, 1 Feb 2020 13:36:37 +0100 +Subject: Fix a regression in handling of CVE-2015-1197 & + --no-absolute-filenames. + +See: + + * https://bugs.debian.org/946267 + * https://bugs.debian.org/946469 + +This reverts (most of): https://git.savannah.gnu.org/cgit/cpio.git/diff/?id=45b0ee2b407913c533f7ded8d6f8cbeec16ff6ca&id2=3177d660a4c62a6acb538b0f7c54ba423698889a +--- a/src/copyin.c ++++ b/src/copyin.c +@@ -646,8 +646,6 @@ copyin_link (struct cpio_file_stat *file_hdr, int in_file_des) + link_name = xstrdup (file_hdr->c_tar_linkname); + } + +- cpio_safer_name_suffix (link_name, true, !no_abs_paths_flag, false); +- + res = UMASKED_SYMLINK (link_name, file_hdr->c_name, + file_hdr->c_mode); + if (res < 0 && create_dir_flag) +--- a/tests/testsuite ++++ b/tests/testsuite +@@ -2787,7 +2787,7 @@ read at_status <"$at_status_file" + #AT_START_14 + at_fn_group_banner 14 'CVE-2015-1197.at:17' \ + "CVE-2015-1197 (--no-absolute-filenames for symlinks)" "" +-at_xfail=no ++at_xfail=yes + ( + $as_echo "14. $at_setup_line: testing $at_desc ..." + $at_traceon + +--- a/tests/CVE-2015-1197.at ++++ b/tests/CVE-2015-1197.at +@@ -15,6 +15,7 @@ + # along with this program. If not, see . + + AT_SETUP([CVE-2015-1197 (--no-absolute-filenames for symlinks)]) ++AT_XFAIL_IF([true]) + AT_CHECK([ + tempdir=$(pwd)/tmp + mkdir $tempdir diff --git a/sdk_container/src/third_party/portage-stable/app-arch/cpio/files/cpio-2.13-sysmacros-glibc-2.26.patch b/sdk_container/src/third_party/portage-stable/app-arch/cpio/files/cpio-2.13-sysmacros-glibc-2.26.patch new file mode 100644 index 0000000000..90e7bc77bd --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/cpio/files/cpio-2.13-sysmacros-glibc-2.26.patch @@ -0,0 +1,42 @@ +--- a/am/ax_compile_check_rettype.m4 ++++ b/am/ax_compile_check_rettype.m4 +@@ -70,6 +70,9 @@ AC_CACHE_VAL(AC_CV_NAME, + [for ac_type in char short int long "long long" $4 + do + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ++#ifdef HAVE_SYS_SYSMACROS_H ++#include ++#endif + #include + $3 + ]], [[switch (0) case 0: case (sizeof ($1($2)) == sizeof ($ac_type)):;]])], [AC_CV_NAME=$ac_type]) +--- a/configure.ac ++++ b/configure.ac +@@ -39,14 +39,11 @@ AC_C_PROTOTYPES + AC_SYS_LARGEFILE + + AC_TYPE_SIGNAL +-AC_HEADER_MAJOR + AC_C_CONST + AC_TYPE_UID_T + AC_CHECK_TYPE(gid_t, int) + AC_HEADER_STDC + AC_HEADER_DIRENT +-AC_COMPILE_CHECK_RETTYPE([major], [0]) +-AC_COMPILE_CHECK_RETTYPE([minor], [0]) + + AC_CHECK_FUNCS([fchmod fchown]) + # This is needed for mingw build +@@ -67,7 +64,11 @@ AC_ARG_ENABLE(mt, + + AM_CONDITIONAL([CPIO_MT_COND], [test "$enable_mt" = yes]) + +-AC_CHECK_HEADERS([unistd.h stdlib.h string.h fcntl.h pwd.h grp.h sys/io/trioctl.h utmp.h getopt.h locale.h libintl.h sys/wait.h utime.h locale.h process.h sys/ioctl.h]) ++AC_CHECK_HEADERS([unistd.h stdlib.h string.h fcntl.h pwd.h grp.h sys/io/trioctl.h utmp.h getopt.h locale.h libintl.h sys/wait.h utime.h locale.h process.h sys/ioctl.h sys/sysmacros.h]) ++ ++AC_HEADER_MAJOR ++AC_COMPILE_CHECK_RETTYPE([major], [0]) ++AC_COMPILE_CHECK_RETTYPE([minor], [0]) + + AC_CHECK_DECLS([errno, getpwnam, getgrnam, getgrgid, strdup, strerror, getenv, atoi, exit], , , [ + #include diff --git a/sdk_container/src/third_party/portage-stable/app-arch/cpio/files/cpio-2.13-wincompatible-function-pointer-types.patch b/sdk_container/src/third_party/portage-stable/app-arch/cpio/files/cpio-2.13-wincompatible-function-pointer-types.patch new file mode 100644 index 0000000000..4f2dc31536 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/cpio/files/cpio-2.13-wincompatible-function-pointer-types.patch @@ -0,0 +1,23 @@ +https://bugs.gentoo.org/880373 +https://savannah.gnu.org/bugs/index.php?63349 +https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=0cc39712803ade7b2d4b89c36b143dad72404063 + +From 0cc39712803ade7b2d4b89c36b143dad72404063 Mon Sep 17 00:00:00 2001 +From: Bruno Haible +Date: Sun, 18 Oct 2020 14:37:13 +0200 +Subject: obstack: Fix a clang warning. + +* lib/obstack.c (print_and_abort): Mark as __attribute_noreturn__. +--- a/gnu/obstack.c ++++ b/gnu/obstack.c +@@ -326,7 +326,7 @@ int obstack_exit_failure = EXIT_FAILURE; + # include + # endif + +-static _Noreturn void ++static __attribute_noreturn__ void + print_and_abort (void) + { + /* Don't change any of these strings. Yes, it would be possible to add +-- +cgit v1.1 diff --git a/sdk_container/src/third_party/portage-stable/app-arch/cpio/metadata.xml b/sdk_container/src/third_party/portage-stable/app-arch/cpio/metadata.xml new file mode 100644 index 0000000000..3f89d2d293 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/cpio/metadata.xml @@ -0,0 +1,11 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + cpe:/a:gnu:cpio + + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/gzip/Manifest b/sdk_container/src/third_party/portage-stable/app-arch/gzip/Manifest new file mode 100644 index 0000000000..670e486ce3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/gzip/Manifest @@ -0,0 +1,4 @@ +DIST gzip-1.12.tar.xz 825548 BLAKE2B 7e2d482c08555f5fb0ff5408c0afe48c61034e9779eed6e3dd8046c847234c0a8a6bc34d49a934a54db0d73033e12c71a228d373551384a4cd663315071637e0 SHA512 116326fe991828227de150336a0c016f4fe932dfbb728a16b4a84965256d9929574a4f5cfaf3cf6bb4154972ef0d110f26ab472c93e62ec9a5fd7a5d65abea24 +DIST gzip-1.12.tar.xz.sig 833 BLAKE2B ab7b4a759ef163d67f20773607ba0408ea9f1f7c7c224f43635fc3752acc521b74dbea4ec9ebb58a2f4fa13ecae19e00779b4b56c2cb95976301445beff817aa SHA512 1f4702797f7c5f1873c2f9c2f6210ba23824455d17ee82f50f0bf24240ed5bdf0090cf85338ccf76ba82422f8b4ad3a329d8bbf1350cb094d7bd61aa45550397 +DIST gzip-1.12_p20221228.tar.xz 806448 BLAKE2B 278eb44caca7ee16ca5d0210673726a1daebef6da7eaf0a87fc24590cb4c53d4ebe2decb6b8975440e1eb2c2cfebb69f091c658f9a7430a1717f0477fec279da SHA512 87d1fccb9603ec336c89689337e3cf3cfef70054ab4416bd8380fee011e9f517555d80a2a009bd312a58c34fdaf48778e5f0e9bea350ae280b440a325a837866 +DIST gzip-1.12_p20221228.tar.xz.sig 833 BLAKE2B b59d4677d15e2461d5fa95b4d53e94914e14cad613a9766aa3e51bfcece84ec0c4dd752c0d124cb76cc2240f9460f809c5bbbab958522c795e94026c8d4206ef SHA512 09a3a6687c80d7ec7e97ebd4c679e4d162729232d77966352c2f7ddd45594d79039ff33a93592889137605412b18b7868ea19ba4f4d162a5912a3978b3d67dd2 diff --git a/sdk_container/src/third_party/portage-stable/app-arch/gzip/files/gzip-1.3.8-install-symlinks.patch b/sdk_container/src/third_party/portage-stable/app-arch/gzip/files/gzip-1.3.8-install-symlinks.patch new file mode 100644 index 0000000000..6f04b42c76 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/gzip/files/gzip-1.3.8-install-symlinks.patch @@ -0,0 +1,11 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -926,7 +926,7 @@ + rm -f "$$dest" && \ + case $@ in \ + install-exec-hook) \ +- ln "$$source" "$$dest" || $(LN_S) "$$source" "$$dest";; \ ++ $(LN_S) "$$source" "$$dest";; \ + esac \ + ) || exit; \ + done; \ diff --git a/sdk_container/src/third_party/portage-stable/app-arch/gzip/gzip-1.12-r4.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/gzip/gzip-1.12-r4.ebuild new file mode 100644 index 0000000000..acc085235b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/gzip/gzip-1.12-r4.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/gzip.asc +inherit flag-o-matic verify-sig + +DESCRIPTION="Standard GNU compressor" +HOMEPAGE="https://www.gnu.org/software/gzip/" +SRC_URI="mirror://gnu/gzip/${P}.tar.xz + https://alpha.gnu.org/gnu/gzip/${P}.tar.xz" +SRC_URI+=" verify-sig? ( + mirror://gnu/gzip/${P}.tar.xz.sig + https://alpha.gnu.org/gnu/gzip/${P}.tar.xz.sig + )" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="pic static" + +BDEPEND="verify-sig? ( sec-keys/openpgp-keys-gzip )" +RDEPEND="!app-arch/pigz[symlink(-)]" +PDEPEND=" + app-alternatives/gzip +" + +PATCHES=( + "${FILESDIR}/${PN}-1.3.8-install-symlinks.patch" +) + +src_configure() { + use static && append-flags -static + + # Avoid text relocation in gzip + use pic && export DEFS="NO_ASM" + + # bug #663928 + econf --disable-gcc-warnings +} + +src_install() { + default + + docinto txt + dodoc algorithm.doc gzip.doc + + # Avoid conflict with app-arch/ncompress + rm "${ED}"/usr/bin/uncompress || die + + # keep most things in /usr, just the fun stuff in / + # also rename them to avoid conflict with app-alternatives/gzip + dodir /bin + local x + for x in gunzip gzip zcat; do + mv "${ED}/usr/bin/${x}" "${ED}/bin/${x}-reference" || die + done + mv "${ED}"/usr/share/man/man1/gzip{,-reference}.1 || die + rm "${ED}"/usr/share/man/man1/{gunzip,zcat}.1 || die +} + +pkg_postinst() { + if [[ -n ${REPLACING_VERSIONS} ]]; then + local ver + for ver in ${REPLACING_VERSIONS}; do + if ver_test "${ver}" -lt "1.12-r2"; then + ewarn "This package no longer installs 'uncompress'." + ewarn "Please use 'gzip -d' to decompress .Z files." + fi + done + fi + + # ensure to preserve the symlinks before app-alternatives/gzip + # is installed + local x + for x in gunzip gzip zcat; do + if [[ ! -h ${EROOT}/bin/${x} ]]; then + ln -s "${x}-reference" "${EROOT}/bin/${x}" || die + fi + done +} diff --git a/sdk_container/src/third_party/portage-stable/app-arch/gzip/gzip-1.12_p20221228-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/gzip/gzip-1.12_p20221228-r1.ebuild new file mode 100644 index 0000000000..23e799f74e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/gzip/gzip-1.12_p20221228-r1.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/gzip.asc +inherit flag-o-matic verify-sig + +DESCRIPTION="Standard GNU compressor" +HOMEPAGE="https://www.gnu.org/software/gzip/" +if [[ ${PV} == *_p* ]] ; then + # Note: could put this in devspace, but if it's gone, we don't want + # it in tree anyway. It's just for testing. + MY_SNAPSHOT="$(ver_cut 1-2).31-7553" + SRC_URI=" + https://meyering.net/gzip/gzip-${MY_SNAPSHOT}.tar.xz -> ${P}.tar.xz + verify-sig? ( + https://meyering.net/gzip/gzip-${MY_SNAPSHOT}.tar.xz.sig -> ${P}.tar.xz.sig + ) + " + S="${WORKDIR}"/${PN}-${MY_SNAPSHOT} +else + SRC_URI=" + mirror://gnu/gzip/${P}.tar.xz + verify-sig? ( + mirror://gnu/gzip/${P}.tar.xz.sig + ) + " +fi + +LICENSE="GPL-3+" +SLOT="0" +if [[ ${PV} != *_p* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi +IUSE="pic static" + +BDEPEND="verify-sig? ( sec-keys/openpgp-keys-gzip )" +RDEPEND="!app-arch/pigz[symlink(-)]" +PDEPEND=" + app-alternatives/gzip +" + +PATCHES=( + "${FILESDIR}/${PN}-1.3.8-install-symlinks.patch" +) + +src_configure() { + use static && append-flags -static + + # Avoid text relocation in gzip + use pic && export DEFS="NO_ASM" + + # bug #663928 + econf --disable-gcc-warnings +} + +src_install() { + default + + docinto txt + dodoc algorithm.doc gzip.doc + + # Avoid conflict with app-arch/ncompress + rm "${ED}"/usr/bin/uncompress || die + + # keep most things in /usr, just the fun stuff in / + # also rename them to avoid conflict with app-alternatives/gzip + dodir /bin + local x + for x in gunzip gzip zcat; do + mv "${ED}/usr/bin/${x}" "${ED}/bin/${x}-reference" || die + done + mv "${ED}"/usr/share/man/man1/gzip{,-reference}.1 || die + rm "${ED}"/usr/share/man/man1/{gunzip,zcat}.1 || die +} + +pkg_postinst() { + if [[ -n ${REPLACING_VERSIONS} ]]; then + local ver + for ver in ${REPLACING_VERSIONS}; do + if ver_test "${ver}" -lt "1.12-r2"; then + ewarn "This package no longer installs 'uncompress'." + ewarn "Please use 'gzip -d' to decompress .Z files." + fi + done + fi + + # ensure to preserve the symlinks before app-alternatives/gzip + # is installed + local x + for x in gunzip gzip zcat; do + if [[ ! -h ${EROOT}/bin/${x} ]]; then + ln -s "${x}-reference" "${EROOT}/bin/${x}" || die + fi + done +} diff --git a/sdk_container/src/third_party/portage-stable/app-arch/gzip/metadata.xml b/sdk_container/src/third_party/portage-stable/app-arch/gzip/metadata.xml new file mode 100644 index 0000000000..32eb6dd3de --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/gzip/metadata.xml @@ -0,0 +1,14 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + cpe:/a:gnu:gzip + + +disable optimized assembly code that is not PIC friendly + + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/Manifest b/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/Manifest new file mode 100644 index 0000000000..37602fe72c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/Manifest @@ -0,0 +1 @@ +DIST lbzip2-2.5_p20181227.tar.gz 704920 BLAKE2B e5da0091c0e4fb73724c5ea472d757d76356cffbf1fc679bf4ee05e25690b7712dceaf17f355383bfd4eb525c4aea04c2e5312592df5bb99159e000769bcee2e SHA512 53b29721a106d280927f2c18f33247645bb7fb3e67d835885d73e037910bf02e473f1210d848df41a387be30f829213d98ac9387b2a9201b94d12117809fbcf5 diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/files/lbzip2-2.3-s_isreg.patch b/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/files/lbzip2-2.3-s_isreg.patch new file mode 100644 index 0000000000..6f4954102f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/files/lbzip2-2.3-s_isreg.patch @@ -0,0 +1,16 @@ + src/main.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/main.c b/src/main.c +index f030fd5..5f8290e 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -702,7 +702,7 @@ input_init(const struct arg *operand, struct stat *sbuf) + return -1; + } + +- if (OM_REGF == outmode && !S_ISREG(sbuf->st_mode)) { ++ if (!decompress && OM_REGF == outmode && !S_ISREG(sbuf->st_mode)) { + warn("skipping \"%s\": not a regular file", operand->val); + return -1; + } diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/files/lbzip2-2.5_p20181227-clang16.patch b/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/files/lbzip2-2.5_p20181227-clang16.patch new file mode 100644 index 0000000000..7342b19cd0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/files/lbzip2-2.5_p20181227-clang16.patch @@ -0,0 +1,27 @@ +https://github.com/kjn/lbzip2/pull/33 + +From 32b5167940ec817e454431956040734af405a9de Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Thu, 5 Jan 2023 18:02:26 +0100 +Subject: [PATCH] Define the GNULIB_XALLOC_DIE macro + +This avoids an implicit function declaration when building gnulib's +xmalloc.c, addressing a build failure with future compiler version. + +Solution proposed by Bruno Haible here: + + Re: xmalloc calling undeclared xalloc_die function + +--- a/configure.ac ++++ b/configure.ac +@@ -31,6 +31,9 @@ AC_PROG_LN_S + AC_PROG_RANLIB + AC_PROG_CC_C89 + ++AC_DEFINE(GNULIB_XALLOC_DIE, 1, ++ [This package is providing its own definition of the xalloc_die function.]) ++ + gl_ASSERT_NO_GNULIB_TESTS + gl_ASSERT_NO_GNULIB_POSIXCHECK + gl_EARLY + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/files/lbzip2-2.5_p20181227-fix-unaligned.patch b/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/files/lbzip2-2.5_p20181227-fix-unaligned.patch new file mode 100644 index 0000000000..c23d1afc4c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/files/lbzip2-2.5_p20181227-fix-unaligned.patch @@ -0,0 +1,33 @@ +https://github.com/kjn/lbzip2/pull/25 + +From d570020ade2add591b97e61927545a005a2d4a6f Mon Sep 17 00:00:00 2001 +From: Matt Turner +Date: Wed, 7 Aug 2019 11:47:04 -0700 +Subject: [PATCH] Align zero-length array to avoid unaligned accesses + +When make_tree() creates the left-justified base table (uint64_t *B) +it does so with 64-bit stores: + + B[k] = sofar; + +But B points to memory in the zero-length array "uint32_t tt[0]" at the +end of struct decoder_state. Since tt's type is uint32_t, it is only +aligned to a four byte boundary, and so the 64-bit store in make_tree() +causes an unaligned trap on strict platforms like sparc. +--- + src/decode.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/decode.h b/src/decode.h +index c9a9086..7c0ca3f 100644 +--- a/src/decode.h ++++ b/src/decode.h +@@ -62,7 +62,7 @@ struct decoder_state { + uint8_t rle_char; /* current character */ + uint8_t rle_prev; /* prevoius character */ + +- uint32_t tt[0]; ++ uint32_t tt[0] __attribute__((aligned (8))); + }; + + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/lbzip2-2.5_p20181227-r2.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/lbzip2-2.5_p20181227-r2.ebuild new file mode 100644 index 0000000000..4272c9ad02 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/lbzip2-2.5_p20181227-r2.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic + +DESCRIPTION="Parallel bzip2 utility" +HOMEPAGE="https://github.com/kjn/lbzip2/" +SRC_URI="https://dev.gentoo.org/~whissi/dist/${PN}/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" +IUSE="debug static" + +PATCHES=( + "${FILESDIR}"/${PN}-2.3-s_isreg.patch + "${FILESDIR}"/${P}-fix-unaligned.patch + "${FILESDIR}"/${P}-clang16.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + use static && append-ldflags -static + + local myeconfargs=( + $(use_enable debug tracing) + ) + econf "${myeconfargs[@]}" +} diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/metadata.xml b/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/metadata.xml new file mode 100644 index 0000000000..b755b171f2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/lbzip2/metadata.xml @@ -0,0 +1,16 @@ + + + + + mattst88@gentoo.org + Matt Turner + + + A multi-threaded bzip2/bunzip2 utility that employs multiple threads and an + input-bound splitter even when decompressing .bz2 files created by standard + bzip2 + + + kjn/lbzip2 + + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/libarchive/Manifest b/sdk_container/src/third_party/portage-stable/app-arch/libarchive/Manifest new file mode 100644 index 0000000000..53eb2e77ad --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/libarchive/Manifest @@ -0,0 +1,4 @@ +DIST libarchive-3.6.1.tar.xz 5241148 BLAKE2B e7b79e97545dabeac164069e87adbd2081d3bd75c22f80b3797c6e487a477b3f6347b6fc14c76668eb69f2f2e5dcdd5a33a694e0a292ce426b8d0d93435218cf SHA512 2e5a72edc468080c0e8f29e07d9c33826ffb246fa040ec42399bedeecf698b7555f69ffd15057ad79c0f50cd4926d43174599d99632b1b99ec6cd159c43a70b8 +DIST libarchive-3.6.1.tar.xz.asc 833 BLAKE2B 8a1ca13491f3b29b322ab281a80eaef9ca2cca680e18a0ed5ff626e8808b6c9a5eb4cdd6eaf00fb771f361d84d7785c103a9a0665d812f1f27ac66f5d1a2e1da SHA512 0411a9bdc9bb058b289b5cc102a220216420bf01ea213e771a16246ed48e670f3426e8555bac27262b686b40b7b2239907c4eef2bf43d812d73a69ccb2a5b00c +DIST libarchive-3.6.2.tar.xz 5213196 BLAKE2B 355b5d402e352dee802513485ce7e047af58d6de5b9bf6a49f3fd8d7b94117007598820ac979585c0da79747e8b63b70ab151131182368a11f97a047cf9029d4 SHA512 a12bb6839e13a0be1099f42c650fc90fbfe62d32ce38bcbb4794206d29b2c782ae1115124d0e5f6b9716514213af32b05e4a42eb196447674a5f9a2a32bee043 +DIST libarchive-3.6.2.tar.xz.asc 659 BLAKE2B a4b0035ab2bda4129cdf0c99266cd1e5f4772d90de6e348c75958bc803f369d6abea85d9730c6c9a216466b35697faad8d265fb2c285545887eafde27d828887 SHA512 403e5f7dec14d8b1cc01fad5a249e7b7618a7b45bcb3361ea80d67d76b591b12ce97f2c88b23d5486505dd3b34c1f1643e02235a3e5fc5150ee5735946092efe diff --git a/sdk_container/src/third_party/portage-stable/app-arch/libarchive/files/libarchive-3.6.1-CVE-2022-36227.patch b/sdk_container/src/third_party/portage-stable/app-arch/libarchive/files/libarchive-3.6.1-CVE-2022-36227.patch new file mode 100644 index 0000000000..da71a196b8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/libarchive/files/libarchive-3.6.1-CVE-2022-36227.patch @@ -0,0 +1,35 @@ +From bff38efe8c110469c5080d387bec62a6ca15b1a5 Mon Sep 17 00:00:00 2001 +From: obiwac +Date: Fri, 22 Jul 2022 22:41:10 +0200 +Subject: [PATCH] libarchive: Handle a `calloc` returning NULL (fixes #1754) + +--- + libarchive/archive_write.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/libarchive/archive_write.c b/libarchive/archive_write.c +index 66592e826..27626b541 100644 +--- a/libarchive/archive_write.c ++++ b/libarchive/archive_write.c +@@ -201,6 +201,10 @@ __archive_write_allocate_filter(struct archive *_a) + struct archive_write_filter *f; + + f = calloc(1, sizeof(*f)); ++ ++ if (f == NULL) ++ return (NULL); ++ + f->archive = _a; + f->state = ARCHIVE_WRITE_FILTER_STATE_NEW; + if (a->filter_first == NULL) +@@ -548,6 +552,10 @@ archive_write_open2(struct archive *_a, void *client_data, + a->client_data = client_data; + + client_filter = __archive_write_allocate_filter(_a); ++ ++ if (client_filter == NULL) ++ return (ARCHIVE_FATAL); ++ + client_filter->open = archive_write_client_open; + client_filter->write = archive_write_client_write; + client_filter->close = archive_write_client_close; diff --git a/sdk_container/src/third_party/portage-stable/app-arch/libarchive/files/libarchive-3.6.1-glibc-2.36.patch b/sdk_container/src/third_party/portage-stable/app-arch/libarchive/files/libarchive-3.6.1-glibc-2.36.patch new file mode 100644 index 0000000000..e45d891e2a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/libarchive/files/libarchive-3.6.1-glibc-2.36.patch @@ -0,0 +1,39 @@ +https://github.com/libarchive/libarchive/pull/1761 +https://bugs.gentoo.org/863227 + +From a2f68263a1da5ad227bcb9cd8fa91b93c8b6c99f Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 25 Jul 2022 10:56:53 -0700 +Subject: [PATCH] libarchive: Do not include sys/mount.h when linux/fs.h is + present + +These headers are in conflict and only one is needed by +archive_read_disk_posix.c therefore include linux/fs.h if it exists +otherwise include sys/mount.h + +It also helps compiling with glibc 2.36 +where sys/mount.h conflicts with linux/mount.h see [1] + +[1] https://sourceware.org/glibc/wiki/Release/2.36 +--- a/libarchive/archive_read_disk_posix.c ++++ b/libarchive/archive_read_disk_posix.c +@@ -34,9 +34,6 @@ __FBSDID("$FreeBSD$"); + #ifdef HAVE_SYS_PARAM_H + #include + #endif +-#ifdef HAVE_SYS_MOUNT_H +-#include +-#endif + #ifdef HAVE_SYS_STAT_H + #include + #endif +@@ -54,6 +51,8 @@ __FBSDID("$FreeBSD$"); + #endif + #ifdef HAVE_LINUX_FS_H + #include ++#elif HAVE_SYS_MOUNT_H ++#include + #endif + /* + * Some Linux distributions have both linux/ext2_fs.h and ext2fs/ext2_fs.h. + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/libarchive/libarchive-3.6.1-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/libarchive/libarchive-3.6.1-r1.ebuild new file mode 100644 index 0000000000..98013595c2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/libarchive/libarchive-3.6.1-r1.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit multilib-minimal toolchain-funcs verify-sig + +DESCRIPTION="Multi-format archive and compression library" +HOMEPAGE="https://www.libarchive.org/" +SRC_URI=" + https://www.libarchive.de/downloads/${P}.tar.xz + verify-sig? ( https://www.libarchive.de/downloads/${P}.tar.xz.asc ) +" + +LICENSE="BSD BSD-2 BSD-4 public-domain" +SLOT="0/13" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="acl blake2 +bzip2 +e2fsprogs expat +iconv lz4 +lzma lzo nettle static-libs xattr zstd" +VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/libarchive.org.asc + +RDEPEND=" + sys-libs/zlib[${MULTILIB_USEDEP}] + acl? ( virtual/acl[${MULTILIB_USEDEP}] ) + blake2? ( app-crypt/libb2[${MULTILIB_USEDEP}] ) + bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] ) + expat? ( dev-libs/expat[${MULTILIB_USEDEP}] ) + !expat? ( dev-libs/libxml2[${MULTILIB_USEDEP}] ) + iconv? ( virtual/libiconv[${MULTILIB_USEDEP}] ) + kernel_linux? ( + xattr? ( sys-apps/attr[${MULTILIB_USEDEP}] ) + ) + dev-libs/openssl:0=[${MULTILIB_USEDEP}] + lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] ) + lzma? ( >=app-arch/xz-utils-5.2.5-r1[${MULTILIB_USEDEP}] ) + lzo? ( >=dev-libs/lzo-2[${MULTILIB_USEDEP}] ) + nettle? ( dev-libs/nettle:0=[${MULTILIB_USEDEP}] ) + zstd? ( app-arch/zstd[${MULTILIB_USEDEP}] ) +" +DEPEND="${RDEPEND} + kernel_linux? ( + virtual/os-headers + e2fsprogs? ( sys-fs/e2fsprogs[${MULTILIB_USEDEP}] ) + ) +" +BDEPEND=" + verify-sig? ( + + + + mgorny@gentoo.org + Michał Górny + + + C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats. + + + + Enable Blake2 hash support via app-crypt/libb2. + + + Allow accessing bzip2-compressed archives through libbz2 (which + comes with app-arch/bzip2). This only affects + libarchive's native support: bsdtar will keep using bunzip2 as a + filter if that's not built-in. + + + Use file flags from sys-fs/e2fsprogs headers instead of virtual/os-headers headers + + + Use dev-libs/nettle as crypto backend + + + + cpe:/a:libarchive:libarchive + libarchive/libarchive + https://github.com/libarchive/libarchive/issues + + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lz4/Manifest b/sdk_container/src/third_party/portage-stable/app-arch/lz4/Manifest new file mode 100644 index 0000000000..c60a5c0d8d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/lz4/Manifest @@ -0,0 +1 @@ +DIST lz4-1.9.3.tar.gz 320958 BLAKE2B 9a194bd18ff52f780aa03a8a53fe7fab7b58117d768f4ba8e5005830c935d16328d0f7cc54f9413b58faf245017c0ac85fb4e709a9db150cb150a0a2a3c21645 SHA512 c246b0bda881ee9399fa1be490fa39f43b291bb1d9db72dba8a85db1a50aad416a97e9b300eee3d2a4203c2bd88bda2762e81bc229c3aa409ad217eb306a454c diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lz4/files/lz4-1.9.3-negative-memmove.patch b/sdk_container/src/third_party/portage-stable/app-arch/lz4/files/lz4-1.9.3-negative-memmove.patch new file mode 100644 index 0000000000..053958dfe8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/lz4/files/lz4-1.9.3-negative-memmove.patch @@ -0,0 +1,22 @@ +From 8301a21773ef61656225e264f4f06ae14462bca7 Mon Sep 17 00:00:00 2001 +From: Jasper Lievisse Adriaanse +Date: Fri, 26 Feb 2021 15:21:20 +0100 +Subject: [PATCH] Fix potential memory corruption with negative memmove() size + +--- + lib/lz4.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/lz4.c b/lib/lz4.c +index 5f524d01d..c2f504ef3 100644 +--- a/lib/lz4.c ++++ b/lib/lz4.c +@@ -1749,7 +1749,7 @@ LZ4_decompress_generic( + const size_t dictSize /* note : = 0 if noDict */ + ) + { +- if (src == NULL) { return -1; } ++ if ((src == NULL) || (outputSize < 0)) { return -1; } + + { const BYTE* ip = (const BYTE*) src; + const BYTE* const iend = ip + srcSize; diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lz4/lz4-1.9.3-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/lz4/lz4-1.9.3-r1.ebuild new file mode 100644 index 0000000000..2282b90c9b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/lz4/lz4-1.9.3-r1.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +CMAKE_ECLASS=cmake +inherit cmake-multilib + +DESCRIPTION="Extremely Fast Compression algorithm" +HOMEPAGE="https://github.com/lz4/lz4" +SRC_URI="https://github.com/lz4/lz4/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD-2 GPL-2" +# https://abi-laboratory.pro/tracker/timeline/lz4/ +SLOT="0/r132" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="static-libs" + +CMAKE_USE_DIR=${S}/build/cmake + +PATCHES=( + "${FILESDIR}"/${P}-negative-memmove.patch +) + +multilib_src_configure() { + local mycmakeargs=( + -DBUILD_STATIC_LIBS=$(usex static-libs) + ) + + cmake_src_configure +} diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lz4/metadata.xml b/sdk_container/src/third_party/portage-stable/app-arch/lz4/metadata.xml new file mode 100644 index 0000000000..26e7c6e193 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/lz4/metadata.xml @@ -0,0 +1,16 @@ + + + + + mgorny@gentoo.org + Michał Górny + + + amadio@gentoo.org + Guilherme Amadio + + + lz4/lz4 + cpe:/a:lz4_project:lz4 + + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lzop/Manifest b/sdk_container/src/third_party/portage-stable/app-arch/lzop/Manifest new file mode 100644 index 0000000000..f21b8f488a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/lzop/Manifest @@ -0,0 +1 @@ +DIST lzop-1.04.tar.gz 393483 BLAKE2B ebeceac9492ce45e6976cd5cde262d9755286e1649802e3e16bfae0abdd74714bf86b076816aa309542cadef5bb65971342208763e1b2761fce2332dc9daa38c SHA512 5829b4495ffefab549aa697a05c536ce593c572c9eee6004460583a0090abcd317c6074c4f981dfee6be61ac8d127f02dd37053b6cb782af64db41586a8bbb6e diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lzop/lzop-1.04.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/lzop/lzop-1.04.ebuild new file mode 100644 index 0000000000..61d2ad39de --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/lzop/lzop-1.04.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +DESCRIPTION="Utility for fast (even real-time) compression/decompression" +HOMEPAGE="https://www.lzop.org/" +SRC_URI="https://www.lzop.org/download/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris" +IUSE="" + +RDEPEND=">=dev-libs/lzo-2" +DEPEND="${RDEPEND}" + +src_test() { + einfo "compressing config.status to test" + src/lzop config.status || die 'compression failed' + ls -la config.status{,.lzo} + src/lzop -t config.status.lzo || die 'lzo test failed' + src/lzop -dc config.status.lzo | diff config.status - || die 'decompression generated differences from original' +} + +src_install() { + # do not install COPYING or redundant conversions of manpage + emake DESTDIR="${D}" install \ + dist_doc_DATA="AUTHORS NEWS README THANKS" +} diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lzop/metadata.xml b/sdk_container/src/third_party/portage-stable/app-arch/lzop/metadata.xml new file mode 100644 index 0000000000..076793e3f5 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/lzop/metadata.xml @@ -0,0 +1,8 @@ + + + + + mgorny@gentoo.org + Michał Górny + + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/ncompress/Manifest b/sdk_container/src/third_party/portage-stable/app-arch/ncompress/Manifest new file mode 100644 index 0000000000..520e87a459 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/ncompress/Manifest @@ -0,0 +1 @@ +DIST ncompress-5.0.tar.gz 34185 BLAKE2B 7b296bd00024bfb483d3261ff8aa6e47a6be8c62b445c3d456d702b69fbc2a7b731326f7ea91aa331ba8e8a27936f4318b3e252cc978b6bf3198e8812988913f SHA512 5bc886f98f25b03d034e8d8ebb0ee9388d727ee3e0c6d8a906698b2f8fa5c930f55d857486244b7f40447c7b74f3c620626600db619d0c6d6fd434f52912be42 diff --git a/sdk_container/src/third_party/portage-stable/app-arch/ncompress/metadata.xml b/sdk_container/src/third_party/portage-stable/app-arch/ncompress/metadata.xml new file mode 100644 index 0000000000..f8e16dcb54 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/ncompress/metadata.xml @@ -0,0 +1,12 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + ncompress + vapier/ncompress + + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/ncompress/ncompress-5.0-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/ncompress/ncompress-5.0-r1.ebuild new file mode 100644 index 0000000000..2b3cfe6191 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/ncompress/ncompress-5.0-r1.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit toolchain-funcs + +DESCRIPTION="Classic compress & uncompress programs for .Z (LZW) files" +HOMEPAGE="https://vapier.github.io/ncompress/" +SRC_URI="https://github.com/vapier/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris" +IUSE="" + +src_prepare() { + default + # First sed expression replaces hardlinking with + # symlinking. Second sed expression fixes the symlink target + # to use relative path to a file in the same directory as the + # symlink (so point to compress instead of + # $(DESTDIR)$(BINDIR)/compress). + sed -i \ + -e 's:\bln :ln -s :' \ + -e 's:\(\bln [^$]*\)\$(DESTDIR)\$(BINDIR)/:\1:' \ + Makefile.def || die +} + +src_configure() { + tc-export CC +} + +src_install() { + emake install_core DESTDIR="${ED}" PREFIX="/usr" + dodoc Acknowleds Changes LZW.INFO README.md +} diff --git a/sdk_container/src/third_party/portage-stable/app-arch/ncompress/ncompress-5.0.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/ncompress/ncompress-5.0.ebuild new file mode 100644 index 0000000000..dacdcbd8a7 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/ncompress/ncompress-5.0.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit toolchain-funcs + +DESCRIPTION="Classic compress & uncompress programs for .Z (LZW) files" +HOMEPAGE="https://vapier.github.io/ncompress/" +SRC_URI="https://github.com/vapier/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris" +IUSE="" + +src_prepare() { + default + sed -i 's:\bln :ln -s :' Makefile.def || die +} + +src_configure() { + tc-export CC +} + +src_install() { + emake install_core DESTDIR="${ED}" PREFIX="/usr" + dodoc Acknowleds Changes LZW.INFO README.md +} diff --git a/sdk_container/src/third_party/portage-stable/app-arch/pbzip2/Manifest b/sdk_container/src/third_party/portage-stable/app-arch/pbzip2/Manifest new file mode 100644 index 0000000000..c66c7c13c0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/pbzip2/Manifest @@ -0,0 +1 @@ +DIST pbzip2-1.1.13.tar.gz 48015 BLAKE2B 1bb410acadc728963c3a04d2665fb1b1f0c206a893ed90352a9c16512e9bd5f82c3f5f3b383b382134bbe904735a1c8a81615a8bc54de8c6bc91633d9ce72c57 SHA512 a150e476a85b2ae71c244561380f8f113072ef712173afaa0bdace5845d5f81a15b135258cb01376156b69a5085b02b7ab866cfab5713aa773b251b203c087b8 diff --git a/sdk_container/src/third_party/portage-stable/app-arch/pbzip2/files/pbzip2-1.1.10-makefile.patch b/sdk_container/src/third_party/portage-stable/app-arch/pbzip2/files/pbzip2-1.1.10-makefile.patch new file mode 100644 index 0000000000..6524b6bf2a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/pbzip2/files/pbzip2-1.1.10-makefile.patch @@ -0,0 +1,20 @@ +--- pbzip2-1.1.10/Makefile ++++ pbzip2-1.1.10/Makefile +@@ -17,7 +17,7 @@ + + + # Optimization flags +-CXXFLAGS = -O2 ++#CXXFLAGS = -O2 + + #CXXFLAGS += -g -Wall + #CXXFLAGS += -ansi +@@ -50,7 +50,7 @@ + + + # Linker flags +-LDFLAGS = ++#LDFLAGS = + + + # External libraries diff --git a/sdk_container/src/third_party/portage-stable/app-arch/pbzip2/metadata.xml b/sdk_container/src/third_party/portage-stable/app-arch/pbzip2/metadata.xml new file mode 100644 index 0000000000..58c362b73a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/pbzip2/metadata.xml @@ -0,0 +1,8 @@ + + + + + + pbzip2 + + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/pbzip2/pbzip2-1.1.13.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/pbzip2/pbzip2-1.1.13.ebuild new file mode 100644 index 0000000000..45b38f64b9 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/pbzip2/pbzip2-1.1.13.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Parallel bzip2 (de)compressor using libbz2" +HOMEPAGE="http://compression.ca/pbzip2/ https://launchpad.net/pbzip2" +SRC_URI="https://launchpad.net/pbzip2/${PV:0:3}/${PV}/+download/${P}.tar.gz" + +LICENSE="BZIP2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="static" + +LIB_DEPEND="app-arch/bzip2[static-libs(+)]" +RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )" +DEPEND="${RDEPEND} + static? ( ${LIB_DEPEND} )" + +PATCHES=( + "${FILESDIR}"/${PN}-1.1.10-makefile.patch +) + +src_prepare() { + default + # https://bugs.launchpad.net/pbzip2/+bug/1746369 + sed -i 's:"PRIuMAX":" PRIuMAX ":g' *.cpp || die +} + +src_configure() { + tc-export CXX + use static && append-ldflags -static +} + +src_install() { + emake DESTDIR="${ED}" install + dodoc AUTHORS ChangeLog README +} diff --git a/sdk_container/src/third_party/portage-stable/app-arch/pigz/Manifest b/sdk_container/src/third_party/portage-stable/app-arch/pigz/Manifest new file mode 100644 index 0000000000..785c14e4cc --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/pigz/Manifest @@ -0,0 +1 @@ +DIST pigz-2.7.tar.gz 108102 BLAKE2B d391522fd6f8eb6918d671fb1c9517034941f3ae8e05ffcd7bece141e6dae110cde1560bad02bd2bcca2f868cdba2a8a16b5606ad6637d40d5ced5ec9bfffcc8 SHA512 9f9f61de4a0307fc057dc4e31a98bd8d706d9e709ecde0be02a871534fddf6a1fe1321158aa72708603aaaece43f83d2423b127f7689b6219b23aea4f989e8f5 diff --git a/sdk_container/src/third_party/portage-stable/app-arch/pigz/files/pigz-2.7-memcpy-ub.patch b/sdk_container/src/third_party/portage-stable/app-arch/pigz/files/pigz-2.7-memcpy-ub.patch new file mode 100644 index 0000000000..db53660748 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/pigz/files/pigz-2.7-memcpy-ub.patch @@ -0,0 +1,26 @@ +https://github.com/madler/pigz/commit/e1ed230a1599a3cb64c8f5c003cced60e10e3314 +https://github.com/madler/pigz/issues/107 + +From e1ed230a1599a3cb64c8f5c003cced60e10e3314 Mon Sep 17 00:00:00 2001 +From: Mark Adler +Date: Sat, 31 Dec 2022 21:28:26 -0800 +Subject: [PATCH] Avoid calling memcpy() with a NULL pointer. + +This is not permitted by the C99 standard even when the length is +zero. Go figure. +--- a/pigz.c ++++ b/pigz.c +@@ -3414,8 +3414,10 @@ local int outb(void *desc, unsigned char *buf, unsigned len) { + + // copy the output and alert the worker bees + out_len = len; +- g.out_tot += len; +- memcpy(out_copy, buf, len); ++ if (len) { ++ g.out_tot += len; ++ memcpy(out_copy, buf, len); ++ } + twist(outb_write_more, TO, 1); + twist(outb_check_more, TO, 1); + + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/pigz/metadata.xml b/sdk_container/src/third_party/portage-stable/app-arch/pigz/metadata.xml new file mode 100644 index 0000000000..2a434f0824 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/pigz/metadata.xml @@ -0,0 +1,17 @@ + + + + + gyakovlev@gentoo.org + Georgy Yakovlev + + + pigz, which stands for parallel implementation of gzip, + is a fully functional replacement for gzip that exploits + multiple processors and multiple cores to the hilt when compressing data. + + + cpe:/a:zlib:pigz + madler/pigz + + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/pigz/pigz-2.7-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/pigz/pigz-2.7-r1.ebuild new file mode 100644 index 0000000000..f0a9d1f454 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/pigz/pigz-2.7-r1.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs flag-o-matic + +DESCRIPTION="A parallel implementation of gzip" +HOMEPAGE="https://www.zlib.net/pigz/" +SRC_URI="https://www.zlib.net/pigz/${P}.tar.gz" + +LICENSE="ZLIB" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~ppc-macos ~sparc64-solaris" +IUSE="static test" +RESTRICT="!test? ( test )" + +LIB_DEPEND="sys-libs/zlib[static-libs(+)]" +RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )" +DEPEND="${RDEPEND} + static? ( ${LIB_DEPEND} ) + test? ( app-arch/ncompress )" + +PATCHES=( + "${FILESDIR}"/${P}-memcpy-ub.patch +) + +src_compile() { + use static && append-ldflags -static + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" +} + +src_install() { + dobin ${PN} + dosym ${PN} /usr/bin/un${PN} + dodoc README + doman ${PN}.1 +} diff --git a/sdk_container/src/third_party/portage-stable/app-arch/pigz/pigz-2.7.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/pigz/pigz-2.7.ebuild new file mode 100644 index 0000000000..7fed310a03 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/pigz/pigz-2.7.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs flag-o-matic + +DESCRIPTION="A parallel implementation of gzip" +HOMEPAGE="https://www.zlib.net/pigz/" +SRC_URI="https://www.zlib.net/pigz/${P}.tar.gz" + +LICENSE="ZLIB" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~ppc-macos ~sparc64-solaris" +IUSE="static test" +RESTRICT="!test? ( test )" + +LIB_DEPEND="sys-libs/zlib[static-libs(+)]" +RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )" +DEPEND="${RDEPEND} + static? ( ${LIB_DEPEND} ) + test? ( app-arch/ncompress )" + +src_compile() { + use static && append-ldflags -static + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" +} + +src_install() { + dobin ${PN} + dosym ${PN} /usr/bin/un${PN} + dodoc README + doman ${PN}.1 +} diff --git a/sdk_container/src/third_party/portage-stable/app-arch/rpm2targz/Manifest b/sdk_container/src/third_party/portage-stable/app-arch/rpm2targz/Manifest new file mode 100644 index 0000000000..e187af5582 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/rpm2targz/Manifest @@ -0,0 +1 @@ +DIST rpm2targz-2021.03.16.tar.xz 6500 BLAKE2B fac1122fbfcab2b982ea6f5369b95b30814d438d0f853d846ef62a33ceaaf81d44b2a743bc20a3ef46defb63331bff06f9a268a5a805ecd899b11f86ec414bc2 SHA512 efd677642fbf73d4b8c90f338eea20452052f2bdc2b7a3a61c0e9215676575b5063aad733ec3ea4840baf281eb332db8f6fdeef600cc8a8aa7e208f2fa8ee599 diff --git a/sdk_container/src/third_party/portage-stable/app-arch/rpm2targz/metadata.xml b/sdk_container/src/third_party/portage-stable/app-arch/rpm2targz/metadata.xml new file mode 100644 index 0000000000..73dda144f9 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/rpm2targz/metadata.xml @@ -0,0 +1,8 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/rpm2targz/rpm2targz-2021.03.16.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/rpm2targz/rpm2targz-2021.03.16.ebuild new file mode 100644 index 0000000000..492f3b4e47 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/rpm2targz/rpm2targz-2021.03.16.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit toolchain-funcs + +DESCRIPTION="Convert a .rpm file to a .tar.gz archive" +HOMEPAGE="http://www.slackware.com/config/packages.php" +SRC_URI="mirror://gentoo/${P}.tar.xz + https://dev.gentoo.org/~vapier/dist/${P}.tar.xz" + +LICENSE="BSD-1" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +DEPEND="" +RDEPEND="app-arch/cpio" + +src_configure() { + tc-export CC +} + +src_install() { + emake DESTDIR="${D}" prefix="${EPREFIX}"/usr install + einstalldocs +} diff --git a/sdk_container/src/third_party/portage-stable/app-arch/sharutils/Manifest b/sdk_container/src/third_party/portage-stable/app-arch/sharutils/Manifest new file mode 100644 index 0000000000..b2a75220aa --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/sharutils/Manifest @@ -0,0 +1 @@ +DIST sharutils-4.15.2.tar.xz 1122476 BLAKE2B e2acae027679ebdf723ecae6f243608f501f5c24685a19223dd27580ccf76bc7d38905a9d202b30cf2633e5580d727821398f1162b170233f03c17f3da683917 SHA512 80d0b804a0617e11e5c23dc0d59b218bbf93e40aaf5e9a5401a18ef9cb700390aab711e2b2e2f26c8fd5b8ef99a91d3405e01d02cadabcba7639979314e59f8d diff --git a/sdk_container/src/third_party/portage-stable/app-arch/sharutils/files/sharutils-4.15.2-CVE-2018-1000097.patch b/sdk_container/src/third_party/portage-stable/app-arch/sharutils/files/sharutils-4.15.2-CVE-2018-1000097.patch new file mode 100644 index 0000000000..f61662040b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/sharutils/files/sharutils-4.15.2-CVE-2018-1000097.patch @@ -0,0 +1,16 @@ +From: Petr Pisar +Subject: Fix CVE-2018-1000097, heap buffer overflow in unshar +Bug-Debian: https://bugs.debian.org/893525 +X-Debian-version: 1:4.15.2-3 + +--- a/src/unshar.c ++++ b/src/unshar.c +@@ -240,7 +240,7 @@ + off_t position = ftello (file); + + /* Read next line, fail if no more and no previous process. */ +- if (!fgets (rw_buffer, BUFSIZ, file)) ++ if (!fgets (rw_buffer, rw_base_size, file)) + { + if (!start) + error (0, 0, _("Found no shell commands in %s"), name); diff --git a/sdk_container/src/third_party/portage-stable/app-arch/sharutils/files/sharutils-4.15.2-gcc-10.patch b/sdk_container/src/third_party/portage-stable/app-arch/sharutils/files/sharutils-4.15.2-gcc-10.patch new file mode 100644 index 0000000000..4a0c02f5ba --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/sharutils/files/sharutils-4.15.2-gcc-10.patch @@ -0,0 +1,48 @@ +https://bugs.gentoo.org/706256 + +Fix build failure on gcc-10/-fno-common. + +--- a/src/shar-opts.h ++++ b/src/shar-opts.h +@@ -352,7 +352,7 @@ extern "C" { + * global exported definitions + */ + #include "local.h" +-char const * const program_name; ++extern char const * const program_name; + + extern bool initialization_done; + extern int optidx; +--- a/src/unshar-opts.h ++++ b/src/unshar-opts.h +@@ -192,7 +192,7 @@ extern "C" { + extern size_t separator_str_len; + + #include "local.h" +-char const * const program_name; ++extern char const * const program_name; + + + /* * * * * * +--- a/src/uudecode-opts.h ++++ b/src/uudecode-opts.h +@@ -170,7 +170,7 @@ extern "C" { + * global exported definitions + */ + #include "local.h" +-char const * const program_name; ++extern char const * const program_name; + + + /* * * * * * +--- a/src/uuencode-opts.h ++++ b/src/uuencode-opts.h +@@ -166,7 +166,7 @@ extern "C" { + * global exported definitions + */ + #include "local.h" +-char const * const program_name; ++extern char const * const program_name; + + + /* * * * * * diff --git a/sdk_container/src/third_party/portage-stable/app-arch/sharutils/files/sharutils-4.15.2-glibc228.patch b/sdk_container/src/third_party/portage-stable/app-arch/sharutils/files/sharutils-4.15.2-glibc228.patch new file mode 100644 index 0000000000..15bd682865 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/sharutils/files/sharutils-4.15.2-glibc228.patch @@ -0,0 +1,95 @@ +From: Santiago Vila +Subject: Fix FTBFS with glibc 2.28 +Bug-Debian: https://bugs.debian.org/915173 +X-Debian-version: 1:4.15.2-4 + +Based on this gnulib commit by Paul Eggert: + +https://lists.gnu.org/r/bug-gnulib/2018-03/msg00002.html + +--- a/lib/fflush.c ++++ b/lib/fflush.c +@@ -33,7 +33,7 @@ + #undef fflush + + +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + + /* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */ + static void +@@ -72,7 +72,7 @@ + + #endif + +-#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) ++#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) + + # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT + /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */ +@@ -148,7 +148,7 @@ + if (stream == NULL || ! freading (stream)) + return fflush (stream); + +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + + clear_ungetc_buffer_preserving_position (stream); + +--- a/lib/fpurge.c ++++ b/lib/fpurge.c +@@ -62,7 +62,7 @@ + /* Most systems provide FILE as a struct and the necessary bitmask in + , because they need it for implementing getc() and putc() as + fast macros. */ +-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + fp->_IO_read_end = fp->_IO_read_ptr; + fp->_IO_write_ptr = fp->_IO_write_base; + /* Avoid memory leak when there is an active ungetc buffer. */ +--- a/lib/freading.c ++++ b/lib/freading.c +@@ -31,7 +31,7 @@ + /* Most systems provide FILE as a struct and the necessary bitmask in + , because they need it for implementing getc() and putc() as + fast macros. */ +-# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + return ((fp->_flags & _IO_NO_WRITES) != 0 + || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0 + && fp->_IO_read_base != NULL)); +--- a/lib/fseeko.c ++++ b/lib/fseeko.c +@@ -47,7 +47,7 @@ + #endif + + /* These tests are based on fpurge.c. */ +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + if (fp->_IO_read_end == fp->_IO_read_ptr + && fp->_IO_write_ptr == fp->_IO_write_base + && fp->_IO_save_base == NULL) +@@ -123,7 +123,7 @@ + return -1; + } + +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ ++#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + fp->_flags &= ~_IO_EOF_SEEN; + fp->_offset = pos; + #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ +--- a/lib/stdio-impl.h ++++ b/lib/stdio-impl.h +@@ -18,6 +18,12 @@ + the same implementation of stdio extension API, except that some fields + have different naming conventions, or their access requires some casts. */ + ++/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this ++ problem by defining it ourselves. FIXME: Do not rely on glibc ++ internals. */ ++#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN ++# define _IO_IN_BACKUP 0x100 ++#endif + + /* BSD stdio derived implementations. */ + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/sharutils/metadata.xml b/sdk_container/src/third_party/portage-stable/app-arch/sharutils/metadata.xml new file mode 100644 index 0000000000..a974c2f2df --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/sharutils/metadata.xml @@ -0,0 +1,11 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + cpe:/a:gnu:sharutils + + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/sharutils/sharutils-4.15.2-r2.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/sharutils/sharutils-4.15.2-r2.ebuild new file mode 100644 index 0000000000..4df30e2394 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/sharutils/sharutils-4.15.2-r2.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit flag-o-matic strip-linguas + +MY_P="${P/_/-}" +DESCRIPTION="Tools to deal with shar archives" +HOMEPAGE="https://www.gnu.org/software/sharutils/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" +S="${WORKDIR}"/${MY_P} + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="nls" + +DEPEND="app-arch/xz-utils + sys-apps/texinfo + nls? ( >=sys-devel/gettext-0.10.35 )" + +PATCHES=( + "${FILESDIR}"/${PN}-4.15.2-glibc228.patch + "${FILESDIR}"/${PN}-4.15.2-CVE-2018-1000097.patch + "${FILESDIR}"/${PN}-4.15.2-gcc-10.patch +) + +src_prepare() { + default + + # Upstream is aware but thinks this isn't a bug/problem in sharutils itself + # See http://lists.gnu.org/archive/html/bug-gnu-utils/2013-10/msg00011.html + append-cflags $(test-flags-CC -Wno-error=format-security) +} + +src_configure() { + strip-linguas -u po + econf $(use_enable nls) +} diff --git a/sdk_container/src/third_party/portage-stable/app-arch/tar/Manifest b/sdk_container/src/third_party/portage-stable/app-arch/tar/Manifest new file mode 100644 index 0000000000..1a295ed77e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/tar/Manifest @@ -0,0 +1,2 @@ +DIST tar-1.34.tar.xz 2226068 BLAKE2B 741a662457509a6775338ffe5d2d84872fcf38b93ace70c8b748a81055b9b62f65a48c4e541955d08ae99e6f528509e89eacd7c799a65bcc3d017a259110c115 SHA512 5e77c4a7b49983ad7d15238c2bce28be7a8aa437b4b1815fc00abd13096da308b6bba196cc6e3ed79d85e62823d520ae0d8fcda2d93873842cf84dc3369fc902 +DIST tar-1.34.tar.xz.sig 181 BLAKE2B 2fae91293a9dacda0374706e1f83498042a9d5224f80f6f0e14abdb914cb5a8e980f720eb4a453485844c7fe26e0525f230c0eab11c7fa89159a1a929370795c SHA512 55297f41549deee511f5b14c6b5dc7bb3d9282dad52bcc85f9dddfad24b677f989ba86387ad9b133c3698feedbd6b6cd7e9f005e8e4c89f72c80543eeceb78f7 diff --git a/sdk_container/src/third_party/portage-stable/app-arch/tar/files/rmt b/sdk_container/src/third_party/portage-stable/app-arch/tar/files/rmt new file mode 100644 index 0000000000..15ed6aa91f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/tar/files/rmt @@ -0,0 +1,8 @@ +#!/bin/sh +# +# This is not a mistake. This shell script (/etc/rmt) has been provided +# for compatibility with other Unix-like systems, some of which have +# utilities that expect to find (and execute) rmt in the /etc directory +# on remote systems. +# +exec rmt "$@" diff --git a/sdk_container/src/third_party/portage-stable/app-arch/tar/metadata.xml b/sdk_container/src/third_party/portage-stable/app-arch/tar/metadata.xml new file mode 100644 index 0000000000..8cbd50a677 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/tar/metadata.xml @@ -0,0 +1,14 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + just install `tar` + + + cpe:/a:gnu:tar + + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/tar/tar-1.34-r2.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/tar/tar-1.34-r2.ebuild new file mode 100644 index 0000000000..9db23837e0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/tar/tar-1.34-r2.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/tar.asc +inherit verify-sig + +DESCRIPTION="Use this to make tarballs :)" +HOMEPAGE="https://www.gnu.org/software/tar/" +SRC_URI="mirror://gnu/tar/${P}.tar.xz + https://alpha.gnu.org/gnu/tar/${P}.tar.xz" +SRC_URI+=" verify-sig? ( + mirror://gnu/tar/${P}.tar.xz.sig + https://alpha.gnu.org/gnu/tar/${P}.tar.xz.sig + )" + +LICENSE="GPL-3+" +SLOT="0" +if [[ -z "$(ver_cut 3)" ]] || [[ "$(ver_cut 3)" -lt 90 ]] ; then + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi +IUSE="acl minimal nls selinux xattr" + +RDEPEND=" + acl? ( virtual/acl ) + selinux? ( sys-libs/libselinux ) +" +DEPEND="${RDEPEND} + xattr? ( elibc_glibc? ( sys-apps/attr ) ) +" +BDEPEND=" + nls? ( sys-devel/gettext ) + verify-sig? ( sec-keys/openpgp-keys-tar ) +" +PDEPEND=" + app-alternatives/tar +" + +src_configure() { + local myeconfargs=( + --bindir="${EPREFIX}"/bin + --enable-backup-scripts + --libexecdir="${EPREFIX}"/usr/sbin + $(use_with acl posix-acls) + $(use_enable nls) + $(use_with selinux) + $(use_with xattr xattrs) + + # autoconf looks for gtar before tar (in configure scripts), hence + # in Prefix it is important that it is there, otherwise, a gtar from + # the host system (FreeBSD, Solaris, Darwin) will be found instead + # of the Prefix provided (GNU) tar + --program-prefix=g + ) + + FORCE_UNSAFE_CONFIGURE=1 econf "${myeconfargs[@]}" +} + +src_install() { + default + + # a nasty yet required piece of baggage + exeinto /etc + doexe "${FILESDIR}"/rmt + + mv "${ED}"/usr/sbin/{gbackup,backup-tar} || die + mv "${ED}"/usr/sbin/{grestore,restore-tar} || die + mv "${ED}"/usr/sbin/{g,}backup.sh || die + mv "${ED}"/usr/sbin/{g,}dump-remind || die + + if use minimal ; then + find "${ED}"/etc "${ED}"/*bin/ "${ED}"/usr/*bin/ \ + -type f -a '!' -name gtar \ + -delete || die + fi + + if ! use minimal; then + dosym grmt /usr/sbin/rmt + fi + dosym grmt.8 /usr/share/man/man8/rmt.8 +} + +pkg_postinst() { + # ensure to preserve the symlink before app-alternatives/tar + # is installed + if [[ ! -h ${EROOT}/bin/tar ]]; then + ln -s gtar "${EROOT}/bin/tar" || die + fi +} diff --git a/sdk_container/src/third_party/portage-stable/app-arch/unzip/Manifest b/sdk_container/src/third_party/portage-stable/app-arch/unzip/Manifest new file mode 100644 index 0000000000..491344bfc0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/unzip/Manifest @@ -0,0 +1,2 @@ +DIST unzip60.tar.gz 1376845 BLAKE2B 5016d300b4452018a391f4ebc03c6960c068df400a0407c0c60bd7bb5ec5012031f916d8b204a6149ba291c2c35beba40d9b43c76fc093026e79471329ab0e47 SHA512 0694e403ebc57b37218e00ec1a406cae5cc9c5b52b6798e0d4590840b6cdbf9ddc0d9471f67af783e960f8fa2e620394d51384257dca23d06bcd90224a80ce5d +DIST unzip_6.0-27.debian.tar.xz 24980 BLAKE2B e53a96f12af0cf5227600c73a35003484fca5de138cd37991eb1eb25b97b80371c3a566d989feeb04deb1a93acd9444253b091cd7e920b23520c87c5f5a94eeb SHA512 e1e605f023c7b314a6c5b2857a3bd630350df2d7e4bf6bb38ab8594f967336384666b4db8afad931251b85261ee4e2c38d78641c74ac7e5fd02523f26e92ddb2 diff --git a/sdk_container/src/third_party/portage-stable/app-arch/unzip/files/unzip-6.0-fix-false-overlap-detection-on-32bit-systems.patch b/sdk_container/src/third_party/portage-stable/app-arch/unzip/files/unzip-6.0-fix-false-overlap-detection-on-32bit-systems.patch new file mode 100644 index 0000000000..ad6a157c56 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/unzip/files/unzip-6.0-fix-false-overlap-detection-on-32bit-systems.patch @@ -0,0 +1,50 @@ +From 13f0260beae851f7d5dd96e9ef757d8d6d7daac1 Mon Sep 17 00:00:00 2001 +From: Mark Adler +Date: Sun, 9 Feb 2020 07:20:13 -0800 +Subject: [PATCH] Fix false overlapped components detection on 32-bit systems. + +32-bit systems with ZIP64_SUPPORT enabled could have different +size types for zoff_t and zusz_t. That resulted in bad parameter +passing to the bound tracking functions, itself due to the lack of +use of C function prototypes in unzip. This commit assures that +parameters are cast properly for those calls. + +This problem occurred only for ill-chosen make options, which give +a 32-bit zoff_t. A proper build will result in a zoff_t of 64 bits, +even on 32-bit systems. +--- + extract.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/extract.c b/extract.c +index 1b73cb0..d9866f9 100644 +--- a/extract.c ++++ b/extract.c +@@ -329,7 +329,7 @@ static ZCONST char Far OverlappedComponents[] = + + + /* A growable list of spans. */ +-typedef zoff_t bound_t; ++typedef zusz_t bound_t; + typedef struct { + bound_t beg; /* start of the span */ + bound_t end; /* one past the end of the span */ +@@ -518,7 +518,8 @@ int extract_or_test_files(__G) /* return PK-type error code */ + return PK_MEM; + } + if ((G.extra_bytes != 0 && +- cover_add((cover_t *)G.cover, 0, G.extra_bytes) != 0) || ++ cover_add((cover_t *)G.cover, ++ (bound_t)0, (bound_t)G.extra_bytes) != 0) || + (G.ecrec.have_ecr64 && + cover_add((cover_t *)G.cover, G.ecrec.ec64_start, + G.ecrec.ec64_end) != 0) || +@@ -1216,7 +1217,7 @@ static int extract_or_test_entrylist(__G__ numchunk, + + /* seek_zipf(__G__ pInfo->offset); */ + request = G.pInfo->offset + G.extra_bytes; +- if (cover_within((cover_t *)G.cover, request)) { ++ if (cover_within((cover_t *)G.cover, (bound_t)request)) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(OverlappedComponents))); + return PK_BOMB; diff --git a/sdk_container/src/third_party/portage-stable/app-arch/unzip/files/unzip-6.0-format-security.patch b/sdk_container/src/third_party/portage-stable/app-arch/unzip/files/unzip-6.0-format-security.patch new file mode 100644 index 0000000000..c61c135963 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/unzip/files/unzip-6.0-format-security.patch @@ -0,0 +1,91 @@ +Fix build with -Werror=format-security + +Origin: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=master-next&id=f7d80257afcfefdc85b6745328f2d12b957a848b +Author: Edwin Plauchu + +diff --git a/extract.c b/extract.c +index 7cd9123..25c5a62 100644 +--- a/extract.c ++++ b/extract.c +@@ -475,7 +475,7 @@ int extract_or_test_files(__G) /* return PK-type error code */ + Info(slide, 0x401, ((char *)slide, + LoadFarString(CentSigMsg), j + blknum*DIR_BLKSIZ + 1)); + Info(slide, 0x401, ((char *)slide, +- LoadFarString(ReportMsg))); ++ "%s",LoadFarString(ReportMsg))); + error_in_archive = PK_BADERR; + } + reached_end = TRUE; /* ...so no more left to do */ +@@ -754,8 +754,8 @@ int extract_or_test_files(__G) /* return PK-type error code */ + + #ifndef SFX + if (no_endsig_found) { /* just to make sure */ +- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); +- Info(slide, 0x401, ((char *)slide, LoadFarString(ReportMsg))); ++ Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg))); ++ Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(ReportMsg))); + if (!error_in_archive) /* don't overwrite stronger error */ + error_in_archive = PK_WARN; + } +diff --git a/list.c b/list.c +index 15e0011..0b484f6 100644 +--- a/list.c ++++ b/list.c +@@ -181,7 +181,7 @@ int list_files(__G) /* return PK-type error code */ + Info(slide, 0x401, + ((char *)slide, LoadFarString(CentSigMsg), j)); + Info(slide, 0x401, +- ((char *)slide, LoadFarString(ReportMsg))); ++ ((char *)slide, "%s", LoadFarString(ReportMsg))); + return PK_BADERR; /* sig not found */ + } + } +@@ -507,7 +507,7 @@ int list_files(__G) /* return PK-type error code */ + && (!G.ecrec.is_zip64_archive) + && (memcmp(G.sig, end_central_sig, 4) != 0) + ) { /* just to make sure again */ +- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); ++ Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg))); + error_in_archive = PK_WARN; /* didn't find sig */ + } + +@@ -591,7 +591,7 @@ int get_time_stamp(__G__ last_modtime, nmember) /* return PK-type error code */ + Info(slide, 0x401, + ((char *)slide, LoadFarString(CentSigMsg), j)); + Info(slide, 0x401, +- ((char *)slide, LoadFarString(ReportMsg))); ++ ((char *)slide, "%s", LoadFarString(ReportMsg))); + return PK_BADERR; /* sig not found */ + } + } +@@ -674,7 +674,7 @@ int get_time_stamp(__G__ last_modtime, nmember) /* return PK-type error code */ + ---------------------------------------------------------------------------*/ + + if (memcmp(G.sig, end_central_sig, 4)) { /* just to make sure again */ +- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); ++ Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg))); + error_in_archive = PK_WARN; + } + if (*nmember == 0L && error_in_archive <= PK_WARN) +diff --git a/zipinfo.c b/zipinfo.c +index 0ac75b3..1e7fa82 100644 +--- a/zipinfo.c ++++ b/zipinfo.c +@@ -833,7 +833,7 @@ int zipinfo(__G) /* return PK-type error code */ + Info(slide, 0x401, + ((char *)slide, LoadFarString(CentSigMsg), j)); + Info(slide, 0x401, +- ((char *)slide, LoadFarString(ReportMsg))); ++ ((char *)slide, "%s", LoadFarString(ReportMsg))); + error_in_archive = PK_BADERR; /* sig not found */ + break; + } +@@ -1022,7 +1022,7 @@ int zipinfo(__G) /* return PK-type error code */ + && (!G.ecrec.is_zip64_archive) + && (memcmp(G.sig, end_central_sig, 4) != 0) + ) { /* just to make sure again */ +- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); ++ Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg))); + error_in_archive = PK_WARN; /* didn't find sig */ + } + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/unzip/files/unzip-6.0-natspec.patch b/sdk_container/src/third_party/portage-stable/app-arch/unzip/files/unzip-6.0-natspec.patch new file mode 100644 index 0000000000..0cf87fd464 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/unzip/files/unzip-6.0-natspec.patch @@ -0,0 +1,372 @@ +This patch makes zip use libnatspec to recode file names is national charset. +Initially this patch was written for altlinux: +http://sisyphus.ru/ru/srpm/Sisyphus/zip/patches + +Later it was a bit improved and improved version was posted here (in Russian): +http://www.opennet.ru/tips/info/2494.shtml + +Gentoo reference: +https://bugs.gentoo.org/show_bug.cgi?id=275244 + +diff -pur unzip60orig/unix/configure unzip60/unix/configure +--- unzip60orig/unix/configure 2009-04-16 23:25:12.000000000 +0400 ++++ unzip60/unix/configure 2010-11-26 19:07:43.000000000 +0300 +@@ -17,7 +17,7 @@ CFLAGSR=${CFLAGS} + IZ_BZIP2=${3} + CFLAGS="${CFLAGS} -I. -DUNIX" + LFLAGS1="" +-LFLAGS2="-s" ++LFLAGS2="-l natspec" + LN="ln -s" + + CFLAGS_OPT='' +diff -pur unzip60orig/unix/Makefile unzip60/unix/Makefile +--- unzip60orig/unix/Makefile 2009-01-19 01:41:18.000000000 +0300 ++++ unzip60/unix/Makefile 2010-11-29 14:25:58.461000001 +0300 +@@ -45,14 +45,14 @@ + CC = cc# try using "gcc" target rather than changing this (CC and LD + LD = $(CC)# must match, else "unresolved symbol: ___main" is possible) + AS = as +-LOC = $(D_USE_BZ2) $(LOCAL_UNZIP) ++LOC = $(D_USE_BZ2) -DNO_SETLOCALE $(LOCAL_UNZIP) + AF = $(LOC) + CFLAGS = -O + CF_NOOPT = -I. -I$(IZ_BZIP2) -DUNIX $(LOC) + CF = $(CFLAGS) $(CF_NOOPT) + LFLAGS1 = + LF = -o unzip$E $(LFLAGS1) +-LF2 = -s ++LF2 = -l natspec + + # UnZipSFX flags + SL = -o unzipsfx$E $(LFLAGS1) +@@ -121,7 +121,7 @@ INSTALL_PROGRAM = $(INSTALL) + INSTALL_D = mkdir -p + # on some systems, manext=l and MANDIR=/usr/man/man$(manext) may be appropriate + manext = 1 +-prefix = /usr/local ++prefix = /usr + BINDIR = $(prefix)/bin# where to install executables + MANDIR = $(prefix)/man/man$(manext)# where to install man pages + INSTALLEDBIN = $(BINDIR)/funzip$E $(BINDIR)/unzip$E $(BINDIR)/unzipsfx$E \ +diff -pur unzip60orig/unix/unix.c unzip60/unix/unix.c +--- unzip60orig/unix/unix.c 2009-01-24 02:31:26.000000000 +0300 ++++ unzip60/unix/unix.c 2010-11-26 16:58:35.000000000 +0300 +@@ -30,6 +30,9 @@ + #define UNZIP_INTERNAL + #include "unzip.h" + ++#include ++#include ++ + #ifdef SCO_XENIX + # define SYSNDIR + #else /* SCO Unix, AIX, DNIX, TI SysV, Coherent 4.x, ... */ +@@ -1874,3 +1877,44 @@ static void qlfix(__G__ ef_ptr, ef_len) + } + } + #endif /* QLZIP */ ++ ++ ++char OEM_CP[MAX_CP_NAME] = ""; ++char ISO_CP[MAX_CP_NAME] = ""; ++ ++/* Getr the default value of OEM_CP based on the current locale. ++ * ISO_CP is left alone for now. */ ++void init_conversion_charsets() ++{ ++ /* Make a guess only if OEM_CP not already set. */ ++ if(*OEM_CP == '\0') { ++ const char * archive_charset = natspec_get_charset_by_locale(NATSPEC_DOSCS, ""); ++ strncpy(OEM_CP, archive_charset, sizeof(OEM_CP)); ++ } ++ ++ if(*ISO_CP == '\0') { ++ const char * archive_charset = natspec_get_charset_by_locale(NATSPEC_WINCS, ""); ++ strncpy(ISO_CP, archive_charset, sizeof(ISO_CP)); ++ } ++ ++} ++ ++/* Convert a string from OEM_CP to the current locale charset. */ ++inline void oem_intern(char *string) ++{ ++ char *buf = natspec_convert(string, 0, OEM_CP, 0); ++ /* Since Ext_ASCII_TO_Native used only for G.filename[FILNAMESIZE], ++ use FILNAMSIZ as string size */ ++ strncpy(string, buf, FILNAMSIZ); ++ free (buf); ++} ++ ++/* Convert a string from ISO_CP to the current locale charset. */ ++inline void iso_intern(char *string) ++{ ++ char *buf = natspec_convert(string, 0, ISO_CP, 0); ++ /* Since Ext_ASCII_TO_Native used only for G.filename[FILNAMESIZE], ++ use FILNAMSIZ as string size */ ++ strncpy(string, buf, FILNAMSIZ); ++ free (buf); ++} +diff -pur unzip60orig/unix/unxcfg.h unzip60/unix/unxcfg.h +--- unzip60orig/unix/unxcfg.h 2009-04-16 22:36:12.000000000 +0400 ++++ unzip60/unix/unxcfg.h 2010-11-26 16:58:35.000000000 +0300 +@@ -227,4 +227,30 @@ typedef struct stat z_stat; + /* wild_dir, dirname, wildname, matchname[], dirnamelen, have_dirname, */ + /* and notfirstcall are used by do_wild(). */ + ++ ++#define MAX_CP_NAME 25 ++ ++#ifdef SETLOCALE ++# undef SETLOCALE ++#endif ++#define SETLOCALE(category, locale) setlocale(category, locale) ++#include ++ ++#ifdef _ISO_INTERN ++# undef _ISO_INTERN ++#endif ++#define _ISO_INTERN(str1) iso_intern(str1) ++ ++#ifdef _OEM_INTERN ++# undef _OEM_INTERN ++#endif ++#ifndef IZ_OEM2ISO_ARRAY ++# define IZ_OEM2ISO_ARRAY ++#endif ++#define _OEM_INTERN(str1) oem_intern(str1) ++ ++void iso_intern(char *); ++void oem_intern(char *); ++void init_conversion_charsets(void); ++ + #endif /* !__unxcfg_h */ +diff -pur unzip60orig/unzip.c unzip60/unzip.c +--- unzip60orig/unzip.c 2009-04-16 22:26:52.000000000 +0400 ++++ unzip60/unzip.c 2010-11-26 16:58:35.000000000 +0300 +@@ -331,7 +331,9 @@ static ZCONST char Far ZipInfoUsageLine3 + -h print header line -t print totals for listed files or for all\n\ + -z print zipfile comment -T print file times in sortable decimal format\ + \n -C be case-insensitive %s\ +- -x exclude filenames that follow from listing\n"; ++ -x exclude filenames that follow from listing\n\ ++ -O CHARSET specify a character encoding for DOS, Windows and OS/2 archives\n\ ++ -I CHARSET specify a character encoding for UNIX and other archives\n"; + #ifdef MORE + static ZCONST char Far ZipInfoUsageLine4[] = + " -M page output through built-in \"more\"\n"; +@@ -673,7 +674,9 @@ modifiers:\n\ + -j junk paths (do not make directories) -aa treat ALL files as text\n\ + -U use escapes for all non-ASCII Unicode -UU ignore any Unicode fields\n\ + -C match filenames case-insensitively -L make (some) names \ +-lowercase\n %-42s -V retain VMS version numbers\n%s"; ++lowercase\n %-42s -V retain VMS version numbers\n%s\ ++ -O CHARSET specify a character encoding for DOS, Windows and OS/2 archives\n\ ++ -I CHARSET specify a character encoding for UNIX and other archives\n"; + #endif /* ?VMS */ + #else /* !UNICODE_SUPPORT */ + #ifdef VMS +@@ -692,7 +695,9 @@ modifiers:\n\ + -o overwrite files WITHOUT prompting -a auto-convert any text files\n\ + -j junk paths (do not make directories) -aa treat ALL files as text\n\ + -C match filenames case-insensitively -L make (some) names \ +-lowercase\n %-42s -V retain VMS version numbers\n%s"; ++lowercase\n %-42s -V retain VMS version numbers\n%s\ ++ -O CHARSET specify a character encoding for DOS, Windows and OS/2 archives\n\ ++ -I CHARSET specify a character encoding for UNIX and other archives\n"; + #endif /* ?VMS */ + #endif /* ?UNICODE_SUPPORT */ + +@@ -803,6 +808,10 @@ int unzip(__G__ argc, argv) + #endif /* UNICODE_SUPPORT */ + + ++#ifdef UNIX ++ init_conversion_charsets(); ++#endif ++ + #if (defined(__IBMC__) && defined(__DEBUG_ALLOC__)) + extern void DebugMalloc(void); + +@@ -1336,6 +1345,11 @@ int uz_opts(__G__ pargc, pargv) + argc = *pargc; + argv = *pargv; + ++#ifdef UNIX ++ extern char OEM_CP[MAX_CP_NAME]; ++ extern char ISO_CP[MAX_CP_NAME]; ++#endif ++ + while (++argv, (--argc > 0 && *argv != NULL && **argv == '-')) { + s = *argv + 1; + while ((c = *s++) != 0) { /* "!= 0": prevent Turbo C warning */ +@@ -1517,6 +1531,35 @@ int uz_opts(__G__ pargc, pargv) + } + break; + #endif /* MACOS */ ++#ifdef UNIX ++ case ('I'): ++ if (negative) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: encodings can't be negated")); ++ return(PK_PARAM); ++ } else { ++ if(*s) { /* Handle the -Icharset case */ ++ /* Assume that charsets can't start with a dash to spot arguments misuse */ ++ if(*s == '-') { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ strncpy(ISO_CP, s, sizeof(ISO_CP)); ++ } else { /* -I charset */ ++ ++argv; ++ if(!(--argc > 0 && *argv != NULL && **argv != '-')) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ s = *argv; ++ strncpy(ISO_CP, s, sizeof(ISO_CP)); ++ } ++ while(*(++s)); /* No params straight after charset name */ ++ } ++ break; ++#endif /* ?UNIX */ + case ('j'): /* junk pathnames/directory structure */ + if (negative) + uO.jflag = FALSE, negative = 0; +@@ -1592,6 +1635,35 @@ int uz_opts(__G__ pargc, pargv) + } else + ++uO.overwrite_all; + break; ++#ifdef UNIX ++ case ('O'): ++ if (negative) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: encodings can't be negated")); ++ return(PK_PARAM); ++ } else { ++ if(*s) { /* Handle the -Ocharset case */ ++ /* Assume that charsets can't start with a dash to spot arguments misuse */ ++ if(*s == '-') { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ strncpy(OEM_CP, s, sizeof(OEM_CP)); ++ } else { /* -O charset */ ++ ++argv; ++ if(!(--argc > 0 && *argv != NULL && **argv != '-')) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -O argument")); ++ return(PK_PARAM); ++ } ++ s = *argv; ++ strncpy(OEM_CP, s, sizeof(OEM_CP)); ++ } ++ while(*(++s)); /* No params straight after charset name */ ++ } ++ break; ++#endif /* ?UNIX */ + case ('p'): /* pipes: extract to stdout, no messages */ + if (negative) { + uO.cflag = FALSE; +diff -pur unzip60orig/unzpriv.h unzip60/unzpriv.h +--- unzip60orig/unzpriv.h 2009-04-20 03:59:26.000000000 +0400 ++++ unzip60/unzpriv.h 2010-11-26 16:58:35.000000000 +0300 +@@ -3008,7 +3008,7 @@ char *GetLoadPath OF((__GPRO)); + !(((islochdr) || (isuxatt)) && \ + ((hostver) == 25 || (hostver) == 26 || (hostver) == 40))) || \ + (hostnum) == FS_HPFS_ || \ +- ((hostnum) == FS_NTFS_ && (hostver) == 50)) { \ ++ ((hostnum) == FS_NTFS_/* && (hostver) == 50*/)) { \ + _OEM_INTERN((string)); \ + } else { \ + _ISO_INTERN((string)); \ +diff -pur unzip60orig/zipinfo.c unzip60/zipinfo.c +--- unzip60orig/zipinfo.c 2009-02-08 20:04:30.000000000 +0300 ++++ unzip60/zipinfo.c 2010-11-26 16:58:35.000000000 +0300 +@@ -457,6 +457,10 @@ int zi_opts(__G__ pargc, pargv) + int tflag_slm=TRUE, tflag_2v=FALSE; + int explicit_h=FALSE, explicit_t=FALSE; + ++#ifdef UNIX ++ extern char OEM_CP[MAX_CP_NAME]; ++ extern char ISO_CP[MAX_CP_NAME]; ++#endif + + #ifdef MACOS + uO.lflag = LFLAG; /* reset default on each call */ +@@ -501,6 +505,35 @@ int zi_opts(__G__ pargc, pargv) + uO.lflag = 0; + } + break; ++#ifdef UNIX ++ case ('I'): ++ if (negative) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: encodings can't be negated")); ++ return(PK_PARAM); ++ } else { ++ if(*s) { /* Handle the -Icharset case */ ++ /* Assume that charsets can't start with a dash to spot arguments misuse */ ++ if(*s == '-') { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ strncpy(ISO_CP, s, sizeof(ISO_CP)); ++ } else { /* -I charset */ ++ ++argv; ++ if(!(--argc > 0 && *argv != NULL && **argv != '-')) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ s = *argv; ++ strncpy(ISO_CP, s, sizeof(ISO_CP)); ++ } ++ while(*(++s)); /* No params straight after charset name */ ++ } ++ break; ++#endif /* ?UNIX */ + case 'l': /* longer form of "ls -l" type listing */ + if (negative) + uO.lflag = -2, negative = 0; +@@ -521,6 +554,35 @@ int zi_opts(__G__ pargc, pargv) + G.M_flag = TRUE; + break; + #endif ++#ifdef UNIX ++ case ('O'): ++ if (negative) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: encodings can't be negated")); ++ return(PK_PARAM); ++ } else { ++ if(*s) { /* Handle the -Ocharset case */ ++ /* Assume that charsets can't start with a dash to spot arguments misuse */ ++ if(*s == '-') { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ strncpy(OEM_CP, s, sizeof(OEM_CP)); ++ } else { /* -O charset */ ++ ++argv; ++ if(!(--argc > 0 && *argv != NULL && **argv != '-')) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -O argument")); ++ return(PK_PARAM); ++ } ++ s = *argv; ++ strncpy(OEM_CP, s, sizeof(OEM_CP)); ++ } ++ while(*(++s)); /* No params straight after charset name */ ++ } ++ break; ++#endif /* ?UNIX */ + case 's': /* default: shorter "ls -l" type listing */ + if (negative) + uO.lflag = -2, negative = 0; diff --git a/sdk_container/src/third_party/portage-stable/app-arch/unzip/files/unzip-6.0-no-exec-stack.patch b/sdk_container/src/third_party/portage-stable/app-arch/unzip/files/unzip-6.0-no-exec-stack.patch new file mode 100644 index 0000000000..7973378704 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/unzip/files/unzip-6.0-no-exec-stack.patch @@ -0,0 +1,13 @@ +Make sure that the asm files don't incorrectly trigger an executable +stack marking in the final shared library. That's bad, mmmkay. + +--- unzip/crc_i386.S ++++ unzip/crc_i386.S +@@ -302,3 +302,7 @@ + #endif /* i386 || _i386 || _I386 || __i386 */ + + #endif /* !USE_ZLIB && !CRC_TABLE_ONLY */ ++ ++#if defined(__linux__) && defined(__ELF__) ++.section .note.GNU-stack,"",%progbits ++#endif diff --git a/sdk_container/src/third_party/portage-stable/app-arch/unzip/metadata.xml b/sdk_container/src/third_party/portage-stable/app-arch/unzip/metadata.xml new file mode 100644 index 0000000000..80e20aa4d0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/unzip/metadata.xml @@ -0,0 +1,16 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + Use dev-libs/libnatspec to correctly decode non-ascii file names archived in Windows. + + + cpe:/a:info-zip:unzip + madler/unzip + infozip + + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/unzip/unzip-6.0_p27-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/unzip/unzip-6.0_p27-r1.ebuild new file mode 100644 index 0000000000..126a4a35e2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/unzip/unzip-6.0_p27-r1.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic multilib toolchain-funcs + +MY_PV="${PV//.}" +MY_PV="${MY_PV%_p*}" +MY_P="${PN}${MY_PV}" + +DESCRIPTION="unzipper for pkzip-compressed files" +HOMEPAGE="https://infozip.sourceforge.net/UnZip.html" +SRC_URI="mirror://sourceforge/infozip/${MY_P}.tar.gz + mirror://debian/pool/main/u/${PN}/${PN}_${PV/_p/-}.debian.tar.xz" + +LICENSE="Info-ZIP" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="bzip2 natspec unicode" + +DEPEND="bzip2? ( app-arch/bzip2 ) + natspec? ( dev-libs/libnatspec )" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${WORKDIR}"/debian/patches + "${FILESDIR}"/${PN}-6.0-no-exec-stack.patch + "${FILESDIR}"/${PN}-6.0-format-security.patch + "${FILESDIR}"/${PN}-6.0-fix-false-overlap-detection-on-32bit-systems.patch +) + +src_prepare() { + # bug #275244 + use natspec && PATCHES+=( "${FILESDIR}"/${PN}-6.0-natspec.patch ) + + rm "${WORKDIR}"/debian/patches/02-this-is-debian-unzip.patch || die + + default + + sed -i -r \ + -e '/^CFLAGS/d' \ + -e '/CFLAGS/s:-O[0-9]?:$(CFLAGS) $(CPPFLAGS):' \ + -e '/^STRIP/s:=.*:=true:' \ + -e "s:\:CC=\"$(tc-getCC)\":" \ + -e "s:\:LD=\"$(tc-getCC)\":" \ + -e "s:\:AS=\"$(tc-getCC)\":" \ + -e 's:LF2 = -s:LF2 = :' \ + -e 's:LF = :LF = $(LDFLAGS) :' \ + -e 's:SL = :SL = $(LDFLAGS) :' \ + -e 's:FL = :FL = $(LDFLAGS) :' \ + -e "/^#L_BZ2/s:^$(use bzip2 && echo .)::" \ + -e 's:$(AS) :$(AS) $(ASFLAGS) :g' \ + unix/Makefile \ + || die "sed unix/Makefile failed" + + # Delete bundled code to make sure we don't use it. + rm -r bzip2 || die +} + +src_configure() { + case ${CHOST} in + i?86*-*linux*) TARGET="linux_asm" ;; + *linux*) TARGET="linux_noasm" ;; + i?86*-*bsd* | \ + i?86*-dragonfly*) TARGET="freebsd" ;; # mislabelled bsd with x86 asm + *bsd* | *dragonfly*) TARGET="bsd" ;; + *-darwin*) TARGET="macosx" ;; + *-solaris*) TARGET="generic" ;; + *-cygwin*) TARGET="generic" ;; + *) die "Unknown target; please update the ebuild to handle ${CHOST} " ;; + esac + + # Needed for Clang 16 + append-flags -std=gnu89 + + [[ ${CHOST} == *linux* ]] && append-cppflags -DNO_LCHMOD + use bzip2 && append-cppflags -DUSE_BZIP2 + use unicode && append-cppflags -DUNICODE_SUPPORT -DUNICODE_WCHAR -DUTF8_MAYBE_NATIVE -DUSE_ICONV_MAPPING + + # bug #281473 + append-cppflags -DLARGE_FILE_SUPPORT +} + +src_compile() { + ASFLAGS="${ASFLAGS} $(get_abi_CFLAGS)" emake -f unix/Makefile ${TARGET} +} + +src_install() { + dobin unzip funzip unzipsfx unix/zipgrep + dosym unzip /usr/bin/zipinfo + doman man/*.1 + dodoc BUGS History* README ToDo WHERE +} diff --git a/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/Manifest b/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/Manifest new file mode 100644 index 0000000000..8e72b07133 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/Manifest @@ -0,0 +1,4 @@ +DIST xz-5.2.10.tar.gz 2123206 BLAKE2B fdd9e77e21ee65482401e0e43e0b291093a227d452991a9182562989b7a4388ceed30d5d54cd7f86320dcc073eb792032a49741880338a29043a8380507c4215 SHA512 c3814680fcad421efa71cf977217a62c34e3223900302a6fd7d505f310a7b338815feee2c8225b1232bd22b9e29c7dda3664e54dae2d80f816daec6adf560ca1 +DIST xz-5.2.10.tar.gz.sig 566 BLAKE2B ce72730816d03084dc0d1559d6f2890b3ebe25a5e6b0720d4775ba2364762b5d1934a3a53f2255f6e68a1cdf42778d85d8b02ab30396b2addab619e95855f733 SHA512 48a0864abee6639116678afab6e8319eb2de903b381362c611fb77f9b6fc21df5f7d9783a250810f7ecc08380fb371a3a791ab55f5a343b68b9d4f9e414da403 +DIST xz-5.4.1.tar.gz 2528617 BLAKE2B f4dc8698fb97002aa0548107b448ab0dd8659cce506a83775930f95fd775601f7de1df44866310ac617853410a1915cd4e90ad4088b2fd56418e67b6f0fc4e98 SHA512 5cff8383a68fb88ecbb3770ec48af0ad5582e08de9dccd339e0b685aaa53447e59d6425caa3f63b54a674e5d78c20520876db547d156e6658ad4841660cba85b +DIST xz-5.4.1.tar.gz.sig 566 BLAKE2B f384bcf7ea6bd7d3af65b6b17b379b48826257f403bca0bed1b42697f88edbc38f38eaac03c5564fc466df670f40e2e7ee49974232da4eb849718e89234c224b SHA512 2e6c3bf04ceb29c1bac8fdde7aa09c4d0f96442515d797e06ea860f365fd94777630b0034b98006cf844083efea8642a0bf87b1ff56de6a58446a644b1fd3c1c diff --git a/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/metadata.xml b/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/metadata.xml new file mode 100644 index 0000000000..89d8ff6798 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/metadata.xml @@ -0,0 +1,18 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + Build additional filters that are not + used in any of the default xz presets. This includes delta + and BCJ coders, additional match finders and SHA256 checks. + + + cpe:/a:tukaani:xz + lzmautils + tukaani-project/xz + + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/xz-utils-5.2.10.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/xz-utils-5.2.10.ebuild new file mode 100644 index 0000000000..fb35eaff73 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/xz-utils-5.2.10.ebuild @@ -0,0 +1,118 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Remember: we cannot leverage autotools in this ebuild in order +# to avoid circular deps with autotools + +EAPI=7 + +inherit libtool multilib multilib-minimal preserve-libs usr-ldscript + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://git.tukaani.org/xz.git" + inherit git-r3 autotools + + # bug #272880 and bug #286068 + BDEPEND="sys-devel/gettext >=sys-devel/libtool-2" +else + VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/lassecollin.asc + inherit verify-sig + + MY_P="${PN/-utils}-${PV/_}" + SRC_URI=" + mirror://sourceforge/lzmautils/${MY_P}.tar.gz + https://tukaani.org/xz/${MY_P}.tar.gz + verify-sig? ( + https://tukaani.org/xz/${MY_P}.tar.gz.sig + ) + " + + if [[ ${PV} != *_alpha* && ${PV} != *_beta* ]] ; then + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + fi + + S="${WORKDIR}/${MY_P}" +fi + +DESCRIPTION="Utils for managing LZMA compressed files" +HOMEPAGE="https://tukaani.org/xz/" + +# See top-level COPYING file as it outlines the various pieces and their licenses. +LICENSE="public-domain LGPL-2.1+ GPL-2+" +SLOT="0" +IUSE="+extra-filters nls static-libs" + +if [[ ${PV} != 9999 ]] ; then + BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-lassecollin )" +fi + +# Tests currently do not account for smaller feature set +RESTRICT="!extra-filters? ( test )" + +src_prepare() { + default + + if [[ ${PV} == 9999 ]] ; then + eautopoint + eautoreconf + else + # Allow building shared libs on Solaris/x64 + elibtoolize + fi +} + +multilib_src_configure() { + local myconf=( + --enable-threads + $(use_enable nls) + $(use_enable static-libs static) + ) + + if ! multilib_is_native_abi ; then + myconf+=( + --disable-{xz,xzdec,lzmadec,lzmainfo,lzma-links,scripts} + ) + fi + + if ! use extra-filters ; then + myconf+=( + # LZMA1 + LZMA2 for standard .lzma & .xz files + --enable-encoders=lzma1,lzma2 + --enable-decoders=lzma1,lzma2 + + # those are used by default, depending on preset + --enable-match-finders=hc3,hc4,bt4 + + # CRC64 is used by default, though some (old?) files use CRC32 + --enable-checks=crc32,crc64 + ) + fi + + if [[ ${CHOST} == *-solaris* ]] ; then + export gl_cv_posix_shell="${EPREFIX}"/bin/sh + + # Undo Solaris-based defaults pointing to /usr/xpg5/bin + myconf+=( --disable-path-for-script ) + fi + + ECONF_SOURCE="${S}" econf "${myconf[@]}" +} + +multilib_src_install() { + default + + gen_usr_ldscript -a lzma +} + +multilib_src_install_all() { + find "${ED}" -type f -name '*.la' -delete || die + rm "${ED}"/usr/share/doc/${PF}/COPYING* || die +} + +pkg_preinst() { + preserve_old_lib /usr/$(get_libdir)/liblzma$(get_libname 0) +} + +pkg_postinst() { + preserve_old_lib_notify /usr/$(get_libdir)/liblzma$(get_libname 0) +} diff --git a/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/xz-utils-5.4.1.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/xz-utils-5.4.1.ebuild new file mode 100644 index 0000000000..9aa96a389d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/xz-utils-5.4.1.ebuild @@ -0,0 +1,122 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Remember: we cannot leverage autotools in this ebuild in order +# to avoid circular deps with autotools + +EAPI=7 + +inherit libtool multilib multilib-minimal preserve-libs usr-ldscript + +if [[ ${PV} == 9999 ]] ; then + # Per tukaani.org, git.tukaani.org is a mirror of github and + # may be behind. + EGIT_REPO_URI=" + https://github.com/tukaani-project/xz + https://git.tukaani.org/xz.git + " + inherit git-r3 autotools + + # bug #272880 and bug #286068 + BDEPEND="sys-devel/gettext >=sys-devel/libtool-2" +else + VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/lassecollin.asc + inherit verify-sig + + MY_P="${PN/-utils}-${PV/_}" + SRC_URI=" + https://github.com/tukaani-project/xz/releases/download/v${PV}/${MY_P}.tar.gz + mirror://sourceforge/lzmautils/${MY_P}.tar.gz + https://tukaani.org/xz/${MY_P}.tar.gz + verify-sig? ( + https://github.com/tukaani-project/xz/releases/download/v${PV}/${MY_P}.tar.gz.sig + https://tukaani.org/xz/${MY_P}.tar.gz.sig + ) + " + + if [[ ${PV} != *_alpha* && ${PV} != *_beta* ]] ; then + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + fi + + S="${WORKDIR}/${MY_P}" +fi + +DESCRIPTION="Utils for managing LZMA compressed files" +HOMEPAGE="https://tukaani.org/xz/" + +# See top-level COPYING file as it outlines the various pieces and their licenses. +LICENSE="public-domain LGPL-2.1+ GPL-2+" +SLOT="0" +IUSE="+extra-filters nls static-libs" + +if [[ ${PV} != 9999 ]] ; then + BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-lassecollin )" +fi + +src_prepare() { + default + + if [[ ${PV} == 9999 ]] ; then + eautopoint + eautoreconf + else + # Allow building shared libs on Solaris/x64 + elibtoolize + fi +} + +multilib_src_configure() { + local myconf=( + --enable-threads + $(use_enable nls) + $(use_enable static-libs static) + ) + + if ! multilib_is_native_abi ; then + myconf+=( + --disable-{xz,xzdec,lzmadec,lzmainfo,lzma-links,scripts} + ) + fi + + if ! use extra-filters ; then + myconf+=( + # LZMA1 + LZMA2 for standard .lzma & .xz files + --enable-encoders=lzma1,lzma2 + --enable-decoders=lzma1,lzma2 + + # those are used by default, depending on preset + --enable-match-finders=hc3,hc4,bt4 + + # CRC64 is used by default, though some (old?) files use CRC32 + --enable-checks=crc32,crc64 + ) + fi + + if [[ ${CHOST} == *-solaris* ]] ; then + export gl_cv_posix_shell="${EPREFIX}"/bin/sh + + # Undo Solaris-based defaults pointing to /usr/xpg5/bin + myconf+=( --disable-path-for-script ) + fi + + ECONF_SOURCE="${S}" econf "${myconf[@]}" +} + +multilib_src_install() { + default + + gen_usr_ldscript -a lzma +} + +multilib_src_install_all() { + find "${ED}" -type f -name '*.la' -delete || die + rm "${ED}"/usr/share/doc/${PF}/COPYING* || die +} + +pkg_preinst() { + preserve_old_lib /usr/$(get_libdir)/liblzma$(get_libname 0) +} + +pkg_postinst() { + preserve_old_lib_notify /usr/$(get_libdir)/liblzma$(get_libname 0) +} diff --git a/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/xz-utils-9999.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/xz-utils-9999.ebuild new file mode 100644 index 0000000000..cb694cd99a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/xz-utils-9999.ebuild @@ -0,0 +1,122 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Remember: we cannot leverage autotools in this ebuild in order +# to avoid circular deps with autotools + +EAPI=7 + +inherit libtool multilib multilib-minimal preserve-libs usr-ldscript + +if [[ ${PV} == 9999 ]] ; then + # Per tukaani.org, git.tukaani.org is a mirror of github and + # may be behind. + EGIT_REPO_URI=" + https://github.com/tukaani-project/xz + https://git.tukaani.org/xz.git + " + inherit git-r3 autotools + + # bug #272880 and bug #286068 + BDEPEND="sys-devel/gettext >=sys-devel/libtool-2" +else + VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/lassecollin.asc + inherit verify-sig + + MY_P="${PN/-utils}-${PV/_}" + SRC_URI=" + https://github.com/tukaani-project/xz/releases/download/v${PV}/${MY_P}.tar.gz + mirror://sourceforge/lzmautils/${MY_P}.tar.gz + https://tukaani.org/xz/${MY_P}.tar.gz + verify-sig? ( + https://github.com/tukaani-project/xz/releases/download/v${PV}/${MY_P}.tar.gz.sig + https://tukaani.org/xz/${MY_P}.tar.gz.sig + ) + " + + if [[ ${PV} != *_alpha* && ${PV} != *_beta* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + fi + + S="${WORKDIR}/${MY_P}" +fi + +DESCRIPTION="Utils for managing LZMA compressed files" +HOMEPAGE="https://tukaani.org/xz/" + +# See top-level COPYING file as it outlines the various pieces and their licenses. +LICENSE="public-domain LGPL-2.1+ GPL-2+" +SLOT="0" +IUSE="+extra-filters nls static-libs" + +if [[ ${PV} != 9999 ]] ; then + BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-lassecollin )" +fi + +src_prepare() { + default + + if [[ ${PV} == 9999 ]] ; then + eautopoint + eautoreconf + else + # Allow building shared libs on Solaris/x64 + elibtoolize + fi +} + +multilib_src_configure() { + local myconf=( + --enable-threads + $(use_enable nls) + $(use_enable static-libs static) + ) + + if ! multilib_is_native_abi ; then + myconf+=( + --disable-{xz,xzdec,lzmadec,lzmainfo,lzma-links,scripts} + ) + fi + + if ! use extra-filters ; then + myconf+=( + # LZMA1 + LZMA2 for standard .lzma & .xz files + --enable-encoders=lzma1,lzma2 + --enable-decoders=lzma1,lzma2 + + # those are used by default, depending on preset + --enable-match-finders=hc3,hc4,bt4 + + # CRC64 is used by default, though some (old?) files use CRC32 + --enable-checks=crc32,crc64 + ) + fi + + if [[ ${CHOST} == *-solaris* ]] ; then + export gl_cv_posix_shell="${EPREFIX}"/bin/sh + + # Undo Solaris-based defaults pointing to /usr/xpg5/bin + myconf+=( --disable-path-for-script ) + fi + + ECONF_SOURCE="${S}" econf "${myconf[@]}" +} + +multilib_src_install() { + default + + gen_usr_ldscript -a lzma +} + +multilib_src_install_all() { + find "${ED}" -type f -name '*.la' -delete || die + rm "${ED}"/usr/share/doc/${PF}/COPYING* || die +} + +pkg_preinst() { + preserve_old_lib /usr/$(get_libdir)/liblzma$(get_libname 0) +} + +pkg_postinst() { + preserve_old_lib_notify /usr/$(get_libdir)/liblzma$(get_libname 0) +} diff --git a/sdk_container/src/third_party/portage-stable/app-arch/zip/Manifest b/sdk_container/src/third_party/portage-stable/app-arch/zip/Manifest new file mode 100644 index 0000000000..37fcc7a2f5 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/zip/Manifest @@ -0,0 +1 @@ +DIST zip30.zip 1287223 BLAKE2B d29a3e3ddbaa3ce50c80b2dd058b39c35791bf2079879b61dab0be4f011ccd3331d1768ebda5a69aa150c651713eb7a99b02833bb727eee75a3e0bbdc8504cbc SHA512 642ea6768d79adc1499251a3fb7bfc7ddc8d708699cbf9e0cfe849deda94165cb93e21dc2606bea1166ae5d8531e1e2cb056a7246bf2ab86ea7587bd4712d8d8 diff --git a/sdk_container/src/third_party/portage-stable/app-arch/zip/files/zip-3.0-build.patch b/sdk_container/src/third_party/portage-stable/app-arch/zip/files/zip-3.0-build.patch new file mode 100644 index 0000000000..595303cc48 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/zip/files/zip-3.0-build.patch @@ -0,0 +1,36 @@ +respect build environment settings + +--- zip/unix/configure ++++ zip/unix/configure +@@ -18,7 +18,7 @@ + + CC=${1-cc} + CFLAGS=${2-"-I. -DUNIX"} +-LFLAGS1='' ++LFLAGS1="${LDFLAGS}" + LFLAGS2='' + LN="ln -s" + +@@ -118,7 +118,7 @@ _EOF_ + fi + + # optimization flags +-if test -n "${CFLAGS_OPT}"; then ++if false; then + CFLAGS="${CFLAGS} ${CFLAGS_OPT}" + CFLAGS_BZ="${CFLAGS_BZ} ${CFLAGS_OPT}" + fi +@@ -220,13 +220,6 @@ fi + echo Check for the C preprocessor + # on SVR4, cc -E does not produce correct assembler files. Need /lib/cpp. + CPP="${CC} -E" +-# solaris as(1) needs -P, maybe others as well ? +-[ -f /usr/ccs/lib/cpp ] && CPP="/usr/ccs/lib/cpp -P" +-[ -f /usr/lib/cpp ] && CPP=/usr/lib/cpp +-[ -f /lib/cpp ] && CPP=/lib/cpp +-[ -f /usr/bin/cpp ] && CPP=/usr/bin/cpp +-[ -f /xenix ] && CPP="${CC} -E" +-[ -f /lynx.os ] && CPP="${CC} -E" + + echo "#include " > conftest.c + $CPP conftest.c >/dev/null 2>/dev/null || CPP="${CC} -E" diff --git a/sdk_container/src/third_party/portage-stable/app-arch/zip/files/zip-3.0-exec-stack.patch b/sdk_container/src/third_party/portage-stable/app-arch/zip/files/zip-3.0-exec-stack.patch new file mode 100644 index 0000000000..80719c9612 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/zip/files/zip-3.0-exec-stack.patch @@ -0,0 +1,22 @@ +add proper GNU stack markings so we dont get the default: executable + +--- zip-2.31/crc_i386.S ++++ zip-2.31/crc_i386.S +@@ -238,3 +238,7 @@ + #endif /* i386 || _i386 || _I386 || __i386 */ + + #endif /* !USE_ZLIB && !CRC_TABLE_ONLY */ ++ ++#if defined __ELF__ && defined __linux__ ++.section .note.GNU-stack,"",@progbits ++#endif +--- zip-2.31/match.S ++++ zip-2.31/match.S +@@ -405,3 +405,7 @@ + #endif /* i386 || _I386 || _i386 || __i386 */ + + #endif /* !USE_ZLIB */ ++ ++#if defined __ELF__ && defined __linux__ ++.section .note.GNU-stack,"",@progbits ++#endif diff --git a/sdk_container/src/third_party/portage-stable/app-arch/zip/files/zip-3.0-format-security.patch b/sdk_container/src/third_party/portage-stable/app-arch/zip/files/zip-3.0-format-security.patch new file mode 100644 index 0000000000..63188b5063 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/zip/files/zip-3.0-format-security.patch @@ -0,0 +1,20 @@ +--- a/zip.c ++++ b/zip.c +@@ -1028,7 +1028,7 @@ + + for (i = 0; i < sizeof(text)/sizeof(char *); i++) + { +- printf(text[i]); ++ fputs(text[i], stdout); + putchar('\n'); + } + #ifdef DOS +@@ -1225,7 +1225,7 @@ + CR_MAJORVER, CR_MINORVER, CR_BETA_VER, CR_VERSION_DATE); + for (i = 0; i < sizeof(cryptnote)/sizeof(char *); i++) + { +- printf(cryptnote[i]); ++ fputs(cryptnote[i], stdout); + putchar('\n'); + } + ++i; /* crypt support means there IS at least one compilation option */ diff --git a/sdk_container/src/third_party/portage-stable/app-arch/zip/files/zip-3.0-natspec.patch b/sdk_container/src/third_party/portage-stable/app-arch/zip/files/zip-3.0-natspec.patch new file mode 100644 index 0000000000..29ed4827e3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/zip/files/zip-3.0-natspec.patch @@ -0,0 +1,214 @@ +This patch makes zip use libnatspec to recode file names is national charset. +Initially this patch was written for altlinux: +http://sisyphus.ru/ru/srpm/Sisyphus/zip/patches + +Later it was a bit improved and improved version was posted here (in Russian): +http://www.opennet.ru/tips/info/2494.shtml + +Also I've added natspec support to output of zipnote (thank vapier for notice). + +Gentoo reference: +https://bugs.gentoo.org/show_bug.cgi?id=275244 + +-- +pva@gentoo.org + +=== modified file 'fileio.c' +--- a/fileio.c ++++ b/fileio.c +@@ -929,7 +929,7 @@ + } + if ((zname = in2ex(iname)) == NULL) + return ZE_MEM; +-#ifdef UNICODE_SUPPORT ++#if defined(UNICODE_SUPPORT) && !defined(UNIX) + /* Convert name to display or OEM name */ + oname = local_to_display_string(iname); + #else + +=== modified file 'globals.c' +--- a/globals.c ++++ b/globals.c +@@ -32,7 +32,7 @@ + int scanimage = 1; /* 1=scan through image files */ + #endif + int method = BEST; /* one of BEST, DEFLATE (only), or STORE (only) */ +-int dosify = 0; /* 1=make new entries look like MSDOS */ ++int dosify = 1; /* 1=make new entries look like MSDOS */ + int verbose = 0; /* 1=report oddities in zip file structure */ + int fix = 0; /* 1=fix the zip file, 2=FF, 3=ZipNote */ + int filesync = 0; /* 1=file sync, delete entries not on file system */ + +=== modified file 'unix/Makefile' +--- a/unix/Makefile ++++ b/unix/Makefile +@@ -38,7 +38,7 @@ + MANFLAGS = 644 + + # target directories - where to install executables and man pages to +-prefix = /usr/local ++prefix = /usr + BINDIR = $(prefix)/bin + MANEXT=1 + MANDIR = $(prefix)/man/man$(MANEXT) +@@ -61,6 +61,7 @@ + CFLAGS = -O2 $(CFLAGS_NOOPT) + LFLAGS1 = + LFLAGS2 = -s ++LDADD = -lnatspec + + # object file lists + OBJZ = zip.o zipfile.o zipup.o fileio.o util.o globals.o crypt.o ttyio.o \ +@@ -125,9 +126,9 @@ + zipsman: $(ZIPS) $(ZIPMANUALs) + + zip$E: $(OBJZ) $(OBJI) $(OBJA) $(LIB_BZ) +- $(BIND) -o zip$E $(LFLAGS1) $(OBJZ) $(OBJI) $(OBJA) $(LFLAGS2) ++ $(BIND) -o zip$E $(LFLAGS1) $(OBJZ) $(OBJI) $(OBJA) $(LFLAGS2) $(LDADD) + zipnote$E: $(OBJN) +- $(BIND) -o zipnote$E $(LFLAGS1) $(OBJN) $(LFLAGS2) ++ $(BIND) -o zipnote$E $(LFLAGS1) $(OBJN) $(LFLAGS2) $(LDADD) + zipcloak$E: $(OBJC) $(OCRCTB) + $(BIND) -o zipcloak$E $(LFLAGS1) $(OBJC) $(LFLAGS2) + zipsplit$E: $(OBJS) + +=== modified file 'unix/osdep.h' +--- a/unix/osdep.h ++++ b/unix/osdep.h +@@ -78,3 +78,6 @@ + #if !defined(NO_EF_UT_TIME) && !defined(USE_EF_UT_TIME) + # define USE_EF_UT_TIME + #endif ++ ++/* Set Windows code as archive type */ ++# define OS_CODE 0xb00 + +=== modified file 'unix/unix.c' +--- a/unix/unix.c ++++ b/unix/unix.c +@@ -14,6 +14,11 @@ + + #include + ++#ifdef UNIX ++# include ++# include ++#endif ++ + #if defined(MINIX) || defined(__mpexl) + # ifdef S_IWRITE + # undef S_IWRITE +@@ -60,6 +65,7 @@ + + /* Local functions */ + local char *readd OF((DIR *)); ++local const char *oem_charset = NULL; + + + #ifdef NO_DIR /* for AT&T 3B1 */ +@@ -262,6 +268,16 @@ + if (!pathput) + t = last(t, PATH_END); + ++#ifdef UNIX ++ if (!oem_charset) { ++ setlocale(LC_CTYPE, ""); ++ oem_charset = natspec_get_charset_by_locale(NATSPEC_DOSCS, ""); ++ } ++ /* Convert to internal encoding */ ++ if ((n = natspec_convert(t, oem_charset, 0, 0)) == NULL) ++ return NULL; ++ return n; ++#else + /* Malloc space for internal name and copy it */ + if ((n = malloc(strlen(t) + 1)) == NULL) + return NULL; +@@ -269,6 +285,7 @@ + + if (dosify) + msname(n); ++#endif + + #ifdef EBCDIC + strtoasc(n, n); /* here because msname() needs native coding */ +@@ -289,8 +306,19 @@ + { + char *x; /* external file name */ + ++#ifdef UNIX ++ if (!oem_charset) { ++ oem_charset = natspec_get_charset_by_locale(NATSPEC_DOSCS, ""); ++ setlocale(LC_CTYPE, ""); ++ } ++ /* Convert to internal encoding */ ++ if ((x = natspec_convert(n, 0, oem_charset, 0)) == NULL) ++ return NULL; ++ return x; ++#else + if ((x = malloc(strlen(n) + 1 + PAD)) == NULL) + return NULL; ++#endif + #ifdef EBCDIC + strtoebc(x, n); + #else + +=== modified file 'zip.c' +--- a/zip.c ++++ b/zip.c +@@ -2025,6 +2025,7 @@ + #endif /* ?MACOS */ + {"J", "junk-sfx", o_NO_VALUE, o_NOT_NEGATABLE, 'J', "strip self extractor from archive"}, + {"k", "DOS-names", o_NO_VALUE, o_NOT_NEGATABLE, 'k', "force use of 8.3 DOS names"}, ++ {"K", "no DOS-names",o_NO_VALUE, o_NOT_NEGATABLE, 'K', "no use 8.3 DOS names"}, + {"l", "to-crlf", o_NO_VALUE, o_NOT_NEGATABLE, 'l', "convert text file line ends - LF->CRLF"}, + {"ll", "from-crlf", o_NO_VALUE, o_NOT_NEGATABLE, o_ll, "convert text file line ends - CRLF->LF"}, + {"lf", "logfile-path",o_REQUIRED_VALUE, o_NOT_NEGATABLE, o_lf, "log to log file at path (default overwrite)"}, +@@ -2289,7 +2290,7 @@ + dispose = 0; /* 1=remove files after put in zip file */ + pathput = 1; /* 1=store path with name */ + method = BEST; /* one of BEST, DEFLATE (only), or STORE (only) */ +- dosify = 0; /* 1=make new entries look like MSDOS */ ++ dosify = 1; /* 1=make new entries look like MSDOS */ + verbose = 0; /* 1=report oddities in zip file structure */ + fix = 0; /* 1=fix the zip file */ + adjust = 0; /* 1=adjust offsets for sfx'd file (keep preamble) */ +@@ -2859,6 +2860,8 @@ + junk_sfx = 1; break; + case 'k': /* Make entries using DOS names (k for Katz) */ + dosify = 1; break; ++ case 'K': /* Make entries using DOS names (K for Kompat) */ ++ dosify = 0; break; + case 'l': /* Translate end-of-line */ + translate_eol = 1; break; + case o_ll: + +=== modified file 'zipnote.c' +--- a/zipnote.c ++++ b/zipnote.c +@@ -21,6 +21,11 @@ + #include "revision.h" + #include + ++#ifdef UNIX ++# include ++# include ++#endif ++ + /* Calculate size of static line buffer used in write (-w) mode. */ + #define WRBUFSIZ 2047 + /* The line buffer size should be at least as large as FNMAX. */ +@@ -537,7 +542,13 @@ + { + for (z = zfiles; z != NULL; z = z->nxt) + { ++#ifdef UNIX ++ char *oem_charset = NULL; ++ oem_charset = natspec_get_charset_by_locale(NATSPEC_DOSCS, ""); ++ printf("%c %s\n", MARK, natspec_convert(z->zname, 0, oem_charset, 0)); ++#else + printf("%c %s\n", MARK, z->zname); ++#endif + putclean(z->comment, z->com); + printf("%c%s\n", MARK, MARKE); + } + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/zip/files/zip-3.0-no-crypt.patch b/sdk_container/src/third_party/portage-stable/app-arch/zip/files/zip-3.0-no-crypt.patch new file mode 100644 index 0000000000..9a1302c1be --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/zip/files/zip-3.0-no-crypt.patch @@ -0,0 +1,57 @@ +fix building when NO_CRYPT is used + +forward ported from zip-2.32 + +http://bugs.gentoo.org/238398 + +--- a/zip.c ++++ b/zip.c +@@ -3452,6 +3452,9 @@ char **argv; /* command line tokens */ + + /* Key not yet specified. If needed, get/verify it now. */ + if (key_needed) { ++#if !CRYPT ++ ZIPERR(ZE_PARMS, "encryption not supported"); ++#else /* CRYPT */ + if ((key = malloc(IZ_PWLEN+1)) == NULL) { + ZIPERR(ZE_MEM, "was getting encryption password"); + } +@@ -3478,6 +3481,7 @@ char **argv; /* command line tokens */ + if (r) { + ZIPERR(ZE_PARMS, "password verification failed"); + } ++#endif + } + if (key) { + /* if -P "" could get here */ +--- a/zipcloak.c ++++ b/zipcloak.c +@@ -744,6 +744,28 @@ struct option_struct far options[] = { + + int main OF((void)); + ++void zipmessage_nl(a, nl) ++ZCONST char *a; ++int nl; ++{ ++} ++ ++void zipmessage(a, b) ++ZCONST char *a, *b; ++{ ++} ++ ++int set_filetype(out_path) ++ char *out_path; ++{ ++} ++ ++int rename_split(temp_name, out_path) ++ char *temp_name; ++ char *out_path; ++{ ++} ++ + void zipwarn(msg1, msg2) + ZCONST char *msg1, *msg2; + { diff --git a/sdk_container/src/third_party/portage-stable/app-arch/zip/files/zip-3.0-pic.patch b/sdk_container/src/third_party/portage-stable/app-arch/zip/files/zip-3.0-pic.patch new file mode 100644 index 0000000000..89a52e246f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/zip/files/zip-3.0-pic.patch @@ -0,0 +1,15 @@ +if our toolchain generates PIC by default, then do not use the hand written +assembly files as none of it is PIC friendly. + +--- a/unix/configure ++++ b/unix/configure +@@ -29,6 +29,9 @@ + echo Check if we can use asm code + OBJA="" + OCRCU8="" ++piclib="$(echo | $CPP -dM $CFLAGS - | grep -i __pic__)" ++echo "Checking if compiler wants to create pic code" ++[ "$piclib" = "" ] && \ + if eval "$CPP match.S > _match.s 2>/dev/null"; then + if test ! -s _match.s || grep error < _match.s > /dev/null; then + : diff --git a/sdk_container/src/third_party/portage-stable/app-arch/zip/files/zip-3.0-zipnote-freeze.patch b/sdk_container/src/third_party/portage-stable/app-arch/zip/files/zip-3.0-zipnote-freeze.patch new file mode 100644 index 0000000000..28f47d039b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/zip/files/zip-3.0-zipnote-freeze.patch @@ -0,0 +1,61 @@ +diff -dupr zip30-old/fileio.c zip30/fileio.c +--- a/fileio.c ++++ b/fileio.c +@@ -3502,7 +3502,7 @@ zwchar *local_to_wide_string(local_strin + if ((wc_string = (wchar_t *)malloc((wsize + 1) * sizeof(wchar_t))) == NULL) { + ZIPERR(ZE_MEM, "local_to_wide_string"); + } +- wsize = mbstowcs(wc_string, local_string, strlen(local_string) + 1); ++ wsize = mbstowcs(wc_string, local_string, wsize + 1); + wc_string[wsize] = (wchar_t) 0; + + /* in case wchar_t is not zwchar */ +diff -dupr zip30-old/zipfile.c zip30/zipfile.c +--- a/zipfile.c ++++ b/zipfile.c +@@ -5406,7 +5406,9 @@ int putlocal(z, rewrite) + if (z->flg & UTF8_BIT) { + /* If this flag is set, then restore UTF-8 as path name */ + use_uname = 1; ++ tempzn -= nam; + nam = strlen(z->uname); ++ tempzn += nam; + } else { + /* use extra field */ + add_Unicode_Path_local_extra_field(z); +@@ -5647,7 +5650,9 @@ int putcentral(z) + if (z->flg & UTF8_BIT) { + /* If this flag is set, then restore UTF-8 as path name */ + use_uname = 1; ++ tempzn -= nam; + nam = strlen(z->uname); ++ tempzn += nam; + } else { + add_Unicode_Path_cen_extra_field(z); + } +diff -dupr zip30/zipnote.c zip30/zipnote.c +--- a/zipnote.c ++++ b/zipnote.c +@@ -575,6 +575,13 @@ char **argv; /* command line + strcpy(z->iname, a+2); + #endif + ++#ifdef UNICODE_SUPPORT ++#define UTF8_BIT (1 << 11) ++ if (using_utf8) { ++ z->uname = z->iname; ++ } ++#endif ++ + /* + * Don't update z->nam here, we need the old value a little later..... + * The update is handled in zipcopy(). +@@ -661,7 +668,7 @@ char **argv; /* command line + if ((r = zipcopy(z)) != ZE_OK) + ziperr(r, "was copying an entry"); + } +- fclose(x); ++ fclose(in_file); + + /* Write central directory and end of central directory with new comments */ + if ((c = zftello(y)) == (zoff_t)-1) /* get start of central */ diff --git a/sdk_container/src/third_party/portage-stable/app-arch/zip/metadata.xml b/sdk_container/src/third_party/portage-stable/app-arch/zip/metadata.xml new file mode 100644 index 0000000000..a703875414 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/zip/metadata.xml @@ -0,0 +1,14 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + Use dev-libs/libnatspec to correctly decode non-ascii file names archived in Windows. + + + infozip + + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/zip/zip-3.0-r4.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/zip/zip-3.0-r4.ebuild new file mode 100644 index 0000000000..ee3b1b1f08 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/zip/zip-3.0-r4.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit toolchain-funcs flag-o-matic + +MY_P="${PN}${PV//.}" +DESCRIPTION="Info ZIP (encryption support)" +HOMEPAGE="http://www.info-zip.org/" +SRC_URI="mirror://sourceforge/infozip/${MY_P}.zip" + +LICENSE="Info-ZIP" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux" +IUSE="bzip2 crypt natspec unicode" + +DEPEND="${RDEPEND}" +RDEPEND="bzip2? ( app-arch/bzip2 ) + natspec? ( dev-libs/libnatspec )" +BDEPEND="app-arch/unzip" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}/${P}"-no-crypt.patch #238398 + "${FILESDIR}/${P}"-pic.patch + "${FILESDIR}/${P}"-exec-stack.patch #122849 + "${FILESDIR}/${P}"-build.patch #200995 + "${FILESDIR}/${P}"-zipnote-freeze.patch #322047 + "${FILESDIR}/${P}"-format-security.patch #512414 +) + +src_prepare() { + default + use natspec && eapply "${FILESDIR}/${PN}"-3.0-natspec.patch #275244 +} + +src_configure() { + append-cppflags \ + -DLARGE_FILE_SUPPORT \ + -DUIDGID_NOT_16BIT \ + -D$(usex bzip2 '' NO)BZIP2_SUPPORT \ + -D$(usex crypt '' NO)CRYPT \ + -D$(usex unicode '' NO)UNICODE_SUPPORT + # Third arg disables bzip2 logic as we handle it ourselves above. + sh ./unix/configure "$(tc-getCC)" "-I. -DUNIX ${CFLAGS} ${CPPFLAGS}" "${T}" || die + if use bzip2 ; then + sed -i -e "s:LFLAGS2=:&'-lbz2 ':" flags || die + fi +} + +src_compile() { + emake \ + CPP="$(tc-getCPP)" \ + -f unix/Makefile generic +} + +src_install() { + dobin zip zipnote zipsplit + doman man/zip{,note,split}.1 + if use crypt ; then + dobin zipcloak + doman man/zipcloak.1 + fi + dodoc BUGS CHANGES README* TODO WHATSNEW WHERE proginfo/*.txt +} diff --git a/sdk_container/src/third_party/portage-stable/app-arch/zstd/Manifest b/sdk_container/src/third_party/portage-stable/app-arch/zstd/Manifest new file mode 100644 index 0000000000..cd831a81e3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/zstd/Manifest @@ -0,0 +1,4 @@ +DIST zstd-1.4.4.tar.gz 1962617 BLAKE2B e21841a53b6c60703e5500cfc2a02923c4c3e57975aa57e1060310171e0d83d7c8eda1bd0510d5736db5c310d76847d2105ac5f614867fc3a9dc3086a035dfd7 SHA512 8209837e8eb14e474dfe21d5511085f46cef93b03ab77613fd41e7b8be652418231c38852669c8e0b55b78ad41ea2cb8008d0da122a83f8f27e32b5c86f045cf +DIST zstd-1.4.5.tar.gz 1987927 BLAKE2B 1497d4e87040e5c71466468ebf1a57f4073666f2b005229925bc1d95a4b4fcb2a51d88bb79be20f21860e5750da42f8aac21d2997421d07ba37bd6bb12a28b55 SHA512 b03c497c3e0590c3d384cb856e3024f144b2bfac0d805d80e68deafa612c68237f12a2d657416d476a28059e80936c79f099fc42331464b417593895ea214387 +DIST zstd-1.4.8.tar.gz 1816546 BLAKE2B 950d03c408e9d3fc2081969553c46247a1b8c13a22542effbf70373625bbfeb2a810e0adf0e1c6180cef590e7a28487191b1a577982fddc7a00d1507b461efd5 SHA512 61ce5d61e24770e70c32680f32d58542d6a1b5cc65737256561d8e34c77a82c1d36c769c179da5ea8ed5ecb035b4a4af292b9717c65976172e282859a332137a +DIST zstd-1.4.9.tar.gz 1834843 BLAKE2B 907f492bd023db9459bdc292a0bc4d1b6336d92dd7041eb2b36668589c20fcb98c411b85d78f92cd16d9b4a000d9c4125b5f966a5ca777034ae78210e639315b SHA512 f529db9c094f9ae26428bf1fdfcc91c6d783d400980e0f0d802d2cf13c2be2931465ef568907e03841ff76a369a1447e7371f8799d8526edb9a513ba5c6db133 diff --git a/sdk_container/src/third_party/portage-stable/app-arch/zstd/files/zstd-1.4.4-make43.patch b/sdk_container/src/third_party/portage-stable/app-arch/zstd/files/zstd-1.4.4-make43.patch new file mode 100644 index 0000000000..679e0b791e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/zstd/files/zstd-1.4.4-make43.patch @@ -0,0 +1,60 @@ +From 06a57cf57e3c4e887cadcf688e3081154f3f6db4 Mon Sep 17 00:00:00 2001 +From: Bimba Shrestha +Date: Thu, 6 Feb 2020 14:10:51 -0800 +Subject: [PATCH] [build-issue] More portable header prefix usage (#) (#1987) + +* make 4.3 build issue fix + +* Changing header name and adding comment +--- + programs/Makefile | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/programs/Makefile b/programs/Makefile +index b75314a8..a9ee3cb5 100644 +--- a/programs/Makefile ++++ b/programs/Makefile +@@ -94,9 +94,12 @@ endif + + VOID = /dev/null + ++# Make 4.3 doesn't support '\#' anymore (https://lwn.net/Articles/810071/) ++NUM_SYMBOL := \# ++ + # thread detection + NO_THREAD_MSG := ==> no threads, building without multithreading support +-HAVE_PTHREAD := $(shell printf '\#include \nint main(void) { return 0; }' > have_pthread.c && $(CC) $(FLAGS) -o have_pthread$(EXT) have_pthread.c -pthread 2> $(VOID) && rm have_pthread$(EXT) && echo 1 || echo 0; rm have_pthread.c) ++HAVE_PTHREAD := $(shell printf '$(NUM_SYMBOL)include \nint main(void) { return 0; }' > have_pthread.c && $(CC) $(FLAGS) -o have_pthread$(EXT) have_pthread.c -pthread 2> $(VOID) && rm have_pthread$(EXT) && echo 1 || echo 0; rm have_pthread.c) + HAVE_THREAD := $(shell [ "$(HAVE_PTHREAD)" -eq "1" -o -n "$(filter Windows%,$(OS))" ] && echo 1 || echo 0) + ifeq ($(HAVE_THREAD), 1) + THREAD_MSG := ==> building with threading support +@@ -108,7 +111,7 @@ endif + + # zlib detection + NO_ZLIB_MSG := ==> no zlib, building zstd without .gz support +-HAVE_ZLIB := $(shell printf '\#include \nint main(void) { return 0; }' > have_zlib.c && $(CC) $(FLAGS) -o have_zlib$(EXT) have_zlib.c -lz 2> $(VOID) && rm have_zlib$(EXT) && echo 1 || echo 0; rm have_zlib.c) ++HAVE_ZLIB := $(shell printf '$(NUM_SYMBOL)include \nint main(void) { return 0; }' > have_zlib.c && $(CC) $(FLAGS) -o have_zlib$(EXT) have_zlib.c -lz 2> $(VOID) && rm have_zlib$(EXT) && echo 1 || echo 0; rm have_zlib.c) + ifeq ($(HAVE_ZLIB), 1) + ZLIB_MSG := ==> building zstd with .gz compression support + ZLIBCPP = -DZSTD_GZCOMPRESS -DZSTD_GZDECOMPRESS +@@ -119,7 +122,7 @@ endif + + # lzma detection + NO_LZMA_MSG := ==> no liblzma, building zstd without .xz/.lzma support +-HAVE_LZMA := $(shell printf '\#include \nint main(void) { return 0; }' > have_lzma.c && $(CC) $(FLAGS) -o have_lzma$(EXT) have_lzma.c -llzma 2> $(VOID) && rm have_lzma$(EXT) && echo 1 || echo 0; rm have_lzma.c) ++HAVE_LZMA := $(shell printf '$(NUM_SYMBOL)include \nint main(void) { return 0; }' > have_lzma.c && $(CC) $(FLAGS) -o have_lzma$(EXT) have_lzma.c -llzma 2> $(VOID) && rm have_lzma$(EXT) && echo 1 || echo 0; rm have_lzma.c) + ifeq ($(HAVE_LZMA), 1) + LZMA_MSG := ==> building zstd with .xz/.lzma compression support + LZMACPP = -DZSTD_LZMACOMPRESS -DZSTD_LZMADECOMPRESS +@@ -130,7 +133,7 @@ endif + + # lz4 detection + NO_LZ4_MSG := ==> no liblz4, building zstd without .lz4 support +-HAVE_LZ4 := $(shell printf '\#include \n\#include \nint main(void) { return 0; }' > have_lz4.c && $(CC) $(FLAGS) -o have_lz4$(EXT) have_lz4.c -llz4 2> $(VOID) && rm have_lz4$(EXT) && echo 1 || echo 0; rm have_lz4.c) ++HAVE_LZ4 := $(shell printf '$(NUM_SYMBOL)include \n\#include \nint main(void) { return 0; }' > have_lz4.c && $(CC) $(FLAGS) -o have_lz4$(EXT) have_lz4.c -llz4 2> $(VOID) && rm have_lz4$(EXT) && echo 1 || echo 0; rm have_lz4.c) + ifeq ($(HAVE_LZ4), 1) + LZ4_MSG := ==> building zstd with .lz4 compression support + LZ4CPP = -DZSTD_LZ4COMPRESS -DZSTD_LZ4DECOMPRESS +-- +2.24.1 + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/zstd/files/zstd-1.4.4-pkgconfig_libdir.patch b/sdk_container/src/third_party/portage-stable/app-arch/zstd/files/zstd-1.4.4-pkgconfig_libdir.patch new file mode 100644 index 0000000000..e8d745a56a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/zstd/files/zstd-1.4.4-pkgconfig_libdir.patch @@ -0,0 +1,215 @@ +From e668c9b52896e1cf92c99da3b01e3bdbbae77100 Mon Sep 17 00:00:00 2001 +From: "W. Felix Handte" +Date: Tue, 18 Feb 2020 10:50:38 -0500 +Subject: [PATCH 1/3] Fix pkg-config File Generation Again + +Revises #1851. Fixes #1900. Replaces #1930. + +Thanks to @orbea, @neheb, @Polynomial-C, and particularly @eli-schwartz for +pointing out the problem and suggesting solutions. + +Tested with + + ``` + make -C lib clean libzstd.pc + cat lib/libzstd.pc + + # should fail + make -C lib clean libzstd.pc LIBDIR=/foo + make -C lib clean libzstd.pc INCLUDEDIR=/foo + make -C lib clean libzstd.pc LIBDIR=/usr/localfoo + make -C lib clean libzstd.pc INCLUDEDIR=/usr/localfoo + make -C lib clean libzstd.pc LIBDIR=/usr/local/lib prefix=/foo + make -C lib clean libzstd.pc INCLUDEDIR=/usr/local/include prefix=/foo + + # should succeed + make -C lib clean libzstd.pc LIBDIR=/usr/local/foo + make -C lib clean libzstd.pc INCLUDEDIR=/usr/local/foo + make -C lib clean libzstd.pc LIBDIR=/usr/local/ + make -C lib clean libzstd.pc INCLUDEDIR=/usr/local/ + make -C lib clean libzstd.pc LIBDIR=/usr/local + make -C lib clean libzstd.pc INCLUDEDIR=/usr/local + make -C lib clean libzstd.pc LIBDIR=/tmp/foo prefix=/tmp + make -C lib clean libzstd.pc INCLUDEDIR=/tmp/foo prefix=/tmp + make -C lib clean libzstd.pc LIBDIR=/tmp/foo prefix=/tmp/foo + make -C lib clean libzstd.pc INCLUDEDIR=/tmp/foo prefix=/tmp/foo + + # should also succeed + make -C lib clean libzstd.pc prefix=/foo LIBDIR=/foo/bar INCLUDEDIR=/foo/ + cat lib/libzstd.pc + + mkdir out + cd out + cmake ../build/cmake + make + cat lib/libzstd.pc + ``` +--- + build/cmake/lib/CMakeLists.txt | 5 +++-- + lib/Makefile | 14 ++++++++++++-- + lib/libzstd.pc.in | 4 ++-- + 3 files changed, 17 insertions(+), 6 deletions(-) + +diff --git a/build/cmake/lib/CMakeLists.txt b/build/cmake/lib/CMakeLists.txt +index e92647bf1..29ff57aa0 100644 +--- a/build/cmake/lib/CMakeLists.txt ++++ b/build/cmake/lib/CMakeLists.txt +@@ -134,11 +134,12 @@ endif () + if (UNIX) + # pkg-config + set(PREFIX "${CMAKE_INSTALL_PREFIX}") +- set(LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}") ++ set(LIBDIR "${CMAKE_INSTALL_LIBDIR}") ++ set(INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}") + set(VERSION "${zstd_VERSION_MAJOR}.${zstd_VERSION_MINOR}.${zstd_VERSION_PATCH}") + add_custom_target(libzstd.pc ALL + ${CMAKE_COMMAND} -DIN="${LIBRARY_DIR}/libzstd.pc.in" -DOUT="libzstd.pc" +- -DPREFIX="${PREFIX}" -DVERSION="${VERSION}" ++ -DPREFIX="${PREFIX}" -DLIBDIR="${LIBDIR}" -DINCLUDEDIR="${INCLUDEDIR}" -DVERSION="${VERSION}" + -P "${CMAKE_CURRENT_SOURCE_DIR}/pkgconfig.cmake" + COMMENT "Creating pkg-config file") + +diff --git a/lib/Makefile b/lib/Makefile +index fd1710cf1..dbd64994c 100644 +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -224,6 +224,16 @@ LIBDIR ?= $(libdir) + includedir ?= $(PREFIX)/include + INCLUDEDIR ?= $(includedir) + ++PCLIBDIR ?= $(shell echo "$(LIBDIR)" | sed -n -e "s@^$(exec_prefix)\\(/\\|$$\\)@@p") ++PCINCDIR ?= $(shell echo "$(INCLUDEDIR)" | sed -n -e "s@^$(prefix)\\(/\\|$$\\)@@p") ++ ++ifeq (,$(shell echo "$(LIBDIR)" | sed -n -e "\\@^$(exec_prefix)\\(/\\|$$\\)@ p")) ++$(error configured libdir ($(LIBDIR)) is outside of prefix ($(prefix)), can't generate pkg-config file) ++endif ++ifeq (,$(shell echo "$(INCLUDEDIR)" | sed -n -e "\\@^$(prefix)\\(/\\|$$\\)@ p")) ++$(error configured includedir ($(INCLUDEDIR)) is outside of exec_prefix ($(exec_prefix)), can't generate pkg-config file) ++endif ++ + ifneq (,$(filter $(shell uname),FreeBSD NetBSD DragonFly)) + PKGCONFIGDIR ?= $(PREFIX)/libdata/pkgconfig + else +@@ -239,11 +249,11 @@ endif + INSTALL_PROGRAM ?= $(INSTALL) + INSTALL_DATA ?= $(INSTALL) -m 644 + +- +-libzstd.pc: + libzstd.pc: libzstd.pc.in + @echo creating pkgconfig + @sed -e 's|@PREFIX@|$(PREFIX)|' \ ++ -e 's|@LIBDIR@|$(PCLIBDIR)|' \ ++ -e 's|@INCLUDEDIR@|$(PCINCDIR)|' \ + -e 's|@VERSION@|$(VERSION)|' \ + $< >$@ + +diff --git a/lib/libzstd.pc.in b/lib/libzstd.pc.in +index e7880be47..8ec0235ad 100644 +--- a/lib/libzstd.pc.in ++++ b/lib/libzstd.pc.in +@@ -4,8 +4,8 @@ + + prefix=@PREFIX@ + exec_prefix=${prefix} +-includedir=${prefix}/include +-libdir=${exec_prefix}/lib ++includedir=${prefix}/@INCLUDEDIR@ ++libdir=${exec_prefix}/@LIBDIR@ + + Name: zstd + Description: fast lossless compression algorithm library + +From 73737231b95976f24b7b9bff96240976b11dcce0 Mon Sep 17 00:00:00 2001 +From: "W. Felix Handte" +Date: Tue, 18 Feb 2020 13:17:17 -0500 +Subject: [PATCH 2/3] Allow Manual Overriding of pkg-config Lib and Include + Dirs + +When the `PCLIBDIR` or `PCINCDIR` is non-empty (either because we succeeded +in removing the prefix, or because it was manually set), we don't need to +perform the check. This lets us trust users who go to the trouble of setting +a manual override, rather than still blindly failing the make. + +They'll still be prefixed with `${prefix}/` / `${exec_prefix}/` in the +pkg-config file though. +--- + lib/Makefile | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/lib/Makefile b/lib/Makefile +index dbd64994c..b067c11a2 100644 +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -227,12 +227,21 @@ INCLUDEDIR ?= $(includedir) + PCLIBDIR ?= $(shell echo "$(LIBDIR)" | sed -n -e "s@^$(exec_prefix)\\(/\\|$$\\)@@p") + PCINCDIR ?= $(shell echo "$(INCLUDEDIR)" | sed -n -e "s@^$(prefix)\\(/\\|$$\\)@@p") + ++ifeq (,$(PCLIBDIR)) ++# Additional prefix check is required, since the empty string is technically a ++# valid PCLIBDIR + ifeq (,$(shell echo "$(LIBDIR)" | sed -n -e "\\@^$(exec_prefix)\\(/\\|$$\\)@ p")) + $(error configured libdir ($(LIBDIR)) is outside of prefix ($(prefix)), can't generate pkg-config file) + endif ++endif ++ ++ifeq (,$(PCINCDIR)) ++# Additional prefix check is required, since the empty string is technically a ++# valid PCINCDIR + ifeq (,$(shell echo "$(INCLUDEDIR)" | sed -n -e "\\@^$(prefix)\\(/\\|$$\\)@ p")) + $(error configured includedir ($(INCLUDEDIR)) is outside of exec_prefix ($(exec_prefix)), can't generate pkg-config file) + endif ++endif + + ifneq (,$(filter $(shell uname),FreeBSD NetBSD DragonFly)) + PKGCONFIGDIR ?= $(PREFIX)/libdata/pkgconfig + +From e5ef935cf6160768e20cd73db3d9450aa8b7f8cf Mon Sep 17 00:00:00 2001 +From: "W. Felix Handte" +Date: Tue, 18 Feb 2020 13:40:58 -0500 +Subject: [PATCH 3/3] Fix Variable Capitalization + +--- + lib/Makefile | 15 ++++++++------- + 1 file changed, 8 insertions(+), 7 deletions(-) + +diff --git a/lib/Makefile b/lib/Makefile +index b067c11a2..db35207bb 100644 +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -219,27 +219,28 @@ DESTDIR ?= + prefix ?= /usr/local + PREFIX ?= $(prefix) + exec_prefix ?= $(PREFIX) +-libdir ?= $(exec_prefix)/lib ++EXEC_PREFIX ?= $(exec_prefix) ++libdir ?= $(EXEC_PREFIX)/lib + LIBDIR ?= $(libdir) + includedir ?= $(PREFIX)/include + INCLUDEDIR ?= $(includedir) + +-PCLIBDIR ?= $(shell echo "$(LIBDIR)" | sed -n -e "s@^$(exec_prefix)\\(/\\|$$\\)@@p") +-PCINCDIR ?= $(shell echo "$(INCLUDEDIR)" | sed -n -e "s@^$(prefix)\\(/\\|$$\\)@@p") ++PCLIBDIR ?= $(shell echo "$(LIBDIR)" | sed -n -e "s@^$(EXEC_PREFIX)\\(/\\|$$\\)@@p") ++PCINCDIR ?= $(shell echo "$(INCLUDEDIR)" | sed -n -e "s@^$(PREFIX)\\(/\\|$$\\)@@p") + + ifeq (,$(PCLIBDIR)) + # Additional prefix check is required, since the empty string is technically a + # valid PCLIBDIR +-ifeq (,$(shell echo "$(LIBDIR)" | sed -n -e "\\@^$(exec_prefix)\\(/\\|$$\\)@ p")) +-$(error configured libdir ($(LIBDIR)) is outside of prefix ($(prefix)), can't generate pkg-config file) ++ifeq (,$(shell echo "$(LIBDIR)" | sed -n -e "\\@^$(EXEC_PREFIX)\\(/\\|$$\\)@ p")) ++$(error configured libdir ($(LIBDIR)) is outside of prefix ($(PREFIX)), can't generate pkg-config file) + endif + endif + + ifeq (,$(PCINCDIR)) + # Additional prefix check is required, since the empty string is technically a + # valid PCINCDIR +-ifeq (,$(shell echo "$(INCLUDEDIR)" | sed -n -e "\\@^$(prefix)\\(/\\|$$\\)@ p")) +-$(error configured includedir ($(INCLUDEDIR)) is outside of exec_prefix ($(exec_prefix)), can't generate pkg-config file) ++ifeq (,$(shell echo "$(INCLUDEDIR)" | sed -n -e "\\@^$(PREFIX)\\(/\\|$$\\)@ p")) ++$(error configured includedir ($(INCLUDEDIR)) is outside of exec_prefix ($(EXEC_PREFIX)), can't generate pkg-config file) + endif + endif + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/zstd/files/zstd-1.4.5-fix-uclibc-ng.patch b/sdk_container/src/third_party/portage-stable/app-arch/zstd/files/zstd-1.4.5-fix-uclibc-ng.patch new file mode 100644 index 0000000000..e4c2335d19 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/zstd/files/zstd-1.4.5-fix-uclibc-ng.patch @@ -0,0 +1,28 @@ +From 1dcc4787965aa8f4af48ed5a2154185750bbaff5 Mon Sep 17 00:00:00 2001 +From: Yann Collet +Date: Mon, 13 Jul 2020 14:16:33 -0700 +Subject: [PATCH] fix uclibc's st_mtim + +reported and suggested by @ewildgoose (#1872) +--- + programs/platform.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/programs/platform.h b/programs/platform.h +index 2b4b9f2d8..68be70bb3 100644 +--- a/programs/platform.h ++++ b/programs/platform.h +@@ -102,6 +102,12 @@ extern "C" { + # define PLATFORM_POSIX_VERSION 1 + # endif + ++# ifdef __UCLIBC__ ++# ifndef __USE_MISC ++# define __USE_MISC /* enable st_mtim on uclibc */ ++# endif ++# endif ++ + # else /* non-unix target platform (like Windows) */ + # define PLATFORM_POSIX_VERSION 0 + # endif + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/zstd/metadata.xml b/sdk_container/src/third_party/portage-stable/app-arch/zstd/metadata.xml new file mode 100644 index 0000000000..b9782eebc3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/zstd/metadata.xml @@ -0,0 +1,11 @@ + + + + + patrick@gentoo.org + Patrick Lauer + + + facebook/zstd + + diff --git a/sdk_container/src/third_party/portage-stable/app-arch/zstd/zstd-1.4.4-r4.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/zstd/zstd-1.4.4-r4.ebuild new file mode 100644 index 0000000000..b361ae879f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/zstd/zstd-1.4.4-r4.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic multilib-minimal toolchain-funcs + +DESCRIPTION="zstd fast compression library" +HOMEPAGE="https://facebook.github.io/zstd/" +SRC_URI="https://github.com/facebook/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="|| ( BSD GPL-2 )" +SLOT="0/1" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="lz4 static-libs +threads" + +RDEPEND="app-arch/xz-utils + lz4? ( app-arch/lz4 )" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}/${P}-pkgconfig_libdir.patch" #700780 + "${FILESDIR}/${P}-make43.patch" #708110 + "${FILESDIR}/${PN}-1.4.5-fix-uclibc-ng.patch" #741972 +) + +src_prepare() { + default + multilib_copy_sources + + # Workaround #713940 / https://github.com/facebook/zstd/issues/2045 + # where upstream build system does not add -pthread for Makefile-based + # build system. + use threads && append-flags $(test-flags-CCLD -pthread) +} + +mymake() { + emake \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + AR="$(tc-getAR)" \ + PREFIX="${EPREFIX}/usr" \ + LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ + "${@}" +} + +multilib_src_compile() { + local libzstd_targets=( libzstd{,.a}$(usex threads '-mt' '') ) + + mymake -C lib ${libzstd_targets[@]} libzstd.pc + + if multilib_is_native_abi ; then + mymake HAVE_LZ4="$(usex lz4 1 0)" zstd + + mymake -C contrib/pzstd + fi +} + +multilib_src_install() { + mymake -C lib DESTDIR="${D}" install + + if multilib_is_native_abi ; then + mymake -C programs DESTDIR="${D}" install + + mymake -C contrib/pzstd DESTDIR="${D}" install + fi +} + +multilib_src_install_all() { + einstalldocs + + if ! use static-libs; then + find "${ED}" -name "*.a" -delete || die + fi +} diff --git a/sdk_container/src/third_party/portage-stable/app-arch/zstd/zstd-1.4.5.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/zstd/zstd-1.4.5.ebuild new file mode 100644 index 0000000000..e8a10f3572 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/zstd/zstd-1.4.5.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic multilib-minimal toolchain-funcs + +DESCRIPTION="zstd fast compression library" +HOMEPAGE="https://facebook.github.io/zstd/" +SRC_URI="https://github.com/facebook/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="|| ( BSD GPL-2 )" +SLOT="0/1" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="lz4 static-libs +threads" + +RDEPEND="app-arch/xz-utils + lz4? ( app-arch/lz4 )" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}/${P}-fix-uclibc-ng.patch" #741972 +) + +src_prepare() { + default + multilib_copy_sources + + # Workaround #713940 / https://github.com/facebook/zstd/issues/2045 + # where upstream build system does not add -pthread for Makefile-based + # build system. + use threads && append-flags $(test-flags-CCLD -pthread) +} + +mymake() { + emake \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + AR="$(tc-getAR)" \ + PREFIX="${EPREFIX}/usr" \ + LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ + "${@}" +} + +multilib_src_compile() { + local libzstd_targets=( libzstd{,.a}$(usex threads '-mt' '') ) + + mymake -C lib ${libzstd_targets[@]} libzstd.pc + + if multilib_is_native_abi ; then + mymake HAVE_LZ4="$(usex lz4 1 0)" zstd + + mymake -C contrib/pzstd + fi +} + +multilib_src_install() { + mymake -C lib DESTDIR="${D}" install + + if multilib_is_native_abi ; then + mymake -C programs DESTDIR="${D}" install + + mymake -C contrib/pzstd DESTDIR="${D}" install + fi +} + +multilib_src_install_all() { + einstalldocs + + if ! use static-libs; then + find "${ED}" -name "*.a" -delete || die + fi +} diff --git a/sdk_container/src/third_party/portage-stable/app-arch/zstd/zstd-1.4.8-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/zstd/zstd-1.4.8-r1.ebuild new file mode 100644 index 0000000000..a7b21ee6fe --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/zstd/zstd-1.4.8-r1.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic multilib-minimal toolchain-funcs + +DESCRIPTION="zstd fast compression library" +HOMEPAGE="https://facebook.github.io/zstd/" +SRC_URI="https://github.com/facebook/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="|| ( BSD GPL-2 )" +SLOT="0/1" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="lz4 static-libs +threads" + +RDEPEND="app-arch/xz-utils + lz4? ( app-arch/lz4 )" +DEPEND="${RDEPEND}" + +src_prepare() { + default + multilib_copy_sources + + # Workaround #713940 / https://github.com/facebook/zstd/issues/2045 + # where upstream build system does not add -pthread for Makefile-based + # build system. + use threads && append-flags $(test-flags-CCLD -pthread) +} + +mymake() { + emake \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + AR="$(tc-getAR)" \ + PREFIX="${EPREFIX}/usr" \ + LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ + "${@}" +} + +multilib_src_compile() { + local libzstd_targets=( libzstd{,.a}$(usex threads '-mt' '') ) + + mymake -C lib ${libzstd_targets[@]} libzstd.pc + + if multilib_is_native_abi ; then + mymake HAVE_LZ4="$(usex lz4 1 0)" zstd + + mymake -C contrib/pzstd + fi +} + +multilib_src_install() { + mymake -C lib DESTDIR="${D}" install + + if multilib_is_native_abi ; then + mymake -C programs DESTDIR="${D}" install + + mymake -C contrib/pzstd DESTDIR="${D}" install + fi +} + +multilib_src_install_all() { + einstalldocs + + if ! use static-libs; then + find "${ED}" -name "*.a" -delete || die + fi +} diff --git a/sdk_container/src/third_party/portage-stable/app-arch/zstd/zstd-1.4.9.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/zstd/zstd-1.4.9.ebuild new file mode 100644 index 0000000000..a7b21ee6fe --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/zstd/zstd-1.4.9.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic multilib-minimal toolchain-funcs + +DESCRIPTION="zstd fast compression library" +HOMEPAGE="https://facebook.github.io/zstd/" +SRC_URI="https://github.com/facebook/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="|| ( BSD GPL-2 )" +SLOT="0/1" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="lz4 static-libs +threads" + +RDEPEND="app-arch/xz-utils + lz4? ( app-arch/lz4 )" +DEPEND="${RDEPEND}" + +src_prepare() { + default + multilib_copy_sources + + # Workaround #713940 / https://github.com/facebook/zstd/issues/2045 + # where upstream build system does not add -pthread for Makefile-based + # build system. + use threads && append-flags $(test-flags-CCLD -pthread) +} + +mymake() { + emake \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + AR="$(tc-getAR)" \ + PREFIX="${EPREFIX}/usr" \ + LIBDIR="${EPREFIX}/usr/$(get_libdir)" \ + "${@}" +} + +multilib_src_compile() { + local libzstd_targets=( libzstd{,.a}$(usex threads '-mt' '') ) + + mymake -C lib ${libzstd_targets[@]} libzstd.pc + + if multilib_is_native_abi ; then + mymake HAVE_LZ4="$(usex lz4 1 0)" zstd + + mymake -C contrib/pzstd + fi +} + +multilib_src_install() { + mymake -C lib DESTDIR="${D}" install + + if multilib_is_native_abi ; then + mymake -C programs DESTDIR="${D}" install + + mymake -C contrib/pzstd DESTDIR="${D}" install + fi +} + +multilib_src_install_all() { + einstalldocs + + if ! use static-libs; then + find "${ED}" -name "*.a" -delete || die + fi +} diff --git a/sdk_container/src/third_party/portage-stable/app-cdr/cdrtools/Manifest b/sdk_container/src/third_party/portage-stable/app-cdr/cdrtools/Manifest new file mode 100644 index 0000000000..fc7d8c0b34 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-cdr/cdrtools/Manifest @@ -0,0 +1 @@ +DIST cdrtools-3.02a09.tar.bz2 2156745 BLAKE2B 3e7a7ed65faffc67d53df8dff78562dd28f2e71bb01c36f9c57c033a4a812e6a5579a212322a15c8abb5c8005d38e6e9ba5a5bfab46d9a729a673aa8ce3425e7 SHA512 59c31186f163c7aaa96083efeb0bc31e697c5d53d3343ec487eddd90dc8df6cfee50a69859a64a7004585c73a081cc453cc647c563b32ef74070d075039342d4 diff --git a/sdk_container/src/third_party/portage-stable/app-cdr/cdrtools/cdrtools-3.02_alpha09-r3.ebuild b/sdk_container/src/third_party/portage-stable/app-cdr/cdrtools/cdrtools-3.02_alpha09-r3.ebuild new file mode 100644 index 0000000000..5079d36212 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-cdr/cdrtools/cdrtools-3.02_alpha09-r3.ebuild @@ -0,0 +1,278 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit fcaps toolchain-funcs flag-o-matic gnuconfig + +MY_P="${P/_alpha/a}" + +DESCRIPTION="A set of tools for CD/DVD reading and recording, including cdrecord" +HOMEPAGE="https://sourceforge.net/projects/cdrtools/" +SRC_URI="mirror://sourceforge/${PN}/$([[ -z ${PV/*_alpha*} ]] && echo 'alpha')/${MY_P}.tar.bz2" + +LICENSE="GPL-2 LGPL-2.1 CDDL-Schily" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris" +IUSE="acl caps nls unicode selinux" + +BDEPEND=" + nls? ( >=sys-devel/gettext-0.18.1.1 ) + x11-misc/makedepend +" +RDEPEND=" + acl? ( virtual/acl ) + caps? ( sys-libs/libcap ) + nls? ( virtual/libintl ) + selinux? ( sec-policy/selinux-cdrecord ) +" +DEPEND=" + ${RDEPEND} +" + +S=${WORKDIR}/${P/_alpha[0-9][0-9]} + +FILECAPS=( + cap_sys_resource,cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_ipc_lock,cap_sys_rawio+ep usr/bin/cdrecord -- + cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_sys_rawio+ep usr/bin/cdda2wav -- + cap_dac_override,cap_sys_admin,cap_net_bind_service,cap_sys_rawio+ep usr/bin/readcd +) + +cdrtools_os() { + local os="linux" + [[ ${CHOST} == *-darwin* ]] && os="mac-os10" + echo "${os}" +} + +src_prepare() { + default + + gnuconfig_update + + # Remove profiled make files. + find -name '*_p.mk' -delete || die "delete *_p.mk" + + # Adjusting hardcoded paths. + sed -i -e "s|opt/schily|usr|" \ + $(find ./ -type f -name \*.[0-9ch] -exec grep -l 'opt/schily' '{}' '+') \ + || die "sed opt/schily" + + sed -i -e "s|\(^INSDIR=\t\tshare/doc/\)|\1${PF}/|" \ + $(find ./ -type f -exec grep -l '^INSDIR.\+doc' '{}' '+') \ + || die "sed doc" + + # Respect libdir. + sed -i -e "s|\(^INSDIR=\t\t\)lib|\1$(get_libdir)|" \ + $(find ./ -type f -exec grep -l '^INSDIR.\+lib\(/siconv\)\?$' '{}' '+') \ + || die "sed multilib" + + # Do not install static libraries. + sed -i -e "s|include\t\t.*rules.lib||" \ + $(find ./ -type f -exec grep -l '^include.\+rules\.lib' '{}' '+') \ + || die "sed rules" + + # Enable verbose build. + sed -i -e '/@echo.*==>.*;/s:@echo[^;]*;:&set -x;:' \ + RULES/*.rul RULES/rules.prg RULES/rules.inc \ + || die "sed verbose rules" + + # Respect CC/CXX variables. + cd "${S}"/RULES || die + local tcCC="$(tc-getCC)" + local tcCXX="$(tc-getCXX)" + # fix RISC-V build err, bug 811375 + ln -s i586-linux-cc.rul riscv-linux-cc.rul || die + ln -s i586-linux-cc.rul riscv64-linux-cc.rul || die + + sed -i -e "/cc-config.sh/s|\$(C_ARCH:%64=%) \$(CCOM_DEF)|${tcCC} ${tcCC}|" \ + rules1.top || die "sed rules1.top" + sed -i -e "/^CC_COM_DEF=/s|gcc|${tcCC}|" \ + -e "/^CC++_COM_DEF=/s|g++|${tcCXX}|" \ + -e "/COPTOPT=/s|-O||" \ + -e 's|$(GCCOPTOPT)||' \ + cc-gcc.rul || die "sed cc-gcc.rul" + sed -i -e "s|^#\(CONFFLAGS +=\).*|\1\t-cc=${tcCC}|" \ + rules.cnf || die "sed rules.cnf" + + # Schily make setup. + cd "${S}"/DEFAULTS || die + local os=$(cdrtools_os) + + sed -i \ + -e "s|^\(DEFLINKMODE=\).*|\1\tdynamic|" \ + -e "s|^\(LINUX_INCL_PATH=\).*|\1|" \ + -e "s|^\(LDPATH=\).*|\1|" \ + -e "s|^\(RUNPATH=\).*|\1|" \ + -e "s|^\(INS_BASE=\).*|\1\t${ED}/usr|" \ + -e "s|^\(INS_RBASE=\).*|\1\t${ED}|" \ + -e "s|^\(DEFINSGRP=\).*|\1\t0|" \ + -e '/^DEFUMASK/s,002,022,g' \ + Defaults.${os} || die "sed Schily make setup" + # re DEFUMASK above: + # bug 486680: grsec TPE will block the exec if the directory is + # group-writable. This is painful with cdrtools, because it makes a bunch of + # group-writable directories during build. Change the umask on their + # creation to prevent this. +} + +ac_cv_sizeof() { + cat <<-EOF >"${T}"/test.c + #include + #include + #include + #include + int main () { + static int test_array [1 - 2 * !((sizeof(TYPE)) == LEN)]; + test_array [0] = 0; + return test_array [0]; + } + EOF + + local i=1 + while [[ ${i} -lt 20 ]] ; do + if ${CC} ${CPPFLAGS} ${CFLAGS} -c "${T}"/test.c -o /dev/null -DTYPE="$1" -DLEN=$i 2>/dev/null; then + echo ${i} + return 0 + fi + : $(( i += 1 )) + done + return 1 +} + +src_configure() { + use acl || export ac_cv_header_sys_acl_h="no" + use caps || export ac_cv_lib_cap_cap_get_proc="no" + export ac_cv_header_pulse_pulseaudio_h="no" + export ac_cv_header_alsa_asoundlib_h="no" + export ac_cv_lib_asound_snd_pcm_open="no" + + # skip obsolete configure script + if tc-is-cross-compiler ; then + # Cache known values for targets. #486680 + + tc-export CC + local var val t types=( + char "short int" int "long int" "long long" + "unsigned char" "unsigned short int" "unsigned int" + "unsigned long int" "unsigned long long" + float double "long double" size_t ssize_t ptrdiff_t + mode_t uid_t gid_t pid_t dev_t time_t wchar_t + "char *" "unsigned char *" + ) + for t in "${types[@]}" ; do + var="ac_cv_sizeof_${t// /_}" + var=${var//[*]/p} + val=$(ac_cv_sizeof "${t}") || die "could not compute ${t}" + export "${var}=${val}" + einfo "Computing sizeof(${t}) as ${val}" + done + # We don't have these types. + export ac_cv_sizeof___int64=0 + export ac_cv_sizeof_unsigned___int64=0 + export ac_cv_sizeof_major_t=${ac_cv_sizeof_dev_t} + export ac_cv_sizeof_minor_t=${ac_cv_sizeof_dev_t} + export ac_cv_sizeof_wchar=${ac_cv_sizeof_wchar_t} + + export ac_cv_type_prototypes="yes" + export ac_cv_func_mlock{,all}="yes" + export ac_cv_func_{e,f,g}cvt=$(usex elibc_glibc) + export ac_cv_func_dtoa_r="no" + export ac_cv_func_sys_siglist{,_def}="no" + export ac_cv_func_printf_{j,ll}="yes" + export ac_cv_realloc_null="yes" + export ac_cv_no_user_malloc="no" + export ac_cv_var_timezone="yes" + export ac_cv_var___progname{,_full}="yes" + export ac_cv_fnmatch_igncase="yes" + export ac_cv_file__dev_{fd_{0,1,2},null,std{err,in,out},tty,zero}="yes" + export ac_cv_file__usr_src_linux_include="no" + + case $(cdrtools_os) in + linux) + export ac_cv_func_bsd_{g,s}etpgrp="no" + export ac_cv_hard_symlinks="yes" + export ac_cv_link_nofollow="yes" + export ac_cv_access_e_ok="no" + + export ac_cv_dev_minor_noncontig="yes" + case ${ac_cv_sizeof_long_int} in + 4) export ac_cv_dev_minor_bits="32";; + 8) export ac_cv_dev_minor_bits="44";; + esac + + cat <<-EOF >"${T}"/test.c + struct { + char start[6]; + unsigned char x1:4; + unsigned char x2:4; + char end[5]; + } a = { + .start = {'S', 't', 'A', 'r', 'T', '_'}, + .x1 = 5, + .x2 = 4, + .end = {'_', 'e', 'N', 'd', 'X'}, + }; + EOF + ${CC} ${CPPFLAGS} ${CFLAGS} -c "${T}"/test.c -o "${T}"/test.o + if grep -q 'StArT_E_eNdX' "${T}"/test.o ; then + export ac_cv_c_bitfields_htol="no" + elif grep -q 'StArT_T_eNdX' "${T}"/test.o ; then + export ac_cv_c_bitfields_htol="yes" + fi + ;; + esac + fi +} + +src_compile() { + if use unicode; then + local flags="$(test-flags -finput-charset=ISO-8859-1 -fexec-charset=UTF-8)" + if [[ -n ${flags} ]]; then + append-flags ${flags} + else + ewarn "Your compiler does not support the options required to build" + ewarn "cdrtools with unicode in USE. unicode flag will be ignored." + fi + fi + + # If not built with -j1, "sometimes" cdda2wav will not be built. + emake -j1 CPPOPTX="${CPPFLAGS}" COPTX="${CFLAGS}" C++OPTX="${CXXFLAGS}" \ + LDOPTX="${LDFLAGS}" GMAKE_NOWARN="true" +} + +src_install() { + # If not built with -j1, "sometimes" manpages are not installed. + emake -j1 CPPOPTX="${CPPFLAGS}" COPTX="${CFLAGS}" C++OPTX="${CXXFLAGS}" \ + LDOPTX="${LDFLAGS}" GMAKE_NOWARN="true" install + + # These symlinks are for compat with cdrkit. + dosym schily /usr/include/scsilib + dosym ../scg /usr/include/schily/scg + + dodoc ABOUT Changelog* CONTRIBUTING PORTING README.linux-shm READMEs/README.linux + + cd "${S}"/cdda2wav || die + docinto cdda2wav + dodoc Changelog FAQ Frontends HOWTOUSE NEEDED README THANKS TODO + + cd "${S}"/mkisofs || die + docinto mkisofs + dodoc ChangeLog* TODO + + # Remove man pages related to the build system + rm -rvf "${ED}"/usr/share/man/man5 || die +} + +pkg_postinst() { + fcaps_pkg_postinst + + if [[ ${CHOST} == *-darwin* ]] ; then + einfo + einfo "Darwin/OS X use the following device names:" + einfo + einfo "CD burners: (probably) ./cdrecord dev=IOCompactDiscServices" + einfo + einfo "DVD burners: (probably) ./cdrecord dev=IODVDServices" + einfo + fi +} diff --git a/sdk_container/src/third_party/portage-stable/app-cdr/cdrtools/cdrtools-3.02_alpha09-r4.ebuild b/sdk_container/src/third_party/portage-stable/app-cdr/cdrtools/cdrtools-3.02_alpha09-r4.ebuild new file mode 100644 index 0000000000..0bd54271fe --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-cdr/cdrtools/cdrtools-3.02_alpha09-r4.ebuild @@ -0,0 +1,303 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit fcaps toolchain-funcs flag-o-matic gnuconfig + +MY_P="${P/_alpha/a}" + +DESCRIPTION="A set of tools for CD/DVD reading and recording, including cdrecord" +HOMEPAGE="https://sourceforge.net/projects/cdrtools/" +SRC_URI="mirror://sourceforge/${PN}/$([[ -z ${PV/*_alpha*} ]] && echo 'alpha')/${MY_P}.tar.bz2" + +LICENSE="GPL-2 LGPL-2.1 CDDL-Schily" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris" +IUSE="acl caps nls unicode selinux" + +BDEPEND=" + nls? ( >=sys-devel/gettext-0.18.1.1 ) + x11-misc/makedepend +" +RDEPEND=" + acl? ( virtual/acl ) + caps? ( sys-libs/libcap ) + nls? ( virtual/libintl ) + selinux? ( sec-policy/selinux-cdrecord ) +" +DEPEND=" + ${RDEPEND} +" + +S=${WORKDIR}/${P/_alpha[0-9][0-9]} + +FILECAPS=( + cap_sys_resource,cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_ipc_lock,cap_sys_rawio+ep usr/bin/cdrecord -- + cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_sys_rawio+ep usr/bin/cdda2wav -- + cap_dac_override,cap_sys_admin,cap_net_bind_service,cap_sys_rawio+ep usr/bin/readcd +) + +cdrtools_os() { + local os="linux" + [[ ${CHOST} == *-darwin* ]] && os="mac-os10" + echo "${os}" +} + +symlink_build_rules() { + local cputype="$1" + pushd "${S}"/RULES > /dev/null || die + ln -sf i586-linux-cc.rul "${cputype}"-linux-cc.rul || die + ln -sf i586-linux-clang.rul "${cputype}"-linux-clang.rul || die + ln -sf i586-linux-clang32.rul "${cputype}"-linux-clang32.rul || die + ln -sf i586-linux-clang64.rul "${cputype}"-linux-clang64.rul || die + ln -sf i586-linux-gcc.rul "${cputype}"-linux-gcc.rul || die + ln -sf i586-linux-gcc32.rul "${cputype}"-linux-gcc32.rul || die + ln -sf i586-linux-gcc64.rul "${cputype}"-linux-gcc64.rul || die + popd > /dev/null || die +} + +src_prepare() { + default + + gnuconfig_update + + # Remove profiled make files. + find -name '*_p.mk' -delete || die "delete *_p.mk" + + # Adjusting hardcoded paths. + sed -i -e "s|opt/schily|usr|" \ + $(find ./ -type f -name \*.[0-9ch] -exec grep -l 'opt/schily' '{}' '+') \ + || die "sed opt/schily" + + sed -i -e "s|\(^INSDIR=\t\tshare/doc/\)|\1${PF}/|" \ + $(find ./ -type f -exec grep -l '^INSDIR.\+doc' '{}' '+') \ + || die "sed doc" + + # Respect libdir. + sed -i -e "s|\(^INSDIR=\t\t\)lib|\1$(get_libdir)|" \ + $(find ./ -type f -exec grep -l '^INSDIR.\+lib\(/siconv\)\?$' '{}' '+') \ + || die "sed multilib" + + # Do not install static libraries. + sed -i -e "s|include\t\t.*rules.lib||" \ + $(find ./ -type f -exec grep -l '^include.\+rules\.lib' '{}' '+') \ + || die "sed rules" + + # Don't quote $(MAKE) + sed -i -e 's|"$(MAKE)"|$(MAKE)|' \ + $(find ./RULES -type f -exec grep -l '"$(MAKE)"' '{}' '+') \ + || die "sed RULES/" + + # Enable verbose build. + sed -i -e '/@echo.*==>.*;/s:@echo[^;]*;:&set -x;:' \ + RULES/*.rul RULES/rules.prg RULES/rules.inc \ + || die "sed verbose rules" + + # Respect CC/CXX variables. + cd "${S}"/RULES || die + local tcCC="$(tc-getCC)" + local tcCXX="$(tc-getCXX)" + + sed -i -e "/cc-config.sh/s|\$(C_ARCH:%64=%) \$(CCOM_DEF)|${tcCC} ${tcCC}|" \ + rules1.top || die "sed rules1.top" + sed -i -e "/^CC_COM_DEF=/s|gcc|${tcCC}|" \ + -e "/^CC++_COM_DEF=/s|g++|${tcCXX}|" \ + -e "/COPTOPT=/s|-O||" \ + -e 's|$(GCCOPTOPT)||' \ + cc-gcc.rul || die "sed cc-gcc.rul" + sed -i -e "s|^#\(CONFFLAGS +=\).*|\1\t-cc=${tcCC}|" \ + rules.cnf || die "sed rules.cnf" + + # Add support for arm64 + symlink_build_rules aarch64_be + + # fix RISC-V build err, bug 811375 + symlink_build_rules riscv + symlink_build_rules riscv64 + + # Add support for loong + symlink_build_rules loongarch64 + + # Schily make setup. + cd "${S}"/DEFAULTS || die + local os=$(cdrtools_os) + + sed -i \ + -e "s|^\(DEFLINKMODE=\).*|\1\tdynamic|" \ + -e "s|^\(LINUX_INCL_PATH=\).*|\1|" \ + -e "s|^\(LDPATH=\).*|\1|" \ + -e "s|^\(RUNPATH=\).*|\1|" \ + -e "s|^\(INS_BASE=\).*|\1\t${ED}/usr|" \ + -e "s|^\(INS_RBASE=\).*|\1\t${ED}|" \ + -e "s|^\(DEFINSGRP=\).*|\1\t0|" \ + -e '/^DEFUMASK/s,002,022,g' \ + Defaults.${os} || die "sed Schily make setup" + # re DEFUMASK above: + # bug 486680: grsec TPE will block the exec if the directory is + # group-writable. This is painful with cdrtools, because it makes a bunch of + # group-writable directories during build. Change the umask on their + # creation to prevent this. +} + +ac_cv_sizeof() { + cat <<-EOF >"${T}"/test.c + #include + #include + #include + #include + int main () { + static int test_array [1 - 2 * !((sizeof(TYPE)) == LEN)]; + test_array [0] = 0; + return test_array [0]; + } + EOF + + local i=1 + while [[ ${i} -lt 20 ]] ; do + if ${CC} ${CPPFLAGS} ${CFLAGS} -c "${T}"/test.c -o /dev/null -DTYPE="$1" -DLEN=$i 2>/dev/null; then + echo ${i} + return 0 + fi + : $(( i += 1 )) + done + return 1 +} + +src_configure() { + use acl || export ac_cv_header_sys_acl_h="no" + use caps || export ac_cv_lib_cap_cap_get_proc="no" + export ac_cv_header_pulse_pulseaudio_h="no" + export ac_cv_header_alsa_asoundlib_h="no" + export ac_cv_lib_asound_snd_pcm_open="no" + + # skip obsolete configure script + if tc-is-cross-compiler ; then + # Cache known values for targets. #486680 + + tc-export CC + local var val t types=( + char "short int" int "long int" "long long" + "unsigned char" "unsigned short int" "unsigned int" + "unsigned long int" "unsigned long long" + float double "long double" size_t ssize_t ptrdiff_t + mode_t uid_t gid_t pid_t dev_t time_t wchar_t + "char *" "unsigned char *" + ) + for t in "${types[@]}" ; do + var="ac_cv_sizeof_${t// /_}" + var=${var//[*]/p} + val=$(ac_cv_sizeof "${t}") || die "could not compute ${t}" + export "${var}=${val}" + einfo "Computing sizeof(${t}) as ${val}" + done + # We don't have these types. + export ac_cv_sizeof___int64=0 + export ac_cv_sizeof_unsigned___int64=0 + export ac_cv_sizeof_major_t=${ac_cv_sizeof_dev_t} + export ac_cv_sizeof_minor_t=${ac_cv_sizeof_dev_t} + export ac_cv_sizeof_wchar=${ac_cv_sizeof_wchar_t} + + export ac_cv_type_prototypes="yes" + export ac_cv_func_mlock{,all}="yes" + export ac_cv_func_{e,f,g}cvt=$(usex elibc_glibc) + export ac_cv_func_dtoa_r="no" + export ac_cv_func_sys_siglist{,_def}="no" + export ac_cv_func_printf_{j,ll}="yes" + export ac_cv_realloc_null="yes" + export ac_cv_no_user_malloc="no" + export ac_cv_var_timezone="yes" + export ac_cv_var___progname{,_full}="yes" + export ac_cv_fnmatch_igncase="yes" + export ac_cv_file__dev_{fd_{0,1,2},null,std{err,in,out},tty,zero}="yes" + export ac_cv_file__usr_src_linux_include="no" + + case $(cdrtools_os) in + linux) + export ac_cv_func_bsd_{g,s}etpgrp="no" + export ac_cv_hard_symlinks="yes" + export ac_cv_link_nofollow="yes" + export ac_cv_access_e_ok="no" + + export ac_cv_dev_minor_noncontig="yes" + case ${ac_cv_sizeof_long_int} in + 4) export ac_cv_dev_minor_bits="32";; + 8) export ac_cv_dev_minor_bits="44";; + esac + + cat <<-EOF >"${T}"/test.c + struct { + char start[6]; + unsigned char x1:4; + unsigned char x2:4; + char end[5]; + } a = { + .start = {'S', 't', 'A', 'r', 'T', '_'}, + .x1 = 5, + .x2 = 4, + .end = {'_', 'e', 'N', 'd', 'X'}, + }; + EOF + ${CC} ${CPPFLAGS} ${CFLAGS} -c "${T}"/test.c -o "${T}"/test.o + if grep -q 'StArT_E_eNdX' "${T}"/test.o ; then + export ac_cv_c_bitfields_htol="no" + elif grep -q 'StArT_T_eNdX' "${T}"/test.o ; then + export ac_cv_c_bitfields_htol="yes" + fi + ;; + esac + fi +} + +src_compile() { + if use unicode; then + local flags="$(test-flags -finput-charset=ISO-8859-1 -fexec-charset=UTF-8)" + if [[ -n ${flags} ]]; then + append-flags ${flags} + else + ewarn "Your compiler does not support the options required to build" + ewarn "cdrtools with unicode in USE. unicode flag will be ignored." + fi + fi + + # If not built with -j1, "sometimes" cdda2wav will not be built. + emake -j1 CPPOPTX="${CPPFLAGS}" COPTX="${CFLAGS}" C++OPTX="${CXXFLAGS}" \ + LDOPTX="${LDFLAGS}" GMAKE_NOWARN="true" +} + +src_install() { + # If not built with -j1, "sometimes" manpages are not installed. + emake -j1 CPPOPTX="${CPPFLAGS}" COPTX="${CFLAGS}" C++OPTX="${CXXFLAGS}" \ + LDOPTX="${LDFLAGS}" GMAKE_NOWARN="true" install + + # These symlinks are for compat with cdrkit. + dosym schily /usr/include/scsilib + dosym ../scg /usr/include/schily/scg + + dodoc ABOUT Changelog* CONTRIBUTING PORTING README.linux-shm READMEs/README.linux + + cd "${S}"/cdda2wav || die + docinto cdda2wav + dodoc Changelog FAQ Frontends HOWTOUSE NEEDED README THANKS TODO + + cd "${S}"/mkisofs || die + docinto mkisofs + dodoc ChangeLog* TODO + + # Remove man pages related to the build system + rm -rvf "${ED}"/usr/share/man/man5 || die +} + +pkg_postinst() { + fcaps_pkg_postinst + + if [[ ${CHOST} == *-darwin* ]] ; then + einfo + einfo "Darwin/OS X use the following device names:" + einfo + einfo "CD burners: (probably) ./cdrecord dev=IOCompactDiscServices" + einfo + einfo "DVD burners: (probably) ./cdrecord dev=IODVDServices" + einfo + fi +} diff --git a/sdk_container/src/third_party/portage-stable/app-cdr/cdrtools/metadata.xml b/sdk_container/src/third_party/portage-stable/app-cdr/cdrtools/metadata.xml new file mode 100644 index 0000000000..fc654620df --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-cdr/cdrtools/metadata.xml @@ -0,0 +1,15 @@ + + + + + billie@gentoo.org + Daniel Pielmeier + + + + joerg.schilling@fokus.fraunhofer.de + Jörg Schilling + + cdrtools + + diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/adcli/Manifest b/sdk_container/src/third_party/portage-stable/app-crypt/adcli/Manifest new file mode 100644 index 0000000000..9dc8e534d1 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/adcli/Manifest @@ -0,0 +1 @@ +DIST adcli-0.9.2.tar.bz2 93680 BLAKE2B b5958b276ee43a0ee54aa922f27ed266d4e9fbd1c86e0c007dac9fcf9cc022e1b3ba043b782fceb00066be2577390773dc99fb8d476a6b5e6523d44d008fb667 SHA512 ae8414a0af389b6845dd92d41446a80a9dc1734b874175323c0e491d99944eab442b95ae6d3a29fc69638d2e73bf8d2c369f6fa50e9ed3968527444b78606286 diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/adcli/adcli-0.9.2.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/adcli/adcli-0.9.2.ebuild new file mode 100644 index 0000000000..3c224b561e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/adcli/adcli-0.9.2.ebuild @@ -0,0 +1,35 @@ +# Copyright 2021-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="Tool for performing actions on an Active Directory domain" +HOMEPAGE="https://www.freedesktop.org/software/realmd/adcli/adcli.html" +SRC_URI="https://gitlab.freedesktop.org/realmd/adcli/-/archive/${PV}/${P}.tar.bz2" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc" + +DEPEND=" + app-crypt/mit-krb5 + net-nds/openldap:=[sasl]" +RDEPEND="${DEPEND}" +BDEPEND=" + doc? ( + app-text/docbook-xml-dtd:4.3 + app-text/xmlto + dev-libs/libxslt + )" + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf $(use_enable doc) +} diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/adcli/metadata.xml b/sdk_container/src/third_party/portage-stable/app-crypt/adcli/metadata.xml new file mode 100644 index 0000000000..99303bacc4 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/adcli/metadata.xml @@ -0,0 +1,15 @@ + + + + + henning@hennsch.de + Henning Schild + + + proxy-maint@gentoo.org + Proxy Maintainers + + + realmd/adcli + + diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/argon2/Manifest b/sdk_container/src/third_party/portage-stable/app-crypt/argon2/Manifest new file mode 100644 index 0000000000..cc1597d7b3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/argon2/Manifest @@ -0,0 +1 @@ +DIST argon2-20190702.tar.gz 1505307 BLAKE2B fa9c3dde7b39c8d797a3d6b52992ebfe35f5eba1c7d7b3aa02c440edc36a3f5186cacee2e39e27ed7c6356dc1970dac0e8198d6f2065eb63ff77f9dfb2937cf8 SHA512 0a4cb89e8e63399f7df069e2862ccd05308b7652bf4ab74372842f66bcc60776399e0eaf979a7b7e31436b5e6913fe5b0a6949549d8c82ebd06e0629b106e85f diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/argon2/argon2-20190702.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/argon2/argon2-20190702.ebuild new file mode 100644 index 0000000000..b8456fce50 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/argon2/argon2-20190702.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="Password hashing software that won the Password Hashing Competition (PHC)" +HOMEPAGE="https://github.com/P-H-C/phc-winner-argon2" +SRC_URI="https://github.com/P-H-C/phc-winner-argon2/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="|| ( Apache-2.0 CC0-1.0 )" +SLOT="0/1" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" +IUSE="static-libs" + +S="${WORKDIR}/phc-winner-${P}" + +DOCS=( argon2-specs.pdf CHANGELOG.md README.md ) + +src_prepare() { + default + if ! use static-libs; then + sed -i -e '/LIBRARIES =/s/\$(LIB_ST)//' Makefile || die + fi + sed -i \ + -e 's/-O3//' \ + -e 's/-g//' \ + -e 's/-march=\$(OPTTARGET)//' \ + Makefile || die + + tc-export CC + + OPTTEST=1 + if use amd64 || use x86; then + $(tc-getCPP) ${CFLAGS} ${CPPFLAGS} -P - <<-EOF &>/dev/null && OPTTEST=0 + #if defined(__SSE2__) + true + #else + #error false + #endif + EOF + fi +} + +src_compile() { + emake OPTTEST="${OPTTEST}" LIBRARY_REL="$(get_libdir)" \ + ARGON2_VERSION="0~${PV}" +} + +src_test() { + emake OPTTEST="${OPTTEST}" test +} + +src_install() { + emake OPTTEST="${OPTTEST}" DESTDIR="${ED}" LIBRARY_REL="$(get_libdir)" install + einstalldocs + doman man/argon2.1 +} diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/argon2/metadata.xml b/sdk_container/src/third_party/portage-stable/app-crypt/argon2/metadata.xml new file mode 100644 index 0000000000..950b7c84ae --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/argon2/metadata.xml @@ -0,0 +1,22 @@ + + + + + simon-bgo@slevermann.de + Simon Levermann + + + proxy-maint@gentoo.org + Proxy Maintainers + + + mgorny@gentoo.org + Michał Górny + + + Reflect ABI of libargon2.so. + + + P-H-C/phc-winner-argon2 + + diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/efitools/Manifest b/sdk_container/src/third_party/portage-stable/app-crypt/efitools/Manifest new file mode 100644 index 0000000000..f6d9e82586 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/efitools/Manifest @@ -0,0 +1,2 @@ +DIST efitools-1.8.1.tar.gz 115319 BLAKE2B 3aad65defc203055122027cc3a48f50912d2f08b592841780fdc1bf337d75774116e698c4270865275ce7fe64988cd84105138ca979d81818f0065d7ae90f1d0 SHA512 114ef8e52160f5a5239ec306dbd587610849bce771ba8145ed092afd79e44f3ecee93cc1d97e2d5fdb880cc825bbbe928b3ef6701fd3b1fa444053894be1098a +DIST efitools-1.9.2.tar.gz 116037 BLAKE2B b3540932eb112e362fd0eed47090360603807dcaec8c6a10058618f8252eeb5dcbbd703d313cb6fadae62c1312815080cf2c77fc86f9dfc9f9afca24ad97f584 SHA512 77e0ad7e865814ed388ff6daabe0f4b49ba51672bf2cbb98b7905e209cbd28f9ede2f73213ce45af8a978c1e67dba24ec88a1188661317cc22317b47e575cde8 diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/efitools/efitools-1.8.1.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/efitools/efitools-1.8.1.ebuild new file mode 100644 index 0000000000..ebac350dbc --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/efitools/efitools-1.8.1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Tools for manipulating UEFI secure boot platforms" +HOMEPAGE="https://git.kernel.org/cgit/linux/kernel/git/jejb/efitools.git" +SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git/snapshot/${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="static" + +LIB_DEPEND="dev-libs/openssl:0=[static-libs(+)]" + +RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} ) + sys-apps/util-linux" + +DEPEND="${RDEPEND} + app-crypt/sbsigntools + dev-perl/File-Slurp + static? ( ${LIB_DEPEND} ) + sys-apps/help2man + sys-boot/gnu-efi + virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}/1.7.0-Make.rules.patch" + "${FILESDIR}/1.8.1-respect-ar.patch" +) + +src_prepare() { + if use static; then + append-ldflags -static + sed -i "s/-lcrypto\b/$($(tc-getPKG_CONFIG) --static --libs libcrypto)/g" \ + Makefile || die + fi + + # Respect users CFLAGS + sed -i -e 's/CFLAGS.*= -O2 -g/CFLAGS += /' Make.rules || die + + # Respect users LDFLAGS + sed -i -e 's/LDFLAGS/LIBS/g' Make.rules || die + sed -i -e 's/\$(CC)/& $(LDFLAGS)/g' Makefile || die + + # Run 'default', to apply user patches + default +} diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/efitools/efitools-1.9.2.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/efitools/efitools-1.9.2.ebuild new file mode 100644 index 0000000000..ac731ef3bd --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/efitools/efitools-1.9.2.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Tools for manipulating UEFI secure boot platforms" +HOMEPAGE="https://git.kernel.org/cgit/linux/kernel/git/jejb/efitools.git" +SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git/snapshot/${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="amd64 ~arm64 x86" +IUSE="static" + +LIB_DEPEND="dev-libs/openssl:0=[static-libs(+)]" + +RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} ) + sys-apps/util-linux" + +DEPEND="${RDEPEND} + app-crypt/sbsigntools + dev-perl/File-Slurp + static? ( ${LIB_DEPEND} ) + sys-apps/help2man + sys-boot/gnu-efi + virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}/1.7.0-Make.rules.patch" + "${FILESDIR}/1.8.1-respect-ar.patch" +) + +src_prepare() { + if use static; then + append-ldflags -static + sed -i "s/-lcrypto\b/$($(tc-getPKG_CONFIG) --static --libs libcrypto)/g" \ + Makefile || die + fi + + # Let it build with clang. + if tc-is-clang; then + sed -i -e 's/-fno-toplevel-reorder//g' Make.rules || die + fi + + # Respect users CFLAGS + sed -i -e 's/CFLAGS.*= -O2 -g/CFLAGS += /' Make.rules || die + + # Respect users LDFLAGS + sed -i -e 's/LDFLAGS/LIBS/g' Make.rules || die + sed -i -e 's/\$(CC)/& $(LDFLAGS)/g' Makefile || die + + # Run 'default', to apply user patches + default +} diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/efitools/files/1.7.0-Make.rules.patch b/sdk_container/src/third_party/portage-stable/app-crypt/efitools/files/1.7.0-Make.rules.patch new file mode 100644 index 0000000000..89665ab3b6 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/efitools/files/1.7.0-Make.rules.patch @@ -0,0 +1,11 @@ +--- a/Make.rules ++++ b/Make.rules +@@ -71,7 +71,7 @@ + %.hash: %.efi hash-to-efi-sig-list + ./hash-to-efi-sig-list $< $@ + +-%-blacklist.esl: %.crt cert-to-efi-hash-list ++%-blacklist.esl: %.crt cert-to-efi-sig-list + ./cert-to-efi-sig-list $< $@ + + %-hash-blacklist.esl: %.crt cert-to-efi-hash-list diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/efitools/files/1.8.1-respect-ar.patch b/sdk_container/src/third_party/portage-stable/app-crypt/efitools/files/1.8.1-respect-ar.patch new file mode 100644 index 0000000000..36e6620119 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/efitools/files/1.8.1-respect-ar.patch @@ -0,0 +1,25 @@ +From 81503d7a43b99c036758d05c1794502c09189fa4 Mon Sep 17 00:00:00 2001 +From: Matthias Maier +Date: Tue, 5 Oct 2021 22:27:52 -0500 +Subject: [PATCH] Do not use ar directly + +--- + Make.rules | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Make.rules b/Make.rules +index e46d407..767070d 100644 +--- a/Make.rules ++++ b/Make.rules +@@ -129,7 +129,7 @@ getvar = $(shell if [ "$(1)" = "PK" -o "$(1)" = "KEK" ]; then echo $(1); else ec + # sbsign --key KEK.key --cert KEK.crt --output $@ $< + + %.a: +- ar rcv $@ $^ ++ $(AR) rcv $@ $^ + + doc/%.1: doc/%.1.in % + $(HELP2MAN) --no-info -i $< -o $@ ./$* +-- +2.32.0 + diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/efitools/metadata.xml b/sdk_container/src/third_party/portage-stable/app-crypt/efitools/metadata.xml new file mode 100644 index 0000000000..ba25ee6d9d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/efitools/metadata.xml @@ -0,0 +1,7 @@ + + + + + tamiko@gentoo.org + + diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/libmd/Manifest b/sdk_container/src/third_party/portage-stable/app-crypt/libmd/Manifest new file mode 100644 index 0000000000..d757164e6e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/libmd/Manifest @@ -0,0 +1 @@ +DIST libmd-1.0.4.tar.xz 264472 BLAKE2B ddc2da74635f5cc009c66a58ae82b83e6e0930e18af8a6b0ecec7cbf378246707b493a99fb97d3491d0d626a0d5ef068baea6a3ba2ec311c5a1516ba5b4e2fd5 SHA512 731553ecc5e0e1eb228cced8fccd531fe31fb5c7627ca30013d287e1aeb8222959cf7498fbb7414bbabb967b25d4e8b0edd54fc47f6ccf55fc91087db0725ce3 diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/libmd/libmd-1.0.4.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/libmd/libmd-1.0.4.ebuild new file mode 100644 index 0000000000..ec9a537d5a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/libmd/libmd-1.0.4.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-minimal + +DESCRIPTION="Message Digest functions from BSD systems" +HOMEPAGE="https://www.hadrons.org/software/libmd/" +SRC_URI="https://archive.hadrons.org/software/libmd/${P}.tar.xz" + +LICENSE="|| ( BSD BSD-2 ISC BEER-WARE public-domain )" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" + +multilib_src_configure() { + ECONF_SOURCE="${S}" econf +} + +multilib_src_install_all() { + einstalldocs + find "${ED}" -type f -name '*.la' -delete || die +} diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/libmd/libmd-9999.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/libmd/libmd-9999.ebuild new file mode 100644 index 0000000000..b28c93edaf --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/libmd/libmd-9999.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools multilib-minimal git-r3 + +DESCRIPTION="Message Digest functions from BSD systems" +HOMEPAGE="https://www.hadrons.org/software/libmd/" +EGIT_REPO_URI="https://git.hadrons.org/git/libmd.git" + +LICENSE="|| ( BSD BSD-2 ISC BEER-WARE public-domain )" +SLOT="0" + +src_prepare() { + default + eautoreconf +} + +multilib_src_configure() { + ECONF_SOURCE="${S}" econf +} + +multilib_src_install() { + default + find "${ED}" -type f -name "*.la" -delete || die +} diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/libmd/metadata.xml b/sdk_container/src/third_party/portage-stable/app-crypt/libmd/metadata.xml new file mode 100644 index 0000000000..85e4ed814f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/libmd/metadata.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mhash/Manifest b/sdk_container/src/third_party/portage-stable/app-crypt/mhash/Manifest new file mode 100644 index 0000000000..81d7f0ab65 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mhash/Manifest @@ -0,0 +1 @@ +DIST mhash-0.9.9.9.tar.gz 931437 BLAKE2B 2daed92b731148c388d4340e67d99959f71783e68617614c9be797dae655ba1aeb087d4f604015edb752dedc2d69add305510996a06633ef26fd997ab7601bed SHA512 82ad8b8e9b0463c5a14f5c0e572badc42c4697bac5505443b144287b3f8510b1410721b4277f092a0d6045c4342e997831011cdfcbfa8f1dae6edd5d9e3cefee diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mhash/files/mhash-0.9.9-autotools-namespace-stomping.patch b/sdk_container/src/third_party/portage-stable/app-crypt/mhash/files/mhash-0.9.9-autotools-namespace-stomping.patch new file mode 100644 index 0000000000..4bccf6765a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mhash/files/mhash-0.9.9-autotools-namespace-stomping.patch @@ -0,0 +1,93 @@ +Per debian 473204: http://bugs.debian.org/473204, mhash exports #defines that +are customarily autotools-private. This results in warnings when other packages +attempt to use mhash's headers. + +Gentoo-Bug: 221093 +Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=221093 +Patch-URL: http://bugs.gentoo.org/attachment.cgi?id=152625&action=view +Signed-off-by: Peter Alfredson + +--- a/configure.in ++++ b/configure.in +@@ -4,10 +4,11 @@ + AC_CANONICAL_TARGET + AC_CONFIG_SRCDIR([lib/mhash.c]) + AM_INIT_AUTOMAKE + + AC_DEFINE([MHASH_VERSION], PROGRAM_VERSION, "MHash Version") ++AC_CONFIG_HEADER([include/mutils/config.h]) + AC_CONFIG_HEADER([include/mutils/mhash_config.h]) + + + dnl Check system. + +--- a/include/mutils/config.h.in ++++ b/include/mutils/config.h.in +@@ -0,0 +1,22 @@ ++/* Name of package */ ++#undef PACKAGE ++ ++/* Define to the address where bug reports for this package should be sent. */ ++#undef PACKAGE_BUGREPORT ++ ++/* Define to the full name of this package. */ ++#undef PACKAGE_NAME ++ ++/* Define to the full name and version of this package. */ ++#undef PACKAGE_STRING ++ ++/* Define to the one symbol short name of this package. */ ++#undef PACKAGE_TARNAME ++ ++/* Define to the version of this package. */ ++#undef PACKAGE_VERSION ++ ++/* Version number of package */ ++#undef VERSION ++ ++ +--- a/include/mutils/mhash_config.h.in ++++ b/include/mutils/mhash_config.h.in +@@ -179,28 +179,10 @@ + #undef MHASH_VERSION + + /* Define to 1 if your C compiler doesn't accept -c and -o together. */ + #undef NO_MINUS_C_MINUS_O + +-/* Name of package */ +-#undef PACKAGE +- +-/* Define to the address where bug reports for this package should be sent. */ +-#undef PACKAGE_BUGREPORT +- +-/* Define to the full name of this package. */ +-#undef PACKAGE_NAME +- +-/* Define to the full name and version of this package. */ +-#undef PACKAGE_STRING +- +-/* Define to the one symbol short name of this package. */ +-#undef PACKAGE_TARNAME +- +-/* Define to the version of this package. */ +-#undef PACKAGE_VERSION +- + /* Define to 1 if the C compiler supports function prototypes. */ + #undef PROTOTYPES + + /* The size of `unsigned char', as computed by sizeof. */ + #undef SIZEOF_UNSIGNED_CHAR +@@ -221,13 +203,10 @@ + #undef STDC_HEADERS + + /* dmalloc */ + #undef USE_DMALLOC + +-/* Version number of package */ +-#undef VERSION +- + /* Define if using the dmalloc debugging malloc package */ + #undef WITH_DMALLOC + + /* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mhash/files/mhash-0.9.9-fix-mem-leak.patch b/sdk_container/src/third_party/portage-stable/app-crypt/mhash/files/mhash-0.9.9-fix-mem-leak.patch new file mode 100644 index 0000000000..f6083eb180 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mhash/files/mhash-0.9.9-fix-mem-leak.patch @@ -0,0 +1,27 @@ +The package app-crypt/mhash-0.9.9 as well as app-crypt/mhash-0.9.9-r1 are +affected by a bug which causes memory to be leaked during +mhash_restore_state_mem. + +In this function/patch, ret->state is allocated towards the beginning and later +on replaced with a new allocated area without freeing the old. The patch fixes +it. + +Patch already submitted upstream, but depending on speed, this may be faster to +patch in a new patchset. + +Gentoo-Bug: 255006 +Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=255006 +Patch-URL: http://bugs.gentoo.org/attachment.cgi?id=178560 +Signed-off-by: Thomas Harning + +--- a/lib/mhash.c ++++ b/lib/mhash.c +@@ -719,6 +719,8 @@ + mutils_memcpy( &ret->state_size, &mem[pos], sizeof(ret->state_size)); + pos += sizeof( ret->state_size); + ++ if (ret->state) ++ mutils_free(ret->state); + ret->state = mutils_malloc(ret->state_size); + if (ret->state==NULL) + goto freeall; diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mhash/files/mhash-0.9.9-fix-snefru-segfault.patch b/sdk_container/src/third_party/portage-stable/app-crypt/mhash/files/mhash-0.9.9-fix-snefru-segfault.patch new file mode 100644 index 0000000000..6e9e0275b0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mhash/files/mhash-0.9.9-fix-snefru-segfault.patch @@ -0,0 +1,27 @@ +The package app-crypt/mhash-0.9.9 as well as app-crypt/mhash-0.9.9-r1 are +affected by a bug which causes a NULL ptr dereference in whirlpool/snefru +digest-completion functionality. + +In this patch, whirlpool and snefru's code is updated to bail if 'digest' is +NULL. The code portion aborted is only responsible for writing data to the +digest, so this appears to be correct behavior. + +Patch already submitted upstream, but depending on speed, this may be faster to +patch in a new patchset. + +Gentoo-Bug: 255131 +Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=255131 +Patch-URL: http://bugs.gentoo.org/attachment.cgi?id=178666&action=view +Signed-off-by: Thomas Harning + +--- a/lib/snefru.c ++++ b/lib/snefru.c +@@ -859,6 +859,8 @@ + { + mutils_word32 i; + ++ if(!digest) return; ++ + for (i = 0; i < len; i++, digest += 4) + { + *(mutils_word32 *)digest = mutils_bend2sys32(ctx->hash[i]); diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mhash/files/mhash-0.9.9-fix-whirlpool-segfault.patch b/sdk_container/src/third_party/portage-stable/app-crypt/mhash/files/mhash-0.9.9-fix-whirlpool-segfault.patch new file mode 100644 index 0000000000..8437e624b2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mhash/files/mhash-0.9.9-fix-whirlpool-segfault.patch @@ -0,0 +1,27 @@ +The package app-crypt/mhash-0.9.9 as well as app-crypt/mhash-0.9.9-r1 are +affected by a bug which causes a NULL ptr dereference in whirlpool/snefru +digest-completion functionality. + +In this patch, whirlpool and snefru's code is updated to bail if 'digest' is +NULL. The code portion aborted is only responsible for writing data to the +digest, so this appears to be correct behavior. + +Patch already submitted upstream, but depending on speed, this may be faster to +patch in a new patchset. + +Gentoo-Bug: 255131 +Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=255131 +Patch-URL: http://bugs.gentoo.org/attachment.cgi?id=178667&action=view +Signed-off-by: Thomas Harning + +--- a/lib/whirlpool.c ++++ b/lib/whirlpool.c +@@ -970,6 +970,8 @@ + mutils_word8 * digest) + { + mutils_word32 i; ++ ++ if(!digest) return; + /* + * return the completed message digest: + */ diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mhash/files/mhash-0.9.9.9-align.patch b/sdk_container/src/third_party/portage-stable/app-crypt/mhash/files/mhash-0.9.9.9-align.patch new file mode 100644 index 0000000000..81486034cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mhash/files/mhash-0.9.9.9-align.patch @@ -0,0 +1,118 @@ +--- a/lib/stdfns.c ++++ b/lib/stdfns.c +@@ -152,6 +152,18 @@ mutils_bzero(void *s, __const mutils_wor + } + } + ++static void ++mutils_memset8(void *s, __const mutils_word8 c, __const mutils_word32 n) ++{ ++ mutils_word8 *stmp = s; ++ mutils_word32 i; ++ ++ for (i = 0; i < n; i++, stmp++) ++ { ++ *stmp = c; ++ } ++} ++ + WIN32DLL_DEFINE + void + mutils_memset(void *s, __const mutils_word8 c, __const mutils_word32 n) +@@ -160,8 +172,7 @@ mutils_memset(void *s, __const mutils_wo + /* Sparc needs 8-bit alignment - just use standard memset */ + memset(s, (int) c, (size_t) n); + #else +- mutils_word8 *stmp; +- mutils_word32 *ltmp = (mutils_word32 *) s; ++ mutils_word32 *ltmp; + mutils_word32 lump; + mutils_word32 i; + mutils_word32 words; +@@ -172,22 +183,30 @@ mutils_memset(void *s, __const mutils_wo + return; + } + ++ if (n < 16) ++ { ++ return mutils_memset8(s, c, n); ++ } ++ ++ /* unaligned portion at beginning */ ++ remainder = (-(mutils_word32)s) & 0x3; ++ mutils_memset8(s, c, remainder); ++ ++ /* aligned words in the middle */ ++ ltmp = (mutils_word32 *) (s + remainder); ++ + lump = (c << 24) + (c << 16) + (c << 8) + c; + +- words = n >> 2; +- remainder = n - (words << 2); ++ words = (n - remainder) >> 2; ++ remainder = n - remainder - (words << 2); + + for (i = 0; i < words; i++, ltmp++) + { + *ltmp = lump; + } + +- stmp = (mutils_word8 *) ltmp; +- +- for (i = 0; i < remainder; i++, stmp++) +- { +- *stmp = c; +- } ++ /* unaligned portion at end */ ++ return mutils_memset8(ltmp, c, remainder); + #endif + } + +@@ -281,6 +300,9 @@ mutils_word32nswap(mutils_word32 *x, mut + mutils_word32 *buffer; + mutils_word32 *ptrIn; + mutils_word32 *ptrOut; ++ mutils_word8 *ptr8In; ++ mutils_word8 *ptr8Out; ++ mutils_word8 tmp8; + mutils_word32 count = n * 4; + + if (destructive == MUTILS_FALSE) +@@ -301,9 +323,35 @@ mutils_word32nswap(mutils_word32 *x, mut + * data on a little-endian machine. + */ + +- for (loop = 0, ptrIn = x, ptrOut = buffer; loop < n; loop++, ptrOut++, ptrIn++) ++ if ((mutils_word32)x & 0x3) ++ { ++ ptr8In = (mutils_word8 *) x; ++ ptr8Out = (mutils_word8 *) buffer; ++ for (loop = 0; loop < n; loop++) ++ { ++#ifdef WORDS_BIGENDIAN ++ tmp8 = ptr8In[0]; ++ ptr8Out[0] = ptr8In[3]; ++ ptr8Out[3] = tmp8; ++ tmp8 = ptr8In[1]; ++ ptr8Out[1] = ptr8In[2]; ++ ptr8Out[2] = tmp8; ++#else ++ ptr8Out[0] = ptr8In[0]; ++ ptr8Out[1] = ptr8In[1]; ++ ptr8Out[2] = ptr8In[2]; ++ ptr8Out[3] = ptr8In[3]; ++#endif ++ ptr8Out += 4; ++ ptr8In += 4; ++ } ++ } ++ else + { +- *ptrOut = mutils_lend32(*ptrIn); ++ for (loop = 0, ptrIn = x, ptrOut = buffer; loop < n; loop++, ptrOut++, ptrIn++) ++ { ++ *ptrOut = mutils_lend32(*ptrIn); ++ } + } + + return(buffer); diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mhash/files/mhash-0.9.9.9-alignment.patch b/sdk_container/src/third_party/portage-stable/app-crypt/mhash/files/mhash-0.9.9.9-alignment.patch new file mode 100644 index 0000000000..0df89bc848 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mhash/files/mhash-0.9.9.9-alignment.patch @@ -0,0 +1,15 @@ +--- a/lib/stdfns.c ++++ b/lib/stdfns.c +@@ -378,6 +378,12 @@ mutils_memmove(void *dest, __const void + bigptr1 = (mutils_word32 *) dest; + bigptr2 = (mutils_word32 *) src; + ++ /* copy byte-by-byte for small and/or unaligned copies */ ++ if ((n < 16) || ((mutils_word32)dest & 0x3) || ((mutils_word32)src & 0x3)) ++ { ++ return mutils_memcpy8(dest, src, n); ++ } ++ + words = n >> 2; + remainder = n - (words << 2); + diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mhash/files/mhash-0.9.9.9-force64bit-tiger.patch b/sdk_container/src/third_party/portage-stable/app-crypt/mhash/files/mhash-0.9.9.9-force64bit-tiger.patch new file mode 100644 index 0000000000..08f18d4582 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mhash/files/mhash-0.9.9.9-force64bit-tiger.patch @@ -0,0 +1,13 @@ +--- a/lib/tiger.c ++++ b/lib/tiger.c +@@ -252,7 +252,9 @@ void tiger_update(struct tiger_ctx *ctx, + void tiger_final(struct tiger_ctx *ctx) + { + register mutils_word64 i, j; +- mutils_word8 temp[TIGER_DATASIZE]; ++ /* Force 64-bit alignment */ ++ mutils_word64 temp_64bit[TIGER_DATASIZE/8]; ++ mutils_word8 *temp = temp_64bit; + i = ctx->index; + + #if defined(WORDS_BIGENDIAN) diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mhash/files/mhash-0.9.9.9-remove_premature_free.patch b/sdk_container/src/third_party/portage-stable/app-crypt/mhash/files/mhash-0.9.9.9-remove_premature_free.patch new file mode 100644 index 0000000000..f81ec66b6f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mhash/files/mhash-0.9.9.9-remove_premature_free.patch @@ -0,0 +1,11 @@ +--- a/src/keygen_test.c ++++ b/src/keygen_test.c +@@ -121,8 +121,6 @@ + + mhash_keygen_ext(KEYGEN_S2K_SALTED, data, key, keysize, password, passlen); + +- mutils_memset(tmp, 0, keysize * 2); +- + tmp = mutils_asciify(key, keysize); + + result = mutils_strcmp((mutils_word8 *) KEY2, tmp); diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mhash/metadata.xml b/sdk_container/src/third_party/portage-stable/app-crypt/mhash/metadata.xml new file mode 100644 index 0000000000..dad2754fed --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mhash/metadata.xml @@ -0,0 +1,8 @@ + + + + + + mhash + + diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mhash/mhash-0.9.9.9-r2.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/mhash/mhash-0.9.9.9-r2.ebuild new file mode 100644 index 0000000000..55e78bbb25 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mhash/mhash-0.9.9.9-r2.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools + +DESCRIPTION="Library providing a uniform interface to a large number of hash algorithms" +HOMEPAGE="http://mhash.sourceforge.net/" +SRC_URI="mirror://sourceforge/mhash/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="static-libs" + +BDEPEND="dev-lang/perl" # pod2html + +PATCHES=( + "${FILESDIR}"/${PN}-0.9.9-fix-mem-leak.patch + "${FILESDIR}"/${PN}-0.9.9-fix-snefru-segfault.patch + "${FILESDIR}"/${PN}-0.9.9-fix-whirlpool-segfault.patch + "${FILESDIR}"/${PN}-0.9.9-autotools-namespace-stomping.patch + "${FILESDIR}"/${P}-remove_premature_free.patch + "${FILESDIR}"/${P}-force64bit-tiger.patch + "${FILESDIR}"/${P}-align.patch + "${FILESDIR}"/${P}-alignment.patch +) + +DOCS=( doc/example.c doc/skid2-authentication ) + +HTML_DOCS=( doc/mhash.html ) + +src_prepare() { + default + + sed -i \ + -e 's/--netscape//' \ + "${S}"/doc/Makefile.in || die + + # Refresh bundled libtool (ltmain.sh) + # (elibtoolize is not sufficient) + # bug #668666 + eautoreconf +} + +src_configure() { + # https://sourceforge.net/p/mhash/patches/11/ + export ac_cv_func_malloc_0_nonnull=yes + + econf $(use_enable static-libs static) +} + +src_compile() { + default + + emake -C doc mhash.html +} + +src_install() { + default + find "${ED}" -name '*.la' -delete || die +} diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/Manifest b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/Manifest new file mode 100644 index 0000000000..fcb575f401 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/Manifest @@ -0,0 +1 @@ +DIST krb5-1.20.1.tar.gz 8661660 BLAKE2B ead16f8b1aec8bba3776628b74257c9aec891770c1fa6d5c5e66275db5f078ca59c9944cd2b017453b777ce080f8e5a322f735fab77691479cfad7b881b92830 SHA512 6f57479f13f107cd84f30de5c758eb6b9fc59171329c13e5da6073b806755f8d163eb7bd84767ea861ad6458ea0c9eeb00ee044d3bcad01ef136e9888564b6a2 diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/kpropd.xinetd b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/kpropd.xinetd new file mode 100644 index 0000000000..af542fcf8a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/kpropd.xinetd @@ -0,0 +1,11 @@ +service tell +{ + disable = yes + socket_type = stream + user = root + wait = no + server = /usr/sbin/kpropd + only_from = 0.0.0.0 + log_on_success = PID HOST EXIT DURATION + log_on_failure = HOST +} diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5-1.12_warn_cflags.patch b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5-1.12_warn_cflags.patch new file mode 100644 index 0000000000..53037d9702 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5-1.12_warn_cflags.patch @@ -0,0 +1,11 @@ +gentoo bug #498794 +--- src/aclocal.m4 2014-01-16 00:44:15.000000000 +0000 ++++ src/aclocal.m4 2014-03-26 10:20:54.000000000 +0000 +@@ -501,6 +501,7 @@ + fi + if test "x$krb5_ac_warn_cflags_set" = xset ; then + AC_MSG_NOTICE(not adding extra gcc warning flags because WARN_CFLAGS was set) ++ WARN_CFLAGS="" + else + AC_MSG_NOTICE(adding extra warning flags for gcc) + WARN_CFLAGS="$WARN_CFLAGS $extra_gcc_warn_opts -Wmissing-prototypes" diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5-1.18.2-krb5-config.patch b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5-1.18.2-krb5-config.patch new file mode 100644 index 0000000000..ec901ce9c3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5-1.18.2-krb5-config.patch @@ -0,0 +1,15 @@ +--- a/build-tools/krb5-config.in ++++ b/build-tools/krb5-config.in +@@ -208,12 +208,6 @@ + + + if test -n "$do_libs"; then +- # Assumes /usr/lib is the standard library directory everywhere... +- if test "$libdir" = /usr/lib; then +- libdirarg= +- else +- libdirarg="-L$libdir" +- fi + # Ugly gross hack for our build tree + lib_flags=`echo $CC_LINK | sed -e 's/\$(CC)//' \ + -e 's/\$(PURE)//' \ diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5-1.20-missing-time-include.patch b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5-1.20-missing-time-include.patch new file mode 100644 index 0000000000..a8a4956991 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5-1.20-missing-time-include.patch @@ -0,0 +1,20 @@ +https://github.com/krb5/krb5/commit/c3958cec43b598b25484b9805224c56f25f7a755 +https://bugs.gentoo.org/854561 + +From: Greg Hudson +Date: Tue, 29 Mar 2022 16:27:55 -0400 +Subject: [PATCH] Include time.h in kdb.h + +kdb.h uses time_t, and therefore must include to ensure its +definition. Noticed when building t_sort_key_data.c on macOS. +--- a/include/kdb.h ++++ b/include/kdb.h +@@ -65,6 +65,7 @@ + #ifndef KRB5_KDB5__ + #define KRB5_KDB5__ + ++#include + #include + + /* This version will be incremented when incompatible changes are made to the + diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5-1.20.1-autoconf-2.72.patch b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5-1.20.1-autoconf-2.72.patch new file mode 100644 index 0000000000..b55193bcc7 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5-1.20.1-autoconf-2.72.patch @@ -0,0 +1,31 @@ +https://github.com/krb5/krb5/commit/d864d740d019fdf2c640460f2aa2760c7fa4d5e9 + +From d864d740d019fdf2c640460f2aa2760c7fa4d5e9 Mon Sep 17 00:00:00 2001 +From: Julien Rische +Date: Thu, 17 Nov 2022 15:01:24 +0100 +Subject: [PATCH] Fix aclocal.m4 syntax error for autoconf 2.72 + +An incorrect closure inside KRB5_AC_INET6 is innocuous with autoconf +versions up to 2.71, but will cause an error at configure time with +the forthcoming autoconf 2.72. + +[ghudson@mit.edu: added more context to commit message] + +ticket: 9077 (new) +tags: pullup +target_version: 1.20-next +target_version: 1.19-next +--- a/aclocal.m4 ++++ b/aclocal.m4 +@@ -409,8 +409,8 @@ else + [[struct sockaddr_in6 in; + AF_INET6; + IN6_IS_ADDR_LINKLOCAL(&in.sin6_addr);]])], +- [krb5_cv_inet6=yes], [krb5_cv_inet6=no])]) +-fi ++ [krb5_cv_inet6=yes], [krb5_cv_inet6=no]) ++fi]) + AC_MSG_RESULT($krb5_cv_inet6) + if test "$krb5_cv_inet6" = no && test "$ac_cv_func_inet_ntop" = yes; then + AC_MSG_CHECKING(for IPv6 compile-time support with -DINET6) + diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5-config_LDFLAGS-r1.patch b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5-config_LDFLAGS-r1.patch new file mode 100644 index 0000000000..39bac974af --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5-config_LDFLAGS-r1.patch @@ -0,0 +1,12 @@ +Bug #448778 +--- a/build-tools/krb5-config.in 2012-12-18 02:47:04.000000000 +0000 ++++ b/build-tools/krb5-config.in 2012-12-28 07:13:16.582693363 +0000 +@@ -217,7 +217,7 @@ + -e 's#\$(PROG_RPATH)#'$libdir'#' \ + -e 's#\$(PROG_LIBPATH)#'$libdirarg'#' \ + -e 's#\$(RPATH_FLAG)#'"$RPATH_FLAG"'#' \ +- -e 's#\$(LDFLAGS)#'"$LDFLAGS"'#' \ ++ -e 's#\$(LDFLAGS)##' \ + -e 's#\$(PTHREAD_CFLAGS)#'"$PTHREAD_CFLAGS"'#' \ + -e 's#\$(CFLAGS)##'` + diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5_dont_create_rundir.patch b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5_dont_create_rundir.patch new file mode 100644 index 0000000000..4cc7d826ee --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5_dont_create_rundir.patch @@ -0,0 +1,10 @@ +--- src/Makefile.in 2019-12-12 10:15:51.674552983 +0300 ++++ src/Makefile.in 2019-12-12 10:16:33.205543490 +0300 +@@ -71,7 +71,6 @@ + $(KRB5_AD_MODULE_DIR) \ + $(KRB5_LIBKRB5_MODULE_DIR) $(KRB5_TLS_MODULE_DIR) \ + $(localstatedir) $(localstatedir)/krb5kdc \ +- $(runstatedir) $(runstatedir)/krb5kdc \ + $(KRB5_INCSUBDIRS) $(datadir) $(EXAMPLEDIR) \ + $(PKGCONFIG_DIR) + diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kadmind.confd b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kadmind.confd new file mode 100644 index 0000000000..f6029b6097 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kadmind.confd @@ -0,0 +1,2 @@ +# Define startup options for Kerberos administration server +KADMIND_OPTS="" diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kadmind.initd-r2 b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kadmind.initd-r2 new file mode 100644 index 0000000000..03e64f83e2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kadmind.initd-r2 @@ -0,0 +1,25 @@ +#!/sbin/openrc-run + +#--------------------------------------------------------------------------- +# This script starts/stops the MIT Kerberos 5 Admin daemon +#--------------------------------------------------------------------------- + +daemon="MIT Kerberos 5 Admin daemon" +exec="/usr/sbin/kadmind" + +depend() { + need mit-krb5kdc + use net +} + +start() { + ebegin "Starting $daemon" + start-stop-daemon --start --quiet --exec ${exec} -- ${KADMIND_OPTS} 1>&2 + eend $? "Error starting $daemon" +} + +stop() { + ebegin "Stopping $daemon" + start-stop-daemon --stop --quiet --exec ${exec} 1>&2 + eend $? "Error stopping $daemon" +} diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kadmind.service b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kadmind.service new file mode 100644 index 0000000000..f3836c8986 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kadmind.service @@ -0,0 +1,8 @@ +[Unit] +Description=Kerberos 5 administration server + +[Service] +ExecStart=/usr/sbin/kadmind -nofork + +[Install] +WantedBy=multi-user.target diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kdc.confd b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kdc.confd new file mode 100644 index 0000000000..887d3d8c7b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kdc.confd @@ -0,0 +1,2 @@ +# Define startup options for Kerberos KDC +KDC_OPTS="" diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kdc.initd-r2 b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kdc.initd-r2 new file mode 100644 index 0000000000..ecd47e4568 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kdc.initd-r2 @@ -0,0 +1,24 @@ +#!/sbin/openrc-run + +#--------------------------------------------------------------------------- +# This script starts/stops the MIT Kerberos 5 KDC +#--------------------------------------------------------------------------- + +daemon="MIT Kerberos 5 KDC" +exec="/usr/sbin/krb5kdc" + +depend() { + use net +} + +start() { + ebegin "Starting $daemon" + start-stop-daemon --start --quiet --exec ${exec} -- ${KDC_OPTS} 1>&2 + eend $? "Error starting $daemon" +} + +stop() { + ebegin "Stopping $daemon" + start-stop-daemon --stop --quiet --exec ${exec} 1>&2 + eend $? "Error stopping $daemon" +} diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kdc.service b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kdc.service new file mode 100644 index 0000000000..6ec93bb723 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kdc.service @@ -0,0 +1,9 @@ +[Unit] +Description=Kerberos 5 KDC + +[Service] +ExecStart=/usr/sbin/krb5kdc -n +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kpropd.confd b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kpropd.confd new file mode 100644 index 0000000000..d75d41ab81 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kpropd.confd @@ -0,0 +1,2 @@ +# Define startup options for Kerberos incremental propagation server +KPROPD_OPTS="" diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kpropd.initd-r2 b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kpropd.initd-r2 new file mode 100644 index 0000000000..f6ab7872c9 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kpropd.initd-r2 @@ -0,0 +1,24 @@ +#!/sbin/openrc-run + +#--------------------------------------------------------------------------- +# This script starts/stops the MIT Kerberos 5 kpropd +#--------------------------------------------------------------------------- + +daemon="MIT Kerberos 5 kpropd" +exec="/usr/sbin/kpropd" + +depend() { + use net mit-krb5kdc mit-krb5kadmind +} + +start() { + ebegin "Starting $daemon" + start-stop-daemon --start --quiet --exec ${exec} -- ${KPROPD_OPTS} 1>&2 + eend $? "Error starting $daemon" +} + +stop() { + ebegin "Stopping $daemon" + start-stop-daemon --stop --quiet --exec ${exec} 1>&2 + eend $? "Error stopping $daemon" +} diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kpropd.service b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kpropd.service new file mode 100644 index 0000000000..a7c5b579d2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kpropd.service @@ -0,0 +1,8 @@ +[Unit] +Description=Kerberos 5 propagation server + +[Service] +ExecStart=/usr/sbin/kpropd -S + +[Install] +WantedBy=multi-user.target diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kpropd.socket b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kpropd.socket new file mode 100644 index 0000000000..4389290c0b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kpropd.socket @@ -0,0 +1,9 @@ +[Unit] +Description=Kerberos 5 propagation server + +[Socket] +ListenStream=754 +Accept=yes + +[Install] +WantedBy=sockets.target diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kpropd_at.service b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kpropd_at.service new file mode 100644 index 0000000000..f826eb33cb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/files/mit-krb5kpropd_at.service @@ -0,0 +1,8 @@ +[Unit] +Description=Kerberos 5 propagation server +Conflicts=mit-krb5kpropd.service + +[Service] +ExecStart=/usr/sbin/kpropd +StandardInput=socket +StandardError=syslog diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/metadata.xml b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/metadata.xml new file mode 100644 index 0000000000..53f75a3481 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/metadata.xml @@ -0,0 +1,23 @@ + + + + + kerberos@gentoo.org + Kerberos + + + + Creates and installs the API and implementation + documentation. This is only useful if you want to develop software + which depends on kerberos + + Enable for the keyring ccache using keyutils + Add support for using dev-db/lmdb for lookup tables + Enable pkinit support for the initial ticket + Enable support for ldap as a database backend + + + cpe:/a:mit:kerberos + krb5/krb5 + + diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/mit-krb5-1.20.1.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/mit-krb5-1.20.1.ebuild new file mode 100644 index 0000000000..f3e57fc338 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/mit-krb5/mit-krb5-1.20.1.ebuild @@ -0,0 +1,149 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) +inherit autotools python-any-r1 systemd toolchain-funcs multilib-minimal + +MY_P="${P/mit-}" +P_DIR=$(ver_cut 1-2) +DESCRIPTION="MIT Kerberos V" +HOMEPAGE="https://web.mit.edu/kerberos/www/" +SRC_URI="https://web.mit.edu/kerberos/dist/krb5/${P_DIR}/${MY_P}.tar.gz" + +LICENSE="openafs-krb5-a BSD MIT OPENLDAP BSD-2 HPND BSD-4 ISC RSA CC-BY-SA-3.0 || ( BSD-2 GPL-2+ )" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ~ppc ppc64 ~riscv ~s390 sparc x86" +IUSE="cpu_flags_x86_aes doc +keyutils lmdb nls openldap +pkinit selinux +threads test xinetd" + +RESTRICT="!test? ( test )" + +DEPEND=" + !!app-crypt/heimdal + >=sys-fs/e2fsprogs-1.46.4-r51[${MULTILIB_USEDEP}] + || ( + >=dev-libs/libverto-0.2.5[libev,${MULTILIB_USEDEP}] + >=dev-libs/libverto-0.2.5[libevent,${MULTILIB_USEDEP}] + ) + keyutils? ( >=sys-apps/keyutils-1.5.8:=[${MULTILIB_USEDEP}] ) + lmdb? ( dev-db/lmdb:= ) + nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) + openldap? ( >=net-nds/openldap-2.4.38-r1:=[${MULTILIB_USEDEP}] ) + pkinit? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) + xinetd? ( sys-apps/xinetd ) + " +BDEPEND=" + ${PYTHON_DEPS} + app-alternatives/yacc + cpu_flags_x86_aes? ( + amd64? ( dev-lang/yasm ) + x86? ( dev-lang/yasm ) + ) + doc? ( virtual/latex-base ) + test? ( dev-util/cmocka ) + " +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-kerberos )" + +S=${WORKDIR}/${MY_P}/src + +PATCHES=( + "${FILESDIR}/${PN}-1.12_warn_cflags.patch" + "${FILESDIR}/${PN}-config_LDFLAGS-r1.patch" + "${FILESDIR}/${PN}_dont_create_rundir.patch" + "${FILESDIR}/${PN}-1.18.2-krb5-config.patch" + "${FILESDIR}/${PN}-1.20-missing-time-include.patch" + "${FILESDIR}/${PN}-1.20.1-autoconf-2.72.patch" +) + +MULTILIB_CHOST_TOOLS=( + /usr/bin/krb5-config +) + +src_prepare() { + default + # Make sure we always use the system copies. + rm -rf util/{et,ss,verto} + sed -i 's:^[[:space:]]*util/verto$::' configure.ac || die + + eautoreconf +} + +multilib_src_configure() { + ECONF_SOURCE=${S} \ + AR="$(tc-getAR)" \ + WARN_CFLAGS="set" \ + econf \ + $(use_with openldap ldap) \ + $(use_enable nls) \ + $(use_enable pkinit) \ + $(use_enable threads thread-support) \ + $(use_with lmdb) \ + $(use_with keyutils) \ + --without-hesiod \ + --enable-shared \ + --with-system-et \ + --with-system-ss \ + --enable-dns-for-realm \ + --enable-kdc-lookaside-cache \ + --with-system-verto \ + --disable-rpath +} + +multilib_src_compile() { + emake -j1 +} + +multilib_src_test() { + multilib_is_native_abi && emake -j1 check +} + +multilib_src_install() { + emake \ + DESTDIR="${D}" \ + EXAMPLEDIR="${EPREFIX}/usr/share/doc/${PF}/examples" \ + install +} + +multilib_src_install_all() { + # default database dir + keepdir /var/lib/krb5kdc + + cd .. + dodoc README + + if use doc; then + dodoc -r doc/html + docinto pdf + dodoc doc/pdf/*.pdf + fi + + newinitd "${FILESDIR}"/mit-krb5kadmind.initd-r2 mit-krb5kadmind + newinitd "${FILESDIR}"/mit-krb5kdc.initd-r2 mit-krb5kdc + newinitd "${FILESDIR}"/mit-krb5kpropd.initd-r2 mit-krb5kpropd + newconfd "${FILESDIR}"/mit-krb5kadmind.confd mit-krb5kadmind + newconfd "${FILESDIR}"/mit-krb5kdc.confd mit-krb5kdc + newconfd "${FILESDIR}"/mit-krb5kpropd.confd mit-krb5kpropd + + systemd_newunit "${FILESDIR}"/mit-krb5kadmind.service mit-krb5kadmind.service + systemd_newunit "${FILESDIR}"/mit-krb5kdc.service mit-krb5kdc.service + systemd_newunit "${FILESDIR}"/mit-krb5kpropd.service mit-krb5kpropd.service + systemd_newunit "${FILESDIR}"/mit-krb5kpropd_at.service "mit-krb5kpropd@.service" + systemd_newunit "${FILESDIR}"/mit-krb5kpropd.socket mit-krb5kpropd.socket + + insinto /etc + newins "${ED}/usr/share/doc/${PF}/examples/krb5.conf" krb5.conf.example + insinto /var/lib/krb5kdc + newins "${ED}/usr/share/doc/${PF}/examples/kdc.conf" kdc.conf.example + + if use openldap ; then + insinto /etc/openldap/schema + doins "${S}/plugins/kdb/ldap/libkdb_ldap/kerberos.schema" + fi + + if use xinetd ; then + insinto /etc/xinetd.d + newins "${FILESDIR}/kpropd.xinetd" kpropd + fi +} diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/pinentry/Manifest b/sdk_container/src/third_party/portage-stable/app-crypt/pinentry/Manifest new file mode 100644 index 0000000000..c80daad0ad --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/pinentry/Manifest @@ -0,0 +1,2 @@ +DIST pinentry-1.1.1.tar.bz2 515723 BLAKE2B f257fe552852e6d1ff2c23aeb0c1127b43e3a60e44c78dfa764d569e659ccb78528ce3ee863114af273a4b6f6c24686cda2cb14bb04995eb8c41ccd4541a9fbd SHA512 d6ab5af8ac2f3c9c05e09703e95d8e2676f9b2b7ceb97f6a31d101d0e9da7a1e106a6d3eabe86cab1bb35a4b119a7cba1380ac64bf13c61af0b3c48803116c12 +DIST pinentry-1.2.0.tar.bz2 498390 BLAKE2B 6e97b55fe39e9c17f8a87fa669d23fca56c1095c2533a9eebe459fafc95a3fcb0a5ea502077aae5480b5259a3096c5f85e05d4872c0b19ad33f3d9084a220cc7 SHA512 19cea79aa3982d1f0d75220c8e24ca38d6c49475c6f4c5aa7101151b4690db23ed316096a4a411136e716ba4eb471f48f9b09556e5c9837533c2356b9b384b63 diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/pinentry/files/pinentry-0.8.2-ncurses.patch b/sdk_container/src/third_party/portage-stable/app-crypt/pinentry/files/pinentry-0.8.2-ncurses.patch new file mode 100644 index 0000000000..3bb92c63d0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/pinentry/files/pinentry-0.8.2-ncurses.patch @@ -0,0 +1,25 @@ +From bafe8608fc525ef103b3d1f3048ca28958bef596 Mon Sep 17 00:00:00 2001 +From: Alon Bar-Lev +Date: Sun, 5 May 2013 02:23:08 +0300 +Subject: [PATCH] ncurses: link with optional tinfo + +--- + m4/curses.m4 | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/m4/curses.m4 b/m4/curses.m4 +index 3a01881..ffb6bd1 100644 +--- a/m4/curses.m4 ++++ b/m4/curses.m4 +@@ -36,6 +36,8 @@ AC_DEFUN([IU_LIB_NCURSES], [ + have_ncursesw=no + fi + if test "$LIBNCURSES"; then ++ AC_CHECK_LIB(tinfow, curs_set, LIBNCURSES="${LIBNCURSES} -ltinfow", ++ AC_CHECK_LIB(tinfo, curs_set, LIBNCURSES="${LIBNCURSES} -ltinfo")) + # Use ncurses header files instead of the ordinary ones, if possible; + # is there a better way of doing this, that avoids looking in specific + # directories? +-- +1.8.1.5 + diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/pinentry/files/pinentry-1.0.0-AR.patch b/sdk_container/src/third_party/portage-stable/app-crypt/pinentry/files/pinentry-1.0.0-AR.patch new file mode 100644 index 0000000000..82af67f694 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/pinentry/files/pinentry-1.0.0-AR.patch @@ -0,0 +1,11 @@ +https://bugs.gentoo.org/718028 +--- a/configure.ac ++++ b/configure.ac +@@ -80,6 +80,7 @@ AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) + AC_PROG_CC + AC_PROG_CPP + AC_PROG_INSTALL ++AM_PROG_AR + AC_PROG_RANLIB + # We need to check for cplusplus here because we may not do the test + # for Qt and autoconf does does not allow that. diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/pinentry/files/pinentry-1.0.0-make-icon-work-under-Plasma-Wayland.patch b/sdk_container/src/third_party/portage-stable/app-crypt/pinentry/files/pinentry-1.0.0-make-icon-work-under-Plasma-Wayland.patch new file mode 100644 index 0000000000..646df19637 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/pinentry/files/pinentry-1.0.0-make-icon-work-under-Plasma-Wayland.patch @@ -0,0 +1,52 @@ +From 7218becac7132c2508d4e8f42c693d69c406795a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= +Date: Wed, 7 Mar 2018 15:14:22 +0100 +Subject: [PATCH] Make pinentry-qt icon work under Plasma Wayland. + +--- + qt/Makefile.am | 2 ++ + qt/main.cpp | 2 ++ + qt/org.gnupg.pinentry-qt.desktop | 5 +++++ + 3 files changed, 9 insertions(+) + create mode 100644 qt/org.gnupg.pinentry-qt.desktop + +diff --git a/qt/Makefile.am b/qt/Makefile.am +index 698005e..bbf39d1 100644 +--- a/qt/Makefile.am ++++ b/qt/Makefile.am +@@ -24,6 +24,8 @@ bin_PROGRAMS = pinentry-qt + + EXTRA_DIST = document-encrypt.png pinentry.qrc + ++desktopdir = $(datadir)/applications ++dist_desktop_DATA = org.gnupg.pinentry-qt.desktop + + if FALLBACK_CURSES + ncurses_include = $(NCURSES_INCLUDE) +diff --git a/qt/main.cpp b/qt/main.cpp +index fe88d26..b767cb4 100644 +--- a/qt/main.cpp ++++ b/qt/main.cpp +@@ -372,6 +372,8 @@ main(int argc, char *argv[]) + i = argc; + app = new QApplication(i, new_argv); + app->setWindowIcon(QIcon(QLatin1String(":/document-encrypt.png"))); ++ app->setOrganizationDomain(QStringLiteral("gnupg.org")); ++ app->setDesktopFileName(QStringLiteral("org.gnupg.pinentry-qt")); + } + + pinentry_parse_opts(argc, argv); +diff --git a/qt/org.gnupg.pinentry-qt.desktop b/qt/org.gnupg.pinentry-qt.desktop +new file mode 100644 +index 0000000..0ac89aa +--- /dev/null ++++ b/qt/org.gnupg.pinentry-qt.desktop +@@ -0,0 +1,5 @@ ++[Desktop Entry] ++Type=Application ++Name=Pinentry dialog ++Icon=document-encrypt ++NoDisplay=true +-- +2.16.1 + diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/pinentry/metadata.xml b/sdk_container/src/third_party/portage-stable/app-crypt/pinentry/metadata.xml new file mode 100644 index 0000000000..6d11bc523c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/pinentry/metadata.xml @@ -0,0 +1,15 @@ + + + + + zlogene@gentoo.org + Mikle Kolyada + + + base-system@gentoo.org + Gentoo Base System + + + Build dev-libs/efl based pinentry + + diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/pinentry/pinentry-1.1.1-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/pinentry/pinentry-1.1.1-r1.ebuild new file mode 100644 index 0000000000..90e78ab842 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/pinentry/pinentry-1.1.1-r1.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools flag-o-matic qmake-utils toolchain-funcs + +DESCRIPTION="Simple passphrase entry dialogs which utilize the Assuan protocol" +HOMEPAGE="https://gnupg.org/aegypten2" +SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="caps efl emacs gnome-keyring gtk ncurses qt5" + +DEPEND=" + >=app-eselect/eselect-pinentry-0.7.2 + >=dev-libs/libassuan-2.1 + >=dev-libs/libgcrypt-1.6.3 + >=dev-libs/libgpg-error-1.17 + caps? ( sys-libs/libcap ) + efl? ( dev-libs/efl[X] ) + gnome-keyring? ( app-crypt/libsecret ) + ncurses? ( sys-libs/ncurses:0= ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + ) +" +RDEPEND="${DEPEND} + gtk? ( app-crypt/gcr[gtk] ) +" +BDEPEND=" + sys-devel/gettext + virtual/pkgconfig +" + +DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) + +PATCHES=( + "${FILESDIR}/${PN}-1.0.0-make-icon-work-under-Plasma-Wayland.patch" + "${FILESDIR}/${PN}-0.8.2-ncurses.patch" + "${FILESDIR}/${PN}-1.0.0-AR.patch" +) + +src_prepare() { + default + unset FLTK_CONFIG + eautoreconf +} + +src_configure() { + [[ "$(gcc-major-version)" -ge 5 ]] && append-cxxflags -std=gnu++11 + + export QTLIB="$(qt5_get_libdir)" + + econf \ + $(use_enable efl pinentry-efl) \ + $(use_enable emacs pinentry-emacs) \ + $(use_enable gnome-keyring libsecret) \ + $(use_enable gtk pinentry-gnome3) \ + $(use_enable ncurses fallback-curses) \ + $(use_enable ncurses pinentry-curses) \ + $(use_enable qt5 pinentry-qt) \ + $(use_with caps libcap) \ + --enable-pinentry-tty \ + --disable-pinentry-fltk \ + --disable-pinentry-gtk2 \ + MOC="$(qt5_get_bindir)"/moc \ + GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config" \ + LIBASSUAN_CONFIG="${ESYSROOT}/usr/bin/libassuan-config" \ + $("${S}/configure" --help | grep -- '--without-.*-prefix' | sed -e 's/^ *\([^ ]*\) .*/\1/g') +} + +src_install() { + default + rm "${ED}"/usr/bin/pinentry || die + + use qt5 && dosym pinentry-qt /usr/bin/pinentry-qt5 +} + +pkg_postinst() { + eselect pinentry update ifunset +} + +pkg_postrm() { + eselect pinentry update ifunset +} diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/pinentry/pinentry-1.2.0.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/pinentry/pinentry-1.2.0.ebuild new file mode 100644 index 0000000000..90e78ab842 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/pinentry/pinentry-1.2.0.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools flag-o-matic qmake-utils toolchain-funcs + +DESCRIPTION="Simple passphrase entry dialogs which utilize the Assuan protocol" +HOMEPAGE="https://gnupg.org/aegypten2" +SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="caps efl emacs gnome-keyring gtk ncurses qt5" + +DEPEND=" + >=app-eselect/eselect-pinentry-0.7.2 + >=dev-libs/libassuan-2.1 + >=dev-libs/libgcrypt-1.6.3 + >=dev-libs/libgpg-error-1.17 + caps? ( sys-libs/libcap ) + efl? ( dev-libs/efl[X] ) + gnome-keyring? ( app-crypt/libsecret ) + ncurses? ( sys-libs/ncurses:0= ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtwidgets:5 + ) +" +RDEPEND="${DEPEND} + gtk? ( app-crypt/gcr[gtk] ) +" +BDEPEND=" + sys-devel/gettext + virtual/pkgconfig +" + +DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) + +PATCHES=( + "${FILESDIR}/${PN}-1.0.0-make-icon-work-under-Plasma-Wayland.patch" + "${FILESDIR}/${PN}-0.8.2-ncurses.patch" + "${FILESDIR}/${PN}-1.0.0-AR.patch" +) + +src_prepare() { + default + unset FLTK_CONFIG + eautoreconf +} + +src_configure() { + [[ "$(gcc-major-version)" -ge 5 ]] && append-cxxflags -std=gnu++11 + + export QTLIB="$(qt5_get_libdir)" + + econf \ + $(use_enable efl pinentry-efl) \ + $(use_enable emacs pinentry-emacs) \ + $(use_enable gnome-keyring libsecret) \ + $(use_enable gtk pinentry-gnome3) \ + $(use_enable ncurses fallback-curses) \ + $(use_enable ncurses pinentry-curses) \ + $(use_enable qt5 pinentry-qt) \ + $(use_with caps libcap) \ + --enable-pinentry-tty \ + --disable-pinentry-fltk \ + --disable-pinentry-gtk2 \ + MOC="$(qt5_get_bindir)"/moc \ + GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config" \ + LIBASSUAN_CONFIG="${ESYSROOT}/usr/bin/libassuan-config" \ + $("${S}/configure" --help | grep -- '--without-.*-prefix' | sed -e 's/^ *\([^ ]*\) .*/\1/g') +} + +src_install() { + default + rm "${ED}"/usr/bin/pinentry || die + + use qt5 && dosym pinentry-qt /usr/bin/pinentry-qt5 +} + +pkg_postinst() { + eselect pinentry update ifunset +} + +pkg_postrm() { + eselect pinentry update ifunset +} diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/rhash/Manifest b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/Manifest new file mode 100644 index 0000000000..29794e046d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/Manifest @@ -0,0 +1,2 @@ +DIST rhash-1.3.6-src.tar.gz 328097 BLAKE2B c74993d183f0f2e479f0bd5831a9f653b9bd17bbed4d1ba896f6e33db98b7141175cd3c688dc41dfd8ec4b98acb51255ae5b795435cbc9dfb5ab77573cb25543 SHA512 54f7f238ed1fdc01c29cc1338fa86be90b69beff0df8f20d24ce9cb3c48c7f4668b84a3fe0d4d8b04b54bc8145485d493435edf3219de3a637af0f9c007c85c6 +DIST rhash-1.4.2-src.tar.gz 416853 BLAKE2B 06322825116cb00aa4987b01610d967eb57c94aa29b43348ec2c31f053fd471a900fcee776714263213e9a79eaf389b2e79d7b34a5afd3e98d68198193b5cbe7 SHA512 41df57e8b3f32c93d8e6f2ac668b32aaa23eb2eaf90a83f109e61e511404a5036ea88bcf2854e19c1ade0f61960e0d9edf01f3d82e1c645fed36579e9d7a6a25 diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/darwin-triplet.patch b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/darwin-triplet.patch new file mode 100644 index 0000000000..49b7e121d8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/darwin-triplet.patch @@ -0,0 +1,23 @@ +From 35a830d1968465e4ecb079273f032b754bac6c66 Mon Sep 17 00:00:00 2001 +From: James Le Cuirot +Date: Sun, 25 Mar 2018 17:40:49 +0100 +Subject: [PATCH] configure: Add target OS clause for Darwin + +These triplets can also have a version number suffix, for example, +x86_64-apple-darwin16. +--- + configure | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure b/configure +index 5b6b710..2d8ac42 100755 +--- a/configure ++++ b/configure +@@ -410,6 +410,7 @@ else + amigaos) TARGET_OS=AmigaOS ;; + mingw32*) TARGET_OS=MINGW32 ;; + wine) TARGET_OS=Wine ;; ++ darwin*) TARGET_OS=Darwin ;; + esac + } + TARGET_OS="UNKNOWN" diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/freebsd-triplet.patch b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/freebsd-triplet.patch new file mode 100644 index 0000000000..94b615824b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/freebsd-triplet.patch @@ -0,0 +1,23 @@ +From 14db7f9ee87e05450853ba0e1d8e83cc34aef3e4 Mon Sep 17 00:00:00 2001 +From: James Le Cuirot +Date: Sat, 24 Mar 2018 13:51:56 +0000 +Subject: [PATCH] configure: Match FreeBSD triplets with versions + +Triplets such as x86_64-unknown-freebsd11.1 are common. +--- + configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure b/configure +index 8ebb929..5b6b710 100755 +--- a/configure ++++ b/configure +@@ -398,7 +398,7 @@ else + part=$(echo $BUILD_TARGET | cut -d '-' -f $component) + case "$(echo $part | tr '[A-Z]' '[a-z]')" in + linux) TARGET_OS=Linux ;; +- freebsd) TARGET_OS=FreeBSD ;; ++ freebsd*) TARGET_OS=FreeBSD ;; + gnu/kfreebsd) TARGET_OS=FreeBSD ;; + netbsd) TARGET_OS=NetBSD ;; + bsd/os) TARGET_OS=BSD/OS ;; diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/rhash-1.3.6-no_echon.patch b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/rhash-1.3.6-no_echon.patch new file mode 100644 index 0000000000..9b25b29a89 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/rhash-1.3.6-no_echon.patch @@ -0,0 +1,54 @@ +From c1776248a0b34a690e99ab9a7a814c34f78088ec Mon Sep 17 00:00:00 2001 +From: Lars Wendler +Date: Mon, 19 Mar 2018 10:47:13 +0100 +Subject: [PATCH] "echo -n" cannot be expected to work with every POSIX shell + +See "man 1p echo" section APPLICATION USAGE. This patch replaces "echo -n" +with "printf '%s'". +--- + configure | 15 ++------------- + 1 file changed, 2 insertions(+), 13 deletions(-) + +diff --git a/configure b/configure +index f480f7b..2a7d485 100755 +--- a/configure ++++ b/configure +@@ -22,17 +22,6 @@ INSTALL_LIB_STATIC=auto + INSTALL_LIB_SHARED=auto + INSTALL_PKGCONFIGDIR="$PKG_INSTALLDIR" + +-case $(echo -n) in +- -n) # SysV style +- ECHO_N= +- ECHO_C='\c' +- ;; +- *) # BSD style +- ECHO_N='-n ' +- ECHO_C= +- ;; +-esac +- + # display error message and exit + die () { + echo +@@ -235,7 +224,7 @@ trap remove_tmpdir EXIT + + str_concat() + { +- echo ${ECHO_N} $@ ${ECHO_C} ++ printf '%s ' $@ + } + + yn_nonempty() +@@ -246,7 +235,7 @@ yn_nonempty() + # Use this before starting a check + start_check() { + echo "============ Checking for $1 ============" >> "$TMPLOG" +- echo ${ECHO_N} "Checking for $1 ... ${ECHO_C}" ++ printf '%s' "Checking for $1 ... " + res_comment="" + } + +-- +2.16.2 + diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/rhash-1.4.2-clang.patch b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/rhash-1.4.2-clang.patch new file mode 100644 index 0000000000..460e73a6ac --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/rhash-1.4.2-clang.patch @@ -0,0 +1,80 @@ +From 4dc506066cf1727b021e6352535a8bb315c3f8dc Mon Sep 17 00:00:00 2001 +From: Aleksey +Date: Sat, 17 Jul 2021 18:39:41 +0300 +Subject: [PATCH] configure: fix clang detection on macOS + +--- + configure | 58 +++++++++++++++++++++++++++---------------------------- + 1 file changed, 28 insertions(+), 30 deletions(-) + +diff --git a/configure b/configure +index 59d432b..111270a 100755 +--- a/configure ++++ b/configure +@@ -519,38 +519,36 @@ else + elif run_cmd "$CC --version"; then + cc_name_tmp=$($CC --version 2>&1 | head -n 1 | cut -d ' ' -f 1) + fi +- if test -n "${cc_name_tmp}"; then +- if echo "$cc_name_tmp" | grep -q "gcc"; then +- cc_name=$cc_name_tmp +- start_check "$CC version" +- cc_vendor=gnu +- cc_version=$($CC -dumpversion 2>&1) +- if ! echo $cc_version | grep -q '^[0-9][0-9]*\.[0-9]'; then +- cc_v2=$($CC -dumpfullversion -dumpversion 2>/dev/null) +- if echo $cc_v2 | grep -q '^[0-9][0-9]*\.[0-9]'; then +- cc_version=$cc_v2 +- fi ++ if echo "$cc_name_tmp" | grep -q "gcc"; then ++ cc_name=$cc_name_tmp ++ start_check "$CC version" ++ cc_vendor=gnu ++ cc_version=$($CC -dumpversion 2>&1) ++ if ! echo $cc_version | grep -q '^[0-9][0-9]*\.[0-9]'; then ++ cc_v2=$($CC -dumpfullversion -dumpversion 2>/dev/null) ++ if echo $cc_v2 | grep -q '^[0-9][0-9]*\.[0-9]'; then ++ cc_version=$cc_v2 + fi +- case $cc_version in +- 2.96*) +- cc_fail=yes +- ;; +- *) +- _cc_major=$(echo $cc_version | cut -d '.' -f 1) +- _cc_minor=$(echo $cc_version | cut -d '.' -f 2) +- _cc_mini=$(echo $cc_version | cut -d '.' -f 3) +- ;; +- esac +- finish_check "$cc_name $cc_version" +- break +- fi +- if echo "$cc_name_tmp" | grep -q "clang"; then +- start_check "$CC version" +- cc_vendor=clang +- cc_version=$($CC -dumpversion 2>&1) +- finish_check "clang $cc_version" +- break + fi ++ case $cc_version in ++ 2.96*) ++ cc_fail=yes ++ ;; ++ *) ++ _cc_major=$(echo $cc_version | cut -d '.' -f 1) ++ _cc_minor=$(echo $cc_version | cut -d '.' -f 2) ++ _cc_mini=$(echo $cc_version | cut -d '.' -f 3) ++ ;; ++ esac ++ finish_check "$cc_name $cc_version" ++ break ++ elif $CC --version 2>&1 | grep -q "clang"; then ++ start_check "$CC version" ++ cc_vendor=clang ++ cc_version=$($CC -dumpversion 2>&1) ++ finish_check "clang $cc_version" ++ break ++ else + cc_name_tmp=$($CC -V 2>&1 | head -n 1 | cut -d ' ' -f 2,3) + if test "$cc_name_tmp" = "Sun C"; then + start_check "$CC version" diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/unquote-cc.patch b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/unquote-cc.patch new file mode 100644 index 0000000000..77ccc9b2c5 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/files/unquote-cc.patch @@ -0,0 +1,26 @@ +From 4558d6753611ab1bf21765017e5b451aee8409f6 Mon Sep 17 00:00:00 2001 +From: James Le Cuirot +Date: Sun, 18 Mar 2018 14:23:28 +0000 +Subject: [PATCH] configure: Don't quote $CC when calling it + +It might have additional arguments. +--- + configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure b/configure +index f480f7b..8ebb929 100755 +--- a/configure ++++ b/configure +@@ -480,7 +480,7 @@ if test "$(basename $CC)" = "icc" || test "$(basename $CC)" = "ecc"; then + else + CC_TMP="$CC" + for CC in "$CC_TMP" gcc cc ; do +- if "$CC" -v >/dev/null 2>&1; then ++ if $CC -v >/dev/null 2>&1; then + cc_name_tmp=$($CC -v 2>&1 | tail -n 1 | cut -d ' ' -f 1) + if test "$cc_name_tmp" = "gcc"; then + cc_name=$cc_name_tmp +-- +2.16.1 + diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/rhash/metadata.xml b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/metadata.xml new file mode 100644 index 0000000000..95929f11fd --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/metadata.xml @@ -0,0 +1,17 @@ + + + + + chewi@gentoo.org + James Le Cuirot + + + rhash + rhash/RHash + cpe:/a:rhash_project:rhash + https://github.com/rhash/RHash/issues + + + RHash is a console utility for calculation and verification of magnet links and a wide range of hash sums like CRC32, MD4, MD5, SHA1, SHA256, SHA512, SHA3, AICH, ED2K, Tiger, DC++ TTH, BitTorrent BTIH, GOST R 34.11-94, RIPEMD-160, HAS-160, EDON-R, Whirlpool and Snefru. + + diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/rhash/rhash-1.3.6-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/rhash-1.3.6-r1.ebuild new file mode 100644 index 0000000000..9dfdd81943 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/rhash-1.3.6-r1.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs multilib-minimal + +DESCRIPTION="Console utility and library for computing and verifying file hash sums" +HOMEPAGE="http://rhash.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris" +IUSE="debug nls ssl static-libs" + +RDEPEND=" + ssl? ( + dev-libs/openssl:0=[${MULTILIB_USEDEP}] +)" + +DEPEND="${RDEPEND} + nls? ( sys-devel/gettext )" + +S="${WORKDIR}/RHash-${PV}" + +PATCHES=( + "${FILESDIR}"/unquote-cc.patch + "${FILESDIR}"/${P}-no_echon.patch + "${FILESDIR}"/{freebsd,darwin}-triplet.patch +) + +src_prepare() { + default + multilib_copy_sources +} + +multilib_src_configure() { + set -- \ + ./configure \ + --target="${CHOST}" \ + --cc="$(tc-getCC)" \ + --ar="$(tc-getAR)" \ + --extra-cflags="${CFLAGS}" \ + --extra-ldflags="${LDFLAGS}" \ + --prefix="${EPREFIX}"/usr \ + --libdir="${EPREFIX}"/usr/$(get_libdir) \ + --sysconfdir="${EPREFIX}"/etc \ + --disable-openssl-runtime \ + --disable-static \ + --enable-lib-shared \ + $(use_enable debug) \ + $(use_enable nls gettext) \ + $(use_enable ssl openssl) \ + $(use_enable static-libs lib-static) + + echo "${@}" + "${@}" || die "configure failed" +} + +# We would add compile-gmo to the build targets but install-gmo always +# recompiles unconditionally. :( + +multilib_src_install() { + # -j1 needed due to race condition. + emake DESTDIR="${D}" -j1 \ + install{,-pkg-config} \ + $(use nls && echo install-gmo) \ + $(use kernel_Winnt || echo install-lib-so-link) + + emake DESTDIR="${D}" -j1 \ + -C lib${PN} install-headers +} + +multilib_src_test() { + emake test +} diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/rhash/rhash-1.4.2.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/rhash-1.4.2.ebuild new file mode 100644 index 0000000000..efcfab85db --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/rhash/rhash-1.4.2.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs multilib-minimal + +DESCRIPTION="Console utility and library for computing and verifying file hash sums" +HOMEPAGE="http://rhash.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="debug nls ssl static-libs" + +RDEPEND=" + ssl? ( + dev-libs/openssl:0=[${MULTILIB_USEDEP}] +)" + +DEPEND=" + ${RDEPEND} +" + +BDEPEND=" + nls? ( sys-devel/gettext ) +" + +S="${WORKDIR}/RHash-${PV}" + +PATCHES=( + "${FILESDIR}"/${P}-clang.patch +) + +src_prepare() { + default + + if [[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] ; then + # we lack posix_memalign + sed -i -e '/if _POSIX_VERSION/s/if .*$/if 0/' \ + librhash/util.h || die + fi + + multilib_copy_sources +} + +multilib_src_configure() { + set -- \ + ./configure \ + --target="${CHOST}" \ + --cc="$(tc-getCC)" \ + --ar="$(tc-getAR)" \ + --extra-cflags="${CFLAGS}" \ + --extra-ldflags="${LDFLAGS}" \ + --prefix="${EPREFIX}"/usr \ + --libdir="${EPREFIX}"/usr/$(get_libdir) \ + --sysconfdir="${EPREFIX}"/etc \ + --disable-openssl-runtime \ + --disable-static \ + --enable-lib-shared \ + $(use_enable debug) \ + $(use_enable nls gettext) \ + $(use_enable ssl openssl) \ + $(use_enable static-libs lib-static) + + echo "${@}" + "${@}" || die "configure failed" +} + +# We would add compile-gmo to the build targets but install-gmo always +# recompiles unconditionally. :( +# (note from sam: this might be fixed in >1.4.2? +# https://github.com/rhash/RHash/commit/9e4eeb1268149b24b7fbe0fc0fe91e3a266e6261) + +multilib_src_install() { + # -j1 needed due to race condition. + emake DESTDIR="${D}" -j1 \ + install{,-lib-headers,-pkg-config} \ + $(use nls && echo install-gmo) \ + $(use kernel_Winnt || echo install-lib-so-link) +} + +multilib_src_test() { + emake test +} diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/shash/Manifest b/sdk_container/src/third_party/portage-stable/app-crypt/shash/Manifest new file mode 100644 index 0000000000..8917298158 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/shash/Manifest @@ -0,0 +1 @@ +DIST shash-0.2.6.tar.gz 105641 BLAKE2B f7421aa9ed7b242e14a585461e96f44e35f1acf38cba358807ec06e6678c82f7f3b070a218de71cccde9f18a1e7e13f8dd4cf66b48e9d6626f16b2e1fc33757d SHA512 340a59bd16b3e5069a076b56f8fe24d2306a6ddd5e6ad564c5e17a992d8e279a7109ba39bd5caa8438a0e85b4f94cb0878228f7aefe38221ff6efa80df64086b diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/shash/files/0.2.6-manpage-fixes.patch b/sdk_container/src/third_party/portage-stable/app-crypt/shash/files/0.2.6-manpage-fixes.patch new file mode 100644 index 0000000000..0376e15c35 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/shash/files/0.2.6-manpage-fixes.patch @@ -0,0 +1,30 @@ +diff -pruN shash-0.2.6/doc/shash.1 shash-0.2.6-r1/doc/shash.1 +--- shash-0.2.6/doc/shash.1 2004-09-18 09:51:04.004647112 +0100 ++++ shash-0.2.6-r1/doc/shash.1 2004-09-18 09:57:26.062565480 +0100 +@@ -31,7 +31,7 @@ Because of this shash also supports HMAC + a mechanism for message authentication using cryptographic hash functions. + So shash can use a key with a hash algorithm to produce hashes that can only + be verified with the key. This way you can securely check (i.e. you are sure +-that nobody can modify the mac, without beeing detected) ++that nobody can modify the mac, without being detected) + if files in a filesystem were altered. + + If the list of files and digests, that shash produces, is stored as +@@ -72,7 +72,7 @@ Suppress some not critical warnings. + .TP + .B \-b + Use binary mode. In unix environment, only difference between this and +-the normal mode is an asterix preceding the filename in the output. ++the normal mode is an asterisk preceding the filename in the output. + .TP + .B \-c + Check the checksum of all files listed in +@@ -94,7 +94,7 @@ Enter the keyword via the command line. + keyword instead of prompting for it. Keep in mind that someone + may see the command you are executing and so your key. + .TP +-.B \-c --config FILE ++.B \-i --config FILE + Use the specified configuration file. The default is .shashrc + in your home directory. The format of the configuration + file is the same as the parameters. An example file is: diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/shash/files/shash-0.2.6-binary-files.patch b/sdk_container/src/third_party/portage-stable/app-crypt/shash/files/shash-0.2.6-binary-files.patch new file mode 100644 index 0000000000..1eb0cba176 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/shash/files/shash-0.2.6-binary-files.patch @@ -0,0 +1,34 @@ +--- shash-0.2.6/src/shash.c ++++ shash-0.2.6/src/shash.c +@@ -631,11 +631,11 @@ + + if (nosalt == FALSE && hmac == 1) { + if (sscanf +- (linebuf, "%s %s %s\n", hexbuffer, buffer, +- buffer2) < 2) { ++ (linebuf, "%s %s *%s\n", hexbuffer, buffer, ++ buffer2) != 3) { + if (sscanf +- (linebuf, "%s %s *%s\n", hexbuffer, +- buffer, buffer2) < 2) ++ (linebuf, "%s %s %s\n", hexbuffer, ++ buffer, buffer2) != 3) + continue; + } + +@@ -648,11 +648,11 @@ + key = pass2key(algorithm, keymode_buffer, &keylen, password, plen); + + } else { +- if (sscanf(linebuf, "%s %s\n", buffer, buffer2) == +- 0) { ++ if (sscanf(linebuf, "%s *%s\n", buffer, buffer2) != ++ 2) { + if (sscanf +- (linebuf, "%s *%s\n", buffer, +- buffer2) == 0) ++ (linebuf, "%s %s\n", buffer, ++ buffer2) != 2) + continue; + } + diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/shash/files/shash-0.2.6-format-security.patch b/sdk_container/src/third_party/portage-stable/app-crypt/shash/files/shash-0.2.6-format-security.patch new file mode 100644 index 0000000000..4e46639e28 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/shash/files/shash-0.2.6-format-security.patch @@ -0,0 +1,28 @@ +--- shash-0.2.6/src/errors.c ++++ shash-0.2.6/src/errors.c +@@ -4,7 +4,7 @@ + + void err_quit(char *errmsg) + { +- fprintf(stderr, errmsg); ++ fputs(errmsg, stderr); + exit(-1); + } + +@@ -12,7 +12,7 @@ + { + + if (quiet < 1) { +- fprintf(stderr, errmsg); ++ fputs(errmsg, stderr); + } + + } +@@ -20,6 +20,6 @@ + void err_crit(char *errmsg) + { + if (quiet <= 2) { +- fprintf(stderr, errmsg); ++ fputs(errmsg, stderr); + } + } diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/shash/files/shash.bash-completion b/sdk_container/src/third_party/portage-stable/app-crypt/shash/files/shash.bash-completion new file mode 100644 index 0000000000..15a677dce5 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/shash/files/shash.bash-completion @@ -0,0 +1,38 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# +# shash(1) completion. + +_shash() { + local cur prev + + COMPREPLY=() + cur=${COMP_WORDS[COMP_CWORD]} + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "${prev}" in + -c|--config) + _filedir + return 0 ;; + -o|--keymode) + COMPREPLY=( $( compgen -W "$( shash --listkeygen | tail -n +2 )" \ + -- ${cur} ) ) + return ;; + -a|--algorithm) + COMPREPLY=( $( compgen -W "$( shash --list )" \ + -- ${cur} ) ) + return ;; + *) + ;; + esac + + COMPREPLY=( $( compgen -W '-V -q -m -d -c -b -t -o -i -a -l -k -h -v \ + -L \ + --verbose --quiet --nosalt --time --hmac --doublecheck \ + --check --binary --text --keymode --config --algorithm \ + --list --key --listkeygen --help --version --license' \ + -- ${cur} ) ) + _filedir + return 0 +} +complete -F _shash ${filenames} shash diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/shash/metadata.xml b/sdk_container/src/third_party/portage-stable/app-crypt/shash/metadata.xml new file mode 100644 index 0000000000..e93ad590e0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/shash/metadata.xml @@ -0,0 +1,9 @@ + + + + + swegener@gentoo.org + Sven Wegener + + shash is a command-line interface for libmhash and is used to generate or check digests or MACs of files. + diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/shash/shash-0.2.6-r3.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/shash/shash-0.2.6-r3.ebuild new file mode 100644 index 0000000000..158e48f3af --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/shash/shash-0.2.6-r3.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit bash-completion-r1 + +DESCRIPTION="Generate or check digests or MACs of files" +HOMEPAGE="http://mcrypt.hellug.gr/shash/" +SRC_URI="ftp://mcrypt.hellug.gr/pub/mcrypt/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="static" + +DEPEND=">=app-crypt/mhash-0.8.18-r1 + static? ( app-crypt/mhash[static-libs(+)] )" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${PV}-manpage-fixes.patch + "${FILESDIR}"/${P}-binary-files.patch + "${FILESDIR}"/${P}-format-security.patch +) + +src_configure() { + econf $(use_enable static static-link) +} + +src_install() { + emake install DESTDIR="${D}" + dodoc AUTHORS ChangeLog INSTALL NEWS doc/sample.shashrc doc/FORMAT + newbashcomp "${FILESDIR}"/shash.bash-completion ${PN} +} diff --git a/sdk_container/src/third_party/portage-stable/app-doc/eclass-manpages/Manifest b/sdk_container/src/third_party/portage-stable/app-doc/eclass-manpages/Manifest new file mode 100644 index 0000000000..af9cb96ff5 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-doc/eclass-manpages/Manifest @@ -0,0 +1,2 @@ +DIST eclass-manpages-20210712.tar.xz 410588 BLAKE2B 776da6b26db95791401d562d3d550e1ab71dc19f54124fa37e78ab2595835fb05e7382b98007e58131698710b978dd87cbc10df1ea98c6ef01ec866418d6f9a6 SHA512 fb2bdc790d96f0662d84eddd01f291b4a3cac638c1e3df8975755e81d2d64dda14b0f60a77387da8544672080711d5047dda777d27a8cf2ded2634c47ecfee4b +DIST eclass-manpages-20211002.tar.xz 410056 BLAKE2B 6ac900aaa2718d838af7f069766e2e818276c80d1819f38ca0bc09d3815487083dfe64781331d9b0049c474fc6cec9381daea9c7961f14b208cd3372c79b7564 SHA512 bcea1bcae107df73c72c37dd65c5414833ad59e9d6088f806cb06512b53cdbcad10fb50fe23ede02ccfcda17ae86c70879f496929ef0f54aa799179f9ef0d869 diff --git a/sdk_container/src/third_party/portage-stable/app-doc/eclass-manpages/eclass-manpages-20210712.ebuild b/sdk_container/src/third_party/portage-stable/app-doc/eclass-manpages/eclass-manpages-20210712.ebuild new file mode 100644 index 0000000000..d28b3ad532 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-doc/eclass-manpages/eclass-manpages-20210712.ebuild @@ -0,0 +1,20 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Collection of Gentoo eclass manpages" +HOMEPAGE="https://github.com/mgorny/eclass-to-manpage" +SRC_URI="https://dev.gentoo.org/~ulm/distfiles/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +# Keep the keywords stable. No need to change to ~arch. +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-solaris" + +BDEPEND="app-arch/xz-utils + sys-apps/gawk" + +src_install() { + emake install DESTDIR="${D}" PREFIX="${EPREFIX}/usr" +} diff --git a/sdk_container/src/third_party/portage-stable/app-doc/eclass-manpages/eclass-manpages-20211002.ebuild b/sdk_container/src/third_party/portage-stable/app-doc/eclass-manpages/eclass-manpages-20211002.ebuild new file mode 100644 index 0000000000..117b609c71 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-doc/eclass-manpages/eclass-manpages-20211002.ebuild @@ -0,0 +1,21 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Collection of Gentoo eclass manpages" +HOMEPAGE="https://github.com/mgorny/eclass-to-manpage" +SRC_URI="https://dev.gentoo.org/~ulm/distfiles/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +# Keep the keywords stable. No need to change to ~arch. +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-solaris" + +BDEPEND="app-arch/xz-utils + sys-apps/gawk + sys-apps/groff" + +src_install() { + emake install DESTDIR="${D}" PREFIX="${EPREFIX}/usr" +} diff --git a/sdk_container/src/third_party/portage-stable/app-doc/eclass-manpages/eclass-manpages-99999999.ebuild b/sdk_container/src/third_party/portage-stable/app-doc/eclass-manpages/eclass-manpages-99999999.ebuild new file mode 100644 index 0000000000..2339dc038f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-doc/eclass-manpages/eclass-manpages-99999999.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit git-r3 + +DESCRIPTION="Collection of Gentoo eclass manpages" +HOMEPAGE="https://github.com/mgorny/eclass-to-manpage" +SRC_URI="" +EGIT_REPO_URI="https://anongit.gentoo.org/git/repo/gentoo.git + https://github.com/gentoo/gentoo.git" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" + +BDEPEND="sys-apps/gawk + sys-apps/groff" + +src_unpack() { + git-r3_fetch + git-r3_fetch "https://github.com/mgorny/eclass-to-manpage" + + git-r3_checkout '' '' '' eclass + git-r3_checkout "https://github.com/mgorny/eclass-to-manpage" +} + +src_compile() { + emake ECLASSDIR=eclass +} + +src_install() { + emake install ECLASSDIR=eclass DESTDIR="${D}" PREFIX="${EPREFIX}/usr" +} diff --git a/sdk_container/src/third_party/portage-stable/app-doc/eclass-manpages/metadata.xml b/sdk_container/src/third_party/portage-stable/app-doc/eclass-manpages/metadata.xml new file mode 100644 index 0000000000..e4aa80f1e0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-doc/eclass-manpages/metadata.xml @@ -0,0 +1,12 @@ + + + + + mgorny@gentoo.org + Michał Górny + + + tools-portage@gentoo.org + Gentoo Portage tools team + + diff --git a/sdk_container/src/third_party/portage-stable/app-editors/nano/Manifest b/sdk_container/src/third_party/portage-stable/app-editors/nano/Manifest new file mode 100644 index 0000000000..8b3194b5ca --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/nano/Manifest @@ -0,0 +1,2 @@ +DIST nano-5.8.tar.gz 3038948 BLAKE2B 126976539e8ab3a7be986edc7422bc58d31e0c81dffbf34c9b701d09d268233ed0de4f07ac8d2dd0963b768cce4e2afe89a4f8ed9fd216a71ebac98c7f403deb SHA512 dd3a7e328f256052707c4d28f2ca32f9e44de123e3dee3c0747fbab222d215b2a895c403b9274fd286e19477b8be3314fc83167eec32194370105b1e70c05a3f +DIST nano-5.9.tar.gz 3093675 BLAKE2B d4fa2f0e64b6ab243a2b127ff894e900098f6261f5d46657ff3459cc0b51683a63fc5de54bd4545b47bc16c633b09142f8501b84a09df3e8123da5233a063766 SHA512 61bf4de300579bc6f0028a2237e105228d8657819c02f32c7ef8f84f9c54734df8fb9a9cddbce0f7721ebc5ac8ae4799c118291ae15480082f8b1317019a485d diff --git a/sdk_container/src/third_party/portage-stable/app-editors/nano/metadata.xml b/sdk_container/src/third_party/portage-stable/app-editors/nano/metadata.xml new file mode 100644 index 0000000000..6ec35ae205 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/nano/metadata.xml @@ -0,0 +1,42 @@ + + + + + polynomial-c@gentoo.org + Lars Wendler + + +GNU nano - an enhanced clone of the Pico text editor. + +The nano project was started because of a few "problems" with the +wonderfully easy-to-use and friendly Pico text editor. + +First and foremost is its license: the Pine suite does not use the +GPL or a GPL-friendly license, and has unclear restrictions on +redistribution. Because of this, Pine and Pico are not included with +many GNU/Linux distributions. Also, other features (like goto line +number or search and replace) were unavailable until recently or +require a command line flag. Yuck. + +nano aims to solve these problems by emulating the functionality of +Pico as closely as possible while addressing the problems above and +perhaps providing other extra functionality. + + + Enable justify/unjustify functions for text formatting. + + Enable debug messages and assert warnings. Note that these will all be sent + straight to stderr rather than some logging facility. + + + Add magic file support (sys-apps/file) to automatically detect appropriate syntax highlighting + + + Disable all fancy features, including ones that otherwise have a dedicated + USE flag (such as spelling). + + + Enable this if /bin and /usr/bin are separate directories + + + diff --git a/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-5.8-r2.ebuild b/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-5.8-r2.ebuild new file mode 100644 index 0000000000..64cdf0ed0e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-5.8-r2.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://git.savannah.gnu.org/git/nano.git" + inherit git-r3 autotools +else + MY_P="${PN}-${PV/_}" + SRC_URI="https://www.nano-editor.org/dist/v${PV:0:1}/${MY_P}.tar.gz" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +DESCRIPTION="GNU GPL'd Pico clone with more functionality" +HOMEPAGE="https://www.nano-editor.org/ https://wiki.gentoo.org/wiki/Nano/Basics_Guide" + +LICENSE="GPL-3" +SLOT="0" +IUSE="debug justify magic minimal ncurses nls +spell +split-usr static unicode" + +LIB_DEPEND=" + >=sys-libs/ncurses-5.9-r1:=[unicode(+)?] + sys-libs/ncurses:=[static-libs(+)] + magic? ( sys-apps/file[static-libs(+)] ) + nls? ( virtual/libintl )" +RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )" +DEPEND="${RDEPEND} + static? ( ${LIB_DEPEND} )" +BDEPEND=" + nls? ( sys-devel/gettext ) + virtual/pkgconfig +" + +REQUIRED_USE=" + magic? ( !minimal ) +" + +src_prepare() { + default + if [[ ${PV} == "9999" ]] ; then + eautoreconf + fi +} + +src_configure() { + use static && append-ldflags -static + local myconf=( + --bindir="${EPREFIX}"/bin + --htmldir=/trash + $(use_enable !minimal color) + $(use_enable !minimal multibuffer) + $(use_enable !minimal nanorc) + $(use_enable magic libmagic) + $(use_enable spell speller) + $(use_enable justify) + $(use_enable debug) + $(use_enable nls) + $(use_enable unicode utf8) + $(use_enable minimal tiny) + ) + econf "${myconf[@]}" +} + +src_install() { + default + # don't use "${ED}" here or things break (#654534) + rm -r "${D}"/trash || die + + dodoc doc/sample.nanorc + docinto html + dodoc doc/faq.html + insinto /etc + newins doc/sample.nanorc nanorc + if ! use minimal ; then + # Enable colorization by default. + sed -i \ + -e '/^# include /s:# *::' \ + "${ED}"/etc/nanorc || die + + # Since nano-5.0 these are no longer being "enabled" by default + # (bug #736848) + local rcdir="/usr/share/nano" + mv "${ED}"${rcdir}/extra/* "${ED}"/${rcdir}/ || die + rmdir "${ED}"${rcdir}/extra || die + fi + + use split-usr && dosym ../../bin/nano /usr/bin/nano +} diff --git a/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-5.9.ebuild b/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-5.9.ebuild new file mode 100644 index 0000000000..188b7842b1 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-5.9.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://git.savannah.gnu.org/git/nano.git" + inherit git-r3 autotools +else + MY_P="${PN}-${PV/_}" + SRC_URI="https://www.nano-editor.org/dist/v${PV:0:1}/${MY_P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +DESCRIPTION="GNU GPL'd Pico clone with more functionality" +HOMEPAGE="https://www.nano-editor.org/ https://wiki.gentoo.org/wiki/Nano/Basics_Guide" + +LICENSE="GPL-3" +SLOT="0" +IUSE="debug justify magic minimal ncurses nls +spell +split-usr static unicode" + +LIB_DEPEND=" + >=sys-libs/ncurses-5.9-r1:=[unicode(+)?] + sys-libs/ncurses:=[static-libs(+)] + magic? ( sys-apps/file[static-libs(+)] ) + nls? ( virtual/libintl )" +RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )" +DEPEND="${RDEPEND} + static? ( ${LIB_DEPEND} )" +BDEPEND=" + nls? ( sys-devel/gettext ) + virtual/pkgconfig +" + +REQUIRED_USE=" + magic? ( !minimal ) +" + +src_prepare() { + default + if [[ ${PV} == "9999" ]] ; then + eautoreconf + fi +} + +src_configure() { + use static && append-ldflags -static + local myconf=( + --bindir="${EPREFIX}"/bin + --htmldir=/trash + $(use_enable !minimal color) + $(use_enable !minimal multibuffer) + $(use_enable !minimal nanorc) + $(use_enable magic libmagic) + $(use_enable spell speller) + $(use_enable justify) + $(use_enable debug) + $(use_enable nls) + $(use_enable unicode utf8) + $(use_enable minimal tiny) + ) + econf "${myconf[@]}" +} + +src_install() { + default + # don't use "${ED}" here or things break (#654534) + rm -r "${D}"/trash || die + + dodoc doc/sample.nanorc + docinto html + dodoc doc/faq.html + insinto /etc + newins doc/sample.nanorc nanorc + if ! use minimal ; then + # Enable colorization by default. + sed -i \ + -e '/^# include /s:# *::' \ + "${ED}"/etc/nanorc || die + + # Since nano-5.0 these are no longer being "enabled" by default + # (bug #736848) + local rcdir="/usr/share/nano" + mv "${ED}"${rcdir}/extra/* "${ED}"/${rcdir}/ || die + rmdir "${ED}"${rcdir}/extra || die + fi + + use split-usr && dosym ../../bin/nano /usr/bin/nano +} diff --git a/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-9999.ebuild b/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-9999.ebuild new file mode 100644 index 0000000000..188b7842b1 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-9999.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://git.savannah.gnu.org/git/nano.git" + inherit git-r3 autotools +else + MY_P="${PN}-${PV/_}" + SRC_URI="https://www.nano-editor.org/dist/v${PV:0:1}/${MY_P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +DESCRIPTION="GNU GPL'd Pico clone with more functionality" +HOMEPAGE="https://www.nano-editor.org/ https://wiki.gentoo.org/wiki/Nano/Basics_Guide" + +LICENSE="GPL-3" +SLOT="0" +IUSE="debug justify magic minimal ncurses nls +spell +split-usr static unicode" + +LIB_DEPEND=" + >=sys-libs/ncurses-5.9-r1:=[unicode(+)?] + sys-libs/ncurses:=[static-libs(+)] + magic? ( sys-apps/file[static-libs(+)] ) + nls? ( virtual/libintl )" +RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )" +DEPEND="${RDEPEND} + static? ( ${LIB_DEPEND} )" +BDEPEND=" + nls? ( sys-devel/gettext ) + virtual/pkgconfig +" + +REQUIRED_USE=" + magic? ( !minimal ) +" + +src_prepare() { + default + if [[ ${PV} == "9999" ]] ; then + eautoreconf + fi +} + +src_configure() { + use static && append-ldflags -static + local myconf=( + --bindir="${EPREFIX}"/bin + --htmldir=/trash + $(use_enable !minimal color) + $(use_enable !minimal multibuffer) + $(use_enable !minimal nanorc) + $(use_enable magic libmagic) + $(use_enable spell speller) + $(use_enable justify) + $(use_enable debug) + $(use_enable nls) + $(use_enable unicode utf8) + $(use_enable minimal tiny) + ) + econf "${myconf[@]}" +} + +src_install() { + default + # don't use "${ED}" here or things break (#654534) + rm -r "${D}"/trash || die + + dodoc doc/sample.nanorc + docinto html + dodoc doc/faq.html + insinto /etc + newins doc/sample.nanorc nanorc + if ! use minimal ; then + # Enable colorization by default. + sed -i \ + -e '/^# include /s:# *::' \ + "${ED}"/etc/nanorc || die + + # Since nano-5.0 these are no longer being "enabled" by default + # (bug #736848) + local rcdir="/usr/share/nano" + mv "${ED}"${rcdir}/extra/* "${ED}"/${rcdir}/ || die + rmdir "${ED}"${rcdir}/extra || die + fi + + use split-usr && dosym ../../bin/nano /usr/bin/nano +} diff --git a/sdk_container/src/third_party/portage-stable/app-editors/vim-core/Manifest b/sdk_container/src/third_party/portage-stable/app-editors/vim-core/Manifest new file mode 100644 index 0000000000..2953ddceb3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/vim-core/Manifest @@ -0,0 +1,6 @@ +DIST vim-9.0.0099.tar.gz 16712565 BLAKE2B b3277ebda0bb40601d995935422006d1a266bb862be612e69abd057a7342d13457ded5cb4743cf43a09b7d2001438f5a426ba12c30947bb7c193188c5fc13cf7 SHA512 ca0dea7b7fd78cf9c7cd4656611d066540f9d81ab17bcb75c79f0e989bdcfb769940ea29f75445c554b159e9eb3b2c4f9d77448254c3e4e4457b1bf721936498 +DIST vim-9.0.0828.tar.gz 16782339 BLAKE2B 6b997c1c828338d64a8b204a1e232676ec075834b1b7e74c2fc671e315f9bf6026b0c419ebb3c31e7ce58dbca23828ca11d866b2bfcb73f8a86fb31fa0d51b00 SHA512 03f93515039a2f275a8fe6b84bbac5875ffff17768ab3201e111eba4897a2485fe4ccfe238151f393334c7a6ea77eddd8898f0b816e26dbdb884f4e6bcbd2943 +DIST vim-9.0.1000.tar.gz 16842747 BLAKE2B 85edab7d13daa3e84ef0aeb50e3e9bfd31f0634d8e480c105727b0c34318e0adf7f1276dcdac53df8fc416fd8dfb70377cd74ed570752a3e77f07a083fa6c113 SHA512 9d2b914a112948d77b92c8dcafc2f711a83c3fdaf35a28f7f606e77007b9320e2260a0f6b24fc875a817c33c012f077f89730b34e9f12d6f00795c5c806704c8 +DIST vim-9.0.1157.tar.gz 16924574 BLAKE2B 0cdc6cf61f5abdaff0762b98550bfa5bae8f0485ddd0e9947a5fe52390f9da54fc8f5fdae767fb8f5d3ac2b441253917a80ae7f6092f67b69bdc9b6a630df8e2 SHA512 19240a9bcf5900766db42e2894b1bf7b849274711f17dc267671aacd867b334c3d30f39947dde7dd0245f289e9ad801eeb272f34a2ab15d01fac40bf71a54271 +DIST vim-patches-vim-9.0.0049-patches.tar.gz 2743 BLAKE2B dff3e215b235e1cbc2c62b1af2d1414d10b794dbee9f5e7797fb3d34e00c2e065c339d4c82bf28aed53e0b5f2f8f1ee5c7ce69851cd63360788609bf144ac922 SHA512 7d5c64d674fa77048fdca7287072c0e488723133e254c10711dbadf750416c368725327ca9b76f332017bc70aa544a9baef671765eabf0d172d39921ffd7d942 +DIST vim-patches-vim-9.0.1000-patches.tar.bz2 3245 BLAKE2B 3bf3d0e314cc3f96d5d9675de196a62c4c8a72645d56ef94b80768571c99cba5cc556442e3bd2dfa8818460fd851fe7bd1ae15999af7225fb271b81c43105843 SHA512 2883441a2001bf7ce89a7f0862f780b71cc0164c8fcb8dbdf7040e1bcbcf408d138d3d77f308aa54c762e9975fa5ec89cfceeabbf721344dfc938870a363667a diff --git a/sdk_container/src/third_party/portage-stable/app-editors/vim-core/files/gvim.svg b/sdk_container/src/third_party/portage-stable/app-editors/vim-core/files/gvim.svg new file mode 100644 index 0000000000..b82742a790 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/vim-core/files/gvim.svg @@ -0,0 +1,94 @@ + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/sdk_container/src/third_party/portage-stable/app-editors/vim-core/files/vim-0.0.0828-configure-clang16.patch b/sdk_container/src/third_party/portage-stable/app-editors/vim-core/files/vim-0.0.0828-configure-clang16.patch new file mode 100644 index 0000000000..e202a9dd3c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/vim-core/files/vim-0.0.0828-configure-clang16.patch @@ -0,0 +1,28 @@ +https://github.com/vim/vim/pull/11496 + +From 360b569f86b851c37e32b7cfaec079823188ff27 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Fri, 4 Nov 2022 03:18:23 +0000 +Subject: [PATCH] configure.ac: Fix -Wimplicit-int + +Clang 16 makes -Wimplicit-int an error by default. Fixes errors like: +``` +error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Werror,-Wimplicit-int] +``` + +We already use proper declarations with every other test anyway, so +let's be consistent. + +Signed-off-by: Sam James +--- a/src/configure.ac ++++ b/src/configure.ac +@@ -3654,7 +3654,7 @@ dnl check if struct sigcontext is defined (used for SGI only) + AC_MSG_CHECKING(for struct sigcontext) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ + #include +-test_sig() ++int test_sig() + { + struct sigcontext *scont; + scont = (struct sigcontext *)0; + diff --git a/sdk_container/src/third_party/portage-stable/app-editors/vim-core/files/vim-9.0-fix-create-timer-for-cros-compiling.patch b/sdk_container/src/third_party/portage-stable/app-editors/vim-core/files/vim-9.0-fix-create-timer-for-cros-compiling.patch new file mode 100644 index 0000000000..5247a80754 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/vim-core/files/vim-9.0-fix-create-timer-for-cros-compiling.patch @@ -0,0 +1,28 @@ +From bba26c9ed9d4ddc82afd0343f145dc9e14b91498 Mon Sep 17 00:00:00 2001 +From: Varsha Teratipally +Date: Tue, 2 Aug 2022 22:18:29 +0000 +Subject: [PATCH] Configure check for timer_create may give wrong error. +Give a warning instead of an error + +Partial solution from github.com/vim/vim/commit/5f6cae8b8a49c435556e32f84d067cd0b4d28e4c + +--- + src/configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/configure.ac b/src/configure.ac +index e8522ec05..41f41dee3 100644 +--- a/src/configure.ac ++++ b/src/configure.ac +@@ -3850,7 +3850,7 @@ static void set_flag(union sigval sv) {} + ])], + vim_cv_timer_create=yes, + vim_cv_timer_create=no), +- AC_MSG_ERROR(cross-compiling: please set 'vim_cv_timer_create') ++ AC_MSG_WARN(cross-compiling: please set 'vim_cv_timer_create') + )] + ) + +-- + + diff --git a/sdk_container/src/third_party/portage-stable/app-editors/vim-core/files/vimrc-r6 b/sdk_container/src/third_party/portage-stable/app-editors/vim-core/files/vimrc-r6 new file mode 100644 index 0000000000..0197f057d2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/vim-core/files/vimrc-r6 @@ -0,0 +1,217 @@ +scriptencoding utf-8 +" ^^ Please leave the above line at the start of the file. + +" Default configuration file for Vim + +" Written by Aron Griffis +" Modified by Ryan Phillips +" Modified some more by Ciaran McCreesh +" Added Redhat's vimrc info by Seemant Kulleen + +" You can override any of these settings on a global basis via the +" "/etc/vim/vimrc.local" file, and on a per-user basis via "~/.vimrc". You may +" need to create these. + +" {{{ General settings +" The following are some sensible defaults for Vim for most users. +" We attempt to change as little as possible from Vim's defaults, +" deviating only where it makes sense +set nocompatible " Use Vim defaults (much better!) +set bs=2 " Allow backspacing over everything in insert mode +set ai " Always set auto-indenting on +set history=50 " keep 50 lines of command history +set ruler " Show the cursor position all the time + +set viminfo='20,\"500 " Keep a .viminfo file. + +" Don't use Ex mode, use Q for formatting +map Q gq + +" When doing tab completion, give the following files lower priority. You may +" wish to set 'wildignore' to completely ignore files, and 'wildmenu' to enable +" enhanced tab completion. These can be done in the user vimrc file. +set suffixes+=.info,.aux,.log,.dvi,.bbl,.out,.o,.lo + +" When displaying line numbers, don't use an annoyingly wide number column. This +" doesn't enable line numbers -- :set number will do that. The value given is a +" minimum width to use for the number column, not a fixed size. +if v:version >= 700 + set numberwidth=3 +endif +" }}} + +" {{{ Modeline settings +" We don't allow modelines by default. See bug #14088 and bug #73715. +" If you're not concerned about these, you can enable them on a per-user +" basis by adding "set modeline" to your ~/.vimrc file. +set nomodeline +" }}} + +" {{{ Locale settings +" Try to come up with some nice sane GUI fonts. Also try to set a sensible +" value for fileencodings based upon locale. These can all be overridden in +" the user vimrc file. +if v:lang =~? "^ko" + set fileencodings=euc-kr + set guifontset=-*-*-medium-r-normal--16-*-*-*-*-*-*-* +elseif v:lang =~? "^ja_JP" + set fileencodings=euc-jp + set guifontset=-misc-fixed-medium-r-normal--14-*-*-*-*-*-*-* +elseif v:lang =~? "^zh_TW" + set fileencodings=big5 + set guifontset=-sony-fixed-medium-r-normal--16-150-75-75-c-80-iso8859-1,-taipei-fixed-medium-r-normal--16-150-75-75-c-160-big5-0 +elseif v:lang =~? "^zh_CN" + set fileencodings=gb2312 + set guifontset=*-r-* +endif + +" If we have a BOM, always honour that rather than trying to guess. +if &fileencodings !~? "ucs-bom" + set fileencodings^=ucs-bom +endif + +" Always check for UTF-8 when trying to determine encodings. +if &fileencodings !~? "utf-8" + " If we have to add this, the default encoding is not Unicode. + " We use this fact later to revert to the default encoding in plaintext/empty + " files. + let g:added_fenc_utf8 = 1 + set fileencodings+=utf-8 +endif + +" Make sure we have a sane fallback for encoding detection +if &fileencodings !~? "default" + set fileencodings+=default +endif +" }}} + +" {{{ Syntax highlighting settings +" Switch syntax highlighting on, when the terminal has colors +" Also switch on highlighting the last used search pattern. +if &t_Co > 2 || has("gui_running") + syntax on + set hlsearch +endif +" }}} + +" {{{ Terminal fixes +if &term ==? "xterm" + set t_Sb=^[4%dm + set t_Sf=^[3%dm + set ttymouse=xterm2 +endif + +if &term ==? "gnome" && has("eval") + " Set useful keys that vim doesn't discover via termcap but are in the + " builtin xterm termcap. See bug #122562. We use exec to avoid having to + " include raw escapes in the file. + exec "set =\eO5D" + exec "set =\eO5C" +endif +" }}} + +" {{{ Filetype plugin settings +" Enable plugin-provided filetype settings, but only if the ftplugin +" directory exists (which it won't on livecds, for example). +if isdirectory(expand("$VIMRUNTIME/ftplugin")) + filetype plugin on + + " Uncomment the next line (or copy to your ~/.vimrc) for plugin-provided + " indent settings. Some people don't like these, so we won't turn them on by + " default. + " filetype indent on +endif +" }}} + +" {{{ Fix &shell, see bug #101665. +if "" == &shell + if executable("@GENTOO_PORTAGE_EPREFIX@/bin/bash") + set shell=@GENTOO_PORTAGE_EPREFIX@/bin/bash + elseif executable("@GENTOO_PORTAGE_EPREFIX@/bin/sh") + set shell=@GENTOO_PORTAGE_EPREFIX@/bin/sh + endif +endif +"}}} + +" {{{ Our default /bin/sh is bash, not ksh, so syntax highlighting for .sh +" files should default to bash. See :help sh-syntax and bug #101819. +if has("eval") + let is_bash=1 +endif +" }}} + +" {{{ Autocommands +if has("autocmd") + +augroup gentoo + au! + + " Gentoo-specific settings for ebuilds. These are the federally-mandated + " required tab settings. See the following for more information: + " http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml + " Note that the rules below are very minimal and don't cover everything. + " Better to emerge app-vim/gentoo-syntax, which provides full syntax, + " filetype and indent settings for all things Gentoo. + au BufRead,BufNewFile *.e{build,class} let is_bash=1|setfiletype sh + au BufRead,BufNewFile *.e{build,class} set ts=4 sw=4 noexpandtab + + " In text files, limit the width of text to 78 characters, but be careful + " that we don't override the user's setting. + autocmd BufNewFile,BufRead *.txt + \ if &tw == 0 && ! exists("g:leave_my_textwidth_alone") | + \ setlocal textwidth=78 | + \ endif + + " When editing a file, always jump to the last cursor position + autocmd BufReadPost * + \ if ! exists("g:leave_my_cursor_position_alone") | + \ if line("'\"") > 0 && line ("'\"") <= line("$") | + \ exe "normal! g'\"" | + \ endif | + \ endif + + " When editing a crontab file, set backupcopy to yes rather than auto. See + " :help crontab and bug #53437. + autocmd FileType crontab set backupcopy=yes + + " If we previously detected that the default encoding is not UTF-8 + " (g:added_fenc_utf8), assume that a file with only ASCII characters (or no + " characters at all) isn't a Unicode file, but is in the default encoding. + " Except of course if a byte-order mark is in effect. + autocmd BufReadPost * + \ if exists("g:added_fenc_utf8") && &fileencoding == "utf-8" && + \ ! &bomb && search('[\x80-\xFF]','nw') == 0 && &modifiable | + \ set fileencoding= | + \ endif + +augroup END + +endif " has("autocmd") +" }}} + +" We don't want VIM to load their own built-in defaults, preferring ours here +" instead. This option cannot apply to minimal builds, so it is guarded by a +" test that's guaranteed to fail for those, owing to the lack of +eval. +if 1 + let g:skip_defaults_vim = 1 +endif + +" Enable Omni completion when opening a file only if a specific plugin does +" not already exist for that filetype. This allows Omni completion +" (Ctrl-x/Ctrl-o) to work with any programming language if and only if a syntax +" file exists for the said language. +if exists("+omnifunc") + autocmd Filetype * + \ if &omnifunc == "" | + \ setlocal omnifunc=syntaxcomplete#Complete | + \ endif +endif + +" {{{ vimrc.local +if filereadable("@GENTOO_PORTAGE_EPREFIX@/etc/vim/vimrc.local") + source @GENTOO_PORTAGE_EPREFIX@/etc/vim/vimrc.local +endif +" }}} + +" vim: set fenc=utf-8 tw=80 sw=2 sts=2 et foldmethod=marker : + diff --git a/sdk_container/src/third_party/portage-stable/app-editors/vim-core/files/xxd-completion b/sdk_container/src/third_party/portage-stable/app-editors/vim-core/files/xxd-completion new file mode 100644 index 0000000000..174a4093f3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/vim-core/files/xxd-completion @@ -0,0 +1,25 @@ +# Author: Ciaran McCreesh +# +# completion for xxd + +_xxd() +{ + local cur prev cmd args + + COMPREPLY=() + cur=${COMP_WORDS[COMP_CWORD]} + prev=${COMP_WORDS[COMP_CWORD-1]} + cmd=${COMP_WORDS[0]} + + if [[ "${cur}" == -* ]] ; then + args='-a -b -c -E -g -h -i -l -ps -r -s -u -v' + COMPREPLY=( $( compgen -W "${args}" -- $cur ) ) + else + _filedir + fi +} + +complete -F _xxd xxd + +# vim: set ft=sh sw=4 et sts=4 : + diff --git a/sdk_container/src/third_party/portage-stable/app-editors/vim-core/metadata.xml b/sdk_container/src/third_party/portage-stable/app-editors/vim-core/metadata.xml new file mode 100644 index 0000000000..841e5550d7 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/vim-core/metadata.xml @@ -0,0 +1,12 @@ + + + + + vim@gentoo.org + Gentoo Vim Project + + + vim/vim + cpe:/a:vim:vim + + diff --git a/sdk_container/src/third_party/portage-stable/app-editors/vim-core/vim-core-9.0.0099.ebuild b/sdk_container/src/third_party/portage-stable/app-editors/vim-core/vim-core-9.0.0099.ebuild new file mode 100644 index 0000000000..f754552aef --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/vim-core/vim-core-9.0.0099.ebuild @@ -0,0 +1,234 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Please bump with app-editors/vim and app-editors/gvim + +VIM_VERSION="9.0" +inherit vim-doc flag-o-matic bash-completion-r1 prefix desktop xdg-utils + +if [[ ${PV} == 9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/vim/vim.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/vim-${PV} +else + SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> vim-${PV}.tar.gz + https://gitweb.gentoo.org/proj/vim-patches.git/snapshot/vim-patches-vim-9.0.0049-patches.tar.gz" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi +S="${WORKDIR}/vim-${PV}" + +DESCRIPTION="vim and gvim shared files" +HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim" + +LICENSE="vim" +SLOT="0" +IUSE="nls acl minimal" + +# ncurses is only needed by ./configure, so no subslot operator required +DEPEND=">=sys-libs/ncurses-5.2-r2:0" +BDEPEND="sys-devel/autoconf" +# Avoid icon file collision, bug #673880 +RDEPEND="!> "${S}"/src/feature.h || die + echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' >> "${S}"/src/feature.h || die + + # Use exuberant ctags which installs as /usr/bin/exuberant-ctags. + # Hopefully this pattern won't break for a while at least. + # This fixes bug #29398 (27 Sep 2003 agriffis) + sed -i 's/\> "$c" || die "echo failed" + done + + # Try to avoid sandbox problems. Bug #114475. + if [[ -d "${S}"/src/po ]]; then + sed -i -e \ + '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \ + "${S}"/src/po/Makefile || die "sed failed" + fi + + cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed" + + # Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0 + sed -i -e \ + "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \ + "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed' + + # Fix bug #76331: -O3 causes problems, use -O2 instead. We'll do this for + # everyone since previous flag filtering bugs have turned out to affect + # multiple archs... + replace-flags -O3 -O2 + + # Fix bug #18245: Prevent "make" from the following chain: + # (1) Notice configure.ac is newer than auto/configure + # (2) Rebuild auto/configure + # (3) Notice auto/configure is newer than auto/config.mk + # (4) Run ./configure (with wrong args) to remake auto/config.mk + sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed" + + # Remove src/auto/configure file. + rm -v src/auto/configure || die "rm configure failed" + + eapply_user +} + +src_configure() { + # Fix bug #37354: Disallow -funroll-all-loops on amd64 + # Bug 57859 suggests that we want to do this for all archs + filter-flags -funroll-all-loops + + emake -j1 -C src autoconf + + # This should fix a sandbox violation (see bug 24447). The hvc + # things are for ppc64, see bug 86433. + for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do + if [[ -e "${file}" ]]; then + addwrite ${file} + fi + done + + # Let Portage do the stripping. Some people like that. + export ac_cv_prog_STRIP="$(type -P true ) faking strip" + + local myconf=( + --with-modified-by=Gentoo-${PVR} + --enable-gui=no + --without-x + --disable-darwin + --disable-perlinterp + --disable-pythoninterp + --disable-rubyinterp + --disable-gpm + --disable-selinux + $(use_enable nls) + $(use_enable acl) + ) + + # Keep Gentoo Prefix env contained within the EPREFIX + use prefix && myconf+=( --without-local-dir ) + + if tc-is-cross-compiler ; then + export vim_cv_getcwd_broken=no \ + vim_cv_memmove_handles_overlap=yes \ + vim_cv_stat_ignores_slash=yes \ + vim_cv_terminfo=yes \ + vim_cv_toupper_broken=no + fi + + econf "${myconf[@]}" +} + +src_compile() { + emake -j1 -C src auto/osdef.h objects + emake tools +} + +src_test() { :; } + +src_install() { + local vimfiles=/usr/share/vim/vim${VIM_VERSION/.} + + dodir /usr/{bin,share/{man/man1,vim}} + emake -C src \ + installruntime \ + installmanlinks \ + installmacros \ + installtutor \ + installtutorbin \ + installtools \ + install-languages \ + DESTDIR="${D}" \ + BINDIR="${EPREFIX}"/usr/bin \ + MANDIR="${EPREFIX}"/usr/share/man \ + DATADIR="${EPREFIX}"/usr/share + + keepdir ${vimfiles}/keymap + + # default vimrc is installed by vim-core since it applies to + # both vim and gvim + insinto /etc/vim/ + newins "${FILESDIR}"/vimrc-r6 vimrc + eprefixify "${ED}"/etc/vim/vimrc + + if use minimal; then + # To save space, install only a subset of the files. + # Helps minimalize the livecd, bug 65144. + rm -rv "${ED}${vimfiles}"/{compiler,doc,ftplugin,indent} || die + rm -rv "${ED}${vimfiles}"/{macros,print,tools,tutor} || die + rm -v "${ED}"/usr/bin/vimtutor || die + + for f in "${ED}${vimfiles}"/colors/*.vim; do + if [[ ${f} != */@(default).vim ]] ; then + printf '%s\0' "${f}" + fi + done | xargs -0 rm -f || die + + for f in "${ED}${vimfiles}"/syntax/*.vim; do + if [[ ${f} != */@(conf|crontab|fstab|inittab|resolv|sshdconfig|syntax|nosyntax|synload).vim ]] ; then + printf '%s\0' "${f}" + fi + done | xargs -0 rm -f || die + fi + + newbashcomp "${FILESDIR}"/xxd-completion xxd + + # install gvim icon since both vim/gvim desktop files reference it + doicon -s scalable "${FILESDIR}"/gvim.svg +} + +pkg_postinst() { + # update documentation tags (from vim-doc.eclass) + update_vim_helptags + + # update icon cache + xdg_icon_cache_update +} + +pkg_postrm() { + # Update documentation tags (from vim-doc.eclass) + update_vim_helptags + + # update icon cache + xdg_icon_cache_update +} diff --git a/sdk_container/src/third_party/portage-stable/app-editors/vim-core/vim-core-9.0.0828-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-editors/vim-core/vim-core-9.0.0828-r1.ebuild new file mode 100644 index 0000000000..e078361724 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/vim-core/vim-core-9.0.0828-r1.ebuild @@ -0,0 +1,234 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Please bump with app-editors/vim and app-editors/gvim + +VIM_VERSION="9.0" +inherit bash-completion-r1 desktop flag-o-matic prefix toolchain-funcs vim-doc xdg-utils + +if [[ ${PV} == 9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/vim/vim.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/vim-${PV} +else + SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> vim-${PV}.tar.gz + https://gitweb.gentoo.org/proj/vim-patches.git/snapshot/vim-patches-vim-9.0.0049-patches.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi +S="${WORKDIR}/vim-${PV}" + +DESCRIPTION="vim and gvim shared files" +HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim" + +LICENSE="vim" +SLOT="0" +IUSE="nls acl minimal" + +# ncurses is only needed by ./configure, so no subslot operator required +DEPEND=">=sys-libs/ncurses-5.2-r2:0" +BDEPEND="sys-devel/autoconf" + +PATCHES=( + "${FILESDIR}"/vim-0.0.0828-configure-clang16.patch +) + +pkg_setup() { + # people with broken alphabets run into trouble. bug #82186. + unset LANG LC_ALL + export LC_COLLATE="C" +} + +src_prepare() { + if [[ ${PV} != 9999* ]] ; then + # Gentoo patches to fix runtime issues, cross-compile errors, etc + eapply "${WORKDIR}"/vim-patches-vim-9.0.0049-patches + fi + + # Fixup a script to use awk instead of nawk + sed -i \ + -e '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \ + "${S}"/runtime/tools/mve.awk || die "sed failed" + + # See bug #77841. We remove this file after the tarball extraction. + rm -v "${S}"/runtime/tools/vimspell.sh || die "rm failed" + + # Read vimrc and gvimrc from /etc/vim + echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' >> "${S}"/src/feature.h || die + echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' >> "${S}"/src/feature.h || die + + # Use exuberant ctags which installs as /usr/bin/exuberant-ctags. + # Hopefully this pattern won't break for a while at least. + # This fixes bug #29398 (27 Sep 2003 agriffis) + sed -i 's/\> "$c" || die "echo failed" + done + + # Try to avoid sandbox problems. Bug #114475. + if [[ -d "${S}"/src/po ]]; then + sed -i -e \ + '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \ + "${S}"/src/po/Makefile || die "sed failed" + fi + + cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed" + + # Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0 + sed -i -e \ + "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \ + "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed' + + # Fix bug #76331: -O3 causes problems, use -O2 instead. We'll do this for + # everyone since previous flag filtering bugs have turned out to affect + # multiple archs... + replace-flags -O3 -O2 + + # Fix bug #18245: Prevent "make" from the following chain: + # (1) Notice configure.ac is newer than auto/configure + # (2) Rebuild auto/configure + # (3) Notice auto/configure is newer than auto/config.mk + # (4) Run ./configure (with wrong args) to remake auto/config.mk + sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed" + + # Remove src/auto/configure file. + rm -v src/auto/configure || die "rm configure failed" + + eapply_user +} + +src_configure() { + # Fix bug #37354: Disallow -funroll-all-loops on amd64 + # Bug 57859 suggests that we want to do this for all archs + filter-flags -funroll-all-loops + + emake -j1 -C src autoconf + + # This should fix a sandbox violation (see bug 24447). The hvc + # things are for ppc64, see bug 86433. + for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do + if [[ -e "${file}" ]]; then + addwrite ${file} + fi + done + + # Let Portage do the stripping. Some people like that. + export ac_cv_prog_STRIP="$(type -P true ) faking strip" + + local myconf=( + --with-modified-by=Gentoo-${PVR} + --enable-gui=no + --without-x + --disable-darwin + --disable-perlinterp + --disable-pythoninterp + --disable-rubyinterp + --disable-gpm + --disable-selinux + $(use_enable nls) + $(use_enable acl) + ) + + # Keep Gentoo Prefix env contained within the EPREFIX + use prefix && myconf+=( --without-local-dir ) + + if tc-is-cross-compiler ; then + export vim_cv_getcwd_broken=no \ + vim_cv_memmove_handles_overlap=yes \ + vim_cv_stat_ignores_slash=yes \ + vim_cv_terminfo=yes \ + vim_cv_toupper_broken=no + fi + + econf "${myconf[@]}" +} + +src_compile() { + emake -j1 -C src auto/osdef.h objects + emake tools +} + +src_test() { :; } + +src_install() { + local vimfiles=/usr/share/vim/vim${VIM_VERSION/.} + + dodir /usr/{bin,share/{man/man1,vim}} + emake -C src \ + installruntime \ + installmanlinks \ + installmacros \ + installtutor \ + installtutorbin \ + installtools \ + install-languages \ + DESTDIR="${D}" \ + BINDIR="${EPREFIX}"/usr/bin \ + MANDIR="${EPREFIX}"/usr/share/man \ + DATADIR="${EPREFIX}"/usr/share + + keepdir ${vimfiles}/keymap + + # default vimrc is installed by vim-core since it applies to + # both vim and gvim + insinto /etc/vim/ + newins "${FILESDIR}"/vimrc-r6 vimrc + eprefixify "${ED}"/etc/vim/vimrc + + if use minimal; then + # To save space, install only a subset of the files. + # Helps minimalize the livecd, bug 65144. + rm -rv "${ED}${vimfiles}"/{compiler,doc,ftplugin,indent} || die + rm -rv "${ED}${vimfiles}"/{macros,print,tools,tutor} || die + rm -v "${ED}"/usr/bin/vimtutor || die + + for f in "${ED}${vimfiles}"/colors/*.vim; do + if [[ ${f} != */@(default).vim ]] ; then + printf '%s\0' "${f}" + fi + done | xargs -0 rm -f || die + + for f in "${ED}${vimfiles}"/syntax/*.vim; do + if [[ ${f} != */@(conf|crontab|fstab|inittab|resolv|sshdconfig|syntax|nosyntax|synload).vim ]] ; then + printf '%s\0' "${f}" + fi + done | xargs -0 rm -f || die + fi + + newbashcomp "${FILESDIR}"/xxd-completion xxd + + # install gvim icon since both vim/gvim desktop files reference it + doicon -s scalable "${FILESDIR}"/gvim.svg +} + +pkg_postinst() { + # update documentation tags (from vim-doc.eclass) + update_vim_helptags + + # update icon cache + xdg_icon_cache_update +} + +pkg_postrm() { + # Update documentation tags (from vim-doc.eclass) + update_vim_helptags + + # update icon cache + xdg_icon_cache_update +} diff --git a/sdk_container/src/third_party/portage-stable/app-editors/vim-core/vim-core-9.0.1000.ebuild b/sdk_container/src/third_party/portage-stable/app-editors/vim-core/vim-core-9.0.1000.ebuild new file mode 100644 index 0000000000..091a54fad0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/vim-core/vim-core-9.0.1000.ebuild @@ -0,0 +1,231 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Please bump with app-editors/vim and app-editors/gvim + +VIM_VERSION="9.0" +VIM_PATCHES_VERSION="9.0.1000" +inherit bash-completion-r1 desktop flag-o-matic prefix toolchain-funcs vim-doc xdg-utils + +if [[ ${PV} == 9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/vim/vim.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/vim-${PV} +else + SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> vim-${PV}.tar.gz + https://gitweb.gentoo.org/proj/vim-patches.git/snapshot/vim-patches-vim-${VIM_PATCHES_VERSION}-patches.tar.bz2" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi +S="${WORKDIR}/vim-${PV}" + +DESCRIPTION="vim and gvim shared files" +HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim" + +LICENSE="vim" +SLOT="0" +IUSE="nls acl minimal" + +# ncurses is only needed by ./configure, so no subslot operator required +DEPEND=">=sys-libs/ncurses-5.2-r2:0" +BDEPEND="sys-devel/autoconf" + +pkg_setup() { + # people with broken alphabets run into trouble. bug #82186. + unset LANG LC_ALL + export LC_COLLATE="C" +} + +src_prepare() { + if [[ ${PV} != 9999* ]] ; then + # Gentoo patches to fix runtime issues, cross-compile errors, etc + eapply "${WORKDIR}"/vim-patches-vim-${VIM_PATCHES_VERSION}-patches + fi + + # Fixup a script to use awk instead of nawk + sed -i \ + -e '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \ + "${S}"/runtime/tools/mve.awk || die "sed failed" + + # See bug #77841. We remove this file after the tarball extraction. + rm -v "${S}"/runtime/tools/vimspell.sh || die "rm failed" + + # Read vimrc and gvimrc from /etc/vim + echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' >> "${S}"/src/feature.h || die + echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' >> "${S}"/src/feature.h || die + + # Use exuberant ctags which installs as /usr/bin/exuberant-ctags. + # Hopefully this pattern won't break for a while at least. + # This fixes bug #29398 (27 Sep 2003 agriffis) + sed -i 's/\> "$c" || die "echo failed" + done + + # Try to avoid sandbox problems. Bug #114475. + if [[ -d "${S}"/src/po ]]; then + sed -i -e \ + '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \ + "${S}"/src/po/Makefile || die "sed failed" + fi + + cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed" + + # Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0 + sed -i -e \ + "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \ + "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed' + + # Fix bug #76331: -O3 causes problems, use -O2 instead. We'll do this for + # everyone since previous flag filtering bugs have turned out to affect + # multiple archs... + replace-flags -O3 -O2 + + # Fix bug #18245: Prevent "make" from the following chain: + # (1) Notice configure.ac is newer than auto/configure + # (2) Rebuild auto/configure + # (3) Notice auto/configure is newer than auto/config.mk + # (4) Run ./configure (with wrong args) to remake auto/config.mk + sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed" + + # Remove src/auto/configure file. + rm -v src/auto/configure || die "rm configure failed" + + eapply_user +} + +src_configure() { + # Fix bug #37354: Disallow -funroll-all-loops on amd64 + # Bug 57859 suggests that we want to do this for all archs + filter-flags -funroll-all-loops + + emake -j1 -C src autoconf + + # This should fix a sandbox violation (see bug 24447). The hvc + # things are for ppc64, see bug 86433. + for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do + if [[ -e "${file}" ]]; then + addwrite ${file} + fi + done + + # Let Portage do the stripping. Some people like that. + export ac_cv_prog_STRIP="$(type -P true ) faking strip" + + local myconf=( + --with-modified-by=Gentoo-${PVR} + --enable-gui=no + --without-x + --disable-darwin + --disable-perlinterp + --disable-pythoninterp + --disable-rubyinterp + --disable-gpm + --disable-selinux + $(use_enable nls) + $(use_enable acl) + ) + + # Keep Gentoo Prefix env contained within the EPREFIX + use prefix && myconf+=( --without-local-dir ) + + if tc-is-cross-compiler ; then + export vim_cv_getcwd_broken=no \ + vim_cv_memmove_handles_overlap=yes \ + vim_cv_stat_ignores_slash=yes \ + vim_cv_terminfo=yes \ + vim_cv_toupper_broken=no + fi + + econf "${myconf[@]}" +} + +src_compile() { + emake -j1 -C src auto/osdef.h objects + emake tools +} + +src_test() { :; } + +src_install() { + local vimfiles=/usr/share/vim/vim${VIM_VERSION/.} + + dodir /usr/{bin,share/{man/man1,vim}} + emake -C src \ + installruntime \ + installmanlinks \ + installmacros \ + installtutor \ + installtutorbin \ + installtools \ + install-languages \ + DESTDIR="${D}" \ + BINDIR="${EPREFIX}"/usr/bin \ + MANDIR="${EPREFIX}"/usr/share/man \ + DATADIR="${EPREFIX}"/usr/share + + keepdir ${vimfiles}/keymap + + # default vimrc is installed by vim-core since it applies to + # both vim and gvim + insinto /etc/vim/ + newins "${FILESDIR}"/vimrc-r6 vimrc + eprefixify "${ED}"/etc/vim/vimrc + + if use minimal; then + # To save space, install only a subset of the files. + # Helps minimalize the livecd, bug 65144. + rm -rv "${ED}${vimfiles}"/{compiler,doc,ftplugin,indent} || die + rm -rv "${ED}${vimfiles}"/{macros,print,tools,tutor} || die + rm -v "${ED}"/usr/bin/vimtutor || die + + for f in "${ED}${vimfiles}"/colors/*.vim; do + if [[ ${f} != */@(default).vim ]] ; then + printf '%s\0' "${f}" + fi + done | xargs -0 rm -f || die + + for f in "${ED}${vimfiles}"/syntax/*.vim; do + if [[ ${f} != */@(conf|crontab|fstab|inittab|resolv|sshdconfig|syntax|nosyntax|synload).vim ]] ; then + printf '%s\0' "${f}" + fi + done | xargs -0 rm -f || die + fi + + newbashcomp "${FILESDIR}"/xxd-completion xxd + + # install gvim icon since both vim/gvim desktop files reference it + doicon -s scalable "${FILESDIR}"/gvim.svg +} + +pkg_postinst() { + # update documentation tags (from vim-doc.eclass) + update_vim_helptags + + # update icon cache + xdg_icon_cache_update +} + +pkg_postrm() { + # Update documentation tags (from vim-doc.eclass) + update_vim_helptags + + # update icon cache + xdg_icon_cache_update +} diff --git a/sdk_container/src/third_party/portage-stable/app-editors/vim-core/vim-core-9.0.1157.ebuild b/sdk_container/src/third_party/portage-stable/app-editors/vim-core/vim-core-9.0.1157.ebuild new file mode 100644 index 0000000000..72a59d3591 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/vim-core/vim-core-9.0.1157.ebuild @@ -0,0 +1,231 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Please bump with app-editors/vim and app-editors/gvim + +VIM_VERSION="9.0" +VIM_PATCHES_VERSION="9.0.1000" +inherit bash-completion-r1 desktop flag-o-matic prefix toolchain-funcs vim-doc xdg-utils + +if [[ ${PV} == 9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/vim/vim.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/vim-${PV} +else + SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> vim-${PV}.tar.gz + https://gitweb.gentoo.org/proj/vim-patches.git/snapshot/vim-patches-vim-${VIM_PATCHES_VERSION}-patches.tar.bz2" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi +S="${WORKDIR}/vim-${PV}" + +DESCRIPTION="vim and gvim shared files" +HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim" + +LICENSE="vim" +SLOT="0" +IUSE="nls acl minimal" + +# ncurses is only needed by ./configure, so no subslot operator required +DEPEND=">=sys-libs/ncurses-5.2-r2:0" +BDEPEND="sys-devel/autoconf" + +pkg_setup() { + # people with broken alphabets run into trouble. bug #82186. + unset LANG LC_ALL + export LC_COLLATE="C" +} + +src_prepare() { + if [[ ${PV} != 9999* ]] ; then + # Gentoo patches to fix runtime issues, cross-compile errors, etc + eapply "${WORKDIR}"/vim-patches-vim-${VIM_PATCHES_VERSION}-patches + fi + + # Fixup a script to use awk instead of nawk + sed -i \ + -e '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \ + "${S}"/runtime/tools/mve.awk || die "sed failed" + + # See bug #77841. We remove this file after the tarball extraction. + rm -v "${S}"/runtime/tools/vimspell.sh || die "rm failed" + + # Read vimrc and gvimrc from /etc/vim + echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' >> "${S}"/src/feature.h || die + echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' >> "${S}"/src/feature.h || die + + # Use exuberant ctags which installs as /usr/bin/exuberant-ctags. + # Hopefully this pattern won't break for a while at least. + # This fixes bug #29398 (27 Sep 2003 agriffis) + sed -i 's/\> "$c" || die "echo failed" + done + + # Try to avoid sandbox problems. Bug #114475. + if [[ -d "${S}"/src/po ]]; then + sed -i -e \ + '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \ + "${S}"/src/po/Makefile || die "sed failed" + fi + + cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed" + + # Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0 + sed -i -e \ + "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \ + "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed' + + # Fix bug #76331: -O3 causes problems, use -O2 instead. We'll do this for + # everyone since previous flag filtering bugs have turned out to affect + # multiple archs... + replace-flags -O3 -O2 + + # Fix bug #18245: Prevent "make" from the following chain: + # (1) Notice configure.ac is newer than auto/configure + # (2) Rebuild auto/configure + # (3) Notice auto/configure is newer than auto/config.mk + # (4) Run ./configure (with wrong args) to remake auto/config.mk + sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed" + + # Remove src/auto/configure file. + rm -v src/auto/configure || die "rm configure failed" + + eapply_user +} + +src_configure() { + # Fix bug #37354: Disallow -funroll-all-loops on amd64 + # Bug 57859 suggests that we want to do this for all archs + filter-flags -funroll-all-loops + + emake -j1 -C src autoconf + + # This should fix a sandbox violation (see bug 24447). The hvc + # things are for ppc64, see bug 86433. + for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do + if [[ -e "${file}" ]]; then + addwrite ${file} + fi + done + + # Let Portage do the stripping. Some people like that. + export ac_cv_prog_STRIP="$(type -P true ) faking strip" + + local myconf=( + --with-modified-by=Gentoo-${PVR} + --enable-gui=no + --without-x + --disable-darwin + --disable-perlinterp + --disable-pythoninterp + --disable-rubyinterp + --disable-gpm + --disable-selinux + $(use_enable nls) + $(use_enable acl) + ) + + # Keep Gentoo Prefix env contained within the EPREFIX + use prefix && myconf+=( --without-local-dir ) + + if tc-is-cross-compiler ; then + export vim_cv_getcwd_broken=no \ + vim_cv_memmove_handles_overlap=yes \ + vim_cv_stat_ignores_slash=yes \ + vim_cv_terminfo=yes \ + vim_cv_toupper_broken=no + fi + + econf "${myconf[@]}" +} + +src_compile() { + emake -j1 -C src auto/osdef.h objects + emake tools +} + +src_test() { :; } + +src_install() { + local vimfiles=/usr/share/vim/vim${VIM_VERSION/.} + + dodir /usr/{bin,share/{man/man1,vim}} + emake -C src \ + installruntime \ + installmanlinks \ + installmacros \ + installtutor \ + installtutorbin \ + installtools \ + install-languages \ + DESTDIR="${D}" \ + BINDIR="${EPREFIX}"/usr/bin \ + MANDIR="${EPREFIX}"/usr/share/man \ + DATADIR="${EPREFIX}"/usr/share + + keepdir ${vimfiles}/keymap + + # default vimrc is installed by vim-core since it applies to + # both vim and gvim + insinto /etc/vim/ + newins "${FILESDIR}"/vimrc-r6 vimrc + eprefixify "${ED}"/etc/vim/vimrc + + if use minimal; then + # To save space, install only a subset of the files. + # Helps minimalize the livecd, bug 65144. + rm -rv "${ED}${vimfiles}"/{compiler,doc,ftplugin,indent} || die + rm -rv "${ED}${vimfiles}"/{macros,print,tools,tutor} || die + rm -v "${ED}"/usr/bin/vimtutor || die + + for f in "${ED}${vimfiles}"/colors/*.vim; do + if [[ ${f} != */@(default).vim ]] ; then + printf '%s\0' "${f}" + fi + done | xargs -0 rm -f || die + + for f in "${ED}${vimfiles}"/syntax/*.vim; do + if [[ ${f} != */@(conf|crontab|fstab|inittab|resolv|sshdconfig|syntax|nosyntax|synload).vim ]] ; then + printf '%s\0' "${f}" + fi + done | xargs -0 rm -f || die + fi + + newbashcomp "${FILESDIR}"/xxd-completion xxd + + # install gvim icon since both vim/gvim desktop files reference it + doicon -s scalable "${FILESDIR}"/gvim.svg +} + +pkg_postinst() { + # update documentation tags (from vim-doc.eclass) + update_vim_helptags + + # update icon cache + xdg_icon_cache_update +} + +pkg_postrm() { + # Update documentation tags (from vim-doc.eclass) + update_vim_helptags + + # update icon cache + xdg_icon_cache_update +} diff --git a/sdk_container/src/third_party/portage-stable/app-editors/vim-core/vim-core-9999.ebuild b/sdk_container/src/third_party/portage-stable/app-editors/vim-core/vim-core-9999.ebuild new file mode 100644 index 0000000000..5ec3c7adc2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/vim-core/vim-core-9999.ebuild @@ -0,0 +1,231 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Please bump with app-editors/vim and app-editors/gvim + +VIM_VERSION="9.0" +VIM_PATCHES_VERSION="9.0.1000" +inherit bash-completion-r1 desktop flag-o-matic prefix toolchain-funcs vim-doc xdg-utils + +if [[ ${PV} == 9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/vim/vim.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/vim-${PV} +else + SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> vim-${PV}.tar.gz + https://gitweb.gentoo.org/proj/vim-patches.git/snapshot/vim-patches-vim-${VIM_PATCHES_VERSION}-patches.tar.bz2" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi +S="${WORKDIR}/vim-${PV}" + +DESCRIPTION="vim and gvim shared files" +HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim" + +LICENSE="vim" +SLOT="0" +IUSE="nls acl minimal" + +# ncurses is only needed by ./configure, so no subslot operator required +DEPEND=">=sys-libs/ncurses-5.2-r2:0" +BDEPEND="sys-devel/autoconf" + +pkg_setup() { + # people with broken alphabets run into trouble. bug #82186. + unset LANG LC_ALL + export LC_COLLATE="C" +} + +src_prepare() { + if [[ ${PV} != 9999* ]] ; then + # Gentoo patches to fix runtime issues, cross-compile errors, etc + eapply "${WORKDIR}"/vim-patches-vim-9.0.0049-patches + fi + + # Fixup a script to use awk instead of nawk + sed -i \ + -e '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \ + "${S}"/runtime/tools/mve.awk || die "sed failed" + + # See bug #77841. We remove this file after the tarball extraction. + rm -v "${S}"/runtime/tools/vimspell.sh || die "rm failed" + + # Read vimrc and gvimrc from /etc/vim + echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' >> "${S}"/src/feature.h || die + echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' >> "${S}"/src/feature.h || die + + # Use exuberant ctags which installs as /usr/bin/exuberant-ctags. + # Hopefully this pattern won't break for a while at least. + # This fixes bug #29398 (27 Sep 2003 agriffis) + sed -i 's/\> "$c" || die "echo failed" + done + + # Try to avoid sandbox problems. Bug #114475. + if [[ -d "${S}"/src/po ]]; then + sed -i -e \ + '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \ + "${S}"/src/po/Makefile || die "sed failed" + fi + + cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed" + + # Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0 + sed -i -e \ + "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \ + "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed' + + # Fix bug #76331: -O3 causes problems, use -O2 instead. We'll do this for + # everyone since previous flag filtering bugs have turned out to affect + # multiple archs... + replace-flags -O3 -O2 + + # Fix bug #18245: Prevent "make" from the following chain: + # (1) Notice configure.ac is newer than auto/configure + # (2) Rebuild auto/configure + # (3) Notice auto/configure is newer than auto/config.mk + # (4) Run ./configure (with wrong args) to remake auto/config.mk + sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed" + + # Remove src/auto/configure file. + rm -v src/auto/configure || die "rm configure failed" + + eapply_user +} + +src_configure() { + # Fix bug #37354: Disallow -funroll-all-loops on amd64 + # Bug 57859 suggests that we want to do this for all archs + filter-flags -funroll-all-loops + + emake -j1 -C src autoconf + + # This should fix a sandbox violation (see bug 24447). The hvc + # things are for ppc64, see bug 86433. + for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do + if [[ -e "${file}" ]]; then + addwrite ${file} + fi + done + + # Let Portage do the stripping. Some people like that. + export ac_cv_prog_STRIP="$(type -P true ) faking strip" + + local myconf=( + --with-modified-by=Gentoo-${PVR} + --enable-gui=no + --without-x + --disable-darwin + --disable-perlinterp + --disable-pythoninterp + --disable-rubyinterp + --disable-gpm + --disable-selinux + $(use_enable nls) + $(use_enable acl) + ) + + # Keep Gentoo Prefix env contained within the EPREFIX + use prefix && myconf+=( --without-local-dir ) + + if tc-is-cross-compiler ; then + export vim_cv_getcwd_broken=no \ + vim_cv_memmove_handles_overlap=yes \ + vim_cv_stat_ignores_slash=yes \ + vim_cv_terminfo=yes \ + vim_cv_toupper_broken=no + fi + + econf "${myconf[@]}" +} + +src_compile() { + emake -j1 -C src auto/osdef.h objects + emake tools +} + +src_test() { :; } + +src_install() { + local vimfiles=/usr/share/vim/vim${VIM_VERSION/.} + + dodir /usr/{bin,share/{man/man1,vim}} + emake -C src \ + installruntime \ + installmanlinks \ + installmacros \ + installtutor \ + installtutorbin \ + installtools \ + install-languages \ + DESTDIR="${D}" \ + BINDIR="${EPREFIX}"/usr/bin \ + MANDIR="${EPREFIX}"/usr/share/man \ + DATADIR="${EPREFIX}"/usr/share + + keepdir ${vimfiles}/keymap + + # default vimrc is installed by vim-core since it applies to + # both vim and gvim + insinto /etc/vim/ + newins "${FILESDIR}"/vimrc-r6 vimrc + eprefixify "${ED}"/etc/vim/vimrc + + if use minimal; then + # To save space, install only a subset of the files. + # Helps minimalize the livecd, bug 65144. + rm -rv "${ED}${vimfiles}"/{compiler,doc,ftplugin,indent} || die + rm -rv "${ED}${vimfiles}"/{macros,print,tools,tutor} || die + rm -v "${ED}"/usr/bin/vimtutor || die + + for f in "${ED}${vimfiles}"/colors/*.vim; do + if [[ ${f} != */@(default).vim ]] ; then + printf '%s\0' "${f}" + fi + done | xargs -0 rm -f || die + + for f in "${ED}${vimfiles}"/syntax/*.vim; do + if [[ ${f} != */@(conf|crontab|fstab|inittab|resolv|sshdconfig|syntax|nosyntax|synload).vim ]] ; then + printf '%s\0' "${f}" + fi + done | xargs -0 rm -f || die + fi + + newbashcomp "${FILESDIR}"/xxd-completion xxd + + # install gvim icon since both vim/gvim desktop files reference it + doicon -s scalable "${FILESDIR}"/gvim.svg +} + +pkg_postinst() { + # update documentation tags (from vim-doc.eclass) + update_vim_helptags + + # update icon cache + xdg_icon_cache_update +} + +pkg_postrm() { + # Update documentation tags (from vim-doc.eclass) + update_vim_helptags + + # update icon cache + xdg_icon_cache_update +} diff --git a/sdk_container/src/third_party/portage-stable/app-editors/vim/Manifest b/sdk_container/src/third_party/portage-stable/app-editors/vim/Manifest new file mode 100644 index 0000000000..2953ddceb3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/vim/Manifest @@ -0,0 +1,6 @@ +DIST vim-9.0.0099.tar.gz 16712565 BLAKE2B b3277ebda0bb40601d995935422006d1a266bb862be612e69abd057a7342d13457ded5cb4743cf43a09b7d2001438f5a426ba12c30947bb7c193188c5fc13cf7 SHA512 ca0dea7b7fd78cf9c7cd4656611d066540f9d81ab17bcb75c79f0e989bdcfb769940ea29f75445c554b159e9eb3b2c4f9d77448254c3e4e4457b1bf721936498 +DIST vim-9.0.0828.tar.gz 16782339 BLAKE2B 6b997c1c828338d64a8b204a1e232676ec075834b1b7e74c2fc671e315f9bf6026b0c419ebb3c31e7ce58dbca23828ca11d866b2bfcb73f8a86fb31fa0d51b00 SHA512 03f93515039a2f275a8fe6b84bbac5875ffff17768ab3201e111eba4897a2485fe4ccfe238151f393334c7a6ea77eddd8898f0b816e26dbdb884f4e6bcbd2943 +DIST vim-9.0.1000.tar.gz 16842747 BLAKE2B 85edab7d13daa3e84ef0aeb50e3e9bfd31f0634d8e480c105727b0c34318e0adf7f1276dcdac53df8fc416fd8dfb70377cd74ed570752a3e77f07a083fa6c113 SHA512 9d2b914a112948d77b92c8dcafc2f711a83c3fdaf35a28f7f606e77007b9320e2260a0f6b24fc875a817c33c012f077f89730b34e9f12d6f00795c5c806704c8 +DIST vim-9.0.1157.tar.gz 16924574 BLAKE2B 0cdc6cf61f5abdaff0762b98550bfa5bae8f0485ddd0e9947a5fe52390f9da54fc8f5fdae767fb8f5d3ac2b441253917a80ae7f6092f67b69bdc9b6a630df8e2 SHA512 19240a9bcf5900766db42e2894b1bf7b849274711f17dc267671aacd867b334c3d30f39947dde7dd0245f289e9ad801eeb272f34a2ab15d01fac40bf71a54271 +DIST vim-patches-vim-9.0.0049-patches.tar.gz 2743 BLAKE2B dff3e215b235e1cbc2c62b1af2d1414d10b794dbee9f5e7797fb3d34e00c2e065c339d4c82bf28aed53e0b5f2f8f1ee5c7ce69851cd63360788609bf144ac922 SHA512 7d5c64d674fa77048fdca7287072c0e488723133e254c10711dbadf750416c368725327ca9b76f332017bc70aa544a9baef671765eabf0d172d39921ffd7d942 +DIST vim-patches-vim-9.0.1000-patches.tar.bz2 3245 BLAKE2B 3bf3d0e314cc3f96d5d9675de196a62c4c8a72645d56ef94b80768571c99cba5cc556442e3bd2dfa8818460fd851fe7bd1ae15999af7225fb271b81c43105843 SHA512 2883441a2001bf7ce89a7f0862f780b71cc0164c8fcb8dbdf7040e1bcbcf408d138d3d77f308aa54c762e9975fa5ec89cfceeabbf721344dfc938870a363667a diff --git a/sdk_container/src/third_party/portage-stable/app-editors/vim/files/vim-0.0.0828-configure-clang16.patch b/sdk_container/src/third_party/portage-stable/app-editors/vim/files/vim-0.0.0828-configure-clang16.patch new file mode 100644 index 0000000000..e202a9dd3c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/vim/files/vim-0.0.0828-configure-clang16.patch @@ -0,0 +1,28 @@ +https://github.com/vim/vim/pull/11496 + +From 360b569f86b851c37e32b7cfaec079823188ff27 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Fri, 4 Nov 2022 03:18:23 +0000 +Subject: [PATCH] configure.ac: Fix -Wimplicit-int + +Clang 16 makes -Wimplicit-int an error by default. Fixes errors like: +``` +error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Werror,-Wimplicit-int] +``` + +We already use proper declarations with every other test anyway, so +let's be consistent. + +Signed-off-by: Sam James +--- a/src/configure.ac ++++ b/src/configure.ac +@@ -3654,7 +3654,7 @@ dnl check if struct sigcontext is defined (used for SGI only) + AC_MSG_CHECKING(for struct sigcontext) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ + #include +-test_sig() ++int test_sig() + { + struct sigcontext *scont; + scont = (struct sigcontext *)0; + diff --git a/sdk_container/src/third_party/portage-stable/app-editors/vim/files/vim-9.0-fix-create-timer-for-cros-compiling.patch b/sdk_container/src/third_party/portage-stable/app-editors/vim/files/vim-9.0-fix-create-timer-for-cros-compiling.patch new file mode 100644 index 0000000000..5247a80754 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/vim/files/vim-9.0-fix-create-timer-for-cros-compiling.patch @@ -0,0 +1,28 @@ +From bba26c9ed9d4ddc82afd0343f145dc9e14b91498 Mon Sep 17 00:00:00 2001 +From: Varsha Teratipally +Date: Tue, 2 Aug 2022 22:18:29 +0000 +Subject: [PATCH] Configure check for timer_create may give wrong error. +Give a warning instead of an error + +Partial solution from github.com/vim/vim/commit/5f6cae8b8a49c435556e32f84d067cd0b4d28e4c + +--- + src/configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/configure.ac b/src/configure.ac +index e8522ec05..41f41dee3 100644 +--- a/src/configure.ac ++++ b/src/configure.ac +@@ -3850,7 +3850,7 @@ static void set_flag(union sigval sv) {} + ])], + vim_cv_timer_create=yes, + vim_cv_timer_create=no), +- AC_MSG_ERROR(cross-compiling: please set 'vim_cv_timer_create') ++ AC_MSG_WARN(cross-compiling: please set 'vim_cv_timer_create') + )] + ) + +-- + + diff --git a/sdk_container/src/third_party/portage-stable/app-editors/vim/files/vim-completion b/sdk_container/src/third_party/portage-stable/app-editors/vim/files/vim-completion new file mode 100644 index 0000000000..67537d6310 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/vim/files/vim-completion @@ -0,0 +1,36 @@ +# Author: Ciaran McCreesh +# +# completion for vim + +_vim() +{ + local cur prev cmd args + + COMPREPLY=() + cur=${COMP_WORDS[COMP_CWORD]} + prev=${COMP_WORDS[COMP_CWORD-1]} + cmd=${COMP_WORDS[0]} + + if [[ "${prev}" == "--servername" ]] ; then + local servers + servers=$(gvim --serverlist ) + COMPREPLY=( $( compgen -W "${servers}" -- $cur ) ) + + elif [[ "${prev}" == -[uUi] ]] ; then + COMPREPLY=( $( compgen -W "NONE" ) \ + $( compgen -f -X "!*vim*" -- "$cur" ) ) + + elif [[ "${cur}" == -* ]] ; then + args='-t -q -c -S --cmd -A -b -C -d -D -e -E -f --nofork \ + -F -g -h -H -i -L -l -m -M -N -n -nb -o -R -r -s \ + -T -u -U -V -v -w -W -x -X -y -Y -Z --echo-wid \ + --help --literal --noplugin --version' + COMPREPLY=( $( compgen -W "${args}" -- $cur ) ) + else + _filedir + fi +} + +complete -o filenames -F _vim vim ex vi view rvim rview vimdiff + +# vim: set ft=sh sw=4 et sts=4 : diff --git a/sdk_container/src/third_party/portage-stable/app-editors/vim/metadata.xml b/sdk_container/src/third_party/portage-stable/app-editors/vim/metadata.xml new file mode 100644 index 0000000000..4d10c66219 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/vim/metadata.xml @@ -0,0 +1,21 @@ + + + + + vim@gentoo.org + Gentoo Vim Project + + + Use dev-libs/libsodium for crypto support + Enable cscope interface + Enable support for Scheme using dev-scheme/racket + Enable terminal emulation support + Install vimpager and vimmanpager links + Link console vim against X11 libraries to enable title and + clipboard features in xterm + + + cpe:/a:vim:vim + vim/vim + + diff --git a/sdk_container/src/third_party/portage-stable/app-editors/vim/vim-9.0.0099-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-editors/vim/vim-9.0.0099-r1.ebuild new file mode 100644 index 0000000000..2e4c3941c6 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/vim/vim-9.0.0099-r1.ebuild @@ -0,0 +1,371 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Please bump with app-editors/vim-core and app-editors/gvim + +VIM_VERSION="9.0" +LUA_COMPAT=( lua5-{1..4} luajit ) +PYTHON_COMPAT=( python3_{9..11} ) +PYTHON_REQ_USE="threads(+)" +USE_RUBY="ruby27 ruby30 ruby31" + +inherit vim-doc flag-o-matic bash-completion-r1 lua-single python-single-r1 ruby-single toolchain-funcs desktop xdg-utils + +if [[ ${PV} == 9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/vim/vim.git" +else + SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> ${P}.tar.gz + https://gitweb.gentoo.org/proj/vim-patches.git/snapshot/vim-patches-vim-9.0.0049-patches.tar.gz" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +DESCRIPTION="Vim, an improved vi-style text editor" +HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim" + +LICENSE="vim" +SLOT="0" +IUSE="X acl crypt cscope debug gpm lua minimal nls perl python racket ruby selinux sound tcl terminal vim-pager" +REQUIRED_USE=" + lua? ( ${LUA_REQUIRED_USE} ) + python? ( ${PYTHON_REQUIRED_USE} ) + vim-pager? ( !minimal ) +" + +RDEPEND=" + >=app-eselect/eselect-vi-1.1 + >=sys-libs/ncurses-5.2-r2:0= + nls? ( virtual/libintl ) + acl? ( kernel_linux? ( sys-apps/acl ) ) + crypt? ( dev-libs/libsodium:= ) + cscope? ( dev-util/cscope ) + gpm? ( >=sys-libs/gpm-1.19.3 ) + lua? ( ${LUA_DEPS} + $(lua_gen_impl_dep 'deprecated' lua5-1) + ) + ~app-editors/vim-core-${PV} + !> "${S}"/src/feature.h || die "echo failed" + echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' \ + >> "${S}"/src/feature.h || die "echo failed" + + # Use exuberant ctags which installs as /usr/bin/exuberant-ctags. + # Hopefully this pattern won't break for a while at least. + # This fixes bug #29398 (27 Sep 2003 agriffis) + sed -i -e \ + 's/\> "$c" || die "echo failed" + done + + # conditionally make the manpager.sh script + if use vim-pager; then + cat > "${S}"/runtime/macros/manpager.sh <<-_EOF_ || die "cat EOF failed" + #!/bin/sh + sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | \\ + vim \\ + -c 'let no_plugin_maps = 1' \\ + -c 'set nolist nomod ft=man ts=8' \\ + -c 'let g:showmarks_enable=0' \\ + -c 'runtime! macros/less.vim' - + _EOF_ + fi + + # Try to avoid sandbox problems. Bug #114475. + if [[ -d "${S}"/src/po ]]; then + sed -i -e \ + '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \ + "${S}"/src/po/Makefile || die "sed failed" + fi + + cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed" + + sed -i -e \ + "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \ + "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed' + + # Fix bug 18245: Prevent "make" from the following chain: + # (1) Notice configure.ac is newer than auto/configure + # (2) Rebuild auto/configure + # (3) Notice auto/configure is newer than auto/config.mk + # (4) Run ./configure (with wrong args) to remake auto/config.mk + sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed" + rm src/auto/configure || die "rm failed" + + eapply_user +} + +src_configure() { + + # Fix bug #37354: Disallow -funroll-all-loops on amd64 + # Bug #57859 suggests that we want to do this for all archs + filter-flags -funroll-all-loops + + # Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for + # everyone since previous flag filtering bugs have turned out to affect + # multiple archs... + replace-flags -O3 -O2 + + emake -j1 -C src autoconf + + # This should fix a sandbox violation (see bug #24447). The hvc + # things are for ppc64, see bug #86433. + for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do + if [[ -e "${file}" ]]; then + addwrite ${file} + fi + done + + local myconf=() + if use minimal; then + myconf=( + --with-features=tiny + --disable-nls + --disable-canberra + --disable-acl + --enable-gui=no + --without-x + --disable-darwin + --disable-luainterp + --disable-perlinterp + --disable-pythoninterp + --disable-mzschemeinterp + --disable-rubyinterp + --disable-selinux + --disable-tclinterp + --disable-gpm + ) + else + use debug && append-flags "-DDEBUG" + + myconf=( + --with-features=huge + $(use_enable sound canberra) + $(use_enable acl) + $(use_enable crypt libsodium) + $(use_enable cscope) + $(use_enable gpm) + $(use_enable nls) + $(use_enable perl perlinterp) + $(use_enable python python3interp) + $(use_with python python3-command "${PYTHON}") + $(use_enable racket mzschemeinterp) + $(use_enable ruby rubyinterp) + $(use_enable selinux) + $(use_enable tcl tclinterp) + $(use_enable terminal) + ) + + # --with-features=huge forces on cscope even if we --disable it. We need + # to sed this out to avoid screwiness. (1 Sep 2004 ciaranm) + if ! use cscope; then + sed -i -e \ + '/# define FEAT_CSCOPE/d' src/feature.h || die "sed failed" + fi + + if use lua; then + # -DLUA_COMPAT_OPENLIB=1 is required to enable the + # deprecated (in 5.1) luaL_openlib API (#874690) + use lua_single_target_lua5-1 && append-cppflags -DLUA_COMPAT_OPENLIB=1 + + myconf+=( + --enable-luainterp + $(use_with lua_single_target_luajit luajit) + --with-lua-prefix="${EPREFIX}/usr" + ) + fi + + # don't test USE=X here ... see bug #19115 + # but need to provide a way to link against X ... see bug #20093 + myconf+=( + --enable-gui=no + --disable-darwin + $(use_with X x) + ) + fi + + # let package manager strip binaries + export ac_cv_prog_STRIP="$(type -P true ) faking strip" + + # keep prefix env contained within the EPREFIX + use prefix && myconf+=( --without-local-dir ) + + if tc-is-cross-compiler ; then + export vim_cv_getcwd_broken=no \ + vim_cv_memmove_handles_overlap=yes \ + vim_cv_stat_ignores_slash=yes \ + vim_cv_terminfo=yes \ + vim_cv_toupper_broken=no + fi + + econf \ + --with-modified-by=Gentoo-${PVR} \ + "${myconf[@]}" +} + +src_compile() { + # The following allows emake to be used + emake -j1 -C src auto/osdef.h objects + + emake +} + +src_test() { + einfo + einfo "Starting vim tests. Several error messages will be shown" + einfo "while the tests run. This is normal behaviour and does not" + einfo "indicate a fault." + einfo + ewarn "If the tests fail, your terminal may be left in a strange" + ewarn "state. Usually, running 'reset' will fix this." + einfo + + # Don't let vim talk to X + unset DISPLAY + + # Arch and opensuse seem to do this and at this point, I'm willing + # to try anything to avoid random test hangs! + export TERM=xterm + + # See https://github.com/vim/vim/blob/f08b0eb8691ff09f98bc4beef986ece1c521655f/src/testdir/runtest.vim#L5 + # for more information on test variables we can use. + # Note that certain variables need vim-compatible regex (not PCRE), see e.g. + # http://www.softpanorama.org/Editors/Vimorama/vim_regular_expressions.shtml. + # + # Skipped tests: + # - Test_expand_star_star + # Hangs because of a recursive symlink in /usr/include/nodejs (bug #616680) + # - Test_exrc + # Looks in wrong location? (bug #742710) + # - Test_job_tty_in_out + # Fragile and depends on TERM(?) + # - Test_spelldump_bang + # Hangs. + # - Test_fuzzy_completion_env + # Too sensitive to leaked environment variables. + # - Test_term_mouse_multiple_clicks_to_select_mode + # Hangs. + # - Test_spelldump + # Hangs. + export TEST_SKIP_PAT='\(Test_expand_star_star\|Test_exrc\|Test_job_tty_in_out\|Test_spelldump_bang\|Test_fuzzy_completion_env\|Test_term_mouse_multiple_clicks_to_select_mode\|Test_spelldump\)' + + emake -j1 -C src/testdir nongui +} + +# Call eselect vi update with --if-unset +# to respect user's choice (bug #187449) +eselect_vi_update() { + ebegin "Calling eselect vi update" + eselect vi update --if-unset + eend $? +} + +src_install() { + local vimfiles=/usr/share/vim/vim${VIM_VERSION/.} + + # Note: Do not install symlinks for 'vi', 'ex', or 'view', as these are + # managed by eselect-vi + dobin src/vim + if ! use minimal ; then + dosym vim /usr/bin/vimdiff + fi + dosym vim /usr/bin/rvim + dosym vim /usr/bin/rview + if use vim-pager ; then + dosym ${vimfiles}/macros/less.sh /usr/bin/vimpager + dosym ${vimfiles}/macros/manpager.sh /usr/bin/vimmanpager + insinto ${vimfiles}/macros + doins runtime/macros/manpager.sh + fperms a+x ${vimfiles}/macros/manpager.sh + fi + + domenu runtime/vim.desktop + + newbashcomp "${FILESDIR}"/${PN}-completion ${PN} + + # keep in sync with 'complete ... -F' list + bashcomp_alias vim ex vi view rvim rview vimdiff +} + +pkg_postinst() { + # Update documentation tags (from vim-doc.eclass) + update_vim_helptags + + # Call eselect vi update + eselect_vi_update + + # update desktop file mime cache + xdg_desktop_database_update +} + +pkg_postrm() { + # Update documentation tags (from vim-doc.eclass) + update_vim_helptags + + # Call eselect vi update + eselect_vi_update + + # update desktop file mime cache + xdg_desktop_database_update +} diff --git a/sdk_container/src/third_party/portage-stable/app-editors/vim/vim-9.0.0828-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-editors/vim/vim-9.0.0828-r1.ebuild new file mode 100644 index 0000000000..035c07e22f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/vim/vim-9.0.0828-r1.ebuild @@ -0,0 +1,374 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Please bump with app-editors/vim-core and app-editors/gvim + +VIM_VERSION="9.0" +LUA_COMPAT=( lua5-{1..4} luajit ) +PYTHON_COMPAT=( python3_{9..11} ) +PYTHON_REQ_USE="threads(+)" +USE_RUBY="ruby27 ruby30 ruby31" + +inherit vim-doc flag-o-matic bash-completion-r1 lua-single python-single-r1 ruby-single toolchain-funcs desktop xdg-utils + +if [[ ${PV} == 9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/vim/vim.git" +else + SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> ${P}.tar.gz + https://gitweb.gentoo.org/proj/vim-patches.git/snapshot/vim-patches-vim-9.0.0049-patches.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +DESCRIPTION="Vim, an improved vi-style text editor" +HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim" + +LICENSE="vim" +SLOT="0" +IUSE="X acl crypt cscope debug gpm lua minimal nls perl python racket ruby selinux sound tcl terminal vim-pager" +REQUIRED_USE=" + lua? ( ${LUA_REQUIRED_USE} ) + python? ( ${PYTHON_REQUIRED_USE} ) + vim-pager? ( !minimal ) +" + +RDEPEND=" + >=app-eselect/eselect-vi-1.1 + >=sys-libs/ncurses-5.2-r2:0= + nls? ( virtual/libintl ) + acl? ( kernel_linux? ( sys-apps/acl ) ) + crypt? ( dev-libs/libsodium:= ) + cscope? ( dev-util/cscope ) + gpm? ( >=sys-libs/gpm-1.19.3 ) + lua? ( ${LUA_DEPS} + $(lua_gen_impl_dep 'deprecated' lua5-1) + ) + ~app-editors/vim-core-${PV} + !> "${S}"/src/feature.h || die "echo failed" + echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' \ + >> "${S}"/src/feature.h || die "echo failed" + + # Use exuberant ctags which installs as /usr/bin/exuberant-ctags. + # Hopefully this pattern won't break for a while at least. + # This fixes bug #29398 (27 Sep 2003 agriffis) + sed -i -e \ + 's/\> "$c" || die "echo failed" + done + + # conditionally make the manpager.sh script + if use vim-pager; then + cat > "${S}"/runtime/macros/manpager.sh <<-_EOF_ || die "cat EOF failed" + #!/bin/sh + sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | \\ + vim \\ + -c 'let no_plugin_maps = 1' \\ + -c 'set nolist nomod ft=man ts=8' \\ + -c 'let g:showmarks_enable=0' \\ + -c 'runtime! macros/less.vim' - + _EOF_ + fi + + # Try to avoid sandbox problems. Bug #114475. + if [[ -d "${S}"/src/po ]]; then + sed -i -e \ + '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \ + "${S}"/src/po/Makefile || die "sed failed" + fi + + cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed" + + sed -i -e \ + "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \ + "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed' + + # Fix bug 18245: Prevent "make" from the following chain: + # (1) Notice configure.ac is newer than auto/configure + # (2) Rebuild auto/configure + # (3) Notice auto/configure is newer than auto/config.mk + # (4) Run ./configure (with wrong args) to remake auto/config.mk + sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed" + rm src/auto/configure || die "rm failed" + + eapply_user +} + +src_configure() { + + # Fix bug #37354: Disallow -funroll-all-loops on amd64 + # Bug #57859 suggests that we want to do this for all archs + filter-flags -funroll-all-loops + + # Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for + # everyone since previous flag filtering bugs have turned out to affect + # multiple archs... + replace-flags -O3 -O2 + + emake -j1 -C src autoconf + + # This should fix a sandbox violation (see bug #24447). The hvc + # things are for ppc64, see bug #86433. + for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do + if [[ -e "${file}" ]]; then + addwrite ${file} + fi + done + + local myconf=() + if use minimal; then + myconf=( + --with-features=tiny + --disable-nls + --disable-canberra + --disable-acl + --enable-gui=no + --without-x + --disable-darwin + --disable-luainterp + --disable-perlinterp + --disable-pythoninterp + --disable-mzschemeinterp + --disable-rubyinterp + --disable-selinux + --disable-tclinterp + --disable-gpm + ) + else + use debug && append-flags "-DDEBUG" + + myconf=( + --with-features=huge + $(use_enable sound canberra) + $(use_enable acl) + $(use_enable crypt libsodium) + $(use_enable cscope) + $(use_enable gpm) + $(use_enable nls) + $(use_enable perl perlinterp) + $(use_enable python python3interp) + $(use_with python python3-command "${PYTHON}") + $(use_enable racket mzschemeinterp) + $(use_enable ruby rubyinterp) + $(use_enable selinux) + $(use_enable tcl tclinterp) + $(use_enable terminal) + ) + + # --with-features=huge forces on cscope even if we --disable it. We need + # to sed this out to avoid screwiness. (1 Sep 2004 ciaranm) + if ! use cscope; then + sed -i -e \ + '/# define FEAT_CSCOPE/d' src/feature.h || die "sed failed" + fi + + if use lua; then + # -DLUA_COMPAT_OPENLIB=1 is required to enable the + # deprecated (in 5.1) luaL_openlib API (#874690) + use lua_single_target_lua5-1 && append-cppflags -DLUA_COMPAT_OPENLIB=1 + + myconf+=( + --enable-luainterp + $(use_with lua_single_target_luajit luajit) + --with-lua-prefix="${EPREFIX}/usr" + ) + fi + + # don't test USE=X here ... see bug #19115 + # but need to provide a way to link against X ... see bug #20093 + myconf+=( + --enable-gui=no + --disable-darwin + $(use_with X x) + ) + fi + + # let package manager strip binaries + export ac_cv_prog_STRIP="$(type -P true ) faking strip" + + # keep prefix env contained within the EPREFIX + use prefix && myconf+=( --without-local-dir ) + + if tc-is-cross-compiler ; then + export vim_cv_getcwd_broken=no \ + vim_cv_memmove_handles_overlap=yes \ + vim_cv_stat_ignores_slash=yes \ + vim_cv_terminfo=yes \ + vim_cv_toupper_broken=no + fi + + econf \ + --with-modified-by=Gentoo-${PVR} \ + "${myconf[@]}" +} + +src_compile() { + # The following allows emake to be used + emake -j1 -C src auto/osdef.h objects + + emake +} + +src_test() { + einfo + einfo "Starting vim tests. Several error messages will be shown" + einfo "while the tests run. This is normal behaviour and does not" + einfo "indicate a fault." + einfo + ewarn "If the tests fail, your terminal may be left in a strange" + ewarn "state. Usually, running 'reset' will fix this." + einfo + + # Don't let vim talk to X + unset DISPLAY + + # Arch and opensuse seem to do this and at this point, I'm willing + # to try anything to avoid random test hangs! + export TERM=xterm + + # See https://github.com/vim/vim/blob/f08b0eb8691ff09f98bc4beef986ece1c521655f/src/testdir/runtest.vim#L5 + # for more information on test variables we can use. + # Note that certain variables need vim-compatible regex (not PCRE), see e.g. + # http://www.softpanorama.org/Editors/Vimorama/vim_regular_expressions.shtml. + # + # Skipped tests: + # - Test_expand_star_star + # Hangs because of a recursive symlink in /usr/include/nodejs (bug #616680) + # - Test_exrc + # Looks in wrong location? (bug #742710) + # - Test_job_tty_in_out + # Fragile and depends on TERM(?) + # - Test_spelldump_bang + # Hangs. + # - Test_fuzzy_completion_env + # Too sensitive to leaked environment variables. + # - Test_term_mouse_multiple_clicks_to_select_mode + # Hangs. + # - Test_spelldump + # Hangs. + export TEST_SKIP_PAT='\(Test_expand_star_star\|Test_exrc\|Test_job_tty_in_out\|Test_spelldump_bang\|Test_fuzzy_completion_env\|Test_term_mouse_multiple_clicks_to_select_mode\|Test_spelldump\)' + + emake -j1 -C src/testdir nongui +} + +# Call eselect vi update with --if-unset +# to respect user's choice (bug #187449) +eselect_vi_update() { + ebegin "Calling eselect vi update" + eselect vi update --if-unset + eend $? +} + +src_install() { + local vimfiles=/usr/share/vim/vim${VIM_VERSION/.} + + # Note: Do not install symlinks for 'vi', 'ex', or 'view', as these are + # managed by eselect-vi + dobin src/vim + if ! use minimal ; then + dosym vim /usr/bin/vimdiff + fi + dosym vim /usr/bin/rvim + dosym vim /usr/bin/rview + if use vim-pager ; then + dosym ${vimfiles}/macros/less.sh /usr/bin/vimpager + dosym ${vimfiles}/macros/manpager.sh /usr/bin/vimmanpager + insinto ${vimfiles}/macros + doins runtime/macros/manpager.sh + fperms a+x ${vimfiles}/macros/manpager.sh + fi + + domenu runtime/vim.desktop + + newbashcomp "${FILESDIR}"/${PN}-completion ${PN} + + # keep in sync with 'complete ... -F' list + bashcomp_alias vim ex vi view rvim rview vimdiff +} + +pkg_postinst() { + # Update documentation tags (from vim-doc.eclass) + update_vim_helptags + + # Call eselect vi update + eselect_vi_update + + # update desktop file mime cache + xdg_desktop_database_update +} + +pkg_postrm() { + # Update documentation tags (from vim-doc.eclass) + update_vim_helptags + + # Call eselect vi update + eselect_vi_update + + # update desktop file mime cache + xdg_desktop_database_update +} diff --git a/sdk_container/src/third_party/portage-stable/app-editors/vim/vim-9.0.1000.ebuild b/sdk_container/src/third_party/portage-stable/app-editors/vim/vim-9.0.1000.ebuild new file mode 100644 index 0000000000..1e28129127 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/vim/vim-9.0.1000.ebuild @@ -0,0 +1,372 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Please bump with app-editors/vim-core and app-editors/gvim + +VIM_VERSION="9.0" +VIM_PATCHES_VERSION="9.0.1000" + +LUA_COMPAT=( lua5-{1..4} luajit ) +PYTHON_COMPAT=( python3_{9..11} ) +PYTHON_REQ_USE="threads(+)" +USE_RUBY="ruby27 ruby30 ruby31" + +inherit vim-doc flag-o-matic bash-completion-r1 lua-single python-single-r1 ruby-single toolchain-funcs desktop xdg-utils + +if [[ ${PV} == 9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/vim/vim.git" +else + SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> ${P}.tar.gz + https://gitweb.gentoo.org/proj/vim-patches.git/snapshot/vim-patches-vim-${VIM_PATCHES_VERSION}-patches.tar.bz2" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +DESCRIPTION="Vim, an improved vi-style text editor" +HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim" + +LICENSE="vim" +SLOT="0" +IUSE="X acl crypt cscope debug gpm lua minimal nls perl python racket ruby selinux sound tcl terminal vim-pager" +REQUIRED_USE=" + lua? ( ${LUA_REQUIRED_USE} ) + python? ( ${PYTHON_REQUIRED_USE} ) + vim-pager? ( !minimal ) +" + +RDEPEND=" + >=app-eselect/eselect-vi-1.1 + >=sys-libs/ncurses-5.2-r2:0= + nls? ( virtual/libintl ) + acl? ( kernel_linux? ( sys-apps/acl ) ) + crypt? ( dev-libs/libsodium:= ) + cscope? ( dev-util/cscope ) + gpm? ( >=sys-libs/gpm-1.19.3 ) + lua? ( ${LUA_DEPS} + $(lua_gen_impl_dep 'deprecated' lua5-1) + ) + ~app-editors/vim-core-${PV} + !> "${S}"/src/feature.h || die "echo failed" + echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' \ + >> "${S}"/src/feature.h || die "echo failed" + + # Use exuberant ctags which installs as /usr/bin/exuberant-ctags. + # Hopefully this pattern won't break for a while at least. + # This fixes bug #29398 (27 Sep 2003 agriffis) + sed -i -e \ + 's/\> "$c" || die "echo failed" + done + + # conditionally make the manpager.sh script + if use vim-pager; then + cat > "${S}"/runtime/macros/manpager.sh <<-_EOF_ || die "cat EOF failed" + #!/bin/sh + sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | \\ + vim \\ + -c 'let no_plugin_maps = 1' \\ + -c 'set nolist nomod ft=man ts=8' \\ + -c 'let g:showmarks_enable=0' \\ + -c 'runtime! macros/less.vim' - + _EOF_ + fi + + # Try to avoid sandbox problems. Bug #114475. + if [[ -d "${S}"/src/po ]]; then + sed -i -e \ + '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \ + "${S}"/src/po/Makefile || die "sed failed" + fi + + cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed" + + sed -i -e \ + "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \ + "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed' + + # Fix bug 18245: Prevent "make" from the following chain: + # (1) Notice configure.ac is newer than auto/configure + # (2) Rebuild auto/configure + # (3) Notice auto/configure is newer than auto/config.mk + # (4) Run ./configure (with wrong args) to remake auto/config.mk + sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed" + rm src/auto/configure || die "rm failed" + + eapply_user +} + +src_configure() { + + # Fix bug #37354: Disallow -funroll-all-loops on amd64 + # Bug #57859 suggests that we want to do this for all archs + filter-flags -funroll-all-loops + + # Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for + # everyone since previous flag filtering bugs have turned out to affect + # multiple archs... + replace-flags -O3 -O2 + + emake -j1 -C src autoconf + + # This should fix a sandbox violation (see bug #24447). The hvc + # things are for ppc64, see bug #86433. + for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do + if [[ -e "${file}" ]]; then + addwrite ${file} + fi + done + + local myconf=() + if use minimal; then + myconf=( + --with-features=tiny + --disable-nls + --disable-canberra + --disable-acl + --enable-gui=no + --without-x + --disable-darwin + --disable-luainterp + --disable-perlinterp + --disable-pythoninterp + --disable-mzschemeinterp + --disable-rubyinterp + --disable-selinux + --disable-tclinterp + --disable-gpm + ) + else + use debug && append-flags "-DDEBUG" + + myconf=( + --with-features=huge + $(use_enable sound canberra) + $(use_enable acl) + $(use_enable crypt libsodium) + $(use_enable cscope) + $(use_enable gpm) + $(use_enable nls) + $(use_enable perl perlinterp) + $(use_enable python python3interp) + $(use_with python python3-command "${PYTHON}") + $(use_enable racket mzschemeinterp) + $(use_enable ruby rubyinterp) + $(use_enable selinux) + $(use_enable tcl tclinterp) + $(use_enable terminal) + ) + + # --with-features=huge forces on cscope even if we --disable it. We need + # to sed this out to avoid screwiness. (1 Sep 2004 ciaranm) + if ! use cscope; then + sed -i -e \ + '/# define FEAT_CSCOPE/d' src/feature.h || die "sed failed" + fi + + if use lua; then + # -DLUA_COMPAT_OPENLIB=1 is required to enable the + # deprecated (in 5.1) luaL_openlib API (#874690) + use lua_single_target_lua5-1 && append-cppflags -DLUA_COMPAT_OPENLIB=1 + + myconf+=( + --enable-luainterp + $(use_with lua_single_target_luajit luajit) + --with-lua-prefix="${EPREFIX}/usr" + ) + fi + + # don't test USE=X here ... see bug #19115 + # but need to provide a way to link against X ... see bug #20093 + myconf+=( + --enable-gui=no + --disable-darwin + $(use_with X x) + ) + fi + + # let package manager strip binaries + export ac_cv_prog_STRIP="$(type -P true ) faking strip" + + # keep prefix env contained within the EPREFIX + use prefix && myconf+=( --without-local-dir ) + + if tc-is-cross-compiler ; then + export vim_cv_getcwd_broken=no \ + vim_cv_memmove_handles_overlap=yes \ + vim_cv_stat_ignores_slash=yes \ + vim_cv_terminfo=yes \ + vim_cv_toupper_broken=no + fi + + econf \ + --with-modified-by=Gentoo-${PVR} \ + "${myconf[@]}" +} + +src_compile() { + # The following allows emake to be used + emake -j1 -C src auto/osdef.h objects + + emake +} + +src_test() { + einfo + einfo "Starting vim tests. Several error messages will be shown" + einfo "while the tests run. This is normal behaviour and does not" + einfo "indicate a fault." + einfo + ewarn "If the tests fail, your terminal may be left in a strange" + ewarn "state. Usually, running 'reset' will fix this." + einfo + + # Don't let vim talk to X + unset DISPLAY + + # Arch and opensuse seem to do this and at this point, I'm willing + # to try anything to avoid random test hangs! + export TERM=xterm + + # See https://github.com/vim/vim/blob/f08b0eb8691ff09f98bc4beef986ece1c521655f/src/testdir/runtest.vim#L5 + # for more information on test variables we can use. + # Note that certain variables need vim-compatible regex (not PCRE), see e.g. + # http://www.softpanorama.org/Editors/Vimorama/vim_regular_expressions.shtml. + # + # Skipped tests: + # - Test_expand_star_star + # Hangs because of a recursive symlink in /usr/include/nodejs (bug #616680) + # - Test_exrc + # Looks in wrong location? (bug #742710) + # - Test_job_tty_in_out + # Fragile and depends on TERM(?) + # - Test_spelldump_bang + # Hangs. + # - Test_fuzzy_completion_env + # Too sensitive to leaked environment variables. + # - Test_term_mouse_multiple_clicks_to_select_mode + # Hangs. + # - Test_spelldump + # Hangs. + export TEST_SKIP_PAT='\(Test_expand_star_star\|Test_exrc\|Test_job_tty_in_out\|Test_spelldump_bang\|Test_fuzzy_completion_env\|Test_term_mouse_multiple_clicks_to_select_mode\|Test_spelldump\)' + + emake -j1 -C src/testdir nongui +} + +# Call eselect vi update with --if-unset +# to respect user's choice (bug #187449) +eselect_vi_update() { + ebegin "Calling eselect vi update" + eselect vi update --if-unset + eend $? +} + +src_install() { + local vimfiles=/usr/share/vim/vim${VIM_VERSION/.} + + # Note: Do not install symlinks for 'vi', 'ex', or 'view', as these are + # managed by eselect-vi + dobin src/vim + if ! use minimal ; then + dosym vim /usr/bin/vimdiff + fi + dosym vim /usr/bin/rvim + dosym vim /usr/bin/rview + if use vim-pager ; then + dosym ${vimfiles}/macros/less.sh /usr/bin/vimpager + dosym ${vimfiles}/macros/manpager.sh /usr/bin/vimmanpager + insinto ${vimfiles}/macros + doins runtime/macros/manpager.sh + fperms a+x ${vimfiles}/macros/manpager.sh + fi + + domenu runtime/vim.desktop + + newbashcomp "${FILESDIR}"/${PN}-completion ${PN} + + # keep in sync with 'complete ... -F' list + bashcomp_alias vim ex vi view rvim rview vimdiff +} + +pkg_postinst() { + # Update documentation tags (from vim-doc.eclass) + update_vim_helptags + + # Call eselect vi update + eselect_vi_update + + # update desktop file mime cache + xdg_desktop_database_update +} + +pkg_postrm() { + # Update documentation tags (from vim-doc.eclass) + update_vim_helptags + + # Call eselect vi update + eselect_vi_update + + # update desktop file mime cache + xdg_desktop_database_update +} diff --git a/sdk_container/src/third_party/portage-stable/app-editors/vim/vim-9.0.1157.ebuild b/sdk_container/src/third_party/portage-stable/app-editors/vim/vim-9.0.1157.ebuild new file mode 100644 index 0000000000..16f9eb7faa --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/vim/vim-9.0.1157.ebuild @@ -0,0 +1,372 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Please bump with app-editors/vim-core and app-editors/gvim + +VIM_VERSION="9.0" +VIM_PATCHES_VERSION="9.0.1000" + +LUA_COMPAT=( lua5-{1..4} luajit ) +PYTHON_COMPAT=( python3_{9..11} ) +PYTHON_REQ_USE="threads(+)" +USE_RUBY="ruby27 ruby30 ruby31" + +inherit vim-doc flag-o-matic bash-completion-r1 lua-single python-single-r1 ruby-single toolchain-funcs desktop xdg-utils + +if [[ ${PV} == 9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/vim/vim.git" +else + SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> ${P}.tar.gz + https://gitweb.gentoo.org/proj/vim-patches.git/snapshot/vim-patches-vim-${VIM_PATCHES_VERSION}-patches.tar.bz2" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +DESCRIPTION="Vim, an improved vi-style text editor" +HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim" + +LICENSE="vim" +SLOT="0" +IUSE="X acl crypt cscope debug gpm lua minimal nls perl python racket ruby selinux sound tcl terminal vim-pager" +REQUIRED_USE=" + lua? ( ${LUA_REQUIRED_USE} ) + python? ( ${PYTHON_REQUIRED_USE} ) + vim-pager? ( !minimal ) +" + +RDEPEND=" + >=app-eselect/eselect-vi-1.1 + >=sys-libs/ncurses-5.2-r2:0= + nls? ( virtual/libintl ) + acl? ( kernel_linux? ( sys-apps/acl ) ) + crypt? ( dev-libs/libsodium:= ) + cscope? ( dev-util/cscope ) + gpm? ( >=sys-libs/gpm-1.19.3 ) + lua? ( ${LUA_DEPS} + $(lua_gen_impl_dep 'deprecated' lua5-1) + ) + ~app-editors/vim-core-${PV} + !> "${S}"/src/feature.h || die "echo failed" + echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' \ + >> "${S}"/src/feature.h || die "echo failed" + + # Use exuberant ctags which installs as /usr/bin/exuberant-ctags. + # Hopefully this pattern won't break for a while at least. + # This fixes bug #29398 (27 Sep 2003 agriffis) + sed -i -e \ + 's/\> "$c" || die "echo failed" + done + + # conditionally make the manpager.sh script + if use vim-pager; then + cat > "${S}"/runtime/macros/manpager.sh <<-_EOF_ || die "cat EOF failed" + #!/bin/sh + sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | \\ + vim \\ + -c 'let no_plugin_maps = 1' \\ + -c 'set nolist nomod ft=man ts=8' \\ + -c 'let g:showmarks_enable=0' \\ + -c 'runtime! macros/less.vim' - + _EOF_ + fi + + # Try to avoid sandbox problems. Bug #114475. + if [[ -d "${S}"/src/po ]]; then + sed -i -e \ + '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \ + "${S}"/src/po/Makefile || die "sed failed" + fi + + cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed" + + sed -i -e \ + "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \ + "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed' + + # Fix bug 18245: Prevent "make" from the following chain: + # (1) Notice configure.ac is newer than auto/configure + # (2) Rebuild auto/configure + # (3) Notice auto/configure is newer than auto/config.mk + # (4) Run ./configure (with wrong args) to remake auto/config.mk + sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed" + rm src/auto/configure || die "rm failed" + + eapply_user +} + +src_configure() { + + # Fix bug #37354: Disallow -funroll-all-loops on amd64 + # Bug #57859 suggests that we want to do this for all archs + filter-flags -funroll-all-loops + + # Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for + # everyone since previous flag filtering bugs have turned out to affect + # multiple archs... + replace-flags -O3 -O2 + + emake -j1 -C src autoconf + + # This should fix a sandbox violation (see bug #24447). The hvc + # things are for ppc64, see bug #86433. + for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do + if [[ -e "${file}" ]]; then + addwrite ${file} + fi + done + + local myconf=() + if use minimal; then + myconf=( + --with-features=tiny + --disable-nls + --disable-canberra + --disable-acl + --enable-gui=no + --without-x + --disable-darwin + --disable-luainterp + --disable-perlinterp + --disable-pythoninterp + --disable-mzschemeinterp + --disable-rubyinterp + --disable-selinux + --disable-tclinterp + --disable-gpm + ) + else + use debug && append-flags "-DDEBUG" + + myconf=( + --with-features=huge + $(use_enable sound canberra) + $(use_enable acl) + $(use_enable crypt libsodium) + $(use_enable cscope) + $(use_enable gpm) + $(use_enable nls) + $(use_enable perl perlinterp) + $(use_enable python python3interp) + $(use_with python python3-command "${PYTHON}") + $(use_enable racket mzschemeinterp) + $(use_enable ruby rubyinterp) + $(use_enable selinux) + $(use_enable tcl tclinterp) + $(use_enable terminal) + ) + + # --with-features=huge forces on cscope even if we --disable it. We need + # to sed this out to avoid screwiness. (1 Sep 2004 ciaranm) + if ! use cscope; then + sed -i -e \ + '/# define FEAT_CSCOPE/d' src/feature.h || die "sed failed" + fi + + if use lua; then + # -DLUA_COMPAT_OPENLIB=1 is required to enable the + # deprecated (in 5.1) luaL_openlib API (#874690) + use lua_single_target_lua5-1 && append-cppflags -DLUA_COMPAT_OPENLIB=1 + + myconf+=( + --enable-luainterp + $(use_with lua_single_target_luajit luajit) + --with-lua-prefix="${EPREFIX}/usr" + ) + fi + + # don't test USE=X here ... see bug #19115 + # but need to provide a way to link against X ... see bug #20093 + myconf+=( + --enable-gui=no + --disable-darwin + $(use_with X x) + ) + fi + + # let package manager strip binaries + export ac_cv_prog_STRIP="$(type -P true ) faking strip" + + # keep prefix env contained within the EPREFIX + use prefix && myconf+=( --without-local-dir ) + + if tc-is-cross-compiler ; then + export vim_cv_getcwd_broken=no \ + vim_cv_memmove_handles_overlap=yes \ + vim_cv_stat_ignores_slash=yes \ + vim_cv_terminfo=yes \ + vim_cv_toupper_broken=no + fi + + econf \ + --with-modified-by=Gentoo-${PVR} \ + "${myconf[@]}" +} + +src_compile() { + # The following allows emake to be used + emake -j1 -C src auto/osdef.h objects + + emake +} + +src_test() { + einfo + einfo "Starting vim tests. Several error messages will be shown" + einfo "while the tests run. This is normal behaviour and does not" + einfo "indicate a fault." + einfo + ewarn "If the tests fail, your terminal may be left in a strange" + ewarn "state. Usually, running 'reset' will fix this." + einfo + + # Don't let vim talk to X + unset DISPLAY + + # Arch and opensuse seem to do this and at this point, I'm willing + # to try anything to avoid random test hangs! + export TERM=xterm + + # See https://github.com/vim/vim/blob/f08b0eb8691ff09f98bc4beef986ece1c521655f/src/testdir/runtest.vim#L5 + # for more information on test variables we can use. + # Note that certain variables need vim-compatible regex (not PCRE), see e.g. + # http://www.softpanorama.org/Editors/Vimorama/vim_regular_expressions.shtml. + # + # Skipped tests: + # - Test_expand_star_star + # Hangs because of a recursive symlink in /usr/include/nodejs (bug #616680) + # - Test_exrc + # Looks in wrong location? (bug #742710) + # - Test_job_tty_in_out + # Fragile and depends on TERM(?) + # - Test_spelldump_bang + # Hangs. + # - Test_fuzzy_completion_env + # Too sensitive to leaked environment variables. + # - Test_term_mouse_multiple_clicks_to_select_mode + # Hangs. + # - Test_spelldump + # Hangs. + export TEST_SKIP_PAT='\(Test_expand_star_star\|Test_exrc\|Test_job_tty_in_out\|Test_spelldump_bang\|Test_fuzzy_completion_env\|Test_term_mouse_multiple_clicks_to_select_mode\|Test_spelldump\)' + + emake -j1 -C src/testdir nongui +} + +# Call eselect vi update with --if-unset +# to respect user's choice (bug #187449) +eselect_vi_update() { + ebegin "Calling eselect vi update" + eselect vi update --if-unset + eend $? +} + +src_install() { + local vimfiles=/usr/share/vim/vim${VIM_VERSION/.} + + # Note: Do not install symlinks for 'vi', 'ex', or 'view', as these are + # managed by eselect-vi + dobin src/vim + if ! use minimal ; then + dosym vim /usr/bin/vimdiff + fi + dosym vim /usr/bin/rvim + dosym vim /usr/bin/rview + if use vim-pager ; then + dosym ${vimfiles}/macros/less.sh /usr/bin/vimpager + dosym ${vimfiles}/macros/manpager.sh /usr/bin/vimmanpager + insinto ${vimfiles}/macros + doins runtime/macros/manpager.sh + fperms a+x ${vimfiles}/macros/manpager.sh + fi + + domenu runtime/vim.desktop + + newbashcomp "${FILESDIR}"/${PN}-completion ${PN} + + # keep in sync with 'complete ... -F' list + bashcomp_alias vim ex vi view rvim rview vimdiff +} + +pkg_postinst() { + # Update documentation tags (from vim-doc.eclass) + update_vim_helptags + + # Call eselect vi update + eselect_vi_update + + # update desktop file mime cache + xdg_desktop_database_update +} + +pkg_postrm() { + # Update documentation tags (from vim-doc.eclass) + update_vim_helptags + + # Call eselect vi update + eselect_vi_update + + # update desktop file mime cache + xdg_desktop_database_update +} diff --git a/sdk_container/src/third_party/portage-stable/app-editors/vim/vim-9999.ebuild b/sdk_container/src/third_party/portage-stable/app-editors/vim/vim-9999.ebuild new file mode 100644 index 0000000000..16f9eb7faa --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-editors/vim/vim-9999.ebuild @@ -0,0 +1,372 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Please bump with app-editors/vim-core and app-editors/gvim + +VIM_VERSION="9.0" +VIM_PATCHES_VERSION="9.0.1000" + +LUA_COMPAT=( lua5-{1..4} luajit ) +PYTHON_COMPAT=( python3_{9..11} ) +PYTHON_REQ_USE="threads(+)" +USE_RUBY="ruby27 ruby30 ruby31" + +inherit vim-doc flag-o-matic bash-completion-r1 lua-single python-single-r1 ruby-single toolchain-funcs desktop xdg-utils + +if [[ ${PV} == 9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/vim/vim.git" +else + SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> ${P}.tar.gz + https://gitweb.gentoo.org/proj/vim-patches.git/snapshot/vim-patches-vim-${VIM_PATCHES_VERSION}-patches.tar.bz2" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +DESCRIPTION="Vim, an improved vi-style text editor" +HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim" + +LICENSE="vim" +SLOT="0" +IUSE="X acl crypt cscope debug gpm lua minimal nls perl python racket ruby selinux sound tcl terminal vim-pager" +REQUIRED_USE=" + lua? ( ${LUA_REQUIRED_USE} ) + python? ( ${PYTHON_REQUIRED_USE} ) + vim-pager? ( !minimal ) +" + +RDEPEND=" + >=app-eselect/eselect-vi-1.1 + >=sys-libs/ncurses-5.2-r2:0= + nls? ( virtual/libintl ) + acl? ( kernel_linux? ( sys-apps/acl ) ) + crypt? ( dev-libs/libsodium:= ) + cscope? ( dev-util/cscope ) + gpm? ( >=sys-libs/gpm-1.19.3 ) + lua? ( ${LUA_DEPS} + $(lua_gen_impl_dep 'deprecated' lua5-1) + ) + ~app-editors/vim-core-${PV} + !> "${S}"/src/feature.h || die "echo failed" + echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' \ + >> "${S}"/src/feature.h || die "echo failed" + + # Use exuberant ctags which installs as /usr/bin/exuberant-ctags. + # Hopefully this pattern won't break for a while at least. + # This fixes bug #29398 (27 Sep 2003 agriffis) + sed -i -e \ + 's/\> "$c" || die "echo failed" + done + + # conditionally make the manpager.sh script + if use vim-pager; then + cat > "${S}"/runtime/macros/manpager.sh <<-_EOF_ || die "cat EOF failed" + #!/bin/sh + sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | \\ + vim \\ + -c 'let no_plugin_maps = 1' \\ + -c 'set nolist nomod ft=man ts=8' \\ + -c 'let g:showmarks_enable=0' \\ + -c 'runtime! macros/less.vim' - + _EOF_ + fi + + # Try to avoid sandbox problems. Bug #114475. + if [[ -d "${S}"/src/po ]]; then + sed -i -e \ + '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \ + "${S}"/src/po/Makefile || die "sed failed" + fi + + cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed" + + sed -i -e \ + "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \ + "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed' + + # Fix bug 18245: Prevent "make" from the following chain: + # (1) Notice configure.ac is newer than auto/configure + # (2) Rebuild auto/configure + # (3) Notice auto/configure is newer than auto/config.mk + # (4) Run ./configure (with wrong args) to remake auto/config.mk + sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed" + rm src/auto/configure || die "rm failed" + + eapply_user +} + +src_configure() { + + # Fix bug #37354: Disallow -funroll-all-loops on amd64 + # Bug #57859 suggests that we want to do this for all archs + filter-flags -funroll-all-loops + + # Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for + # everyone since previous flag filtering bugs have turned out to affect + # multiple archs... + replace-flags -O3 -O2 + + emake -j1 -C src autoconf + + # This should fix a sandbox violation (see bug #24447). The hvc + # things are for ppc64, see bug #86433. + for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do + if [[ -e "${file}" ]]; then + addwrite ${file} + fi + done + + local myconf=() + if use minimal; then + myconf=( + --with-features=tiny + --disable-nls + --disable-canberra + --disable-acl + --enable-gui=no + --without-x + --disable-darwin + --disable-luainterp + --disable-perlinterp + --disable-pythoninterp + --disable-mzschemeinterp + --disable-rubyinterp + --disable-selinux + --disable-tclinterp + --disable-gpm + ) + else + use debug && append-flags "-DDEBUG" + + myconf=( + --with-features=huge + $(use_enable sound canberra) + $(use_enable acl) + $(use_enable crypt libsodium) + $(use_enable cscope) + $(use_enable gpm) + $(use_enable nls) + $(use_enable perl perlinterp) + $(use_enable python python3interp) + $(use_with python python3-command "${PYTHON}") + $(use_enable racket mzschemeinterp) + $(use_enable ruby rubyinterp) + $(use_enable selinux) + $(use_enable tcl tclinterp) + $(use_enable terminal) + ) + + # --with-features=huge forces on cscope even if we --disable it. We need + # to sed this out to avoid screwiness. (1 Sep 2004 ciaranm) + if ! use cscope; then + sed -i -e \ + '/# define FEAT_CSCOPE/d' src/feature.h || die "sed failed" + fi + + if use lua; then + # -DLUA_COMPAT_OPENLIB=1 is required to enable the + # deprecated (in 5.1) luaL_openlib API (#874690) + use lua_single_target_lua5-1 && append-cppflags -DLUA_COMPAT_OPENLIB=1 + + myconf+=( + --enable-luainterp + $(use_with lua_single_target_luajit luajit) + --with-lua-prefix="${EPREFIX}/usr" + ) + fi + + # don't test USE=X here ... see bug #19115 + # but need to provide a way to link against X ... see bug #20093 + myconf+=( + --enable-gui=no + --disable-darwin + $(use_with X x) + ) + fi + + # let package manager strip binaries + export ac_cv_prog_STRIP="$(type -P true ) faking strip" + + # keep prefix env contained within the EPREFIX + use prefix && myconf+=( --without-local-dir ) + + if tc-is-cross-compiler ; then + export vim_cv_getcwd_broken=no \ + vim_cv_memmove_handles_overlap=yes \ + vim_cv_stat_ignores_slash=yes \ + vim_cv_terminfo=yes \ + vim_cv_toupper_broken=no + fi + + econf \ + --with-modified-by=Gentoo-${PVR} \ + "${myconf[@]}" +} + +src_compile() { + # The following allows emake to be used + emake -j1 -C src auto/osdef.h objects + + emake +} + +src_test() { + einfo + einfo "Starting vim tests. Several error messages will be shown" + einfo "while the tests run. This is normal behaviour and does not" + einfo "indicate a fault." + einfo + ewarn "If the tests fail, your terminal may be left in a strange" + ewarn "state. Usually, running 'reset' will fix this." + einfo + + # Don't let vim talk to X + unset DISPLAY + + # Arch and opensuse seem to do this and at this point, I'm willing + # to try anything to avoid random test hangs! + export TERM=xterm + + # See https://github.com/vim/vim/blob/f08b0eb8691ff09f98bc4beef986ece1c521655f/src/testdir/runtest.vim#L5 + # for more information on test variables we can use. + # Note that certain variables need vim-compatible regex (not PCRE), see e.g. + # http://www.softpanorama.org/Editors/Vimorama/vim_regular_expressions.shtml. + # + # Skipped tests: + # - Test_expand_star_star + # Hangs because of a recursive symlink in /usr/include/nodejs (bug #616680) + # - Test_exrc + # Looks in wrong location? (bug #742710) + # - Test_job_tty_in_out + # Fragile and depends on TERM(?) + # - Test_spelldump_bang + # Hangs. + # - Test_fuzzy_completion_env + # Too sensitive to leaked environment variables. + # - Test_term_mouse_multiple_clicks_to_select_mode + # Hangs. + # - Test_spelldump + # Hangs. + export TEST_SKIP_PAT='\(Test_expand_star_star\|Test_exrc\|Test_job_tty_in_out\|Test_spelldump_bang\|Test_fuzzy_completion_env\|Test_term_mouse_multiple_clicks_to_select_mode\|Test_spelldump\)' + + emake -j1 -C src/testdir nongui +} + +# Call eselect vi update with --if-unset +# to respect user's choice (bug #187449) +eselect_vi_update() { + ebegin "Calling eselect vi update" + eselect vi update --if-unset + eend $? +} + +src_install() { + local vimfiles=/usr/share/vim/vim${VIM_VERSION/.} + + # Note: Do not install symlinks for 'vi', 'ex', or 'view', as these are + # managed by eselect-vi + dobin src/vim + if ! use minimal ; then + dosym vim /usr/bin/vimdiff + fi + dosym vim /usr/bin/rvim + dosym vim /usr/bin/rview + if use vim-pager ; then + dosym ${vimfiles}/macros/less.sh /usr/bin/vimpager + dosym ${vimfiles}/macros/manpager.sh /usr/bin/vimmanpager + insinto ${vimfiles}/macros + doins runtime/macros/manpager.sh + fperms a+x ${vimfiles}/macros/manpager.sh + fi + + domenu runtime/vim.desktop + + newbashcomp "${FILESDIR}"/${PN}-completion ${PN} + + # keep in sync with 'complete ... -F' list + bashcomp_alias vim ex vi view rvim rview vimdiff +} + +pkg_postinst() { + # Update documentation tags (from vim-doc.eclass) + update_vim_helptags + + # Call eselect vi update + eselect_vi_update + + # update desktop file mime cache + xdg_desktop_database_update +} + +pkg_postrm() { + # Update documentation tags (from vim-doc.eclass) + update_vim_helptags + + # Call eselect vi update + eselect_vi_update + + # update desktop file mime cache + xdg_desktop_database_update +} diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/Manifest b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/Manifest new file mode 100644 index 0000000000..f79e76b698 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/Manifest @@ -0,0 +1,2 @@ +DIST qemu-6.0.0.tar.xz 107333232 BLAKE2B 7746329d3e13782b7c346ce4052cc517cfc65cd9b2d514d199e4d5b8570ca79566ec04b0c114db2e97c84e68eb551e0d4cdce1b14b91a88fe08d2a5f682c1418 SHA512 ee3ff00aebec4d8891d2ff6dabe4e667e510b2a4fe3f6190aa34673a91ea32dcd2db2e9bf94c2f1bf05aa79788f17cfbbedc6027c0988ea08a92587b79ee05e4 +DIST qemu-7.1.0.tar.xz 121833004 BLAKE2B e05f91ce4993c7591a2df08b5fb017f8b8ec2141ab7bfd55d14730ea6b793ac1091de539992058392a5522d4e58beee92a87752707be58e3619b8213ef9f35bf SHA512 c60c5ff8ec99b7552e485768908920658fdd8035ff7a6fa370fb6881957dc8b7e5f18ff1a8f49bd6aa22909ede2a7c084986d8244f12074ccd33ebe40a0c411f diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-ga-systemd.service b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-ga-systemd.service new file mode 100644 index 0000000000..51cd7b37ff --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-ga-systemd.service @@ -0,0 +1,11 @@ +[Unit] +Description=QEMU Guest Agent +BindTo=dev-virtio\x2dports-org.qemu.guest_agent.0.device +After=dev-virtio\x2dports-org.qemu.guest_agent.0.device + +[Service] +ExecStart=-/usr/bin/qemu-ga +Restart=always +RestartSec=0 + +[Install] diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-ga-systemd.udev b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-ga-systemd.udev new file mode 100644 index 0000000000..8a290abbd3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-ga-systemd.udev @@ -0,0 +1,2 @@ +SUBSYSTEM=="virtio-ports", ATTR{name}=="org.qemu.guest_agent.0", \ + TAG+="systemd" ENV{SYSTEMD_WANTS}="qemu-guest-agent.service" diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-ga.conf-r1 b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-ga.conf-r1 new file mode 100644 index 0000000000..a1a78df3de --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-ga.conf-r1 @@ -0,0 +1,11 @@ +# Specifies the transport method used to communicate to QEMU on the host side +# Default: virtio-serial +#GA_METHOD="virtio-serial" + +# Specifies the device path for the communications back to QEMU on the host +# Default: /dev/virtio-ports/org.qemu.guest_agent.0 +#GA_PATH="/dev/virtio-ports/org.qemu.guest_agent.0" + +# Additional options to qemu-guest-agent such as --fsfreeze-hook +# See qemu-ga --help for more info +#GA_OPTIONS="-F/etc/qemu/fsfreeze-hook" diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-ga.init-r1 b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-ga.init-r1 new file mode 100644 index 0000000000..f08c082709 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-ga.init-r1 @@ -0,0 +1,24 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +start() { + GA_METHOD=${GA_METHOD:-virtio-serial} + GA_PATH=${GA_PATH:-/dev/virtio-ports/org.qemu.guest_agent.0} + + ebegin "Starting QEMU Guest Agent" + + start-stop-daemon --start --pidfile /run/qemu-ga.pid \ + --exec /usr/bin/qemu-ga -- -m ${GA_METHOD} -p ${GA_PATH} \ + -l /var/log/qemu-ga.log -d -f /run/qemu-ga.pid -t /run ${GA_OPTIONS} + + eend $? +} + +stop() { + ebegin "Stopping QEMU Guest Agent" + + start-stop-daemon --stop --pidfile /run/qemu-ga.pid + + eend $? +} diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-ga.logrotate b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-ga.logrotate new file mode 100644 index 0000000000..ffcc477d33 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-ga.logrotate @@ -0,0 +1,9 @@ +/var/log/qemu-ga.log { + weekly + missingok + rotate 4 + compress + delaycompress + copytruncate + minsize 100k +} diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-guest-agent-7.1.0-configure-Avoid-using-strings-binary.patch b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-guest-agent-7.1.0-configure-Avoid-using-strings-binary.patch new file mode 100644 index 0000000000..dff62304a5 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/files/qemu-guest-agent-7.1.0-configure-Avoid-using-strings-binary.patch @@ -0,0 +1,85 @@ +From 33ab5f24913db8d5590fe4155829bd38e7902506 Mon Sep 17 00:00:00 2001 +Message-Id: <33ab5f24913db8d5590fe4155829bd38e7902506.1666164897.git.mprivozn@redhat.com> +From: Michal Privoznik +Date: Fri, 14 Oct 2022 09:30:15 +0200 +Subject: [PATCH] configure: Avoid using strings binary + +When determining the endiandness of the target architecture we're +building for a small program is compiled, which in an obfuscated +way declares two strings. Then, we look which string is in +correct order (using strings binary) and deduct the endiandness. +But using the strings binary is problematic, because it's part of +toolchain (strings is just a symlink to +x86_64-pc-linux-gnu-strings or llvm-strings). And when +(cross-)compiling, it requires users to set the symlink to the +correct toolchain. + +Fortunately, we have a better alternative anyways. We can mimic +what compiler.h is already doing: comparing __BYTE_ORDER__ +against values for little/big endiandness. + +Bug: https://bugs.gentoo.org/876933 +Signed-off-by: Michal Privoznik +Message-Id: +Cc: qemu-stable@nongnu.org +Signed-off-by: Paolo Bonzini +--- + configure | 35 ++++++++++++++++++----------------- + 1 file changed, 18 insertions(+), 17 deletions(-) + +diff --git a/configure b/configure +index f9ec050bf8..81561be7c1 100755 +--- a/configure ++++ b/configure +@@ -1423,30 +1423,31 @@ if test "$tcg" = "enabled"; then + git_submodules="$git_submodules tests/fp/berkeley-softfloat-3" + fi + +-# --- ++########################################## + # big/little endian test + cat > $TMPC << EOF +-#include +-short big_endian[] = { 0x4269, 0x4765, 0x4e64, 0x4961, 0x4e00, 0, }; +-short little_endian[] = { 0x694c, 0x7454, 0x654c, 0x6e45, 0x6944, 0x6e41, 0, }; +-int main(int argc, char *argv[]) +-{ +- return printf("%s %s\n", (char *)big_endian, (char *)little_endian); +-} ++#if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ ++# error LITTLE ++#endif ++int main(void) { return 0; } + EOF + +-if compile_prog ; then +- if strings -a $TMPE | grep -q BiGeNdIaN ; then +- bigendian="yes" +- elif strings -a $TMPE | grep -q LiTtLeEnDiAn ; then +- bigendian="no" +- else +- echo big/little test failed +- exit 1 +- fi ++if ! compile_prog ; then ++ bigendian="no" + else ++ cat > $TMPC << EOF ++#if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ ++# error BIG ++#endif ++int main(void) { return 0; } ++EOF ++ ++ if ! compile_prog ; then ++ bigendian="yes" ++ else + echo big/little test failed + exit 1 ++ fi + fi + + ########################################## +-- +2.37.3 + diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/metadata.xml b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/metadata.xml new file mode 100644 index 0000000000..8995a72400 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/metadata.xml @@ -0,0 +1,20 @@ + + + + + ajak@gentoo.org + John Helmert III + + + sam@gentoo.org + Sam James + + + tamiko@gentoo.org + Matthias Maier + + + virtualization@gentoo.org + Gentoo Virtualization Project + + diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/qemu-guest-agent-6.0.0.ebuild b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/qemu-guest-agent-6.0.0.ebuild new file mode 100644 index 0000000000..e1c7788718 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/qemu-guest-agent-6.0.0.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +PYTHON_COMPAT=( python3_{9..11} ) + +inherit systemd toolchain-funcs udev python-any-r1 + +MY_PN="qemu" +MY_P="${MY_PN}-${PV}" + +SRC_URI="http://wiki.qemu.org/download/${MY_P}.tar.xz" +KEYWORDS="amd64 ~ppc ~ppc64 x86" + +DESCRIPTION="QEMU Guest Agent (qemu-ga) for use when running inside a VM" +HOMEPAGE="https://wiki.qemu.org/Features/GuestAgent" + +LICENSE="GPL-2 BSD-2" +SLOT="0" +IUSE="" + +RDEPEND="dev-libs/glib" + +DEPEND="${RDEPEND} + ${PYTHON_DEPS}" + +S="${WORKDIR}/${MY_P}" + +src_configure() { + tc-export AR LD OBJCOPY RANLIB + + local myconf=( + --prefix=/usr + --sysconfdir=/etc + --libdir="/usr/$(get_libdir)" + --localstatedir=/ + --disable-bsd-user + --disable-linux-user + --disable-system + --disable-strip + --enable-tools + --disable-werror + --enable-guest-agent + --python="${PYTHON}" + --cc="$(tc-getCC)" + --cxx="$(tc-getCXX)" + --host-cc="$(tc-getBUILD_CC)" + ) + echo "./configure ${myconf[*]}" + ./configure "${myconf[@]}" || die +} + +src_install() { + dobin build/qga/qemu-ga + + # Normal init stuff + newinitd "${FILESDIR}/qemu-ga.init-r1" qemu-guest-agent + newconfd "${FILESDIR}/qemu-ga.conf-r1" qemu-guest-agent + + insinto /etc/logrotate.d + newins "${FILESDIR}/qemu-ga.logrotate" qemu-guest-agent + + # systemd stuff + udev_newrules "${FILESDIR}/qemu-ga-systemd.udev" 99-qemu-guest-agent.rules + + systemd_newunit "${FILESDIR}/qemu-ga-systemd.service" \ + qemu-guest-agent.service +} + +pkg_postinst() { + elog "You should add 'qemu-guest-agent' to the default runlevel." + elog "e.g. rc-update add qemu-guest-agent default" + udev_reload +} + +pkg_postrm() { + udev_reload +} diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/qemu-guest-agent-7.1.0.ebuild b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/qemu-guest-agent-7.1.0.ebuild new file mode 100644 index 0000000000..2bbb6c2c75 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu-guest-agent/qemu-guest-agent-7.1.0.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) + +inherit edo systemd toolchain-funcs python-any-r1 udev + +MY_PN="qemu" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="QEMU Guest Agent (qemu-ga) for use when running inside a VM" +HOMEPAGE="https://wiki.qemu.org/Features/GuestAgent" +SRC_URI="http://wiki.qemu.org/download/${MY_P}.tar.xz" + +LICENSE="GPL-2 BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" + +RDEPEND="dev-libs/glib" +DEPEND="${RDEPEND}" +BDEPEND="${PYTHON_DEPS}" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}"/${PN}-7.1.0-configure-Avoid-using-strings-binary.patch +) + +src_configure() { + tc-export AR LD OBJCOPY RANLIB + + local myconf=( + --prefix=/usr + --sysconfdir=/etc + --libdir="/usr/$(get_libdir)" + --localstatedir=/ + --disable-bsd-user + --disable-linux-user + --disable-system + --disable-strip + --enable-tools + --disable-werror + --enable-guest-agent + --python="${PYTHON}" + --cc="$(tc-getCC)" + --cxx="$(tc-getCXX)" + --host-cc="$(tc-getBUILD_CC)" + ) + + edo ./configure "${myconf[@]}" +} + +src_install() { + dobin build/qga/qemu-ga + + # Normal init stuff + newinitd "${FILESDIR}/qemu-ga.init-r1" qemu-guest-agent + newconfd "${FILESDIR}/qemu-ga.conf-r1" qemu-guest-agent + + insinto /etc/logrotate.d + newins "${FILESDIR}/qemu-ga.logrotate" qemu-guest-agent + + # systemd stuff + udev_newrules "${FILESDIR}/qemu-ga-systemd.udev" 99-qemu-guest-agent.rules + + systemd_newunit "${FILESDIR}/qemu-ga-systemd.service" \ + qemu-guest-agent.service +} + +pkg_postinst() { + elog "You should add 'qemu-guest-agent' to the default runlevel." + elog "e.g. rc-update add qemu-guest-agent default" + udev_reload +} + +pkg_postrm() { + udev_reload +} diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/Manifest b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/Manifest new file mode 100644 index 0000000000..12a458ea48 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/Manifest @@ -0,0 +1,4 @@ +DIST qemu-7.1.0-docs.tar.xz 2016780 BLAKE2B 1b84361fe58d504ab740a0b805a25d02f497ca776e7251a99f0e98e3720d1a2029b7a171f9d79dd128ba17a82c72d497e09baa1a4b2f192ba390f0f3b1950792 SHA512 7a328303b8af0ab63aa1f0fe07a121d3ca459d00fca817412e645416af795930dbea0a3e60f4ca006a74d1672e84fa4e626e4d83918e0b685b601043d0d8159e +DIST qemu-7.1.0.tar.xz 121833004 BLAKE2B e05f91ce4993c7591a2df08b5fb017f8b8ec2141ab7bfd55d14730ea6b793ac1091de539992058392a5522d4e58beee92a87752707be58e3619b8213ef9f35bf SHA512 c60c5ff8ec99b7552e485768908920658fdd8035ff7a6fa370fb6881957dc8b7e5f18ff1a8f49bd6aa22909ede2a7c084986d8244f12074ccd33ebe40a0c411f +DIST qemu-7.2.0-docs.tar.xz 1984184 BLAKE2B 103900fb7903ed8d75f7f012bf61fa2d6fce345b657c851d0437c3384f5735bd1cfd3129320683ea7846ea0b0940e5af5b2663c9320f12fee74b058523a8ea06 SHA512 a7edd448982865e07533c300d3e44a8b50cefbdde1982b73c24d0b2aa74315439252c59b634c75de312860874c7b06c75aa72629da681b5105f28ee936794585 +DIST qemu-7.2.0.tar.xz 122408576 BLAKE2B 415ff621356c59f88b29cfe3ef5db1e282b26bbafbee3d535477c6125ccb060ec9762d9e3ab9f70ce5478804dca0a46a59bcf12c112a2462029a93e578e61530 SHA512 f3cfa00da739ba819a218d7e6e95c77fb79a8e0f487b024ddd281602e785249b81144595e3f8c746c32a4f5c4d1a88c6aebae3c162603edfbb50ae3722d7ed13 diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/65-kvm.rules-r2 b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/65-kvm.rules-r2 new file mode 100644 index 0000000000..15c89b2018 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/65-kvm.rules-r2 @@ -0,0 +1,3 @@ +KERNEL=="kvm", GROUP="kvm", MODE="0660" +KERNEL=="vhost-net", GROUP="kvm", MODE="0660", OPTIONS+="static_node=vhost-net" +KERNEL=="vhost-vsock", GROUP="kvm", MODE="0660", OPTIONS+="static_node=vhost-vsock" diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/bridge.conf b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/bridge.conf new file mode 100644 index 0000000000..2bde37e2ef --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/bridge.conf @@ -0,0 +1,14 @@ +# This should have the following permissions: root:qemu 0640 + +# allow br0 +# Uncommenting the above would allow users in the 'qemu' group +# to add devices to 'br0' + +# allow virbr0 +# Uncommenting the above would allow users in the 'qemu' group +# to add devices to 'virbr0' + +# include /etc/qemu/bob.conf +# Uncommenting the above would allow users in the 'bob' group +# to have permissions defined in it, iff it has the following +# permissions: root:bob 0640 diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-5.2.0-disable-keymap.patch b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-5.2.0-disable-keymap.patch new file mode 100644 index 0000000000..4b5676be4d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-5.2.0-disable-keymap.patch @@ -0,0 +1,25 @@ +Do not use system's 'qemu-keymap' in native case. +--- a/meson.build ++++ b/meson.build +@@ -337,6 +337,8 @@ if 'CONFIG_LIBCAP_NG' in config_host + endif + if get_option('xkbcommon').auto() and not have_system and not have_tools + xkbcommon = not_found ++elif get_option('xkbcommon').disabled() ++ xkbcommon = not_found + else + xkbcommon = dependency('xkbcommon', required: get_option('xkbcommon'), + method: 'pkg-config', static: enable_static) +--- a/pc-bios/keymaps/meson.build ++++ b/pc-bios/keymaps/meson.build +@@ -33,7 +33,9 @@ keymaps = { + 'tr': '-l tr', + } + +-if meson.is_cross_build() or 'CONFIG_XKBCOMMON' not in config_host ++if meson.is_cross_build() + native_qemu_keymap = find_program('qemu-keymap', required: false, disabler: true) ++elif get_option('xkbcommon').disabled() ++ native_qemu_keymap = not_found + else + native_qemu_keymap = qemu_keymap diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-6.0.0-make.patch b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-6.0.0-make.patch new file mode 100644 index 0000000000..2dac1ca11d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-6.0.0-make.patch @@ -0,0 +1,14 @@ +Allow MAKE='make V=1' and similar. + +https://bugs.gentoo.org/795678 +--- a/configure ++++ b/configure +@@ -1953,7 +1953,7 @@ if test -z "$python" + then + error_exit "Python not found. Use --python=/path/to/python" + fi +-if ! has "$make" ++if ! has $make + then + error_exit "GNU make ($make) not found" + fi diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-also-build-virtfs-proxy-helper.patch b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-also-build-virtfs-proxy-helper.patch new file mode 100644 index 0000000000..b6f3078a69 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-also-build-virtfs-proxy-helper.patch @@ -0,0 +1,32 @@ +From d02ea89239768c93651a161d057f2bf04d56a024 Mon Sep 17 00:00:00 2001 +From: Matthias Maier +Date: Mon, 4 Apr 2022 12:56:59 +0200 +Subject: [PATCH] also build virtfs-proxy-helper + +The Gentoo ebuild splits the qemu build into a softmmu, user and tool +phase in order to be able to build and link some of the qemu emulators +statically. This unfortunately has the consequence that we never +configure with "have_virtfs" and "have_tools" at the same time. + +As a workaround, simply build the virtfs userland unconditionally. After +all, it is a tiny executable +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 65a885ea69..29ce7a5a8e 100644 +--- a/meson.build ++++ b/meson.build +@@ -1684,7 +1684,7 @@ have_virtfs = get_option('virtfs') \ + .disable_auto_if(not have_tools and not have_system) \ + .allowed() + +-have_virtfs_proxy_helper = targetos != 'darwin' and have_virtfs and have_tools ++have_virtfs_proxy_helper = have_tools and libattr.found() and libcap_ng.found() + + if get_option('block_drv_ro_whitelist') == '' + config_host_data.set('CONFIG_BDRV_RO_WHITELIST', '') +-- +2.35.1 + diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-capstone-include-path.patch b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-capstone-include-path.patch new file mode 100644 index 0000000000..585e798345 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-capstone-include-path.patch @@ -0,0 +1,31 @@ +Forward ported from qemu-2.11.1-capstone_include_path.patch. +This time also fix the capstone.h header check to use the path we're +already patching in. + +Bug: https://bugs.gentoo.org/873157 +diff --git a/include/disas/capstone.h b/include/disas/capstone.h +index e29068dd97..d8fdc5d537 100644 +--- a/include/disas/capstone.h ++++ b/include/disas/capstone.h +@@ -3,7 +3,7 @@ + + #ifdef CONFIG_CAPSTONE + +-#include ++#include + + #else + +diff --git a/meson.build b/meson.build +index 20fddbd707..50ce96bbd1 100644 +--- a/meson.build ++++ b/meson.build +@@ -2605,7 +2605,7 @@ if not get_option('capstone').auto() or have_system or have_user + # that reports a wrong -I path, causing the #include to + # fail later. If the system has such a broken version + # do not use it. +- if capstone.found() and not cc.compiles('#include ', ++ if capstone.found() and not cc.compiles('#include ', + dependencies: [capstone]) + capstone = not_found + if get_option('capstone').enabled() diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-faccessat2.patch b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-faccessat2.patch new file mode 100644 index 0000000000..ea168f609f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-faccessat2.patch @@ -0,0 +1,78 @@ +From 35a2c85f7d691db7aa2c47181902ac87478eef7a Mon Sep 17 00:00:00 2001 +From: WANG Xuerui +Date: Sun, 9 Oct 2022 14:08:13 +0800 +Subject: [PATCH] linux-user: Implement faccessat2 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +User space has been preferring this syscall for a while, due to its +closer match with C semantics, and newer platforms such as LoongArch +apparently have libc implementations that don't fallback to faccessat +so normal access checks are failing without the emulation in place. + +Tested by successfully emerging several packages within a Gentoo loong +stage3 chroot, emulated on amd64 with help of static qemu-loongarch64. + +Reported-by: Andreas K. Hüttel +Signed-off-by: WANG Xuerui +Message-Id: <20221009060813.2289077-1-xen0n@gentoo.org> +[lv: removing defined(__NR_faccessat2) in syscall.c, + adding defined(TARGET_NR_faccessat2) on print_faccessat()] +Signed-off-by: Laurent Vivier +--- + linux-user/strace.c | 2 +- + linux-user/strace.list | 3 +++ + linux-user/syscall.c | 9 +++++++++ + 3 files changed, 13 insertions(+), 1 deletion(-) + +diff --git a/linux-user/strace.c b/linux-user/strace.c +index 86c081c83f..9ae5a812cd 100644 +--- a/linux-user/strace.c ++++ b/linux-user/strace.c +@@ -1969,7 +1969,7 @@ print_execv(CPUArchState *cpu_env, const struct syscallname *name, + } + #endif + +-#ifdef TARGET_NR_faccessat ++#if defined(TARGET_NR_faccessat) || defined(TARGET_NR_faccessat2) + static void + print_faccessat(CPUArchState *cpu_env, const struct syscallname *name, + abi_long arg0, abi_long arg1, abi_long arg2, +diff --git a/linux-user/strace.list b/linux-user/strace.list +index a87415bf3d..3df2184580 100644 +--- a/linux-user/strace.list ++++ b/linux-user/strace.list +@@ -178,6 +178,9 @@ + #ifdef TARGET_NR_faccessat + { TARGET_NR_faccessat, "faccessat" , NULL, print_faccessat, NULL }, + #endif ++#ifdef TARGET_NR_faccessat2 ++{ TARGET_NR_faccessat2, "faccessat2" , NULL, print_faccessat, NULL }, ++#endif + #ifdef TARGET_NR_fadvise64 + { TARGET_NR_fadvise64, "fadvise64" , NULL, NULL, NULL }, + #endif +diff --git a/linux-user/syscall.c b/linux-user/syscall.c +index d499cac1d5..e985ad167f 100644 +--- a/linux-user/syscall.c ++++ b/linux-user/syscall.c +@@ -9143,6 +9143,15 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, + unlock_user(p, arg2, 0); + return ret; + #endif ++#if defined(TARGET_NR_faccessat2) ++ case TARGET_NR_faccessat2: ++ if (!(p = lock_user_string(arg2))) { ++ return -TARGET_EFAULT; ++ } ++ ret = get_errno(faccessat(arg1, p, arg3, arg4)); ++ unlock_user(p, arg2, 0); ++ return ret; ++#endif + #ifdef TARGET_NR_nice /* not on alpha */ + case TARGET_NR_nice: + return get_errno(nice(arg1)); +-- +2.37.4 + diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-loong-stat.patch b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-loong-stat.patch new file mode 100644 index 0000000000..85fd2c9891 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-loong-stat.patch @@ -0,0 +1,98 @@ +From xen0n@gentoo.org Thu Oct 06 10:07:10 2022 +Return-Path: +X-Original-To: dilfridge@gentoo.org +Delivered-To: dilfridge@gentoo.org +From: WANG Xuerui +To: qemu-devel@nongnu.org +Cc: Richard Henderson , + =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , + WANG Xuerui , + Song Gao , + Xiaojuan Yang , + =?UTF-8?q?Andreas=20K=20=2E=20H=C3=BCttel?= +Subject: [PATCH RESEND] linux-user: Fix struct statfs ABI on loongarch64 +Date: Thu, 6 Oct 2022 18:07:10 +0800 +Message-Id: <20221006100710.427252-1-xen0n@gentoo.org> +X-Mailer: git-send-email 2.38.0 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Previously the 32-bit version was incorrectly chosen, leading to funny +but incorrect output from e.g. df(1). Simply select the version +corresponding to the 64-bit asm-generic definition. + +For reference, this program should produce the same output no matter +natively compiled or not, for loongarch64 or not: + +```c +#include +#include + +int main(int argc, const char *argv[]) +{ + struct statfs b; + if (statfs(argv[0], &b)) + return 1; + + printf("f_type = 0x%lx\n", b.f_type); + printf("f_bsize = %ld\n", b.f_bsize); + printf("f_blocks = %ld\n", b.f_blocks); + printf("f_bfree = %ld\n", b.f_bfree); + printf("f_bavail = %ld\n", b.f_bavail); + + return 0; +} + +// Example output on my amd64 box, with the test binary residing on a +// btrfs partition. + +// Native and emulated output after the fix: +// +// f_type = 0x9123683e +// f_bsize = 4096 +// f_blocks = 268435456 +// f_bfree = 168406890 +// f_bavail = 168355058 + +// Output before the fix, note the messed layout: +// +// f_type = 0x10009123683e +// f_bsize = 723302085239504896 +// f_blocks = 168355058 +// f_bfree = 2250817541779750912 +// f_bavail = 1099229433104 +``` + +Fixes: 1f63019632 ("linux-user: Add LoongArch syscall support") +Signed-off-by: WANG Xuerui +Cc: Song Gao +Cc: Xiaojuan Yang +Cc: Andreas K. Hüttel +--- + +Resend with amended commit message to 100% clarify the example output +are generated on my box and will differ for everyone else. Sorry for +the noise. + + linux-user/syscall_defs.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h +index 01ee10a88f..77864de57f 100644 +--- a/linux-user/syscall_defs.h ++++ b/linux-user/syscall_defs.h +@@ -2262,7 +2262,8 @@ struct target_statfs64 { + }; + #elif (defined(TARGET_PPC64) || defined(TARGET_X86_64) || \ + defined(TARGET_SPARC64) || defined(TARGET_AARCH64) || \ +- defined(TARGET_RISCV)) && !defined(TARGET_ABI32) ++ defined(TARGET_RISCV) || defined(TARGET_LOONGARCH64)) && \ ++ !defined(TARGET_ABI32) + struct target_statfs { + abi_long f_type; + abi_long f_bsize; +-- +2.38.0 + + diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-mips-n32-syscalls.patch b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-mips-n32-syscalls.patch new file mode 100644 index 0000000000..5ed67668d0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-mips-n32-syscalls.patch @@ -0,0 +1,94 @@ +From xen0n@gentoo.org Thu Oct 06 08:55:00 2022 +Return-Path: +X-Original-To: dilfridge@gentoo.org +Delivered-To: dilfridge@gentoo.org +From: WANG Xuerui +To: qemu-devel@nongnu.org +Cc: WANG Xuerui , + =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , + Jiaxun Yang , + =?UTF-8?q?Andreas=20K=20=2E=20H=C3=BCttel?= , + Joshua Kinard +Subject: [PATCH] linux-user: Fix more MIPS n32 syscall ABI issues +Date: Thu, 6 Oct 2022 16:55:00 +0800 +Message-Id: <20221006085500.290341-1-xen0n@gentoo.org> +X-Mailer: git-send-email 2.38.0 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +In commit 80f0fe3a85 ("linux-user: Fix syscall parameter handling for +MIPS n32") the ABI problem regarding offset64 on MIPS n32 was fixed, +but still some cases remain where the n32 is incorrectly treated as any +other 32-bit ABI that passes 64-bit arguments in pairs of GPRs. Fix by +excluding TARGET_ABI_MIPSN32 from various TARGET_ABI_BITS == 32 checks. + +Closes: https://gitlab.com/qemu-project/qemu/-/issues/1238 +Signed-off-by: WANG Xuerui +Cc: Philippe Mathieu-Daudé +Cc: Jiaxun Yang +Cc: Andreas K. Hüttel +Cc: Joshua Kinard +--- + +Note: I can't reproduce the crash with neither MIPS n32 sysroot at my hand +(a self-built one for Loongson-2F, and stage3-mips64_n32-openrc-20221001T170527Z), +so I can only verify by looking at the (host and qemu) strace outputs, and +would have to ask you to review/test this harder. Thanks. + + linux-user/syscall.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/linux-user/syscall.c b/linux-user/syscall.c +index 2e954d8dbd..8b2d39fe73 100644 +--- a/linux-user/syscall.c ++++ b/linux-user/syscall.c +@@ -11793,7 +11793,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, + return -host_to_target_errno(ret); + #endif + +-#if TARGET_ABI_BITS == 32 ++#if TARGET_ABI_BITS == 32 && !defined(TARGET_ABI_MIPSN32) + + #ifdef TARGET_NR_fadvise64_64 + case TARGET_NR_fadvise64_64: +@@ -11920,7 +11920,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, + return get_errno(sys_gettid()); + #ifdef TARGET_NR_readahead + case TARGET_NR_readahead: +-#if TARGET_ABI_BITS == 32 ++#if TARGET_ABI_BITS == 32 && !defined(TARGET_ABI_MIPSN32) + if (regpairs_aligned(cpu_env, num)) { + arg2 = arg3; + arg3 = arg4; +@@ -12612,7 +12612,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, + #endif /* CONFIG_EVENTFD */ + #if defined(CONFIG_FALLOCATE) && defined(TARGET_NR_fallocate) + case TARGET_NR_fallocate: +-#if TARGET_ABI_BITS == 32 ++#if TARGET_ABI_BITS == 32 && !defined(TARGET_ABI_MIPSN32) + ret = get_errno(fallocate(arg1, arg2, target_offset64(arg3, arg4), + target_offset64(arg5, arg6))); + #else +@@ -12623,7 +12623,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, + #if defined(CONFIG_SYNC_FILE_RANGE) + #if defined(TARGET_NR_sync_file_range) + case TARGET_NR_sync_file_range: +-#if TARGET_ABI_BITS == 32 ++#if TARGET_ABI_BITS == 32 && !defined(TARGET_ABI_MIPSN32) + #if defined(TARGET_MIPS) + ret = get_errno(sync_file_range(arg1, target_offset64(arg3, arg4), + target_offset64(arg5, arg6), arg7)); +@@ -12645,7 +12645,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, + case TARGET_NR_arm_sync_file_range: + #endif + /* This is like sync_file_range but the arguments are reordered */ +-#if TARGET_ABI_BITS == 32 ++#if TARGET_ABI_BITS == 32 && !defined(TARGET_ABI_MIPSN32) + ret = get_errno(sync_file_range(arg1, target_offset64(arg3, arg4), + target_offset64(arg5, arg6), arg2)); + #else +-- +2.38.0 + + diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-strings.patch b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-strings.patch new file mode 100644 index 0000000000..01f235b9a3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.1.0-strings.patch @@ -0,0 +1,26 @@ +Forward-ported from original patch for 5.2.0. + +diff --git a/configure b/configure +index da2501489f..4660ee3ee5 100755 +--- a/configure ++++ b/configure +@@ -400,6 +400,7 @@ ld="${LD-${cross_prefix}ld}" + nm="${NM-${cross_prefix}nm}" + smbd="$SMBD" + strip="${STRIP-${cross_prefix}strip}" ++strings="${STRINGS-${cross_prefix}strings}" + widl="${WIDL-${cross_prefix}widl}" + windres="${WINDRES-${cross_prefix}windres}" + pkg_config_exe="${PKG_CONFIG-${cross_prefix}pkg-config}" +@@ -1466,9 +1467,9 @@ int main(int argc, char *argv[]) + EOF + + if compile_prog ; then +- if strings -a $TMPE | grep -q BiGeNdIaN ; then ++ if $strings -a $TMPE | grep -q BiGeNdIaN ; then + bigendian="yes" +- elif strings -a $TMPE | grep -q LiTtLeEnDiAn ; then ++ elif $strings -a $TMPE | grep -q LiTtLeEnDiAn ; then + bigendian="no" + else + echo big/little test failed diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.2.0-disable-gmp.patch b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.2.0-disable-gmp.patch new file mode 100644 index 0000000000..3050228b4e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-7.2.0-disable-gmp.patch @@ -0,0 +1,45 @@ +commit 433c2acd1b9c3f7f5903273e85fed9a7f9157b23 +Author: John Helmert III +Date: Wed Jan 4 12:25:08 2023 -0600 + + meson.build: disable gmp + + gmp isn't required, and we want to avoid linking to it automatigcally + in Gentoo. + + Bug: https://bugs.gentoo.org/886207 + Signed-off-by: John Helmert III + +diff --git a/meson.build b/meson.build +index 5c6b5a1c75..2f9550362d 100644 +--- a/meson.build ++++ b/meson.build +@@ -1234,15 +1234,6 @@ if not gnutls_crypto.found() + endif + endif + +-gmp = dependency('gmp', required: false, method: 'pkg-config', kwargs: static_kwargs) +-if nettle.found() and gmp.found() +- hogweed = dependency('hogweed', version: '>=3.4', +- method: 'pkg-config', +- required: get_option('nettle'), +- kwargs: static_kwargs) +-endif +- +- + gtk = not_found + gtkx11 = not_found + vte = not_found +diff --git a/meson_options.txt b/meson_options.txt +index 4b749ca549..e06b274960 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -277,6 +277,8 @@ option('vduse_blk_export', type: 'feature', value: 'auto', + + option('capstone', type: 'feature', value: 'auto', + description: 'Whether and how to find the capstone library') ++option('gmp', type: 'feature', value: 'auto', ++ description: 'Whether or not to find the gmp library') + option('fdt', type: 'combo', value: 'auto', + choices: ['disabled', 'enabled', 'auto', 'system', 'internal'], + description: 'Whether and how to find the libfdt library') diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-binfmt.initd.head b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-binfmt.initd.head new file mode 100644 index 0000000000..832ddb0b8e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-binfmt.initd.head @@ -0,0 +1,64 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Enable automatic non-native program execution by the kernel. + +# Defaulting to OC should be safe because it comes down to: +# - do we trust the interp itself to not be malicious? yes; we built it. +# - do we trust the programs we're running? ish; same permission as native +# binaries apply. so if user can do bad stuff natively, cross isn't worse. +: ${QEMU_BINFMT_FLAGS:=OC} + +depend() { + after procfs +} + +start() { + ebegin "Registering qemu-user binaries (flags: ${QEMU_BINFMT_FLAGS})" + + if [ ! -d /proc/sys/fs/binfmt_misc ] ; then + modprobe -q binfmt_misc + fi + + if [ ! -d /proc/sys/fs/binfmt_misc ] ; then + eend 1 "You need support for 'misc binaries' in your kernel!" + return + fi + + if [ ! -f /proc/sys/fs/binfmt_misc/register ] ; then + mount -t binfmt_misc -o nodev,noexec,nosuid \ + binfmt_misc /proc/sys/fs/binfmt_misc >/dev/null 2>&1 + eend $? || return + fi + + # Probe the native cpu type so we don't try registering them. + local cpu="$(uname -m)" + case "${cpu}" in + armv[4-9]*) + cpu="arm" + ;; + i386|i486|i586|i686|i86pc|BePC|x86_64) + cpu="i386" + ;; + m68k) + cpu="m68k" + ;; + mips*) + cpu="mips" + ;; + "Power Macintosh"|ppc|ppc64) + cpu="ppc" + ;; + s390*) + cpu="s390" + ;; + sh*) + cpu="sh" + ;; + sparc*) + cpu="sparc" + ;; + esac + + # Register the interpreter for each cpu except for the native one. diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-binfmt.initd.tail b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-binfmt.initd.tail new file mode 100644 index 0000000000..7679481929 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/files/qemu-binfmt.initd.tail @@ -0,0 +1,14 @@ + eend 0 +} + +stop() { + # We unregister everything in the "qemu-xxx" namespace. + ebegin "Unregistering qemu-user binaries" + local f + for f in /proc/sys/fs/binfmt_misc/qemu-* ; do + if [ -f "${f}" ] ; then + echo '-1' > "${f}" + fi + done + eend 0 +} diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/metadata.xml b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/metadata.xml new file mode 100644 index 0000000000..bdb00757ca --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/metadata.xml @@ -0,0 +1,67 @@ + + + + + virtualization@gentoo.org + Gentoo Virtualization Project + + + dilfridge@gentoo.org + Andreas K. Hüttel + + + Adds support for braille displays using brltty + Enables support for Linux's Async IO + Enable alsa output for sound emulation + Enable eBPF support for RSS implementation. + Enable disassembly support with dev-libs/capstone + Support ISOs / -cdrom directives via HTTP or HTTPS. + Enables firmware device tree support + Enables FUSE block device export + Enables GlusterFS cluster fileystem via + sys-cluster/glusterfs + Enable TLS support for the VNC console server. + For 1.4 and newer this also enables WebSocket support. + For 2.0 through 2.3 also enables disk quorum support. + Enable direct iSCSI support via + net-libs/libiscsi instead of indirectly via the Linux + block layer that sys-block/open-iscsi does. + Enable efficient I/O via sys-libs/liburing. + Enable multipath persistent reservation passthrough via + sys-fs/multipath-tools. + Enable the ncurses-based console + Enable NFS support + Enable NUMA support + Pin the versions of BIOS firmware to the version included in the upstream release. + This is needed to sanely support migration/suspend/resume/snapshotting/etc... of instances. + When the blobs are different, random corruption/bugs/crashes/etc... may be observed. + Enable qemu plugin API via shared library loading. + Enable pulseaudio output for sound emulation + Enable rados block device backend support, see https://docs.ceph.com/en/mimic/rbd/qemu-rbd/ + Enable the SDL-based console + SDL Image support for icons + Enable TCP/IP in hypervisor via net-libs/libslirp + Enable Spice protocol support via app-emulation/spice + Enable SSH based block device support via net-libs/libssh2 + Build the User targets as static binaries + Build the User and Software MMU (system) targets as well as tools as static binaries + Enable SystemTAP/DTrace tracing + Enable jemalloc allocator support + Enable jpeg image support for the VNC console server + Enable png image support for the VNC console server + Enable USB passthrough via dev-libs/libusb + Use sys-apps/usbredir to redirect USB devices to another machine over TCP + Enable VDE-based networking + Enable accelerated networking using vhost-net, see https://www.linux-kvm.org/page/VhostNet + Enable shared file system access using the FUSE protocol carried over virtio. + Enable experimental Virgil 3d (virtual software GPU) + Enable VirtFS via virtio-9p-pci / fsdev. See https://wiki.qemu.org/Documentation/9psetup + Enable terminal support (x11-libs/vte) in the GTK+ interface + Add support for getting and setting POSIX extended attributes, through + sys-apps/attr. Requisite for the virtfs backend. + Enables support for Xen backends + + + qemu-project/qemu + + diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.1.0-r2.ebuild b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.1.0-r2.ebuild new file mode 100644 index 0000000000..d3ffa41c14 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.1.0-r2.ebuild @@ -0,0 +1,967 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-qemu-docs +# Set to 1 if prebuilt, 0 if not +# (the construct below is to allow overriding from env for script) +QEMU_DOCS_PREBUILT=${QEMU_DOCS_PREBUILT:-1} +QEMU_DOCS_PREBUILT_DEV=ajak +QEMU_DOCS_VERSION="${PV}" +# Default to generating docs (inc. man pages) if no prebuilt; overridden later +# bug #830088 +QEMU_DOC_USEFLAG="+doc" + +PYTHON_COMPAT=( python3_{9,10,11} ) +PYTHON_REQ_USE="ncurses,readline" + +FIRMWARE_ABI_VERSION="7.1.0" + +inherit linux-info toolchain-funcs python-r1 udev fcaps readme.gentoo-r1 \ + pax-utils xdg-utils + +if [[ ${PV} == *9999* ]]; then + QEMU_DOCS_PREBUILT=0 + + EGIT_REPO_URI="https://gitlab.com/qemu-project/qemu.git/" + EGIT_SUBMODULES=( + tests/fp/berkeley-softfloat-3 + tests/fp/berkeley-testfloat-3 + ui/keycodemapdb + ) + inherit git-r3 + SRC_URI="" +else + MY_P="${PN}-${PV/_rc/-rc}" + SRC_URI="https://download.qemu.org/${MY_P}.tar.xz" + + if [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + SRC_URI+=" !doc? ( https://dev.gentoo.org/~${QEMU_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${QEMU_DOCS_VERSION}-docs.tar.xz )" + fi + + S="${WORKDIR}/${MY_P}" + KEYWORDS="amd64 ~arm arm64 ~loong ~ppc ppc64 ~riscv x86" +fi + +DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" +HOMEPAGE="https://www.qemu.org https://www.linux-kvm.org" + +LICENSE="GPL-2 LGPL-2 BSD-2" +SLOT="0" + +[[ ${QEMU_DOCS_PREBUILT} == 1 ]] && QEMU_DOC_USEFLAG="doc" + +IUSE="accessibility +aio alsa bpf bzip2 capstone +curl debug ${QEMU_DOC_USEFLAG} + +fdt fuse glusterfs +gnutls gtk infiniband iscsi io-uring + jack jemalloc +jpeg + lzo multipath + ncurses nfs nls numa opengl +oss pam +pin-upstream-blobs + plugins +png pulseaudio python rbd sasl sdl sdl-image selinux + +slirp + smartcard snappy spice ssh static static-user systemtap test udev usb + usbredir vde +vhost-net virgl virtfs +vnc vte xattr xen + zstd" + +COMMON_TARGETS=" + aarch64 + alpha + arm + cris + hppa + i386 + loongarch64 + m68k + microblaze + microblazeel + mips + mips64 + mips64el + mipsel + nios2 + or1k + ppc + ppc64 + riscv32 + riscv64 + s390x + sh4 + sh4eb + sparc + sparc64 + x86_64 + xtensa + xtensaeb +" +IUSE_SOFTMMU_TARGETS=" + ${COMMON_TARGETS} + avr + rx + tricore +" +IUSE_USER_TARGETS=" + ${COMMON_TARGETS} + aarch64_be + armeb + hexagon + mipsn32 + mipsn32el + ppc64le + sparc32plus +" + +use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS}) +use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS}) +IUSE+=" ${use_softmmu_targets} ${use_user_targets}" + +RESTRICT="!test? ( test )" +# Allow no targets to be built so that people can get a tools-only build. +# Block USE flag configurations known to not work. +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + qemu_softmmu_targets_arm? ( fdt ) + qemu_softmmu_targets_microblaze? ( fdt ) + qemu_softmmu_targets_mips64el? ( fdt ) + qemu_softmmu_targets_ppc64? ( fdt ) + qemu_softmmu_targets_ppc? ( fdt ) + qemu_softmmu_targets_riscv32? ( fdt ) + qemu_softmmu_targets_riscv64? ( fdt ) + qemu_softmmu_targets_x86_64? ( fdt ) + sdl-image? ( sdl ) + static? ( static-user !alsa !gtk !jack !opengl !pam !pulseaudio !plugins !rbd !snappy !udev ) + static-user? ( !plugins ) + virgl? ( opengl ) + virtfs? ( xattr ) + vnc? ( gnutls ) + vte? ( gtk ) + multipath? ( udev ) + plugins? ( !static !static-user ) +" + +# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) +# and user/softmmu targets (qemu-*, qemu-system-*). +# +# Yep, you need both libcap and libcap-ng since virtfs only uses libcap. +# +# The attr lib isn't always linked in (although the USE flag is always +# respected). This is because qemu supports using the C library's API +# when available rather than always using the external library. +ALL_DEPEND=" + >=dev-libs/glib-2.0[static-libs(+)] + sys-libs/zlib[static-libs(+)] + python? ( ${PYTHON_DEPS} ) + systemtap? ( dev-util/systemtap ) + xattr? ( sys-apps/attr[static-libs(+)] )" + +# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) +# softmmu targets (qemu-system-*). +SOFTMMU_TOOLS_DEPEND=" + sys-libs/libcap-ng[static-libs(+)] + >=sys-libs/libseccomp-2.1.0[static-libs(+)] + >=x11-libs/pixman-0.28.0[static-libs(+)] + accessibility? ( + app-accessibility/brltty[api] + app-accessibility/brltty[static-libs(+)] + ) + aio? ( dev-libs/libaio[static-libs(+)] ) + alsa? ( >=media-libs/alsa-lib-1.0.13 ) + bpf? ( dev-libs/libbpf:= ) + bzip2? ( app-arch/bzip2[static-libs(+)] ) + capstone? ( dev-libs/capstone:= ) + curl? ( >=net-misc/curl-7.15.4[static-libs(+)] ) + fdt? ( >=sys-apps/dtc-1.5.1[static-libs(+)] ) + fuse? ( >=sys-fs/fuse-3.1:3[static-libs(+)] ) + glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] ) + gnutls? ( + dev-libs/nettle:=[static-libs(+)] + >=net-libs/gnutls-3.0:=[static-libs(+)] + ) + gtk? ( + x11-libs/gtk+:3 + vte? ( x11-libs/vte:2.91 ) + ) + infiniband? ( sys-cluster/rdma-core[static-libs(+)] ) + iscsi? ( net-libs/libiscsi ) + io-uring? ( sys-libs/liburing:=[static-libs(+)] ) + jack? ( virtual/jack ) + jemalloc? ( dev-libs/jemalloc ) + jpeg? ( media-libs/libjpeg-turbo:=[static-libs(+)] ) + lzo? ( dev-libs/lzo:2[static-libs(+)] ) + multipath? ( sys-fs/multipath-tools ) + ncurses? ( + sys-libs/ncurses:=[unicode(+)] + sys-libs/ncurses:=[static-libs(+)] + ) + nfs? ( >=net-fs/libnfs-1.9.3:=[static-libs(+)] ) + numa? ( sys-process/numactl[static-libs(+)] ) + opengl? ( + virtual/opengl + media-libs/libepoxy[static-libs(+)] + media-libs/mesa[static-libs(+)] + media-libs/mesa[egl(+),gbm(+)] + ) + pam? ( sys-libs/pam ) + png? ( media-libs/libpng:0=[static-libs(+)] ) + pulseaudio? ( media-sound/pulseaudio ) + rbd? ( sys-cluster/ceph ) + sasl? ( dev-libs/cyrus-sasl[static-libs(+)] ) + sdl? ( + media-libs/libsdl2[video] + media-libs/libsdl2[static-libs(+)] + ) + sdl-image? ( media-libs/sdl2-image[static-libs(+)] ) + slirp? ( net-libs/libslirp[static-libs(+)] ) + smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] ) + snappy? ( app-arch/snappy:= ) + spice? ( + >=app-emulation/spice-protocol-0.12.3 + >=app-emulation/spice-0.12.0[static-libs(+)] + ) + ssh? ( >=net-libs/libssh-0.8.6[static-libs(+)] ) + udev? ( virtual/libudev:= ) + usb? ( >=virtual/libusb-1-r2[static-libs(+)] ) + usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] ) + vde? ( net-misc/vde[static-libs(+)] ) + virgl? ( media-libs/virglrenderer[static-libs(+)] ) + virtfs? ( sys-libs/libcap ) + xen? ( app-emulation/xen-tools:= ) + zstd? ( >=app-arch/zstd-1.4.0[static-libs(+)] ) +" + +EDK2_OVMF_VERSION="202202" +SEABIOS_VERSION="1.16.0" + +X86_FIRMWARE_DEPEND=" + pin-upstream-blobs? ( + ~sys-firmware/edk2-ovmf-bin-${EDK2_OVMF_VERSION} + ~sys-firmware/ipxe-1.21.1[binary,qemu] + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} + ~sys-firmware/sgabios-0.1_pre10[binary] + ) + !pin-upstream-blobs? ( + || ( + >=sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION} + >=sys-firmware/edk2-ovmf-bin-${EDK2_OVMF_VERSION} + ) + sys-firmware/ipxe[qemu] + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) + sys-firmware/sgabios + )" +PPC_FIRMWARE_DEPEND=" + pin-upstream-blobs? ( + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) + !pin-upstream-blobs? ( + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) + ) +" + +BDEPEND=" + $(python_gen_impl_dep) + dev-lang/perl + dev-util/meson + sys-apps/texinfo + virtual/pkgconfig + doc? ( + dev-python/sphinx[${PYTHON_USEDEP}] + dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}] + ) + gtk? ( nls? ( sys-devel/gettext ) ) + test? ( + dev-libs/glib[utils] + sys-devel/bc + ) +" +CDEPEND=" + !static? ( + ${ALL_DEPEND//\[static-libs(+)]} + ${SOFTMMU_TOOLS_DEPEND//\[static-libs(+)]} + ) + qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_ppc? ( ${PPC_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_ppc64? ( ${PPC_FIRMWARE_DEPEND} ) +" +DEPEND="${CDEPEND} + kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 ) + static? ( + ${ALL_DEPEND} + ${SOFTMMU_TOOLS_DEPEND} + ) + static-user? ( ${ALL_DEPEND} )" +RDEPEND="${CDEPEND} + acct-group/kvm + selinux? ( + sec-policy/selinux-qemu + sys-libs/libselinux + )" + +PATCHES=( + "${FILESDIR}"/${PN}-5.2.0-disable-keymap.patch + "${FILESDIR}"/${PN}-6.0.0-make.patch + "${FILESDIR}"/${PN}-7.1.0-also-build-virtfs-proxy-helper.patch + "${FILESDIR}"/${PN}-7.1.0-strings.patch + "${FILESDIR}"/${PN}-7.1.0-capstone-include-path.patch + "${FILESDIR}"/${PN}-7.1.0-mips-n32-syscalls.patch + "${FILESDIR}"/${PN}-7.1.0-loong-stat.patch + "${FILESDIR}"/${PN}-7.1.0-faccessat2.patch +) + +QA_PREBUILT=" + usr/share/qemu/hppa-firmware.img + usr/share/qemu/openbios-ppc + usr/share/qemu/openbios-sparc64 + usr/share/qemu/openbios-sparc32 + usr/share/qemu/opensbi-riscv64-generic-fw_dynamic.elf + usr/share/qemu/opensbi-riscv32-generic-fw_dynamic.elf + usr/share/qemu/palcode-clipper + usr/share/qemu/s390-ccw.img + usr/share/qemu/s390-netboot.img + usr/share/qemu/u-boot.e500 +" + +QA_WX_LOAD="usr/bin/qemu-i386 + usr/bin/qemu-x86_64 + usr/bin/qemu-alpha + usr/bin/qemu-arm + usr/bin/qemu-cris + usr/bin/qemu-m68k + usr/bin/qemu-microblaze + usr/bin/qemu-microblazeel + usr/bin/qemu-mips + usr/bin/qemu-mipsel + usr/bin/qemu-or1k + usr/bin/qemu-ppc + usr/bin/qemu-ppc64 + usr/bin/qemu-sh4 + usr/bin/qemu-sh4eb + usr/bin/qemu-sparc + usr/bin/qemu-sparc64 + usr/bin/qemu-armeb + usr/bin/qemu-sparc32plus + usr/bin/qemu-s390x + usr/bin/qemu-unicore32 +" + +DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure you have the +kernel module loaded before running kvm. The easiest way to ensure that the +kernel module is loaded is to load it on boot. + For AMD CPUs the module is called 'kvm-amd'. + For Intel CPUs the module is called 'kvm-intel'. +Please review /etc/conf.d/modules for how to load these. + +Make sure your user is in the 'kvm' group. Just run + $ gpasswd -a kvm +then have re-login. + +For brand new installs, the default permissions on /dev/kvm might not let +you access it. You can tell udev to reset ownership/perms: + $ udevadm trigger -c add /dev/kvm + +If you want to register binfmt handlers for qemu user targets: +For openrc: + # rc-update add qemu-binfmt +For systemd: + # ln -s /usr/share/qemu/binfmt.d/qemu.conf /etc/binfmt.d/qemu.conf" + +pkg_pretend() { + if use kernel_linux && kernel_is lt 2 6 25; then + eerror "This version of KVM requires a host kernel of 2.6.25 or higher." + elif use kernel_linux; then + if ! linux_config_exists; then + eerror "Unable to check your kernel for KVM support" + else + CONFIG_CHECK="~KVM ~TUN ~BRIDGE" + ERROR_KVM="You must enable KVM in your kernel to continue" + ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in" + ERROR_KVM_AMD+=" your kernel configuration." + ERROR_KVM_INTEL="If you have an Intel CPU, you must enable" + ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration." + ERROR_TUN="You will need the Universal TUN/TAP driver compiled" + ERROR_TUN+=" into your kernel or loaded as a module to use the" + ERROR_TUN+=" virtual network device if using -net tap." + ERROR_BRIDGE="You will also need support for 802.1d" + ERROR_BRIDGE+=" Ethernet Bridging for some network configurations." + use vhost-net && CONFIG_CHECK+=" ~VHOST_NET" + ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net" + ERROR_VHOST_NET+=" support" + + if use amd64 || use x86 || use amd64-linux || use x86-linux; then + if grep -q AuthenticAMD /proc/cpuinfo; then + CONFIG_CHECK+=" ~KVM_AMD" + elif grep -q GenuineIntel /proc/cpuinfo; then + CONFIG_CHECK+=" ~KVM_INTEL" + fi + fi + + use python && CONFIG_CHECK+=" ~DEBUG_FS" + ERROR_DEBUG_FS="debugFS support required for kvm_stat" + + # Now do the actual checks setup above + check_extra_config + fi + fi + + if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then + eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt" + eerror "instances are still pointing to it. Please update your" + eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag" + eerror "and the right system binary (e.g. qemu-system-x86_64)." + die "update your virt configs to not use qemu-kvm" + fi +} + +# Sanity check to make sure target lists are kept up-to-date. +check_targets() { + local var=$1 mak=$2 + local detected sorted + + pushd "${S}"/configs/targets/ >/dev/null || die + + # Force C locale until glibc is updated. #564936 + detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u)) + sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u)) + if [[ ${sorted} != "${detected}" ]] ; then + eerror "The ebuild needs to be kept in sync." + eerror "${var}: ${sorted}" + eerror "$(printf '%-*s' ${#var} configure): ${detected}" + die "sync ${var} to the list of targets" + fi + + popd >/dev/null +} + +src_prepare() { + check_targets IUSE_SOFTMMU_TARGETS softmmu + check_targets IUSE_USER_TARGETS linux-user + + default + + # Use correct toolchain to fix cross-compiling + tc-export AR AS LD NM OBJCOPY PKG_CONFIG RANLIB STRINGS + export WINDRES=${CHOST}-windres + + # Verbose builds + MAKEOPTS+=" V=1" + + # We already force -D_FORTIFY_SOURCE=2 (or 3) in our toolchain, but + # this setting (-U then -D..=2) will prevent us from trying out 3, so + # drop it. No change to level of protection b/c we patch our toolchain. + sed -i -e 's/-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2//' configure || die + + # Remove bundled modules + rm -r dtc meson roms/*/ slirp || die +} + +## +# configures qemu based on the build directory and the build type +# we are using. +# +qemu_src_configure() { + debug-print-function ${FUNCNAME} "$@" + + local buildtype=$1 + local builddir="${S}/${buildtype}-build" + + mkdir "${builddir}" || die + + local conf_opts=( + --prefix=/usr + --sysconfdir=/etc + --bindir=/usr/bin + --libdir=/usr/$(get_libdir) + --datadir=/usr/share + --docdir=/usr/share/doc/${PF}/html + --mandir=/usr/share/man + --localstatedir=/var + --disable-bsd-user + --disable-containers # bug #732972 + --disable-guest-agent + --disable-strip + --with-git-submodules=ignore + + # bug #746752: TCG interpreter has a few limitations: + # - it does not support FPU + # - it's generally slower on non-self-modifying code + # It's advantage is support for host architectures + # where native codegeneration is not implemented. + # Gentoo has qemu keyworded only on targets with + # native code generation available. Avoid the interpreter. + --disable-tcg-interpreter + + --disable-werror + # We support gnutls/nettle for crypto operations. It is possible + # to use gcrypt when gnutls/nettle are disabled (but not when they + # are enabled), but it's not really worth the hassle. Disable it + # all the time to avoid automatically detecting it. #568856 + --disable-gcrypt + --cc="$(tc-getCC)" + --cxx="$(tc-getCXX)" + --host-cc="$(tc-getBUILD_CC)" + + $(use_enable alsa) + $(use_enable debug debug-info) + $(use_enable debug debug-tcg) + $(use_enable jack) + $(use_enable nls gettext) + $(use_enable oss) + $(use_enable plugins) + $(use_enable pulseaudio pa) + $(use_enable selinux) + $(use_enable xattr attr) + ) + + # Disable options not used by user targets. This simplifies building + # static user targets (USE=static-user) considerably. + conf_notuser() { + if [[ ${buildtype} == "user" ]] ; then + echo "--disable-${2:-$1}" + else + use_enable "$@" + fi + } + # Enable option only for softmmu build, but not 'user' or 'tools' + conf_softmmu() { + if [[ ${buildtype} == "softmmu" ]] ; then + use_enable "$@" + else + echo "--disable-${2:-$1}" + fi + } + # Enable option only for tools build, but not 'user' or 'softmmu' + conf_tools() { + if [[ ${buildtype} == "tools" ]] ; then + use_enable "$@" + else + echo "--disable-${2:-$1}" + fi + } + # Special case for the malloc flag, because the --disable flag does + # not exist and trying like above will break configuring. + conf_malloc() { + if [[ ! ${buildtype} == "user" ]] ; then + usex "${1}" "--enable-malloc=${1}" "" + fi + } + conf_opts+=( + $(conf_notuser accessibility brlapi) + $(conf_notuser aio linux-aio) + $(conf_softmmu bpf) + $(conf_notuser bzip2) + $(conf_notuser capstone) + $(conf_notuser curl) + $(conf_tools doc docs) + $(conf_notuser fdt) + $(conf_notuser fuse) + $(conf_notuser glusterfs) + $(conf_notuser gnutls) + $(conf_notuser gnutls nettle) + $(conf_notuser gtk) + $(conf_notuser infiniband rdma) + $(conf_notuser iscsi libiscsi) + $(conf_notuser io-uring linux-io-uring) + $(conf_malloc jemalloc) + $(conf_notuser jpeg vnc-jpeg) + $(conf_notuser kernel_linux kvm) + $(conf_notuser lzo) + $(conf_notuser multipath mpath) + $(conf_notuser ncurses curses) + $(conf_notuser nfs libnfs) + $(conf_notuser numa) + $(conf_notuser opengl) + $(conf_notuser pam auth-pam) + $(conf_notuser png) + $(conf_notuser rbd) + $(conf_notuser sasl vnc-sasl) + $(conf_notuser sdl) + $(conf_softmmu sdl-image) + $(conf_notuser slirp slirp system) + $(conf_notuser smartcard) + $(conf_notuser snappy) + $(conf_notuser spice) + $(conf_notuser ssh libssh) + $(conf_notuser udev libudev) + $(conf_notuser usb libusb) + $(conf_notuser usbredir usb-redir) + $(conf_notuser vde) + $(conf_notuser vhost-net) + $(conf_notuser virgl virglrenderer) + $(conf_softmmu virtfs) + $(conf_notuser vnc) + $(conf_notuser vte) + $(conf_notuser xen) + $(conf_notuser xen xen-pci-passthrough) + # use prebuilt keymaps, bug #759604 + --disable-xkbcommon + $(conf_notuser zstd) + ) + + if [[ ! ${buildtype} == "user" ]] ; then + # audio options + local audio_opts=( + # Note: backend order matters here: #716202 + # We iterate from higher-level to lower level. + $(usex pulseaudio pa "") + $(usev jack) + $(usev sdl) + $(usev alsa) + $(usev oss) + ) + conf_opts+=( + --audio-drv-list=$(IFS=,; echo "${audio_opts[*]}") + ) + fi + + case ${buildtype} in + user) + conf_opts+=( + --enable-linux-user + --disable-system + --disable-blobs + --disable-tools + --disable-cap-ng + --disable-seccomp + ) + local static_flag="static-user" + ;; + softmmu) + conf_opts+=( + --disable-linux-user + --enable-system + --disable-tools + --enable-cap-ng + --enable-seccomp + ) + local static_flag="static" + ;; + tools) + conf_opts+=( + --disable-linux-user + --disable-system + --disable-blobs + --enable-cap-ng + --enable-seccomp + --enable-tools + ) + local static_flag="static" + ;; + esac + + local targets="${buildtype}_targets" + [[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" ) + + # Add support for SystemTAP + use systemtap && conf_opts+=( --enable-trace-backend=dtrace ) + + # We always want to attempt to build with PIE support as it results + # in a more secure binary. But it doesn't work with static or if + # the current GCC doesn't have PIE support. + if use ${static_flag}; then + conf_opts+=( --static --disable-pie ) + else + tc-enables-pie && conf_opts+=( --enable-pie ) + fi + + # Meson will not use a cross-file unless cross_prefix is set. + tc-is-cross-compiler && conf_opts+=( --cross-prefix="${CHOST}-" ) + + # Plumb through equivalent of EXTRA_ECONF to allow experiments + # like bug #747928. + conf_opts+=( ${EXTRA_CONF_QEMU} ) + + echo "../configure ${conf_opts[*]}" + cd "${builddir}" + ../configure "${conf_opts[@]}" || die "configure failed" +} + +src_configure() { + local target + + python_setup + + softmmu_targets= softmmu_bins=() + user_targets= user_bins=() + + for target in ${IUSE_SOFTMMU_TARGETS} ; do + if use "qemu_softmmu_targets_${target}"; then + softmmu_targets+=",${target}-softmmu" + softmmu_bins+=( "qemu-system-${target}" ) + fi + done + + for target in ${IUSE_USER_TARGETS} ; do + if use "qemu_user_targets_${target}"; then + user_targets+=",${target}-linux-user" + user_bins+=( "qemu-${target}" ) + fi + done + + softmmu_targets=${softmmu_targets#,} + user_targets=${user_targets#,} + + [[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu" + [[ -n ${user_targets} ]] && qemu_src_configure "user" + qemu_src_configure "tools" +} + +src_compile() { + if [[ -n ${user_targets} ]]; then + cd "${S}/user-build" || die + default + fi + + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" || die + default + fi + + cd "${S}/tools-build" || die + default +} + +src_test() { + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" || die + pax-mark m */qemu-system-* #515550 + emake check + fi +} + +qemu_python_install() { + python_domodule "${S}/python/qemu" + + python_doscript "${S}/scripts/kvm/vmxcap" + python_doscript "${S}/scripts/qmp/qmp-shell" + python_doscript "${S}/scripts/qmp/qemu-ga-client" +} + +# Generate binfmt support files. +# - /etc/init.d/qemu-binfmt script which registers the user handlers (openrc) +# - /usr/share/qemu/binfmt.d/qemu.conf (for use with systemd-binfmt) +generate_initd() { + local out="${T}/qemu-binfmt" + local out_systemd="${T}/qemu.conf" + local d="${T}/binfmt.d" + + einfo "Generating qemu binfmt scripts and configuration files" + + # Generate the debian fragments first. + mkdir -p "${d}" + "${S}"/scripts/qemu-binfmt-conf.sh \ + --debian \ + --exportdir "${d}" \ + --qemu-path "${EPREFIX}/usr/bin" \ + || die + # Then turn the fragments into a shell script we can source. + sed -E -i \ + -e 's:^([^ ]+) (.*)$:\1="\2":' \ + "${d}"/* || die + + # Generate the init.d script by assembling the fragments from above. + local f qcpu package interpreter magic mask + cat "${FILESDIR}"/qemu-binfmt.initd.head >"${out}" || die + for f in "${d}"/qemu-* ; do + source "${f}" + + # Normalize the cpu logic like we do in the init.d for the native cpu. + qcpu=${package#qemu-} + case ${qcpu} in + arm*) qcpu="arm";; + mips*) qcpu="mips";; + ppc*) qcpu="ppc";; + s390*) qcpu="s390";; + sh*) qcpu="sh";; + sparc*) qcpu="sparc";; + esac + + # we use 'printf' here to be portable across 'sh' + # implementations: #679168 + cat <>"${out}" + if [ "\${cpu}" != "${qcpu}" -a -x "${interpreter}" ] ; then + printf '%s\n' ':${package}:M::${magic}:${mask}:${interpreter}:'"\${QEMU_BINFMT_FLAGS}" >/proc/sys/fs/binfmt_misc/register + fi +EOF + + echo ":${package}:M::${magic}:${mask}:${interpreter}:OC" >>"${out_systemd}" + + done + cat "${FILESDIR}"/qemu-binfmt.initd.tail >>"${out}" || die +} + +src_install() { + if [[ -n ${user_targets} ]]; then + cd "${S}/user-build" + emake DESTDIR="${ED}" install + + # Install binfmt handler init script for user targets. + generate_initd + doinitd "${T}/qemu-binfmt" + + # Install binfmt/qemu.conf. + insinto "/usr/share/qemu/binfmt.d" + doins "${T}/qemu.conf" + fi + + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" + emake DESTDIR="${ED}" install + + # This might not exist if the test failed. #512010 + [[ -e check-report.html ]] && dodoc check-report.html + + if use kernel_linux; then + udev_newrules "${FILESDIR}"/65-kvm.rules-r2 65-kvm.rules + fi + + if use python; then + python_foreach_impl qemu_python_install + fi + fi + + cd "${S}/tools-build" || die + emake DESTDIR="${ED}" install + + # If USE=doc, there'll be newly generated docs which we install instead. + if ! use doc && [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + doman "${WORKDIR}"/${PN}-${QEMU_DOCS_VERSION}-docs/docs/*.[0-8] + fi + + # Disable mprotect on the qemu binaries as they use JITs to be fast #459348 + pushd "${ED}"/usr/bin >/dev/null || die + pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594 + popd >/dev/null || die + + # Install config file example for qemu-bridge-helper + insinto "/etc/qemu" + doins "${FILESDIR}/bridge.conf" + + cd "${S}" || die + dodoc MAINTAINERS docs/specs/pci-ids.txt + newdoc pc-bios/README README.pc-bios + + # Disallow stripping of prebuilt firmware files. + dostrip -x ${QA_PREBUILT} + + if [[ -n ${softmmu_targets} ]]; then + # Remove SeaBIOS since we're using the SeaBIOS packaged one + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin + fi + + # Remove vgabios since we're using the seavgabios packaged one + rm "${ED}/usr/share/qemu/vgabios.bin" + rm "${ED}/usr/share/qemu/vgabios-cirrus.bin" + rm "${ED}/usr/share/qemu/vgabios-qxl.bin" + rm "${ED}/usr/share/qemu/vgabios-stdvga.bin" + rm "${ED}/usr/share/qemu/vgabios-virtio.bin" + rm "${ED}/usr/share/qemu/vgabios-vmware.bin" + + # PPC/PPC64 loads vgabios-stdvga + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64; then + dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin + dosym ../seavgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin + dosym ../seavgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin + dosym ../seavgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin + dosym ../seavgabios/vgabios-virtio.bin /usr/share/qemu/vgabios-virtio.bin + dosym ../seavgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin + fi + + # Remove sgabios since we're using the sgabios packaged one + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin + fi + + # Remove iPXE since we're using the iPXE packaged one + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom + dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom + dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom + dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom + dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom + dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom + fi + fi + + DISABLE_AUTOFORMATTING=true + readme.gentoo_create_doc +} + +firmware_abi_change() { + local pv + for pv in ${REPLACING_VERSIONS}; do + if ver_test ${pv} -lt ${FIRMWARE_ABI_VERSION}; then + return 0 + fi + done + return 1 +} + +pkg_postinst() { + if [[ -n ${softmmu_targets} ]] && use kernel_linux; then + udev_reload + fi + + xdg_icon_cache_update + + [[ -z ${EPREFIX} ]] && [[ -f ${EROOT}/usr/libexec/qemu-bridge-helper ]] && \ + fcaps cap_net_admin "${EROOT}"/usr/libexec/qemu-bridge-helper + + DISABLE_AUTOFORMATTING=true + readme.gentoo_print_elog + + if use pin-upstream-blobs && firmware_abi_change; then + ewarn "This version of qemu pins new versions of firmware blobs:" + + if has_version 'sys-firmware/edk2-ovmf-bin'; then + ewarn " $(best_version sys-firmware/edk2-ovmf-bin)" + else + ewarn " $(best_version sys-firmware/edk2-ovmf)" + fi + + if has_version 'sys-firmware/seabios-bin'; then + ewarn " $(best_version sys-firmware/seabios-bin)" + else + ewarn " $(best_version sys-firmware/seabios)" + fi + + ewarn " $(best_version sys-firmware/ipxe)" + ewarn " $(best_version sys-firmware/sgabios)" + ewarn "This might break resume of hibernated guests (started with a different" + ewarn "firmware version) and live migration to/from qemu versions with different" + ewarn "firmware. Please (cold) restart all running guests. For functional" + ewarn "guest migration ensure that all" + ewarn "hosts run at least" + ewarn " app-emulation/qemu-${FIRMWARE_ABI_VERSION}." + fi +} + +pkg_info() { + echo "Using:" + echo " $(best_version app-emulation/spice-protocol)" + + if has_version 'sys-firmware/edk2-ovmf-bin'; then + echo " $(best_version sys-firmware/edk2-ovmf-bin)" + else + echo " $(best_version sys-firmware/edk2-ovmf)" + fi + + if has_version 'sys-firmware/seabios-bin'; then + echo " $(best_version sys-firmware/seabios-bin)" + else + echo " $(best_version sys-firmware/seabios)" + fi + + echo " $(best_version sys-firmware/ipxe)" + echo " $(best_version sys-firmware/sgabios)" +} + +pkg_postrm() { + xdg_icon_cache_update + udev_reload +} diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.1.0.ebuild b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.1.0.ebuild new file mode 100644 index 0000000000..b1ff815a7c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.1.0.ebuild @@ -0,0 +1,985 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-qemu-docs +# Set to 1 if prebuilt, 0 if not +# (the construct below is to allow overriding from env for script) +QEMU_DOCS_PREBUILT=${QEMU_DOCS_PREBUILT:-1} +QEMU_DOCS_PREBUILT_DEV=ajak +QEMU_DOCS_VERSION="${PV}" +# Default to generating docs (inc. man pages) if no prebuilt; overridden later +# bug #830088 +QEMU_DOC_USEFLAG="+doc" + +PYTHON_COMPAT=( python3_{9,10,11} ) +PYTHON_REQ_USE="ncurses,readline" + +FIRMWARE_ABI_VERSION="7.1.0" + +inherit linux-info toolchain-funcs python-r1 udev fcaps readme.gentoo-r1 \ + pax-utils xdg-utils + +if [[ ${PV} == *9999* ]]; then + QEMU_DOCS_PREBUILT=0 + + EGIT_REPO_URI="https://gitlab.com/qemu-project/qemu.git/" + EGIT_SUBMODULES=( + tests/fp/berkeley-softfloat-3 + tests/fp/berkeley-testfloat-3 + ui/keycodemapdb + ) + inherit git-r3 + SRC_URI="" +else + MY_P="${PN}-${PV/_rc/-rc}" + SRC_URI="https://download.qemu.org/${MY_P}.tar.xz" + + if [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + SRC_URI+=" !doc? ( https://dev.gentoo.org/~${QEMU_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${QEMU_DOCS_VERSION}-docs.tar.xz )" + fi + + S="${WORKDIR}/${MY_P}" + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" +fi + +DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" +HOMEPAGE="https://www.qemu.org https://www.linux-kvm.org" + +LICENSE="GPL-2 LGPL-2 BSD-2" +SLOT="0" + +[[ ${QEMU_DOCS_PREBUILT} == 1 ]] && QEMU_DOC_USEFLAG="doc" + +IUSE="accessibility +aio alsa bpf bzip2 capstone +caps +curl debug ${QEMU_DOC_USEFLAG} + +fdt fuse glusterfs +gnutls gtk infiniband iscsi io-uring + jack jemalloc +jpeg + lzo multipath + ncurses nfs nls numa opengl +oss pam +pin-upstream-blobs + plugins +png pulseaudio python rbd sasl +seccomp sdl sdl-image selinux + +slirp + smartcard snappy spice ssh static static-user systemtap test udev usb + usbredir vde +vhost-net vhost-user-fs virgl virtfs +vnc vte xattr xen + zstd" + +COMMON_TARGETS=" + aarch64 + alpha + arm + cris + hppa + i386 + loongarch64 + m68k + microblaze + microblazeel + mips + mips64 + mips64el + mipsel + nios2 + or1k + ppc + ppc64 + riscv32 + riscv64 + s390x + sh4 + sh4eb + sparc + sparc64 + x86_64 + xtensa + xtensaeb +" +IUSE_SOFTMMU_TARGETS=" + ${COMMON_TARGETS} + avr + rx + tricore +" +IUSE_USER_TARGETS=" + ${COMMON_TARGETS} + aarch64_be + armeb + hexagon + mipsn32 + mipsn32el + ppc64le + sparc32plus +" + +use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS}) +use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS}) +IUSE+=" ${use_softmmu_targets} ${use_user_targets}" + +RESTRICT="!test? ( test )" +# Allow no targets to be built so that people can get a tools-only build. +# Block USE flag configurations known to not work. +REQUIRED_USE="${PYTHON_REQUIRED_USE} + qemu_softmmu_targets_arm? ( fdt ) + qemu_softmmu_targets_microblaze? ( fdt ) + qemu_softmmu_targets_mips64el? ( fdt ) + qemu_softmmu_targets_ppc64? ( fdt ) + qemu_softmmu_targets_ppc? ( fdt ) + qemu_softmmu_targets_riscv32? ( fdt ) + qemu_softmmu_targets_riscv64? ( fdt ) + qemu_softmmu_targets_x86_64? ( fdt ) + sdl-image? ( sdl ) + static? ( static-user !alsa !gtk !jack !opengl !pam !pulseaudio !plugins !rbd !snappy !udev ) + static-user? ( !plugins ) + vhost-user-fs? ( caps seccomp ) + virgl? ( opengl ) + virtfs? ( caps xattr ) + vnc? ( gnutls ) + vte? ( gtk ) + multipath? ( udev ) + plugins? ( !static !static-user ) +" + +# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) +# and user/softmmu targets (qemu-*, qemu-system-*). +# +# Yep, you need both libcap and libcap-ng since virtfs only uses libcap. +# +# The attr lib isn't always linked in (although the USE flag is always +# respected). This is because qemu supports using the C library's API +# when available rather than always using the external library. +ALL_DEPEND=" + >=dev-libs/glib-2.0[static-libs(+)] + sys-libs/zlib[static-libs(+)] + python? ( ${PYTHON_DEPS} ) + systemtap? ( dev-util/systemtap ) + xattr? ( sys-apps/attr[static-libs(+)] )" + +# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) +# softmmu targets (qemu-system-*). +SOFTMMU_TOOLS_DEPEND=" + >=x11-libs/pixman-0.28.0[static-libs(+)] + accessibility? ( + app-accessibility/brltty[api] + app-accessibility/brltty[static-libs(+)] + ) + aio? ( dev-libs/libaio[static-libs(+)] ) + alsa? ( >=media-libs/alsa-lib-1.0.13 ) + bpf? ( dev-libs/libbpf:= ) + bzip2? ( app-arch/bzip2[static-libs(+)] ) + capstone? ( dev-libs/capstone:= ) + caps? ( sys-libs/libcap-ng[static-libs(+)] ) + curl? ( >=net-misc/curl-7.15.4[static-libs(+)] ) + fdt? ( >=sys-apps/dtc-1.5.1[static-libs(+)] ) + fuse? ( >=sys-fs/fuse-3.1:3[static-libs(+)] ) + glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] ) + gnutls? ( + dev-libs/nettle:=[static-libs(+)] + >=net-libs/gnutls-3.0:=[static-libs(+)] + ) + gtk? ( + x11-libs/gtk+:3 + vte? ( x11-libs/vte:2.91 ) + ) + infiniband? ( sys-cluster/rdma-core[static-libs(+)] ) + iscsi? ( net-libs/libiscsi ) + io-uring? ( sys-libs/liburing:=[static-libs(+)] ) + jack? ( virtual/jack ) + jemalloc? ( dev-libs/jemalloc ) + jpeg? ( media-libs/libjpeg-turbo:=[static-libs(+)] ) + lzo? ( dev-libs/lzo:2[static-libs(+)] ) + multipath? ( sys-fs/multipath-tools ) + ncurses? ( + sys-libs/ncurses:=[unicode(+)] + sys-libs/ncurses:=[static-libs(+)] + ) + nfs? ( >=net-fs/libnfs-1.9.3:=[static-libs(+)] ) + numa? ( sys-process/numactl[static-libs(+)] ) + opengl? ( + virtual/opengl + media-libs/libepoxy[static-libs(+)] + media-libs/mesa[static-libs(+)] + media-libs/mesa[egl(+),gbm(+)] + ) + pam? ( sys-libs/pam ) + png? ( media-libs/libpng:0=[static-libs(+)] ) + pulseaudio? ( media-sound/pulseaudio ) + rbd? ( sys-cluster/ceph ) + sasl? ( dev-libs/cyrus-sasl[static-libs(+)] ) + sdl? ( + media-libs/libsdl2[video] + media-libs/libsdl2[static-libs(+)] + ) + sdl-image? ( media-libs/sdl2-image[static-libs(+)] ) + seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] ) + slirp? ( net-libs/libslirp[static-libs(+)] ) + smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] ) + snappy? ( app-arch/snappy:= ) + spice? ( + >=app-emulation/spice-protocol-0.12.3 + >=app-emulation/spice-0.12.0[static-libs(+)] + ) + ssh? ( >=net-libs/libssh-0.8.6[static-libs(+)] ) + udev? ( virtual/libudev:= ) + usb? ( >=virtual/libusb-1-r2[static-libs(+)] ) + usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] ) + vde? ( net-misc/vde[static-libs(+)] ) + virgl? ( media-libs/virglrenderer[static-libs(+)] ) + virtfs? ( sys-libs/libcap ) + xen? ( app-emulation/xen-tools:= ) + zstd? ( >=app-arch/zstd-1.4.0[static-libs(+)] ) +" + +EDK2_OVMF_VERSION="202202" +SEABIOS_VERSION="1.16.0" + +X86_FIRMWARE_DEPEND=" + pin-upstream-blobs? ( + ~sys-firmware/edk2-ovmf-bin-${EDK2_OVMF_VERSION} + ~sys-firmware/ipxe-1.21.1[binary,qemu] + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} + ~sys-firmware/sgabios-0.1_pre10[binary] + ) + !pin-upstream-blobs? ( + || ( + >=sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION} + >=sys-firmware/edk2-ovmf-bin-${EDK2_OVMF_VERSION} + ) + sys-firmware/ipxe[qemu] + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) + sys-firmware/sgabios + )" +PPC_FIRMWARE_DEPEND=" + pin-upstream-blobs? ( + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) + !pin-upstream-blobs? ( + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) + ) +" + +BDEPEND=" + $(python_gen_impl_dep) + dev-lang/perl + dev-util/meson + sys-apps/texinfo + virtual/pkgconfig + doc? ( + dev-python/sphinx[${PYTHON_USEDEP}] + dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}] + ) + gtk? ( nls? ( sys-devel/gettext ) ) + test? ( + dev-libs/glib[utils] + sys-devel/bc + ) +" +CDEPEND=" + !static? ( + ${ALL_DEPEND//\[static-libs(+)]} + ${SOFTMMU_TOOLS_DEPEND//\[static-libs(+)]} + ) + qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_ppc? ( ${PPC_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_ppc64? ( ${PPC_FIRMWARE_DEPEND} ) +" +DEPEND="${CDEPEND} + kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 ) + static? ( + ${ALL_DEPEND} + ${SOFTMMU_TOOLS_DEPEND} + ) + static-user? ( ${ALL_DEPEND} )" +RDEPEND="${CDEPEND} + acct-group/kvm + selinux? ( + sec-policy/selinux-qemu + sys-libs/libselinux + )" + +PATCHES=( + "${FILESDIR}"/${PN}-5.2.0-disable-keymap.patch + "${FILESDIR}"/${PN}-6.0.0-make.patch + "${FILESDIR}"/${PN}-7.1.0-also-build-virtfs-proxy-helper.patch + "${FILESDIR}"/${PN}-7.1.0-strings.patch + "${FILESDIR}"/${PN}-7.1.0-capstone-include-path.patch +) + +QA_PREBUILT=" + usr/share/qemu/hppa-firmware.img + usr/share/qemu/openbios-ppc + usr/share/qemu/openbios-sparc64 + usr/share/qemu/openbios-sparc32 + usr/share/qemu/opensbi-riscv64-generic-fw_dynamic.elf + usr/share/qemu/opensbi-riscv32-generic-fw_dynamic.elf + usr/share/qemu/palcode-clipper + usr/share/qemu/s390-ccw.img + usr/share/qemu/s390-netboot.img + usr/share/qemu/u-boot.e500 +" + +QA_WX_LOAD="usr/bin/qemu-i386 + usr/bin/qemu-x86_64 + usr/bin/qemu-alpha + usr/bin/qemu-arm + usr/bin/qemu-cris + usr/bin/qemu-m68k + usr/bin/qemu-microblaze + usr/bin/qemu-microblazeel + usr/bin/qemu-mips + usr/bin/qemu-mipsel + usr/bin/qemu-or1k + usr/bin/qemu-ppc + usr/bin/qemu-ppc64 + usr/bin/qemu-sh4 + usr/bin/qemu-sh4eb + usr/bin/qemu-sparc + usr/bin/qemu-sparc64 + usr/bin/qemu-armeb + usr/bin/qemu-sparc32plus + usr/bin/qemu-s390x + usr/bin/qemu-unicore32 +" + +DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure you have the +kernel module loaded before running kvm. The easiest way to ensure that the +kernel module is loaded is to load it on boot. + For AMD CPUs the module is called 'kvm-amd'. + For Intel CPUs the module is called 'kvm-intel'. +Please review /etc/conf.d/modules for how to load these. + +Make sure your user is in the 'kvm' group. Just run + $ gpasswd -a kvm +then have re-login. + +For brand new installs, the default permissions on /dev/kvm might not let +you access it. You can tell udev to reset ownership/perms: + $ udevadm trigger -c add /dev/kvm + +If you want to register binfmt handlers for qemu user targets: +For openrc: + # rc-update add qemu-binfmt +For systemd: + # ln -s /usr/share/qemu/binfmt.d/qemu.conf /etc/binfmt.d/qemu.conf" + +pkg_pretend() { + if use kernel_linux && kernel_is lt 2 6 25; then + eerror "This version of KVM requires a host kernel of 2.6.25 or higher." + elif use kernel_linux; then + if ! linux_config_exists; then + eerror "Unable to check your kernel for KVM support" + else + CONFIG_CHECK="~KVM ~TUN ~BRIDGE" + ERROR_KVM="You must enable KVM in your kernel to continue" + ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in" + ERROR_KVM_AMD+=" your kernel configuration." + ERROR_KVM_INTEL="If you have an Intel CPU, you must enable" + ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration." + ERROR_TUN="You will need the Universal TUN/TAP driver compiled" + ERROR_TUN+=" into your kernel or loaded as a module to use the" + ERROR_TUN+=" virtual network device if using -net tap." + ERROR_BRIDGE="You will also need support for 802.1d" + ERROR_BRIDGE+=" Ethernet Bridging for some network configurations." + use vhost-net && CONFIG_CHECK+=" ~VHOST_NET" + ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net" + ERROR_VHOST_NET+=" support" + + if use amd64 || use x86 || use amd64-linux || use x86-linux; then + if grep -q AuthenticAMD /proc/cpuinfo; then + CONFIG_CHECK+=" ~KVM_AMD" + elif grep -q GenuineIntel /proc/cpuinfo; then + CONFIG_CHECK+=" ~KVM_INTEL" + fi + fi + + use python && CONFIG_CHECK+=" ~DEBUG_FS" + ERROR_DEBUG_FS="debugFS support required for kvm_stat" + + # Now do the actual checks setup above + check_extra_config + fi + fi + + if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then + eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt" + eerror "instances are still pointing to it. Please update your" + eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag" + eerror "and the right system binary (e.g. qemu-system-x86_64)." + die "update your virt configs to not use qemu-kvm" + fi +} + +# Sanity check to make sure target lists are kept up-to-date. +check_targets() { + local var=$1 mak=$2 + local detected sorted + + pushd "${S}"/configs/targets/ >/dev/null || die + + # Force C locale until glibc is updated. #564936 + detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u)) + sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u)) + if [[ ${sorted} != "${detected}" ]] ; then + eerror "The ebuild needs to be kept in sync." + eerror "${var}: ${sorted}" + eerror "$(printf '%-*s' ${#var} configure): ${detected}" + die "sync ${var} to the list of targets" + fi + + popd >/dev/null +} + +src_prepare() { + check_targets IUSE_SOFTMMU_TARGETS softmmu + check_targets IUSE_USER_TARGETS linux-user + + default + + # Use correct toolchain to fix cross-compiling + tc-export AR AS LD NM OBJCOPY PKG_CONFIG RANLIB STRINGS + export WINDRES=${CHOST}-windres + + # Verbose builds + MAKEOPTS+=" V=1" + + # We already force -D_FORTIFY_SOURCE=2 (or 3) in our toolchain, but + # this setting (-U then -D..=2) will prevent us from trying out 3, so + # drop it. No change to level of protection b/c we patch our toolchain. + sed -i -e 's/-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2//' configure || die + + # Remove bundled modules + rm -r dtc meson roms/*/ slirp || die +} + +## +# configures qemu based on the build directory and the build type +# we are using. +# +qemu_src_configure() { + debug-print-function ${FUNCNAME} "$@" + + local buildtype=$1 + local builddir="${S}/${buildtype}-build" + + mkdir "${builddir}" || die + + local conf_opts=( + --prefix=/usr + --sysconfdir=/etc + --bindir=/usr/bin + --libdir=/usr/$(get_libdir) + --datadir=/usr/share + --docdir=/usr/share/doc/${PF}/html + --mandir=/usr/share/man + --localstatedir=/var + --disable-bsd-user + --disable-containers # bug #732972 + --disable-guest-agent + --disable-strip + --with-git-submodules=ignore + + # bug #746752: TCG interpreter has a few limitations: + # - it does not support FPU + # - it's generally slower on non-self-modifying code + # It's advantage is support for host architectures + # where native codegeneration is not implemented. + # Gentoo has qemu keyworded only on targets with + # native code generation available. Avoid the interpreter. + --disable-tcg-interpreter + + --disable-werror + # We support gnutls/nettle for crypto operations. It is possible + # to use gcrypt when gnutls/nettle are disabled (but not when they + # are enabled), but it's not really worth the hassle. Disable it + # all the time to avoid automatically detecting it. #568856 + --disable-gcrypt + --cc="$(tc-getCC)" + --cxx="$(tc-getCXX)" + --host-cc="$(tc-getBUILD_CC)" + + $(use_enable alsa) + $(use_enable debug debug-info) + $(use_enable debug debug-tcg) + $(use_enable jack) + $(use_enable nls gettext) + $(use_enable oss) + $(use_enable plugins) + $(use_enable pulseaudio pa) + $(use_enable selinux) + $(use_enable xattr attr) + ) + + # Disable options not used by user targets. This simplifies building + # static user targets (USE=static-user) considerably. + conf_notuser() { + if [[ ${buildtype} == "user" ]] ; then + echo "--disable-${2:-$1}" + else + use_enable "$@" + fi + } + # Enable option only for softmmu build, but not 'user' or 'tools' + conf_softmmu() { + if [[ ${buildtype} == "softmmu" ]] ; then + use_enable "$@" + else + echo "--disable-${2:-$1}" + fi + } + # Enable option only for tools build, but not 'user' or 'softmmu' + conf_tools() { + if [[ ${buildtype} == "tools" ]] ; then + use_enable "$@" + else + echo "--disable-${2:-$1}" + fi + } + # Special case for the malloc flag, because the --disable flag does + # not exist and trying like above will break configuring. + conf_malloc() { + if [[ ! ${buildtype} == "user" ]] ; then + usex "${1}" "--enable-malloc=${1}" "" + fi + } + conf_opts+=( + $(conf_notuser accessibility brlapi) + $(conf_notuser aio linux-aio) + $(conf_softmmu bpf) + $(conf_notuser bzip2) + $(conf_notuser capstone) + $(conf_notuser caps cap-ng) + $(conf_notuser curl) + $(conf_tools doc docs) + $(conf_notuser fdt) + $(conf_notuser fuse) + $(conf_notuser glusterfs) + $(conf_notuser gnutls) + $(conf_notuser gnutls nettle) + $(conf_notuser gtk) + $(conf_notuser infiniband rdma) + $(conf_notuser iscsi libiscsi) + $(conf_notuser io-uring linux-io-uring) + $(conf_malloc jemalloc) + $(conf_notuser jpeg vnc-jpeg) + $(conf_notuser kernel_linux kvm) + $(conf_notuser lzo) + $(conf_notuser multipath mpath) + $(conf_notuser ncurses curses) + $(conf_notuser nfs libnfs) + $(conf_notuser numa) + $(conf_notuser opengl) + $(conf_notuser pam auth-pam) + $(conf_notuser png) + $(conf_notuser rbd) + $(conf_notuser sasl vnc-sasl) + $(conf_notuser sdl) + $(conf_softmmu sdl-image) + $(conf_notuser seccomp) + $(conf_notuser slirp slirp system) + $(conf_notuser smartcard) + $(conf_notuser snappy) + $(conf_notuser spice) + $(conf_notuser ssh libssh) + $(conf_notuser udev libudev) + $(conf_notuser usb libusb) + $(conf_notuser usbredir usb-redir) + $(conf_notuser vde) + $(conf_notuser vhost-net) + $(conf_notuser virgl virglrenderer) + $(conf_softmmu virtfs) + $(conf_notuser vnc) + $(conf_notuser vte) + $(conf_notuser xen) + $(conf_notuser xen xen-pci-passthrough) + # use prebuilt keymaps, bug #759604 + --disable-xkbcommon + $(conf_notuser zstd) + ) + + if [[ ! ${buildtype} == "user" ]] ; then + # audio options + local audio_opts=( + # Note: backend order matters here: #716202 + # We iterate from higher-level to lower level. + $(usex pulseaudio pa "") + $(usev jack) + $(usev sdl) + $(usev alsa) + $(usev oss) + ) + conf_opts+=( + --audio-drv-list=$(IFS=,; echo "${audio_opts[*]}") + ) + fi + + case ${buildtype} in + user) + conf_opts+=( + --enable-linux-user + --disable-system + --disable-blobs + --disable-tools + ) + local static_flag="static-user" + ;; + softmmu) + conf_opts+=( + --disable-linux-user + --enable-system + --disable-tools + ) + local static_flag="static" + + for target in ${IUSE_SOFTMMU_TARGETS}; do + if use "qemu_softmmu_targets_${target}"; then + conf_opts+=( + # For some reason, adding this with the setting set + # to on *or* off makes the build always fail. + # --with-devices-${target}=gentoo + ) + fi + done + ;; + tools) + conf_opts+=( + --disable-linux-user + --disable-system + --disable-blobs + --enable-tools + ) + local static_flag="static" + ;; + esac + + local targets="${buildtype}_targets" + [[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" ) + + # Add support for SystemTAP + use systemtap && conf_opts+=( --enable-trace-backend=dtrace ) + + # We always want to attempt to build with PIE support as it results + # in a more secure binary. But it doesn't work with static or if + # the current GCC doesn't have PIE support. + if use ${static_flag}; then + conf_opts+=( --static --disable-pie ) + else + tc-enables-pie && conf_opts+=( --enable-pie ) + fi + + # Meson will not use a cross-file unless cross_prefix is set. + tc-is-cross-compiler && conf_opts+=( --cross-prefix="${CHOST}-" ) + + # Plumb through equivalent of EXTRA_ECONF to allow experiments + # like bug #747928. + conf_opts+=( ${EXTRA_CONF_QEMU} ) + + echo "../configure ${conf_opts[*]}" + cd "${builddir}" + ../configure "${conf_opts[@]}" || die "configure failed" +} + +src_configure() { + local target + + python_setup + + softmmu_targets= softmmu_bins=() + user_targets= user_bins=() + + for target in ${IUSE_SOFTMMU_TARGETS} ; do + if use "qemu_softmmu_targets_${target}"; then + softmmu_targets+=",${target}-softmmu" + softmmu_bins+=( "qemu-system-${target}" ) + + # Needed to rework vhost-user-fs handling thanks to https://gitlab.com/qemu-project/qemu/-/commit/5166dab + # The option was converted into being configurable by + # Kconfig's. So, to enable it, we insert the necessary + # options into each arch's softmmu target gentoo.mak file, + # then configure with --with-devices-${target}=gentoo. + if use vhost-user-fs; then + echo "CONFIG_VHOST_USER_FS=y for ${target}-softmmu" || die + echo "CONFIG_VIRTIO=y" >> "configs/devices/${target}-softmmu/gentoo.mak" || die + echo "CONFIG_VHOST_USER_FS=y" >> "configs/devices/${target}-softmmu/gentoo.mak" || die + else + echo "CONFIG_VHOST_USER_FS=n for ${target}-softmmu" || die + echo "CONFIG_VIRTIO=n" >> "configs/devices/${target}-softmmu/gentoo.mak" || die + echo "CONFIG_VHOST_USER_FS=n" >> "configs/devices/${target}-softmmu/gentoo.mak" || die + fi + fi + done + + for target in ${IUSE_USER_TARGETS} ; do + if use "qemu_user_targets_${target}"; then + user_targets+=",${target}-linux-user" + user_bins+=( "qemu-${target}" ) + fi + done + + softmmu_targets=${softmmu_targets#,} + user_targets=${user_targets#,} + + [[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu" + [[ -n ${user_targets} ]] && qemu_src_configure "user" + qemu_src_configure "tools" +} + +src_compile() { + if [[ -n ${user_targets} ]]; then + cd "${S}/user-build" || die + default + fi + + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" || die + default + fi + + cd "${S}/tools-build" || die + default +} + +src_test() { + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" || die + pax-mark m */qemu-system-* #515550 + emake check + fi +} + +qemu_python_install() { + python_domodule "${S}/python/qemu" + + python_doscript "${S}/scripts/kvm/vmxcap" + python_doscript "${S}/scripts/qmp/qmp-shell" + python_doscript "${S}/scripts/qmp/qemu-ga-client" +} + +# Generate binfmt support files. +# - /etc/init.d/qemu-binfmt script which registers the user handlers (openrc) +# - /usr/share/qemu/binfmt.d/qemu.conf (for use with systemd-binfmt) +generate_initd() { + local out="${T}/qemu-binfmt" + local out_systemd="${T}/qemu.conf" + local d="${T}/binfmt.d" + + einfo "Generating qemu binfmt scripts and configuration files" + + # Generate the debian fragments first. + mkdir -p "${d}" + "${S}"/scripts/qemu-binfmt-conf.sh \ + --debian \ + --exportdir "${d}" \ + --qemu-path "${EPREFIX}/usr/bin" \ + || die + # Then turn the fragments into a shell script we can source. + sed -E -i \ + -e 's:^([^ ]+) (.*)$:\1="\2":' \ + "${d}"/* || die + + # Generate the init.d script by assembling the fragments from above. + local f qcpu package interpreter magic mask + cat "${FILESDIR}"/qemu-binfmt.initd.head >"${out}" || die + for f in "${d}"/qemu-* ; do + source "${f}" + + # Normalize the cpu logic like we do in the init.d for the native cpu. + qcpu=${package#qemu-} + case ${qcpu} in + arm*) qcpu="arm";; + mips*) qcpu="mips";; + ppc*) qcpu="ppc";; + s390*) qcpu="s390";; + sh*) qcpu="sh";; + sparc*) qcpu="sparc";; + esac + + # we use 'printf' here to be portable across 'sh' + # implementations: #679168 + cat <>"${out}" + if [ "\${cpu}" != "${qcpu}" -a -x "${interpreter}" ] ; then + printf '%s\n' ':${package}:M::${magic}:${mask}:${interpreter}:'"\${QEMU_BINFMT_FLAGS}" >/proc/sys/fs/binfmt_misc/register + fi +EOF + + echo ":${package}:M::${magic}:${mask}:${interpreter}:OC" >>"${out_systemd}" + + done + cat "${FILESDIR}"/qemu-binfmt.initd.tail >>"${out}" || die +} + +src_install() { + if [[ -n ${user_targets} ]]; then + cd "${S}/user-build" + emake DESTDIR="${ED}" install + + # Install binfmt handler init script for user targets. + generate_initd + doinitd "${T}/qemu-binfmt" + + # Install binfmt/qemu.conf. + insinto "/usr/share/qemu/binfmt.d" + doins "${T}/qemu.conf" + fi + + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" + emake DESTDIR="${ED}" install + + # This might not exist if the test failed. #512010 + [[ -e check-report.html ]] && dodoc check-report.html + + if use kernel_linux; then + udev_newrules "${FILESDIR}"/65-kvm.rules-r2 65-kvm.rules + fi + + if use python; then + python_foreach_impl qemu_python_install + fi + fi + + cd "${S}/tools-build" || die + emake DESTDIR="${ED}" install + + # If USE=doc, there'll be newly generated docs which we install instead. + if ! use doc && [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + doman "${WORKDIR}"/${PN}-${QEMU_DOCS_VERSION}-docs/docs/*.[0-8] + fi + + # Disable mprotect on the qemu binaries as they use JITs to be fast #459348 + pushd "${ED}"/usr/bin >/dev/null || die + pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594 + popd >/dev/null || die + + # Install config file example for qemu-bridge-helper + insinto "/etc/qemu" + doins "${FILESDIR}/bridge.conf" + + cd "${S}" || die + dodoc MAINTAINERS docs/specs/pci-ids.txt + newdoc pc-bios/README README.pc-bios + + # Disallow stripping of prebuilt firmware files. + dostrip -x ${QA_PREBUILT} + + if [[ -n ${softmmu_targets} ]]; then + # Remove SeaBIOS since we're using the SeaBIOS packaged one + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin + fi + + # Remove vgabios since we're using the seavgabios packaged one + rm "${ED}/usr/share/qemu/vgabios.bin" + rm "${ED}/usr/share/qemu/vgabios-cirrus.bin" + rm "${ED}/usr/share/qemu/vgabios-qxl.bin" + rm "${ED}/usr/share/qemu/vgabios-stdvga.bin" + rm "${ED}/usr/share/qemu/vgabios-virtio.bin" + rm "${ED}/usr/share/qemu/vgabios-vmware.bin" + + # PPC/PPC64 loads vgabios-stdvga + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64; then + dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin + dosym ../seavgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin + dosym ../seavgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin + dosym ../seavgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin + dosym ../seavgabios/vgabios-virtio.bin /usr/share/qemu/vgabios-virtio.bin + dosym ../seavgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin + fi + + # Remove sgabios since we're using the sgabios packaged one + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin + fi + + # Remove iPXE since we're using the iPXE packaged one + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom + dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom + dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom + dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom + dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom + dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom + fi + fi + + DISABLE_AUTOFORMATTING=true + readme.gentoo_create_doc +} + +firmware_abi_change() { + local pv + for pv in ${REPLACING_VERSIONS}; do + if ver_test ${pv} -lt ${FIRMWARE_ABI_VERSION}; then + return 0 + fi + done + return 1 +} + +pkg_postinst() { + if [[ -n ${softmmu_targets} ]] && use kernel_linux; then + udev_reload + fi + + xdg_icon_cache_update + + [[ -z ${EPREFIX} ]] && [[ -f ${EROOT}/usr/libexec/qemu-bridge-helper ]] && \ + fcaps cap_net_admin "${EROOT}"/usr/libexec/qemu-bridge-helper + + DISABLE_AUTOFORMATTING=true + readme.gentoo_print_elog + + if use pin-upstream-blobs && firmware_abi_change; then + ewarn "This version of qemu pins new versions of firmware blobs:" + + if has_version 'sys-firmware/edk2-ovmf-bin'; then + ewarn " $(best_version sys-firmware/edk2-ovmf-bin)" + else + ewarn " $(best_version sys-firmware/edk2-ovmf)" + fi + + if has_version 'sys-firmware/seabios-bin'; then + ewarn " $(best_version sys-firmware/seabios-bin)" + else + ewarn " $(best_version sys-firmware/seabios)" + fi + + ewarn " $(best_version sys-firmware/ipxe)" + ewarn " $(best_version sys-firmware/sgabios)" + ewarn "This might break resume of hibernated guests (started with a different" + ewarn "firmware version) and live migration to/from qemu versions with different" + ewarn "firmware. Please (cold) restart all running guests. For functional" + ewarn "guest migration ensure that all" + ewarn "hosts run at least" + ewarn " app-emulation/qemu-${FIRMWARE_ABI_VERSION}." + fi +} + +pkg_info() { + echo "Using:" + echo " $(best_version app-emulation/spice-protocol)" + + if has_version 'sys-firmware/edk2-ovmf-bin'; then + echo " $(best_version sys-firmware/edk2-ovmf-bin)" + else + echo " $(best_version sys-firmware/edk2-ovmf)" + fi + + if has_version 'sys-firmware/seabios-bin'; then + echo " $(best_version sys-firmware/seabios-bin)" + else + echo " $(best_version sys-firmware/seabios)" + fi + + echo " $(best_version sys-firmware/ipxe)" + echo " $(best_version sys-firmware/sgabios)" +} + +pkg_postrm() { + xdg_icon_cache_update + udev_reload +} diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.2.0-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.2.0-r1.ebuild new file mode 100644 index 0000000000..2656a331fa --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.2.0-r1.ebuild @@ -0,0 +1,971 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-qemu-docs +# Set to 1 if prebuilt, 0 if not +# (the construct below is to allow overriding from env for script) +QEMU_DOCS_PREBUILT=${QEMU_DOCS_PREBUILT:-1} +QEMU_DOCS_PREBUILT_DEV=ajak +QEMU_DOCS_VERSION="${PV}" +# Default to generating docs (inc. man pages) if no prebuilt; overridden later +# bug #830088 +QEMU_DOC_USEFLAG="+doc" + +PYTHON_COMPAT=( python3_{9,10,11} ) +PYTHON_REQ_USE="ncurses,readline" + +FIRMWARE_ABI_VERSION="7.2.0" + +inherit linux-info toolchain-funcs python-r1 udev fcaps readme.gentoo-r1 \ + pax-utils xdg-utils + +if [[ ${PV} == *9999* ]]; then + QEMU_DOCS_PREBUILT=0 + + EGIT_REPO_URI="https://gitlab.com/qemu-project/qemu.git/" + EGIT_SUBMODULES=( + tests/fp/berkeley-softfloat-3 + tests/fp/berkeley-testfloat-3 + ui/keycodemapdb + ) + inherit git-r3 + SRC_URI="" +else + MY_P="${PN}-${PV/_rc/-rc}" + SRC_URI="https://download.qemu.org/${MY_P}.tar.xz" + + if [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + SRC_URI+=" !doc? ( https://dev.gentoo.org/~${QEMU_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${QEMU_DOCS_VERSION}-docs.tar.xz )" + fi + + S="${WORKDIR}/${MY_P}" + [[ "${PV}" != *_rc* ]] && KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" +fi + +DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" +HOMEPAGE="https://www.qemu.org https://www.linux-kvm.org" + +LICENSE="GPL-2 LGPL-2 BSD-2" +SLOT="0" + +[[ ${QEMU_DOCS_PREBUILT} == 1 ]] && QEMU_DOC_USEFLAG="doc" + +IUSE="accessibility +aio alsa bpf bzip2 capstone +curl debug ${QEMU_DOC_USEFLAG} + +fdt fuse glusterfs +gnutls gtk infiniband iscsi io-uring + jack jemalloc +jpeg + lzo multipath + ncurses nfs nls numa opengl +oss pam +pin-upstream-blobs + plugins +png pulseaudio python rbd sasl +seccomp sdl sdl-image selinux + +slirp + smartcard snappy spice ssh static static-user systemtap test udev usb + usbredir vde +vhost-net virgl virtfs +vnc vte xattr xen + zstd" + +COMMON_TARGETS=" + aarch64 + alpha + arm + cris + hppa + i386 + loongarch64 + m68k + microblaze + microblazeel + mips + mips64 + mips64el + mipsel + nios2 + or1k + ppc + ppc64 + riscv32 + riscv64 + s390x + sh4 + sh4eb + sparc + sparc64 + x86_64 + xtensa + xtensaeb +" +IUSE_SOFTMMU_TARGETS=" + ${COMMON_TARGETS} + avr + rx + tricore +" +IUSE_USER_TARGETS=" + ${COMMON_TARGETS} + aarch64_be + armeb + hexagon + mipsn32 + mipsn32el + ppc64le + sparc32plus +" + +use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS}) +use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS}) +IUSE+=" ${use_softmmu_targets} ${use_user_targets}" + +RESTRICT="!test? ( test )" + +# Allow no targets to be built so that people can get a tools-only build. +# Block USE flag configurations known to not work. +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + qemu_softmmu_targets_arm? ( fdt ) + qemu_softmmu_targets_microblaze? ( fdt ) + qemu_softmmu_targets_mips64el? ( fdt ) + qemu_softmmu_targets_ppc64? ( fdt ) + qemu_softmmu_targets_ppc? ( fdt ) + qemu_softmmu_targets_riscv32? ( fdt ) + qemu_softmmu_targets_riscv64? ( fdt ) + qemu_softmmu_targets_x86_64? ( fdt ) + sdl-image? ( sdl ) + static? ( static-user !alsa !gtk !jack !opengl !pam !pulseaudio !plugins !rbd !snappy !udev ) + static-user? ( !plugins ) + virgl? ( opengl ) + virtfs? ( xattr ) + vnc? ( gnutls ) + vte? ( gtk ) + multipath? ( udev ) + plugins? ( !static !static-user ) +" +for smname in ${IUSE_SOFTMMU_TARGETS} ; do + REQUIRED_USE+=" qemu_softmmu_targets_${smname}? ( seccomp ) " +done + +# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) +# and user/softmmu targets (qemu-*, qemu-system-*). +# +# Yep, you need both libcap and libcap-ng since virtfs only uses libcap. +# +# The attr lib isn't always linked in (although the USE flag is always +# respected). This is because qemu supports using the C library's API +# when available rather than always using the external library. +ALL_DEPEND=" + dev-libs/glib:2[static-libs(+)] + sys-libs/zlib[static-libs(+)] + python? ( ${PYTHON_DEPS} ) + systemtap? ( dev-util/systemtap ) + xattr? ( sys-apps/attr[static-libs(+)] )" + +# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) +# softmmu targets (qemu-system-*). +SOFTMMU_TOOLS_DEPEND=" + sys-libs/libcap-ng[static-libs(+)] + >=x11-libs/pixman-0.28.0[static-libs(+)] + accessibility? ( + app-accessibility/brltty[api] + app-accessibility/brltty[static-libs(+)] + ) + aio? ( dev-libs/libaio[static-libs(+)] ) + alsa? ( >=media-libs/alsa-lib-1.0.13 ) + bpf? ( dev-libs/libbpf:= ) + bzip2? ( app-arch/bzip2[static-libs(+)] ) + capstone? ( dev-libs/capstone:= ) + curl? ( >=net-misc/curl-7.15.4[static-libs(+)] ) + fdt? ( >=sys-apps/dtc-1.5.1[static-libs(+)] ) + fuse? ( >=sys-fs/fuse-3.1:3[static-libs(+)] ) + glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] ) + gnutls? ( + >=net-libs/gnutls-3.0:=[static-libs(+)] + dev-libs/nettle:=[static-libs(+)] + ) + gtk? ( + x11-libs/cairo + x11-libs/gdk-pixbuf:2 + x11-libs/gtk+:3 + x11-libs/libX11 + vte? ( x11-libs/vte:2.91 ) + ) + infiniband? ( sys-cluster/rdma-core[static-libs(+)] ) + iscsi? ( net-libs/libiscsi ) + io-uring? ( sys-libs/liburing:=[static-libs(+)] ) + jack? ( virtual/jack ) + jemalloc? ( dev-libs/jemalloc ) + jpeg? ( media-libs/libjpeg-turbo:=[static-libs(+)] ) + lzo? ( dev-libs/lzo:2[static-libs(+)] ) + multipath? ( sys-fs/multipath-tools ) + ncurses? ( + sys-libs/ncurses:=[unicode(+)] + sys-libs/ncurses:=[static-libs(+)] + ) + nfs? ( >=net-fs/libnfs-1.9.3:=[static-libs(+)] ) + numa? ( sys-process/numactl[static-libs(+)] ) + opengl? ( + virtual/opengl + media-libs/libepoxy[static-libs(+)] + media-libs/mesa[static-libs(+)] + media-libs/mesa[egl(+),gbm(+)] + ) + pam? ( sys-libs/pam ) + png? ( media-libs/libpng:0=[static-libs(+)] ) + pulseaudio? ( media-libs/libpulse ) + rbd? ( sys-cluster/ceph ) + sasl? ( dev-libs/cyrus-sasl[static-libs(+)] ) + sdl? ( + media-libs/libsdl2[video] + media-libs/libsdl2[static-libs(+)] + ) + sdl-image? ( media-libs/sdl2-image[static-libs(+)] ) + seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] ) + slirp? ( net-libs/libslirp[static-libs(+)] ) + smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] ) + snappy? ( app-arch/snappy:= ) + spice? ( + >=app-emulation/spice-protocol-0.12.3 + >=app-emulation/spice-0.12.0[static-libs(+)] + ) + ssh? ( >=net-libs/libssh-0.8.6[static-libs(+)] ) + udev? ( virtual/libudev:= ) + usb? ( >=virtual/libusb-1-r2:1[static-libs(+)] ) + usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] ) + vde? ( net-misc/vde[static-libs(+)] ) + virgl? ( media-libs/virglrenderer[static-libs(+)] ) + virtfs? ( sys-libs/libcap ) + xen? ( app-emulation/xen-tools:= ) + zstd? ( >=app-arch/zstd-1.4.0[static-libs(+)] ) +" + +EDK2_OVMF_VERSION="202202" +SEABIOS_VERSION="1.16.0" + +X86_FIRMWARE_DEPEND=" + pin-upstream-blobs? ( + ~sys-firmware/edk2-ovmf-bin-${EDK2_OVMF_VERSION} + ~sys-firmware/ipxe-1.21.1[binary,qemu] + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} + ~sys-firmware/sgabios-0.1_pre10[binary] + ) + !pin-upstream-blobs? ( + || ( + >=sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION} + >=sys-firmware/edk2-ovmf-bin-${EDK2_OVMF_VERSION} + ) + sys-firmware/ipxe[qemu] + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) + sys-firmware/sgabios + )" +PPC_FIRMWARE_DEPEND=" + pin-upstream-blobs? ( + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) + !pin-upstream-blobs? ( + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) + ) +" + +BDEPEND=" + $(python_gen_impl_dep) + dev-lang/perl + dev-util/meson + sys-apps/texinfo + virtual/pkgconfig + doc? ( + dev-python/sphinx[${PYTHON_USEDEP}] + dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}] + ) + gtk? ( nls? ( sys-devel/gettext ) ) + test? ( + dev-libs/glib[utils] + sys-devel/bc + ) +" +CDEPEND=" + !static? ( + ${ALL_DEPEND//\[static-libs(+)]} + ${SOFTMMU_TOOLS_DEPEND//\[static-libs(+)]} + ) + qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_ppc? ( ${PPC_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_ppc64? ( ${PPC_FIRMWARE_DEPEND} ) +" +DEPEND="${CDEPEND} + kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 ) + static? ( + ${ALL_DEPEND} + ${SOFTMMU_TOOLS_DEPEND} + ) + static-user? ( ${ALL_DEPEND} )" +RDEPEND="${CDEPEND} + acct-group/kvm + selinux? ( + sec-policy/selinux-qemu + sys-libs/libselinux + )" + +PATCHES=( + "${FILESDIR}"/${PN}-5.2.0-disable-keymap.patch + "${FILESDIR}"/${PN}-6.0.0-make.patch + "${FILESDIR}"/${PN}-7.1.0-also-build-virtfs-proxy-helper.patch + "${FILESDIR}"/${PN}-7.1.0-capstone-include-path.patch + "${FILESDIR}"/${PN}-7.2.0-disable-gmp.patch +) + +QA_PREBUILT=" + usr/share/qemu/hppa-firmware.img + usr/share/qemu/openbios-ppc + usr/share/qemu/openbios-sparc64 + usr/share/qemu/openbios-sparc32 + usr/share/qemu/opensbi-riscv64-generic-fw_dynamic.elf + usr/share/qemu/opensbi-riscv32-generic-fw_dynamic.elf + usr/share/qemu/palcode-clipper + usr/share/qemu/s390-ccw.img + usr/share/qemu/s390-netboot.img + usr/share/qemu/u-boot.e500 +" + +QA_WX_LOAD="usr/bin/qemu-i386 + usr/bin/qemu-x86_64 + usr/bin/qemu-alpha + usr/bin/qemu-arm + usr/bin/qemu-cris + usr/bin/qemu-m68k + usr/bin/qemu-microblaze + usr/bin/qemu-microblazeel + usr/bin/qemu-mips + usr/bin/qemu-mipsel + usr/bin/qemu-or1k + usr/bin/qemu-ppc + usr/bin/qemu-ppc64 + usr/bin/qemu-sh4 + usr/bin/qemu-sh4eb + usr/bin/qemu-sparc + usr/bin/qemu-sparc64 + usr/bin/qemu-armeb + usr/bin/qemu-sparc32plus + usr/bin/qemu-s390x + usr/bin/qemu-unicore32 +" + +DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure you have the +kernel module loaded before running kvm. The easiest way to ensure that the +kernel module is loaded is to load it on boot. + For AMD CPUs the module is called 'kvm-amd'. + For Intel CPUs the module is called 'kvm-intel'. +Please review /etc/conf.d/modules for how to load these. + +Make sure your user is in the 'kvm' group. Just run + $ gpasswd -a kvm +then have re-login. + +For brand new installs, the default permissions on /dev/kvm might not let +you access it. You can tell udev to reset ownership/perms: + $ udevadm trigger -c add /dev/kvm + +If you want to register binfmt handlers for qemu user targets: +For openrc: + # rc-update add qemu-binfmt +For systemd: + # ln -s /usr/share/qemu/binfmt.d/qemu.conf /etc/binfmt.d/qemu.conf" + +pkg_pretend() { + if use kernel_linux && kernel_is lt 2 6 25; then + eerror "This version of KVM requires a host kernel of 2.6.25 or higher." + elif use kernel_linux; then + if ! linux_config_exists; then + eerror "Unable to check your kernel for KVM support" + else + CONFIG_CHECK="~KVM ~TUN ~BRIDGE" + ERROR_KVM="You must enable KVM in your kernel to continue" + ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in" + ERROR_KVM_AMD+=" your kernel configuration." + ERROR_KVM_INTEL="If you have an Intel CPU, you must enable" + ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration." + ERROR_TUN="You will need the Universal TUN/TAP driver compiled" + ERROR_TUN+=" into your kernel or loaded as a module to use the" + ERROR_TUN+=" virtual network device if using -net tap." + ERROR_BRIDGE="You will also need support for 802.1d" + ERROR_BRIDGE+=" Ethernet Bridging for some network configurations." + use vhost-net && CONFIG_CHECK+=" ~VHOST_NET" + ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net" + ERROR_VHOST_NET+=" support" + + if use amd64 || use x86 || use amd64-linux || use x86-linux; then + if grep -q AuthenticAMD /proc/cpuinfo; then + CONFIG_CHECK+=" ~KVM_AMD" + elif grep -q GenuineIntel /proc/cpuinfo; then + CONFIG_CHECK+=" ~KVM_INTEL" + fi + fi + + use python && CONFIG_CHECK+=" ~DEBUG_FS" + ERROR_DEBUG_FS="debugFS support required for kvm_stat" + + # Now do the actual checks setup above + check_extra_config + fi + fi + + if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then + eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt" + eerror "instances are still pointing to it. Please update your" + eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag" + eerror "and the right system binary (e.g. qemu-system-x86_64)." + die "update your virt configs to not use qemu-kvm" + fi +} + +# Sanity check to make sure target lists are kept up-to-date. +check_targets() { + local var=$1 mak=$2 + local detected sorted + + pushd "${S}"/configs/targets/ >/dev/null || die + + # Force C locale until glibc is updated. #564936 + detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u)) + sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u)) + if [[ ${sorted} != "${detected}" ]] ; then + eerror "The ebuild needs to be kept in sync." + eerror "${var}: ${sorted}" + eerror "$(printf '%-*s' ${#var} configure): ${detected}" + die "sync ${var} to the list of targets" + fi + + popd >/dev/null +} + +src_prepare() { + check_targets IUSE_SOFTMMU_TARGETS softmmu + check_targets IUSE_USER_TARGETS linux-user + + default + + # Use correct toolchain to fix cross-compiling + tc-export AR AS LD NM OBJCOPY PKG_CONFIG RANLIB STRINGS + export WINDRES=${CHOST}-windres + + # Verbose builds + MAKEOPTS+=" V=1" + + # We already force -D_FORTIFY_SOURCE=2 (or 3) in our toolchain, but + # this setting (-U then -D..=2) will prevent us from trying out 3, so + # drop it. No change to level of protection b/c we patch our toolchain. + sed -i -e 's/-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2//' configure || die + + # Remove bundled modules + rm -r dtc meson roms/*/ || die +} + +## +# configures qemu based on the build directory and the build type +# we are using. +# +qemu_src_configure() { + debug-print-function ${FUNCNAME} "$@" + + local buildtype=$1 + local builddir="${S}/${buildtype}-build" + + mkdir "${builddir}" || die + + local conf_opts=( + --prefix=/usr + --sysconfdir=/etc + --bindir=/usr/bin + --libdir=/usr/$(get_libdir) + --datadir=/usr/share + --docdir=/usr/share/doc/${PF}/html + --mandir=/usr/share/man + --localstatedir=/var + --disable-bsd-user + --disable-containers # bug #732972 + --disable-guest-agent + --disable-strip + --with-git-submodules=ignore + + # bug #746752: TCG interpreter has a few limitations: + # - it does not support FPU + # - it's generally slower on non-self-modifying code + # It's advantage is support for host architectures + # where native codegeneration is not implemented. + # Gentoo has qemu keyworded only on targets with + # native code generation available. Avoid the interpreter. + --disable-tcg-interpreter + + --disable-werror + # We support gnutls/nettle for crypto operations. It is possible + # to use gcrypt when gnutls/nettle are disabled (but not when they + # are enabled), but it's not really worth the hassle. Disable it + # all the time to avoid automatically detecting it. #568856 + --disable-gcrypt + --cc="$(tc-getCC)" + --cxx="$(tc-getCXX)" + --host-cc="$(tc-getBUILD_CC)" + + $(use_enable alsa) + $(use_enable debug debug-info) + $(use_enable debug debug-tcg) + $(use_enable jack) + $(use_enable nls gettext) + $(use_enable oss) + $(use_enable plugins) + $(use_enable pulseaudio pa) + $(use_enable selinux) + $(use_enable xattr attr) + ) + + # Disable options not used by user targets. This simplifies building + # static user targets (USE=static-user) considerably. + conf_notuser() { + if [[ ${buildtype} == "user" ]] ; then + echo "--disable-${2:-$1}" + else + use_enable "$@" + fi + } + # Enable option only for softmmu build, but not 'user' or 'tools' + conf_softmmu() { + if [[ ${buildtype} == "softmmu" ]] ; then + use_enable "$@" + else + echo "--disable-${2:-$1}" + fi + } + # Enable option only for tools build, but not 'user' or 'softmmu' + conf_tools() { + if [[ ${buildtype} == "tools" ]] ; then + use_enable "$@" + else + echo "--disable-${2:-$1}" + fi + } + # Special case for the malloc flag, because the --disable flag does + # not exist and trying like above will break configuring. + conf_malloc() { + if [[ ! ${buildtype} == "user" ]] ; then + usex "${1}" "--enable-malloc=${1}" "" + fi + } + conf_opts+=( + $(conf_notuser accessibility brlapi) + $(conf_notuser aio linux-aio) + $(conf_softmmu bpf) + $(conf_notuser bzip2) + $(conf_notuser capstone) + $(conf_notuser curl) + $(conf_tools doc docs) + $(conf_notuser fdt) + $(conf_notuser fuse) + $(conf_notuser glusterfs) + $(conf_notuser gnutls) + $(conf_notuser gnutls nettle) + $(conf_notuser gtk) + $(conf_notuser infiniband rdma) + $(conf_notuser iscsi libiscsi) + $(conf_notuser io-uring linux-io-uring) + $(conf_malloc jemalloc) + $(conf_notuser jpeg vnc-jpeg) + $(conf_notuser kernel_linux kvm) + $(conf_notuser lzo) + $(conf_notuser multipath mpath) + $(conf_notuser ncurses curses) + $(conf_notuser nfs libnfs) + $(conf_notuser numa) + $(conf_notuser opengl) + $(conf_notuser pam auth-pam) + $(conf_notuser png) + $(conf_notuser rbd) + $(conf_notuser sasl vnc-sasl) + $(conf_notuser sdl) + $(conf_softmmu sdl-image) + $(conf_notuser seccomp) + $(conf_notuser slirp) + $(conf_notuser smartcard) + $(conf_notuser snappy) + $(conf_notuser spice) + $(conf_notuser ssh libssh) + $(conf_notuser udev libudev) + $(conf_notuser usb libusb) + $(conf_notuser usbredir usb-redir) + $(conf_notuser vde) + $(conf_notuser vhost-net) + $(conf_notuser virgl virglrenderer) + $(conf_softmmu virtfs) + $(conf_notuser vnc) + $(conf_notuser vte) + $(conf_notuser xen) + $(conf_notuser xen xen-pci-passthrough) + # use prebuilt keymaps, bug #759604 + --disable-xkbcommon + $(conf_notuser zstd) + ) + + if [[ ! ${buildtype} == "user" ]] ; then + # audio options + local audio_opts=( + # Note: backend order matters here: #716202 + # We iterate from higher-level to lower level. + $(usex pulseaudio pa "") + $(usev jack) + $(usev sdl) + $(usev alsa) + $(usev oss) + ) + conf_opts+=( + --audio-drv-list=$(IFS=,; echo "${audio_opts[*]}") + ) + fi + + case ${buildtype} in + user) + conf_opts+=( + --enable-linux-user + --disable-system + --disable-blobs + --disable-tools + --disable-cap-ng + --disable-seccomp + ) + local static_flag="static-user" + ;; + softmmu) + conf_opts+=( + --disable-linux-user + --enable-system + --disable-tools + --enable-cap-ng + --enable-seccomp + ) + local static_flag="static" + ;; + tools) + conf_opts+=( + --disable-linux-user + --disable-system + --disable-blobs + --enable-tools + --enable-cap-ng + ) + local static_flag="static" + ;; + esac + + local targets="${buildtype}_targets" + [[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" ) + + # Add support for SystemTAP + use systemtap && conf_opts+=( --enable-trace-backend=dtrace ) + + # We always want to attempt to build with PIE support as it results + # in a more secure binary. But it doesn't work with static or if + # the current GCC doesn't have PIE support. + if use ${static_flag}; then + conf_opts+=( --static --disable-pie ) + else + tc-enables-pie && conf_opts+=( --enable-pie ) + fi + + # Meson will not use a cross-file unless cross_prefix is set. + tc-is-cross-compiler && conf_opts+=( --cross-prefix="${CHOST}-" ) + + # Plumb through equivalent of EXTRA_ECONF to allow experiments + # like bug #747928. + conf_opts+=( ${EXTRA_CONF_QEMU} ) + + echo "../configure ${conf_opts[*]}" + cd "${builddir}" + ../configure "${conf_opts[@]}" || die "configure failed" +} + +src_configure() { + local target + + python_setup + + softmmu_targets= softmmu_bins=() + user_targets= user_bins=() + + for target in ${IUSE_SOFTMMU_TARGETS} ; do + if use "qemu_softmmu_targets_${target}"; then + softmmu_targets+=",${target}-softmmu" + softmmu_bins+=( "qemu-system-${target}" ) + fi + done + + for target in ${IUSE_USER_TARGETS} ; do + if use "qemu_user_targets_${target}"; then + user_targets+=",${target}-linux-user" + user_bins+=( "qemu-${target}" ) + fi + done + + softmmu_targets=${softmmu_targets#,} + user_targets=${user_targets#,} + + [[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu" + [[ -n ${user_targets} ]] && qemu_src_configure "user" + qemu_src_configure "tools" +} + +src_compile() { + if [[ -n ${user_targets} ]]; then + cd "${S}/user-build" || die + default + fi + + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" || die + default + fi + + cd "${S}/tools-build" || die + default +} + +src_test() { + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" || die + pax-mark m */qemu-system-* #515550 + emake check + fi +} + +qemu_python_install() { + python_domodule "${S}/python/qemu" + + python_doscript "${S}/scripts/kvm/vmxcap" + python_doscript "${S}/scripts/qmp/qmp-shell" + python_doscript "${S}/scripts/qmp/qemu-ga-client" +} + +# Generate binfmt support files. +# - /etc/init.d/qemu-binfmt script which registers the user handlers (openrc) +# - /usr/share/qemu/binfmt.d/qemu.conf (for use with systemd-binfmt) +generate_initd() { + local out="${T}/qemu-binfmt" + local out_systemd="${T}/qemu.conf" + local d="${T}/binfmt.d" + + einfo "Generating qemu binfmt scripts and configuration files" + + # Generate the debian fragments first. + mkdir -p "${d}" + "${S}"/scripts/qemu-binfmt-conf.sh \ + --debian \ + --exportdir "${d}" \ + --qemu-path "${EPREFIX}/usr/bin" \ + || die + # Then turn the fragments into a shell script we can source. + sed -E -i \ + -e 's:^([^ ]+) (.*)$:\1="\2":' \ + "${d}"/* || die + + # Generate the init.d script by assembling the fragments from above. + local f qcpu package interpreter magic mask + cat "${FILESDIR}"/qemu-binfmt.initd.head >"${out}" || die + for f in "${d}"/qemu-* ; do + source "${f}" + + # Normalize the cpu logic like we do in the init.d for the native cpu. + qcpu=${package#qemu-} + case ${qcpu} in + arm*) qcpu="arm";; + mips*) qcpu="mips";; + ppc*) qcpu="ppc";; + s390*) qcpu="s390";; + sh*) qcpu="sh";; + sparc*) qcpu="sparc";; + esac + + # we use 'printf' here to be portable across 'sh' + # implementations: #679168 + cat <>"${out}" + if [ "\${cpu}" != "${qcpu}" -a -x "${interpreter}" ] ; then + printf '%s\n' ':${package}:M::${magic}:${mask}:${interpreter}:'"\${QEMU_BINFMT_FLAGS}" >/proc/sys/fs/binfmt_misc/register + fi +EOF + + echo ":${package}:M::${magic}:${mask}:${interpreter}:OC" >>"${out_systemd}" + + done + cat "${FILESDIR}"/qemu-binfmt.initd.tail >>"${out}" || die +} + +src_install() { + if [[ -n ${user_targets} ]]; then + cd "${S}/user-build" + emake DESTDIR="${ED}" install + + # Install binfmt handler init script for user targets. + generate_initd + doinitd "${T}/qemu-binfmt" + + # Install binfmt/qemu.conf. + insinto "/usr/share/qemu/binfmt.d" + doins "${T}/qemu.conf" + fi + + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" + emake DESTDIR="${ED}" install + + # This might not exist if the test failed. #512010 + [[ -e check-report.html ]] && dodoc check-report.html + + if use kernel_linux; then + udev_newrules "${FILESDIR}"/65-kvm.rules-r2 65-kvm.rules + fi + + if use python; then + python_foreach_impl qemu_python_install + fi + fi + + cd "${S}/tools-build" || die + emake DESTDIR="${ED}" install + + # If USE=doc, there'll be newly generated docs which we install instead. + if ! use doc && [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + doman "${WORKDIR}"/${PN}-${QEMU_DOCS_VERSION}-docs/docs/*.[0-8] + fi + + # Disable mprotect on the qemu binaries as they use JITs to be fast #459348 + pushd "${ED}"/usr/bin >/dev/null || die + pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594 + popd >/dev/null || die + + # Install config file example for qemu-bridge-helper + insinto "/etc/qemu" + doins "${FILESDIR}/bridge.conf" + + cd "${S}" || die + dodoc MAINTAINERS docs/specs/pci-ids.txt + newdoc pc-bios/README README.pc-bios + + # Disallow stripping of prebuilt firmware files. + dostrip -x ${QA_PREBUILT} + + if [[ -n ${softmmu_targets} ]]; then + # Remove SeaBIOS since we're using the SeaBIOS packaged one + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin + fi + + # Remove vgabios since we're using the seavgabios packaged one + rm "${ED}/usr/share/qemu/vgabios.bin" + rm "${ED}/usr/share/qemu/vgabios-cirrus.bin" + rm "${ED}/usr/share/qemu/vgabios-qxl.bin" + rm "${ED}/usr/share/qemu/vgabios-stdvga.bin" + rm "${ED}/usr/share/qemu/vgabios-virtio.bin" + rm "${ED}/usr/share/qemu/vgabios-vmware.bin" + + # PPC/PPC64 loads vgabios-stdvga + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64; then + dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin + dosym ../seavgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin + dosym ../seavgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin + dosym ../seavgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin + dosym ../seavgabios/vgabios-virtio.bin /usr/share/qemu/vgabios-virtio.bin + dosym ../seavgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin + fi + + # Remove sgabios since we're using the sgabios packaged one + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin + fi + + # Remove iPXE since we're using the iPXE packaged one + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom + dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom + dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom + dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom + dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom + dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom + fi + fi + + DISABLE_AUTOFORMATTING=true + readme.gentoo_create_doc +} + +firmware_abi_change() { + local pv + for pv in ${REPLACING_VERSIONS}; do + if ver_test ${pv} -lt ${FIRMWARE_ABI_VERSION}; then + return 0 + fi + done + return 1 +} + +pkg_postinst() { + if [[ -n ${softmmu_targets} ]] && use kernel_linux; then + udev_reload + fi + + xdg_icon_cache_update + + [[ -z ${EPREFIX} ]] && [[ -f ${EROOT}/usr/libexec/qemu-bridge-helper ]] && \ + fcaps cap_net_admin "${EROOT}"/usr/libexec/qemu-bridge-helper + + DISABLE_AUTOFORMATTING=true + readme.gentoo_print_elog + + if use pin-upstream-blobs && firmware_abi_change; then + ewarn "This version of qemu pins new versions of firmware blobs:" + + if has_version 'sys-firmware/edk2-ovmf-bin'; then + ewarn " $(best_version sys-firmware/edk2-ovmf-bin)" + else + ewarn " $(best_version sys-firmware/edk2-ovmf)" + fi + + if has_version 'sys-firmware/seabios-bin'; then + ewarn " $(best_version sys-firmware/seabios-bin)" + else + ewarn " $(best_version sys-firmware/seabios)" + fi + + ewarn " $(best_version sys-firmware/ipxe)" + ewarn " $(best_version sys-firmware/sgabios)" + ewarn "This might break resume of hibernated guests (started with a different" + ewarn "firmware version) and live migration to/from qemu versions with different" + ewarn "firmware. Please (cold) restart all running guests. For functional" + ewarn "guest migration ensure that all" + ewarn "hosts run at least" + ewarn " app-emulation/qemu-${FIRMWARE_ABI_VERSION}." + fi +} + +pkg_info() { + echo "Using:" + echo " $(best_version app-emulation/spice-protocol)" + + if has_version 'sys-firmware/edk2-ovmf-bin'; then + echo " $(best_version sys-firmware/edk2-ovmf-bin)" + else + echo " $(best_version sys-firmware/edk2-ovmf)" + fi + + if has_version 'sys-firmware/seabios-bin'; then + echo " $(best_version sys-firmware/seabios-bin)" + else + echo " $(best_version sys-firmware/seabios)" + fi + + echo " $(best_version sys-firmware/ipxe)" + echo " $(best_version sys-firmware/sgabios)" +} + +pkg_postrm() { + xdg_icon_cache_update + udev_reload +} diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.2.0.ebuild b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.2.0.ebuild new file mode 100644 index 0000000000..ee76679ed3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-7.2.0.ebuild @@ -0,0 +1,963 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-qemu-docs +# Set to 1 if prebuilt, 0 if not +# (the construct below is to allow overriding from env for script) +QEMU_DOCS_PREBUILT=${QEMU_DOCS_PREBUILT:-1} +QEMU_DOCS_PREBUILT_DEV=ajak +QEMU_DOCS_VERSION="${PV}" +# Default to generating docs (inc. man pages) if no prebuilt; overridden later +# bug #830088 +QEMU_DOC_USEFLAG="+doc" + +PYTHON_COMPAT=( python3_{9,10,11} ) +PYTHON_REQ_USE="ncurses,readline" + +FIRMWARE_ABI_VERSION="7.2.0" + +inherit linux-info toolchain-funcs python-r1 udev fcaps readme.gentoo-r1 \ + pax-utils xdg-utils + +if [[ ${PV} == *9999* ]]; then + QEMU_DOCS_PREBUILT=0 + + EGIT_REPO_URI="https://gitlab.com/qemu-project/qemu.git/" + EGIT_SUBMODULES=( + tests/fp/berkeley-softfloat-3 + tests/fp/berkeley-testfloat-3 + ui/keycodemapdb + ) + inherit git-r3 + SRC_URI="" +else + MY_P="${PN}-${PV/_rc/-rc}" + SRC_URI="https://download.qemu.org/${MY_P}.tar.xz" + + if [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + SRC_URI+=" !doc? ( https://dev.gentoo.org/~${QEMU_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${QEMU_DOCS_VERSION}-docs.tar.xz )" + fi + + S="${WORKDIR}/${MY_P}" + [[ "${PV}" != *_rc* ]] && KEYWORDS="amd64 ~arm ~arm64 ~loong ~ppc ppc64 ~riscv x86" +fi + +DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" +HOMEPAGE="https://www.qemu.org https://www.linux-kvm.org" + +LICENSE="GPL-2 LGPL-2 BSD-2" +SLOT="0" + +[[ ${QEMU_DOCS_PREBUILT} == 1 ]] && QEMU_DOC_USEFLAG="doc" + +IUSE="accessibility +aio alsa bpf bzip2 capstone +curl debug ${QEMU_DOC_USEFLAG} + +fdt fuse glusterfs +gnutls gtk infiniband iscsi io-uring + jack jemalloc +jpeg + lzo multipath + ncurses nfs nls numa opengl +oss pam +pin-upstream-blobs + plugins +png pulseaudio python rbd sasl sdl sdl-image selinux + +slirp + smartcard snappy spice ssh static static-user systemtap test udev usb + usbredir vde +vhost-net virgl virtfs +vnc vte xattr xen + zstd" + +COMMON_TARGETS=" + aarch64 + alpha + arm + cris + hppa + i386 + loongarch64 + m68k + microblaze + microblazeel + mips + mips64 + mips64el + mipsel + nios2 + or1k + ppc + ppc64 + riscv32 + riscv64 + s390x + sh4 + sh4eb + sparc + sparc64 + x86_64 + xtensa + xtensaeb +" +IUSE_SOFTMMU_TARGETS=" + ${COMMON_TARGETS} + avr + rx + tricore +" +IUSE_USER_TARGETS=" + ${COMMON_TARGETS} + aarch64_be + armeb + hexagon + mipsn32 + mipsn32el + ppc64le + sparc32plus +" + +use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS}) +use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS}) +IUSE+=" ${use_softmmu_targets} ${use_user_targets}" + +RESTRICT="!test? ( test )" +# Allow no targets to be built so that people can get a tools-only build. +# Block USE flag configurations known to not work. +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + qemu_softmmu_targets_arm? ( fdt ) + qemu_softmmu_targets_microblaze? ( fdt ) + qemu_softmmu_targets_mips64el? ( fdt ) + qemu_softmmu_targets_ppc64? ( fdt ) + qemu_softmmu_targets_ppc? ( fdt ) + qemu_softmmu_targets_riscv32? ( fdt ) + qemu_softmmu_targets_riscv64? ( fdt ) + qemu_softmmu_targets_x86_64? ( fdt ) + sdl-image? ( sdl ) + static? ( static-user !alsa !gtk !jack !opengl !pam !pulseaudio !plugins !rbd !snappy !udev ) + static-user? ( !plugins ) + virgl? ( opengl ) + virtfs? ( xattr ) + vnc? ( gnutls ) + vte? ( gtk ) + multipath? ( udev ) + plugins? ( !static !static-user ) +" + +# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) +# and user/softmmu targets (qemu-*, qemu-system-*). +# +# Yep, you need both libcap and libcap-ng since virtfs only uses libcap. +# +# The attr lib isn't always linked in (although the USE flag is always +# respected). This is because qemu supports using the C library's API +# when available rather than always using the external library. +ALL_DEPEND=" + >=dev-libs/glib-2.0[static-libs(+)] + sys-libs/zlib[static-libs(+)] + python? ( ${PYTHON_DEPS} ) + systemtap? ( dev-util/systemtap ) + xattr? ( sys-apps/attr[static-libs(+)] )" + +# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) +# softmmu targets (qemu-system-*). +SOFTMMU_TOOLS_DEPEND=" + sys-libs/libcap-ng[static-libs(+)] + >=sys-libs/libseccomp-2.1.0[static-libs(+)] + >=x11-libs/pixman-0.28.0[static-libs(+)] + accessibility? ( + app-accessibility/brltty[api] + app-accessibility/brltty[static-libs(+)] + ) + aio? ( dev-libs/libaio[static-libs(+)] ) + alsa? ( >=media-libs/alsa-lib-1.0.13 ) + bpf? ( dev-libs/libbpf:= ) + bzip2? ( app-arch/bzip2[static-libs(+)] ) + capstone? ( dev-libs/capstone:= ) + curl? ( >=net-misc/curl-7.15.4[static-libs(+)] ) + fdt? ( >=sys-apps/dtc-1.5.1[static-libs(+)] ) + fuse? ( >=sys-fs/fuse-3.1:3[static-libs(+)] ) + glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] ) + gnutls? ( + dev-libs/nettle:=[static-libs(+)] + >=net-libs/gnutls-3.0:=[static-libs(+)] + ) + gtk? ( + x11-libs/gtk+:3 + vte? ( x11-libs/vte:2.91 ) + ) + infiniband? ( sys-cluster/rdma-core[static-libs(+)] ) + iscsi? ( net-libs/libiscsi ) + io-uring? ( sys-libs/liburing:=[static-libs(+)] ) + jack? ( virtual/jack ) + jemalloc? ( dev-libs/jemalloc ) + jpeg? ( media-libs/libjpeg-turbo:=[static-libs(+)] ) + lzo? ( dev-libs/lzo:2[static-libs(+)] ) + multipath? ( sys-fs/multipath-tools ) + ncurses? ( + sys-libs/ncurses:=[unicode(+)] + sys-libs/ncurses:=[static-libs(+)] + ) + nfs? ( >=net-fs/libnfs-1.9.3:=[static-libs(+)] ) + numa? ( sys-process/numactl[static-libs(+)] ) + opengl? ( + virtual/opengl + media-libs/libepoxy[static-libs(+)] + media-libs/mesa[static-libs(+)] + media-libs/mesa[egl(+),gbm(+)] + ) + pam? ( sys-libs/pam ) + png? ( media-libs/libpng:0=[static-libs(+)] ) + pulseaudio? ( media-sound/pulseaudio ) + rbd? ( sys-cluster/ceph ) + sasl? ( dev-libs/cyrus-sasl[static-libs(+)] ) + sdl? ( + media-libs/libsdl2[video] + media-libs/libsdl2[static-libs(+)] + ) + sdl-image? ( media-libs/sdl2-image[static-libs(+)] ) + slirp? ( net-libs/libslirp[static-libs(+)] ) + smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] ) + snappy? ( app-arch/snappy:= ) + spice? ( + >=app-emulation/spice-protocol-0.12.3 + >=app-emulation/spice-0.12.0[static-libs(+)] + ) + ssh? ( >=net-libs/libssh-0.8.6[static-libs(+)] ) + udev? ( virtual/libudev:= ) + usb? ( >=virtual/libusb-1-r2[static-libs(+)] ) + usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] ) + vde? ( net-misc/vde[static-libs(+)] ) + virgl? ( media-libs/virglrenderer[static-libs(+)] ) + virtfs? ( sys-libs/libcap ) + xen? ( app-emulation/xen-tools:= ) + zstd? ( >=app-arch/zstd-1.4.0[static-libs(+)] ) +" + +EDK2_OVMF_VERSION="202202" +SEABIOS_VERSION="1.16.0" + +X86_FIRMWARE_DEPEND=" + pin-upstream-blobs? ( + ~sys-firmware/edk2-ovmf-bin-${EDK2_OVMF_VERSION} + ~sys-firmware/ipxe-1.21.1[binary,qemu] + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} + ~sys-firmware/sgabios-0.1_pre10[binary] + ) + !pin-upstream-blobs? ( + || ( + >=sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION} + >=sys-firmware/edk2-ovmf-bin-${EDK2_OVMF_VERSION} + ) + sys-firmware/ipxe[qemu] + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) + sys-firmware/sgabios + )" +PPC_FIRMWARE_DEPEND=" + pin-upstream-blobs? ( + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) + !pin-upstream-blobs? ( + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) + ) +" + +BDEPEND=" + $(python_gen_impl_dep) + dev-lang/perl + dev-util/meson + sys-apps/texinfo + virtual/pkgconfig + doc? ( + dev-python/sphinx[${PYTHON_USEDEP}] + dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}] + ) + gtk? ( nls? ( sys-devel/gettext ) ) + test? ( + dev-libs/glib[utils] + sys-devel/bc + ) +" +CDEPEND=" + !static? ( + ${ALL_DEPEND//\[static-libs(+)]} + ${SOFTMMU_TOOLS_DEPEND//\[static-libs(+)]} + ) + qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_ppc? ( ${PPC_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_ppc64? ( ${PPC_FIRMWARE_DEPEND} ) +" +DEPEND="${CDEPEND} + kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 ) + static? ( + ${ALL_DEPEND} + ${SOFTMMU_TOOLS_DEPEND} + ) + static-user? ( ${ALL_DEPEND} )" +RDEPEND="${CDEPEND} + acct-group/kvm + selinux? ( + sec-policy/selinux-qemu + sys-libs/libselinux + )" + +PATCHES=( + "${FILESDIR}"/${PN}-5.2.0-disable-keymap.patch + "${FILESDIR}"/${PN}-6.0.0-make.patch + "${FILESDIR}"/${PN}-7.1.0-also-build-virtfs-proxy-helper.patch + "${FILESDIR}"/${PN}-7.1.0-capstone-include-path.patch +) + +QA_PREBUILT=" + usr/share/qemu/hppa-firmware.img + usr/share/qemu/openbios-ppc + usr/share/qemu/openbios-sparc64 + usr/share/qemu/openbios-sparc32 + usr/share/qemu/opensbi-riscv64-generic-fw_dynamic.elf + usr/share/qemu/opensbi-riscv32-generic-fw_dynamic.elf + usr/share/qemu/palcode-clipper + usr/share/qemu/s390-ccw.img + usr/share/qemu/s390-netboot.img + usr/share/qemu/u-boot.e500 +" + +QA_WX_LOAD="usr/bin/qemu-i386 + usr/bin/qemu-x86_64 + usr/bin/qemu-alpha + usr/bin/qemu-arm + usr/bin/qemu-cris + usr/bin/qemu-m68k + usr/bin/qemu-microblaze + usr/bin/qemu-microblazeel + usr/bin/qemu-mips + usr/bin/qemu-mipsel + usr/bin/qemu-or1k + usr/bin/qemu-ppc + usr/bin/qemu-ppc64 + usr/bin/qemu-sh4 + usr/bin/qemu-sh4eb + usr/bin/qemu-sparc + usr/bin/qemu-sparc64 + usr/bin/qemu-armeb + usr/bin/qemu-sparc32plus + usr/bin/qemu-s390x + usr/bin/qemu-unicore32 +" + +DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure you have the +kernel module loaded before running kvm. The easiest way to ensure that the +kernel module is loaded is to load it on boot. + For AMD CPUs the module is called 'kvm-amd'. + For Intel CPUs the module is called 'kvm-intel'. +Please review /etc/conf.d/modules for how to load these. + +Make sure your user is in the 'kvm' group. Just run + $ gpasswd -a kvm +then have re-login. + +For brand new installs, the default permissions on /dev/kvm might not let +you access it. You can tell udev to reset ownership/perms: + $ udevadm trigger -c add /dev/kvm + +If you want to register binfmt handlers for qemu user targets: +For openrc: + # rc-update add qemu-binfmt +For systemd: + # ln -s /usr/share/qemu/binfmt.d/qemu.conf /etc/binfmt.d/qemu.conf" + +pkg_pretend() { + if use kernel_linux && kernel_is lt 2 6 25; then + eerror "This version of KVM requires a host kernel of 2.6.25 or higher." + elif use kernel_linux; then + if ! linux_config_exists; then + eerror "Unable to check your kernel for KVM support" + else + CONFIG_CHECK="~KVM ~TUN ~BRIDGE" + ERROR_KVM="You must enable KVM in your kernel to continue" + ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in" + ERROR_KVM_AMD+=" your kernel configuration." + ERROR_KVM_INTEL="If you have an Intel CPU, you must enable" + ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration." + ERROR_TUN="You will need the Universal TUN/TAP driver compiled" + ERROR_TUN+=" into your kernel or loaded as a module to use the" + ERROR_TUN+=" virtual network device if using -net tap." + ERROR_BRIDGE="You will also need support for 802.1d" + ERROR_BRIDGE+=" Ethernet Bridging for some network configurations." + use vhost-net && CONFIG_CHECK+=" ~VHOST_NET" + ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net" + ERROR_VHOST_NET+=" support" + + if use amd64 || use x86 || use amd64-linux || use x86-linux; then + if grep -q AuthenticAMD /proc/cpuinfo; then + CONFIG_CHECK+=" ~KVM_AMD" + elif grep -q GenuineIntel /proc/cpuinfo; then + CONFIG_CHECK+=" ~KVM_INTEL" + fi + fi + + use python && CONFIG_CHECK+=" ~DEBUG_FS" + ERROR_DEBUG_FS="debugFS support required for kvm_stat" + + # Now do the actual checks setup above + check_extra_config + fi + fi + + if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then + eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt" + eerror "instances are still pointing to it. Please update your" + eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag" + eerror "and the right system binary (e.g. qemu-system-x86_64)." + die "update your virt configs to not use qemu-kvm" + fi +} + +# Sanity check to make sure target lists are kept up-to-date. +check_targets() { + local var=$1 mak=$2 + local detected sorted + + pushd "${S}"/configs/targets/ >/dev/null || die + + # Force C locale until glibc is updated. #564936 + detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u)) + sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u)) + if [[ ${sorted} != "${detected}" ]] ; then + eerror "The ebuild needs to be kept in sync." + eerror "${var}: ${sorted}" + eerror "$(printf '%-*s' ${#var} configure): ${detected}" + die "sync ${var} to the list of targets" + fi + + popd >/dev/null +} + +src_prepare() { + check_targets IUSE_SOFTMMU_TARGETS softmmu + check_targets IUSE_USER_TARGETS linux-user + + default + + # Use correct toolchain to fix cross-compiling + tc-export AR AS LD NM OBJCOPY PKG_CONFIG RANLIB STRINGS + export WINDRES=${CHOST}-windres + + # Verbose builds + MAKEOPTS+=" V=1" + + # We already force -D_FORTIFY_SOURCE=2 (or 3) in our toolchain, but + # this setting (-U then -D..=2) will prevent us from trying out 3, so + # drop it. No change to level of protection b/c we patch our toolchain. + sed -i -e 's/-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2//' configure || die + + # Remove bundled modules + rm -r dtc meson roms/*/ || die +} + +## +# configures qemu based on the build directory and the build type +# we are using. +# +qemu_src_configure() { + debug-print-function ${FUNCNAME} "$@" + + local buildtype=$1 + local builddir="${S}/${buildtype}-build" + + mkdir "${builddir}" || die + + local conf_opts=( + --prefix=/usr + --sysconfdir=/etc + --bindir=/usr/bin + --libdir=/usr/$(get_libdir) + --datadir=/usr/share + --docdir=/usr/share/doc/${PF}/html + --mandir=/usr/share/man + --localstatedir=/var + --disable-bsd-user + --disable-containers # bug #732972 + --disable-guest-agent + --disable-strip + --with-git-submodules=ignore + + # bug #746752: TCG interpreter has a few limitations: + # - it does not support FPU + # - it's generally slower on non-self-modifying code + # It's advantage is support for host architectures + # where native codegeneration is not implemented. + # Gentoo has qemu keyworded only on targets with + # native code generation available. Avoid the interpreter. + --disable-tcg-interpreter + + --disable-werror + # We support gnutls/nettle for crypto operations. It is possible + # to use gcrypt when gnutls/nettle are disabled (but not when they + # are enabled), but it's not really worth the hassle. Disable it + # all the time to avoid automatically detecting it. #568856 + --disable-gcrypt + --cc="$(tc-getCC)" + --cxx="$(tc-getCXX)" + --host-cc="$(tc-getBUILD_CC)" + + $(use_enable alsa) + $(use_enable debug debug-info) + $(use_enable debug debug-tcg) + $(use_enable jack) + $(use_enable nls gettext) + $(use_enable oss) + $(use_enable plugins) + $(use_enable pulseaudio pa) + $(use_enable selinux) + $(use_enable xattr attr) + ) + + # Disable options not used by user targets. This simplifies building + # static user targets (USE=static-user) considerably. + conf_notuser() { + if [[ ${buildtype} == "user" ]] ; then + echo "--disable-${2:-$1}" + else + use_enable "$@" + fi + } + # Enable option only for softmmu build, but not 'user' or 'tools' + conf_softmmu() { + if [[ ${buildtype} == "softmmu" ]] ; then + use_enable "$@" + else + echo "--disable-${2:-$1}" + fi + } + # Enable option only for tools build, but not 'user' or 'softmmu' + conf_tools() { + if [[ ${buildtype} == "tools" ]] ; then + use_enable "$@" + else + echo "--disable-${2:-$1}" + fi + } + # Special case for the malloc flag, because the --disable flag does + # not exist and trying like above will break configuring. + conf_malloc() { + if [[ ! ${buildtype} == "user" ]] ; then + usex "${1}" "--enable-malloc=${1}" "" + fi + } + conf_opts+=( + $(conf_notuser accessibility brlapi) + $(conf_notuser aio linux-aio) + $(conf_softmmu bpf) + $(conf_notuser bzip2) + $(conf_notuser capstone) + $(conf_notuser curl) + $(conf_tools doc docs) + $(conf_notuser fdt) + $(conf_notuser fuse) + $(conf_notuser glusterfs) + $(conf_notuser gnutls) + $(conf_notuser gnutls nettle) + $(conf_notuser gtk) + $(conf_notuser infiniband rdma) + $(conf_notuser iscsi libiscsi) + $(conf_notuser io-uring linux-io-uring) + $(conf_malloc jemalloc) + $(conf_notuser jpeg vnc-jpeg) + $(conf_notuser kernel_linux kvm) + $(conf_notuser lzo) + $(conf_notuser multipath mpath) + $(conf_notuser ncurses curses) + $(conf_notuser nfs libnfs) + $(conf_notuser numa) + $(conf_notuser opengl) + $(conf_notuser pam auth-pam) + $(conf_notuser png) + $(conf_notuser rbd) + $(conf_notuser sasl vnc-sasl) + $(conf_notuser sdl) + $(conf_softmmu sdl-image) + $(conf_notuser slirp) + $(conf_notuser smartcard) + $(conf_notuser snappy) + $(conf_notuser spice) + $(conf_notuser ssh libssh) + $(conf_notuser udev libudev) + $(conf_notuser usb libusb) + $(conf_notuser usbredir usb-redir) + $(conf_notuser vde) + $(conf_notuser vhost-net) + $(conf_notuser virgl virglrenderer) + $(conf_softmmu virtfs) + $(conf_notuser vnc) + $(conf_notuser vte) + $(conf_notuser xen) + $(conf_notuser xen xen-pci-passthrough) + # use prebuilt keymaps, bug #759604 + --disable-xkbcommon + $(conf_notuser zstd) + ) + + if [[ ! ${buildtype} == "user" ]] ; then + # audio options + local audio_opts=( + # Note: backend order matters here: #716202 + # We iterate from higher-level to lower level. + $(usex pulseaudio pa "") + $(usev jack) + $(usev sdl) + $(usev alsa) + $(usev oss) + ) + conf_opts+=( + --audio-drv-list=$(IFS=,; echo "${audio_opts[*]}") + ) + fi + + case ${buildtype} in + user) + conf_opts+=( + --enable-linux-user + --disable-system + --disable-blobs + --disable-tools + --disable-cap-ng + --disable-seccomp + ) + local static_flag="static-user" + ;; + softmmu) + conf_opts+=( + --disable-linux-user + --enable-system + --disable-tools + --enable-cap-ng + --enable-seccomp + ) + local static_flag="static" + ;; + tools) + conf_opts+=( + --disable-linux-user + --disable-system + --disable-blobs + --enable-tools + --enable-cap-ng + --enable-seccomp + ) + local static_flag="static" + ;; + esac + + local targets="${buildtype}_targets" + [[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" ) + + # Add support for SystemTAP + use systemtap && conf_opts+=( --enable-trace-backend=dtrace ) + + # We always want to attempt to build with PIE support as it results + # in a more secure binary. But it doesn't work with static or if + # the current GCC doesn't have PIE support. + if use ${static_flag}; then + conf_opts+=( --static --disable-pie ) + else + tc-enables-pie && conf_opts+=( --enable-pie ) + fi + + # Meson will not use a cross-file unless cross_prefix is set. + tc-is-cross-compiler && conf_opts+=( --cross-prefix="${CHOST}-" ) + + # Plumb through equivalent of EXTRA_ECONF to allow experiments + # like bug #747928. + conf_opts+=( ${EXTRA_CONF_QEMU} ) + + echo "../configure ${conf_opts[*]}" + cd "${builddir}" + ../configure "${conf_opts[@]}" || die "configure failed" +} + +src_configure() { + local target + + python_setup + + softmmu_targets= softmmu_bins=() + user_targets= user_bins=() + + for target in ${IUSE_SOFTMMU_TARGETS} ; do + if use "qemu_softmmu_targets_${target}"; then + softmmu_targets+=",${target}-softmmu" + softmmu_bins+=( "qemu-system-${target}" ) + fi + done + + for target in ${IUSE_USER_TARGETS} ; do + if use "qemu_user_targets_${target}"; then + user_targets+=",${target}-linux-user" + user_bins+=( "qemu-${target}" ) + fi + done + + softmmu_targets=${softmmu_targets#,} + user_targets=${user_targets#,} + + [[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu" + [[ -n ${user_targets} ]] && qemu_src_configure "user" + qemu_src_configure "tools" +} + +src_compile() { + if [[ -n ${user_targets} ]]; then + cd "${S}/user-build" || die + default + fi + + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" || die + default + fi + + cd "${S}/tools-build" || die + default +} + +src_test() { + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" || die + pax-mark m */qemu-system-* #515550 + emake check + fi +} + +qemu_python_install() { + python_domodule "${S}/python/qemu" + + python_doscript "${S}/scripts/kvm/vmxcap" + python_doscript "${S}/scripts/qmp/qmp-shell" + python_doscript "${S}/scripts/qmp/qemu-ga-client" +} + +# Generate binfmt support files. +# - /etc/init.d/qemu-binfmt script which registers the user handlers (openrc) +# - /usr/share/qemu/binfmt.d/qemu.conf (for use with systemd-binfmt) +generate_initd() { + local out="${T}/qemu-binfmt" + local out_systemd="${T}/qemu.conf" + local d="${T}/binfmt.d" + + einfo "Generating qemu binfmt scripts and configuration files" + + # Generate the debian fragments first. + mkdir -p "${d}" + "${S}"/scripts/qemu-binfmt-conf.sh \ + --debian \ + --exportdir "${d}" \ + --qemu-path "${EPREFIX}/usr/bin" \ + || die + # Then turn the fragments into a shell script we can source. + sed -E -i \ + -e 's:^([^ ]+) (.*)$:\1="\2":' \ + "${d}"/* || die + + # Generate the init.d script by assembling the fragments from above. + local f qcpu package interpreter magic mask + cat "${FILESDIR}"/qemu-binfmt.initd.head >"${out}" || die + for f in "${d}"/qemu-* ; do + source "${f}" + + # Normalize the cpu logic like we do in the init.d for the native cpu. + qcpu=${package#qemu-} + case ${qcpu} in + arm*) qcpu="arm";; + mips*) qcpu="mips";; + ppc*) qcpu="ppc";; + s390*) qcpu="s390";; + sh*) qcpu="sh";; + sparc*) qcpu="sparc";; + esac + + # we use 'printf' here to be portable across 'sh' + # implementations: #679168 + cat <>"${out}" + if [ "\${cpu}" != "${qcpu}" -a -x "${interpreter}" ] ; then + printf '%s\n' ':${package}:M::${magic}:${mask}:${interpreter}:'"\${QEMU_BINFMT_FLAGS}" >/proc/sys/fs/binfmt_misc/register + fi +EOF + + echo ":${package}:M::${magic}:${mask}:${interpreter}:OC" >>"${out_systemd}" + + done + cat "${FILESDIR}"/qemu-binfmt.initd.tail >>"${out}" || die +} + +src_install() { + if [[ -n ${user_targets} ]]; then + cd "${S}/user-build" + emake DESTDIR="${ED}" install + + # Install binfmt handler init script for user targets. + generate_initd + doinitd "${T}/qemu-binfmt" + + # Install binfmt/qemu.conf. + insinto "/usr/share/qemu/binfmt.d" + doins "${T}/qemu.conf" + fi + + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" + emake DESTDIR="${ED}" install + + # This might not exist if the test failed. #512010 + [[ -e check-report.html ]] && dodoc check-report.html + + if use kernel_linux; then + udev_newrules "${FILESDIR}"/65-kvm.rules-r2 65-kvm.rules + fi + + if use python; then + python_foreach_impl qemu_python_install + fi + fi + + cd "${S}/tools-build" || die + emake DESTDIR="${ED}" install + + # If USE=doc, there'll be newly generated docs which we install instead. + if ! use doc && [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + doman "${WORKDIR}"/${PN}-${QEMU_DOCS_VERSION}-docs/docs/*.[0-8] + fi + + # Disable mprotect on the qemu binaries as they use JITs to be fast #459348 + pushd "${ED}"/usr/bin >/dev/null || die + pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594 + popd >/dev/null || die + + # Install config file example for qemu-bridge-helper + insinto "/etc/qemu" + doins "${FILESDIR}/bridge.conf" + + cd "${S}" || die + dodoc MAINTAINERS docs/specs/pci-ids.txt + newdoc pc-bios/README README.pc-bios + + # Disallow stripping of prebuilt firmware files. + dostrip -x ${QA_PREBUILT} + + if [[ -n ${softmmu_targets} ]]; then + # Remove SeaBIOS since we're using the SeaBIOS packaged one + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin + fi + + # Remove vgabios since we're using the seavgabios packaged one + rm "${ED}/usr/share/qemu/vgabios.bin" + rm "${ED}/usr/share/qemu/vgabios-cirrus.bin" + rm "${ED}/usr/share/qemu/vgabios-qxl.bin" + rm "${ED}/usr/share/qemu/vgabios-stdvga.bin" + rm "${ED}/usr/share/qemu/vgabios-virtio.bin" + rm "${ED}/usr/share/qemu/vgabios-vmware.bin" + + # PPC/PPC64 loads vgabios-stdvga + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64; then + dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin + dosym ../seavgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin + dosym ../seavgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin + dosym ../seavgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin + dosym ../seavgabios/vgabios-virtio.bin /usr/share/qemu/vgabios-virtio.bin + dosym ../seavgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin + fi + + # Remove sgabios since we're using the sgabios packaged one + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin + fi + + # Remove iPXE since we're using the iPXE packaged one + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom + dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom + dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom + dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom + dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom + dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom + fi + fi + + DISABLE_AUTOFORMATTING=true + readme.gentoo_create_doc +} + +firmware_abi_change() { + local pv + for pv in ${REPLACING_VERSIONS}; do + if ver_test ${pv} -lt ${FIRMWARE_ABI_VERSION}; then + return 0 + fi + done + return 1 +} + +pkg_postinst() { + if [[ -n ${softmmu_targets} ]] && use kernel_linux; then + udev_reload + fi + + xdg_icon_cache_update + + [[ -z ${EPREFIX} ]] && [[ -f ${EROOT}/usr/libexec/qemu-bridge-helper ]] && \ + fcaps cap_net_admin "${EROOT}"/usr/libexec/qemu-bridge-helper + + DISABLE_AUTOFORMATTING=true + readme.gentoo_print_elog + + if use pin-upstream-blobs && firmware_abi_change; then + ewarn "This version of qemu pins new versions of firmware blobs:" + + if has_version 'sys-firmware/edk2-ovmf-bin'; then + ewarn " $(best_version sys-firmware/edk2-ovmf-bin)" + else + ewarn " $(best_version sys-firmware/edk2-ovmf)" + fi + + if has_version 'sys-firmware/seabios-bin'; then + ewarn " $(best_version sys-firmware/seabios-bin)" + else + ewarn " $(best_version sys-firmware/seabios)" + fi + + ewarn " $(best_version sys-firmware/ipxe)" + ewarn " $(best_version sys-firmware/sgabios)" + ewarn "This might break resume of hibernated guests (started with a different" + ewarn "firmware version) and live migration to/from qemu versions with different" + ewarn "firmware. Please (cold) restart all running guests. For functional" + ewarn "guest migration ensure that all" + ewarn "hosts run at least" + ewarn " app-emulation/qemu-${FIRMWARE_ABI_VERSION}." + fi +} + +pkg_info() { + echo "Using:" + echo " $(best_version app-emulation/spice-protocol)" + + if has_version 'sys-firmware/edk2-ovmf-bin'; then + echo " $(best_version sys-firmware/edk2-ovmf-bin)" + else + echo " $(best_version sys-firmware/edk2-ovmf)" + fi + + if has_version 'sys-firmware/seabios-bin'; then + echo " $(best_version sys-firmware/seabios-bin)" + else + echo " $(best_version sys-firmware/seabios)" + fi + + echo " $(best_version sys-firmware/ipxe)" + echo " $(best_version sys-firmware/sgabios)" +} + +pkg_postrm() { + xdg_icon_cache_update + udev_reload +} diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-9999.ebuild b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-9999.ebuild new file mode 100644 index 0000000000..ce7fda6680 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-9999.ebuild @@ -0,0 +1,968 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-qemu-docs +# Set to 1 if prebuilt, 0 if not +# (the construct below is to allow overriding from env for script) +: ${QEMU_DOCS_PREBUILT:=1} + +QEMU_DOCS_PREBUILT_DEV=sam +QEMU_DOCS_VERSION=$(ver_cut 1-3) +# Default to generating docs (inc. man pages) if no prebuilt; overridden later +# bug #830088 +QEMU_DOC_USEFLAG="+doc" + +PYTHON_COMPAT=( python3_{9,10,11} ) +PYTHON_REQ_USE="ncurses,readline" + +FIRMWARE_ABI_VERSION="7.2.0" + +inherit linux-info toolchain-funcs python-r1 udev fcaps readme.gentoo-r1 \ + pax-utils xdg-utils + +if [[ ${PV} == *9999* ]]; then + QEMU_DOCS_PREBUILT=0 + + EGIT_REPO_URI="https://gitlab.com/qemu-project/qemu.git/" + EGIT_SUBMODULES=( + tests/fp/berkeley-softfloat-3 + tests/fp/berkeley-testfloat-3 + ui/keycodemapdb + ) + inherit git-r3 + SRC_URI="" +else + MY_P="${PN}-${PV/_rc/-rc}" + SRC_URI="https://download.qemu.org/${MY_P}.tar.xz" + + if [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + SRC_URI+=" !doc? ( https://dev.gentoo.org/~${QEMU_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${QEMU_DOCS_VERSION}-docs.tar.xz )" + fi + + S="${WORKDIR}/${MY_P}" + [[ "${PV}" != *_rc* ]] && KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" +fi + +DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" +HOMEPAGE="https://www.qemu.org https://www.linux-kvm.org" + +LICENSE="GPL-2 LGPL-2 BSD-2" +SLOT="0" + +[[ ${QEMU_DOCS_PREBUILT} == 1 ]] && QEMU_DOC_USEFLAG="doc" + +IUSE="accessibility +aio alsa bpf bzip2 capstone +curl debug ${QEMU_DOC_USEFLAG} + +fdt fuse glusterfs +gnutls gtk infiniband iscsi io-uring + jack jemalloc +jpeg + lzo multipath + ncurses nfs nls numa opengl +oss pam +pin-upstream-blobs + plugins +png pulseaudio python rbd sasl +seccomp sdl sdl-image selinux + +slirp + smartcard snappy spice ssh static static-user systemtap test udev usb + usbredir vde +vhost-net virgl virtfs +vnc vte xattr xen + zstd" + +COMMON_TARGETS=" + aarch64 + alpha + arm + cris + hppa + i386 + loongarch64 + m68k + microblaze + microblazeel + mips + mips64 + mips64el + mipsel + nios2 + or1k + ppc + ppc64 + riscv32 + riscv64 + s390x + sh4 + sh4eb + sparc + sparc64 + x86_64 + xtensa + xtensaeb +" +IUSE_SOFTMMU_TARGETS=" + ${COMMON_TARGETS} + avr + rx + tricore +" +IUSE_USER_TARGETS=" + ${COMMON_TARGETS} + aarch64_be + armeb + hexagon + mipsn32 + mipsn32el + ppc64le + sparc32plus +" + +use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS}) +use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS}) +IUSE+=" ${use_softmmu_targets} ${use_user_targets}" + +RESTRICT="!test? ( test )" + +# Allow no targets to be built so that people can get a tools-only build. +# Block USE flag configurations known to not work. +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + qemu_softmmu_targets_arm? ( fdt ) + qemu_softmmu_targets_microblaze? ( fdt ) + qemu_softmmu_targets_mips64el? ( fdt ) + qemu_softmmu_targets_ppc64? ( fdt ) + qemu_softmmu_targets_ppc? ( fdt ) + qemu_softmmu_targets_riscv32? ( fdt ) + qemu_softmmu_targets_riscv64? ( fdt ) + qemu_softmmu_targets_x86_64? ( fdt ) + sdl-image? ( sdl ) + static? ( static-user !alsa !gtk !jack !opengl !pam !pulseaudio !plugins !rbd !snappy !udev ) + static-user? ( !plugins ) + virgl? ( opengl ) + virtfs? ( xattr ) + vnc? ( gnutls ) + vte? ( gtk ) + multipath? ( udev ) + plugins? ( !static !static-user ) +" +for smname in ${IUSE_SOFTMMU_TARGETS} ; do + REQUIRED_USE+=" qemu_softmmu_targets_${smname}? ( seccomp ) " +done + +# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) +# and user/softmmu targets (qemu-*, qemu-system-*). +# +# Yep, you need both libcap and libcap-ng since virtfs only uses libcap. +# +# The attr lib isn't always linked in (although the USE flag is always +# respected). This is because qemu supports using the C library's API +# when available rather than always using the external library. +ALL_DEPEND=" + >=dev-libs/glib-2.0[static-libs(+)] + sys-libs/zlib[static-libs(+)] + python? ( ${PYTHON_DEPS} ) + systemtap? ( dev-util/systemtap ) + xattr? ( sys-apps/attr[static-libs(+)] )" + +# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...) +# softmmu targets (qemu-system-*). +SOFTMMU_TOOLS_DEPEND=" + sys-libs/libcap-ng[static-libs(+)] + >=x11-libs/pixman-0.28.0[static-libs(+)] + accessibility? ( + app-accessibility/brltty[api] + app-accessibility/brltty[static-libs(+)] + ) + aio? ( dev-libs/libaio[static-libs(+)] ) + alsa? ( >=media-libs/alsa-lib-1.0.13 ) + bpf? ( dev-libs/libbpf:= ) + bzip2? ( app-arch/bzip2[static-libs(+)] ) + capstone? ( dev-libs/capstone:= ) + curl? ( >=net-misc/curl-7.15.4[static-libs(+)] ) + fdt? ( >=sys-apps/dtc-1.5.1[static-libs(+)] ) + fuse? ( >=sys-fs/fuse-3.1:3[static-libs(+)] ) + glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] ) + gnutls? ( + dev-libs/nettle:=[static-libs(+)] + >=net-libs/gnutls-3.0:=[static-libs(+)] + ) + gtk? ( + x11-libs/gtk+:3 + vte? ( x11-libs/vte:2.91 ) + ) + infiniband? ( sys-cluster/rdma-core[static-libs(+)] ) + iscsi? ( net-libs/libiscsi ) + io-uring? ( sys-libs/liburing:=[static-libs(+)] ) + jack? ( virtual/jack ) + jemalloc? ( dev-libs/jemalloc ) + jpeg? ( media-libs/libjpeg-turbo:=[static-libs(+)] ) + lzo? ( dev-libs/lzo:2[static-libs(+)] ) + multipath? ( sys-fs/multipath-tools ) + ncurses? ( + sys-libs/ncurses:=[unicode(+)] + sys-libs/ncurses:=[static-libs(+)] + ) + nfs? ( >=net-fs/libnfs-1.9.3:=[static-libs(+)] ) + numa? ( sys-process/numactl[static-libs(+)] ) + opengl? ( + virtual/opengl + media-libs/libepoxy[static-libs(+)] + media-libs/mesa[static-libs(+)] + media-libs/mesa[egl(+),gbm(+)] + ) + pam? ( sys-libs/pam ) + png? ( >=media-libs/libpng-1.6.34:=[static-libs(+)] ) + pulseaudio? ( media-sound/pulseaudio ) + rbd? ( sys-cluster/ceph ) + sasl? ( dev-libs/cyrus-sasl[static-libs(+)] ) + sdl? ( + media-libs/libsdl2[video] + media-libs/libsdl2[static-libs(+)] + ) + sdl-image? ( media-libs/sdl2-image[static-libs(+)] ) + seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] ) + slirp? ( net-libs/libslirp[static-libs(+)] ) + smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] ) + snappy? ( app-arch/snappy:= ) + spice? ( + >=app-emulation/spice-protocol-0.14.0 + >=app-emulation/spice-0.14.0[static-libs(+)] + ) + ssh? ( >=net-libs/libssh-0.8.6[static-libs(+)] ) + udev? ( virtual/libudev:= ) + usb? ( >=virtual/libusb-1-r2[static-libs(+)] ) + usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] ) + vde? ( net-misc/vde[static-libs(+)] ) + virgl? ( media-libs/virglrenderer[static-libs(+)] ) + virtfs? ( sys-libs/libcap ) + xen? ( app-emulation/xen-tools:= ) + zstd? ( >=app-arch/zstd-1.4.0[static-libs(+)] ) +" + +EDK2_OVMF_VERSION="202202" +SEABIOS_VERSION="1.16.0" + +X86_FIRMWARE_DEPEND=" + pin-upstream-blobs? ( + ~sys-firmware/edk2-ovmf-bin-${EDK2_OVMF_VERSION} + ~sys-firmware/ipxe-1.21.1[binary,qemu] + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} + ~sys-firmware/sgabios-0.1_pre10[binary] + ) + !pin-upstream-blobs? ( + || ( + >=sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION} + >=sys-firmware/edk2-ovmf-bin-${EDK2_OVMF_VERSION} + ) + sys-firmware/ipxe[qemu] + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) + sys-firmware/sgabios + )" +PPC_FIRMWARE_DEPEND=" + pin-upstream-blobs? ( + ~sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) + !pin-upstream-blobs? ( + || ( + >=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios] + >=sys-firmware/seabios-bin-${SEABIOS_VERSION} + ) + ) +" + +BDEPEND=" + $(python_gen_impl_dep) + dev-lang/perl + dev-util/meson + sys-apps/texinfo + virtual/pkgconfig + doc? ( + dev-python/sphinx[${PYTHON_USEDEP}] + dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}] + ) + gtk? ( nls? ( sys-devel/gettext ) ) + test? ( + dev-libs/glib[utils] + sys-devel/bc + ) +" +CDEPEND=" + !static? ( + ${ALL_DEPEND//\[static-libs(+)]} + ${SOFTMMU_TOOLS_DEPEND//\[static-libs(+)]} + ) + qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_ppc? ( ${PPC_FIRMWARE_DEPEND} ) + qemu_softmmu_targets_ppc64? ( ${PPC_FIRMWARE_DEPEND} ) +" +DEPEND="${CDEPEND} + kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 ) + static? ( + ${ALL_DEPEND} + ${SOFTMMU_TOOLS_DEPEND} + ) + static-user? ( ${ALL_DEPEND} )" +RDEPEND="${CDEPEND} + acct-group/kvm + selinux? ( + sec-policy/selinux-qemu + sys-libs/libselinux + )" + +PATCHES=( + "${FILESDIR}"/${PN}-5.2.0-disable-keymap.patch + "${FILESDIR}"/${PN}-6.0.0-make.patch + "${FILESDIR}"/${PN}-7.1.0-also-build-virtfs-proxy-helper.patch + "${FILESDIR}"/${PN}-7.1.0-capstone-include-path.patch +) + +QA_PREBUILT=" + usr/share/qemu/hppa-firmware.img + usr/share/qemu/openbios-ppc + usr/share/qemu/openbios-sparc64 + usr/share/qemu/openbios-sparc32 + usr/share/qemu/opensbi-riscv64-generic-fw_dynamic.elf + usr/share/qemu/opensbi-riscv32-generic-fw_dynamic.elf + usr/share/qemu/palcode-clipper + usr/share/qemu/s390-ccw.img + usr/share/qemu/s390-netboot.img + usr/share/qemu/u-boot.e500 +" + +QA_WX_LOAD="usr/bin/qemu-i386 + usr/bin/qemu-x86_64 + usr/bin/qemu-alpha + usr/bin/qemu-arm + usr/bin/qemu-cris + usr/bin/qemu-m68k + usr/bin/qemu-microblaze + usr/bin/qemu-microblazeel + usr/bin/qemu-mips + usr/bin/qemu-mipsel + usr/bin/qemu-or1k + usr/bin/qemu-ppc + usr/bin/qemu-ppc64 + usr/bin/qemu-sh4 + usr/bin/qemu-sh4eb + usr/bin/qemu-sparc + usr/bin/qemu-sparc64 + usr/bin/qemu-armeb + usr/bin/qemu-sparc32plus + usr/bin/qemu-s390x + usr/bin/qemu-unicore32 +" + +DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure you have the +kernel module loaded before running kvm. The easiest way to ensure that the +kernel module is loaded is to load it on boot. + For AMD CPUs the module is called 'kvm-amd'. + For Intel CPUs the module is called 'kvm-intel'. +Please review /etc/conf.d/modules for how to load these. + +Make sure your user is in the 'kvm' group. Just run + $ gpasswd -a kvm +then have re-login. + +For brand new installs, the default permissions on /dev/kvm might not let +you access it. You can tell udev to reset ownership/perms: + $ udevadm trigger -c add /dev/kvm + +If you want to register binfmt handlers for qemu user targets: +For openrc: + # rc-update add qemu-binfmt +For systemd: + # ln -s /usr/share/qemu/binfmt.d/qemu.conf /etc/binfmt.d/qemu.conf" + +pkg_pretend() { + if use kernel_linux && kernel_is lt 2 6 25; then + eerror "This version of KVM requires a host kernel of 2.6.25 or higher." + elif use kernel_linux; then + if ! linux_config_exists; then + eerror "Unable to check your kernel for KVM support" + else + CONFIG_CHECK="~KVM ~TUN ~BRIDGE" + ERROR_KVM="You must enable KVM in your kernel to continue" + ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in" + ERROR_KVM_AMD+=" your kernel configuration." + ERROR_KVM_INTEL="If you have an Intel CPU, you must enable" + ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration." + ERROR_TUN="You will need the Universal TUN/TAP driver compiled" + ERROR_TUN+=" into your kernel or loaded as a module to use the" + ERROR_TUN+=" virtual network device if using -net tap." + ERROR_BRIDGE="You will also need support for 802.1d" + ERROR_BRIDGE+=" Ethernet Bridging for some network configurations." + use vhost-net && CONFIG_CHECK+=" ~VHOST_NET" + ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net" + ERROR_VHOST_NET+=" support" + + if use amd64 || use x86 || use amd64-linux || use x86-linux; then + if grep -q AuthenticAMD /proc/cpuinfo; then + CONFIG_CHECK+=" ~KVM_AMD" + elif grep -q GenuineIntel /proc/cpuinfo; then + CONFIG_CHECK+=" ~KVM_INTEL" + fi + fi + + use python && CONFIG_CHECK+=" ~DEBUG_FS" + ERROR_DEBUG_FS="debugFS support required for kvm_stat" + + # Now do the actual checks setup above + check_extra_config + fi + fi + + if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then + eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt" + eerror "instances are still pointing to it. Please update your" + eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag" + eerror "and the right system binary (e.g. qemu-system-x86_64)." + die "update your virt configs to not use qemu-kvm" + fi +} + +# Sanity check to make sure target lists are kept up-to-date. +check_targets() { + local var=$1 mak=$2 + local detected sorted + + pushd "${S}"/configs/targets/ >/dev/null || die + + # Force C locale until glibc is updated. #564936 + detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u)) + sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u)) + if [[ ${sorted} != "${detected}" ]] ; then + eerror "The ebuild needs to be kept in sync." + eerror "${var}: ${sorted}" + eerror "$(printf '%-*s' ${#var} configure): ${detected}" + die "sync ${var} to the list of targets" + fi + + popd >/dev/null +} + +src_prepare() { + check_targets IUSE_SOFTMMU_TARGETS softmmu + check_targets IUSE_USER_TARGETS linux-user + + default + + # Use correct toolchain to fix cross-compiling + tc-export AR AS LD NM OBJCOPY PKG_CONFIG RANLIB STRINGS + export WINDRES=${CHOST}-windres + + # Verbose builds + MAKEOPTS+=" V=1" + + # We already force -D_FORTIFY_SOURCE=2 (or 3) in our toolchain, but + # this setting (-U then -D..=2) will prevent us from trying out 3, so + # drop it. No change to level of protection b/c we patch our toolchain. + sed -i -e 's/-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2//' configure || die + + # Remove bundled modules + rm -r dtc meson roms/*/ || die +} + +## +# configures qemu based on the build directory and the build type +# we are using. +# +qemu_src_configure() { + debug-print-function ${FUNCNAME} "$@" + + local buildtype=$1 + local builddir="${S}/${buildtype}-build" + + mkdir "${builddir}" || die + + local conf_opts=( + --prefix=/usr + --sysconfdir=/etc + --bindir=/usr/bin + --libdir=/usr/$(get_libdir) + --datadir=/usr/share + --docdir=/usr/share/doc/${PF}/html + --mandir=/usr/share/man + --localstatedir=/var + --disable-bsd-user + --disable-containers # bug #732972 + --disable-guest-agent + --disable-strip + --with-git-submodules=ignore + + # bug #746752: TCG interpreter has a few limitations: + # - it does not support FPU + # - it's generally slower on non-self-modifying code + # It's advantage is support for host architectures + # where native codegeneration is not implemented. + # Gentoo has qemu keyworded only on targets with + # native code generation available. Avoid the interpreter. + --disable-tcg-interpreter + + --disable-werror + # We support gnutls/nettle for crypto operations. It is possible + # to use gcrypt when gnutls/nettle are disabled (but not when they + # are enabled), but it's not really worth the hassle. Disable it + # all the time to avoid automatically detecting it. #568856 + --disable-gcrypt + --cc="$(tc-getCC)" + --cxx="$(tc-getCXX)" + --host-cc="$(tc-getBUILD_CC)" + + $(use_enable alsa) + $(use_enable debug debug-info) + $(use_enable debug debug-tcg) + $(use_enable jack) + $(use_enable nls gettext) + $(use_enable oss) + $(use_enable plugins) + $(use_enable pulseaudio pa) + $(use_enable selinux) + $(use_enable xattr attr) + ) + + # Disable options not used by user targets. This simplifies building + # static user targets (USE=static-user) considerably. + conf_notuser() { + if [[ ${buildtype} == "user" ]] ; then + echo "--disable-${2:-$1}" + else + use_enable "$@" + fi + } + # Enable option only for softmmu build, but not 'user' or 'tools' + conf_softmmu() { + if [[ ${buildtype} == "softmmu" ]] ; then + use_enable "$@" + else + echo "--disable-${2:-$1}" + fi + } + # Enable option only for tools build, but not 'user' or 'softmmu' + conf_tools() { + if [[ ${buildtype} == "tools" ]] ; then + use_enable "$@" + else + echo "--disable-${2:-$1}" + fi + } + # Special case for the malloc flag, because the --disable flag does + # not exist and trying like above will break configuring. + conf_malloc() { + if [[ ! ${buildtype} == "user" ]] ; then + usex "${1}" "--enable-malloc=${1}" "" + fi + } + conf_opts+=( + $(conf_notuser accessibility brlapi) + $(conf_notuser aio linux-aio) + $(conf_softmmu bpf) + $(conf_notuser bzip2) + $(conf_notuser capstone) + $(conf_notuser curl) + $(conf_tools doc docs) + $(conf_notuser fdt) + $(conf_notuser fuse) + $(conf_notuser glusterfs) + $(conf_notuser gnutls) + $(conf_notuser gnutls nettle) + $(conf_notuser gtk) + $(conf_notuser infiniband rdma) + $(conf_notuser iscsi libiscsi) + $(conf_notuser io-uring linux-io-uring) + $(conf_malloc jemalloc) + $(conf_notuser jpeg vnc-jpeg) + $(conf_notuser kernel_linux kvm) + $(conf_notuser lzo) + $(conf_notuser multipath mpath) + $(conf_notuser ncurses curses) + $(conf_notuser nfs libnfs) + $(conf_notuser numa) + $(conf_notuser opengl) + $(conf_notuser pam auth-pam) + $(conf_notuser png) + $(conf_notuser rbd) + $(conf_notuser sasl vnc-sasl) + $(conf_notuser sdl) + $(conf_softmmu sdl-image) + $(conf_notuser seccomp) + $(conf_notuser slirp) + $(conf_notuser smartcard) + $(conf_notuser snappy) + $(conf_notuser spice) + $(conf_notuser ssh libssh) + $(conf_notuser udev libudev) + $(conf_notuser usb libusb) + $(conf_notuser usbredir usb-redir) + $(conf_notuser vde) + $(conf_notuser vhost-net) + $(conf_notuser virgl virglrenderer) + $(conf_softmmu virtfs) + $(conf_notuser vnc) + $(conf_notuser vte) + $(conf_notuser xen) + $(conf_notuser xen xen-pci-passthrough) + # use prebuilt keymaps, bug #759604 + --disable-xkbcommon + $(conf_notuser zstd) + ) + + if [[ ! ${buildtype} == "user" ]] ; then + # audio options + local audio_opts=( + # Note: backend order matters here: #716202 + # We iterate from higher-level to lower level. + $(usex pulseaudio pa "") + $(usev jack) + $(usev sdl) + $(usev alsa) + $(usev oss) + ) + conf_opts+=( + --audio-drv-list=$(IFS=,; echo "${audio_opts[*]}") + ) + fi + + case ${buildtype} in + user) + conf_opts+=( + --enable-linux-user + --disable-system + --disable-blobs + --disable-tools + --disable-cap-ng + --disable-seccomp + ) + local static_flag="static-user" + ;; + softmmu) + conf_opts+=( + --disable-linux-user + --enable-system + --disable-tools + --enable-cap-ng + --enable-seccomp + ) + local static_flag="static" + ;; + tools) + conf_opts+=( + --disable-linux-user + --disable-system + --disable-blobs + --enable-tools + --enable-cap-ng + ) + local static_flag="static" + ;; + esac + + local targets="${buildtype}_targets" + [[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" ) + + # Add support for SystemTAP + use systemtap && conf_opts+=( --enable-trace-backend=dtrace ) + + # We always want to attempt to build with PIE support as it results + # in a more secure binary. But it doesn't work with static or if + # the current GCC doesn't have PIE support. + if use ${static_flag}; then + conf_opts+=( --static --disable-pie ) + else + tc-enables-pie && conf_opts+=( --enable-pie ) + fi + + # Meson will not use a cross-file unless cross_prefix is set. + tc-is-cross-compiler && conf_opts+=( --cross-prefix="${CHOST}-" ) + + # Plumb through equivalent of EXTRA_ECONF to allow experiments + # like bug #747928. + conf_opts+=( ${EXTRA_CONF_QEMU} ) + + echo "../configure ${conf_opts[*]}" + cd "${builddir}" + ../configure "${conf_opts[@]}" || die "configure failed" +} + +src_configure() { + local target + + python_setup + + softmmu_targets= softmmu_bins=() + user_targets= user_bins=() + + for target in ${IUSE_SOFTMMU_TARGETS} ; do + if use "qemu_softmmu_targets_${target}"; then + softmmu_targets+=",${target}-softmmu" + softmmu_bins+=( "qemu-system-${target}" ) + fi + done + + for target in ${IUSE_USER_TARGETS} ; do + if use "qemu_user_targets_${target}"; then + user_targets+=",${target}-linux-user" + user_bins+=( "qemu-${target}" ) + fi + done + + softmmu_targets=${softmmu_targets#,} + user_targets=${user_targets#,} + + [[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu" + [[ -n ${user_targets} ]] && qemu_src_configure "user" + qemu_src_configure "tools" +} + +src_compile() { + if [[ -n ${user_targets} ]]; then + cd "${S}/user-build" || die + default + fi + + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" || die + default + fi + + cd "${S}/tools-build" || die + default +} + +src_test() { + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" || die + pax-mark m */qemu-system-* #515550 + emake check + fi +} + +qemu_python_install() { + python_domodule "${S}/python/qemu" + + python_doscript "${S}/scripts/kvm/vmxcap" + python_doscript "${S}/scripts/qmp/qmp-shell" + python_doscript "${S}/scripts/qmp/qemu-ga-client" +} + +# Generate binfmt support files. +# - /etc/init.d/qemu-binfmt script which registers the user handlers (openrc) +# - /usr/share/qemu/binfmt.d/qemu.conf (for use with systemd-binfmt) +generate_initd() { + local out="${T}/qemu-binfmt" + local out_systemd="${T}/qemu.conf" + local d="${T}/binfmt.d" + + einfo "Generating qemu binfmt scripts and configuration files" + + # Generate the debian fragments first. + mkdir -p "${d}" + "${S}"/scripts/qemu-binfmt-conf.sh \ + --debian \ + --exportdir "${d}" \ + --qemu-path "${EPREFIX}/usr/bin" \ + || die + # Then turn the fragments into a shell script we can source. + sed -E -i \ + -e 's:^([^ ]+) (.*)$:\1="\2":' \ + "${d}"/* || die + + # Generate the init.d script by assembling the fragments from above. + local f qcpu package interpreter magic mask + cat "${FILESDIR}"/qemu-binfmt.initd.head >"${out}" || die + for f in "${d}"/qemu-* ; do + source "${f}" + + # Normalize the cpu logic like we do in the init.d for the native cpu. + qcpu=${package#qemu-} + case ${qcpu} in + arm*) qcpu="arm";; + mips*) qcpu="mips";; + ppc*) qcpu="ppc";; + s390*) qcpu="s390";; + sh*) qcpu="sh";; + sparc*) qcpu="sparc";; + esac + + # we use 'printf' here to be portable across 'sh' + # implementations: #679168 + cat <>"${out}" + if [ "\${cpu}" != "${qcpu}" -a -x "${interpreter}" ] ; then + printf '%s\n' ':${package}:M::${magic}:${mask}:${interpreter}:'"\${QEMU_BINFMT_FLAGS}" >/proc/sys/fs/binfmt_misc/register + fi +EOF + + echo ":${package}:M::${magic}:${mask}:${interpreter}:OC" >>"${out_systemd}" + + done + cat "${FILESDIR}"/qemu-binfmt.initd.tail >>"${out}" || die +} + +src_install() { + if [[ -n ${user_targets} ]]; then + cd "${S}/user-build" + emake DESTDIR="${ED}" install + + # Install binfmt handler init script for user targets. + generate_initd + doinitd "${T}/qemu-binfmt" + + # Install binfmt/qemu.conf. + insinto "/usr/share/qemu/binfmt.d" + doins "${T}/qemu.conf" + fi + + if [[ -n ${softmmu_targets} ]]; then + cd "${S}/softmmu-build" + emake DESTDIR="${ED}" install + + # This might not exist if the test failed. #512010 + [[ -e check-report.html ]] && dodoc check-report.html + + if use kernel_linux; then + udev_newrules "${FILESDIR}"/65-kvm.rules-r2 65-kvm.rules + fi + + if use python; then + python_foreach_impl qemu_python_install + fi + fi + + cd "${S}/tools-build" || die + emake DESTDIR="${ED}" install + + # If USE=doc, there'll be newly generated docs which we install instead. + if ! use doc && [[ ${QEMU_DOCS_PREBUILT} == 1 ]] ; then + doman "${WORKDIR}"/${PN}-${QEMU_DOCS_VERSION}-docs/docs/*.[0-8] + fi + + # Disable mprotect on the qemu binaries as they use JITs to be fast #459348 + pushd "${ED}"/usr/bin >/dev/null || die + pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594 + popd >/dev/null || die + + # Install config file example for qemu-bridge-helper + insinto "/etc/qemu" + doins "${FILESDIR}/bridge.conf" + + cd "${S}" || die + dodoc MAINTAINERS docs/specs/pci-ids.txt + newdoc pc-bios/README README.pc-bios + + # Disallow stripping of prebuilt firmware files. + dostrip -x ${QA_PREBUILT} + + if [[ -n ${softmmu_targets} ]]; then + # Remove SeaBIOS since we're using the SeaBIOS packaged one + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin + fi + + # Remove vgabios since we're using the seavgabios packaged one + rm "${ED}/usr/share/qemu/vgabios.bin" + rm "${ED}/usr/share/qemu/vgabios-cirrus.bin" + rm "${ED}/usr/share/qemu/vgabios-qxl.bin" + rm "${ED}/usr/share/qemu/vgabios-stdvga.bin" + rm "${ED}/usr/share/qemu/vgabios-virtio.bin" + rm "${ED}/usr/share/qemu/vgabios-vmware.bin" + + # PPC/PPC64 loads vgabios-stdvga + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64; then + dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin + dosym ../seavgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin + dosym ../seavgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin + dosym ../seavgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin + dosym ../seavgabios/vgabios-virtio.bin /usr/share/qemu/vgabios-virtio.bin + dosym ../seavgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin + fi + + # Remove sgabios since we're using the sgabios packaged one + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin + fi + + # Remove iPXE since we're using the iPXE packaged one + if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then + dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom + dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom + dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom + dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom + dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom + dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom + fi + fi + + DISABLE_AUTOFORMATTING=true + readme.gentoo_create_doc +} + +firmware_abi_change() { + local pv + for pv in ${REPLACING_VERSIONS}; do + if ver_test ${pv} -lt ${FIRMWARE_ABI_VERSION}; then + return 0 + fi + done + return 1 +} + +pkg_postinst() { + if [[ -n ${softmmu_targets} ]] && use kernel_linux; then + udev_reload + fi + + xdg_icon_cache_update + + [[ -z ${EPREFIX} ]] && [[ -f ${EROOT}/usr/libexec/qemu-bridge-helper ]] && \ + fcaps cap_net_admin "${EROOT}"/usr/libexec/qemu-bridge-helper + + DISABLE_AUTOFORMATTING=true + readme.gentoo_print_elog + + if use pin-upstream-blobs && firmware_abi_change; then + ewarn "This version of qemu pins new versions of firmware blobs:" + + if has_version 'sys-firmware/edk2-ovmf-bin'; then + ewarn " $(best_version sys-firmware/edk2-ovmf-bin)" + else + ewarn " $(best_version sys-firmware/edk2-ovmf)" + fi + + if has_version 'sys-firmware/seabios-bin'; then + ewarn " $(best_version sys-firmware/seabios-bin)" + else + ewarn " $(best_version sys-firmware/seabios)" + fi + + ewarn " $(best_version sys-firmware/ipxe)" + ewarn " $(best_version sys-firmware/sgabios)" + ewarn "This might break resume of hibernated guests (started with a different" + ewarn "firmware version) and live migration to/from qemu versions with different" + ewarn "firmware. Please (cold) restart all running guests. For functional" + ewarn "guest migration ensure that all" + ewarn "hosts run at least" + ewarn " app-emulation/qemu-${FIRMWARE_ABI_VERSION}." + fi +} + +pkg_info() { + echo "Using:" + echo " $(best_version app-emulation/spice-protocol)" + + if has_version 'sys-firmware/edk2-ovmf-bin'; then + echo " $(best_version sys-firmware/edk2-ovmf-bin)" + else + echo " $(best_version sys-firmware/edk2-ovmf)" + fi + + if has_version 'sys-firmware/seabios-bin'; then + echo " $(best_version sys-firmware/seabios-bin)" + else + echo " $(best_version sys-firmware/seabios)" + fi + + echo " $(best_version sys-firmware/ipxe)" + echo " $(best_version sys-firmware/sgabios)" +} + +pkg_postrm() { + xdg_icon_cache_update + udev_reload +} diff --git a/sdk_container/src/third_party/portage-stable/app-eselect/eselect-iptables/Manifest b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-iptables/Manifest new file mode 100644 index 0000000000..0688000c54 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-iptables/Manifest @@ -0,0 +1 @@ +DIST eselect-iptables-20220320.tar.xz 2152 BLAKE2B 82813bf7814b91f1cf6da35c5c893e8ca28a8f5b5885e234c12853b5dc3afd73b3e0512e9d3d379e81b466706eabef8774d1b5738dd12582bbf1e344294a80f8 SHA512 7783d94d3bc463e0e8e084368c3906358efd03c9e47898686943d4900babd84e038991338f78459fca410f618dd5a62020e3d2af5ae45554f323a70a9b284135 diff --git a/sdk_container/src/third_party/portage-stable/app-eselect/eselect-iptables/eselect-iptables-20220320.ebuild b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-iptables/eselect-iptables-20220320.ebuild new file mode 100644 index 0000000000..7dd19f3fb4 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-iptables/eselect-iptables-20220320.ebuild @@ -0,0 +1,25 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Manages the {,/usr}/sbin/iptables symlink" +HOMEPAGE="https://gitweb.gentoo.org/proj/eselect-iptables.git/" +SRC_URI="https://dev.gentoo.org/~chutzpah/dist/iptables/${P}.tar.xz + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" + +RDEPEND="app-admin/eselect" + +src_install() { + insinto /usr/share/eselect/modules + doins iptables.eselect + + local symlink + for symlink in {eb,arp}tables; do + dosym iptables.eselect /usr/share/eselect/modules/${symlink}.eselect + done +} diff --git a/sdk_container/src/third_party/portage-stable/app-eselect/eselect-iptables/metadata.xml b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-iptables/metadata.xml new file mode 100644 index 0000000000..de9d784241 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-iptables/metadata.xml @@ -0,0 +1,9 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + diff --git a/sdk_container/src/third_party/portage-stable/app-eselect/eselect-lib-bin-symlink/Manifest b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-lib-bin-symlink/Manifest new file mode 100644 index 0000000000..f83bcef9bd --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-lib-bin-symlink/Manifest @@ -0,0 +1 @@ +DIST eselect-lib-bin-symlink-0.1.1.tar.bz2 45376 BLAKE2B 59ffe0897a57115debf185344eb7fef5177394337c02dde6f67e79114e53f411edd5e5854c86beb4884eca6a51282a0dc09ee94e82cb0d0d0fd7e54a99e660ed SHA512 16b56153aa61534997f42641656c3feaf27243fece8cdd42e93ed0be5dabedafc316af8111cd7ff0e321666de8deb1a35e86032cd9590060f677ac7e68fd48bd diff --git a/sdk_container/src/third_party/portage-stable/app-eselect/eselect-lib-bin-symlink/eselect-lib-bin-symlink-0.1.1-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-lib-bin-symlink/eselect-lib-bin-symlink-0.1.1-r1.ebuild new file mode 100644 index 0000000000..15b7458170 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-lib-bin-symlink/eselect-lib-bin-symlink-0.1.1-r1.ebuild @@ -0,0 +1,15 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="An eselect library to manage executable symlinks" +HOMEPAGE="https://github.com/mgorny/eselect-lib-bin-symlink/" +SRC_URI="https://github.com/mgorny/eselect-lib-bin-symlink/releases/download/${P}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +RDEPEND="app-admin/eselect" diff --git a/sdk_container/src/third_party/portage-stable/app-eselect/eselect-lib-bin-symlink/eselect-lib-bin-symlink-9999.ebuild b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-lib-bin-symlink/eselect-lib-bin-symlink-9999.ebuild new file mode 100644 index 0000000000..208e978f8a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-lib-bin-symlink/eselect-lib-bin-symlink-9999.ebuild @@ -0,0 +1,22 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools git-r3 + +DESCRIPTION="An eselect library to manage executable symlinks" +HOMEPAGE="https://github.com/mgorny/eselect-lib-bin-symlink/" +EGIT_REPO_URI="https://github.com/mgorny/eselect-lib-bin-symlink.git" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="" + +RDEPEND="app-admin/eselect" + +src_prepare() { + default + eautoreconf +} diff --git a/sdk_container/src/third_party/portage-stable/app-eselect/eselect-lib-bin-symlink/metadata.xml b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-lib-bin-symlink/metadata.xml new file mode 100644 index 0000000000..744f610c82 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-lib-bin-symlink/metadata.xml @@ -0,0 +1,17 @@ + + + + + mgorny@gentoo.org + Michał Górny + + + + mgorny@gentoo.org + Michał Górny + + https://github.com/mgorny/eselect-lib-bin-symlink/issues/ + mgorny/eselect-lib-bin-symlink + + + diff --git a/sdk_container/src/third_party/portage-stable/app-eselect/eselect-pinentry/eselect-pinentry-0.7.1.ebuild b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-pinentry/eselect-pinentry-0.7.1.ebuild new file mode 100644 index 0000000000..2dc9957138 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-pinentry/eselect-pinentry-0.7.1.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Manage /usr/bin/pinentry symlink" +HOMEPAGE="https://www.gentoo.org/proj/en/eselect/" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +RDEPEND=">=app-eselect/eselect-lib-bin-symlink-0.1.1" + +S="${FILESDIR}" + +src_install() { + default + insinto /usr/share/eselect/modules + newins pinentry.eselect-${PV} pinentry.eselect +} diff --git a/sdk_container/src/third_party/portage-stable/app-eselect/eselect-pinentry/eselect-pinentry-0.7.2.ebuild b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-pinentry/eselect-pinentry-0.7.2.ebuild new file mode 100644 index 0000000000..a88d776c25 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-pinentry/eselect-pinentry-0.7.2.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Manage /usr/bin/pinentry symlink" +HOMEPAGE="https://www.gentoo.org/proj/en/eselect/" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +RDEPEND=">=app-eselect/eselect-lib-bin-symlink-0.1.1" + +S="${FILESDIR}" + +src_install() { + default + insinto /usr/share/eselect/modules + newins pinentry.eselect-${PV} pinentry.eselect +} diff --git a/sdk_container/src/third_party/portage-stable/app-eselect/eselect-pinentry/files/pinentry.eselect-0.7.1 b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-pinentry/files/pinentry.eselect-0.7.1 new file mode 100644 index 0000000000..77427c45da --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-pinentry/files/pinentry.eselect-0.7.1 @@ -0,0 +1,12 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +DESCRIPTION="Manage /usr/bin/pinentry implementation" +MAINTAINER="zlogene@gentoo.org" +VERSION="0.7.1" + +SYMLINK_PATH=/usr/bin/pinentry +SYMLINK_TARGETS=( pinentry-gnome3 pinentry-qt5 pinentry-curses pinentry-tty ) +SYMLINK_DESCRIPTION='pinentry binary' + +inherit bin-symlink diff --git a/sdk_container/src/third_party/portage-stable/app-eselect/eselect-pinentry/files/pinentry.eselect-0.7.2 b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-pinentry/files/pinentry.eselect-0.7.2 new file mode 100644 index 0000000000..c445cbf792 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-pinentry/files/pinentry.eselect-0.7.2 @@ -0,0 +1,12 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +DESCRIPTION="Manage /usr/bin/pinentry implementation" +MAINTAINER="zlogene@gentoo.org" +VERSION="0.7.2" + +SYMLINK_PATH=/usr/bin/pinentry +SYMLINK_TARGETS=( pinentry-efl pinentry-gnome3 pinentry-qt5 pinentry-curses pinentry-tty ) +SYMLINK_DESCRIPTION='pinentry binary' + +inherit bin-symlink diff --git a/sdk_container/src/third_party/portage-stable/app-eselect/eselect-pinentry/metadata.xml b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-pinentry/metadata.xml new file mode 100644 index 0000000000..31a6399a74 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-pinentry/metadata.xml @@ -0,0 +1,9 @@ + + + + + zlogene@gentoo.org + Mikle Kolyada + + + diff --git a/sdk_container/src/third_party/portage-stable/app-eselect/eselect-python/Manifest b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-python/Manifest new file mode 100644 index 0000000000..d56cf26998 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-python/Manifest @@ -0,0 +1,2 @@ +DIST eselect-python-20190417.tar.bz2 46698 BLAKE2B 6f0acad0abb21d8e4768cbeb12f7e871c316a940ebae4c02bdb1336095991cb6b6bf05661ab659115a67f29a09f2a9b57cfb0868019606ed550b5aa1863f6f71 SHA512 a461263a50a29f0493127ee4a027e49ca4d7631e9c8d16cffc8bdb98cc7e75b0796e45e70951d5559fb86f0db14141a3ea6a53bd4cf1e0cc83ed5c7f24173695 +DIST eselect-python-20200719.tar.bz2 47313 BLAKE2B 37270b1f5ad3dfcd4e19c71ae74da585e803afe89c43f8b912bccf0fbdb936916cf58fc780b654692bb9e6ab44310514bae5f10d19dcde6a0e63042f76abe81d SHA512 4b205a099ad079e5e28d3fdbe774c22f54b7c16bff2d28b54d0e20ee36be2339e928d4050eed74ef969d5815bf4bb691bf5ed6e98023b28972da6d5c7d8a2545 diff --git a/sdk_container/src/third_party/portage-stable/app-eselect/eselect-python/eselect-python-20190417.ebuild b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-python/eselect-python-20190417.ebuild new file mode 100644 index 0000000000..60eab9db53 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-python/eselect-python-20190417.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +if [[ ${PV} == "99999999" ]] ; then + inherit autotools git-r3 + EGIT_REPO_URI="git://anongit.gentoo.org/proj/${PN}.git" +else + SRC_URI="https://dev.gentoo.org/~mgorny/dist/${P}.tar.bz2" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +DESCRIPTION="Eselect module for management of multiple Python versions" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Python" + +LICENSE="GPL-2" +SLOT="0" +IUSE="" + +# python-exec-2.4.2 for working -l option +RDEPEND=">=app-admin/eselect-1.2.3 + >=dev-lang/python-exec-2.4.2" + +src_prepare() { + default + [[ ${PV} == "99999999" ]] && eautoreconf +} + +pkg_postinst() { + local py + + if has_version 'dev-lang/python'; then + eselect python update --if-unset + fi + + if has_version "=dev-lang/python-3*"; then + eselect python update "--python3" --if-unset + fi +} diff --git a/sdk_container/src/third_party/portage-stable/app-eselect/eselect-python/eselect-python-20200719.ebuild b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-python/eselect-python-20200719.ebuild new file mode 100644 index 0000000000..491fe41f04 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-python/eselect-python-20200719.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +if [[ ${PV} == "99999999" ]] ; then + inherit autotools git-r3 + EGIT_REPO_URI="git://anongit.gentoo.org/proj/${PN}.git" +else + SRC_URI="https://dev.gentoo.org/~chutzpah/dist/misc/${P}.tar.bz2" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +DESCRIPTION="Eselect module for management of multiple Python versions" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Python" + +LICENSE="GPL-2" +SLOT="0" + +# python-exec-2.4.2 for working -l option +RDEPEND=" + >=app-admin/eselect-1.2.3 + >=dev-lang/python-exec-2.4.2 +" + +src_prepare() { + default + [[ ${PV} == "99999999" ]] && eautoreconf +} + +pkg_postinst() { + local py + + if has_version 'dev-lang/python'; then + eselect python update --if-unset + fi + + if has_version "=dev-lang/python-3*"; then + eselect python update "--python3" --if-unset + fi +} diff --git a/sdk_container/src/third_party/portage-stable/app-eselect/eselect-python/eselect-python-99999999.ebuild b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-python/eselect-python-99999999.ebuild new file mode 100644 index 0000000000..85d1f8d7e5 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-python/eselect-python-99999999.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +if [[ ${PV} == "99999999" ]] ; then + inherit autotools git-r3 + EGIT_REPO_URI="git://anongit.gentoo.org/proj/${PN}.git" +else + SRC_URI="https://dev.gentoo.org/~chutzpah/dist/misc/${P}.tar.bz2" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +DESCRIPTION="Eselect module for management of multiple Python versions" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Python" + +LICENSE="GPL-2" +SLOT="0" + +# python-exec-2.4.2 for working -l option +RDEPEND=" + >=app-admin/eselect-1.2.3 + >=dev-lang/python-exec-2.4.2 +" + +src_prepare() { + default + [[ ${PV} == "99999999" ]] && eautoreconf +} + +pkg_postinst() { + local py + + if has_version 'dev-lang/python'; then + eselect python update --if-unset + fi + + if has_version "=dev-lang/python-3*"; then + eselect python update "--python3" --if-unset + fi +} diff --git a/sdk_container/src/third_party/portage-stable/app-eselect/eselect-python/metadata.xml b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-python/metadata.xml new file mode 100644 index 0000000000..6ef265a39a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-python/metadata.xml @@ -0,0 +1,9 @@ + + + + + python@gentoo.org + Python + + + diff --git a/sdk_container/src/third_party/portage-stable/app-eselect/eselect-rust/Manifest b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-rust/Manifest new file mode 100644 index 0000000000..15244489dc --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-rust/Manifest @@ -0,0 +1,2 @@ +DIST eselect-rust-20200419.tar.bz2 50278 BLAKE2B 5d5e773a0e0481403e1645cb5fdf642e1ce5d1819e9699a79fcaf822ff3e6f258b2d1958548e00df200d9aaf061be1d3b1773e6b0e92b498fe75316ac13ff235 SHA512 68db32df19864a8365e272946161966b9cb513d7403dd1df7a4c7d87fba3b8bfcad59b407dca7dd6c8e0756f2e5cbde367ade69629eaa78d019d2b524051f741 +DIST eselect-rust-20210703.tar.bz2 4253 BLAKE2B 1d04c00db1794148b6d908c44172b8958f5ae2c7753875675387eea175ce914b7315452923a819d1b77bf22f10493ba9704c70d48388faa080b6af49efccb956 SHA512 b8f4f03f299a8415019746964347dffc5520dfcf79fd9d059bf600f63045ab80f8692509f0358be427c676ce98692ac8342b6f447aef21ce4d7ca048741b5e47 diff --git a/sdk_container/src/third_party/portage-stable/app-eselect/eselect-rust/eselect-rust-20200419.ebuild b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-rust/eselect-rust-20200419.ebuild new file mode 100644 index 0000000000..2934b8564d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-rust/eselect-rust-20200419.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +if [[ ${PV} == "99999999" ]] ; then + inherit autotools git-r3 + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git" +else + SRC_URI="https://dev.gentoo.org/~whissi/dist/${PN}/${P}.tar.bz2" + KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86" +fi + +DESCRIPTION="Eselect module for management of multiple Rust versions" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Rust" + +LICENSE="GPL-2" +SLOT="0" +IUSE="" + +RDEPEND=">=app-admin/eselect-1.2.3" + +src_prepare() { + default + [[ ${PV} == "99999999" ]] && eautoreconf +} + +pkg_postinst() { + if has_version 'dev-lang/rust' || has_version 'dev-lang/rust-bin'; then + eselect rust update --if-unset + fi +} diff --git a/sdk_container/src/third_party/portage-stable/app-eselect/eselect-rust/eselect-rust-20210703.ebuild b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-rust/eselect-rust-20210703.ebuild new file mode 100644 index 0000000000..210ce3086b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-rust/eselect-rust-20210703.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit autotools +if [[ ${PV} == "99999999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git" +else + SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2" + KEYWORDS="amd64 arm arm64 ~ppc ppc64 ~riscv x86" +fi + +DESCRIPTION="Eselect module for management of multiple Rust versions" +HOMEPAGE="https://gitweb.gentoo.org/proj/eselect-rust.git" + +LICENSE="GPL-2" +SLOT="0" +IUSE="" + +RDEPEND=">=app-admin/eselect-1.2.3" + +src_prepare() { + default + eautoreconf +} + +pkg_postinst() { + if has_version 'dev-lang/rust' || has_version 'dev-lang/rust-bin'; then + eselect rust update --if-unset + fi +} diff --git a/sdk_container/src/third_party/portage-stable/app-eselect/eselect-rust/metadata.xml b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-rust/metadata.xml new file mode 100644 index 0000000000..0e253718b2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-rust/metadata.xml @@ -0,0 +1,8 @@ + + + + + rust@gentoo.org + + + diff --git a/sdk_container/src/third_party/portage-stable/app-eselect/eselect-vi/Manifest b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-vi/Manifest new file mode 100644 index 0000000000..c34b57b3cd --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-vi/Manifest @@ -0,0 +1 @@ +DIST eselect-vi-1.2.tar.gz 2078 BLAKE2B 0f78afe201d9db72de005e035fd044435faf76b0027ce570cad09f3b4f0f497631f57107222de5e649c8badc0cbc3172edd1f1600e5b7bee8ba6f78b2ae9277a SHA512 77ec5281a25156d4a6c4b35fb154aa5837e4d2335637ecdb66a75984419439526f2215abe39a4d08e68d8dd3e337f47947f5a8fbf89ae7ecca8631e7dbf50dc5 diff --git a/sdk_container/src/third_party/portage-stable/app-eselect/eselect-vi/eselect-vi-1.2.ebuild b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-vi/eselect-vi-1.2.ebuild new file mode 100644 index 0000000000..d2946d800f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-vi/eselect-vi-1.2.ebuild @@ -0,0 +1,21 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools + +DESCRIPTION="Manages the /usr/bin/vi symlink" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Vim" +SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +RDEPEND="app-admin/eselect" + +src_prepare() { + default + eautoreconf +} diff --git a/sdk_container/src/third_party/portage-stable/app-eselect/eselect-vi/metadata.xml b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-vi/metadata.xml new file mode 100644 index 0000000000..f8a2bb7497 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-eselect/eselect-vi/metadata.xml @@ -0,0 +1,9 @@ + + + + + vim@gentoo.org + Gentoo Vim Project + + + diff --git a/sdk_container/src/third_party/portage-stable/app-misc/c_rehash/Manifest b/sdk_container/src/third_party/portage-stable/app-misc/c_rehash/Manifest new file mode 100644 index 0000000000..8767c622c3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/c_rehash/Manifest @@ -0,0 +1 @@ +DIST openssl-c_rehash.sh.1.7 4167 BLAKE2B fc501a74aec82f37c4c967434df208ac38fc9f7385db6e0bc90fa8d8aef2e5f71b40f0a40d59e2f8e57e9e8883251e4f977759fb484f4b4b6def14967789b55e SHA512 55e8c2e827750a4f375cb83c86bfe2d166c01ffa5d7e9b16657b72b38b747c8985dd2c98f854c911dfbbee2ff3e92aff39fdf089d979b2e3534b7685ee8b80da diff --git a/sdk_container/src/third_party/portage-stable/app-misc/c_rehash/c_rehash-1.7-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-misc/c_rehash/c_rehash-1.7-r1.ebuild new file mode 100644 index 0000000000..1aecc57e19 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/c_rehash/c_rehash-1.7-r1.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="c_rehash script from OpenSSL" +HOMEPAGE="https://www.openssl.org/ https://github.com/pld-linux/openssl/" +SRC_URI="https://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/openssl/openssl-c_rehash.sh?rev=${PV} -> openssl-c_rehash.sh.${PV}" +S="${WORKDIR}" + +LICENSE="openssl" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" + +RDEPEND="! "${WORKDIR}"/c_rehash || die #416717 +} + +src_install() { + dobin c_rehash +} diff --git a/sdk_container/src/third_party/portage-stable/app-misc/c_rehash/metadata.xml b/sdk_container/src/third_party/portage-stable/app-misc/c_rehash/metadata.xml new file mode 100644 index 0000000000..c475d14b20 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/c_rehash/metadata.xml @@ -0,0 +1,11 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + pld-linux/openssl + + diff --git a/sdk_container/src/third_party/portage-stable/app-misc/editor-wrapper/editor-wrapper-4-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-misc/editor-wrapper/editor-wrapper-4-r1.ebuild new file mode 100644 index 0000000000..39f32a9835 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/editor-wrapper/editor-wrapper-4-r1.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Wrapper scripts that will execute EDITOR or PAGER" +# There is no upstream, everything is in FILESDIR. +HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +S="${WORKDIR}" + +src_prepare() { + sed -e 's/@VAR@/EDITOR/g' "${FILESDIR}/${P}.sh" >editor || die + sed -e 's/@VAR@/PAGER/g' "${FILESDIR}/${P}.sh" >pager || die + if use prefix ; then + sed -i \ + -e "s:#!/bin/sh:#!/usr/bin/env sh:" \ + -e "s: /etc/profile: \"${EPREFIX}/etc/profile\":" \ + editor pager || die + fi + eapply_user +} + +src_install() { + exeinto /usr/libexec + doexe editor pager +} diff --git a/sdk_container/src/third_party/portage-stable/app-misc/editor-wrapper/files/editor-wrapper-4.sh b/sdk_container/src/third_party/portage-stable/app-misc/editor-wrapper/files/editor-wrapper-4.sh new file mode 100644 index 0000000000..9c8fe95995 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/editor-wrapper/files/editor-wrapper-4.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# Copyright 2009-2011 Gentoo Authors +# Distributed under the terms of the MIT/X11 license + +# Wrapper script, executes ${@VAR@} with arguments $@ + +if [ -z "${@VAR@}" ]; then + # Try to get @VAR@ from system profile + @VAR@=$(. /etc/profile >/dev/null 2>&1; echo "${@VAR@}") +fi + +if [ -z "${@VAR@}" ]; then + echo "$0: The @VAR@ variable must be set" >&2 + exit 1 +fi + +exec ${@VAR@} "$@" diff --git a/sdk_container/src/third_party/portage-stable/app-misc/editor-wrapper/metadata.xml b/sdk_container/src/third_party/portage-stable/app-misc/editor-wrapper/metadata.xml new file mode 100644 index 0000000000..d5d93f9566 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/editor-wrapper/metadata.xml @@ -0,0 +1,12 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + emacs@gentoo.org + Gentoo Emacs project + + diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/Manifest b/sdk_container/src/third_party/portage-stable/app-misc/jq/Manifest new file mode 100644 index 0000000000..160ab21536 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/jq/Manifest @@ -0,0 +1,2 @@ +DIST jq-1.6.tar.gz 1750584 BLAKE2B c9be1314e9d027247de63492ee362e996ef85faf45a47ee421cad95ebde9188bff8d3fc7db64e717ab922e1052f3b1c1500f5589fc5b2199ab66effb000e442d SHA512 5da71f53c325257f1f546a2520fe47828b495c953270df25ea0e37741463fdda72f0ba4d5b05b25114ec30f27a559344c2b024bacabf610759f4e3e9efadb480 +DIST jq-1.7_pre20201109.tar.gz 1181867 BLAKE2B 9db187ab927b635c43fbc6191aeffa00451b12253ae023bbabe6fba5fdf8fb393f8450ee2011ef58cb93e2f27994d454fac967984a721439aaac93259c02f7f1 SHA512 f2997d70edb36d0a23b71a7d933a763cedd7c74ffa3129c2a6cb7189aaff1c5095cdc51062b7cd119324ec2c83ebae6ff0b7da3941315303b7a31146b9eb285a diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.6-r3-never-bundle-oniguruma.patch b/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.6-r3-never-bundle-oniguruma.patch new file mode 100644 index 0000000000..75ab111f88 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.6-r3-never-bundle-oniguruma.patch @@ -0,0 +1,27 @@ +diff --git a/Makefile.am b/Makefile.am +index 6344b4e..86d968e 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -47,7 +47,7 @@ AM_YFLAGS = --warnings=all -d + + lib_LTLIBRARIES = libjq.la + libjq_la_SOURCES = ${LIBJQ_SRC} +-libjq_la_LIBADD = -lm ++libjq_la_LIBADD = -lm $(onig_LIBS) + libjq_la_LDFLAGS = $(onig_LDFLAGS) -export-symbols-regex '^j[qv]_' -version-info 1:4:0 + + if WIN32 +diff --git a/configure.ac b/configure.ac +index 280694c..d96026e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -249,6 +249,9 @@ AS_IF([test "x$with_oniguruma" != xno], [ + onig_CFLAGS="-I${with_oniguruma}/include" + onig_LDFLAGS="-L${with_oniguruma}/lib" + ]) ++ ], [ ++ # with_oniguruma == yes ++ PKG_CHECK_MODULES([onig], [oniguruma]) + ]) + AS_IF([test "x$build_oniguruma" = xno], [ + # check for ONIGURUMA library, either in /usr or where requested diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.6-runpath.patch b/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.6-runpath.patch new file mode 100644 index 0000000000..40a2ed02f3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.6-runpath.patch @@ -0,0 +1,17 @@ +diff --git a/configure.ac b/configure.ac +index 280694c..7227c9d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -280,4 +280,11 @@ AC_SUBST([BUNDLER], ["$bundle_cmd"]) + AC_CONFIG_MACRO_DIR([config/m4]) + AC_CONFIG_FILES([Makefile]) + AC_OUTPUT +- ++AC_ARG_ENABLE([rpathhack], ++ [AC_HELP_STRING([--enable-rpathhack], [patch libtool to remove RPATH])], ++ [ ++AC_MSG_RESULT([patching libtool to fix rpath]) ++sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool ++sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool ++ ], ++ []) diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.6-segfault-fix.patch b/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.6-segfault-fix.patch new file mode 100644 index 0000000000..8eb7d456bc --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.6-segfault-fix.patch @@ -0,0 +1,22 @@ +From a1f1231a73c221155d539a281181ef37f874869d Mon Sep 17 00:00:00 2001 +From: William Langford +Date: Tue, 20 Nov 2018 09:58:25 -0500 +Subject: [PATCH] Add missing jv_copy when printing with -ar + +--- + src/main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/main.c b/src/main.c +index b154689e..61ae43f9 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -168,7 +168,7 @@ static int process(jq_state *jq, jv value, int flags, int dumpopts) { + while (jv_is_valid(result = jq_next(jq))) { + if ((options & RAW_OUTPUT) && jv_get_kind(result) == JV_KIND_STRING) { + if (options & ASCII_OUTPUT) { +- jv_dumpf(result, stdout, JV_PRINT_ASCII); ++ jv_dumpf(jv_copy(result), stdout, JV_PRINT_ASCII); + } else { + fwrite(jv_string_value(result), 1, jv_string_length_bytes(jv_copy(result)), stdout); + } diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.7-runpath.patch b/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.7-runpath.patch new file mode 100644 index 0000000000..a8f76f7c90 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.7-runpath.patch @@ -0,0 +1,17 @@ +diff --git a/configure.ac b/configure.ac +index 0441d4a..8f1aa23 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -283,4 +283,11 @@ AC_SUBST([BUNDLER], ["$bundle_cmd"]) + AC_CONFIG_MACRO_DIR([config/m4]) + AC_CONFIG_FILES([Makefile libjq.pc]) + AC_OUTPUT +- ++AC_ARG_ENABLE([rpathhack], ++ [AC_HELP_STRING([--enable-rpathhack], [patch libtool to remove RPATH])], ++ [ ++AC_MSG_RESULT([patching libtool to fix rpath]) ++sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool ++sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool ++ ], ++ []) diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.7-visible-null.patch b/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.7-visible-null.patch new file mode 100644 index 0000000000..41e55df721 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.7-visible-null.patch @@ -0,0 +1,41 @@ +diff --git a/src/jv_print.c b/src/jv_print.c +index 2e781bb..e621b31 100644 +--- a/src/jv_print.c ++++ b/src/jv_print.c +@@ -32,7 +32,7 @@ static const jv_kind color_kinds[] = + static char color_bufs[sizeof(color_kinds)/sizeof(color_kinds[0])][16]; + static const char *color_bufps[8]; + static const char* def_colors[] = +- {COL("1;30"), COL("0;37"), COL("0;37"), COL("0;37"), ++ {COL("1;90"), COL("0;37"), COL("0;37"), COL("0;37"), + COL("0;32"), COL("1;37"), COL("1;37")}; + #define FIELD_COLOR COL("34;1") + +diff --git a/tests/shtest b/tests/shtest +index 8ed62b2..2d3f0da 100755 +--- a/tests/shtest ++++ b/tests/shtest +@@ -280,12 +280,12 @@ fi + + # Check $JQ_COLORS + $JQ -Ccn . > $d/color +-printf '\033[1;30mnull\033[0m\n' > $d/expect ++printf '\033[1;90mnull\033[0m\n' > $d/expect + cmp $d/color $d/expect + JQ_COLORS='4;31' $JQ -Ccn . > $d/color + printf '\033[4;31mnull\033[0m\n' > $d/expect + cmp $d/color $d/expect +-JQ_COLORS='1;30:0;31:0;32:0;33:0;34:1;35:1;36' \ ++JQ_COLORS='1;90:0;31:0;32:0;33:0;34:1;35:1;36' \ + $JQ -Ccn '[{"a":true,"b":false},123,null]' > $d/color + ( + printf '\033[1;35m[\033[1;36m{' +@@ -298,7 +298,7 @@ printf '[0m\033[0;31mfalse\033' + printf '[0m\033[1;36m\033[1;36' + printf 'm}\033[0m\033[1;35m,\033[' + printf '0;33m123\033[0m\033[1;' +-printf '35m,\033[1;30mnull\033' ++printf '35m,\033[1;90mnull\033' + printf '[0m\033[1;35m\033[1;35' + printf 'm]\033[0m\n' + ) > $d/expect diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.7-warnings.patch b/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.7-warnings.patch new file mode 100644 index 0000000000..0047ca391c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.7-warnings.patch @@ -0,0 +1,44 @@ +diff --git a/src/builtin.c b/src/builtin.c +index bf80c7b..12db573 100644 +--- a/src/builtin.c ++++ b/src/builtin.c +@@ -1,5 +1,6 @@ + #define _BSD_SOURCE + #define _GNU_SOURCE ++#define _DEFAULT_SOURCE + #ifndef __sun__ + # define _XOPEN_SOURCE + # define _XOPEN_SOURCE_EXTENDED 1 +diff --git a/src/jv_dtoa.c b/src/jv_dtoa.c +index 33feb99..fcbd902 100644 +--- a/src/jv_dtoa.c ++++ b/src/jv_dtoa.c +@@ -2327,7 +2327,7 @@ retlow1: + jvp_strtod + (struct dtoa_context* C, const char *s00, char **se) + { +- int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, e, e1, test_scale; ++ int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, e, e1; + int esign, i, j, k, nd, nd0, nf, nz, nz0, nz1, sign; + CONST char *s, *s0, *s1; + double aadj, aadj1; +diff --git a/src/jv_dtoa_tsd.c b/src/jv_dtoa_tsd.c +index 0f95df4..e5209dd 100644 +--- a/src/jv_dtoa_tsd.c ++++ b/src/jv_dtoa_tsd.c +@@ -24,7 +24,7 @@ static void tsd_dtoa_ctx_fini() { + } + + static void tsd_dtoa_ctx_init() { +- if (pthread_key_create(&dtoa_ctx_key, tsd_dtoa_ctx_dtor) != 0) { ++ if (pthread_key_create(&dtoa_ctx_key, (void (*)(void *))tsd_dtoa_ctx_dtor) != 0) { + fprintf(stderr, "error: cannot create thread specific key"); + abort(); + } +@@ -43,4 +43,4 @@ inline struct dtoa_context *tsd_dtoa_context_get() { + } + } + return ctx; +-} +\ No newline at end of file ++} diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.7_pre20201109-no-git-bdep.patch b/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.7_pre20201109-no-git-bdep.patch new file mode 100644 index 0000000000..726624df13 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.7_pre20201109-no-git-bdep.patch @@ -0,0 +1,13 @@ +diff --git a/configure.ac b/configure.ac +index 0441d4a..592ceb9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1,8 +1,3 @@ +-m4_define([jq_version], +- m4_esyscmd_s([(git rev-parse --verify -q jq-1.0 > /dev/null && +- (git describe --tags --dirty --match 'jq-*'|sed 's/^jq-//')) || +- echo `git rev-parse --abbrev-ref HEAD`-`git describe --always --dirty`]))) +- + AC_INIT([jq], [jq_version], [https://github.com/stedolan/jq/issues], + [jq], [https://stedolan.github.io/jq]) + diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.6-r3.ebuild b/sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.6-r3.ebuild new file mode 100644 index 0000000000..f1172ab62a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.6-r3.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools + +DESCRIPTION="A lightweight and flexible command-line JSON processor" +HOMEPAGE="https://stedolan.github.io/jq/" +SRC_URI="https://github.com/stedolan/jq/releases/download/${P}/${P}.tar.gz" + +LICENSE="MIT CC-BY-3.0" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 x86 ~amd64-linux ~x64-macos" +IUSE="oniguruma static-libs" + +ONIGURUMA_MINPV='>=dev-libs/oniguruma-6.1.3' # Keep this in sync with bundled modules/oniguruma/ +DEPEND=" + >=sys-devel/bison-3.0 + sys-devel/flex + oniguruma? ( ${ONIGURUMA_MINPV}:=[static-libs?] ) +" +RDEPEND=" + !static-libs? ( + oniguruma? ( ${ONIGURUMA_MINPV}[static-libs?] ) + ) +" + +src_prepare() { + local PATCHES=( + "${FILESDIR}"/jq-1.6-r3-never-bundle-oniguruma.patch + "${FILESDIR}"/jq-1.6-runpath.patch + "${FILESDIR}"/jq-1.6-segfault-fix.patch + ) + use oniguruma || { sed -i 's:tests/onigtest::' Makefile.am || die; } + sed -i '/^dist_doc_DATA/d' Makefile.am || die + sed -i -r "s:(m4_define\(\[jq_version\],) .+\):\1 \[${PV}\]):" \ + configure.ac || die + + # jq-1.6-r3-never-bundle-oniguruma makes sure we build with the system oniguruma, + # but the bundled copy of oniguruma still gets eautoreconf'd since it + # exists; save the cycles by nuking it. + sed -i -e '/modules\/oniguruma/d' Makefile.am || die + rm -rf "${S}"/modules/oniguruma || die + + default + eautoreconf +} + +src_configure() { + local econfargs=( + # don't try to rebuild docs + --disable-docs + --disable-valgrind + --disable-maintainer-mode + --enable-rpathhack + $(use_enable static-libs static) + $(use_with oniguruma oniguruma yes) + ) + econf "${econfargs[@]}" +} + +src_test() { + if ! emake check; then + if [[ -r test-suite.log ]]; then + eerror "Tests failed, outputting testsuite log" + cat test-suite.log + fi + die "Tests failed" + fi +} + +src_install() { + local DOCS=( AUTHORS README.md ) + default + + use static-libs || { find "${D}" -name '*.la' -delete || die; } +} diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.7_pre20201109.ebuild b/sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.7_pre20201109.ebuild new file mode 100644 index 0000000000..62a69454eb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.7_pre20201109.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools + +COMMIT_HASH="a17dd3248a666d01be75f6b16be37e80e20b0954" + +DESCRIPTION="A lightweight and flexible command-line JSON processor" +HOMEPAGE="https://stedolan.github.io/jq/" +#SRC_URI="https://github.com/stedolan/jq/releases/download/${P}/${P}.tar.gz" +SRC_URI="https://github.com/stedolan/jq/archive/${COMMIT_HASH}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${PN}-${COMMIT_HASH}" + +LICENSE="MIT CC-BY-3.0" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ~ppc ppc64 ~riscv x86 ~amd64-linux ~x64-macos" +IUSE="+oniguruma static-libs test" + +ONIGURUMA_MINPV='>=dev-libs/oniguruma-6.1.3' # Keep this in sync with bundled modules/oniguruma/ +DEPEND=" + >=sys-devel/bison-3.0 + sys-devel/flex + oniguruma? ( ${ONIGURUMA_MINPV}:=[static-libs?] ) +" +RDEPEND=" + !static-libs? ( + oniguruma? ( ${ONIGURUMA_MINPV}[static-libs?] ) + ) +" +PATCHES=( + "${FILESDIR}"/jq-1.6-r3-never-bundle-oniguruma.patch + "${FILESDIR}"/jq-1.7-runpath.patch + "${FILESDIR}"/jq-1.7-warnings.patch + "${FILESDIR}"/jq-1.7-visible-null.patch + # https://bugs.gentoo.org/776385 + "${FILESDIR}"/jq-1.7_pre20201109-no-git-bdep.patch +) + +RESTRICT="!test? ( test )" +REQUIRED_USE="test? ( oniguruma )" + +src_prepare() { + sed -e '/^dist_doc_DATA/d; s:-Wextra ::' -i Makefile.am || die + sed -r -e "s:(m4_define\(\[jq_version\],) .+\):\1 \[${PV}\]):" \ + -i configure.ac || die + + # jq-1.6-r3-never-bundle-oniguruma makes sure we build with the system oniguruma, + # but the bundled copy of oniguruma still gets eautoreconf'd since it + # exists; save the cycles by nuking it. + sed -e '/modules\/oniguruma/d' -i Makefile.am || die + rm -rf "${S}"/modules/oniguruma || die + + default + eautoreconf +} + +src_configure() { + local econfargs=( + # don't try to rebuild docs + --disable-docs + --disable-valgrind + --disable-maintainer-mode + --enable-rpathhack + $(use_enable static-libs static) + $(use_with oniguruma oniguruma yes) + ) + econf "${econfargs[@]}" +} + +src_test() { + if ! LD_LIBRARY_PATH="${S}/.libs" nonfatal emake check; then + if [[ -r "${S}/test-suite.log" ]]; then + eerror "Tests failed, outputting testsuite log" + cat "${S}/test-suite.log" + fi + die "Tests failed" + fi +} + +src_install() { + local DOCS=( AUTHORS NEWS README.md ) + default + + use static-libs || { find "${D}" -name '*.la' -delete || die; } +} diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/metadata.xml b/sdk_container/src/third_party/portage-stable/app-misc/jq/metadata.xml new file mode 100644 index 0000000000..e0cbe69287 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/jq/metadata.xml @@ -0,0 +1,19 @@ + + + + + vpayno+gentoo@gmail.com + Victor Payno + + + chutzpah@gentoo.org + Patrick McLean + + + Use dev-libs/oniguruma for regular expression support + + + cpe:/a:jq_project:jq + stedolan/jq + + diff --git a/sdk_container/src/third_party/portage-stable/app-misc/mime-types/Manifest b/sdk_container/src/third_party/portage-stable/app-misc/mime-types/Manifest new file mode 100644 index 0000000000..c8a000bcec --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/mime-types/Manifest @@ -0,0 +1 @@ +DIST mime-types-9.tar.bz2 15524 BLAKE2B 075f73f6d41a6b9100baf891378b12658c1370ac3aee8ba47cdb972cf30835eb2e9f6eb8a6314a7097dc5f90b091607519750860b065a2c4a822e26223925447 SHA512 066cea30c02a326e64680422b31aff0849c0a8c7486738f2edf339b88426c6ac5a365d4fa4c80c84df0fa4c39b5e13d45db314a1bf47ce369c132dd1c46130d6 diff --git a/sdk_container/src/third_party/portage-stable/app-misc/mime-types/metadata.xml b/sdk_container/src/third_party/portage-stable/app-misc/mime-types/metadata.xml new file mode 100644 index 0000000000..99473ec9f8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/mime-types/metadata.xml @@ -0,0 +1,8 @@ + + + + + djc@gentoo.org + Dirkjan Ochtman + + diff --git a/sdk_container/src/third_party/portage-stable/app-misc/mime-types/mime-types-9.ebuild b/sdk_container/src/third_party/portage-stable/app-misc/mime-types/mime-types-9.ebuild new file mode 100644 index 0000000000..aff82ac6ba --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/mime-types/mime-types-9.ebuild @@ -0,0 +1,17 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Provides /etc/mime.types file" +HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" +SRC_URI="mirror://gentoo/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +src_install() { + insinto /etc + doins mime.types +} diff --git a/sdk_container/src/third_party/portage-stable/app-misc/pax-utils/Manifest b/sdk_container/src/third_party/portage-stable/app-misc/pax-utils/Manifest new file mode 100644 index 0000000000..7999254b28 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/pax-utils/Manifest @@ -0,0 +1,3 @@ +DIST pax-utils-1.3.1.tar.xz 718384 BLAKE2B eef34077dfaceba1bf6f3d56b5e9990090e6d6c5d8c14f7f4bd8506040f0abdcf1a7bd52c643092faa74d991f22ed48c96924572a50c556aaf879dd411569457 SHA512 1a3a463f3864a420b4dcdd8e5736fbee785ed7cb19545966819493cc98d3cea670eb44592c7f100188b2d45b58908bc1f8e2e010f8842c51b70495b260a03102 +DIST pax-utils-1.3.2.tar.xz 725916 BLAKE2B ff792288b22c185501123d3e152ebae891585d5fbbbb1957f62c68fca3b342b8ca986d53611677aff4566ad4483afb3c69f40738be4cf5d653ca469e72b5661a SHA512 50330a34d9b7b33c67be079eb871e6dafe29c72f2fc42fec0e51aa9a2e0c1eb95e6d27a4dc1affe6647cdf4c9357545336d48c9e27a7e0106d57532a0f53cdcc +DIST pax-utils-1.3.3.tar.xz 725900 BLAKE2B 17004a4fe57f05e80e0c51a156931975cbaf73e20d96fa50dedf6bd1538ff3f8383591f4b5fd0df926a6a6b75cb083724aaf92b1a4d4ebc67290500520919c29 SHA512 bb0d03371cf8f0cc26a83cbee888a6d91e70416dedc740476cd5549ddaef67048c6802e30e469ab1aced0fd7f63f84e9644744602b2d483ef7af37191505f72e diff --git a/sdk_container/src/third_party/portage-stable/app-misc/pax-utils/metadata.xml b/sdk_container/src/third_party/portage-stable/app-misc/pax-utils/metadata.xml new file mode 100644 index 0000000000..9d076f898d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/pax-utils/metadata.xml @@ -0,0 +1,15 @@ + + + + + toolchain@gentoo.org + Gentoo Toolchain Project + + A suite of ELF tools to aid auditing systems. Contains various ELF related utils for ELF32, ELF64 binaries useful for displaying PaX and security info on a large groups of binary files. + + Install a more powerful/faster version of lddtree + + + cpe:/a:gentoo:pax-utils + + diff --git a/sdk_container/src/third_party/portage-stable/app-misc/pax-utils/pax-utils-1.3.1.ebuild b/sdk_container/src/third_party/portage-stable/app-misc/pax-utils/pax-utils-1.3.1.ebuild new file mode 100644 index 0000000000..0811930618 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/pax-utils/pax-utils-1.3.1.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +PYTHON_COMPAT=( python3_{8,9,10} ) + +inherit python-single-r1 toolchain-funcs + +DESCRIPTION="ELF utils that can check files for security relevant properties" +HOMEPAGE="https://wiki.gentoo.org/index.php?title=Project:Hardened/PaX_Utilities" +SRC_URI="mirror://gentoo/${P}.tar.xz + https://dev.gentoo.org/~sam/distfiles/${P}.tar.xz + https://dev.gentoo.org/~vapier/dist/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="caps debug kernel_linux python seccomp" + +RDEPEND="caps? ( >=sys-libs/libcap-2.24 ) + python? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/pyelftools[${PYTHON_USEDEP}] + ') + ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + caps? ( virtual/pkgconfig ) +" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +_emake() { + emake \ + USE_CAP=$(usex caps) \ + USE_DEBUG=$(usex debug) \ + USE_PYTHON=$(usex python) \ + USE_SECCOMP=$(usex seccomp) \ + "$@" +} + +pkg_setup() { + if use python; then + python-single-r1_pkg_setup + fi +} + +src_configure() { + # Avoid slow configure+gnulib+make if on an up-to-date Linux system + if use prefix || ! use kernel_linux || + has_version ' + + + + diff --git a/sdk_container/src/third_party/portage-stable/app-misc/zisofs-tools/zisofs-tools-1.0.8.ebuild b/sdk_container/src/third_party/portage-stable/app-misc/zisofs-tools/zisofs-tools-1.0.8.ebuild new file mode 100644 index 0000000000..f5604a4dac --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/zisofs-tools/zisofs-tools-1.0.8.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit flag-o-matic + +DESCRIPTION="User utilities for zisofs" +HOMEPAGE="https://www.kernel.org/pub/linux/utils/fs/zisofs/" +SRC_URI="mirror://gentoo/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="static" + +RDEPEND=">=sys-libs/zlib-1.1.4:0=" +DEPEND="${RDEPEND}" + +src_configure() { + use static && append-ldflags -static + default +} + +src_install() { + emake INSTALLROOT="${D}" install + einstalldocs +} diff --git a/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/Manifest b/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/Manifest new file mode 100644 index 0000000000..e7c3087e8d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/Manifest @@ -0,0 +1,2 @@ +DIST elt-patches-20220831.tar.xz 41696 BLAKE2B c328faac2bc837fff5b9ec7dd2a891d3ab08ee30fb38d838fa6aeebbb832eb30db1f3d3b05e64c14f9cef27a21516cb6d960d7afe2314f37e25a0f77ef5d2862 SHA512 3cced1f515533ce65cef42a3c697ad0686a6c41a1b734c4558690cbdee4ebe60214b3d7f8dbb81974fc100a6882d83599f2dc77c206d9beea2449b2614319d1c +DIST elt-patches-20221210.tar.xz 42080 BLAKE2B abcdae6dedac89bd913d6809d335c13cd59b675c4b68198925bf758013e988a9bf82e9f6ccc3a70ac1c49775bb7579addda6c0bb7ea4ceea3c4b8e4acf0d65ea SHA512 3dad3c0be8d69de731bb10d5a6007539c2966f8a370a3dee27faf9655a38e39f272a9059cd98c8b6f32c2495143667f8b28a6a3425f22c0c5421f3969b417cf7 diff --git a/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20220831.ebuild b/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20220831.ebuild new file mode 100644 index 0000000000..2e87d726f4 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20220831.ebuild @@ -0,0 +1,25 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Collection of patches for libtool.eclass" +HOMEPAGE="https://gitweb.gentoo.org/proj/elt-patches.git/" +SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz + https://dev.gentoo.org/~vapier/dist/${P}.tar.xz + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~arm64-linux ~ppc64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" + +RDEPEND="sys-apps/gentoo-functions" +BDEPEND="app-arch/xz-utils" + +src_compile() { + emake rootprefix="${EPREFIX}" libdirname="$(get_libdir)" +} + +src_install() { + emake DESTDIR="${D}" rootprefix="${EPREFIX}" install +} diff --git a/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20221210.ebuild b/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20221210.ebuild new file mode 100644 index 0000000000..e9ea9fdac8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20221210.ebuild @@ -0,0 +1,25 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Collection of patches for libtool.eclass" +HOMEPAGE="https://gitweb.gentoo.org/proj/elt-patches.git/" +SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz + https://dev.gentoo.org/~vapier/dist/${P}.tar.xz + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~arm64-linux ~ppc64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" + +RDEPEND="sys-apps/gentoo-functions" +BDEPEND="app-arch/xz-utils" + +src_compile() { + emake rootprefix="${EPREFIX}" libdirname="$(get_libdir)" +} + +src_install() { + emake DESTDIR="${D}" rootprefix="${EPREFIX}" install +} diff --git a/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/metadata.xml b/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/metadata.xml new file mode 100644 index 0000000000..03193409a7 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/metadata.xml @@ -0,0 +1,11 @@ + + + + + base-system@gentoo.org + + + proj/elt-patches + gentoo/elt-patches + + diff --git a/sdk_container/src/third_party/portage-stable/app-portage/gentoolkit/Manifest b/sdk_container/src/third_party/portage-stable/app-portage/gentoolkit/Manifest new file mode 100644 index 0000000000..08bf8c5a57 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-portage/gentoolkit/Manifest @@ -0,0 +1,2 @@ +DIST gentoolkit-0.5.0.tar.gz 3206598 BLAKE2B a379dcbbaba9d52c241fea020b87c458384e44092539947909e14fd6c63fd9cc06d076b8081874edf17fc50e80fe48ceab3400c90046867dc409e7ac39c17231 SHA512 8a5c344f3a17c4c779abbcaa35b5e3f147106dbc61310d0d1a816ec8080914271fa45c311a8feeb1bfe14195af7cf34c0b29142d6e43e2de232dae96fbd00861 +DIST gentoolkit-0.5.1.tar.gz 3203805 BLAKE2B de2cd69aec9be79f498b1180a90afb54e77f9d8a47636cd722f2028a906d43874132d55a71bf373b3d10c7c10034f5d8ce0280a35041b0c60a1d5aa2ed6296a1 SHA512 667e464853b17ae297c59fb06e8f4563119a1382470d064c5721ae898e61173e9af5b071c7618d315232e6974fec205e27559785d2816253711de3e83d9e1911 diff --git a/sdk_container/src/third_party/portage-stable/app-portage/gentoolkit/files/gentoolkit-0.5.0-python3_9.patch b/sdk_container/src/third_party/portage-stable/app-portage/gentoolkit/files/gentoolkit-0.5.0-python3_9.patch new file mode 100644 index 0000000000..6a50db9ca6 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-portage/gentoolkit/files/gentoolkit-0.5.0-python3_9.patch @@ -0,0 +1,43 @@ +# https://github.com/gentoo/gentoolkit/pull/11 +# https://bugs.gentoo.org/747034 +diff --git a/pym/gentoolkit/metadata.py b/pym/gentoolkit/metadata.py +index 22c249e..c3dba98 100644 +--- a/pym/gentoolkit/metadata.py ++++ b/pym/gentoolkit/metadata.py +@@ -73,8 +73,7 @@ class _Maintainer(object): + self.description = None + self.restrict = node.get('restrict') + self.status = node.get('status') +- maint_attrs = node.getchildren() +- for attr in maint_attrs: ++ for attr in node.iter(): + setattr(self, attr.tag, attr.text) + + def __repr__(self): +@@ -101,7 +100,7 @@ class _Useflag(object): + _desc = '' + if node.text: + _desc = node.text +- for child in node.getchildren(): ++ for child in node.iter(): + _desc += child.text if child.text else '' + _desc += child.tail if child.tail else '' + # This takes care of tabs and newlines left from the file +@@ -213,7 +212,7 @@ class MetaData(object): + if herd in ('no-herd', 'maintainer-wanted', 'maintainer-needed'): + return None + +- for node in self._herdstree.getiterator('herd'): ++ for node in self._herdstree.iter('herd'): + if node.findtext('name') == herd: + return node.findtext('email') + +@@ -283,7 +282,7 @@ class MetaData(object): + return self._useflags + + self._useflags = [] +- for node in self._xml_tree.getiterator('flag'): ++ for node in self._xml_tree.iter('flag'): + self._useflags.append(_Useflag(node)) + + return self._useflags diff --git a/sdk_container/src/third_party/portage-stable/app-portage/gentoolkit/files/gentoolkit-0.5.0-r1-python3_9.patch b/sdk_container/src/third_party/portage-stable/app-portage/gentoolkit/files/gentoolkit-0.5.0-r1-python3_9.patch new file mode 100644 index 0000000000..a9dae61504 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-portage/gentoolkit/files/gentoolkit-0.5.0-r1-python3_9.patch @@ -0,0 +1,34 @@ +From f14b6198d1dd9cb7f4a83f3822e4a1782a5581e8 Mon Sep 17 00:00:00 2001 +From: Brian Dolbec +Date: Tue, 13 Oct 2020 10:04:07 -0400 +Subject: [PATCH] metadata.py: Fix duplicated use flag text bug 748129 + +Regression from commit: 517581df206766 +link: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=517581df206766fabf10273cde565e0a6dc62829 +Gentoo bug: https://bugs.gentoo.org/748129 +Signed-off-by: Brian Dolbec +--- + pym/gentoolkit/metadata.py | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/pym/gentoolkit/metadata.py b/pym/gentoolkit/metadata.py +index c3dba98..0b58392 100644 +--- a/pym/gentoolkit/metadata.py ++++ b/pym/gentoolkit/metadata.py +@@ -101,8 +101,11 @@ class _Useflag(object): + if node.text: + _desc = node.text + for child in node.iter(): +- _desc += child.text if child.text else '' +- _desc += child.tail if child.tail else '' ++ # prevent duplicate text ++ if child.text and child.text not in _desc: ++ _desc += child.text ++ if child.tail and not child.tail in _desc: ++ _desc += child.tail + # This takes care of tabs and newlines left from the file + self.description = re.sub(r'\s+', ' ', _desc) + +-- +libgit2 1.0.1 + diff --git a/sdk_container/src/third_party/portage-stable/app-portage/gentoolkit/gentoolkit-0.5.0-r3.ebuild b/sdk_container/src/third_party/portage-stable/app-portage/gentoolkit/gentoolkit-0.5.0-r3.ebuild new file mode 100644 index 0000000000..436222faf8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-portage/gentoolkit/gentoolkit-0.5.0-r3.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DISTUTILS_USE_SETUPTOOLS=no +PYTHON_COMPAT=( python3_{7,8,9} pypy3 ) +PYTHON_REQ_USE="xml(+),threads(+)" + +inherit distutils-r1 tmpfiles + +DESCRIPTION="Collection of administration scripts for Gentoo" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage-Tools" +SRC_URI="https://gitweb.gentoo.org/proj/gentoolkit.git/snapshot/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +IUSE="" + +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +DEPEND=" + sys-apps/portage[${PYTHON_USEDEP}]" +RDEPEND="${DEPEND} + sys-apps/gawk + sys-apps/gentoo-functions" + +distutils_enable_tests setup.py + +PATCHES=( + "${FILESDIR}"/${PN}-0.5.0-python3_9.patch + "${FILESDIR}"/${PN}-0.5.0-r1-python3_9.patch +) + +python_prepare_all() { + python_setup + echo VERSION="${PVR}" "${PYTHON}" setup.py set_version + VERSION="${PVR}" "${PYTHON}" setup.py set_version + distutils-r1_python_prepare_all + + if use prefix-guest ; then + # use correct repo name, bug #632223 + sed -i \ + -e "/load_profile_data/s/repo='gentoo'/repo='gentoo_prefix'/" \ + pym/gentoolkit/profile.py || die + fi +} + +pkg_preinst() { + if has_version "<${CATEGORY}/${PN}-0.4.0"; then + SHOW_GENTOOKIT_DEV_DEPRECATED_MSG=1 + fi +} + +pkg_postinst() { + tmpfiles_process revdep-rebuild.conf + + if [[ ${SHOW_GENTOOKIT_DEV_DEPRECATED_MSG} ]]; then + elog "Starting with version 0.4.0, ebump, ekeyword and imlate are now" + elog "part of the gentoolkit package." + elog "The gentoolkit-dev package is now deprecated in favor of a single" + elog "gentoolkit package. The remaining tools from gentoolkit-dev" + elog "are now obsolete/unused with the git based tree." + fi + + # Only show the elog information on a new install + if [[ ! ${REPLACING_VERSIONS} ]]; then + elog + elog "For further information on gentoolkit, please read the gentoolkit" + elog "guide: https://wiki.gentoo.org/wiki/Gentoolkit" + elog + elog "Another alternative to equery is app-portage/portage-utils" + elog + elog "Additional tools that may be of interest:" + elog + elog " app-admin/eclean-kernel" + elog " app-portage/diffmask" + elog " app-portage/flaggie" + elog " app-portage/portpeek" + elog " app-portage/smart-live-rebuild" + fi +} diff --git a/sdk_container/src/third_party/portage-stable/app-portage/gentoolkit/gentoolkit-0.5.1-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-portage/gentoolkit/gentoolkit-0.5.1-r1.ebuild new file mode 100644 index 0000000000..bb95e6309c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-portage/gentoolkit/gentoolkit-0.5.1-r1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DISTUTILS_USE_SETUPTOOLS=no +PYTHON_COMPAT=( python3_{7..10} pypy3 ) +PYTHON_REQ_USE="xml(+),threads(+)" + +inherit distutils-r1 tmpfiles + +if [[ ${PV} = 9999* ]]; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gentoolkit.git" + inherit git-r3 +else + SRC_URI="https://gitweb.gentoo.org/proj/gentoolkit.git/snapshot/${P}.tar.gz" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +DESCRIPTION="Collection of administration scripts for Gentoo" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage-Tools" + +LICENSE="GPL-2" +SLOT="0" + +DEPEND=" + sys-apps/portage[${PYTHON_USEDEP}]" +RDEPEND="${DEPEND} + sys-apps/gawk + sys-apps/gentoo-functions" + +distutils_enable_tests setup.py + +python_prepare_all() { + python_setup + echo VERSION="${PVR}" "${PYTHON}" setup.py set_version + VERSION="${PVR}" "${PYTHON}" setup.py set_version + distutils-r1_python_prepare_all + + if use prefix-guest ; then + # use correct repo name, bug #632223 + sed -i \ + -e "/load_profile_data/s/repo='gentoo'/repo='gentoo_prefix'/" \ + pym/gentoolkit/profile.py || die + fi +} + +pkg_postinst() { + tmpfiles_process revdep-rebuild.conf + + # Only show the elog information on a new install + if [[ ! ${REPLACING_VERSIONS} ]]; then + elog + elog "For further information on gentoolkit, please read the gentoolkit" + elog "guide: https://wiki.gentoo.org/wiki/Gentoolkit" + elog + elog "Another alternative to equery is app-portage/portage-utils" + elog + elog "Additional tools that may be of interest:" + elog + elog " app-admin/eclean-kernel" + elog " app-portage/diffmask" + elog " app-portage/flaggie" + elog " app-portage/portpeek" + elog " app-portage/smart-live-rebuild" + fi +} diff --git a/sdk_container/src/third_party/portage-stable/app-portage/gentoolkit/gentoolkit-9999.ebuild b/sdk_container/src/third_party/portage-stable/app-portage/gentoolkit/gentoolkit-9999.ebuild new file mode 100644 index 0000000000..db0fa476bf --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-portage/gentoolkit/gentoolkit-9999.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DISTUTILS_USE_SETUPTOOLS=no +PYTHON_COMPAT=( python3_{7..10} pypy3 ) +PYTHON_REQ_USE="xml(+),threads(+)" + +inherit distutils-r1 tmpfiles + +if [[ ${PV} = 9999* ]]; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gentoolkit.git" + inherit git-r3 +else + SRC_URI="https://gitweb.gentoo.org/proj/gentoolkit.git/snapshot/${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +DESCRIPTION="Collection of administration scripts for Gentoo" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage-Tools" + +LICENSE="GPL-2" +SLOT="0" + +DEPEND=" + sys-apps/portage[${PYTHON_USEDEP}]" +RDEPEND="${DEPEND} + sys-apps/gawk + sys-apps/gentoo-functions" + +distutils_enable_tests setup.py + +python_prepare_all() { + python_setup + echo VERSION="${PVR}" "${PYTHON}" setup.py set_version + VERSION="${PVR}" "${PYTHON}" setup.py set_version + distutils-r1_python_prepare_all + + if use prefix-guest ; then + # use correct repo name, bug #632223 + sed -i \ + -e "/load_profile_data/s/repo='gentoo'/repo='gentoo_prefix'/" \ + pym/gentoolkit/profile.py || die + fi +} + +pkg_postinst() { + tmpfiles_process revdep-rebuild.conf + + # Only show the elog information on a new install + if [[ ! ${REPLACING_VERSIONS} ]]; then + elog + elog "For further information on gentoolkit, please read the gentoolkit" + elog "guide: https://wiki.gentoo.org/wiki/Gentoolkit" + elog + elog "Another alternative to equery is app-portage/portage-utils" + elog + elog "Additional tools that may be of interest:" + elog + elog " app-admin/eclean-kernel" + elog " app-portage/diffmask" + elog " app-portage/flaggie" + elog " app-portage/portpeek" + elog " app-portage/smart-live-rebuild" + fi +} diff --git a/sdk_container/src/third_party/portage-stable/app-portage/gentoolkit/metadata.xml b/sdk_container/src/third_party/portage-stable/app-portage/gentoolkit/metadata.xml new file mode 100644 index 0000000000..38eac3c59b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-portage/gentoolkit/metadata.xml @@ -0,0 +1,14 @@ + + + + + tools-portage@gentoo.org + Gentoo Portage tools team + + +Gentoolkit is a collection of useful adminstration scripts particular to +the Gentoo Linux distribution. It contains rough drafts and +implementations of features that may in time make it into Portage, or +into full-fledged tools in their own right. + + diff --git a/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/Manifest b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/Manifest new file mode 100644 index 0000000000..095df425a8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/Manifest @@ -0,0 +1,3 @@ +DIST portage-utils-0.94.1.tar.xz 1871688 BLAKE2B bec5ddd514b397c157c3b1bff70d61730f15804a6751f56eb69c4030a35fc6a6b11fa1e2bde94332772660f02bf9428623210733ae9e2f1290f29aa3b31a1813 SHA512 29fdb4093997eb95703d407da6b00305c949f0a00ae3aa5cfb2c47b66bddc59e034fae114663b40b611f906332066b648018aa4e5bc1b935e61a64f4b4bf1088 +DIST portage-utils-0.94.3.tar.xz 1804720 BLAKE2B b0239a26d878db6dd73c9ee54f586526f8812921775126ef74afbe089186fdc5ca7197847e204c6ecbf9d79b6e2a6173cb0c39d4a26653ed0db2d7f9b10e88c5 SHA512 bf8fcccc26bb985bf7664f6ab0227a5251c3f918199de0c4e4c95b7107eb72eee367d1d524b5d9608b3c7eea9b1fae789456390cbb0d375297b807bb98644e01 +DIST portage-utils-0.94.4.tar.xz 1804252 BLAKE2B 4bdb3dca331eeeaeca34b949aa0228d81df71888fa7cb07f878958939f7820f6887ebb43f0a89d8ed8d787c152a631a731bc53f30c8241ca2530ee9420fea1e2 SHA512 d59a09c9b2dd4de8ed320a5b1c943a1d5dcdef41a057fbfeb00ed136e2ba87375d4562861de5b0e44bad986916d0f58487f3d93deaeb44e96385535d85d74217 diff --git a/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/metadata.xml b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/metadata.xml new file mode 100644 index 0000000000..cfb3f0574e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/metadata.xml @@ -0,0 +1,17 @@ + + + + + grobian@gentoo.org + Fabian Groffen + + + Build qmanifest applet, this adds additional dependencies for GPG, OpenSSL and BLAKE2B hashing + Build qtegrity applet, this adds additional dependencies for OpenSSL + + + cpe:/a:gentoo:portage + proj/portage-utils + gentoo/portage-utils + + diff --git a/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-0.94.1.ebuild b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-0.94.1.ebuild new file mode 100644 index 0000000000..294c81e741 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-0.94.1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Small and fast Portage helper tools written in C" +HOMEPAGE="https://wiki.gentoo.org/wiki/Portage-utils" + +LICENSE="GPL-2" +SLOT="0" +IUSE="nls static openmp +qmanifest +qtegrity" + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 autotools + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage-utils.git" +else + SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +RDEPEND=" + qmanifest? ( + openmp? ( + || ( + >=sys-devel/gcc-4.2:*[openmp] + sys-devel/clang-runtime:*[openmp] + ) + ) + static? ( + app-crypt/libb2:=[static-libs] + dev-libs/openssl:0=[static-libs] + sys-libs/zlib:=[static-libs] + app-crypt/gpgme:=[static-libs] + ) + !static? ( + app-crypt/libb2:= + dev-libs/openssl:0= + sys-libs/zlib:= + app-crypt/gpgme:= + ) + ) + qtegrity? ( + openmp? ( + || ( + >=sys-devel/gcc-4.2:*[openmp] + sys-devel/clang-runtime:*[openmp] + ) + ) + static? ( + dev-libs/openssl:0=[static-libs] + ) + !static? ( + dev-libs/openssl:0= + ) + ) +" +DEPEND="${RDEPEND}" + +src_configure() { + econf \ + --disable-maintainer-mode \ + --with-eprefix="${EPREFIX}" \ + $(use_enable qmanifest) \ + $(use_enable qtegrity) \ + $(use_enable openmp) \ + $(use_enable static) +} diff --git a/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-0.94.3.ebuild b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-0.94.3.ebuild new file mode 100644 index 0000000000..58f5e4abc7 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-0.94.3.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Small and fast Portage helper tools written in C" +HOMEPAGE="https://wiki.gentoo.org/wiki/Portage-utils" + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 autotools + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage-utils.git" +else + SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="openmp +qmanifest +qtegrity static" + +RDEPEND=" + qmanifest? ( + !static? ( + app-crypt/gpgme:= + app-crypt/libb2:= + dev-libs/openssl:= + sys-libs/zlib:= + ) + ) + qtegrity? ( + !static? ( + dev-libs/openssl:= + ) + )" +DEPEND="${RDEPEND} + qmanifest? ( + static? ( + app-crypt/gpgme[static-libs] + app-crypt/libb2[static-libs] + dev-libs/openssl[static-libs] + sys-libs/zlib[static-libs] + ) + ) + qtegrity? ( + static? ( + dev-libs/openssl[static-libs] + ) + )" +BDEPEND="virtual/pkgconfig" + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +src_prepare() { + default + [[ ${PV} == *9999 ]] && eautoreconf +} + +src_configure() { + use static && append-ldflags -static + + econf \ + --disable-maintainer-mode \ + --with-eprefix="${EPREFIX}" \ + $(use_enable qmanifest) \ + $(use_enable qtegrity) \ + $(use_enable openmp) +} diff --git a/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-0.94.4.ebuild b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-0.94.4.ebuild new file mode 100644 index 0000000000..b07e43f8a4 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-0.94.4.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Small and fast Portage helper tools written in C" +HOMEPAGE="https://wiki.gentoo.org/wiki/Portage-utils" + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 autotools + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage-utils.git" +else + SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="openmp +qmanifest +qtegrity static" + +RDEPEND=" + qmanifest? ( + !static? ( + app-crypt/gpgme:= + app-crypt/libb2:= + dev-libs/openssl:= + sys-libs/zlib:= + ) + ) + qtegrity? ( + !static? ( + dev-libs/openssl:= + ) + )" +DEPEND="${RDEPEND} + qmanifest? ( + static? ( + app-crypt/gpgme[static-libs] + app-crypt/libb2[static-libs] + dev-libs/openssl[static-libs] + sys-libs/zlib[static-libs] + ) + ) + qtegrity? ( + static? ( + dev-libs/openssl[static-libs] + ) + )" +BDEPEND="virtual/pkgconfig" + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +src_prepare() { + default + [[ ${PV} == *9999 ]] && eautoreconf +} + +src_configure() { + use static && append-ldflags -static + + econf \ + --disable-maintainer-mode \ + --with-eprefix="${EPREFIX}" \ + $(use_enable qmanifest) \ + $(use_enable qtegrity) \ + $(use_enable openmp) +} diff --git a/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-9999.ebuild b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-9999.ebuild new file mode 100644 index 0000000000..b07e43f8a4 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-9999.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Small and fast Portage helper tools written in C" +HOMEPAGE="https://wiki.gentoo.org/wiki/Portage-utils" + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 autotools + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage-utils.git" +else + SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="openmp +qmanifest +qtegrity static" + +RDEPEND=" + qmanifest? ( + !static? ( + app-crypt/gpgme:= + app-crypt/libb2:= + dev-libs/openssl:= + sys-libs/zlib:= + ) + ) + qtegrity? ( + !static? ( + dev-libs/openssl:= + ) + )" +DEPEND="${RDEPEND} + qmanifest? ( + static? ( + app-crypt/gpgme[static-libs] + app-crypt/libb2[static-libs] + dev-libs/openssl[static-libs] + sys-libs/zlib[static-libs] + ) + ) + qtegrity? ( + static? ( + dev-libs/openssl[static-libs] + ) + )" +BDEPEND="virtual/pkgconfig" + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +src_prepare() { + default + [[ ${PV} == *9999 ]] && eautoreconf +} + +src_configure() { + use static && append-ldflags -static + + econf \ + --disable-maintainer-mode \ + --with-eprefix="${EPREFIX}" \ + $(use_enable qmanifest) \ + $(use_enable qtegrity) \ + $(use_enable openmp) +} diff --git a/sdk_container/src/third_party/portage-stable/app-shells/bash-completion/Manifest b/sdk_container/src/third_party/portage-stable/app-shells/bash-completion/Manifest new file mode 100644 index 0000000000..886d43bc83 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-shells/bash-completion/Manifest @@ -0,0 +1,2 @@ +DIST bash-completion-2.11.tar.xz 311004 BLAKE2B 98e3ab6669bd70b49b238a597f1bc1309dc7ddd51c5b17c5e054f9161115d75d26e85d547471bc087e070d10554448b790a6dfb557abc413b70079ecc94acce3 SHA512 41585f730b5114d397831ba36d10d05643c6a6179e746ddc49aa1cbef61ea5525fd2f09b2e474adee14e647f99df8d5983ee48e29a59d8a30e1daf7fb1837e06 +DIST bashcomp-2.0.3.tar.gz 3539 BLAKE2B 75304d144792cc7f6ad5455a05a65c33c646d6f7384d020a06a1fcf012cd51625a3dd0750ad539253453b1eede196c340286a1e81737f0835b5091609ba01295 SHA512 b2bd185ccbd4456939ccc731cc1983fcec2b9564a9920642a753fadd5d897fdb96b925ac1524657629d621d45b37d99076c8ae72511a827e96ff6c388d720008 diff --git a/sdk_container/src/third_party/portage-stable/app-shells/bash-completion/bash-completion-2.11.ebuild b/sdk_container/src/third_party/portage-stable/app-shells/bash-completion/bash-completion-2.11.ebuild new file mode 100644 index 0000000000..36c924cea3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-shells/bash-completion/bash-completion-2.11.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +BASHCOMP_P=bashcomp-2.0.3 +PYTHON_COMPAT=( python3_{7..9} ) +inherit bash-completion-r1 python-any-r1 user-info + +DESCRIPTION="Programmable Completion for bash" +HOMEPAGE="https://github.com/scop/bash-completion" +SRC_URI=" + https://github.com/scop/bash-completion/releases/download/${PV}/${P}.tar.xz + eselect? ( https://github.com/mgorny/bashcomp2/releases/download/v${BASHCOMP_P#*-}/${BASHCOMP_P}.tar.gz )" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris" +IUSE="+eselect test" +RESTRICT="!test? ( test )" + +# completion collision with net-fs/mc +RDEPEND=">=app-shells/bash-4.3_p30-r1:0 + sys-apps/miscfiles + !!net-fs/mc" +DEPEND=" + test? ( + ${RDEPEND} + $(python_gen_any_dep ' + dev-python/pexpect[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] + ') + )" +PDEPEND=">=app-shells/gentoo-bashcomp-20140911" + +strip_completions() { + # Remove unwanted completions. + local strip_completions=( + # Slackware package stuff, quite generic names cause collisions + # (e.g. with sys-apps/pacman) + explodepkg installpkg makepkg pkgtool removepkg upgradepkg + + # Debian/Red Hat network stuff + ifdown ifup ifquery ifstatus + + # Installed in app-editors/vim-core + xxd + + # Now-dead symlinks to deprecated completions + hd ncal + ) + if [[ ${ARCH} != *-fbsd && ${ARCH} != *-freebsd ]]; then + strip_completions+=( + freebsd-update kldload kldunload portinstall portsnap + pkg_deinstall pkg_delete pkg_info + ) + fi + + local file + for file in "${strip_completions[@]}"; do + rm "${ED}"/usr/share/bash-completion/completions/${file} || + die "stripping ${file} failed" + done + + # remove deprecated completions (moved to other packages) + rm "${ED}"/usr/share/bash-completion/completions/_* || die +} + +python_check_deps() { + has_version "dev-python/pexpect[${PYTHON_USEDEP}]" && + has_version "dev-python/pytest[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +src_prepare() { + use eselect && + eapply "${WORKDIR}/${BASHCOMP_P}/bash-completion-blacklist-support.patch" + + # redhat-specific, we strip these completions + rm test/t/test_if{down,up}.py || die + # not available for icedtea + rm test/t/test_javaws.py || die + + eapply_user +} + +src_test() { + # portage's HOME override breaks tests + emake check HOME="$(egethome "${UID}")" PYTESTFLAGS="-vv" NETWORK=none +} + +src_install() { + # work-around race conditions, bug #526996 + mkdir -p "${ED}"/usr/share/bash-completion/{completions,helpers} || die + + emake DESTDIR="${D}" profiledir="${EPREFIX}"/etc/bash/bashrc.d install + + strip_completions + + dodoc AUTHORS CHANGES CONTRIBUTING.md README.md + + # install the eselect module + if use eselect; then + insinto /usr/share/eselect/modules + doins "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect" + doman "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect.5" + fi +} + +pkg_postinst() { + local v + for v in ${REPLACING_VERSIONS}; do + if ver_test "${v}" -lt 2.1-r90; then + ewarn "For bash-completion autoloader to work, all completions need to" + ewarn "be installed in /usr/share/bash-completion/completions. You may" + ewarn "need to rebuild packages that installed completions in the old" + ewarn "location. You can do this using:" + ewarn + ewarn "$ find ${EPREFIX}/usr/share/bash-completion -maxdepth 1 -type f '!' -name 'bash_completion' -exec emerge -1v {} +" + ewarn + ewarn "After the rebuild, you should remove the old setup symlinks:" + ewarn + ewarn "$ find ${EPREFIX}/etc/bash_completion.d -type l -delete" + fi + done + + if has_version 'app-shells/zsh'; then + elog + elog "If you are interested in using the provided bash completion functions with" + elog "zsh, valuable tips on the effective use of bashcompinit are available:" + elog " http://www.zsh.org/mla/workers/2003/msg00046.html" + elog + fi +} diff --git a/sdk_container/src/third_party/portage-stable/app-shells/bash-completion/bash-completion-9999.ebuild b/sdk_container/src/third_party/portage-stable/app-shells/bash-completion/bash-completion-9999.ebuild new file mode 100644 index 0000000000..70ce84b4ed --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-shells/bash-completion/bash-completion-9999.ebuild @@ -0,0 +1,145 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..9} ) +inherit autotools git-r3 python-any-r1 user-info + +DESCRIPTION="Programmable Completion for bash" +HOMEPAGE="https://github.com/scop/bash-completion" +EGIT_REPO_URI="https://github.com/scop/bash-completion" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="" +IUSE="+eselect test" +RESTRICT="!test? ( test )" + +# completion collision with net-fs/mc +RDEPEND=">=app-shells/bash-4.3_p30-r1:0 + sys-apps/miscfiles + !!net-fs/mc" +DEPEND=" + test? ( + ${RDEPEND} + $(python_gen_any_dep ' + dev-python/pexpect[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] + ') + )" +PDEPEND=">=app-shells/gentoo-bashcomp-20140911" + +strip_completions() { + # Remove unwanted completions. + local strip_completions=( + # Slackware package stuff, quite generic names cause collisions + # (e.g. with sys-apps/pacman) + explodepkg installpkg makepkg pkgtool removepkg upgradepkg + + # Debian/Red Hat network stuff + ifdown ifup ifquery ifstatus + + # Installed in app-editors/vim-core + xxd + + # Now-dead symlinks to deprecated completions + hd ncal + ) + if [[ ${ARCH} != *-fbsd && ${ARCH} != *-freebsd ]]; then + strip_completions+=( + freebsd-update kldload kldunload portinstall portsnap + pkg_deinstall pkg_delete pkg_info + ) + fi + + local file + for file in "${strip_completions[@]}"; do + rm "${ED}"/usr/share/bash-completion/completions/${file} || + die "stripping ${file} failed" + done + + # remove deprecated completions (moved to other packages) + rm "${ED}"/usr/share/bash-completion/completions/_* || die +} + +python_check_deps() { + has_version "dev-python/pexpect[${PYTHON_USEDEP}]" && + has_version "dev-python/pytest[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +src_unpack() { + use eselect && git-r3_fetch https://github.com/mgorny/bashcomp2 + git-r3_fetch + + use eselect && git-r3_checkout https://github.com/mgorny/bashcomp2 \ + "${WORKDIR}"/bashcomp2 + git-r3_checkout +} + +src_prepare() { + if use eselect; then + # generate and apply patch + emake -C "${WORKDIR}"/bashcomp2 bash-completion-blacklist-support.patch + eapply "${WORKDIR}"/bashcomp2/bash-completion-blacklist-support.patch + fi + + # redhat-specific, we strip these completions + rm test/t/test_if{down,up}.py || die + # not available for icedtea + rm test/t/test_javaws.py || die + + eapply_user + eautoreconf +} + +src_test() { + # portage's HOME override breaks tests + emake check HOME="$(egethome "${UID}")" PYTESTFLAGS="-vv" NETWORK=none +} + +src_install() { + # work-around race conditions, bug #526996 + mkdir -p "${ED}"/usr/share/bash-completion/{completions,helpers} || die + + emake DESTDIR="${D}" profiledir="${EPREFIX}"/etc/bash/bashrc.d install + + strip_completions + + dodoc AUTHORS CHANGES CONTRIBUTING.md README.md + + # install the eselect module + use eselect && + emake -C "${WORKDIR}"/bashcomp2 DESTDIR="${D}" \ + PREFIX="${EPREFIX}/usr" install +} + +pkg_postinst() { + local v + for v in ${REPLACING_VERSIONS}; do + if ver_test "${v}" -lt 2.1-r90; then + ewarn "For bash-completion autoloader to work, all completions need to" + ewarn "be installed in /usr/share/bash-completion/completions. You may" + ewarn "need to rebuild packages that installed completions in the old" + ewarn "location. You can do this using:" + ewarn + ewarn "$ find ${EPREFIX}/usr/share/bash-completion -maxdepth 1 -type f '!' -name 'bash_completion' -exec emerge -1v {} +" + ewarn + ewarn "After the rebuild, you should remove the old setup symlinks:" + ewarn + ewarn "$ find ${EPREFIX}/etc/bash_completion.d -type l -delete" + fi + done + + if has_version 'app-shells/zsh'; then + elog + elog "If you are interested in using the provided bash completion functions with" + elog "zsh, valuable tips on the effective use of bashcompinit are available:" + elog " http://www.zsh.org/mla/workers/2003/msg00046.html" + elog + fi +} diff --git a/sdk_container/src/third_party/portage-stable/app-shells/bash-completion/metadata.xml b/sdk_container/src/third_party/portage-stable/app-shells/bash-completion/metadata.xml new file mode 100644 index 0000000000..b8af55c298 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-shells/bash-completion/metadata.xml @@ -0,0 +1,34 @@ + + + + + mgorny@gentoo.org + Michał Górny + + + shell-tools@gentoo.org + Gentoo Shell Tools Project + + + + Support blacklisting of completions via 'eselect bash-completion'. + This enables custom Gentoo patching of upstream completion loader. + + + + Since v2.04, bash has allowed you to intelligently program and extend its + standard completion behavior to achieve complex command lines with just a + few keystrokes. Imagine typing ssh [Tab] and being able to complete on hosts + from your ~/.ssh/known_hosts files. Or typing man 3 str [Tab] and getting a + list of all string handling functions in the UNIX manual. mount system: + [Tab] would complete on all exported file-systems from the host called + system, while make [Tab] would complete on all targets in Makefile. This + project was conceived to produce programmable completion routines for the + most common Linux/UNIX commands, reducing the amount of typing sysadmins and + programmers need to do on a daily basis. + + + + scop/bash-completion + + diff --git a/sdk_container/src/third_party/portage-stable/app-shells/gentoo-bashcomp/Manifest b/sdk_container/src/third_party/portage-stable/app-shells/gentoo-bashcomp/Manifest new file mode 100644 index 0000000000..d4cd856272 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-shells/gentoo-bashcomp/Manifest @@ -0,0 +1,2 @@ +DIST gentoo-bashcomp-20180302.tar.bz2 21485 BLAKE2B 887ac5cfa8c6ba431a6aa5f5918b8bdfbe6a1ae9a2e7ac21b3c06ec2062b448d924f928b1372e81749ece6d4aa673bbbaaa364ca744124c842e3819349917169 SHA512 6b4551b078505e6348cb10ca2d67faab4d323a0f0ddefc872145314303d6f95fe31f9706d43d9f20c0139610ce47e4cf70ba7516d911dc4927cfbf5d863bc063 +DIST gentoo-bashcomp-20190211.tar.bz2 21508 BLAKE2B 410994819f62b0bd105ca398c335d76993fd694b8e7f56c761b94fc1e2f6e90f2010f2f2a88febd71ac0c5643fc0e923c60151fbf9411e8a553b5917d6bcd8db SHA512 4b0a5e79f90ee8122fa8d0a7224fee6472b1762a0dda680ea1c0e8d4069760be9b6472e052b1b166a389c0e779816b98715386dbc62a3574e7ad851b2567a070 diff --git a/sdk_container/src/third_party/portage-stable/app-shells/gentoo-bashcomp/gentoo-bashcomp-20180302.ebuild b/sdk_container/src/third_party/portage-stable/app-shells/gentoo-bashcomp/gentoo-bashcomp-20180302.ebuild new file mode 100644 index 0000000000..64f152cbe4 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-shells/gentoo-bashcomp/gentoo-bashcomp-20180302.ebuild @@ -0,0 +1,22 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit bash-completion-r1 + +DESCRIPTION="Gentoo-specific bash command-line completions (emerge, ebuild, equery, etc)" +HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" +SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris" +IUSE="" + +src_install() { + emake DESTDIR="${D}" install \ + completionsdir="$(get_bashcompdir)" \ + helpersdir="$(get_bashhelpersdir)" \ + compatdir="${EPREFIX}/etc/bash_completion.d" +} diff --git a/sdk_container/src/third_party/portage-stable/app-shells/gentoo-bashcomp/gentoo-bashcomp-20190211.ebuild b/sdk_container/src/third_party/portage-stable/app-shells/gentoo-bashcomp/gentoo-bashcomp-20190211.ebuild new file mode 100644 index 0000000000..6c802bbf31 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-shells/gentoo-bashcomp/gentoo-bashcomp-20190211.ebuild @@ -0,0 +1,21 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit bash-completion-r1 + +DESCRIPTION="Gentoo-specific bash command-line completions (emerge, ebuild, equery, etc)" +HOMEPAGE="https://gitweb.gentoo.org/proj/gentoo-bashcomp.git/" +SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris" + +src_install() { + emake DESTDIR="${D}" install \ + completionsdir="$(get_bashcompdir)" \ + helpersdir="$(get_bashhelpersdir)" \ + compatdir="${EPREFIX}/etc/bash_completion.d" +} diff --git a/sdk_container/src/third_party/portage-stable/app-shells/gentoo-bashcomp/metadata.xml b/sdk_container/src/third_party/portage-stable/app-shells/gentoo-bashcomp/metadata.xml new file mode 100644 index 0000000000..6258504e51 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-shells/gentoo-bashcomp/metadata.xml @@ -0,0 +1,8 @@ + + + + + shell-tools@gentoo.org + Gentoo Shell Tools Project + + diff --git a/sdk_container/src/third_party/portage-stable/app-text/asciidoc/Manifest b/sdk_container/src/third_party/portage-stable/app-text/asciidoc/Manifest new file mode 100644 index 0000000000..064d9296ad --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/asciidoc/Manifest @@ -0,0 +1,4 @@ +DIST asciidoc-9.0.2.new.tar.gz 1269444 BLAKE2B 0041073c572267628b8bbfd56258d86c35edb0e7f3a222743ce1476b405483b01144faf768ab1492fd3f378960f6cc8e17d92ef61671d84c318fbe7c1ca8cd7c SHA512 c20629001704f1c3acfef0407b82f35f6077f5b32ef754fcbeee03a5a86d4e01e374e89b79cbdb236fc2c7fc76bf47ba81efd691f2f9e1c87dc85a7111f5e030 +DIST asciidoc-9.0.4.new.tar.gz 1233878 BLAKE2B 506a2c82d95ce0d522f45b20eee31f7ce2b114e0ad43c78bb313f34b210a7bdd282a8a3779a3ea29025e865847eb8298bd5a6ddac7ee338e4b878ae79bdf149e SHA512 59be96514d0c4c82e5842ddea412ddd6e06647ebe09e0f1828b7c07e787d890896bab4271e7566ed038eb2da6755a67c725bee07bcfbd7aa31475f39c3abc089 +DIST asciidoc-9.0.5.new.tar.gz 1225334 BLAKE2B c3e428098dc4d71704ed13b54fd5f640b9de81d12939facb5faaf38a3123794e57201ecd9c312a22c220a2ec6b06c88a76ab47f05ffa972fc8751089b3471cfc SHA512 9125631fdee464f96f7e3c76a60fe37331905e9e55a81db27aece4065b246dc05a35db4c157dc7dbb2345eb95c153b474251d6a447d65774bf1b3f57e1883895 +DIST asciidoc-9.1.0.new.tar.gz 1249958 BLAKE2B 0a98f58f7604f84d704092313c38563634bad5d697d60d02760f3be1d2a78a97ee2488dda3a9918b02e0062710175c6513d600f3fbd850fe700bf3fa917a3980 SHA512 c30854a936228fe5bcf2f9305741fbc4b17ef088b2fa637d5f3b19c7803306085634fb71146f0b089c2fad01f986da71a4fae364139f520c0906525317c0c4a6 diff --git a/sdk_container/src/third_party/portage-stable/app-text/asciidoc/asciidoc-9.0.2-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-text/asciidoc/asciidoc-9.0.2-r1.ebuild new file mode 100644 index 0000000000..7772c2bc97 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/asciidoc/asciidoc-9.0.2-r1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7,8,9} pypy3 ) + +inherit autotools optfeature python-single-r1 readme.gentoo-r1 + +DESCRIPTION="A plain text human readable/writable document format" +HOMEPAGE="https://asciidoc.org/ https://github.com/asciidoc-py/asciidoc-py/" +SRC_URI="https://github.com/asciidoc-py/asciidoc-py/releases/download/${PV}/${P}.tar.gz -> ${P}.new.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="doc test" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RESTRICT="!test? ( test )" + +RDEPEND="${PYTHON_DEPS} + app-text/docbook-xml-dtd:4.5 + >=app-text/docbook-xsl-stylesheets-1.75 + dev-libs/libxslt + dev-libs/libxml2:2 + " +DEPEND=" + test? ( + ${PYTHON_DEPS} + app-text/dvipng + app-text/dvisvgm + dev-texlive/texlive-latex + dev-util/source-highlight + media-gfx/graphviz + media-gfx/imagemagick + media-sound/lilypond + )" + +DOC_CONTENTS=" +If you are going to use a2x, please also look at a2x(1) under +REQUISITES for a list of runtime dependencies. +" + +DOCS=( BUGS.txt CHANGELOG.txt README.asciidoc + docbook-xsl/asciidoc-docbook-xsl.txt dblatex/dblatex-readme.txt + filters/code/code-filter-readme.txt ) + +src_prepare() { + default + # Only needed for prefix - harmless (does nothing) otherwise + sed -i -e "s:^CONF_DIR=.*:CONF_DIR='${EPREFIX}/etc/asciidoc':" \ + asciidoc.py || die + + # enforce usage of the configured version of Python + sed -i -e "s:python3:${EPYTHON}:" Makefile.in || die + + eautoreconf +} + +src_configure() { + econf --sysconfdir="${EPREFIX}"/usr/share +} + +src_install() { + default + + if use doc; then + emake DESTDIR="${D}" docs + fi + + python_fix_shebang "${ED}"/usr/bin/*.py + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog + + optfeature "\"music\" filter support" "media-sound/lilypond media-gfx/imagemagick" + optfeature "\"source\" filter support" dev-util/source-highlight dev-python/pygments app-text/highlight + optfeature "\"latex\" filter support" "dev-texlive/texlive-latex app-text/dvipng" "dev-texlive/texlive-latex app-text/dvisvgm" + optfeature "\"graphviz\" filter support" media-gfx/graphviz +} diff --git a/sdk_container/src/third_party/portage-stable/app-text/asciidoc/asciidoc-9.0.4-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-text/asciidoc/asciidoc-9.0.4-r1.ebuild new file mode 100644 index 0000000000..7772c2bc97 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/asciidoc/asciidoc-9.0.4-r1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7,8,9} pypy3 ) + +inherit autotools optfeature python-single-r1 readme.gentoo-r1 + +DESCRIPTION="A plain text human readable/writable document format" +HOMEPAGE="https://asciidoc.org/ https://github.com/asciidoc-py/asciidoc-py/" +SRC_URI="https://github.com/asciidoc-py/asciidoc-py/releases/download/${PV}/${P}.tar.gz -> ${P}.new.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="doc test" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RESTRICT="!test? ( test )" + +RDEPEND="${PYTHON_DEPS} + app-text/docbook-xml-dtd:4.5 + >=app-text/docbook-xsl-stylesheets-1.75 + dev-libs/libxslt + dev-libs/libxml2:2 + " +DEPEND=" + test? ( + ${PYTHON_DEPS} + app-text/dvipng + app-text/dvisvgm + dev-texlive/texlive-latex + dev-util/source-highlight + media-gfx/graphviz + media-gfx/imagemagick + media-sound/lilypond + )" + +DOC_CONTENTS=" +If you are going to use a2x, please also look at a2x(1) under +REQUISITES for a list of runtime dependencies. +" + +DOCS=( BUGS.txt CHANGELOG.txt README.asciidoc + docbook-xsl/asciidoc-docbook-xsl.txt dblatex/dblatex-readme.txt + filters/code/code-filter-readme.txt ) + +src_prepare() { + default + # Only needed for prefix - harmless (does nothing) otherwise + sed -i -e "s:^CONF_DIR=.*:CONF_DIR='${EPREFIX}/etc/asciidoc':" \ + asciidoc.py || die + + # enforce usage of the configured version of Python + sed -i -e "s:python3:${EPYTHON}:" Makefile.in || die + + eautoreconf +} + +src_configure() { + econf --sysconfdir="${EPREFIX}"/usr/share +} + +src_install() { + default + + if use doc; then + emake DESTDIR="${D}" docs + fi + + python_fix_shebang "${ED}"/usr/bin/*.py + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog + + optfeature "\"music\" filter support" "media-sound/lilypond media-gfx/imagemagick" + optfeature "\"source\" filter support" dev-util/source-highlight dev-python/pygments app-text/highlight + optfeature "\"latex\" filter support" "dev-texlive/texlive-latex app-text/dvipng" "dev-texlive/texlive-latex app-text/dvisvgm" + optfeature "\"graphviz\" filter support" media-gfx/graphviz +} diff --git a/sdk_container/src/third_party/portage-stable/app-text/asciidoc/asciidoc-9.0.5-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-text/asciidoc/asciidoc-9.0.5-r1.ebuild new file mode 100644 index 0000000000..7772c2bc97 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/asciidoc/asciidoc-9.0.5-r1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7,8,9} pypy3 ) + +inherit autotools optfeature python-single-r1 readme.gentoo-r1 + +DESCRIPTION="A plain text human readable/writable document format" +HOMEPAGE="https://asciidoc.org/ https://github.com/asciidoc-py/asciidoc-py/" +SRC_URI="https://github.com/asciidoc-py/asciidoc-py/releases/download/${PV}/${P}.tar.gz -> ${P}.new.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="doc test" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RESTRICT="!test? ( test )" + +RDEPEND="${PYTHON_DEPS} + app-text/docbook-xml-dtd:4.5 + >=app-text/docbook-xsl-stylesheets-1.75 + dev-libs/libxslt + dev-libs/libxml2:2 + " +DEPEND=" + test? ( + ${PYTHON_DEPS} + app-text/dvipng + app-text/dvisvgm + dev-texlive/texlive-latex + dev-util/source-highlight + media-gfx/graphviz + media-gfx/imagemagick + media-sound/lilypond + )" + +DOC_CONTENTS=" +If you are going to use a2x, please also look at a2x(1) under +REQUISITES for a list of runtime dependencies. +" + +DOCS=( BUGS.txt CHANGELOG.txt README.asciidoc + docbook-xsl/asciidoc-docbook-xsl.txt dblatex/dblatex-readme.txt + filters/code/code-filter-readme.txt ) + +src_prepare() { + default + # Only needed for prefix - harmless (does nothing) otherwise + sed -i -e "s:^CONF_DIR=.*:CONF_DIR='${EPREFIX}/etc/asciidoc':" \ + asciidoc.py || die + + # enforce usage of the configured version of Python + sed -i -e "s:python3:${EPYTHON}:" Makefile.in || die + + eautoreconf +} + +src_configure() { + econf --sysconfdir="${EPREFIX}"/usr/share +} + +src_install() { + default + + if use doc; then + emake DESTDIR="${D}" docs + fi + + python_fix_shebang "${ED}"/usr/bin/*.py + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog + + optfeature "\"music\" filter support" "media-sound/lilypond media-gfx/imagemagick" + optfeature "\"source\" filter support" dev-util/source-highlight dev-python/pygments app-text/highlight + optfeature "\"latex\" filter support" "dev-texlive/texlive-latex app-text/dvipng" "dev-texlive/texlive-latex app-text/dvisvgm" + optfeature "\"graphviz\" filter support" media-gfx/graphviz +} diff --git a/sdk_container/src/third_party/portage-stable/app-text/asciidoc/asciidoc-9.1.0.ebuild b/sdk_container/src/third_party/portage-stable/app-text/asciidoc/asciidoc-9.1.0.ebuild new file mode 100644 index 0000000000..f3c86d982e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/asciidoc/asciidoc-9.1.0.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8..10} pypy3 ) + +inherit autotools optfeature python-single-r1 readme.gentoo-r1 + +DESCRIPTION="A plain text human readable/writable document format" +HOMEPAGE="https://asciidoc.org/ https://github.com/asciidoc-py/asciidoc-py/" +SRC_URI="https://github.com/asciidoc-py/asciidoc-py/releases/download/${PV}/${P}.tar.gz -> ${P}.new.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="doc test" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RESTRICT="!test? ( test )" + +RDEPEND="${PYTHON_DEPS} + app-text/docbook-xml-dtd:4.5 + >=app-text/docbook-xsl-stylesheets-1.75 + dev-libs/libxslt + dev-libs/libxml2:2 + " +DEPEND=" + test? ( + ${PYTHON_DEPS} + app-text/dvipng + app-text/dvisvgm + dev-texlive/texlive-latex + dev-util/source-highlight + media-gfx/graphviz + media-gfx/imagemagick[png] + media-sound/lilypond + )" + +DOC_CONTENTS=" +If you are going to use a2x, please also look at a2x(1) under +REQUISITES for a list of runtime dependencies. +" + +DOCS=( BUGS.txt CHANGELOG.txt README.asciidoc + docbook-xsl/asciidoc-docbook-xsl.txt dblatex/dblatex-readme.txt + filters/code/code-filter-readme.txt ) + +src_prepare() { + default + # Only needed for prefix - harmless (does nothing) otherwise + sed -i -e "s:^CONF_DIR=.*:CONF_DIR='${EPREFIX}/etc/asciidoc':" \ + asciidoc.py || die + + # enforce usage of the configured version of Python + sed -i -e "s:python3:${EPYTHON}:" Makefile.in || die + + eautoreconf +} + +src_configure() { + econf --sysconfdir="${EPREFIX}"/usr/share +} + +src_install() { + default + + if use doc; then + emake DESTDIR="${D}" docs + fi + + python_fix_shebang "${ED}"/usr/bin/*.py + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog + + optfeature "\"music\" filter support" "media-sound/lilypond media-gfx/imagemagick" + optfeature "\"source\" filter support" dev-util/source-highlight dev-python/pygments app-text/highlight + optfeature "\"latex\" filter support" "dev-texlive/texlive-latex app-text/dvipng" "dev-texlive/texlive-latex app-text/dvisvgm" + optfeature "\"graphviz\" filter support" media-gfx/graphviz +} diff --git a/sdk_container/src/third_party/portage-stable/app-text/asciidoc/metadata.xml b/sdk_container/src/third_party/portage-stable/app-text/asciidoc/metadata.xml new file mode 100644 index 0000000000..bf7692827c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/asciidoc/metadata.xml @@ -0,0 +1,17 @@ + + + + + marcec@gmx.de + Marc Joliet + + + proxy-maint@gentoo.org + Proxy Maintainers + + + asciidoc + asciidoc-py/asciidoc-py + https://github.com/asciidoc-py/asciidoc-py/issues + + diff --git a/sdk_container/src/third_party/portage-stable/app-text/build-docbook-catalog/Manifest b/sdk_container/src/third_party/portage-stable/app-text/build-docbook-catalog/Manifest new file mode 100644 index 0000000000..7a28c36389 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/build-docbook-catalog/Manifest @@ -0,0 +1,2 @@ +DIST build-docbook-catalog-1.21.tar.xz 4620 BLAKE2B ed4aa645a5bb8e168c291c05891a2359114c9148a81588d93542528a0c74828a1824dc98a14468e8ba65525edf5aae8c936f29190d54063064cd54e2af8dbc3c SHA512 0becc1bae100101b072c62bee844157151336aebc39a046030c8b7b501e13f1b3552097b244ac51339abd2e724304f4fe728861b7d5f070c26973998936861bc +DIST build-docbook-catalog-2.1.tar.bz2 4731 BLAKE2B 38864866f03052386a0ba2fe832c750b851a5a0730df54fbac5253da682e92c0d865333c136d9c169a843e2a1ce291b2e5b5af657e7dba0dbf8d2fda213f6891 SHA512 8399652841f25feefa9ad3c138580f31da34410a44f2bdbdb4d63cb6efd1be445c7c4df6ed93629e53df4a4c6d988ed32a6a709f1abb059ccac0bc35b3b516a5 diff --git a/sdk_container/src/third_party/portage-stable/app-text/build-docbook-catalog/build-docbook-catalog-1.21.ebuild b/sdk_container/src/third_party/portage-stable/app-text/build-docbook-catalog/build-docbook-catalog-1.21.ebuild new file mode 100644 index 0000000000..ea434173b0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/build-docbook-catalog/build-docbook-catalog-1.21.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="DocBook XML catalog auto-updater" +HOMEPAGE="https://gitweb.gentoo.org/proj/build-docbook-catalog.git/" +SRC_URI="mirror://gentoo/${P}.tar.xz + https://dev.gentoo.org/~haubi/distfiles/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +RDEPEND=" + dev-libs/libxml2 + || ( sys-apps/util-linux app-misc/getopt ) + ! regen files + # See bug #816303 for rationale behind die + build-docbook-catalog || die "Failed to regenerate docbook catalog. Is /run mounted?" +} diff --git a/sdk_container/src/third_party/portage-stable/app-text/build-docbook-catalog/build-docbook-catalog-2.1.ebuild b/sdk_container/src/third_party/portage-stable/app-text/build-docbook-catalog/build-docbook-catalog-2.1.ebuild new file mode 100644 index 0000000000..3deb1d9604 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/build-docbook-catalog/build-docbook-catalog-2.1.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +DESCRIPTION="DocBook XML catalog auto-updater" +HOMEPAGE="https://gitweb.gentoo.org/proj/build-docbook-catalog.git/" +SRC_URI="https://gitweb.gentoo.org/proj/build-docbook-catalog.git/snapshot/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +RDEPEND=" + dev-libs/libxml2 + || ( sys-apps/util-linux app-misc/getopt ) +" + +src_prepare() { + default + + sed -i -e "/^EPREFIX=/s:=.*:='${EPREFIX}':" build-docbook-catalog || die + has_version sys-apps/util-linux || sed -i -e '/^GETOPT=/s/getopt/&-long/' build-docbook-catalog || die +} + +src_configure() { + # export for bug #490754 + export MAKEOPTS+=" EPREFIX=${EPREFIX}" + + default +} + +pkg_postinst() { + # New version -> regen files + # See bug #816303 for rationale behind die + # create directory if needed + mkdir -p "${EROOT}"/run/lock + build-docbook-catalog || die "Failed to regenerate docbook catalog. Is /run mounted?" +} diff --git a/sdk_container/src/third_party/portage-stable/app-text/build-docbook-catalog/metadata.xml b/sdk_container/src/third_party/portage-stable/app-text/build-docbook-catalog/metadata.xml new file mode 100644 index 0000000000..85e4ed814f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/build-docbook-catalog/metadata.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/sdk_container/src/third_party/portage-stable/app-text/docbook-xml-dtd/Manifest b/sdk_container/src/third_party/portage-stable/app-text/docbook-xml-dtd/Manifest new file mode 100644 index 0000000000..139db7e307 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/docbook-xml-dtd/Manifest @@ -0,0 +1,5 @@ +DIST docbkx412.zip 75683 BLAKE2B 1304162d4f432e2f08990d0d3f58d873f7a8782fe5b4e3d6838ffed4ac85fd614a4dd64dca5d2b69f118dea91117d0da288f6db7c89180f730032ba140280d2e SHA512 f700591a671694ca0ac51f5b5b7e825df5c0b3604b20baa6afd3aaafa7ce99470ca1c261781b105b42bfa5485c23217cf3db821b3fcf2ebdae9df07bb8ae4063 +DIST docbook-xml-4.2.zip 78428 BLAKE2B 542a2b658a10e0eee4928666a2edbdbff12e96dbc02802ed2793a81bdb9c4cd0c61b0a11565d83fa42922c72f805ba35473bf98278b9112b93e42a61bc04aeeb SHA512 0c836346130d1e8f4e26e00959f6b4fd2c3c11269ba5cbf11cdc904724e189606f431c99cd5ab188877daa0eb44c58d0bc30556df3b51df480396818d61c4e0a +DIST docbook-xml-4.3.zip 83865 BLAKE2B d231a6e6ba3d8023d83358080d136880a5d65b4b3b135b2f60e3a784d2f2231d12e1e9d1b5284a7d3fa1b9281466591e0438adbf6160d33732e3611f5c58f21b SHA512 f5090fb74884bae3d4fac8a3c5060bffff5d6a74272de183c181a7642e4b91f4ed32ad028537d198010782c3d98575ce679672f76a9749ed124432195886a7cb +DIST docbook-xml-4.4.zip 96107 BLAKE2B 3616c20758de6c14e08f2a9b32682da33be741153d4586c8062d6ff895f0158decc188c5e1db4f0caafbea14afb139e39bd6805842f7bedc18f0770d22e0d2d3 SHA512 7df5af4df24e4618b09814e4e20c147c722962531f03a40c28cd60f1db16b4c330420adf96adb7d66ed6eda84046ee91b467fd6f6fbfac2201537e2080735d76 +DIST docbook-xml-4.5.zip 98497 BLAKE2B 3487f4488a9e3dbc3e366d63b61940727287a97f4e0ee2d2dda031cbba96cd4d85e5b729b7ee4d32e8a6842748fc688f85c94e1a0ab2f7ebc062dd8c7b800e20 SHA512 1ee282fe86c9282610ee72c0e1d1acfc03f1afb9dc67166f438f2703109046479edb6329313ecb2949db27993077e077d111501c10b8769ebb20719eb6213d27 diff --git a/sdk_container/src/third_party/portage-stable/app-text/docbook-xml-dtd/docbook-xml-dtd-4.1.2-r7.ebuild b/sdk_container/src/third_party/portage-stable/app-text/docbook-xml-dtd/docbook-xml-dtd-4.1.2-r7.ebuild new file mode 100644 index 0000000000..e3188ba498 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/docbook-xml-dtd/docbook-xml-dtd-4.1.2-r7.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit sgml-catalog-r1 + +MY_P="docbkx${PV//./}" +DESCRIPTION="Docbook DTD for XML" +HOMEPAGE="https://docbook.org/" +SRC_URI="https://docbook.org/xml/${PV}/${MY_P}.zip" + +LICENSE="docbook" +SLOT="${PV}" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +RDEPEND=">=app-text/docbook-xsl-stylesheets-1.65 + >=app-text/build-docbook-catalog-1.2" +DEPEND=">=app-arch/unzip-5.41" + +S=${WORKDIR} + +src_prepare() { + # Prepend OVERRIDE directive + sed -i -e '1i\\OVERRIDE YES' docbook.cat || die + default +} + +src_install() { + keepdir /etc/xml + + insinto "/usr/share/sgml/docbook/xml-dtd-${PV}" + doins *.cat *.dtd *.mod + insinto "/usr/share/sgml/docbook/xml-dtd-${PV}/ent" + doins ent/*.ent + + insinto /etc/sgml + newins - "xml-docbook-${PV}.cat" <<-EOF + CATALOG "${EPREFIX}/etc/sgml/sgml-docbook.cat" + CATALOG "${EPREFIX}/usr/share/sgml/docbook/xml-dtd-${PV}/docbook.cat" + EOF + + dodoc ChangeLog *.txt +} + +pkg_preinst() { + # work-around old revision removing it + cp "${ED}"/etc/sgml/xml-docbook-${PV}.cat "${T}" || die +} + +pkg_postinst() { + local backup=${T}/xml-docbook-${PV}.cat + local real=${EROOT}/etc/sgml/xml-docbook-${PV}.cat + + if ! cmp -s "${backup}" "${real}"; then + cp "${backup}" "${real}" || die + fi + + # See bug #816303 for rationale behind die + build-docbook-catalog || die "Failed to regenerate docbook catalog. Is /run mounted?" + sgml-catalog-r1_pkg_postinst +} + +pkg_postrm() { + # See bug #816303 for rationale behind die + build-docbook-catalog || die "Failed to regenerate docbook catalog. Is /run mounted?" + sgml-catalog-r1_pkg_postrm +} diff --git a/sdk_container/src/third_party/portage-stable/app-text/docbook-xml-dtd/docbook-xml-dtd-4.2-r3.ebuild b/sdk_container/src/third_party/portage-stable/app-text/docbook-xml-dtd/docbook-xml-dtd-4.2-r3.ebuild new file mode 100644 index 0000000000..ee19a3db01 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/docbook-xml-dtd/docbook-xml-dtd-4.2-r3.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit sgml-catalog-r1 + +MY_P=${P/-dtd/} +DESCRIPTION="Docbook DTD for XML" +HOMEPAGE="https://docbook.org/" +SRC_URI="https://docbook.org/xml/${PV}/${MY_P}.zip" + +LICENSE="docbook" +SLOT="${PV}" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +RDEPEND=">=app-text/docbook-xsl-stylesheets-1.65 + >=app-text/build-docbook-catalog-1.2" +DEPEND=">=app-arch/unzip-5.41" + +S=${WORKDIR} + +src_prepare() { + # Prepend OVERRIDE directive + sed -i -e '1i\\OVERRIDE YES' docbook.cat || die + default +} + +src_install() { + keepdir /etc/xml + + insinto "/usr/share/sgml/docbook/xml-dtd-${PV}" + doins *.cat *.dtd *.mod + insinto "/usr/share/sgml/docbook/xml-dtd-${PV}/ent" + doins ent/*.ent + + insinto /etc/sgml + newins - "xml-docbook-${PV}.cat" <<-EOF + CATALOG "${EPREFIX}/etc/sgml/sgml-docbook.cat" + CATALOG "${EPREFIX}/usr/share/sgml/docbook/xml-dtd-${PV}/docbook.cat" + EOF + + dodoc ChangeLog README +} + +pkg_preinst() { + # work-around old revision removing it + cp "${ED}"/etc/sgml/xml-docbook-${PV}.cat "${T}" || die +} + +pkg_postinst() { + local backup=${T}/xml-docbook-${PV}.cat + local real=${EROOT}/etc/sgml/xml-docbook-${PV}.cat + + if ! cmp -s "${backup}" "${real}"; then + cp "${backup}" "${real}" || die + fi + + # See bug #816303 for rationale behind die + build-docbook-catalog || die "Failed to regenerate docbook catalog. Is /run mounted?" + sgml-catalog-r1_pkg_postinst +} + +pkg_postrm() { + # See bug #816303 for rationale behind die + build-docbook-catalog || die "Failed to regenerate docbook catalog. Is /run mounted?" + sgml-catalog-r1_pkg_postrm +} diff --git a/sdk_container/src/third_party/portage-stable/app-text/docbook-xml-dtd/docbook-xml-dtd-4.3-r2.ebuild b/sdk_container/src/third_party/portage-stable/app-text/docbook-xml-dtd/docbook-xml-dtd-4.3-r2.ebuild new file mode 100644 index 0000000000..ee19a3db01 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/docbook-xml-dtd/docbook-xml-dtd-4.3-r2.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit sgml-catalog-r1 + +MY_P=${P/-dtd/} +DESCRIPTION="Docbook DTD for XML" +HOMEPAGE="https://docbook.org/" +SRC_URI="https://docbook.org/xml/${PV}/${MY_P}.zip" + +LICENSE="docbook" +SLOT="${PV}" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +RDEPEND=">=app-text/docbook-xsl-stylesheets-1.65 + >=app-text/build-docbook-catalog-1.2" +DEPEND=">=app-arch/unzip-5.41" + +S=${WORKDIR} + +src_prepare() { + # Prepend OVERRIDE directive + sed -i -e '1i\\OVERRIDE YES' docbook.cat || die + default +} + +src_install() { + keepdir /etc/xml + + insinto "/usr/share/sgml/docbook/xml-dtd-${PV}" + doins *.cat *.dtd *.mod + insinto "/usr/share/sgml/docbook/xml-dtd-${PV}/ent" + doins ent/*.ent + + insinto /etc/sgml + newins - "xml-docbook-${PV}.cat" <<-EOF + CATALOG "${EPREFIX}/etc/sgml/sgml-docbook.cat" + CATALOG "${EPREFIX}/usr/share/sgml/docbook/xml-dtd-${PV}/docbook.cat" + EOF + + dodoc ChangeLog README +} + +pkg_preinst() { + # work-around old revision removing it + cp "${ED}"/etc/sgml/xml-docbook-${PV}.cat "${T}" || die +} + +pkg_postinst() { + local backup=${T}/xml-docbook-${PV}.cat + local real=${EROOT}/etc/sgml/xml-docbook-${PV}.cat + + if ! cmp -s "${backup}" "${real}"; then + cp "${backup}" "${real}" || die + fi + + # See bug #816303 for rationale behind die + build-docbook-catalog || die "Failed to regenerate docbook catalog. Is /run mounted?" + sgml-catalog-r1_pkg_postinst +} + +pkg_postrm() { + # See bug #816303 for rationale behind die + build-docbook-catalog || die "Failed to regenerate docbook catalog. Is /run mounted?" + sgml-catalog-r1_pkg_postrm +} diff --git a/sdk_container/src/third_party/portage-stable/app-text/docbook-xml-dtd/docbook-xml-dtd-4.4-r3.ebuild b/sdk_container/src/third_party/portage-stable/app-text/docbook-xml-dtd/docbook-xml-dtd-4.4-r3.ebuild new file mode 100644 index 0000000000..b9ce7d99da --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/docbook-xml-dtd/docbook-xml-dtd-4.4-r3.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit sgml-catalog-r1 + +MY_P=${P/-dtd/} +DESCRIPTION="Docbook DTD for XML" +HOMEPAGE="https://docbook.org/" +SRC_URI="https://docbook.org/xml/${PV}/${MY_P}.zip" + +LICENSE="docbook" +SLOT="${PV}" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +RDEPEND=">=app-text/docbook-xsl-stylesheets-1.65 + >=app-text/build-docbook-catalog-1.2" +DEPEND=">=app-arch/unzip-5.41" + +S=${WORKDIR} + +src_prepare() { + # Prepend OVERRIDE directive + sed -i -e '1i\\OVERRIDE YES' docbook.cat || die + default +} + +src_install() { + keepdir /etc/xml + + insinto "/usr/share/sgml/docbook/xml-dtd-${PV}" + doins *.cat *.dtd *.mod *.xml + insinto "/usr/share/sgml/docbook/xml-dtd-${PV}/ent" + doins ent/*.ent + + insinto /etc/sgml + newins - "xml-docbook-${PV}.cat" <<-EOF + CATALOG "${EPREFIX}/etc/sgml/sgml-docbook.cat" + CATALOG "${EPREFIX}/usr/share/sgml/docbook/xml-dtd-${PV}/docbook.cat" + EOF + + cp ent/README README.ent + dodoc ChangeLog README* +} + +pkg_preinst() { + # work-around old revision removing it + cp "${ED}"/etc/sgml/xml-docbook-${PV}.cat "${T}" || die +} + +pkg_postinst() { + local backup=${T}/xml-docbook-${PV}.cat + local real=${EROOT}/etc/sgml/xml-docbook-${PV}.cat + + if ! cmp -s "${backup}" "${real}"; then + cp "${backup}" "${real}" || die + fi + + # See bug #816303 for rationale behind die + build-docbook-catalog || die "Failed to regenerate docbook catalog. Is /run mounted?" + sgml-catalog-r1_pkg_postinst +} + +pkg_postrm() { + # See bug #816303 for rationale behind die + build-docbook-catalog || die "Failed to regenerate docbook catalog. Is /run mounted?" + sgml-catalog-r1_pkg_postrm +} diff --git a/sdk_container/src/third_party/portage-stable/app-text/docbook-xml-dtd/docbook-xml-dtd-4.5-r2.ebuild b/sdk_container/src/third_party/portage-stable/app-text/docbook-xml-dtd/docbook-xml-dtd-4.5-r2.ebuild new file mode 100644 index 0000000000..b9ce7d99da --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/docbook-xml-dtd/docbook-xml-dtd-4.5-r2.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit sgml-catalog-r1 + +MY_P=${P/-dtd/} +DESCRIPTION="Docbook DTD for XML" +HOMEPAGE="https://docbook.org/" +SRC_URI="https://docbook.org/xml/${PV}/${MY_P}.zip" + +LICENSE="docbook" +SLOT="${PV}" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +RDEPEND=">=app-text/docbook-xsl-stylesheets-1.65 + >=app-text/build-docbook-catalog-1.2" +DEPEND=">=app-arch/unzip-5.41" + +S=${WORKDIR} + +src_prepare() { + # Prepend OVERRIDE directive + sed -i -e '1i\\OVERRIDE YES' docbook.cat || die + default +} + +src_install() { + keepdir /etc/xml + + insinto "/usr/share/sgml/docbook/xml-dtd-${PV}" + doins *.cat *.dtd *.mod *.xml + insinto "/usr/share/sgml/docbook/xml-dtd-${PV}/ent" + doins ent/*.ent + + insinto /etc/sgml + newins - "xml-docbook-${PV}.cat" <<-EOF + CATALOG "${EPREFIX}/etc/sgml/sgml-docbook.cat" + CATALOG "${EPREFIX}/usr/share/sgml/docbook/xml-dtd-${PV}/docbook.cat" + EOF + + cp ent/README README.ent + dodoc ChangeLog README* +} + +pkg_preinst() { + # work-around old revision removing it + cp "${ED}"/etc/sgml/xml-docbook-${PV}.cat "${T}" || die +} + +pkg_postinst() { + local backup=${T}/xml-docbook-${PV}.cat + local real=${EROOT}/etc/sgml/xml-docbook-${PV}.cat + + if ! cmp -s "${backup}" "${real}"; then + cp "${backup}" "${real}" || die + fi + + # See bug #816303 for rationale behind die + build-docbook-catalog || die "Failed to regenerate docbook catalog. Is /run mounted?" + sgml-catalog-r1_pkg_postinst +} + +pkg_postrm() { + # See bug #816303 for rationale behind die + build-docbook-catalog || die "Failed to regenerate docbook catalog. Is /run mounted?" + sgml-catalog-r1_pkg_postrm +} diff --git a/sdk_container/src/third_party/portage-stable/app-text/docbook-xml-dtd/metadata.xml b/sdk_container/src/third_party/portage-stable/app-text/docbook-xml-dtd/metadata.xml new file mode 100644 index 0000000000..076793e3f5 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/docbook-xml-dtd/metadata.xml @@ -0,0 +1,8 @@ + + + + + mgorny@gentoo.org + Michał Górny + + diff --git a/sdk_container/src/third_party/portage-stable/app-text/docbook-xsl-stylesheets/Manifest b/sdk_container/src/third_party/portage-stable/app-text/docbook-xsl-stylesheets/Manifest new file mode 100644 index 0000000000..0a0cbaaa9a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/docbook-xsl-stylesheets/Manifest @@ -0,0 +1 @@ +DIST docbook-xsl-1.79.1.tar.bz2 21967928 BLAKE2B 42b7e989616d16fa100c2dad713830ecedf6c7e26f56f99a9bf9330385c753f282cea1033e689196352bd41f9dca59a06ff09fc4638051cb478a630df9bfeb0b SHA512 83325cbaf1545da6b9b8b77f5f0e6fdece26e3c455164b300a1aa3d19e3bd29ae71fd563553a714a5394968d1a65684c6c7987c77524469358d18b8c227025c7 diff --git a/sdk_container/src/third_party/portage-stable/app-text/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.79.1-r2.ebuild b/sdk_container/src/third_party/portage-stable/app-text/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.79.1-r2.ebuild new file mode 100644 index 0000000000..1e1416abed --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.79.1-r2.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +USE_RUBY="ruby25 ruby26 ruby27" + +inherit ruby-single + +DOCBOOKDIR="/usr/share/sgml/${PN/-//}" +MY_PN="${PN%-stylesheets}" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="XSL Stylesheets for Docbook" +HOMEPAGE="https://github.com/docbook/wiki/wiki" +SRC_URI="mirror://sourceforge/docbook/${MY_P}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="ruby" + +RDEPEND=" + >=app-text/build-docbook-catalog-1.1 + ruby? ( ${RUBY_DEPS} ) +" + +S="${WORKDIR}/${MY_P}" + +# Makefile is broken since 1.76.0 +RESTRICT=test + +PATCHES=( + "${FILESDIR}"/nonrecursive-string-subst.patch +) + +src_prepare() { + default + + # Delete the unnecessary Java-related stuff and other tools as they + # bloat the stage3 tarballs massively. See bug #575818. + rm -rv extensions/ tools/ || die + find \( -name build.xml -o -name build.properties \) \ + -printf "removed %p\n" -delete || die + + if ! use ruby; then + rm -rv epub/ || die + fi +} + +# The makefile runs tests, not builds. +src_compile() { :; } + +src_test() { + emake check +} + +src_install() { + # The changelog is now zipped, and copied as the RELEASE-NOTES, so we + # don't need to install it + dodoc AUTHORS BUGS NEWS README RELEASE-NOTES.txt TODO + + insinto ${DOCBOOKDIR} + doins VERSION VERSION.xsl + + local i + for i in */; do + i=${i%/} + + cd "${S}"/${i} + for doc in ChangeLog README; do + if [ -e "$doc" ]; then + mv ${doc} ${doc}.${i} + dodoc ${doc}.${i} + rm ${doc}.${i} + fi + done + + doins -r "${S}"/${i} + done + + if use ruby; then + local cmd="dbtoepub${MY_PN#docbook-xsl}" + + # we can't use a symlink or it'll look for the library in the + # wrong path. + dodir /usr/bin + cat - > "${ED%/}"/usr/bin/${cmd} < +Bug-Debian: https://bugs.debian.org/750593 + +--- a/lib/lib.xsl ++++ b/lib/lib.xsl +@@ -10,7 +10,10 @@ + This module implements DTD-independent functions + + ******************************************************************** --> +- ++ + + + +@@ -56,6 +59,9 @@ + + + ++ ++ ++ + + + diff --git a/sdk_container/src/third_party/portage-stable/app-text/docbook-xsl-stylesheets/metadata.xml b/sdk_container/src/third_party/portage-stable/app-text/docbook-xsl-stylesheets/metadata.xml new file mode 100644 index 0000000000..e170e24574 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/docbook-xsl-stylesheets/metadata.xml @@ -0,0 +1,14 @@ + + + + + + + Install the Ruby-based dbtoepub script; requires an interpreter + compatible with app-eselect/eselect-ruby. + + + + docbook + + diff --git a/sdk_container/src/third_party/portage-stable/app-text/manpager/files/manpager.c b/sdk_container/src/third_party/portage-stable/app-text/manpager/files/manpager.c new file mode 100644 index 0000000000..99b0680a1d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/manpager/files/manpager.c @@ -0,0 +1,74 @@ +/* + * Wrapper to help enable colorized man page output. + * Only works with PAGER=less + * + * https://bugs.gentoo.org/184604 + * https://unix.stackexchange.com/questions/108699/documentation-on-less-termcap-variables + * + * Copyright 2003-2015 Gentoo Foundation + * Distributed under the terms of the GNU General Public License v2 + */ + +#include +#include +#include +#include + +#define COLOR(c, b) "\e[" #c ";" #b "m" + +#define _SE(termcap, col) setenv("LESS_TERMCAP_" #termcap, col, 0) +#define SE(termcap, c, b) _SE(termcap, COLOR(c, b)) + +static int usage(void) +{ + puts( + "manpager: display man pages with color!\n" + "\n" + "Usage:\n" + "\texport MANPAGER=manpager\n" + "\tman man\n" + "\n" + "To control the colorization, set these env vars:\n" + "\tLESS_TERMCAP_mb - start blinking\n" + "\tLESS_TERMCAP_md - start bolding\n" + "\tLESS_TERMCAP_me - stop bolding\n" + "\tLESS_TERMCAP_us - start underlining\n" + "\tLESS_TERMCAP_ue - stop underlining\n" + "\tLESS_TERMCAP_so - start standout (reverse video)\n" + "\tLESS_TERMCAP_se - stop standout (reverse video)\n" + "\n" + "You can do so by doing:\n" + "\texport LESS_TERMCAP_md=\"$(printf '\\e[1;36m')\"\n" + "\n" + "Run 'less --help' or 'man less' for more info" + ); + return 0; +} + +int main(int argc, char *argv[]) +{ + if (argc == 2 && (!strcmp(argv[1], "-h") || !strcmp(argv[1], "--help"))) + return usage(); + + /* Blinking. */ + SE(mb, 5, 31); /* Start. */ + + /* Bolding. */ + SE(md, 1, 34); /* Start. */ + SE(me, 0, 0); /* Stop. */ + + /* Underlining. */ + SE(us, 4, 36); /* Start. */ + SE(ue, 0, 0); /* Stop. */ + +#if 0 + /* Standout (reverse video). */ + SE(so, 1, 32); /* Start. */ + SE(se, 0, 0); /* Stop. */ +#endif + + argv[0] = getenv("PAGER") ? : "less"; + execvp(argv[0], argv); + perror("could not launch PAGER"); + return 1; +} diff --git a/sdk_container/src/third_party/portage-stable/app-text/manpager/manpager-1.ebuild b/sdk_container/src/third_party/portage-stable/app-text/manpager/manpager-1.ebuild new file mode 100644 index 0000000000..49301d4d54 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/manpager/manpager-1.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="Enable colorization of man pages" +HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +S=${WORKDIR} + +src_compile() { + local cmd=( + $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} + "${FILESDIR}"/manpager.c -o ${PN} + ) + echo "${cmd[@]}" + "${cmd[@]}" || die +} + +src_install() { + dobin ${PN} + echo "MANPAGER=manpager" | newenvd - 00manpager +} diff --git a/sdk_container/src/third_party/portage-stable/app-text/manpager/metadata.xml b/sdk_container/src/third_party/portage-stable/app-text/manpager/metadata.xml new file mode 100644 index 0000000000..73dda144f9 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/manpager/metadata.xml @@ -0,0 +1,8 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + diff --git a/sdk_container/src/third_party/portage-stable/app-text/sgml-common/Manifest b/sdk_container/src/third_party/portage-stable/app-text/sgml-common/Manifest new file mode 100644 index 0000000000..7714286e57 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/sgml-common/Manifest @@ -0,0 +1 @@ +DIST sgml-common-0.6.3-gentoo.tar.gz 128903 BLAKE2B 3b374179fe85cf6f098649d2014f9d34349ddccd17ae0ac4c5502414507601c545eaf27f7c76fafd63c36041068205d3b82309a204989f3b106c04c7adf14875 SHA512 c8de573d707ccf524407c9be9a6e7740341eb88ecb6bee69d6d11a2658ef74e6acfb7495afa33c9983ab015c3c925aac98278a4e01ee217892a9fb99e60798ce diff --git a/sdk_container/src/third_party/portage-stable/app-text/sgml-common/files/sgml-common-0.6.3-install-catalog.in b/sdk_container/src/third_party/portage-stable/app-text/sgml-common/files/sgml-common-0.6.3-install-catalog.in new file mode 100644 index 0000000000..bd26166906 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/sgml-common/files/sgml-common-0.6.3-install-catalog.in @@ -0,0 +1,182 @@ +#!@GENTOO_PORTAGE_EPREFIX@/bin/bash +# Script to install a catalog in the centralized SGML catalog +# Send any comments to Eric Bischoff +# This program is under GPL license. See LICENSE file for details. + +# Modified by Gentoo developers to better integrate it to portage. +# + +# Set help message +SGML_HELP_MESSAGE="Usage: `basename $0` [