Merge pull request #3495 from flatcar/buildbot/weekly-portage-stable-package-updates-2025-11-17

Weekly portage-stable package updates 2025-11-17
This commit is contained in:
Dongsu Park 2025-12-12 12:57:27 +01:00 committed by GitHub
commit 3bff39990f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
615 changed files with 9421 additions and 13443 deletions

View File

@ -29,6 +29,7 @@ acct-group/portage
acct-group/render
acct-group/root
acct-group/sgx
acct-group/shadow
acct-group/sshd
acct-group/systemd-coredump
acct-group/systemd-journal
@ -246,6 +247,7 @@ dev-libs/gmp
dev-libs/gobject-introspection-common
dev-libs/inih
dev-libs/jansson
dev-libs/jose
dev-libs/json-c
dev-libs/jsoncpp
dev-libs/libaio

View File

@ -728,6 +728,17 @@ EOF
sudo setfiles -Dv -r "${root_fs_dir}" "${root_fs_dir}"/etc/selinux/mcs/contexts/files/file_contexts "${root_fs_dir}"/etc
fi
# Temporary hack: set group ownership of /etc/{g,}shadow to the
# shadow group, that way unix_chkpwd, chage and expiry can act on
# those files.
#
# This permissions setting should likely be done in some ebuild, but
# currently files in /usr/share/baselayout are installed by the
# baselayout package, we don't want to add more deps to it.
sudo chgrp \
--reference="${root_fs_dir}/usr/bin/chage" \
"${root_fs_dir}"/{etc,usr/share/baselayout}/{g,}shadow
# Backup the /etc contents to /usr/share/flatcar/etc to serve as
# source for creating missing files. Make sure that the preexisting
# /usr/share/flatcar/etc does not have any meaningful (non-empty)

View File

@ -0,0 +1 @@
- `/etc/shadow`, `/etc/gshadow` are now owned by the `shadow` group, `/usr/bin/unix_chkpwd`, `/usr/bin/chage` and `/usr/bin/expiry` are now also owned by the `shadow` group with a sticky bit enabled.

View File

@ -0,0 +1,13 @@
- SDK: meson ([1.9.1](https://mesonbuild.com/Release-notes-for-1-9-0.html) (includes [1.8.0](https://mesonbuild.com/Release-notes-for-1-8-0.html)))
- SDK: nasm ([3.01](https://www.nasm.us/docs/3.01/nasmac.html) (includes [3.00](https://www.nasm.us/docs/3.00/nasmac.html)))
- base, dev: hwdata ([0.400](https://github.com/vcrhonek/hwdata/releases/tag/v0.400))
- base, dev: intel-microcode ([20251111_p20251112](https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/releases/tag/microcode-20251111))
- base, dev: jose ([14](https://github.com/latchset/jose/releases/tag/v14) (includes [13](https://github.com/latchset/jose/releases/tag/v13)))
- base, dev: less ([685](https://greenwoodsoftware.com/less/news.685.html))
- base, dev: libgpg-error ([1.56](https://github.com/gpg/libgpg-error/releases/tag/libgpg-error-1.56))
- base, dev: openssl ([3.5.4](https://github.com/openssl/openssl/releases/tag/openssl-3.5.4) (includes [3.5.3](https://github.com/openssl/openssl/releases/tag/openssl-3.5.3), [3.5.2](https://github.com/openssl/openssl/releases/tag/openssl-3.5.2), [3.5.1](https://github.com/openssl/openssl/releases/tag/openssl-3.5.1), [3.5.0](https://github.com/openssl/openssl/releases/tag/openssl-3.5.0)))
- base, dev: thin-provisioning-tools ([1.3.0](https://raw.githubusercontent.com/device-mapper-utils/thin-provisioning-tools/refs/tags/v1.3.0/CHANGES) (includes [1.2.2](https://raw.githubusercontent.com/device-mapper-utils/thin-provisioning-tools/refs/tags/v1.2.2/CHANGES), [1.2.1](https://raw.githubusercontent.com/device-mapper-utils/thin-provisioning-tools/refs/tags/v1.2.1/CHANGES), [1.2.0](https://raw.githubusercontent.com/device-mapper-utils/thin-provisioning-tools/refs/tags/v1.2.0/CHANGES), [1.1.0](https://raw.githubusercontent.com/device-mapper-utils/thin-provisioning-tools/refs/tags/v1.1.0/CHANGES), [1.0.14](https://raw.githubusercontent.com/device-mapper-utils/thin-provisioning-tools/refs/tags/v1.0.14/CHANGES), [1.0.13](https://raw.githubusercontent.com/device-mapper-utils/thin-provisioning-tools/refs/tags/v1.0.13/CHANGES), [1.0.12](https://raw.githubusercontent.com/device-mapper-utils/thin-provisioning-tools/refs/tags/v1.0.12/CHANGES), [1.0.11](https://raw.githubusercontent.com/device-mapper-utils/thin-provisioning-tools/refs/tags/v1.0.11/CHANGES)))
- sysext-podman: aardvark-dns ([1.15.0](https://github.com/containers/aardvark-dns/releases/tag/v1.15.0))
- sysext-python: platformdirs ([4.5.0](https://github.com/tox-dev/platformdirs/releases/tag/4.5.0))
- sysext-python: resolvelib ([1.2.1](https://raw.githubusercontent.com/sarugaku/resolvelib/refs/tags/1.2.1/CHANGELOG.rst))
- sysext-python: rich ([14.2.0](https://github.com/Textualize/rich/releases/tag/v14.2.0))

View File

@ -0,0 +1,2 @@
# This is to disable building thin_migrate tool.
export ECARGO_EXTRA_ARGS=--no-default-features

View File

@ -0,0 +1,81 @@
From c5fbb32be0509e4368268a79e7aacc6b5e34d28e Mon Sep 17 00:00:00 2001
From: Krzesimir Nowak <knowak@microsoft.com>
Date: Thu, 20 Nov 2025 13:16:09 +0100
Subject: [PATCH 1/2] [build] Simplify installation of symlinks and manpages
Signed-off-by: Krzesimir Nowak <knowak@microsoft.com>
---
Makefile | 52 ++++++++--------------------------------------------
1 file changed, 8 insertions(+), 44 deletions(-)
diff --git a/Makefile b/Makefile
index b04937aa..44c99c99 100644
--- a/Makefile
+++ b/Makefile
@@ -55,55 +55,19 @@ TOOLS:=\
era_invalidate \
era_restore
+# This must be two empty lines to get a newline.
+define NEWLINE
+
+
+endef
+
MANPAGES:=$(patsubst %,man8/%.8,$(TOOLS))
install: $(MANPAGES)
$(INSTALL_DIR) $(BINDIR)
$(INSTALL_PROGRAM) $(PDATA_TOOLS) $(BINDIR)
- ln -s -f pdata_tools $(BINDIR)/cache_check
- ln -s -f pdata_tools $(BINDIR)/cache_dump
- ln -s -f pdata_tools $(BINDIR)/cache_metadata_size
- ln -s -f pdata_tools $(BINDIR)/cache_repair
- ln -s -f pdata_tools $(BINDIR)/cache_restore
- ln -s -f pdata_tools $(BINDIR)/cache_writeback
- ln -s -f pdata_tools $(BINDIR)/thin_check
- ln -s -f pdata_tools $(BINDIR)/thin_delta
- ln -s -f pdata_tools $(BINDIR)/thin_dump
- ln -s -f pdata_tools $(BINDIR)/thin_ls
- ln -s -f pdata_tools $(BINDIR)/thin_repair
- ln -s -f pdata_tools $(BINDIR)/thin_restore
- ln -s -f pdata_tools $(BINDIR)/thin_rmap
- ln -s -f pdata_tools $(BINDIR)/thin_metadata_size
- ln -s -f pdata_tools $(BINDIR)/thin_metadata_pack
- ln -s -f pdata_tools $(BINDIR)/thin_metadata_unpack
- ln -s -f pdata_tools $(BINDIR)/thin_migrate
- ln -s -f pdata_tools $(BINDIR)/thin_trim
- ln -s -f pdata_tools $(BINDIR)/era_check
- ln -s -f pdata_tools $(BINDIR)/era_dump
- ln -s -f pdata_tools $(BINDIR)/era_invalidate
- ln -s -f pdata_tools $(BINDIR)/era_restore
+ $(foreach tool, $(TOOLS), ln -s -f pdata_tools $(BINDIR)/$(tool); $(NEWLINE))
$(INSTALL_DIR) $(MANPATH)/man8
- $(INSTALL_DATA) man8/cache_check.8 $(MANPATH)/man8
- $(INSTALL_DATA) man8/cache_dump.8 $(MANPATH)/man8
- $(INSTALL_DATA) man8/cache_metadata_size.8 $(MANPATH)/man8
- $(INSTALL_DATA) man8/cache_repair.8 $(MANPATH)/man8
- $(INSTALL_DATA) man8/cache_restore.8 $(MANPATH)/man8
- $(INSTALL_DATA) man8/cache_writeback.8 $(MANPATH)/man8
- $(INSTALL_DATA) man8/thin_check.8 $(MANPATH)/man8
- $(INSTALL_DATA) man8/thin_delta.8 $(MANPATH)/man8
- $(INSTALL_DATA) man8/thin_dump.8 $(MANPATH)/man8
- $(INSTALL_DATA) man8/thin_ls.8 $(MANPATH)/man8
- $(INSTALL_DATA) man8/thin_repair.8 $(MANPATH)/man8
- $(INSTALL_DATA) man8/thin_restore.8 $(MANPATH)/man8
- $(INSTALL_DATA) man8/thin_rmap.8 $(MANPATH)/man8
- $(INSTALL_DATA) man8/thin_metadata_size.8 $(MANPATH)/man8
- $(INSTALL_DATA) man8/thin_metadata_pack.8 $(MANPATH)/man8
- $(INSTALL_DATA) man8/thin_metadata_unpack.8 $(MANPATH)/man8
- $(INSTALL_DATA) man8/thin_migrate.8 $(MANPATH)/man8
- $(INSTALL_DATA) man8/era_check.8 $(MANPATH)/man8
- $(INSTALL_DATA) man8/era_dump.8 $(MANPATH)/man8
- $(INSTALL_DATA) man8/era_restore.8 $(MANPATH)/man8
- $(INSTALL_DATA) man8/era_invalidate.8 $(MANPATH)/man8
- $(INSTALL_DATA) man8/thin_trim.8 $(MANPATH)/man8
+ $(foreach tool, $(TOOLS), $(INSTALL_DATA) man8/$(tool).8 $(MANPATH)/man8; $(NEWLINE))
.PHONY: install
--
2.51.2

View File

@ -0,0 +1,135 @@
From 74215dade7bbddbfc0a46e1903fc289a56df3915 Mon Sep 17 00:00:00 2001
From: Krzesimir Nowak <knowak@microsoft.com>
Date: Thu, 20 Nov 2025 13:17:36 +0100
Subject: [PATCH 2/2] [all] Make thin_migrate tool optional
The tool pulls in, indirectly through the devicemapper crate, a
dependency on libclang. Make it possible to skip the tool to avoid the
dependency, but keep it enabled by default.
Signed-off-by: Krzesimir Nowak <knowak@microsoft.com>
---
Cargo.toml | 4 +++-
Makefile | 20 ++++++++++++++++++--
src/bin/pdata_tools.rs | 1 +
src/commands/mod.rs | 1 +
src/thin/mod.rs | 1 +
5 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
index 8594c6ba..155285a8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -18,7 +18,7 @@ clap = { version = "4.5", default-features = false, features = [
] }
crc32c = "0.6"
data-encoding = "2.9"
-devicemapper = "0.34"
+devicemapper ={ version = "0.34", optional = true }
exitcode = "1.1.2"
fixedbitset = "0.5"
flate2 = "1.1"
@@ -51,9 +51,11 @@ tempfile = "3.23"
thinp = { path = ".", features = ["devtools"] }
[features]
+default = ["thin_migrate"]
devtools = ["ratatui", "termion"]
io_uring = ["dep:io-uring"]
no_cleanup = []
+thin_migrate = ["dep:devicemapper"]
[profile.release]
debug = true
diff --git a/Makefile b/Makefile
index 44c99c99..a2dd51a4 100644
--- a/Makefile
+++ b/Makefile
@@ -2,9 +2,10 @@ V=@
PDATA_TOOLS:=\
target/release/pdata_tools
+CARGO_FLAGS:=$(if $(DISABLE_THIN_MIGRATE),--no-default-features)
$(PDATA_TOOLS):
- $(V) cargo build --release
+ $(V) cargo build --release $(CARGO_FLAGS)
PREFIX:=/usr
BINDIR:=$(DESTDIR)$(PREFIX)/sbin
@@ -31,6 +32,21 @@ clean:
cargo clean
$(RM) man8/*.8
+HAS_PDATA_TOOLS_BINARY:=$(shell if [ -f $(PDATA_TOOLS) ]; then echo 1; fi)
+ifneq ($(HAS_PDATA_TOOLS_BINARY),)
+
+HAS_THIN_MIGRATE:=$(shell grep -qF thin_migrate.rs $(PDATA_TOOLS).d && echo 1)
+
+ifneq ($(DISABLE_THIN_MIGRATE),)
+$(warning DISABLE_THIN_MIGRATE variable is ignored, the pdata_tools binary exists and it has $(if $(HAS_THIN_MIGRATE),,no )thin_migrate tool built in)
+endif
+
+else
+
+HAS_THIN_MIGRATE:=$(if $(DISABLE_THIN_MIGRATE),,1)
+
+endif
+
TOOLS:=\
cache_check \
cache_dump \
@@ -42,13 +58,13 @@ TOOLS:=\
thin_delta \
thin_dump \
thin_ls \
+ $(if $(HAS_THIN_MIGRATE),thin_migrate) \
thin_repair \
thin_restore \
thin_rmap \
thin_metadata_size \
thin_metadata_pack \
thin_metadata_unpack \
- thin_migrate \
thin_trim \
era_check \
era_dump \
diff --git a/src/bin/pdata_tools.rs b/src/bin/pdata_tools.rs
index c288fe03..67ef0d7d 100644
--- a/src/bin/pdata_tools.rs
+++ b/src/bin/pdata_tools.rs
@@ -29,6 +29,7 @@ fn register_commands<'a>() -> Vec<Box<dyn Command<'a>>> {
Box::new(thin_metadata_pack::ThinMetadataPackCommand),
Box::new(thin_metadata_size::ThinMetadataSizeCommand),
Box::new(thin_metadata_unpack::ThinMetadataUnpackCommand),
+ #[cfg(feature = "thin_migrate")]
Box::new(thin_migrate::ThinMigrateCommand),
Box::new(thin_repair::ThinRepairCommand),
Box::new(thin_restore::ThinRestoreCommand),
diff --git a/src/commands/mod.rs b/src/commands/mod.rs
index 5eeb66ab..72481eba 100644
--- a/src/commands/mod.rs
+++ b/src/commands/mod.rs
@@ -17,6 +17,7 @@ pub mod thin_ls;
pub mod thin_metadata_pack;
pub mod thin_metadata_size;
pub mod thin_metadata_unpack;
+#[cfg(feature = "thin_migrate")]
pub mod thin_migrate;
pub mod thin_repair;
pub mod thin_restore;
diff --git a/src/thin/mod.rs b/src/thin/mod.rs
index 1ef0e1be..eeed031e 100644
--- a/src/thin/mod.rs
+++ b/src/thin/mod.rs
@@ -10,6 +10,7 @@ pub mod ls;
pub mod metadata;
pub mod metadata_repair;
pub mod metadata_size;
+#[cfg(feature = "thin_migrate")]
pub mod migrate;
pub mod repair;
pub mod restore;
--
2.51.2

View File

@ -0,0 +1,18 @@
The patches make the thin_migrate tool optional, as this seems to be
the thing that pulls in devicemapper crate, which in order requires
bindgen crate, which in turn depends on libclang. Since thin_migrate
tools was never a part of Flatcar yet, we can skip building it for
now. If users will need the tool, we can think about adding it at a
cost of building clang in SDK builds.
The patches were filed to upstream:
https://github.com/device-mapper-utils/thin-provisioning-tools/pull/1
If they get accepted, we can try convincing Gentoo to add
"USE=+migrate" to the ebuild and hide the clang dependency behind the
flag. On Flatcar side we could then disable it.
Until that happens, these patches should be accompanied by a hook
function that will do "export ECARGO_EXTRA_ARGS=--no-default-features"
and "export MAKEOPTS=THIN_MIGRATE_EXCLUDE=x".

View File

@ -1,2 +0,0 @@
DIST jose-11.tar.gz 841374 BLAKE2B 5ffe35ebd48ed72d140e1dbf3ad37fcc3b4fd5534a5e1a5d9c43e82ad1901f989610baee2e2eb17209fd72f73c4f17227bed01d168bb4d243f067ec25051f913 SHA512 ffe09000837f79cefa549734d13c5d5d51042a42a055867241777ccbff3a127bac86a6155638fdf5ee52aad3598829e19724fd4e7de541117ed9b1c77c2ce457
DIST jose-12.tar.gz 841206 BLAKE2B 32473b67b4c6235c3f7ea04295bdd44dda3fe5a51355b9880a92d0a6aada78eeba2fb027a6329e8f249f087ab7dee705d0493771b63cb463067df709b7707212 SHA512 31b7fc9354c3579f5bf904be0efd3631fe35fbbcc85455b2d414664ff2b4dbb3253b9c954229d87ca2a2e3ec382c5316bcb3f2ee424572ed25946a99fe885ada

View File

@ -1,19 +0,0 @@
# Copyright 2022-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit meson
DESCRIPTION="C-language implementation of Javascript Object Signing and Encryption"
HOMEPAGE="https://github.com/latchset/jose"
SRC_URI="https://github.com/latchset/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
DEPEND="dev-libs/jansson"
RDEPEND="${DEPEND}
dev-libs/openssl:=
"

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>julien@jroy.ca</email>
<name>Julien Roy</name>
</maintainer>
<upstream>
<remote-id type="github">latchset/jose</remote-id>
</upstream>
</pkgmetadata>

View File

@ -32,10 +32,6 @@ app-crypt/azure-keyvault-pkcs11
# The only available ebuild (from GURU) has ~amd64 and no keyword for arm64 yet.
=app-crypt/clevis-19-r1 **
# Needed to address the ever-growing list of CVEs
=app-editors/vim-9.1.1652 ~amd64 ~arm64
=app-editors/vim-core-9.1.1652 ~amd64 ~arm64
# Needed by arm64-native SDK.
=app-emulation/open-vmdk-1.0 *
@ -56,8 +52,8 @@ dev-cpp/azure-security-keyvault-keys
=dev-libs/cowsql-1.15.9 ~arm64
=dev-libs/ding-libs-0.6.2-r1 ~arm64
# The only available ebuild (from GURU) has ~amd64 and no keyword for arm64 yet.
=dev-libs/jose-12 **
# The only available ebuild has ~amd64 and no keyword for arm64 yet.
=dev-libs/jose-14 **
# The only available ebuild (from GURU) has ~amd64 and no keyword for arm64 yet.
=dev-libs/luksmeta-9-r1 **
@ -78,9 +74,6 @@ dev-cpp/azure-security-keyvault-keys
=net-libs/libnetfilter_cthelper-1.0.1-r1 ~arm64
=net-libs/libnetfilter_cttimeout-1.0.1 ~arm64
# CVE-2025-9086, CVE-2025-10148
=net-misc/curl-8.16.0-r1 ~arm64
# CVE-2025-61984, CVE-2025-61985
=net-misc/openssh-10.2_p1 ~amd64 ~arm64
@ -90,9 +83,14 @@ dev-cpp/azure-security-keyvault-keys
sys-apps/azure-vm-utils
# Keep versions on both arches in sync.
=sys-apps/coreutils-9.8-r1 ~amd64
=sys-apps/zram-generator-1.2.1 ~arm64
=sys-auth/sssd-2.9.7 ~arm64
# So it builds with rust provided by SDK without pulling some older
# version of rust-bin, that does not support aarch64 for some reason.
=sys-block/thin-provisioning-tools-1.3.0 ~amd64 ~arm64
# Keep versions on both arches in sync.
=sys-boot/mokutil-0.7.2 **
# Enable ipvsadm for arm64.

View File

@ -17,6 +17,3 @@
# Update engine needs updating to use a newer version of protobuf.
>=dev-libs/protobuf-22.0
# Pulls in LLVM and clang.
>=sys-block/thin-provisioning-tools-1.0.14

View File

@ -23,3 +23,14 @@ dev-perl/Locale-gettext-1.70.0_p20181130
# fails with "Failed to resolve typeattributeset statement at
# /var/lib/selinux/mcs/tmp/modules/400/ntp/cil:120"
sec-policy/selinux-ntp-2.20250618-r1
# The sys-block/thin-provisioning-tools package depends on it, because
# of the thin_migrate tool using devicemapper crate that indirectly
# depends on clang (through bindgen). We disable the tool anyway with
# patches, but the dependency in the ebuild still need to be taken
# care of.
llvm-core/clang-9999
# Pulled in by sys-apps/texinfo, contains only an info file, which
# will get masked anyway during installation.
app-doc/info-manual-9999

View File

@ -27,6 +27,7 @@ sys-libs/libseccomp static-libs
sys-libs/ncurses static-libs
sys-libs/zlib static-libs
virtual/jpeg static-libs
virtual/zlib static-libs
x11-libs/pixman static-libs
# Get latest EDK2 firmware for Secure Boot on arm64.

View File

@ -1 +1 @@
DIST flatcar-baselayout-ffce3a727a152a5f627063325acda62ba3c9463f.tar.gz 37648 BLAKE2B 7b81bc17305698cb5c4d07452dd92c6a6eeb44c1e93b7b946c30d3dc4b26927c4f0699cca9b3b603ea2081b4b335b7dadcb397cfccd3ab9d84237038c1c8d36c SHA512 a995bcf4936c9d9b3c2e3fbb12dbad29b31e15bb2b2c9d7af73e0ccd94904710bcda7af25d16c10aed41218b83d54c3910baeba58e6ff55fa47ff5f611df2685
DIST flatcar-baselayout-bb76459c3338ce0e76c4e48d545795bfbc9dbfd9.tar.gz 37869 BLAKE2B 2d7ca48708e4eb3dc2f68ed6fb2b86bb9a903031e3249f55f8b8a0e1d6d08ef35caa40a50560c87bd0bad2c69fc9089425469a56b66a9c9ac9eee69bc83fbe5d SHA512 4f294d82eec5d53b1b444561f01b33b768e88c44ef7d8d3d7a5ce12a42c06048656a9f8bbdcb3a2c4751eb3f92639ccbdbb6a316e35b85a242476e1de5cd3fe1

View File

@ -8,7 +8,7 @@ if [[ "${PV}" == 9999 ]]; then
inherit git-r3
KEYWORDS="~amd64 ~arm64"
else
EGIT_COMMIT="ffce3a727a152a5f627063325acda62ba3c9463f" # flatcar-master
EGIT_COMMIT="bb76459c3338ce0e76c4e48d545795bfbc9dbfd9" # flatcar-master
SRC_URI="https://github.com/flatcar/baselayout/archive/${EGIT_COMMIT}.tar.gz -> flatcar-${PN}-${EGIT_COMMIT}.tar.gz"
S="${WORKDIR}/${PN}-${EGIT_COMMIT}"
KEYWORDS="amd64 arm64"

View File

@ -34,7 +34,7 @@ DEPEND="
dev-libs/openssl:=
net-misc/curl
sys-fs/e2fsprogs
sys-libs/zlib
virtual/zlib:=
dsa? ( sys-apps/pciutils )
qat? ( sys-apps/pciutils )
"

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>base-system@gentoo.org</email>
</maintainer>
</pkgmetadata>

View File

@ -0,0 +1,24 @@
# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit acct-group user-info
ACCT_GROUP_ID=42
pkg_postinst() {
# Look up the gid in ${EROOT}/etc/group.
# It may differ from the gid in /etc/group.
local gid=$(egetent group shadow | cut -d: -f3)
if [[ -z ${gid} ]]; then
eerror "Unable to determine id for shadow group"
return
fi
local db
for db in gshadow shadow; do
[[ -e ${EROOT}/etc/${db} ]] || continue
chgrp "${gid}" "${EROOT}/etc/${db}"
chmod g+r "${EROOT}/etc/${db}"
done
}

View File

@ -46,7 +46,7 @@ SLOT="0"
IUSE="gcrypt ldap nls offensive pam sasl +secure-path selinux +sendmail skey ssl sssd"
DEPEND="
sys-libs/zlib:=
virtual/zlib:=
virtual/libcrypt:=
gcrypt? ( dev-libs/libgcrypt:= )
ldap? (

View File

@ -49,7 +49,7 @@ SLOT="0"
IUSE="gcrypt ldap nls offensive pam sasl +secure-path selinux +sendmail skey ssl sssd"
DEPEND="
sys-libs/zlib:=
virtual/zlib:=
virtual/libcrypt:=
gcrypt? ( dev-libs/libgcrypt:= )
ldap? (

View File

@ -49,7 +49,7 @@ SLOT="0"
IUSE="gcrypt ldap nls offensive pam sasl +secure-path selinux +sendmail skey ssl sssd"
DEPEND="
sys-libs/zlib:=
virtual/zlib:=
virtual/libcrypt:=
gcrypt? ( dev-libs/libgcrypt:= )
ldap? (

View File

@ -24,7 +24,7 @@ IUSE="
RESTRICT="!test? ( test )"
RDEPEND="
sys-libs/zlib:=[${MULTILIB_USEDEP}]
virtual/zlib:=[${MULTILIB_USEDEP}]
acl? ( virtual/acl:=[${MULTILIB_USEDEP}] )
blake2? ( app-crypt/libb2:=[${MULTILIB_USEDEP}] )
bzip2? ( app-arch/bzip2:=[${MULTILIB_USEDEP}] )

View File

@ -24,7 +24,7 @@ IUSE="
RESTRICT="!test? ( test )"
RDEPEND="
sys-libs/zlib:=[${MULTILIB_USEDEP}]
virtual/zlib:=[${MULTILIB_USEDEP}]
acl? ( virtual/acl:=[${MULTILIB_USEDEP}] )
blake2? ( app-crypt/libb2:=[${MULTILIB_USEDEP}] )
bzip2? ( app-arch/bzip2:=[${MULTILIB_USEDEP}] )

View File

@ -19,7 +19,7 @@ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~spar
IUSE="static test"
RESTRICT="!test? ( test )"
LIB_DEPEND=">=sys-libs/zlib-1.2.3[static-libs(+)]"
LIB_DEPEND=">=virtual/zlib-1.2.3:=[static-libs(+)]"
RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
DEPEND="
${RDEPEND}

View File

@ -19,7 +19,7 @@ RESTRICT="!test? ( test )"
RDEPEND="
lzma? ( app-arch/xz-utils )
lz4? ( app-arch/lz4:= )
zlib? ( sys-libs/zlib )
zlib? ( virtual/zlib:= )
"
DEPEND="${RDEPEND}"

View File

@ -19,7 +19,7 @@ RESTRICT="!test? ( test )"
RDEPEND="
lzma? ( app-arch/xz-utils )
lz4? ( app-arch/lz4:= )
zlib? ( sys-libs/zlib )
zlib? ( virtual/zlib:= )
"
DEPEND="${RDEPEND}"

View File

@ -1,4 +1,4 @@
# Copyright 2023-2024 Gentoo Authors
# Copyright 2023-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -15,7 +15,7 @@ if [[ ${PV} == 9999* ]]; then
else
SRC_URI="${CARGO_CRATE_URIS}"
SRC_URI+="https://github.com/containers/aardvark-dns/releases/download/v${PV}/${PN}-v${PV}-vendor.tar.gz"
KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv"
KEYWORDS="amd64 arm64 ~loong ~ppc64 ~riscv"
fi
# main

View File

@ -4,4 +4,5 @@ DIST containerd-2.0.4.tar.gz 10450939 BLAKE2B f82ed40eab0f1d186f4fb04217b8f75a9d
DIST containerd-2.0.5.tar.gz 10452563 BLAKE2B bf03316c9211eaa17a3b40b1fc9f9aca42fe3e621e086e612eb07c286c6b62bc7a0a2426ce7b6742dce2924d570ab599aefb43463c4fa6be277e562bad79668f SHA512 af89a5c9ad5f931c5fee33c75c13c296fc9ec966f2c64ec244897695eebb365bcb542f6b431e60d4ef7213f0ea11d3a8896d1b7f033ed445e6b521b7ddbffe6f
DIST containerd-2.1.0.tar.gz 10610618 BLAKE2B 147c21b4650543af9b0e533e381a0505ba927d6e9270b9b03a09016eb3ccf29875db7fa274944fea2ff7b029b6a05a17d14c61e24b5f3426b31f320831eeb46a SHA512 e9bb128917bb6b2e21a8e05344af3fdcdda8620be20e54407bc2c73046278a88a77bcbed6ef7a59099c9ee3303283db46b90b71afdd45236d3c534749ba844e0
DIST containerd-2.1.1.tar.gz 10610787 BLAKE2B acc2d769752c783643795d228c0d267b0802e09166dc783e84087da0029a822a64688f5e59c047c47b25f50ca2a1ccb7f5b6216ad6beeb4489df308e525e9716 SHA512 542f7cae61e1ef2e1b529b0bea66d7ad9016d4605de73de9c9c8a738e50ec6f470b939d1546482320515b77424bffe1cf24b721173ac0c0ecd0100c92817cfb1
DIST containerd-2.1.4.tar.gz 10614131 BLAKE2B b8f4007b4bb368a1fa04c913d606f65d2ea4a17a6419ce12f2b6112eee2574d7a09fb8e2500d1c2f21bef8792dc047df4d63446211ae006662e616facda91f24 SHA512 a9f84784e917621ee5ea38ad20b8106e642fbf463a00d319b73a1a8e4d1fdd5be2fba0789b6a5d31107ef239d3713eced99ce979d4b2764714271a63c0936c15
DIST containerd-2.1.5.tar.gz 10622156 BLAKE2B b612e9606554d492f59d4665dcbd85b0fdfa3316ecff3a2122357f8d8ef68991a2b77c367e3a7143efb768e9a78ee82ace9ffdc0832a9eb4ec37e98b0f827840 SHA512 6376228edf615b1ff3d40287622d4f72793be091d59d5d7e97f7bdc4f265aa4412f4a5dd1937ef795e54aa5ee8a87d785e859d7c6525a25fa86631b878cefc59

View File

@ -11,7 +11,7 @@ SRC_URI="https://github.com/containerd/containerd/archive/v${PV}.tar.gz -> ${P}.
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
KEYWORDS="amd64 ~arm arm64 ppc64 ~riscv ~x86"
IUSE="apparmor btrfs device-mapper +cri hardened +seccomp selinux test"
COMMON_DEPEND="

View File

@ -10,3 +10,5 @@ DIST incus-6.15.tar.xz 12716184 BLAKE2B bc821575f7f24b42054028ce628a29f38ef41b8a
DIST incus-6.15.tar.xz.asc 833 BLAKE2B ccab84a2fd3f9d6971ff0fd7cba9afc23dbe0fc0bcb8738656f9071db7c773840566009d5014dc15d37be26bff018e3faf8af59dd5d50b629aebd2e79cf3dc5e SHA512 b1bf43ffff719a3f1c6be7a8d32e44f418efb8e926914dea5479ba1175768910fa38b4e5b83c51e90ec34d2d345629597beb286215b9658a611cf568b8e43122
DIST incus-6.17.tar.xz 12809024 BLAKE2B 5d6cb615b547430641faa716df5ce7c4d03aad436a4161c9d9dab99bd4fff7b8f93c8250d5b65237047c2baeeeac6f42a21b9a6970a41e79e7e6af9ceca2cf62 SHA512 ae744784ed676dcdcad3a284a0e16a816786cb87d78fae7f317baa4c75b193edb56ab2ec38b916c84930df5385e7b239c1cb9dc869672502be1e4d660a8d6113
DIST incus-6.17.tar.xz.asc 833 BLAKE2B a0fc3eaa51df6b77988cc331cf03fad982d0a735a2e751564d05bd6f929b422b8682b56ec9101b17000978ec7f919189b3721779ca299f7df0c46fa56275aaf6 SHA512 23cc6ed65bf99899bd3ed4dd7f79a1eada375e32ad0f9b91be1e3fcc0d2af5abeffe05b7c02f0b63a7eca7dfaeee030dbc27fce67e8952f42f18638ebfc9a2e2
DIST incus-6.18.tar.xz 13269284 BLAKE2B 5894d445d869ab280332f9874fc5e885495925c6408d003c972ef05b3d1bb89f8b9c5d95e5c0bb7cd20377e8e9d80673049e88d5d3d3d0b2d83ae0c2aaf6a79c SHA512 619fb28dbcfbd7fca93a5941b77c6106f8489f277167e44f131a2816ba3cab6519a7103cf92714fcd9c78ff06105bc1999982c6b6dcb4e8478646aac9c83fbec
DIST incus-6.18.tar.xz.asc 833 BLAKE2B 539759887221842b0b1be365e6eaa112317e77443627471725bc976d00efeb0e50ee6700a8d6dd15e50978fa72cfeab8186af0e7f6c66d9d4a1ac7cb9c2212f3 SHA512 b3803b3e16cdc1e916ac50d679b2e313ae4652ca5203b7b8090f4acc0b86f1070d107adf8f6f89e05e0502cd28f2d134588b9301ecffdae88ae75e84d431c0f3

View File

@ -0,0 +1,259 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-env go-module linux-info optfeature systemd toolchain-funcs verify-sig
DESCRIPTION="Modern, secure and powerful system container and virtual machine manager"
HOMEPAGE="https://linuxcontainers.org/incus/introduction/ https://github.com/lxc/incus"
SRC_URI="https://linuxcontainers.org/downloads/incus/${P}.tar.xz
verify-sig? ( https://linuxcontainers.org/downloads/incus/${P}.tar.xz.asc )"
LICENSE="Apache-2.0 BSD LGPL-3 MIT"
SLOT="0/stable"
KEYWORDS="~amd64 ~arm64"
IUSE="apparmor fuidshift nls qemu"
DEPEND="acct-group/incus
acct-group/incus-admin
app-arch/xz-utils
>=app-containers/lxc-5.0.0:=[apparmor?,seccomp(+)]
dev-db/sqlite:3
>=dev-libs/cowsql-1.15.7
dev-libs/lzo
>=dev-libs/raft-0.22.1:=[lz4]
>=dev-util/xdelta-3.0[lzma(+)]
net-dns/dnsmasq[dhcp]
sys-libs/libcap
virtual/udev"
RDEPEND="${DEPEND}
|| (
net-firewall/iptables
net-firewall/nftables[json]
)
fuidshift? ( !app-containers/lxd )
net-firewall/ebtables
sys-apps/iproute2
sys-fs/fuse:*
>=sys-fs/lxcfs-5.0.0
sys-fs/squashfs-tools[lzma]
virtual/acl
apparmor? ( sec-policy/apparmor-profiles )
qemu? (
app-cdr/cdrtools
app-emulation/qemu[spice,usbredir,virtfs]
sys-apps/gptfdisk
)"
BDEPEND=">=dev-lang/go-1.24.7
nls? ( sys-devel/gettext )
verify-sig? ( sec-keys/openpgp-keys-linuxcontainers )"
CONFIG_CHECK="
~AIO
~CGROUPS
~IPC_NS
~NET_NS
~PID_NS
~SECCOMP
~USER_NS
~UTS_NS
~KVM
~MACVTAP
~VHOST_VSOCK
"
ERROR_AIO="CONFIG_AIO is required."
ERROR_IPC_NS="CONFIG_IPC_NS is required."
ERROR_NET_NS="CONFIG_NET_NS is required."
ERROR_PID_NS="CONFIG_PID_NS is required."
ERROR_SECCOMP="CONFIG_SECCOMP is required."
ERROR_UTS_NS="CONFIG_UTS_NS is required."
WARNING_KVM="CONFIG_KVM and CONFIG_KVM_AMD/-INTEL is required for virtual machines."
WARNING_MACVTAP="CONFIG_MACVTAP is required for virtual machines."
WARNING_VHOST_VSOCK="CONFIG_VHOST_VSOCK is required for virtual machines."
# Go magic.
QA_PREBUILT="/usr/bin/incus
/usr/bin/incus-agent
/usr/bin/incus-benchmark
/usr/bin/incus-migrate
/usr/bin/lxc-to-incus
/usr/sbin/fuidshift
/usr/sbin/incusd
/usr/sbin/lxd-to-incus"
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/linuxcontainers.asc
# The testsuite must be run as root.
# make: *** [Makefile:156: check] Error 1
RESTRICT="test"
GOPATH="${S}/_dist"
src_unpack() {
verify-sig_src_unpack
go-module_src_unpack
}
src_prepare() {
export GOPATH="${S}/_dist"
default
sed -i \
-e "s:\./configure:./configure --prefix=/usr --libdir=${EPREFIX}/usr/lib/incus:g" \
-e "s:make:make ${MAKEOPTS}:g" \
Makefile || die
sed -i \
-e "s:/usr/share/OVMF:/usr/share/edk2/OvmfX64:g" \
-e "s:OVMF_VARS.ms.fd:OVMF_VARS.fd:g" \
internal/server/instance/drivers/edk2/driver_edk2.go || die "Failed to fix hardcoded ovmf paths."
cp "${FILESDIR}"/incus-6.14-r1.service "${T}"/incus.service || die
if use apparmor; then
sed -i \
'/^EnvironmentFile=.*/a ExecStartPre=\/usr\/libexec\/lxc\/lxc-apparmor-load' \
"${T}"/incus.service || die
fi
# Disable -Werror's from go modules.
find "${S}" -name "cgo.go" -exec sed -i "s/ -Werror / /g" {} + || die
}
src_configure() { :; }
src_compile() {
export GOPATH="${S}/_dist"
export CGO_LDFLAGS_ALLOW="-Wl,-z,now"
for k in incus-benchmark incus-simplestreams incus-user incus lxc-to-incus lxd-to-incus ; do
ego install -v -x "${S}/cmd/${k}"
done
if use fuidshift ; then
ego install -v -x "${S}/cmd/fuidshift"
fi
ego install -v -x -tags libsqlite3 "${S}"/cmd/incusd
# Needs to be built statically
CGO_ENABLED=0 go install -v -tags agent,netgo,static -buildmode default "${S}"/cmd/incus-migrate
# Build the VM agents, statically too
if use amd64 ; then
GOARCH=amd64 CGO_ENABLED=0 ego build -o "${S}"/_dist/bin/incus-agent.linux.x86_64 -v \
-tags agent,netgo,static -buildmode default "${S}"/cmd/incus-agent
GOARCH=386 CGO_ENABLED=0 ego build -o "${S}"/_dist/bin/incus-agent.linux.i686 -v \
-tags agent,netgo,static -buildmode default "${S}"/cmd/incus-agent
GOARCH=amd64 GOOS=windows CGO_ENABLED=0 ego build -o "${S}"/_dist/bin/incus-agent.windows.x86_64 -v \
-tags agent,netgo,static -buildmode default "${S}"/cmd/incus-agent
GOARCH=386 GOOS=windows CGO_ENABLED=0 ego build -o "${S}"/_dist/bin/incus-agent.windows.i686 -v \
-tags agent,netgo,static -buildmode default "${S}"/cmd/incus-agent
elif use arm64 ; then
GOARCH=arm64 CGO_ENABLED=0 ego build -o "${S}"/_dist/bin/incus-agent.linux.aarch64 -v \
-tags agent,netgo,static -buildmode default "${S}"/cmd/incus-agent
GOARCH=arm64 GOOS=windows CGO_ENABLED=0 ego build -o "${S}"/_dist/bin/incus-agent.windows.aarch64 -v \
-tags agent,netgo,static -buildmode default "${S}"/cmd/incus-agent
else
echo "No VM support for this arch."
return
fi
use nls && emake build-mo
}
src_test() {
emake check
}
src_install() {
export GOPATH="${S}/_dist"
export GOHOSTARCH=$(go-env_goarch "${CBUILD}")
if [[ "${GOARCH}" != "${GOHOSTARCH}" ]]; then
local bindir="_dist/bin/linux_${GOARCH}"
else
local bindir="_dist/bin"
fi
newsbin "${FILESDIR}"/incus-startup-0.4.sh incus-startup
# Admin tools
for l in incusd incus-user lxd-to-incus ; do
dosbin "${bindir}/${l}"
done
# User tools
for m in incus-benchmark incus-migrate incus-simplestreams incus lxc-to-incus ; do
dobin "${bindir}/${m}"
done
# VM Agents
if use amd64 ; then
exeinto /usr/libexec/incus/agents
doexe ${bindir}/incus-agent.linux.x86_64
doexe ${bindir}/incus-agent.linux.i686
doexe ${bindir}/incus-agent.windows.x86_64
doexe ${bindir}/incus-agent.windows.i686
elif use arm64 ; then
exeinto /usr/libexec/incus
doexe ${bindir}/incus-agent.linux.aarch64
doexe ${bindir}/incus-agent.windows.aarch64
fi
# fuidshift, should be moved under admin tools at some point
if use fuidshift ; then
dosbin ${bindir}/fuidshift
fi
newconfd "${FILESDIR}"/incus-6.0.confd incus
newinitd "${FILESDIR}"/incus-6.0.initd incus
newinitd "${FILESDIR}"/incus-user-0.4.initd incus-user
systemd_dounit "${T}"/incus.service
systemd_newunit "${FILESDIR}"/incus-0.4.socket incus.socket
systemd_newunit "${FILESDIR}"/incus-startup-0.4.service incus-startup.service
systemd_newunit "${FILESDIR}"/incus-user-0.4.service incus-user.service
systemd_newunit "${FILESDIR}"/incus-user-0.4.socket incus-user.socket
if ! tc-is-cross-compiler; then
# Generate and install shell completion files.
mkdir -p "${D}"/usr/share/{bash-completion/completions/,fish/vendor_completions.d/,zsh/site-functions/} || die
"${bindir}"/incus completion bash > "${D}"/usr/share/bash-completion/completions/incus || die
"${bindir}"/incus completion fish > "${D}"/usr/share/fish/vendor_completions.d/incus.fish || die
"${bindir}"/incus completion zsh > "${D}"/usr/share/zsh/site-functions/_incus || die
else
ewarn "Shell completion files not installed! Install them manually with incus completion --help"
fi
dodoc AUTHORS
dodoc -r doc/*
use nls && domo po/*.mo
# Incus needs INCUS_EDK2_PATH in env to find OVMF files for virtual machines, #946184,
# and INCUS_AGENT_PATH to find multi-setup agents for VMs, #959878.
newenvd "${FILESDIR}"/90incus.envd 90incus
}
pkg_postinst() {
elog
elog "Please see"
elog " https://wiki.gentoo.org/wiki/Incus"
elog " https://wiki.gentoo.org/wiki/Incus#Migrating_from_LXD"
elog
optfeature "OCI container images support" app-containers/skopeo app-containers/umoci
optfeature "support for ACME certificate issuance" app-crypt/lego
optfeature "btrfs storage backend" sys-fs/btrfs-progs
optfeature "ipv6 support" net-dns/dnsmasq[ipv6]
optfeature "full incus-migrate support" net-misc/rsync
optfeature "lvm2 storage backend" sys-fs/lvm2
optfeature "zfs storage backend" sys-fs/zfs
elog
elog "Be sure to add your local user to the incus group."
elog
}

View File

@ -0,0 +1,270 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-env go-module linux-info optfeature systemd toolchain-funcs verify-sig
DESCRIPTION="Modern, secure and powerful system container and virtual machine manager"
HOMEPAGE="https://linuxcontainers.org/incus/introduction/ https://github.com/lxc/incus"
if [[ "${PV}" == 9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/lxc/incus.git"
else
SRC_URI="https://linuxcontainers.org/downloads/incus/${P}.tar.xz
verify-sig? ( https://linuxcontainers.org/downloads/incus/${P}.tar.xz.asc )"
KEYWORDS="~amd64 ~arm64"
fi
LICENSE="Apache-2.0 BSD LGPL-3 MIT"
SLOT="0/stable"
IUSE="apparmor fuidshift nls qemu"
DEPEND="acct-group/incus
acct-group/incus-admin
app-arch/xz-utils
>=app-containers/lxc-5.0.0:=[apparmor?,seccomp(+)]
dev-db/sqlite:3
>=dev-libs/cowsql-1.15.7
dev-libs/lzo
>=dev-libs/raft-0.22.1:=[lz4]
>=dev-util/xdelta-3.0[lzma(+)]
net-dns/dnsmasq[dhcp]
sys-libs/libcap
virtual/udev"
RDEPEND="${DEPEND}
|| (
net-firewall/iptables
net-firewall/nftables[json]
)
fuidshift? ( !app-containers/lxd )
net-firewall/ebtables
sys-apps/iproute2
sys-fs/fuse:*
>=sys-fs/lxcfs-5.0.0
sys-fs/squashfs-tools[lzma]
virtual/acl
apparmor? ( sec-policy/apparmor-profiles )
qemu? (
app-cdr/cdrtools
app-emulation/qemu[spice,usbredir,virtfs]
sys-apps/gptfdisk
)"
BDEPEND=">=dev-lang/go-1.24.7
nls? ( sys-devel/gettext )
verify-sig? ( sec-keys/openpgp-keys-linuxcontainers )"
CONFIG_CHECK="
~AIO
~CGROUPS
~IPC_NS
~NET_NS
~PID_NS
~SECCOMP
~USER_NS
~UTS_NS
~KVM
~MACVTAP
~VHOST_VSOCK
"
ERROR_AIO="CONFIG_AIO is required."
ERROR_IPC_NS="CONFIG_IPC_NS is required."
ERROR_NET_NS="CONFIG_NET_NS is required."
ERROR_PID_NS="CONFIG_PID_NS is required."
ERROR_SECCOMP="CONFIG_SECCOMP is required."
ERROR_UTS_NS="CONFIG_UTS_NS is required."
WARNING_KVM="CONFIG_KVM and CONFIG_KVM_AMD/-INTEL is required for virtual machines."
WARNING_MACVTAP="CONFIG_MACVTAP is required for virtual machines."
WARNING_VHOST_VSOCK="CONFIG_VHOST_VSOCK is required for virtual machines."
# Go magic.
QA_PREBUILT="/usr/bin/incus
/usr/bin/incus-agent
/usr/bin/incus-benchmark
/usr/bin/incus-migrate
/usr/bin/lxc-to-incus
/usr/sbin/fuidshift
/usr/sbin/incusd
/usr/sbin/lxd-to-incus"
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/linuxcontainers.asc
# The testsuite must be run as root.
# make: *** [Makefile:156: check] Error 1
RESTRICT="test"
GOPATH="${S}/_dist"
src_unpack() {
if [[ "${PV}" == 9999* ]]; then
git-r3_src_unpack
go-module_live_vendor
else
verify-sig_src_unpack
go-module_src_unpack
fi
}
src_prepare() {
export GOPATH="${S}/_dist"
default
sed -i \
-e "s:\./configure:./configure --prefix=/usr --libdir=${EPREFIX}/usr/lib/incus:g" \
-e "s:make:make ${MAKEOPTS}:g" \
Makefile || die
sed -i \
-e "s:/usr/share/OVMF:/usr/share/edk2/OvmfX64:g" \
-e "s:OVMF_VARS.ms.fd:OVMF_VARS.fd:g" \
internal/server/instance/drivers/edk2/driver_edk2.go || die "Failed to fix hardcoded ovmf paths."
cp "${FILESDIR}"/incus-6.14-r1.service "${T}"/incus.service || die
if use apparmor; then
sed -i \
'/^EnvironmentFile=.*/a ExecStartPre=\/usr\/libexec\/lxc\/lxc-apparmor-load' \
"${T}"/incus.service || die
fi
# Disable -Werror's from go modules.
find "${S}" -name "cgo.go" -exec sed -i "s/ -Werror / /g" {} + || die
}
src_configure() { :; }
src_compile() {
export GOPATH="${S}/_dist"
export CGO_LDFLAGS_ALLOW="-Wl,-z,now"
for k in incus-benchmark incus-simplestreams incus-user incus lxc-to-incus lxd-to-incus ; do
ego install -v -x "${S}/cmd/${k}"
done
if use fuidshift ; then
ego install -v -x "${S}/cmd/fuidshift"
fi
ego install -v -x -tags libsqlite3 "${S}"/cmd/incusd
# Needs to be built statically
CGO_ENABLED=0 go install -v -tags agent,netgo,static -buildmode default "${S}"/cmd/incus-migrate
# Build the VM agents, statically too
if use amd64 ; then
GOARCH=amd64 CGO_ENABLED=0 ego build -o "${S}"/_dist/bin/incus-agent.linux.x86_64 -v \
-tags agent,netgo,static -buildmode default "${S}"/cmd/incus-agent
GOARCH=386 CGO_ENABLED=0 ego build -o "${S}"/_dist/bin/incus-agent.linux.i686 -v \
-tags agent,netgo,static -buildmode default "${S}"/cmd/incus-agent
GOARCH=amd64 GOOS=windows CGO_ENABLED=0 ego build -o "${S}"/_dist/bin/incus-agent.windows.x86_64 -v \
-tags agent,netgo,static -buildmode default "${S}"/cmd/incus-agent
GOARCH=386 GOOS=windows CGO_ENABLED=0 ego build -o "${S}"/_dist/bin/incus-agent.windows.i686 -v \
-tags agent,netgo,static -buildmode default "${S}"/cmd/incus-agent
elif use arm64 ; then
GOARCH=arm64 CGO_ENABLED=0 ego build -o "${S}"/_dist/bin/incus-agent.linux.aarch64 -v \
-tags agent,netgo,static -buildmode default "${S}"/cmd/incus-agent
GOARCH=arm64 GOOS=windows CGO_ENABLED=0 ego build -o "${S}"/_dist/bin/incus-agent.windows.aarch64 -v \
-tags agent,netgo,static -buildmode default "${S}"/cmd/incus-agent
else
echo "No VM support for this arch."
return
fi
use nls && emake build-mo
}
src_test() {
emake check
}
src_install() {
export GOPATH="${S}/_dist"
export GOHOSTARCH=$(go-env_goarch "${CBUILD}")
if [[ -n "${GOARCH}" && "${GOARCH}" != "${GOHOSTARCH}" ]]; then
local bindir="_dist/bin/linux_${GOARCH}"
else
local bindir="_dist/bin"
fi
newsbin "${FILESDIR}"/incus-startup-0.4.sh incus-startup
# Admin tools
for l in incusd incus-user lxd-to-incus ; do
dosbin "${bindir}/${l}"
done
# User tools
for m in incus-benchmark incus-migrate incus-simplestreams incus lxc-to-incus ; do
dobin "${bindir}/${m}"
done
# VM Agents
if use amd64 ; then
exeinto /usr/libexec/incus/agents
doexe ${bindir}/incus-agent.linux.x86_64
doexe ${bindir}/incus-agent.linux.i686
doexe ${bindir}/incus-agent.windows.x86_64
doexe ${bindir}/incus-agent.windows.i686
elif use arm64 ; then
exeinto /usr/libexec/incus
doexe ${bindir}/incus-agent.linux.aarch64
doexe ${bindir}/incus-agent.windows.aarch64
fi
# fuidshift, should be moved under admin tools at some point
if use fuidshift ; then
dosbin ${bindir}/fuidshift
fi
newconfd "${FILESDIR}"/incus-6.0.confd incus
newinitd "${FILESDIR}"/incus-6.0.initd incus
newinitd "${FILESDIR}"/incus-user-0.4.initd incus-user
systemd_dounit "${T}"/incus.service
systemd_newunit "${FILESDIR}"/incus-0.4.socket incus.socket
systemd_newunit "${FILESDIR}"/incus-startup-0.4.service incus-startup.service
systemd_newunit "${FILESDIR}"/incus-user-0.4.service incus-user.service
systemd_newunit "${FILESDIR}"/incus-user-0.4.socket incus-user.socket
if ! tc-is-cross-compiler; then
# Generate and install shell completion files.
mkdir -p "${D}"/usr/share/{bash-completion/completions/,fish/vendor_completions.d/,zsh/site-functions/} || die
"${bindir}"/incus completion bash > "${D}"/usr/share/bash-completion/completions/incus || die
"${bindir}"/incus completion fish > "${D}"/usr/share/fish/vendor_completions.d/incus.fish || die
"${bindir}"/incus completion zsh > "${D}"/usr/share/zsh/site-functions/_incus || die
else
ewarn "Shell completion files not installed! Install them manually with incus completion --help"
fi
dodoc AUTHORS
dodoc -r doc/*
use nls && domo po/*.mo
# Incus needs INCUS_EDK2_PATH in env to find OVMF files for virtual machines, #946184,
# and INCUS_AGENT_PATH to find multi-setup agents for VMs, #959878.
newenvd "${FILESDIR}"/90incus.envd 90incus
}
pkg_postinst() {
elog
elog "Please see"
elog " https://wiki.gentoo.org/wiki/Incus"
elog " https://wiki.gentoo.org/wiki/Incus#Migrating_from_LXD"
elog
optfeature "OCI container images support" app-containers/skopeo app-containers/umoci
optfeature "support for ACME certificate issuance" app-crypt/lego
optfeature "btrfs storage backend" sys-fs/btrfs-progs
optfeature "ipv6 support" net-dns/dnsmasq[ipv6]
optfeature "full incus-migrate support" net-misc/rsync
optfeature "lvm2 storage backend" sys-fs/lvm2
optfeature "zfs storage backend" sys-fs/zfs
elog
elog "Be sure to add your local user to the incus group."
elog
}

View File

@ -1,3 +1,4 @@
DIST podman-5.3.2.tar.gz 24207488 BLAKE2B 68f618b74be41bf489de97b009d335f3033634c5c065b1089cc9a6132e38e3a7f707b959d29d955ab0bd805721c14cda90c77fa60f6ba09327f38d4a8bc19112 SHA512 b7007278dd3f493bd0d0185ed4328570d5af527d4864c4435e7b330543d60ba87f04f36c94407d4e11e622a4af8b6467f66474e9b66cbeacb8eecb3088b4439e
DIST podman-5.4.2.tar.gz 25465417 BLAKE2B f4f586bc99af625a5fa9a6915f101738d8c2abb505de96db6a41fde026baf5832047498b8bf1af6d80a84525a113a21680032886eee49458f92bd7321107bf47 SHA512 482fde529766ca1b509a08bab4beb59a5935ebc6b27bc886c33597183258631e8c8db03ebb521baefd7989305aa76fad14c1359e211a0fe75c855c14bbaca960
DIST podman-5.5.2.tar.gz 21334872 BLAKE2B a3b458afe1dc17699b7a75517727bba0b989e4b605c51a867f5d076fc5bb2bbfe8a914d78c659670bb73ebf3905926259320f6159ad850a7b335fa920ebfe6d4 SHA512 c647e74c22053b95d09f81d9c594203492283bdb881245941fa2d7253946cbb4953d705313a0e57a0d6737cc07697381e8ba5ed388a74d440b74b5fe045821ec
DIST podman-5.7.0.tar.gz 21261077 BLAKE2B ac67654b0a5d0e0acdfb94701409aecfaaee27ce36bd5329491ab03e28abcca93f76ec22627e9213f9c776b628695845eb0bce20abd682273a8dfa556c55de09 SHA512 e53e3f6d441de7865733e085017ce1c3e0af5cb0ad0cf605f5d15e9813d38e1af22691d59498960ed7bd18e32ef003db4c151a4f4bd5bd0dbac69f4011851ff1

View File

@ -0,0 +1,138 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..14} )
inherit go-module python-any-r1 tmpfiles toolchain-funcs linux-info
DESCRIPTION="A tool for managing OCI containers and pods with Docker-compatible CLI"
HOMEPAGE="https://github.com/containers/podman/ https://podman.io/"
if [[ ${PV} == 9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/containers/podman.git"
else
SRC_URI="https://github.com/containers/podman/archive/v${PV/_rc/-rc}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${P/_rc/-rc}"
[[ ${PV} != *rc* ]] && \
KEYWORDS="~amd64 ~arm64 ~loong ~riscv"
fi
# main pkg
LICENSE="Apache-2.0"
# deps
LICENSE+=" BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0"
SLOT="0"
IUSE="apparmor btrfs +seccomp selinux systemd wrapper"
RESTRICT="test"
RDEPEND="
app-containers/catatonit
>=app-containers/conmon-2.1.10
>=app-containers/containers-common-0.58.0-r1
app-crypt/gpgme:=
dev-libs/libassuan:=
dev-libs/libgpg-error:=
sys-apps/shadow:=
apparmor? ( sys-libs/libapparmor )
btrfs? ( sys-fs/btrfs-progs )
wrapper? ( !app-containers/docker-cli )
seccomp? ( sys-libs/libseccomp:= )
selinux? ( sec-policy/selinux-podman sys-libs/libselinux:= )
systemd? ( sys-apps/systemd:= )
"
DEPEND="${RDEPEND}"
BDEPEND="
${PYTHON_DEPS}
dev-go/go-md2man
"
PATCHES=(
"${FILESDIR}"/${PN}-5.5.2-togglable-seccomp.patch
)
CONFIG_CHECK="
~USER_NS
"
pkg_setup() {
use btrfs && CONFIG_CHECK+=" ~BTRFS_FS"
linux-info_pkg_setup
python-any-r1_pkg_setup
}
src_prepare() {
default
# assure necessary files are present
local file
for file in apparmor_tag btrfs_installed_tag systemd_tag; do
[[ -f hack/"${file}".sh ]] || die
done
local feature
for feature in apparmor systemd; do
cat <<-EOF > hack/"${feature}"_tag.sh || die
#!/usr/bin/env bash
$(usex ${feature} "echo ${feature}" echo)
EOF
done
cat <<-EOF > hack/btrfs_installed_tag.sh || die
#!/usr/bin/env bash
$(usex btrfs echo 'echo exclude_graphdriver_btrfs')
EOF
}
src_compile() {
export PREFIX="${EPREFIX}/usr" BUILD_ORIGIN="Gentoo Portage"
# For non-live versions, prevent git operations which causes sandbox violations
# https://github.com/gentoo/gentoo/pull/33531#issuecomment-1786107493
[[ ${PV} != 9999* ]] && export COMMIT_NO="" GIT_COMMIT="" EPOCH_TEST_COMMIT=""
# Use proper pkg-config to get gpgme cflags and ldflags when
# cross-compiling, bug 930982.
if tc-is-cross-compiler; then
tc-export PKG_CONFIG
fi
emake BUILDFLAGS="-v -work -x" GOMD2MAN="go-md2man" EXTRA_BUILDTAGS="$(usev seccomp)" SELINUXOPT= \
all $(usev wrapper docker-docs)
}
src_install() {
emake DESTDIR="${D}" SELINUXOPT= install install.completions $(usev wrapper install.docker-full)
if use !systemd; then
newconfd "${FILESDIR}"/podman-5.0.0_rc4.confd podman
newinitd "${FILESDIR}"/podman-5.0.0_rc4.initd podman
newinitd "${FILESDIR}"/podman-restart-5.0.0_rc4.initd podman-restart
newconfd "${FILESDIR}"/podman-restart-5.0.0_rc4.confd podman-restart
newinitd "${FILESDIR}"/podman-clean-transient-5.0.0_rc6.initd podman-clean-transient
newconfd "${FILESDIR}"/podman-clean-transient-5.0.0_rc6.confd podman-clean-transient
exeinto /etc/cron.daily
newexe "${FILESDIR}"/podman-auto-update-5.0.0.cron podman-auto-update
insinto /etc/logrotate.d
newins "${FILESDIR}/podman.logrotated" podman
exeinto /etc/user/init.d
newexe "${FILESDIR}/podman-5.0.0_rc4.user.initd" podman
insinto /etc/user/conf.d
newins "${FILESDIR}/podman-5.0.0_rc4.user.confd" podman
fi
keepdir /var/lib/containers
}
pkg_postinst() {
tmpfiles_process podman.conf $(usev wrapper podman-docker.conf)
}

View File

@ -19,7 +19,7 @@ S="${WORKDIR}/${PN}-${MY_PV}"
LICENSE="Apache-2.0 BSD-2 BSD MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
KEYWORDS="amd64 ~arm arm64 ppc64 ~riscv ~x86"
IUSE="apparmor hardened +kmem +seccomp selinux test"
COMMON_DEPEND="

View File

@ -19,7 +19,7 @@ S="${WORKDIR}/${PN}-${MY_PV}"
LICENSE="Apache-2.0 BSD-2 BSD MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
KEYWORDS="amd64 ~arm arm64 ppc64 ~riscv ~x86"
IUSE="apparmor hardened +kmem +seccomp selinux test"
COMMON_DEPEND="

View File

@ -19,7 +19,7 @@ S="${WORKDIR}/${PN}-${MY_PV}"
LICENSE="Apache-2.0 BSD-2 BSD MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
KEYWORDS="amd64 ~arm ~arm64 ppc64 ~riscv ~x86"
IUSE="apparmor hardened +kmem +seccomp selinux test"
COMMON_DEPEND="

View File

@ -35,7 +35,7 @@ DEPEND="
>=dev-libs/libgpg-error-1.38
>=dev-libs/libksba-1.4.0
>=dev-libs/npth-1.2
sys-libs/zlib
virtual/zlib:=
bzip2? ( app-arch/bzip2 )
ldap? ( net-nds/openldap:= )
readline? ( sys-libs/readline:= )

View File

@ -36,7 +36,7 @@ DEPEND="
>=dev-libs/libgpg-error-1.46
>=dev-libs/libksba-1.6.3
>=dev-libs/npth-1.2
sys-libs/zlib
virtual/zlib:=
bzip2? ( app-arch/bzip2 )
ldap? ( net-nds/openldap:= )
readline? ( sys-libs/readline:0= )

View File

@ -23,7 +23,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ~ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="+alternatives bzip2 doc ldap nls readline selinux +smartcard ssl test +tofu tpm tools usb user-socket wks-server"
RESTRICT="!test? ( test )"
REQUIRED_USE="test? ( tofu )"
@ -36,7 +36,7 @@ DEPEND="
>=dev-libs/libgpg-error-1.46
>=dev-libs/libksba-1.6.3
>=dev-libs/npth-1.2
sys-libs/zlib
virtual/zlib:=
bzip2? ( app-arch/bzip2 )
ldap? ( net-nds/openldap:= )
readline? ( sys-libs/readline:0= )

View File

@ -36,7 +36,7 @@ DEPEND="
>=dev-libs/libgpg-error-1.51
>=dev-libs/libksba-1.6.3
>=dev-libs/npth-1.2
sys-libs/zlib
virtual/zlib:=
bzip2? ( app-arch/bzip2 )
ldap? ( net-nds/openldap:= )
readline? ( sys-libs/readline:0= )

View File

@ -36,7 +36,7 @@ DEPEND="
>=dev-libs/libgpg-error-1.56
>=dev-libs/libksba-1.6.3
>=dev-libs/npth-1.2
sys-libs/zlib
virtual/zlib:=
bzip2? ( app-arch/bzip2 )
ldap? ( net-nds/openldap:= )
readline? ( sys-libs/readline:0= )

View File

@ -36,7 +36,7 @@ DEPEND="
>=dev-libs/libgpg-error-1.56
>=dev-libs/libksba-1.6.3
>=dev-libs/npth-1.2
sys-libs/zlib
virtual/zlib:=
bzip2? ( app-arch/bzip2 )
ldap? ( net-nds/openldap:= )
readline? ( sys-libs/readline:0= )

View File

@ -1,4 +1,2 @@
DIST nano-8.3.tar.xz 1681216 BLAKE2B 39c400483f79f11da0f959fed769462b65007f9235cb76d38e71d0a63919b659dc553d44f5d13dd13db801ec361fd7a3ad68b68bfa456ac6c169c861e80c6067 SHA512 9f57bb16a30240fdfc8fc31f5a55f681b80dd72de66fa143ef36c59ab696cc672d8fa054f5a4a547324db3deb2fe2f777cd7c1c023b571e2bb36c86a783ff1d6
DIST nano-8.4.tar.xz 1691256 BLAKE2B 2e5dbe6982ef9d284c6e018abad593bf383f27c85047241bafaa098948b73897c0a81b63aa453385ac93afc1c398936464d5a1fb024d00936ad383c5e5e4403f SHA512 1b8258e341a8722114b24af9d4676fbd8a91dc3639786a81bcd192a7b4fbca87581ab8ebe49493dfb3599ae90b59f4df8ae2a4ee0c0c7ccec9a49b563c82f44a
DIST nano-8.5.tar.xz 1707128 BLAKE2B 85de6d5349ed2332d41c054ff64979d7b00ec3c792564fcfb6ebed56b74a17c948117218a50297fead17674c06755afba393e73466eb2af9d3bb33af085c4f23 SHA512 d79562b2adbfe165e565b80ab4339e24f4a0ea464a97dfb7dce166df851b514c83e5071d89bee97759c0d6ff7d1fab1da97eaa0e742f3913d5c41a5539a3d8a1
DIST nano-8.6.tar.xz 1707688 BLAKE2B f7e17085d237ec3512b21bb732c2ebcf71a96991344acd0efc3592a650be856aed3ad958df59e27f332f750ac5e46ba7ed06b23093c8b68c4bf0a94aeecd2af0 SHA512 f783c59d2fb47e121c63779c4ce8c6d5e90c31184ca28449c6c9270933d02e19ee60d29b6c9a1122fe59de1132d56d9e402cc63fc88f847cea2b4af6302524ea
DIST nano-8.7.tar.xz 1710220 BLAKE2B 4a7a67f854969960c96d1e3b2c7184f9d9c9fb305a14ff9764a39a8103ca5f5878f9e344b0dc522e27643f93e57582881ea8e664ac9c6eaa99c3b2d9632febdc SHA512 0aac5b1708b05a882cba57f718154e42a6cd8a57f1e1c13c76598fe85645c49703f0c17d2e650da90348eb60c2bdbe349925415b6511c27e5b1bea77d107ab37

View File

@ -1,105 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://git.savannah.gnu.org/git/nano.git"
inherit autotools git-r3
else
MY_P="${PN}-${PV/_}"
SRC_URI="https://www.nano-editor.org/dist/v${PV:0:1}/${MY_P}.tar.xz"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
DESCRIPTION="GNU GPL'd Pico clone with more functionality"
HOMEPAGE="https://www.nano-editor.org/ https://wiki.gentoo.org/wiki/Nano/Guide"
LICENSE="GPL-3+ LGPL-2.1+ || ( GPL-3+ FDL-1.2+ )"
SLOT="0"
IUSE="debug justify magic minimal ncurses nls +spell unicode"
RDEPEND="
>=sys-libs/ncurses-5.9-r1:=[unicode(+)?]
magic? ( sys-apps/file )
nls? ( virtual/libintl )
"
DEPEND="${RDEPEND}"
BDEPEND="
nls? ( sys-devel/gettext )
virtual/pkgconfig
"
REQUIRED_USE="
magic? ( !minimal )
"
# gnulib FPs
QA_CONFIG_IMPL_DECL_SKIP=( unreachable MIN static_assert )
src_prepare() {
default
if [[ ${PV} == 9999 ]] ; then
eautoreconf
fi
}
src_configure() {
local myconfargs=(
--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 "${myconfargs[@]}"
}
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
insinto "${rcdir}"
newins "${FILESDIR}/gentoo.nanorc-r1" gentoo.nanorc
fi
}
pkg_postrm() {
[[ -n ${REPLACED_BY_VERSION} ]] && return
local e
e=$(unset EDITOR; . "${EROOT}"/etc/profile &>/dev/null; echo "${EDITOR}")
if [[ ${e##*/} == nano ]]; then
ewarn "The EDITOR variable is still set to ${e}."
ewarn "You can update it with \"eselect editor\"."
fi
}

View File

@ -1,105 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://git.savannah.gnu.org/git/nano.git"
inherit autotools git-r3
else
MY_P="${PN}-${PV/_}"
SRC_URI="https://www.nano-editor.org/dist/v${PV:0:1}/${MY_P}.tar.xz"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
DESCRIPTION="GNU GPL'd Pico clone with more functionality"
HOMEPAGE="https://www.nano-editor.org/ https://wiki.gentoo.org/wiki/Nano/Guide"
LICENSE="GPL-3+ LGPL-2.1+ || ( GPL-3+ FDL-1.2+ )"
SLOT="0"
IUSE="debug justify magic minimal ncurses nls +spell unicode"
RDEPEND="
>=sys-libs/ncurses-5.9-r1:=[unicode(+)?]
magic? ( sys-apps/file )
nls? ( virtual/libintl )
"
DEPEND="${RDEPEND}"
BDEPEND="
nls? ( sys-devel/gettext )
virtual/pkgconfig
"
REQUIRED_USE="
magic? ( !minimal )
"
# gnulib FPs
QA_CONFIG_IMPL_DECL_SKIP=( unreachable MIN static_assert )
src_prepare() {
default
if [[ ${PV} == 9999 ]] ; then
eautoreconf
fi
}
src_configure() {
local myconfargs=(
--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 "${myconfargs[@]}"
}
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
insinto "${rcdir}"
newins "${FILESDIR}/gentoo.nanorc-r1" gentoo.nanorc
fi
}
pkg_postrm() {
[[ -n ${REPLACED_BY_VERSION} ]] && return
local e
e=$(unset EDITOR; . "${EROOT}"/etc/profile &>/dev/null; echo "${EDITOR}")
if [[ ${e##*/} == nano ]]; then
ewarn "The EDITOR variable is still set to ${e}."
ewarn "You can update it with \"eselect editor\"."
fi
}

View File

@ -9,7 +9,7 @@ if [[ ${PV} == 9999 ]] ; then
else
MY_P="${PN}-${PV/_}"
SRC_URI="https://www.nano-editor.org/dist/v${PV:0:1}/${MY_P}.tar.xz"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
DESCRIPTION="GNU GPL'd Pico clone with more functionality"

View File

@ -0,0 +1,35 @@
The xxd utility is packaged in dev-util/xxd. With USE=nls, the prerequisite
$(INSTALL_TOOL_LANGS) target variable contains install-tool-languages, which
only installs xxd manpages. Remove it to prevent file collisions with
dev-util/xxd.
From: Lucio Sauer <watermanpaint@posteo.net>
--- a/src/Makefile
+++ b/src/Makefile
@@ -947,7 +947,7 @@ EVIEWNAME = e$(VIEWNAME)
EVIEWTARGET = $(EVIEWNAME)$(LNKEXT)
### Names of the tools that are also made {{{1
-TOOLS = xxd/xxd$(EXEEXT)
+TOOLS =
### Installation directories. The defaults come from configure. {{{1
#
@@ -2533,16 +2533,11 @@ installspell: $(DEST_VIM) $(DEST_RT) $(DEST_SPELL)
# install helper program xxd
installtools: $(TOOLS) $(DESTDIR)$(exec_prefix) $(DEST_BIN) \
- $(TOOLSSOURCE) $(DEST_VIM) $(DEST_RT) $(DEST_TOOLS) \
- $(INSTALL_TOOL_LANGS)
+ $(TOOLSSOURCE) $(DEST_VIM) $(DEST_RT) $(DEST_TOOLS)
if test -f $(DEST_BIN)/xxd$(EXEEXT); then \
mv -f $(DEST_BIN)/xxd$(EXEEXT) $(DEST_BIN)/xxd.rm; \
rm -f $(DEST_BIN)/xxd.rm; \
fi
- $(INSTALL_PROG) xxd/xxd$(EXEEXT) $(DEST_BIN)
- $(STRIP) $(DEST_BIN)/xxd$(EXEEXT)
- chmod $(BINMOD) $(DEST_BIN)/xxd$(EXEEXT)
- -$(SHELL) ./installman.sh xxd $(DEST_MAN) "" $(INSTALLMANARGS)
# install the runtime tools
$(INSTALL_DATA_R) $(TOOLSSOURCE)/* $(DEST_TOOLS)

View File

@ -0,0 +1,218 @@
scriptencoding utf-8
" ^^ Please leave the above line at the start of the file.
" If you want to completely disable this script, make sure to put
" "let skip_etc_vimrc = 1" in a skip_etc_vimrc.vim in your runtimepath, like
" ~/.vim/skip_etc_vimrc.
runtime! skip_etc_vimrc.vim
" Bail out when a power user would prefer to avoid the system configuration
if exists('skip_etc_vimrc')
finish
endif
" Default configuration file for Vim
" Written by Aron Griffis <agriffis@gentoo.org>
" Modified by Ryan Phillips <rphillips@gentoo.org>
" Modified some more by Ciaran McCreesh <ciaranm@gentoo.org>
" Added Redhat's vimrc info by Seemant Kulleen <seemant@gentoo.org>
" 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 <C-Left>=\eO5D"
exec "set <C-Right>=\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} setl ts=4 sw=4 noexpandtab
" 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 setl 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 gentoo 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 :

View File

@ -0,0 +1,234 @@
# Copyright 1999-2025 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.1"
VIM_PATCHES_VERSION="9.1.1432"
inherit 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"
# https://github.com/douglarek/gentoo-vim-patches/releases/download/vim-${VIM_PATCHES_VERSION}-patches/vim-${VIM_PATCHES_VERSION}-patches.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
DESCRIPTION="vim and gvim shared files"
HOMEPAGE="https://www.vim.org https://github.com/vim/vim"
S="${WORKDIR}/vim-${PV}"
LICENSE="vim"
SLOT="0"
IUSE="nls acl minimal"
RDEPEND="dev-util/xxd"
# ncurses is only needed by ./configure, so no subslot operator required
DEPEND=">=sys-libs/ncurses-5.2-r2:0"
BDEPEND="dev-build/autoconf"
if [[ ${PV} != 9999* ]]; then
# Gentoo patches to fix runtime issues, cross-compile errors, etc
PATCHES=(
"${WORKDIR}/vim-patches-vim-${VIM_PATCHES_VERSION}-patches"
)
fi
# unbundle xxd
PATCHES+=( "${FILESDIR}/vim-core-9.1.1652-r1-unbundle-xxd.patch" )
# platform-specific checks (bug #898406):
# - acl() -- Solaris
# - statacl() -- AIX
QA_CONFIG_IMPL_DECL_SKIP=(
'acl'
'statacl'
)
pkg_setup() {
# people with broken alphabets run into trouble. bug #82186.
unset LANG LC_ALL
export LC_COLLATE="C"
}
src_prepare() {
default
# 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/\<ctags\("\| [-*.]\)/exuberant-&/g' \
"${S}"/runtime/doc/syntax.txt \
"${S}"/runtime/doc/tagsrch.txt \
"${S}"/runtime/doc/usr_29.txt \
"${S}"/runtime/menu.vim \
"${S}"/src/configure.ac || die 'sed failed'
# gcc on sparc32 has this, uhm, interesting problem with detecting EOF
# correctly. To avoid some really entertaining error messages about stuff
# which isn't even in the source file being invalid, we'll do some trickery
# to make the error never occur. bug 66162 (02 October 2004 ciaranm)
find "${S}" -name '*.c' | while read c; do
echo >> "$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"
# 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"
# bug 908961
if use elibc_musl ; then
sed -i -e '/ja.sjis/d' src/po/Make_all.mak || die
fi
}
src_configure() {
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} (RIP Bram)"
--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
}
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-r7 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
# 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
}

View File

@ -0,0 +1,234 @@
# Copyright 1999-2025 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.1"
VIM_PATCHES_VERSION="9.1.1432"
inherit 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"
# https://github.com/douglarek/gentoo-vim-patches/releases/download/vim-${VIM_PATCHES_VERSION}-patches/vim-${VIM_PATCHES_VERSION}-patches.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
DESCRIPTION="vim and gvim shared files"
HOMEPAGE="https://www.vim.org https://github.com/vim/vim"
S="${WORKDIR}/vim-${PV}"
LICENSE="vim"
SLOT="0"
IUSE="nls acl minimal"
RDEPEND="dev-util/xxd"
# ncurses is only needed by ./configure, so no subslot operator required
DEPEND=">=sys-libs/ncurses-5.2-r2:0"
BDEPEND="dev-build/autoconf"
if [[ ${PV} != 9999* ]]; then
# Gentoo patches to fix runtime issues, cross-compile errors, etc
PATCHES=(
"${WORKDIR}/vim-patches-vim-${VIM_PATCHES_VERSION}-patches"
)
fi
# unbundle xxd
PATCHES+=( "${FILESDIR}/vim-core-9.1.1652-r1-unbundle-xxd.patch" )
# platform-specific checks (bug #898406):
# - acl() -- Solaris
# - statacl() -- AIX
QA_CONFIG_IMPL_DECL_SKIP=(
'acl'
'statacl'
)
pkg_setup() {
# people with broken alphabets run into trouble. bug #82186.
unset LANG LC_ALL
export LC_COLLATE="C"
}
src_prepare() {
default
# 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/\<ctags\("\| [-*.]\)/exuberant-&/g' \
"${S}"/runtime/doc/syntax.txt \
"${S}"/runtime/doc/tagsrch.txt \
"${S}"/runtime/doc/usr_29.txt \
"${S}"/runtime/menu.vim \
"${S}"/src/configure.ac || die 'sed failed'
# gcc on sparc32 has this, uhm, interesting problem with detecting EOF
# correctly. To avoid some really entertaining error messages about stuff
# which isn't even in the source file being invalid, we'll do some trickery
# to make the error never occur. bug 66162 (02 October 2004 ciaranm)
find "${S}" -name '*.c' | while read c; do
echo >> "$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"
# 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"
# bug 908961
if use elibc_musl ; then
sed -i -e '/ja.sjis/d' src/po/Make_all.mak || die
fi
}
src_configure() {
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} (RIP Bram)"
--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
}
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-r8 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
# 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
}

View File

@ -17,7 +17,7 @@ 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"
# https://github.com/douglarek/gentoo-vim-patches/releases/download/vim-${VIM_PATCHES_VERSION}-patches/vim-${VIM_PATCHES_VERSION}-patches.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
DESCRIPTION="vim and gvim shared files"

View File

@ -7,7 +7,7 @@ EAPI=8
VIM_VERSION="9.1"
VIM_PATCHES_VERSION="9.0.2092"
inherit bash-completion-r1 desktop flag-o-matic prefix toolchain-funcs vim-doc xdg-utils
inherit desktop flag-o-matic prefix toolchain-funcs vim-doc xdg-utils
if [[ ${PV} == 9999* ]] ; then
inherit git-r3
@ -27,6 +27,7 @@ LICENSE="vim"
SLOT="0"
IUSE="nls acl minimal"
RDEPEND="dev-util/xxd"
# ncurses is only needed by ./configure, so no subslot operator required
DEPEND=">=sys-libs/ncurses-5.2-r2:0"
BDEPEND="dev-build/autoconf"
@ -38,6 +39,9 @@ if [[ ${PV} != 9999* ]]; then
)
fi
# unbundle xxd
PATCHES+=( "${FILESDIR}/vim-core-9.1.1652-r1-unbundle-xxd.patch" )
# platform-specific checks (bug #898406):
# - acl() -- Solaris
# - statacl() -- AIX
@ -159,7 +163,6 @@ src_configure() {
src_compile() {
emake -j1 -C src auto/osdef.h objects
emake tools
}
src_test() { :; }
@ -186,7 +189,7 @@ src_install() {
# default vimrc is installed by vim-core since it applies to
# both vim and gvim
insinto /etc/vim/
newins "${FILESDIR}"/vimrc-r7 vimrc
newins "${FILESDIR}"/vimrc-r8 vimrc
eprefixify "${ED}"/etc/vim/vimrc
if use minimal; then
@ -209,8 +212,6 @@ src_install() {
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
}

View File

@ -9,7 +9,7 @@ VIM_VERSION="9.1"
VIM_PATCHES_VERSION="9.1.1432"
LUA_COMPAT=( lua5-{1..4} luajit )
PYTHON_COMPAT=( python3_{10..14} )
PYTHON_COMPAT=( python3_{11..14} )
PYTHON_REQ_USE="threads(+)"
USE_RUBY="ruby31 ruby32"
GENTOO_DEPEND_ON_PERL=no

View File

@ -9,7 +9,7 @@ VIM_VERSION="9.1"
VIM_PATCHES_VERSION="9.1.1432"
LUA_COMPAT=( lua5-{1..4} luajit )
PYTHON_COMPAT=( python3_{10..14} )
PYTHON_COMPAT=( python3_{11..14} )
PYTHON_REQ_USE="threads(+)"
USE_RUBY="ruby31 ruby32"
@ -22,7 +22,7 @@ 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"
# https://github.com/douglarek/gentoo-vim-patches/releases/download/vim-${VIM_PATCHES_VERSION}-patches/vim-${VIM_PATCHES_VERSION}-patches.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
DESCRIPTION="Vim, an improved vi-style text editor"

View File

@ -155,7 +155,7 @@ done
# when available rather than always using the external library.
ALL_DEPEND="
dev-libs/glib:2[static-libs(+)]
sys-libs/zlib[static-libs(+)]
virtual/zlib:=[static-libs(+)]
python? ( ${PYTHON_DEPS} )
systemtap? ( dev-debug/systemtap )
xattr? ( sys-apps/attr[static-libs(+)] )

View File

@ -153,7 +153,7 @@ done
# when available rather than always using the external library.
ALL_DEPEND="
dev-libs/glib:2[static-libs(+)]
sys-libs/zlib[static-libs(+)]
virtual/zlib:=[static-libs(+)]
python? ( ${PYTHON_DEPS} )
systemtap? ( dev-debug/systemtap )
xattr? ( sys-apps/attr[static-libs(+)] )

View File

@ -155,7 +155,7 @@ done
# when available rather than always using the external library.
ALL_DEPEND="
dev-libs/glib:2[static-libs(+)]
sys-libs/zlib[static-libs(+)]
virtual/zlib:=[static-libs(+)]
python? ( ${PYTHON_DEPS} )
systemtap? ( dev-debug/systemtap )
xattr? ( sys-apps/attr[static-libs(+)] )

View File

@ -153,7 +153,7 @@ done
# when available rather than always using the external library.
ALL_DEPEND="
dev-libs/glib:2[static-libs(+)]
sys-libs/zlib[static-libs(+)]
virtual/zlib:=[static-libs(+)]
python? ( ${PYTHON_DEPS} )
systemtap? ( dev-debug/systemtap )
xattr? ( sys-apps/attr[static-libs(+)] )

View File

@ -153,7 +153,7 @@ done
# when available rather than always using the external library.
ALL_DEPEND="
dev-libs/glib:2[static-libs(+)]
sys-libs/zlib[static-libs(+)]
virtual/zlib:=[static-libs(+)]
python? ( ${PYTHON_DEPS} )
systemtap? ( dev-debug/systemtap )
xattr? ( sys-apps/attr[static-libs(+)] )

View File

@ -153,7 +153,7 @@ done
# when available rather than always using the external library.
ALL_DEPEND="
dev-libs/glib:2[static-libs(+)]
sys-libs/zlib[static-libs(+)]
virtual/zlib:=[static-libs(+)]
python? ( ${PYTHON_DEPS} )
systemtap? ( dev-debug/systemtap )
xattr? ( sys-apps/attr[static-libs(+)] )

View File

@ -153,7 +153,7 @@ done
# when available rather than always using the external library.
ALL_DEPEND="
dev-libs/glib:2[static-libs(+)]
sys-libs/zlib[static-libs(+)]
virtual/zlib:=[static-libs(+)]
python? ( ${PYTHON_DEPS} )
systemtap? ( dev-debug/systemtap )
xattr? ( sys-apps/attr[static-libs(+)] )

View File

@ -153,7 +153,7 @@ done
# when available rather than always using the external library.
ALL_DEPEND="
dev-libs/glib:2[static-libs(+)]
sys-libs/zlib[static-libs(+)]
virtual/zlib:=[static-libs(+)]
python? ( ${PYTHON_DEPS} )
systemtap? ( dev-debug/systemtap )
xattr? ( sys-apps/attr[static-libs(+)] )

View File

@ -153,7 +153,7 @@ done
# when available rather than always using the external library.
ALL_DEPEND="
dev-libs/glib:2[static-libs(+)]
sys-libs/zlib[static-libs(+)]
virtual/zlib:=[static-libs(+)]
python? ( ${PYTHON_DEPS} )
systemtap? ( dev-debug/systemtap )
xattr? ( sys-apps/attr[static-libs(+)] )

View File

@ -153,7 +153,7 @@ done
# when available rather than always using the external library.
ALL_DEPEND="
dev-libs/glib:2[static-libs(+)]
sys-libs/zlib[static-libs(+)]
virtual/zlib:=[static-libs(+)]
python? ( ${PYTHON_DEPS} )
systemtap? ( dev-debug/systemtap )
xattr? ( sys-apps/attr[static-libs(+)] )

View File

@ -156,7 +156,7 @@ done
# when available rather than always using the external library.
ALL_DEPEND="
dev-libs/glib:2[static-libs(+)]
sys-libs/zlib[static-libs(+)]
virtual/zlib:=[static-libs(+)]
python? ( ${PYTHON_DEPS} )
systemtap? ( dev-debug/systemtap )
xattr? ( sys-apps/attr[static-libs(+)] )

View File

@ -155,7 +155,7 @@ done
# when available rather than always using the external library.
ALL_DEPEND="
dev-libs/glib:2[static-libs(+)]
sys-libs/zlib[static-libs(+)]
virtual/zlib:=[static-libs(+)]
python? ( ${PYTHON_DEPS} )
systemtap? ( dev-debug/systemtap )
xattr? ( sys-apps/attr[static-libs(+)] )

View File

@ -155,7 +155,7 @@ done
# when available rather than always using the external library.
ALL_DEPEND="
dev-libs/glib:2[static-libs(+)]
sys-libs/zlib[static-libs(+)]
virtual/zlib:=[static-libs(+)]
python? ( ${PYTHON_DEPS} )
systemtap? ( dev-debug/systemtap )
xattr? ( sys-apps/attr[static-libs(+)] )

View File

@ -153,7 +153,7 @@ done
# when available rather than always using the external library.
ALL_DEPEND="
dev-libs/glib:2[static-libs(+)]
sys-libs/zlib[static-libs(+)]
virtual/zlib:=[static-libs(+)]
python? ( ${PYTHON_DEPS} )
systemtap? ( dev-debug/systemtap )
xattr? ( sys-apps/attr[static-libs(+)] )

View File

@ -1,2 +1,3 @@
DIST pax-utils-1.3.7.tar.xz 113740 BLAKE2B d801df9c426f318c871655f238fe27b53e656c2789ef8508019997c98bbc540987b611642d87e76ae9f76a95f6cce1acd0b10e3491a146d1e3b3f727a6f96bdc SHA512 f1b87a564573da838a02c4cc10e0d5f9754c3b004ecb172a6290b48a8179b30695ae556942457dfac3caf07b91dd56eb1d801475c35e9708e4d671aa507f9576
DIST pax-utils-1.3.8.tar.xz 123556 BLAKE2B 9e658334f37bfee90d4d168cdb81bc3b4012c38b569c22c3b01688408e90f4727043636ff8908e6c049fce7be5476ba86773f07cb192e3a34721c1469f69b48d SHA512 0dde95f86802729d80b7b38af84dec636e973f6abc70600633edcb05d3d5f95c1b2861300ce478dd7f798c7a1e5eccb1011c06c53adba38e11a996b69d463656
DIST pax-utils-1.3.9.tar.xz 123560 BLAKE2B fdaf8eb6d66dd96db3acbe21264163247323d95b798be3a0041f88ff2574ea739c3a2c6408cd20b9a5bfd4b8e4ff2306d5dfe682d7bada803c88770e5103f250 SHA512 96caf7f2087bedc7949db828d966835f7d691e29ef8177dee00605c10d433d4c5b5770a3d7f2e25e3c0218f5b9a6c6967669a3dea18cf138d6f0111d2bb5288b

View File

@ -0,0 +1,77 @@
# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Note: if bumping pax-utils because of syscall changes in glibc, please
# revbump glibc and update the dependency in its ebuild for the affected
# versions.
PYTHON_COMPAT=( python3_{11..14} )
inherit meson python-single-r1
DESCRIPTION="ELF utils that can check files for security relevant properties"
HOMEPAGE="https://wiki.gentoo.org/wiki/Hardened/PaX_Utilities"
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/pax-utils.git"
inherit git-r3
else
SRC_URI="
https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz
https://dev.gentoo.org/~vapier/dist/${P}.tar.xz
"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
LICENSE="GPL-2"
SLOT="0"
IUSE="caps man python seccomp test"
REQUIRED_USE="
python? ( ${PYTHON_REQUIRED_USE} )
test? ( python )
"
RESTRICT="!test? ( test )"
MY_PYTHON_DEPS="
${PYTHON_DEPS}
$(python_gen_cond_dep '
dev-python/pyelftools[${PYTHON_USEDEP}]
')
"
RDEPEND="
caps? ( >=sys-libs/libcap-2.24 )
python? ( ${MY_PYTHON_DEPS} )
"
DEPEND="${RDEPEND}"
BDEPEND="
caps? ( virtual/pkgconfig )
man? ( app-text/xmlto )
python? ( ${MY_PYTHON_DEPS} )
"
pkg_setup() {
if use test || use python; then
python-single-r1_pkg_setup
fi
}
src_configure() {
local emesonargs=(
"-Dlddtree_implementation=$(usex python python sh)"
$(meson_feature caps use_libcap)
$(meson_feature man build_manpages)
$(meson_use seccomp use_seccomp)
$(meson_use test tests)
# fuzzing is currently broken
-Duse_fuzzing=false
)
meson_src_configure
}
src_install() {
meson_src_install
use python && python_fix_shebang "${ED}"/usr/bin/lddtree
}

View File

@ -1,2 +1,2 @@
DIST gentoolkit-0.6.11.tar.bz2 3190283 BLAKE2B 57e671c0f3a5fab9f19cbc9659bfabc5d58e53c73871aa5c51d1af06c08ca5b841e8b0c54e5e572f8563d7c7f132f951ea951a1a03b251d308f859eadb54d6e2 SHA512 5f75ca5409dd1b6d52a2a53e7f8cec5a7def2662bdb0a0cd601dc38ad27a6fafa376acd1074f6b6ce496815872a2874109430cb13c0772c977bc370c6e80e6b7
DIST gentoolkit-0.6.8.tar.bz2 3190065 BLAKE2B 2f792d174a25c03e0f1b895fe06282412d383561e5456d5b4d2d918f7648790846fa9390b3bb9c862618ffefe749d9ccc236682be9fecde12ef8fda17c79359d SHA512 91ba97d8000d90350ea63c4d3be69dda919795b62ae84fe264ae8fee24ce6f6250599e03b086a334344df402781372ba9ced4cedb1c2fc66e2a4f6115ee57fc5
DIST gentoolkit-0.6.9.tar.bz2 3190321 BLAKE2B 6a16b44be07d89865d384249c007597f6e81ee598a8c2f5e5b92f5d37a0be827b03259ba28791b40d885378af95d28b6930a312c1339c73391084a568608038d SHA512 5eaa03ca9f0b81fa0c3e3dcd72cb7b7467e9ec256778b1e36b3d66173c4495e6b5060fb09a0b42057e9acda9e6511d41b0133a38bbd0f98fc1e46d3821776f6c

View File

@ -30,7 +30,7 @@ RDEPEND="
app-crypt/gpgme:=
app-crypt/libb2:=
dev-libs/openssl:=
sys-libs/zlib:=
virtual/zlib:=
)
)
qtegrity? (
@ -44,7 +44,7 @@ DEPEND="${RDEPEND}
app-crypt/gpgme[static-libs]
app-crypt/libb2[static-libs]
dev-libs/openssl[static-libs]
sys-libs/zlib[static-libs]
virtual/zlib:=[static-libs]
)
)
qtegrity? (

View File

@ -30,7 +30,7 @@ RDEPEND="
app-crypt/gpgme:=
app-crypt/libb2:=
dev-libs/openssl:=
sys-libs/zlib:=
virtual/zlib:=
)
)
qtegrity? (
@ -44,7 +44,7 @@ DEPEND="${RDEPEND}
app-crypt/gpgme[static-libs]
app-crypt/libb2[static-libs]
dev-libs/openssl[static-libs]
sys-libs/zlib[static-libs]
virtual/zlib:=[static-libs]
)
)
qtegrity? (

View File

@ -30,7 +30,7 @@ RDEPEND="
app-crypt/gpgme:=
app-crypt/libb2:=
dev-libs/openssl:=
sys-libs/zlib:=
virtual/zlib:=
)
)
qtegrity? (
@ -44,7 +44,7 @@ DEPEND="${RDEPEND}
app-crypt/gpgme[static-libs]
app-crypt/libb2[static-libs]
dev-libs/openssl[static-libs]
sys-libs/zlib[static-libs]
virtual/zlib:=[static-libs]
)
)
qtegrity? (

View File

@ -29,7 +29,7 @@ RDEPEND="
!static? (
app-crypt/gpgme:=
app-crypt/libb2:=
sys-libs/zlib:=
virtual/zlib:=
)
)"
DEPEND="${RDEPEND}
@ -37,7 +37,7 @@ DEPEND="${RDEPEND}
static? (
app-crypt/gpgme[static-libs]
app-crypt/libb2[static-libs]
sys-libs/zlib[static-libs]
virtual/zlib:=[static-libs]
)
)"
BDEPEND="virtual/pkgconfig"

View File

@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -41,7 +41,7 @@ RDEPEND="
!static? (
app-crypt/gpgme:=
app-crypt/libb2:=
sys-libs/zlib:=
virtual/zlib:=
)
)"
DEPEND="${RDEPEND}
@ -61,7 +61,7 @@ DEPEND="${RDEPEND}
static? (
app-crypt/gpgme[static-libs]
app-crypt/libb2[static-libs]
sys-libs/zlib[static-libs]
virtual/zlib:=[static-libs]
)
)"
BDEPEND="virtual/pkgconfig"

View File

@ -24,8 +24,6 @@ DIST bash-5.2.tar.gz 10950833 BLAKE2B 51b196e710794ebad8eac28c31c93eb99ac1a7db30
DIST bash-5.2.tar.gz.sig 95 BLAKE2B 2991b7c46ef1cdca08062f419be47fca7551f4c5d9aad8a5c1da74974f5e7707d23914b4cecf9b6c9610471146b2c49b611bb62a5d974f1c37cceb77b719851c SHA512 a161664f124f906be32709f66702f8f780e6d52e558ea45e71ec60a959c9435ff68477ee65a0a9f6c0051d5592f5044fb3b410cf3cd3ae5a8a323789b01be258
DIST bash-5.3.tar.gz 11355854 BLAKE2B 82d1b54322bbd1e8c2a93380f1b2888a42a1d7186e504f41cee705a0fdd41463d8f20baa1755051e1396192f8ebd089524767d933a9e0b5fb76f2588601539bb SHA512 426702c8b0fb9e0c9956259973ce5b657890fd47f4f807a64febf20077bb48d0b91474ed6e843d2ef277186b46c5fffa79b808da9b48d4ec027d5e2de1b28ed8
DIST bash-5.3.tar.gz.sig 95 BLAKE2B 2fb04e4f699fdee6e583581821cf9a5fa435a00febf7893a344371f11ccb964545386c98dfb2d8f5d0efc74aafe9d491b544e90ae4716bdc286ac48d942430f0 SHA512 c77c0898f03e80a042574a486686cc296b96426f6cdb7a6d2376ecd5182ba03477bfcbd95ea3db499c11866d3f4ae99012a37662ccb6f83dfd6b59f671349dc7
DIST bash-5.4_alpha_pre20251017-6edfd0bf647cac5c3af3c15aabf49e27528ddf78.tar.gz 16570801 BLAKE2B 29c7f54cac6176d77b1465ed2f5cedfa05418e9d6b3cac8d90d0086571f09c9e7783f6ea6cc20bcd550b677bba161eb9654f463861077d683b97d86781369976 SHA512 2e7d2be1406ba2595c1ea534e1d63a3fd83e700df2037bf629a7455ee2f5c70b4f795dfe428087928ea38fd718fdada56a9aef6ec6fe81778c6d0a37b9fc66b7
DIST bash-5.4_alpha_pre20251023-403b32faf6a5b31ed58a42d1ff696fb8d3d7d5b9.tar.gz 16571919 BLAKE2B 286c0af611ac80122770370b53e2eaab3c3650411b9b72dadff69c7ae8a7859c37e1fddb357978a008777464b90bfedc3012fddc22c704a43ab1b61dcae605eb SHA512 773dca859277fc952f18fb057bca2839870942b895b46ada7a5f4125c0f33a502ff6cb96468e0aabb7cbe8634d6ae8098dc6a2fda24aef0a362769f56ec77525
DIST bash-5.4_alpha_pre20251027-c299f535be51179b1e0c989ad9ba4365e182ec28.tar.gz 16575720 BLAKE2B d3bc83b5ad252f84037d9639b1eaee13e56a006f2c0fe4b4bc00c662f05067965d8f26dca886137947f80bd923491fb5feaebb992e1f7515b7298715237b35dc SHA512 52698edc1d70029c8212a23457b5384942614e05c225cf66cea34290aacaf2e85f07ca4106f2ce242dff84d89ed45051f79cb4646cb2a22c4f74513f62c6393d
DIST bash205b-001 1132 BLAKE2B 0c5eef29777d54ef05957ea3d63b1556fb380bd20c238dc28993d822b37bc4e78ff4048ad069f6b8cd25da77ccdeb7aecd86c4349cb9d81e5e94c7001eeae5e6 SHA512 5ce4357468821b05e747201f3aa57225ad8f540c9e2c87051720490e039c30b478b9b662a68f14a0800fefe40184e4495e2645665200f9d75e9a115b2ac08071
DIST bash205b-002 755 BLAKE2B 6a6ed5679d451f02f8104b345c1722d11718ce3b4043b581c17786d40d8da69a34786fb56d0c363dba277b8e9dd33f12f70c9cc73a9fc39ba4a8319406f0458d SHA512 46947b0229478d5c2cfeff68b8ebc00e4ef0c8b94e336ca12f72b4490ba3622c0240c01c17c1641c3b07adc2c64ec94d6d780365e8990768ec8888f3a9526883

View File

@ -1,456 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/chetramey.asc
inherit flag-o-matic toolchain-funcs prefix verify-sig
# Uncomment if we have a patchset.
#GENTOO_PATCH_DEV="sam"
#GENTOO_PATCH_VER="${PV}"
MY_PV=${PV/_p*}
MY_PV=${MY_PV/_/-}
MY_P=${PN}-${MY_PV}
MY_PATCHES=()
# Determine the patchlevel. See https://ftp.gnu.org/gnu/bash/bash-5.2-patches/.
case ${PV} in
9999|*_alpha*|*_beta*|*_rc*)
# Set a negative patchlevel to indicate that it's a pre-release.
PLEVEL=-1
if [[ ${PV} =~ _pre[0-9]{8}$ ]]; then
BASH_COMMIT=
fi
;;
*_p*)
PLEVEL=${PV##*_p}
;;
*)
PLEVEL=0
esac
# The version of readline this bash normally ships with. Note that we only use
# the bundled copy of readline for pre-releases.
READLINE_VER="8.2_p1"
DESCRIPTION="The standard GNU Bourne again shell"
HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html https://git.savannah.gnu.org/cgit/bash.git"
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git"
EGIT_BRANCH=devel
inherit git-r3
elif (( PLEVEL < 0 )) && [[ ${BASH_COMMIT} ]]; then
# It can be useful to have snapshots in the pre-release period once
# the first alpha is out, as various bugs get reported and fixed from
# the alpha, and the next pre-release is usually quite far away.
#
# i.e. if it's worth packaging the alpha, it's worth packaging a followup.
SRC_URI="https://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-${BASH_COMMIT}.tar.gz -> ${P}-${BASH_COMMIT}.tar.gz"
S=${WORKDIR}/${PN}-${BASH_COMMIT}
else
my_urls=( "mirror://gnu/bash/${MY_P}.tar.gz" )
# bash-5.1 -> bash51
my_p=${PN}$(ver_cut 1-2) my_p=${my_p/.}
for (( my_patch_idx = 1; my_patch_idx <= PLEVEL; my_patch_idx++ )); do
printf -v my_patch_ver %s-%03d "${my_p}" "${my_patch_idx}"
my_urls+=( "mirror://gnu/bash/${MY_P}-patches/${my_patch_ver}" )
MY_PATCHES+=( "${DISTDIR}/${my_patch_ver}" )
done
SRC_URI="${my_urls[*]} verify-sig? ( ${my_urls[*]/%/.sig} )"
S=${WORKDIR}/${MY_P}
unset -v my_urls my_p my_patch_idx my_patch_ver
fi
if [[ ${GENTOO_PATCH_VER} ]]; then
SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV:?}/distfiles/${CATEGORY}/${PN}/${PN}-${GENTOO_PATCH_VER:?}-patches.tar.xz"
fi
LICENSE="GPL-3+"
SLOT="0"
if (( PLEVEL >= 0 )); then
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
IUSE="afs bashlogger examples mem-scramble +net nls plugins pgo +readline"
DEPEND="
>=sys-libs/ncurses-5.2-r2:=
nls? ( virtual/libintl )
"
if (( PLEVEL >= 0 )); then
DEPEND+=" readline? ( >=sys-libs/readline-${READLINE_VER}:= )"
fi
RDEPEND="
${DEPEND}
"
# We only need bison (yacc) when the .y files get patched (bash42-005, bash51-011).
BDEPEND="
pgo? ( dev-util/gperf )
verify-sig? ( sec-keys/openpgp-keys-chetramey )
"
# EAPI 8 tries to append it but it doesn't exist here.
QA_CONFIGURE_OPTIONS="--disable-static"
PATCHES=(
#"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}/
# Patches to or from Chet, posted to the bug-bash mailing list.
"${FILESDIR}/${PN}-5.0-syslog-history-extern.patch"
"${FILESDIR}/${PN}-5.2_p15-random-ub.patch"
"${FILESDIR}/${PN}-5.2_p15-configure-clang16.patch"
"${FILESDIR}/${PN}-5.2_p21-wpointer-to-int.patch"
"${FILESDIR}/${PN}-5.2_p32-memory-leaks.patch"
"${FILESDIR}/${PN}-5.2_p32-invalid-continuation-byte-ignored-as-delimiter-1.patch"
"${FILESDIR}/${PN}-5.2_p32-invalid-continuation-byte-ignored-as-delimiter-2.patch"
"${FILESDIR}/${PN}-5.2_p32-erroneous-delimiter-pushback-condition.patch"
)
pkg_setup() {
# bug #7332
if is-flag -malign-double; then
eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
eerror "as it breaks LFS (struct stat64) on x86."
die "remove -malign-double from your CFLAGS mr ricer"
fi
if use bashlogger; then
ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs."
ewarn "This will log ALL output you enter into the shell, you have been warned."
fi
}
src_unpack() {
local patch
if [[ ${PV} == 9999 ]]; then
git-r3_src_unpack
elif (( PLEVEL < 0 )) && [[ ${BASH_COMMIT} ]]; then
default
else
if use verify-sig; then
verify-sig_verify_detached "${DISTDIR}/${MY_P}.tar.gz"{,.sig}
for patch in "${MY_PATCHES[@]}"; do
verify-sig_verify_detached "${patch}"{,.sig}
done
fi
unpack "${MY_P}.tar.gz"
if [[ ${GENTOO_PATCH_VER} ]]; then
unpack "${PN}-${GENTOO_PATCH_VER}-patches.tar.xz"
fi
fi
}
src_prepare() {
# Include official patches.
(( PLEVEL > 0 )) && eapply -p0 "${MY_PATCHES[@]}"
# Clean out local libs so we know we use system ones w/releases. The
# touch utility is invoked for the benefit of config.status.
if (( PLEVEL >= 0 )); then
rm -rf lib/{readline,termcap}/* \
&& touch lib/{readline,termcap}/Makefile.in \
&& sed -i -E 's:\$[{(](RL|HIST)_LIBSRC[)}]/[[:alpha:]_-]*\.h::g' Makefile.in \
|| die
fi
# Prefixify hardcoded path names. No-op for non-prefix.
hprefixify pathnames.h.in
# Avoid regenerating docs after patches, bug #407985.
sed -i -E '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in \
&& touch -r . doc/* \
|| die
# Sometimes hangs (more noticeable w/ pgo), bug #907403.
rm tests/run-jobs || die
eapply -p0 "${PATCHES[@]}"
eapply_user
}
src_configure() {
local -a myconf
# Upstream only test with Bison and require GNUisms like YYEOF and
# YYERRCODE. The former at least may be in POSIX soon:
# https://www.austingroupbugs.net/view.php?id=1269.
#
# configure warns on use of non-Bison but doesn't abort. The result
# may misbehave at runtime. Chet also advises against use of byacc:
# https://lists.gnu.org/archive/html/bug-bash/2025-08/msg00115.html
unset -v YACC
# bash 5.3 drops unprototyped functions, earlier versions are
# incompatible with C23.
append-cflags $(test-flags-CC -std=gnu17)
if tc-is-cross-compiler; then
export CFLAGS_FOR_BUILD="${BUILD_CFLAGS} -std=gnu17"
fi
myconf=(
--disable-profiling
# Force linking with system curses ... the bundled termcap lib
# sucks bad compared to ncurses. For the most part, ncurses
# is here because readline needs it. But bash itself calls
# ncurses in one or two small places :(.
--with-curses
$(use_enable mem-scramble)
$(use_enable net net-redirections)
$(use_enable readline)
$(use_enable readline bang-history)
$(use_enable readline history)
$(use_with afs)
$(use_with mem-scramble bash-malloc)
)
# For descriptions of these, see config-top.h.
# bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426
append-cppflags \
-DDEFAULT_PATH_VALUE=\'\""${EPREFIX}"/usr/local/sbin:"${EPREFIX}"/usr/local/bin:"${EPREFIX}"/usr/sbin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/bin\"\' \
-DSTANDARD_UTILS_PATH=\'\""${EPREFIX}"/bin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/usr/sbin\"\' \
-DSYS_BASHRC=\'\""${EPREFIX}"/etc/bash/bashrc\"\' \
-DSYS_BASH_LOGOUT=\'\""${EPREFIX}"/etc/bash/bash_logout\"\' \
-DNON_INTERACTIVE_LOGIN_SHELLS \
-DSSH_SOURCE_BASHRC \
$(use bashlogger && echo -DSYSLOG_HISTORY)
use nls || myconf+=( --disable-nls )
if (( PLEVEL >= 0 )); then
# Historically, we always used the builtin readline, but since
# our handling of SONAME upgrades has gotten much more stable
# in the PM (and the readline ebuild itself preserves the old
# libs during upgrades), linking against the system copy should
# be safe.
# Exact cached version here doesn't really matter as long as it
# is at least what's in the DEPEND up above.
export ac_cv_rl_version=${READLINE_VER%%_*}
# Use system readline only with released versions.
myconf+=( --with-installed-readline=. )
fi
if use plugins; then
append-ldflags "-Wl,-rpath,${EPREFIX}/usr/$(get_libdir)/bash"
else
# Disable the plugins logic by hand since bash doesn't provide
# a way of doing it.
export ac_cv_func_dl{close,open,sym}=no \
ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no
sed -i -e '/LOCAL_LDFLAGS=/s:-rdynamic::' configure || die
fi
# bug #444070
tc-export AR
econf "${myconf[@]}"
}
src_compile() {
local -a pgo_generate_flags pgo_use_flags
local flag
# -fprofile-partial-training because upstream notes the test suite isn't
# super comprehensive.
# https://documentation.suse.com/sbp/all/html/SBP-GCC-10/index.html#sec-gcc10-pgo
if use pgo; then
pgo_generate_flags=(
-fprofile-update=atomic
-fprofile-dir="${T}"/pgo
-fprofile-generate="${T}"/pgo
)
pgo_use_flags=(
-fprofile-use="${T}"/pgo
-fprofile-dir="${T}"/pgo
)
if flag=$(test-flags-CC -fprofile-partial-training); then
pgo_generate_flags+=( "${flag}" )
pgo_use_flags+=( "${flag}" )
fi
fi
emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}"
use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" all others
# Build Bash and run its tests to generate profiles.
if (( ${#pgo_generate_flags[@]} )); then
# Used in test suite.
unset -v A
emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" -k check
if tc-is-clang; then
llvm-profdata merge "${T}"/pgo --output="${T}"/pgo/default.profdata || die
fi
# Rebuild Bash using the profiling data we just generated.
emake clean
emake CFLAGS="${CFLAGS} ${pgo_use_flags[*]}"
use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" all others
fi
}
src_test() {
# Used in test suite.
unset -v A
default
}
src_install() {
local d f
default
my_prefixify() {
while read -r; do
if [[ $REPLY == *$1* ]]; then
REPLY=${REPLY/"/etc/"/"${EPREFIX}/etc/"}
fi
printf '%s\n' "${REPLY}" || ! break
done < "$2" || die
}
dodir /bin
mv -- "${ED}"/usr/bin/bash "${ED}"/bin/ || die
dosym bash /bin/rbash
insinto /etc/bash
doins "${FILESDIR}"/bash_logout
my_prefixify bashrc.d "${FILESDIR}"/bashrc-r2 | newins - bashrc
insinto /etc/bash/bashrc.d
my_prefixify DIR_COLORS "${FILESDIR}"/bashrc.d/10-gentoo-color-r2.bash | newins - 10-gentoo-color.bash
newins "${FILESDIR}"/bashrc.d/10-gentoo-title-r2.bash 10-gentoo-title.bash
insinto /etc/profile.d
doins "${FILESDIR}/profile.d/00-prompt-command.sh"
insinto /etc/skel
for f in bash{_logout,_profile,rc}; do
newins "${FILESDIR}/skel/dot-${f}" ".${f}"
done
if use plugins; then
exeinto "/usr/$(get_libdir)/bash"
set -- examples/loadables/*.o
doexe "${@%.o}"
insinto /usr/include/bash-plugins
doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h}
fi
if use examples; then
for d in examples/{functions,misc,scripts,startup-files}; do
exeinto "/usr/share/doc/${PF}/${d}"
docinto "${d}"
for f in "${d}"/*; do
if [[ ${f##*/} != @(PERMISSION|*README) ]]; then
doexe "${f}"
else
dodoc "${f}"
fi
done
done
fi
# Install bash_builtins.1 and rbash.1.
emake -C doc DESTDIR="${D}" install_builtins
sed 's:bash\.1:man1/&:' doc/rbash.1 > "${T}"/rbash.1 || die
doman "${T}"/rbash.1
newdoc CWRU/changelog ChangeLog
dosym bash.info /usr/share/info/bashref.info
}
pkg_preinst() {
if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]]; then
mkdir -p -- "${EROOT}"/etc/bash \
&& mv -f -- "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/ \
|| die
fi
}
pkg_postinst() {
local IFS old_ver ver
local -a versions
# If /bin/sh does not exist, provide it.
if [[ ! -e ${EROOT}/bin/sh ]]; then
ln -sf -- bash "${EROOT}"/bin/sh || die
fi
if [[ -e ${EROOT}/etc/bash/bashrc.d/15-gentoo-bashrc-check.bash ]]; then
ewarn "The following file is no longer packaged and can safely be deleted:"
ewarn "${EROOT}/etc/bash/bashrc.d/15-gentoo-bashrc-check.bash"
fi
read -rd '' -a versions <<<"${REPLACING_VERSIONS}"
for ver in "${versions[@]}"; do
if [[ ! ${old_ver} ]] || ver_test "${ver}" -lt "${old_ver}"; then
old_ver=${ver}
fi
done
if [[ ! ${old_ver} ]]; then
return
fi
{
if ver_test "${old_ver}" -ge "5.2" \
&& ver_test "${old_ver}" -ge "5.2_p26-r8"
then
:
elif ver_test "${old_ver}" -lt "5.2" \
&& ver_test "${old_ver}" -ge "5.1_p16-r8"
then
:
else
cat <<'EOF'
Files under /etc/bash/bashrc.d must now have a suffix of .sh or .bash.
Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the
characteristics of the operating environment, it may contain a command to set
the terminal's window title. Those who were already choosing to customise the
PROMPT_COMMAND variable are now advised to append their commands like so:
PROMPT_COMMAND+=('custom command goes here')
Gentoo no longer defaults to having bash set the window title in the case
that the terminal is controlled by sshd(8), unless screen is launched on the
remote side or the terminal reliably supports saving and restoring the title
(as alacritty, foot and tmux do). Those wanting for the title to be set
regardless may adjust ~/.bashrc - or create a custom /etc/bash/bashrc.d
drop-in - to set PROMPT_COMMMAND like so:
PROMPT_COMMAND=(genfun_set_win_title)
Those who would prefer for bash never to interfere with the window title may
now opt out of the default title setting behaviour, either with the "unset -v
PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired.
EOF
fi
} \
| if [[ ${COLUMNS} == [1-9]*([0-9]) ]] && (( COLUMNS > 80 )); then
fmt -w "$(( COLUMNS - 3 ))"
else
cat
fi \
| while read -r; do
ewarn "${REPLY}"
done
}

View File

@ -1,438 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/chetramey.asc
inherit flag-o-matic toolchain-funcs prefix verify-sig
# Uncomment if we have a patchset.
#GENTOO_PATCH_DEV="sam"
#GENTOO_PATCH_VER="${PV}"
MY_PV=${PV/_p*}
MY_PV=${MY_PV/_/-}
MY_P=${PN}-${MY_PV}
MY_PATCHES=()
# Determine the patchlevel. See https://ftp.gnu.org/gnu/bash/bash-5.3-patches/.
case ${PV} in
9999|*_alpha*|*_beta*|*_rc*)
# Set a negative patchlevel to indicate that it's a pre-release.
PLEVEL=-1
if [[ ${PV} =~ _pre[0-9]{8}$ ]]; then
BASH_COMMIT=
fi
;;
*_p*)
PLEVEL=${PV##*_p}
;;
*)
PLEVEL=0
esac
# The version of readline this bash normally ships with. Note that we only use
# the bundled copy of readline for pre-releases.
READLINE_VER="8.3"
DESCRIPTION="The standard GNU Bourne again shell"
HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html https://git.savannah.gnu.org/cgit/bash.git"
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git"
EGIT_BRANCH=devel
inherit git-r3
elif (( PLEVEL < 0 )) && [[ ${BASH_COMMIT} ]]; then
# It can be useful to have snapshots in the pre-release period once
# the first alpha is out, as various bugs get reported and fixed from
# the alpha, and the next pre-release is usually quite far away.
#
# i.e. if it's worth packaging the alpha, it's worth packaging a followup.
SRC_URI="https://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-${BASH_COMMIT}.tar.gz -> ${P}-${BASH_COMMIT}.tar.gz"
S=${WORKDIR}/${PN}-${BASH_COMMIT}
else
my_urls=( "mirror://gnu/bash/${MY_P}.tar.gz" )
# bash-5.1 -> bash51
my_p=${PN}$(ver_cut 1-2) my_p=${my_p/.}
for (( my_patch_idx = 1; my_patch_idx <= PLEVEL; my_patch_idx++ )); do
printf -v my_patch_ver %s-%03d "${my_p}" "${my_patch_idx}"
my_urls+=( "mirror://gnu/bash/${MY_P}-patches/${my_patch_ver}" )
MY_PATCHES+=( "${DISTDIR}/${my_patch_ver}" )
done
SRC_URI="${my_urls[*]} verify-sig? ( ${my_urls[*]/%/.sig} )"
S=${WORKDIR}/${MY_P}
unset -v my_urls my_p my_patch_idx my_patch_ver
fi
if [[ ${GENTOO_PATCH_VER} ]]; then
SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV:?}/distfiles/${CATEGORY}/${PN}/${PN}-${GENTOO_PATCH_VER:?}-patches.tar.xz"
fi
LICENSE="GPL-3+"
SLOT="0"
if (( PLEVEL >= 0 )); then
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
IUSE="afs bashlogger examples mem-scramble +net nls plugins pgo +readline"
DEPEND="
>=sys-libs/ncurses-5.2-r2:=
nls? ( virtual/libintl )
"
if (( PLEVEL >= 0 )); then
DEPEND+=" readline? ( >=sys-libs/readline-${READLINE_VER}:= )"
fi
RDEPEND="
${DEPEND}
"
# We only need bison (yacc) when the .y files get patched (bash42-005, bash51-011).
BDEPEND="
pgo? ( dev-util/gperf )
verify-sig? ( sec-keys/openpgp-keys-chetramey )
"
# EAPI 8 tries to append it but it doesn't exist here.
QA_CONFIGURE_OPTIONS="--disable-static"
PATCHES=(
#"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}/
# Patches to or from Chet, posted to the bug-bash mailing list.
"${FILESDIR}"/${PN}-5.0-syslog-history-extern.patch
"${FILESDIR}"/${PN}-5.3-read-sys.patch
)
pkg_setup() {
# bug #7332
if is-flag -malign-double; then
eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
eerror "as it breaks LFS (struct stat64) on x86."
die "remove -malign-double from your CFLAGS mr ricer"
fi
if use bashlogger; then
ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs."
ewarn "This will log ALL output you enter into the shell, you have been warned."
fi
}
src_unpack() {
local patch
if [[ ${PV} == 9999 ]]; then
git-r3_src_unpack
elif (( PLEVEL < 0 )) && [[ ${BASH_COMMIT} ]]; then
default
else
if use verify-sig; then
verify-sig_verify_detached "${DISTDIR}/${MY_P}.tar.gz"{,.sig}
for patch in "${MY_PATCHES[@]}"; do
verify-sig_verify_detached "${patch}"{,.sig}
done
fi
unpack "${MY_P}.tar.gz"
if [[ ${GENTOO_PATCH_VER} ]]; then
unpack "${PN}-${GENTOO_PATCH_VER}-patches.tar.xz"
fi
fi
}
src_prepare() {
# Include official patches.
(( PLEVEL > 0 )) && eapply -p0 "${MY_PATCHES[@]}"
# Prefixify hardcoded path names. No-op for non-prefix.
hprefixify pathnames.h.in
# Avoid regenerating docs after patches, bug #407985.
sed -i -E '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in \
&& touch -r . doc/* \
|| die
# Sometimes hangs (more noticeable w/ pgo), bug #907403.
rm tests/run-jobs || die
eapply -p0 "${PATCHES[@]}"
eapply_user
}
src_configure() {
local -a myconf
# Upstream only test with Bison and require GNUisms like YYEOF and
# YYERRCODE. The former at least may be in POSIX soon:
# https://www.austingroupbugs.net/view.php?id=1269.
#
# configure warns on use of non-Bison but doesn't abort. The result
# may misbehave at runtime. Chet also advises against use of byacc:
# https://lists.gnu.org/archive/html/bug-bash/2025-08/msg00115.html
unset -v YACC
if tc-is-cross-compiler; then
export CFLAGS_FOR_BUILD="${BUILD_CFLAGS} -std=gnu17"
fi
myconf=(
--disable-profiling
# Force linking with system curses ... the bundled termcap lib
# sucks bad compared to ncurses. For the most part, ncurses
# is here because readline needs it. But bash itself calls
# ncurses in one or two small places :(.
--with-curses
$(use_enable mem-scramble)
$(use_enable net net-redirections)
$(use_enable readline)
$(use_enable readline bang-history)
$(use_enable readline history)
$(use_with afs)
$(use_with mem-scramble bash-malloc)
)
# For descriptions of these, see config-top.h.
# bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426
append-cppflags \
-DDEFAULT_PATH_VALUE=\'\""${EPREFIX}"/usr/local/sbin:"${EPREFIX}"/usr/local/bin:"${EPREFIX}"/usr/sbin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/bin\"\' \
-DSTANDARD_UTILS_PATH=\'\""${EPREFIX}"/bin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/usr/sbin\"\' \
-DDEFAULT_LOADABLE_BUILTINS_PATH=\'\""${EPREFIX}"/usr/local/$(get_libdir)/bash:"${EPREFIX}"/usr/$(get_libdir)/bash\"\' \
-DSYS_BASHRC=\'\""${EPREFIX}"/etc/bash/bashrc\"\' \
-DSYS_BASH_LOGOUT=\'\""${EPREFIX}"/etc/bash/bash_logout\"\' \
-DNON_INTERACTIVE_LOGIN_SHELLS \
-DSSH_SOURCE_BASHRC \
$(use bashlogger && echo -DSYSLOG_HISTORY)
use nls || myconf+=( --disable-nls )
if (( PLEVEL >= 0 )); then
# Historically, we always used the builtin readline, but since
# our handling of SONAME upgrades has gotten much more stable
# in the PM (and the readline ebuild itself preserves the old
# libs during upgrades), linking against the system copy should
# be safe.
# Exact cached version here doesn't really matter as long as it
# is at least what's in the DEPEND up above.
export ac_cv_rl_version=${READLINE_VER%%_*}
# Use system readline only with released versions.
myconf+=( --with-installed-readline=. )
fi
if use plugins; then
append-ldflags "-Wl,-rpath,${EPREFIX}/usr/$(get_libdir)/bash"
else
# Disable the plugins logic by hand since bash doesn't provide
# a way of doing it.
export ac_cv_func_dl{close,open,sym}=no \
ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no
sed -i -e '/LOCAL_LDFLAGS=/s:-rdynamic::' configure || die
fi
# bug #444070
tc-export AR
econf "${myconf[@]}"
}
src_compile() {
local -a pgo_generate_flags pgo_use_flags
local flag
# -fprofile-partial-training because upstream notes the test suite isn't
# super comprehensive.
# https://documentation.suse.com/sbp/all/html/SBP-GCC-10/index.html#sec-gcc10-pgo
if use pgo; then
pgo_generate_flags=(
-fprofile-update=atomic
-fprofile-dir="${T}"/pgo
-fprofile-generate="${T}"/pgo
)
pgo_use_flags=(
-fprofile-use="${T}"/pgo
-fprofile-dir="${T}"/pgo
)
if flag=$(test-flags-CC -fprofile-partial-training); then
pgo_generate_flags+=( "${flag}" )
pgo_use_flags+=( "${flag}" )
fi
fi
emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}"
use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" all others
# Build Bash and run its tests to generate profiles.
if (( ${#pgo_generate_flags[@]} )); then
# Used in test suite.
unset -v A
emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" -k check
if tc-is-clang; then
llvm-profdata merge "${T}"/pgo --output="${T}"/pgo/default.profdata || die
fi
# Rebuild Bash using the profiling data we just generated.
emake clean
emake CFLAGS="${CFLAGS} ${pgo_use_flags[*]}"
use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" all others
fi
}
src_test() {
# Used in test suite.
unset -v A
default
}
src_install() {
local d f
default
my_prefixify() {
while read -r; do
if [[ $REPLY == *$1* ]]; then
REPLY=${REPLY/"/etc/"/"${EPREFIX}/etc/"}
fi
printf '%s\n' "${REPLY}" || ! break
done < "$2" || die
}
dodir /bin
mv -- "${ED}"/usr/bin/bash "${ED}"/bin/ || die
dosym bash /bin/rbash
insinto /etc/bash
doins "${FILESDIR}"/bash_logout
my_prefixify bashrc.d "${FILESDIR}"/bashrc-r2 | newins - bashrc
insinto /etc/bash/bashrc.d
my_prefixify DIR_COLORS "${FILESDIR}"/bashrc.d/10-gentoo-color-r2.bash | newins - 10-gentoo-color.bash
newins "${FILESDIR}"/bashrc.d/10-gentoo-title-r2.bash 10-gentoo-title.bash
insinto /etc/profile.d
doins "${FILESDIR}/profile.d/00-prompt-command.sh"
insinto /etc/skel
for f in bash{_logout,_profile,rc}; do
newins "${FILESDIR}/skel/dot-${f}" ".${f}"
done
if use plugins; then
exeinto "/usr/$(get_libdir)/bash"
set -- examples/loadables/*.o
doexe "${@%.o}"
insinto /usr/include/bash-plugins
doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h}
fi
if use examples; then
for d in examples/{functions,misc,scripts,startup-files}; do
exeinto "/usr/share/doc/${PF}/${d}"
docinto "${d}"
for f in "${d}"/*; do
if [[ ${f##*/} != @(PERMISSION|*README) ]]; then
doexe "${f}"
else
dodoc "${f}"
fi
done
done
fi
# Install bash_builtins.1 and rbash.1.
emake -C doc DESTDIR="${D}" install_builtins
sed 's:bash\.1:man1/&:' doc/rbash.1 > "${T}"/rbash.1 || die
doman "${T}"/rbash.1
newdoc CWRU/changelog ChangeLog
dosym bash.info /usr/share/info/bashref.info
}
pkg_preinst() {
if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]]; then
mkdir -p -- "${EROOT}"/etc/bash \
&& mv -f -- "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/ \
|| die
fi
}
pkg_postinst() {
local IFS old_ver ver
local -a versions
# If /bin/sh does not exist, provide it.
if [[ ! -e ${EROOT}/bin/sh ]]; then
ln -sf -- bash "${EROOT}"/bin/sh || die
fi
if [[ -e ${EROOT}/etc/bash/bashrc.d/15-gentoo-bashrc-check.bash ]]; then
ewarn "The following file is no longer packaged and can safely be deleted:"
ewarn "${EROOT}/etc/bash/bashrc.d/15-gentoo-bashrc-check.bash"
fi
read -rd '' -a versions <<<"${REPLACING_VERSIONS}"
for ver in "${versions[@]}"; do
if [[ ! ${old_ver} ]] || ver_test "${ver}" -lt "${old_ver}"; then
old_ver=${ver}
fi
done
if [[ ! ${old_ver} ]]; then
return
fi
{
if ver_test "${old_ver}" -ge "5.2" \
&& ver_test "${old_ver}" -ge "5.2_p26-r8"
then
:
elif ver_test "${old_ver}" -lt "5.2" \
&& ver_test "${old_ver}" -ge "5.1_p16-r8"
then
:
else
cat <<'EOF'
Files under /etc/bash/bashrc.d must now have a suffix of .sh or .bash.
Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the
characteristics of the operating environment, it may contain a command to set
the terminal's window title. Those who were already choosing to customise the
PROMPT_COMMAND variable are now advised to append their commands like so:
PROMPT_COMMAND+=('custom command goes here')
Gentoo no longer defaults to having bash set the window title in the case
that the terminal is controlled by sshd(8), unless screen is launched on the
remote side or the terminal reliably supports saving and restoring the title
(as alacritty, foot and tmux do). Those wanting for the title to be set
regardless may adjust ~/.bashrc - or create a custom /etc/bash/bashrc.d
drop-in - to set PROMPT_COMMMAND like so:
PROMPT_COMMAND=(genfun_set_win_title)
Those who would prefer for bash never to interfere with the window title may
now opt out of the default title setting behaviour, either with the "unset -v
PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired.
EOF
fi
} \
| if [[ ${COLUMNS} == [1-9]*([0-9]) ]] && (( COLUMNS > 80 )); then
fmt -w "$(( COLUMNS - 3 ))"
else
cat
fi \
| while read -r; do
ewarn "${REPLY}"
done
}

View File

@ -1,468 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/chetramey.asc
inherit flag-o-matic toolchain-funcs prefix verify-sig
# Uncomment if we have a patchset.
#GENTOO_PATCH_DEV="sam"
#GENTOO_PATCH_VER="${PV}"
MY_PV=${PV/_p*}
MY_PV=${MY_PV/_/-}
MY_P=${PN}-${MY_PV}
MY_PATCHES=()
# Determine the patchlevel.
case ${PV} in
9999|*_alpha*|*_beta*|*_rc*)
# Set a negative patchlevel to indicate that it's a pre-release.
PLEVEL=-1
if [[ ${PV} =~ _pre[0-9]{8}$ ]]; then
BASH_COMMIT="6edfd0bf647cac5c3af3c15aabf49e27528ddf78"
fi
;;
*_p*)
PLEVEL=${PV##*_p}
;;
*)
PLEVEL=0
esac
# The version of readline this bash normally ships with. Note that we only use
# the bundled copy of readline for pre-releases.
READLINE_VER="8.3"
DESCRIPTION="The standard GNU Bourne again shell"
HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html https://git.savannah.gnu.org/cgit/bash.git"
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git"
EGIT_BRANCH=devel
inherit git-r3
elif (( PLEVEL < 0 )) && [[ ${BASH_COMMIT} ]]; then
# It can be useful to have snapshots in the pre-release period once
# the first alpha is out, as various bugs get reported and fixed from
# the alpha, and the next pre-release is usually quite far away.
#
# i.e. if it's worth packaging the alpha, it's worth packaging a followup.
SRC_URI="https://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-${BASH_COMMIT}.tar.gz -> ${P}-${BASH_COMMIT}.tar.gz"
S=${WORKDIR}/${PN}-${BASH_COMMIT}
else
my_urls=( "mirror://gnu/bash/${MY_P}.tar.gz" )
# bash-5.1 -> bash51
my_p=${PN}$(ver_cut 1-2) my_p=${my_p/.}
for (( my_patch_idx = 1; my_patch_idx <= PLEVEL; my_patch_idx++ )); do
printf -v my_patch_ver %s-%03d "${my_p}" "${my_patch_idx}"
my_urls+=( "mirror://gnu/bash/${MY_P}-patches/${my_patch_ver}" )
MY_PATCHES+=( "${DISTDIR}/${my_patch_ver}" )
done
SRC_URI="${my_urls[*]} verify-sig? ( ${my_urls[*]/%/.sig} )"
S=${WORKDIR}/${MY_P}
unset -v my_urls my_p my_patch_idx my_patch_ver
fi
if [[ ${GENTOO_PATCH_VER} ]]; then
SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV:?}/distfiles/${CATEGORY}/${PN}/${PN}-${GENTOO_PATCH_VER:?}-patches.tar.xz"
fi
LICENSE="GPL-3+"
SLOT="0"
if (( PLEVEL >= 0 )); then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
IUSE="afs bashlogger examples mem-scramble +net nls plugins pgo +readline"
# As of 5.4_alpha_pre20251016, bash tests finally exit non-0 on failure.
# The differences look harmless but need investigation and fixing.
RESTRICT="test"
DEPEND="
>=sys-libs/ncurses-5.2-r2:=
nls? ( virtual/libintl )
"
if (( PLEVEL >= 0 )); then
DEPEND+=" readline? ( >=sys-libs/readline-${READLINE_VER}:= )"
fi
RDEPEND="
${DEPEND}
"
# We only need bison (yacc) when the .y files get patched (bash42-005, bash51-011).
BDEPEND="
pgo? ( dev-util/gperf )
verify-sig? ( sec-keys/openpgp-keys-chetramey )
"
# EAPI 8 tries to append it but it doesn't exist here.
QA_CONFIGURE_OPTIONS="--disable-static"
PATCHES=(
#"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}/
# Patches to or from Chet, posted to the bug-bash mailing list.
"${FILESDIR}/${PN}-5.0-syslog-history-extern.patch"
)
pkg_setup() {
# bug #7332
if is-flag -malign-double; then
eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
eerror "as it breaks LFS (struct stat64) on x86."
die "remove -malign-double from your CFLAGS mr ricer"
fi
if use bashlogger; then
ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs."
ewarn "This will log ALL output you enter into the shell, you have been warned."
fi
}
src_unpack() {
local patch
if [[ ${PV} == 9999 ]]; then
git-r3_src_unpack
elif (( PLEVEL < 0 )) && [[ ${BASH_COMMIT} ]]; then
default
else
if use verify-sig; then
verify-sig_verify_detached "${DISTDIR}/${MY_P}.tar.gz"{,.sig}
for patch in "${MY_PATCHES[@]}"; do
verify-sig_verify_detached "${patch}"{,.sig}
done
fi
unpack "${MY_P}.tar.gz"
if [[ ${GENTOO_PATCH_VER} ]]; then
unpack "${PN}-${GENTOO_PATCH_VER}-patches.tar.xz"
fi
fi
}
src_prepare() {
# Include official patches.
(( PLEVEL > 0 )) && eapply -p0 "${MY_PATCHES[@]}"
# Prefixify hardcoded path names. No-op for non-prefix.
hprefixify pathnames.h.in
# Avoid regenerating docs after patches, bug #407985.
sed -i -E '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in \
&& touch -r . doc/* \
|| die
# Sometimes hangs (more noticeable w/ pgo), bug #907403.
rm tests/run-jobs || die
eapply -p0 "${PATCHES[@]}"
eapply_user
}
src_configure() {
local -a myconf
# Upstream only test with Bison and require GNUisms like YYEOF and
# YYERRCODE. The former at least may be in POSIX soon:
# https://www.austingroupbugs.net/view.php?id=1269.
#
# configure warns on use of non-Bison but doesn't abort. The result
# may misbehave at runtime. Chet also advises against use of byacc:
# https://lists.gnu.org/archive/html/bug-bash/2025-08/msg00115.html
unset -v YACC
if tc-is-cross-compiler; then
export CFLAGS_FOR_BUILD="${BUILD_CFLAGS} -std=gnu17"
fi
myconf=(
--disable-profiling
# Force linking with system curses ... the bundled termcap lib
# sucks bad compared to ncurses. For the most part, ncurses
# is here because readline needs it. But bash itself calls
# ncurses in one or two small places :(.
--with-curses
$(use_enable mem-scramble)
$(use_enable net net-redirections)
$(use_enable readline)
$(use_enable readline bang-history)
$(use_enable readline history)
$(use_with afs)
$(use_with mem-scramble bash-malloc)
)
# For descriptions of these, see config-top.h.
# bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426
append-cppflags \
-DDEFAULT_PATH_VALUE=\'\""${EPREFIX}"/usr/local/sbin:"${EPREFIX}"/usr/local/bin:"${EPREFIX}"/usr/sbin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/bin\"\' \
-DSTANDARD_UTILS_PATH=\'\""${EPREFIX}"/bin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/usr/sbin\"\' \
-DDEFAULT_LOADABLE_BUILTINS_PATH=\'\""${EPREFIX}"/usr/local/$(get_libdir)/bash:"${EPREFIX}"/usr/$(get_libdir)/bash\"\' \
-DSYS_BASHRC=\'\""${EPREFIX}"/etc/bash/bashrc\"\' \
-DSYS_BASH_LOGOUT=\'\""${EPREFIX}"/etc/bash/bash_logout\"\' \
-DNON_INTERACTIVE_LOGIN_SHELLS \
-DSSH_SOURCE_BASHRC \
$(use bashlogger && echo -DSYSLOG_HISTORY)
use nls || myconf+=( --disable-nls )
if (( PLEVEL >= 0 )); then
# Historically, we always used the builtin readline, but since
# our handling of SONAME upgrades has gotten much more stable
# in the PM (and the readline ebuild itself preserves the old
# libs during upgrades), linking against the system copy should
# be safe.
# Exact cached version here doesn't really matter as long as it
# is at least what's in the DEPEND up above.
export ac_cv_rl_version=${READLINE_VER%%_*}
# Use system readline only with released versions.
myconf+=( --with-installed-readline=. )
fi
if use plugins; then
append-ldflags "-Wl,-rpath,${EPREFIX}/usr/$(get_libdir)/bash"
else
# Disable the plugins logic by hand since bash doesn't provide
# a way of doing it.
export ac_cv_func_dl{close,open,sym}=no \
ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no
sed -i -e '/LOCAL_LDFLAGS=/s:-rdynamic::' configure || die
fi
# bug #444070
tc-export AR
econf "${myconf[@]}"
}
src_compile() {
local -a pgo_generate_flags pgo_use_flags
local flag
# -fprofile-partial-training because upstream notes the test suite isn't
# super comprehensive.
# https://documentation.suse.com/sbp/all/html/SBP-GCC-10/index.html#sec-gcc10-pgo
if use pgo; then
pgo_generate_flags=(
-fprofile-update=atomic
-fprofile-dir="${T}"/pgo
-fprofile-generate="${T}"/pgo
)
pgo_use_flags=(
-fprofile-use="${T}"/pgo
-fprofile-dir="${T}"/pgo
)
if flag=$(test-flags-CC -fprofile-partial-training); then
pgo_generate_flags+=( "${flag}" )
pgo_use_flags+=( "${flag}" )
fi
fi
emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}"
use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" all others
# Build Bash and run its tests to generate profiles.
if (( ${#pgo_generate_flags[@]} )); then
# Used in test suite.
unset -v A
# Testsuite isn't expected to pass for bash right now, but it
# also doesn't matter for PGO.
nonfatal emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" -k check
if tc-is-clang; then
llvm-profdata merge "${T}"/pgo --output="${T}"/pgo/default.profdata || die
fi
# Rebuild Bash using the profiling data we just generated.
emake clean
emake CFLAGS="${CFLAGS} ${pgo_use_flags[*]}"
use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" all others
fi
}
src_test() {
# Used in test suite.
unset -v A
default
}
src_install() {
local d f
default
my_prefixify() {
while read -r; do
if [[ $REPLY == *$1* ]]; then
REPLY=${REPLY/"/etc/"/"${EPREFIX}/etc/"}
fi
printf '%s\n' "${REPLY}" || ! break
done < "$2" || die
}
dodir /bin
mv -- "${ED}"/usr/bin/bash "${ED}"/bin/ || die
dosym bash /bin/rbash
insinto /etc/bash
doins "${FILESDIR}"/bash_logout
my_prefixify bashrc.d "${FILESDIR}"/bashrc-r2 | newins - bashrc
insinto /etc/bash/bashrc.d
my_prefixify DIR_COLORS "${FILESDIR}"/bashrc.d/10-gentoo-color-r2.bash | newins - 10-gentoo-color.bash
newins "${FILESDIR}"/bashrc.d/10-gentoo-title-r3.bash 10-gentoo-title.bash
insinto /etc/profile.d
doins "${FILESDIR}/profile.d/00-prompt-command.sh"
insinto /etc/skel
for f in bash{_logout,_profile,rc}; do
newins "${FILESDIR}/skel/dot-${f}" ".${f}"
done
if use plugins; then
exeinto "/usr/$(get_libdir)/bash"
set -- examples/loadables/*.o
doexe "${@%.o}"
insinto /usr/include/bash-plugins
doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h}
fi
if use examples; then
for d in examples/{functions,misc,scripts,startup-files}; do
exeinto "/usr/share/doc/${PF}/${d}"
docinto "${d}"
for f in "${d}"/*; do
if [[ ${f##*/} != @(PERMISSION|*README) ]]; then
doexe "${f}"
else
dodoc "${f}"
fi
done
done
fi
# Install bash_builtins.1 and rbash.1.
emake -C doc DESTDIR="${D}" install_builtins
sed 's:bash\.1:man1/&:' doc/rbash.1 > "${T}"/rbash.1 || die
doman "${T}"/rbash.1
newdoc CWRU/changelog ChangeLog
dosym bash.info /usr/share/info/bashref.info
}
pkg_preinst() {
if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]]; then
mkdir -p -- "${EROOT}"/etc/bash \
&& mv -f -- "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/ \
|| die
fi
}
pkg_postinst() {
local IFS old_ver ver
local -a versions
# If /bin/sh does not exist, provide it.
if [[ ! -e ${EROOT}/bin/sh ]]; then
ln -sf -- bash "${EROOT}"/bin/sh || die
fi
if [[ -e ${EROOT}/etc/bash/bashrc.d/15-gentoo-bashrc-check.bash ]]; then
ewarn "The following file is no longer packaged and can safely be deleted:"
ewarn "${EROOT}/etc/bash/bashrc.d/15-gentoo-bashrc-check.bash"
fi
read -rd '' -a versions <<<"${REPLACING_VERSIONS}"
for ver in "${versions[@]}"; do
if [[ ! ${old_ver} ]] || ver_test "${ver}" -lt "${old_ver}"; then
old_ver=${ver}
fi
done
if [[ ! ${old_ver} ]]; then
return
fi
{
if ver_test "${old_ver}" -ge "5.2" \
&& ver_test "${old_ver}" -ge "5.2_p26-r8"
then
:
elif ver_test "${old_ver}" -lt "5.2" \
&& ver_test "${old_ver}" -ge "5.1_p16-r8"
then
:
else
cat <<'EOF'
Files under /etc/bash/bashrc.d must now have a suffix of .sh or .bash.
Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the
characteristics of the operating environment, it may contain a command to set
the terminal's window title. Those who were already choosing to customise the
PROMPT_COMMAND variable are now advised to append their commands like so:
PROMPT_COMMAND+=('custom command goes here')
Gentoo no longer defaults to having bash set the window title in the case
that the terminal is controlled by sshd(8), unless screen is launched on the
remote side or the terminal reliably supports saving and restoring the title
(as alacritty, foot and tmux do). Those wanting for the title to be set
regardless may adjust ~/.bashrc - or create a custom /etc/bash/bashrc.d
drop-in - to set PROMPT_COMMMAND like so:
PROMPT_COMMAND=(genfun_set_win_title)
Those who would prefer for bash never to interfere with the window title may
now opt out of the default title setting behaviour, either with the "unset -v
PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired.
EOF
fi
if ver_test "${old_ver}" -ge "5.3" \
&& ver_test "${old_ver}" -ge "5.3_p3-r3"
then
:
elif ver_test "${old_ver}" -lt "5.3" \
&& ver_test "${old_ver}" -ge "5.2_p37-r5"
then
:
else
cat <<'EOF'
The window title setting behaviour has been improved. It is now formatted as
"\u@\h \W", in accordance with the prompting mechanism of bash. For example,
after switching to the home directory, the current working directly will be
shown as the <tilde> character.
The value of PROMPT_DIRTRIM is now respected. If this variable is unset, the
use of the \W prompt string escape will prevail, with the current working
directory typically being shown as its basename. If set to 0 or greater, \w
will be used instead, which may be trimmed. This also means that the title
can be made to show the full path by setting PROMPT_DIRTRIM=0.
For further information, run info '(bash)Bash Variables' or visit
https://www.gnu.org/software/bash/manual/bash.html#index-PROMPT_005fDIRTRIM.
EOF
fi
} \
| if [[ ${COLUMNS} == [1-9]*([0-9]) ]] && (( COLUMNS > 80 )); then
fmt -w "$(( COLUMNS - 3 ))"
else
cat
fi \
| while read -r; do
ewarn "${REPLY}"
done
}

View File

@ -1,468 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/chetramey.asc
inherit flag-o-matic toolchain-funcs prefix verify-sig
# Uncomment if we have a patchset.
#GENTOO_PATCH_DEV="sam"
#GENTOO_PATCH_VER="${PV}"
MY_PV=${PV/_p*}
MY_PV=${MY_PV/_/-}
MY_P=${PN}-${MY_PV}
MY_PATCHES=()
# Determine the patchlevel.
case ${PV} in
9999|*_alpha*|*_beta*|*_rc*)
# Set a negative patchlevel to indicate that it's a pre-release.
PLEVEL=-1
if [[ ${PV} =~ _pre[0-9]{8}$ ]]; then
BASH_COMMIT="403b32faf6a5b31ed58a42d1ff696fb8d3d7d5b9"
fi
;;
*_p*)
PLEVEL=${PV##*_p}
;;
*)
PLEVEL=0
esac
# The version of readline this bash normally ships with. Note that we only use
# the bundled copy of readline for pre-releases.
READLINE_VER="8.3"
DESCRIPTION="The standard GNU Bourne again shell"
HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html https://git.savannah.gnu.org/cgit/bash.git"
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git"
EGIT_BRANCH=devel
inherit git-r3
elif (( PLEVEL < 0 )) && [[ ${BASH_COMMIT} ]]; then
# It can be useful to have snapshots in the pre-release period once
# the first alpha is out, as various bugs get reported and fixed from
# the alpha, and the next pre-release is usually quite far away.
#
# i.e. if it's worth packaging the alpha, it's worth packaging a followup.
SRC_URI="https://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-${BASH_COMMIT}.tar.gz -> ${P}-${BASH_COMMIT}.tar.gz"
S=${WORKDIR}/${PN}-${BASH_COMMIT}
else
my_urls=( "mirror://gnu/bash/${MY_P}.tar.gz" )
# bash-5.1 -> bash51
my_p=${PN}$(ver_cut 1-2) my_p=${my_p/.}
for (( my_patch_idx = 1; my_patch_idx <= PLEVEL; my_patch_idx++ )); do
printf -v my_patch_ver %s-%03d "${my_p}" "${my_patch_idx}"
my_urls+=( "mirror://gnu/bash/${MY_P}-patches/${my_patch_ver}" )
MY_PATCHES+=( "${DISTDIR}/${my_patch_ver}" )
done
SRC_URI="${my_urls[*]} verify-sig? ( ${my_urls[*]/%/.sig} )"
S=${WORKDIR}/${MY_P}
unset -v my_urls my_p my_patch_idx my_patch_ver
fi
if [[ ${GENTOO_PATCH_VER} ]]; then
SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV:?}/distfiles/${CATEGORY}/${PN}/${PN}-${GENTOO_PATCH_VER:?}-patches.tar.xz"
fi
LICENSE="GPL-3+"
SLOT="0"
if (( PLEVEL >= 0 )); then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
IUSE="afs bashlogger examples mem-scramble +net nls plugins pgo +readline"
# As of 5.4_alpha_pre20251016, bash tests finally exit non-0 on failure.
# The differences look harmless but need investigation and fixing.
RESTRICT="test"
DEPEND="
>=sys-libs/ncurses-5.2-r2:=
nls? ( virtual/libintl )
"
if (( PLEVEL >= 0 )); then
DEPEND+=" readline? ( >=sys-libs/readline-${READLINE_VER}:= )"
fi
RDEPEND="
${DEPEND}
"
# We only need bison (yacc) when the .y files get patched (bash42-005, bash51-011).
BDEPEND="
pgo? ( dev-util/gperf )
verify-sig? ( sec-keys/openpgp-keys-chetramey )
"
# EAPI 8 tries to append it but it doesn't exist here.
QA_CONFIGURE_OPTIONS="--disable-static"
PATCHES=(
#"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}/
# Patches to or from Chet, posted to the bug-bash mailing list.
"${FILESDIR}/${PN}-5.0-syslog-history-extern.patch"
)
pkg_setup() {
# bug #7332
if is-flag -malign-double; then
eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
eerror "as it breaks LFS (struct stat64) on x86."
die "remove -malign-double from your CFLAGS mr ricer"
fi
if use bashlogger; then
ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs."
ewarn "This will log ALL output you enter into the shell, you have been warned."
fi
}
src_unpack() {
local patch
if [[ ${PV} == 9999 ]]; then
git-r3_src_unpack
elif (( PLEVEL < 0 )) && [[ ${BASH_COMMIT} ]]; then
default
else
if use verify-sig; then
verify-sig_verify_detached "${DISTDIR}/${MY_P}.tar.gz"{,.sig}
for patch in "${MY_PATCHES[@]}"; do
verify-sig_verify_detached "${patch}"{,.sig}
done
fi
unpack "${MY_P}.tar.gz"
if [[ ${GENTOO_PATCH_VER} ]]; then
unpack "${PN}-${GENTOO_PATCH_VER}-patches.tar.xz"
fi
fi
}
src_prepare() {
# Include official patches.
(( PLEVEL > 0 )) && eapply -p0 "${MY_PATCHES[@]}"
# Prefixify hardcoded path names. No-op for non-prefix.
hprefixify pathnames.h.in
# Avoid regenerating docs after patches, bug #407985.
sed -i -E '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in \
&& touch -r . doc/* \
|| die
# Sometimes hangs (more noticeable w/ pgo), bug #907403.
rm tests/run-jobs || die
eapply -p0 "${PATCHES[@]}"
eapply_user
}
src_configure() {
local -a myconf
# Upstream only test with Bison and require GNUisms like YYEOF and
# YYERRCODE. The former at least may be in POSIX soon:
# https://www.austingroupbugs.net/view.php?id=1269.
#
# configure warns on use of non-Bison but doesn't abort. The result
# may misbehave at runtime. Chet also advises against use of byacc:
# https://lists.gnu.org/archive/html/bug-bash/2025-08/msg00115.html
unset -v YACC
if tc-is-cross-compiler; then
export CFLAGS_FOR_BUILD="${BUILD_CFLAGS} -std=gnu17"
fi
myconf=(
--disable-profiling
# Force linking with system curses ... the bundled termcap lib
# sucks bad compared to ncurses. For the most part, ncurses
# is here because readline needs it. But bash itself calls
# ncurses in one or two small places :(.
--with-curses
$(use_enable mem-scramble)
$(use_enable net net-redirections)
$(use_enable readline)
$(use_enable readline bang-history)
$(use_enable readline history)
$(use_with afs)
$(use_with mem-scramble bash-malloc)
)
# For descriptions of these, see config-top.h.
# bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426
append-cppflags \
-DDEFAULT_PATH_VALUE=\'\""${EPREFIX}"/usr/local/sbin:"${EPREFIX}"/usr/local/bin:"${EPREFIX}"/usr/sbin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/bin\"\' \
-DSTANDARD_UTILS_PATH=\'\""${EPREFIX}"/bin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/usr/sbin\"\' \
-DDEFAULT_LOADABLE_BUILTINS_PATH=\'\""${EPREFIX}"/usr/local/$(get_libdir)/bash:"${EPREFIX}"/usr/$(get_libdir)/bash\"\' \
-DSYS_BASHRC=\'\""${EPREFIX}"/etc/bash/bashrc\"\' \
-DSYS_BASH_LOGOUT=\'\""${EPREFIX}"/etc/bash/bash_logout\"\' \
-DNON_INTERACTIVE_LOGIN_SHELLS \
-DSSH_SOURCE_BASHRC \
$(use bashlogger && echo -DSYSLOG_HISTORY)
use nls || myconf+=( --disable-nls )
if (( PLEVEL >= 0 )); then
# Historically, we always used the builtin readline, but since
# our handling of SONAME upgrades has gotten much more stable
# in the PM (and the readline ebuild itself preserves the old
# libs during upgrades), linking against the system copy should
# be safe.
# Exact cached version here doesn't really matter as long as it
# is at least what's in the DEPEND up above.
export ac_cv_rl_version=${READLINE_VER%%_*}
# Use system readline only with released versions.
myconf+=( --with-installed-readline=. )
fi
if use plugins; then
append-ldflags "-Wl,-rpath,${EPREFIX}/usr/$(get_libdir)/bash"
else
# Disable the plugins logic by hand since bash doesn't provide
# a way of doing it.
export ac_cv_func_dl{close,open,sym}=no \
ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no
sed -i -e '/LOCAL_LDFLAGS=/s:-rdynamic::' configure || die
fi
# bug #444070
tc-export AR
econf "${myconf[@]}"
}
src_compile() {
local -a pgo_generate_flags pgo_use_flags
local flag
# -fprofile-partial-training because upstream notes the test suite isn't
# super comprehensive.
# https://documentation.suse.com/sbp/all/html/SBP-GCC-10/index.html#sec-gcc10-pgo
if use pgo; then
pgo_generate_flags=(
-fprofile-update=atomic
-fprofile-dir="${T}"/pgo
-fprofile-generate="${T}"/pgo
)
pgo_use_flags=(
-fprofile-use="${T}"/pgo
-fprofile-dir="${T}"/pgo
)
if flag=$(test-flags-CC -fprofile-partial-training); then
pgo_generate_flags+=( "${flag}" )
pgo_use_flags+=( "${flag}" )
fi
fi
emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}"
use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" all others
# Build Bash and run its tests to generate profiles.
if (( ${#pgo_generate_flags[@]} )); then
# Used in test suite.
unset -v A
# Testsuite isn't expected to pass for bash right now, but it
# also doesn't matter for PGO.
nonfatal emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" -k check
if tc-is-clang; then
llvm-profdata merge "${T}"/pgo --output="${T}"/pgo/default.profdata || die
fi
# Rebuild Bash using the profiling data we just generated.
emake clean
emake CFLAGS="${CFLAGS} ${pgo_use_flags[*]}"
use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" all others
fi
}
src_test() {
# Used in test suite.
unset -v A
default
}
src_install() {
local d f
default
my_prefixify() {
while read -r; do
if [[ $REPLY == *$1* ]]; then
REPLY=${REPLY/"/etc/"/"${EPREFIX}/etc/"}
fi
printf '%s\n' "${REPLY}" || ! break
done < "$2" || die
}
dodir /bin
mv -- "${ED}"/usr/bin/bash "${ED}"/bin/ || die
dosym bash /bin/rbash
insinto /etc/bash
doins "${FILESDIR}"/bash_logout
my_prefixify bashrc.d "${FILESDIR}"/bashrc-r2 | newins - bashrc
insinto /etc/bash/bashrc.d
my_prefixify DIR_COLORS "${FILESDIR}"/bashrc.d/10-gentoo-color-r2.bash | newins - 10-gentoo-color.bash
newins "${FILESDIR}"/bashrc.d/10-gentoo-title-r3.bash 10-gentoo-title.bash
insinto /etc/profile.d
doins "${FILESDIR}/profile.d/00-prompt-command.sh"
insinto /etc/skel
for f in bash{_logout,_profile,rc}; do
newins "${FILESDIR}/skel/dot-${f}" ".${f}"
done
if use plugins; then
exeinto "/usr/$(get_libdir)/bash"
set -- examples/loadables/*.o
doexe "${@%.o}"
insinto /usr/include/bash-plugins
doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h}
fi
if use examples; then
for d in examples/{functions,misc,scripts,startup-files}; do
exeinto "/usr/share/doc/${PF}/${d}"
docinto "${d}"
for f in "${d}"/*; do
if [[ ${f##*/} != @(PERMISSION|*README) ]]; then
doexe "${f}"
else
dodoc "${f}"
fi
done
done
fi
# Install bash_builtins.1 and rbash.1.
emake -C doc DESTDIR="${D}" install_builtins
sed 's:bash\.1:man1/&:' doc/rbash.1 > "${T}"/rbash.1 || die
doman "${T}"/rbash.1
newdoc CWRU/changelog ChangeLog
dosym bash.info /usr/share/info/bashref.info
}
pkg_preinst() {
if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]]; then
mkdir -p -- "${EROOT}"/etc/bash \
&& mv -f -- "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/ \
|| die
fi
}
pkg_postinst() {
local IFS old_ver ver
local -a versions
# If /bin/sh does not exist, provide it.
if [[ ! -e ${EROOT}/bin/sh ]]; then
ln -sf -- bash "${EROOT}"/bin/sh || die
fi
if [[ -e ${EROOT}/etc/bash/bashrc.d/15-gentoo-bashrc-check.bash ]]; then
ewarn "The following file is no longer packaged and can safely be deleted:"
ewarn "${EROOT}/etc/bash/bashrc.d/15-gentoo-bashrc-check.bash"
fi
read -rd '' -a versions <<<"${REPLACING_VERSIONS}"
for ver in "${versions[@]}"; do
if [[ ! ${old_ver} ]] || ver_test "${ver}" -lt "${old_ver}"; then
old_ver=${ver}
fi
done
if [[ ! ${old_ver} ]]; then
return
fi
{
if ver_test "${old_ver}" -ge "5.2" \
&& ver_test "${old_ver}" -ge "5.2_p26-r8"
then
:
elif ver_test "${old_ver}" -lt "5.2" \
&& ver_test "${old_ver}" -ge "5.1_p16-r8"
then
:
else
cat <<'EOF'
Files under /etc/bash/bashrc.d must now have a suffix of .sh or .bash.
Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the
characteristics of the operating environment, it may contain a command to set
the terminal's window title. Those who were already choosing to customise the
PROMPT_COMMAND variable are now advised to append their commands like so:
PROMPT_COMMAND+=('custom command goes here')
Gentoo no longer defaults to having bash set the window title in the case
that the terminal is controlled by sshd(8), unless screen is launched on the
remote side or the terminal reliably supports saving and restoring the title
(as alacritty, foot and tmux do). Those wanting for the title to be set
regardless may adjust ~/.bashrc - or create a custom /etc/bash/bashrc.d
drop-in - to set PROMPT_COMMMAND like so:
PROMPT_COMMAND=(genfun_set_win_title)
Those who would prefer for bash never to interfere with the window title may
now opt out of the default title setting behaviour, either with the "unset -v
PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired.
EOF
fi
if ver_test "${old_ver}" -ge "5.3" \
&& ver_test "${old_ver}" -ge "5.3_p3-r3"
then
:
elif ver_test "${old_ver}" -lt "5.3" \
&& ver_test "${old_ver}" -ge "5.2_p37-r5"
then
:
else
cat <<'EOF'
The window title setting behaviour has been improved. It is now formatted as
"\u@\h \W", in accordance with the prompting mechanism of bash. For example,
after switching to the home directory, the current working directly will be
shown as the <tilde> character.
The value of PROMPT_DIRTRIM is now respected. If this variable is unset, the
use of the \W prompt string escape will prevail, with the current working
directory typically being shown as its basename. If set to 0 or greater, \w
will be used instead, which may be trimmed. This also means that the title
can be made to show the full path by setting PROMPT_DIRTRIM=0.
For further information, run info '(bash)Bash Variables' or visit
https://www.gnu.org/software/bash/manual/bash.html#index-PROMPT_005fDIRTRIM.
EOF
fi
} \
| if [[ ${COLUMNS} == [1-9]*([0-9]) ]] && (( COLUMNS > 80 )); then
fmt -w "$(( COLUMNS - 3 ))"
else
cat
fi \
| while read -r; do
ewarn "${REPLY}"
done
}

View File

@ -1,83 +0,0 @@
# /etc/bash/bashrc.d/10-gentoo-title.bash
# For information regarding the control sequences used, please refer to
# https://invisible-island.net/xterm/ctlseqs/ctlseqs.html.
genfun_set_win_title() {
# Advertise the fact that the presently running interactive shell will
# update the title. Doing so allows for its subprocesses to determine
# whether it is safe to set the title of their own accord. Note that 0
# refers to the value of Ps within the OSC Ps ; Pt BEL sequence.
export SHELL_SETS_TITLE=0
# Assigns the basename of the current working directory, having
# sanitised it with @Q parameter expansion. Useful for paths containing
# newlines and such. As a special case, names consisting entirely of
# graphemes shall not undergo the expansion, for reasons of cleanliness.
genfun_sanitise_cwd() {
_cwd=${PWD##*/}
if [[ ! ${_cwd} ]]; then
_cwd=${PWD}
elif [[ ${_cwd} == *[![:graph:]]* ]]; then
_cwd=${_cwd@Q}
fi
}
# Sets the window title with the Set Text Parameters control sequence.
# For screen, the sequence defines the hardstatus (%h) and for tmux, the
# pane_title (#T). For graphical terminal emulators, it is normal for
# the title bar to be affected.
genfun_set_win_title() {
local _cwd
genfun_sanitise_cwd
printf '\033]0;%s@%s - %s\007' "${USER}" "${HOSTNAME%%.*}" "${_cwd}"
}
genfun_set_win_title
}
unset -v SHELL_SETS_TITLE
# Determine whether the terminal can handle the Set Text Parameters sequence.
# The only terminals permitted here are those for which there is empirical
# evidence that the sequence is supported and that the UTF-8 character encoding
# is handled correctly. Quite rightly, this precludes many vintage terminals.
case ${TERM} in
alacritty*|contour|foot*|tmux*)
# The terminal emulator also supports XTWINOPS. If the PTY was
# created by sshd(8) then push the current window title to the
# stack and arrange for it to be popped upon exiting. Xterm also
# supports this but there are far too many terminal emulators
# that falsely identify as being xterm-compatible.
if [[ ${SSH_TTY} && ${SSH_TTY} == "$(tty)" ]]; then
trap 'printf "\033[23;0t"' EXIT
printf '\033[22;0t'
fi
;;
rxvt-unicode*|st-256color|xterm*)
# If the PTY was created by sshd(8) then proceed no further.
# Alas, there exist many operating environments in which the
# title would otherwise not be restored upon ssh(1) exiting.
# Those wanting for the title to be set regardless may adjust
# ~/.bashrc or create a bashrc.d drop-in to set PROMPT_COMMAND.
# For example, PROMPT_COMMAND=(genfun_set_win_title).
if [[ ${SSH_TTY} && ${SSH_TTY} == "$(tty)" ]]; then
return
fi
;;
screen*)
# If the PTY was created by sshd(8) and screen(1) was launched
# prior to the SSH session beginning, as opposed to afterwards,
# proceed no further. It is another case in which there would be
# no guarantee of the title being restored upon ssh(1) exiting.
if [[ ! ${WINDOW} && ${SSH_TTY} && ${SSH_TTY} == "$(tty)" ]]; then
return
fi
;;
*)
return
esac
# Arrange for the title to be updated each time the primary prompt is displayed.
PROMPT_COMMAND+=('genfun_set_win_title')

View File

@ -15,11 +15,11 @@ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~spar
IUSE="cgi selinux system-man test"
RESTRICT="!test? ( test )"
RDEPEND="sys-libs/zlib
RDEPEND="virtual/zlib:=
system-man? ( !sys-apps/man-db )
"
DEPEND="${RDEPEND}
cgi? ( sys-libs/zlib[static-libs] )
cgi? ( virtual/zlib:=[static-libs] )
"
BDEPEND="
cgi? ( app-text/highlight )

View File

@ -1 +1,2 @@
DIST scdoc-1.11.3.tar.gz 12768 BLAKE2B c39ed51f9279aa8a08bbd99a3d3780ef37654a37f687c7de340266d9c7a6edceb8f6824baaa34c756440d45bd51611ab28f7f2e42ea632b943f6018d6e5f5a04 SHA512 fbecc505b44c396890c53c05183d34336160dbd02993ee120421fc6e2a3ec78ba349747e8acfe97af956a0081c923309290ff97fb7babafbc3ca8addc9ec92f9
DIST scdoc-1.11.4.tar.gz 13081 BLAKE2B 17dc77a09125356e99c50708d5053fe88f3c204f78e8a3e54d28970d8b549d8904f426ff88cac01fc3daf634c37467975342956a807757265cfd642ab8ce3725 SHA512 f8950bbef5213a89746185d5ed29fbee2502235632db883afaaac515dc87c60559bc1a39e2a3ea3bb019675e6039bd2d3b5c5d117a0ad022b61c958fb9407877

View File

@ -0,0 +1,45 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit toolchain-funcs
DESCRIPTION="Standalone tool for generating man pages with a simple syntax"
HOMEPAGE="https://git.sr.ht/~sircmpwn/scdoc"
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://git.sr.ht/~sircmpwn/scdoc"
inherit git-r3
else
SRC_URI="https://git.sr.ht/~sircmpwn/scdoc/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
LICENSE="MIT"
SLOT="0"
src_prepare() {
default
sed -e 's/-Werror//' \
-i Makefile || die 'Failed to patch Makefile'
}
src_compile() {
local MY_HS="./scdoc"
if tc-is-cross-compiler; then
tc-export_build_env
MY_HS="./hostscdoc"
emake scdoc HOST_SCDOC="./hostscdoc" OUTDIR="${S}/.build.host" CC="$(tc-getBUILD_CC)" \
CFLAGS="${BUILD_CFLAGS} -DVERSION='\"${PV}\"'" LDFLAGS="${BUILD_LDFLAGS}"
mv scdoc hostscdoc || die 'Failed to rename host scdoc'
fi
emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" PREFIX="${EPREFIX}/usr" HOST_SCDOC="${MY_HS}"
}
src_install() {
emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" HOST_SCDOC="${MY_HS}" \
PCDIR="${EPREFIX}/usr/$(get_libdir)/pkgconfig" install
}

View File

@ -72,7 +72,7 @@ RDEPEND="
>=dev-libs/jsoncpp-1.9.2-r2:0=
>=dev-libs/libuv-1.51.0-r1:=
>=net-misc/curl-7.21.5[ssl]
sys-libs/zlib
virtual/zlib:=
virtual/pkgconfig
dap? ( dev-cpp/cppdap )
gui? ( dev-qt/qtbase:6[gui,widgets] )

View File

@ -76,7 +76,7 @@ RDEPEND="
>=dev-libs/jsoncpp-1.9.2-r2:0=
>=dev-libs/libuv-1.51.0-r1:=
>=net-misc/curl-7.21.5[ssl]
sys-libs/zlib
virtual/zlib:=
virtual/pkgconfig
dap? ( dev-cpp/cppdap )
gui? ( dev-qt/qtbase:6[gui,widgets] )

View File

@ -76,7 +76,7 @@ RDEPEND="
>=dev-libs/jsoncpp-1.9.2-r2:0=
>=dev-libs/libuv-1.51.0-r1:=
>=net-misc/curl-7.21.5[ssl]
sys-libs/zlib
virtual/zlib:=
virtual/pkgconfig
dap? ( dev-cpp/cppdap )
gui? ( dev-qt/qtbase:6[gui,widgets] )

View File

@ -0,0 +1,81 @@
https://bugs.gentoo.org/966090
https://savannah.gnu.org/bugs/index.php?67687#comment3
https://file.savannah.gnu.org/file/sv67687_release_tokens.diff?file_id=57804
Rebased on make-4.4.1 because of test changes.
commit 04a04b5dfe66de46353c9fe31dd64efab2516257
Author: Dmitry Goncharov <dgoncharov@users.sf.net>
Date: Thu Nov 13 00:25:15 2025 -0500
[SV 67687] Release all jobserver tokens upon a fatal signal.
* src/commands.c (fatal_error_signal): Call jobserver_clear after
reap_childen to let free_child run jobserver_release before the
pipe/fifo is closed.
* tests/scripts/features/jobserver: Add tests.
--- a/src/commands.c
+++ b/src/commands.c
@@ -531,7 +531,6 @@ fatal_error_signal (int sig)
temp_stdin_unlink ();
osync_clear ();
- jobserver_clear ();
/* A termination signal won't be sent to the entire
process group, but it means we want to kill the children. */
@@ -577,6 +576,8 @@ fatal_error_signal (int sig)
while (job_slots_used > 0)
reap_children (1, 1);
+ jobserver_clear ();
+
/* Delete any non-precious intermediate files that were made. */
remove_intermediates (1);
--- a/tests/scripts/features/jobserver
+++ b/tests/scripts/features/jobserver
@@ -198,4 +198,39 @@ all:;@echo "$$MAKEFLAGS"
run_make_test(q!all:;@echo hi!, "", "#MAKE#: cannot open jobserver nosuchfile: $ERR_no_such_file\n#MAKE#: $j1err\nhi\n");
}
+if ($port_type eq 'UNIX') {
+ # sv 67687.
+ # Test that make releases all jobserver tokens upon a fatal signal.
+ #
+ # When the submake releases all its tokens make prints something like
+ #
+ # "make[1]: *** [child.mk:2: a] Terminated
+ # make[1]: *** [child.mk:2: b] Terminated
+ # make: *** [t001.mk:2: all] Terminated".
+ #
+ # When make detects lost jobserver tokens, make prints something like
+ #
+ # "make[1]: *** [child.mk:2: a] Terminated
+ # make[1]: *** [child.mk:2: b] Terminated
+ # make: *** [t001.mk:2: all] Terminated
+ # INTERNAL: exiting with 1 jobserver tokens available; should be 3!".
+ #
+ # This test has to fail if the last line is "exiting with ...".
+ # Anchor \Z ensures that the regex won't match when the "exiting with ..."
+ # message is present, because the preceding "Terminated" message is
+ # followed by a new line.
+ #
+ # "[\w\d ]*" after "Terminated" is for macos.
+ create_file('child.mk',
+'all: a b c
+a b:; @sleep 180
+c:; @sleep 2 && kill -term $$PPID');
+ my $re = '/#MAKE#: \*\*\* \[#MAKEFILE#:2: all\] Terminated[\w\d ]*\Z/';
+ run_make_test(q!
+all:; @$(MAKE) --no-print-directory -f child.mk
+!, '-j3', $re, 512);
+ run_make_test(undef, '--jobserver-style=pipe -j3', $re, 512);
+ unlink('child.mk') unless $keep;
+}
+
1;
--
2.51.2

View File

@ -0,0 +1,104 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/make.asc
GUILE_COMPAT=( 2-2 3-0 )
inherit flag-o-matic unpacker verify-sig guile-single
DESCRIPTION="Standard tool to compile source trees"
HOMEPAGE="https://www.gnu.org/software/make/make.html"
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://git.savannah.gnu.org/git/make.git"
inherit autotools git-r3
elif [[ $(ver_cut 3) -ge 90 || $(ver_cut 4) -ge 90 ]] ; then
SRC_URI="https://alpha.gnu.org/gnu/make/${P}.tar.lz"
SRC_URI+=" verify-sig? ( https://alpha.gnu.org/gnu/make/${P}.tar.lz.sig )"
else
SRC_URI="mirror://gnu/make/${P}.tar.lz"
SRC_URI+=" verify-sig? ( mirror://gnu/make/${P}.tar.lz.sig )"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
LICENSE="GPL-3+"
SLOT="0"
IUSE="doc guile nls static test"
RESTRICT="!test? ( test )"
REQUIRED_USE="guile? ( ${GUILE_REQUIRED_USE} )"
DEPEND="
guile? ( ${GUILE_DEPS} )
"
RDEPEND="
${DEPEND}
nls? ( virtual/libintl )
"
BDEPEND="
$(unpacker_src_uri_depends)
doc? ( virtual/texi2dvi )
nls? ( sys-devel/gettext )
verify-sig? ( sec-keys/openpgp-keys-make )
test? ( dev-lang/perl )
"
DOCS="AUTHORS NEWS README*"
PATCHES=(
"${FILESDIR}"/${PN}-4.4-default-cxx.patch
"${FILESDIR}"/${PN}-4.4.1-c23.patch
"${FILESDIR}"/${PN}-4.4.1-jobserver-kill-return-tokens.patch
)
src_unpack() {
if [[ ${PV} == 9999 ]] ; then
git-r3_src_unpack
cd "${S}" || die
./bootstrap || die
else
use verify-sig && verify-sig_verify_detached "${DISTDIR}"/${P}.tar.lz{,.sig}
unpacker ${P}.tar.lz
fi
}
src_prepare() {
default
if [[ ${PV} == 9999 ]] ; then
eautoreconf
fi
if use guile; then
guile_bump_sources
fi
}
pkg_setup() {
if use guile; then
guile-single_pkg_setup
fi
}
src_configure() {
use static && append-ldflags -static
local myeconfargs=(
--program-prefix=g
$(use_with guile)
$(use_enable nls)
)
econf "${myeconfargs[@]}"
}
src_compile() {
emake all $(usev doc 'pdf html')
}
src_install() {
use doc && HTML_DOCS=( doc/make.html/. ) DOCS="${DOCS} doc/make.pdf"
default
dosym gmake /usr/bin/make
dosym gmake.1 /usr/share/man/man1/make.1
guile_unstrip_ccache
}

View File

@ -0,0 +1,39 @@
From fbe4477ac8937253fe027486a28700f4f035b42b Mon Sep 17 00:00:00 2001
From: James Le Cuirot <chewi@gentoo.org>
Date: Sat, 12 Aug 2023 09:56:44 +0100
Subject: [PATCH 2/2] python module: Respect PATH when python is not given in
machine file
We should only fall back to the Python interpreter running Meson itself
if `python3` is not found in the PATH.
A couple of tests relied on the old behaviour. Under Arch/PyPy, the
PATH's `python3` does not point to PyPy. Unfortunately, other
Python-based tools like g-ir-scanner are installed with a shebang of
`/usr/bin/env python3` on Arch, so adjusting the PATH to point to a
different Python breaks such tools. We must therefore specify `python`
in a machine file instead.
We also have to now exclude "test cases/frameworks/1 boost" on Arch/PyPy
because it cannot work against PyPy. It was previously using CPython,
despite Meson itself running under PyPy, but the machine file has
changed that.
---
mesonbuild/modules/python.py | 4 +++-
6 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
index 9c1ad86cb170..ad1260ca5015 100644
--- a/mesonbuild/modules/python.py
+++ b/mesonbuild/modules/python.py
@@ -460,7 +460,9 @@ def _find_installation_impl(self, state: 'ModuleState', display_name: str, name_
build_config = self.interpreter.environment.coredata.optstore.get_value_for(OptionKey('python.build_config'))
if not name_or_path:
- python = PythonExternalProgram('python3', mesonlib.python_command, build_config_path=build_config)
+ python = PythonExternalProgram('python3', build_config_path=build_config)
+ if not python.found():
+ python = PythonExternalProgram('python3', mesonlib.python_command, build_config_path=build_config)
else:
tmp_python = ExternalProgram.from_entry(display_name, name_or_path)
python = PythonExternalProgram(display_name, ext_prog=tmp_python, build_config_path=build_config)

View File

@ -3,7 +3,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..12} pypy3 )
PYTHON_COMPAT=( python3_{11..12} )
DISTUTILS_USE_PEP517=setuptools
if [[ ${PV} = *9999* ]]; then
@ -44,7 +44,7 @@ DEPEND="
>=dev-libs/gobject-introspection-1.82.0-r2
app-alternatives/ninja
dev-vcs/git
sys-libs/zlib[static-libs(+)]
virtual/zlib:=[static-libs(+)]
virtual/pkgconfig
)
"

View File

@ -3,7 +3,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..12} pypy3 )
PYTHON_COMPAT=( python3_{11..12} )
DISTUTILS_USE_PEP517=setuptools
if [[ ${PV} = *9999* ]]; then
@ -44,7 +44,7 @@ DEPEND="
>=dev-libs/gobject-introspection-1.82.0-r2
app-alternatives/ninja
dev-vcs/git
sys-libs/zlib[static-libs(+)]
virtual/zlib:=[static-libs(+)]
virtual/pkgconfig
)
"

View File

@ -3,7 +3,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..12} pypy3 )
PYTHON_COMPAT=( python3_{11..12} )
DISTUTILS_USE_PEP517=setuptools
if [[ ${PV} = *9999* ]]; then
@ -44,7 +44,7 @@ DEPEND="
>=dev-libs/gobject-introspection-1.82.0-r2
app-alternatives/ninja
dev-vcs/git
sys-libs/zlib[static-libs(+)]
virtual/zlib:=[static-libs(+)]
virtual/pkgconfig
)
"

Some files were not shown because too many files have changed in this diff Show More