[gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/, sys-apps/portage/files/

2024-05-17 Thread Sam James
commit: 2cdb1b2ae41b13dc7f25b6d64c0b6ab19e4272dd
Author: Sam James  gentoo  org>
AuthorDate: Fri May 17 13:03:41 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Fri May 17 13:04:11 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2cdb1b2a

sys-apps/portage: backport tweak to implicit func. decl QA check

We're going to try kw GCC 14 soon so we want to reduce FPs to see what
remains to be done.

Bug: https://bugs.gentoo.org/906027
Signed-off-by: Sam James  gentoo.org>

 ...checks.d-suppress-some-gnulib-implicit-co.patch | 42 ++
 ...tage-3.0.63.ebuild => portage-3.0.63-r1.ebuild} |  4 +++
 ...e-3.0.64-r1.ebuild => portage-3.0.64-r2.ebuild} |  1 +
 3 files changed, 47 insertions(+)

diff --git 
a/sys-apps/portage/files/0001-install-qa-checks.d-suppress-some-gnulib-implicit-co.patch
 
b/sys-apps/portage/files/0001-install-qa-checks.d-suppress-some-gnulib-implicit-co.patch
new file mode 100644
index ..8844e5029f07
--- /dev/null
+++ 
b/sys-apps/portage/files/0001-install-qa-checks.d-suppress-some-gnulib-implicit-co.patch
@@ -0,0 +1,42 @@
+From 8256473c6a9fa93e7cf81c46fa920cd522507c21 Mon Sep 17 00:00:00 2001
+From: Eli Schwartz 
+Date: Fri, 17 May 2024 01:52:53 -0400
+Subject: [PATCH] install-qa-checks.d: suppress some gnulib implicit configure
+ declarations
+
+These happen in tons of GNU packages because of using gnulib, which
+pulls in macros that check for some functionality and spit out an
+implicit function declaration error if they aren't supported, which is
+*expected*.
+
+Bug: https://bugs.gentoo.org/906027
+Signed-off-by: Eli Schwartz 
+Closes: https://github.com/gentoo/portage/pull/1323
+Signed-off-by: Sam James 
+---
+ bin/install-qa-check.d/90config-impl-decl | 9 +
+ 1 file changed, 9 insertions(+)
+
+diff --git a/bin/install-qa-check.d/90config-impl-decl 
b/bin/install-qa-check.d/90config-impl-decl
+index 7969dff17..adea7d405 100644
+--- a/bin/install-qa-check.d/90config-impl-decl
 b/bin/install-qa-check.d/90config-impl-decl
+@@ -49,6 +49,15 @@ add_default_skips() {
+   res_ndestroy
+   statacl
+   )
++
++  QA_CONFIG_IMPL_DECL_SKIP+=(
++  # Available in c23, these gnulib checks are expected to fail
++  alignof
++  static_assert
++  unreachable
++  # also gnulib, but checks both linux/non-linux headers
++  MIN
++  )
+ }
+ 
+ find_log_targets() {
+-- 
+2.45.1
+

diff --git a/sys-apps/portage/portage-3.0.63.ebuild 
b/sys-apps/portage/portage-3.0.63-r1.ebuild
similarity index 98%
rename from sys-apps/portage/portage-3.0.63.ebuild
rename to sys-apps/portage/portage-3.0.63-r1.ebuild
index 4cf41d63b8e0..b58137ac2902 100644
--- a/sys-apps/portage/portage-3.0.63.ebuild
+++ b/sys-apps/portage/portage-3.0.63-r1.ebuild
@@ -108,6 +108,10 @@ PDEPEND="
)
 "
 
+PATCHES=(
+   
"${FILESDIR}"/0001-install-qa-checks.d-suppress-some-gnulib-implicit-co.patch
+)
+
 pkg_pretend() {
local CONFIG_CHECK="~IPC_NS ~PID_NS ~NET_NS ~UTS_NS"
 

diff --git a/sys-apps/portage/portage-3.0.64-r1.ebuild 
b/sys-apps/portage/portage-3.0.64-r2.ebuild
similarity index 98%
rename from sys-apps/portage/portage-3.0.64-r1.ebuild
rename to sys-apps/portage/portage-3.0.64-r2.ebuild
index 80f59b5d3560..edec27b9f08b 100644
--- a/sys-apps/portage/portage-3.0.64-r1.ebuild
+++ b/sys-apps/portage/portage-3.0.64-r2.ebuild
@@ -106,6 +106,7 @@ PDEPEND="
 
 PATCHES=(
"${FILESDIR}"/${P}-clang-splitdebug.patch
+   
"${FILESDIR}"/0001-install-qa-checks.d-suppress-some-gnulib-implicit-co.patch
 )
 
 pkg_pretend() {



[gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/, sys-apps/portage/files/

2024-05-10 Thread Sam James
commit: 9a9d8628ddadbbbeb595c8f0007c9e5ba89c8a71
Author: Sam James  gentoo  org>
AuthorDate: Fri May 10 18:25:01 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Fri May 10 18:25:27 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a9d8628

sys-apps/portage: backport fix for splitdebug splitting

Affects Clang in particular.

Bug: https://bugs.gentoo.org/787623
Signed-off-by: Sam James  gentoo.org>

 .../files/portage-3.0.64-clang-splitdebug.patch|  76 +++
 sys-apps/portage/portage-3.0.64-r1.ebuild  | 246 +
 2 files changed, 322 insertions(+)

diff --git a/sys-apps/portage/files/portage-3.0.64-clang-splitdebug.patch 
b/sys-apps/portage/files/portage-3.0.64-clang-splitdebug.patch
new file mode 100644
index ..04193241debd
--- /dev/null
+++ b/sys-apps/portage/files/portage-3.0.64-clang-splitdebug.patch
@@ -0,0 +1,76 @@
+https://github.com/gentoo/portage/commit/51f6ad158fc3de14df3f87d1242ff950b2189f05
+
+From 51f6ad158fc3de14df3f87d1242ff950b2189f05 Mon Sep 17 00:00:00 2001
+From: "Alex Xu (Hello71)" 
+Date: Sat, 11 Mar 2023 12:27:23 -0500
+Subject: [PATCH] estrip: Don't use splitdebug for .o files
+
+As the process_ar comment explained, object files cannot be splitdebug.
+
+Bug: https://bugs.gentoo.org/787623 ("www-client/firefox[clang]: 
.gnu_debuglink is busted when using LLD")
+Fixes: 51579fb34c19 ("prepstrip: add support for elfutils strip")
+Signed-off-by: Alex Xu (Hello71) 
+Signed-off-by: Sam James 
+--- a/bin/estrip
 b/bin/estrip
+@@ -280,9 +280,6 @@ dedup_elf_debug() {
+ 
+ # Usage: save_elf_debug   [splitdebug]
+ save_elf_debug() {
+-  ${FEATURES_splitdebug} || return 0
+-  ${PORTAGE_RESTRICT_splitdebug} && return 0
+-
+   debug-print-function "${FUNCNAME}" "$@"
+ 
+   # NOTE: Debug files must be installed in
+@@ -390,7 +387,7 @@ process_elf() {
+ 
+   if ${strip_this} ; then
+   # See if we can split & strip at the same time
+-  if [[ -n ${SPLIT_STRIP_FLAGS} ]] ; then
++  if ${splitdebug} && [[ -n ${SPLIT_STRIP_FLAGS} ]] ; then
+   local shortname="${x##*/}.debug"
+   local 
splitdebug="${tmpdir}/splitdebug/${shortname}.${BASHPID:-$(__bashpid)}"
+ 
+@@ -401,7 +398,9 @@ process_elf() {
+   "${x}"
+   save_elf_debug "${x}" "${inode_link}_debug" 
"${splitdebug}"
+   else
+-  save_elf_debug "${x}" "${inode_link}_debug"
++  if ${splitdebug} ; then
++  save_elf_debug "${x}" "${inode_link}_debug"
++  fi
+   ${already_stripped} || ${STRIP} ${strip_flags} "${x}"
+   fi
+   fi
+@@ -431,7 +430,7 @@ process_ar() {
+   # There is no concept of splitdebug for objects not yet
+   # linked in (only for finally linked ELFs), so we have to
+   # retain the debug info in the archive itself.
+-  if ! ${FEATURES_splitdebug} || ${PORTAGE_RESTRICT_splitdebug} ; 
then
++  if ! ${splitdebug} ; then
+   ${STRIP} -g "${x}" && ${RANLIB} "${x}"
+   fi
+   fi
+@@ -542,6 +541,12 @@ do
+   set +o noglob
+   fi
+ 
++  if ${FEATURES_splitdebug} && ! ${PORTAGE_RESTRICT_splitdebug} ; then
++  splitdebug=true
++  else
++  splitdebug=false
++  fi
++
+   # In Prefix we are usually an unprivileged user, so we can't strip
+   # unwritable objects.  Make them temporarily writable for the
+   # stripping.
+@@ -564,6 +569,7 @@ do
+   ${f} == *"SB shared object"* ]] ; then
+   process_elf "${x}" "${inode_link}" ${PORTAGE_STRIP_FLAGS}
+   elif [[ ${f} == *"SB relocatable"* ]] ; then
++  [[ ${x} == *.ko ]] || splitdebug=false
+   process_elf "${x}" "${inode_link}" ${SAFE_STRIP_FLAGS}
+   fi
+ 
+

diff --git a/sys-apps/portage/portage-3.0.64-r1.ebuild 
b/sys-apps/portage/portage-3.0.64-r1.ebuild
new file mode 100644
index ..80f59b5d3560
--- /dev/null
+++ b/sys-apps/portage/portage-3.0.64-r1.ebuild
@@ -0,0 +1,246 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( pypy3 python3_{10..12} )
+PYTHON_REQ_USE='bzip2(+),threads(+)'
+TMPFILES_OPTIONAL=1
+
+inherit meson linux-info python-r1 tmpfiles
+
+DESCRIPTION="The package management and distribution system for Gentoo"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage;
+
+if [[ ${PV} ==  ]] ; then
+   EGIT_REPO_URI="
+   https://anongit.gentoo.org/git/proj/portage.git
+   https://github.com/gentoo/portage.git
+   "
+   inherit git-r3
+else
+   
SRC_URI="https://gitweb.gentoo.org/proj/portage.git/snapshot/${P}.tar.bz2;
+   KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa 

[gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/, sys-apps/portage/files/

2023-12-03 Thread Sam James
commit: f02e131e19d855d7823d9a94e943f616d0bdc303
Author: Sam James  gentoo  org>
AuthorDate: Sun Dec  3 08:00:20 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Dec  3 08:02:13 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f02e131e

sys-apps/portage: drop 3.0.52, 3.0.53, 3.0.54-r1, 3.0.55

Signed-off-by: Sam James  gentoo.org>

 sys-apps/portage/Manifest  |   4 -
 54-Convert-portageq-helper-to-a-function.patch |  65 --
 sys-apps/portage/portage-3.0.52.ebuild | 238 
 sys-apps/portage/portage-3.0.53.ebuild | 238 
 sys-apps/portage/portage-3.0.54-r1.ebuild  | 241 -
 sys-apps/portage/portage-3.0.55.ebuild | 238 
 6 files changed, 1024 deletions(-)

diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
index 830ba607a0af..6d7f781090b1 100644
--- a/sys-apps/portage/Manifest
+++ b/sys-apps/portage/Manifest
@@ -3,8 +3,4 @@ DIST portage-3.0.46.tar.bz2 1148375 BLAKE2B 
d97698eb3341a8d04980e021e5be8650193b
 DIST portage-3.0.49.tar.bz2 1152449 BLAKE2B 
a47f951a35828ba9c8fc88c2eab5222c98ed20240c736c366d8f2e4f4aef773a140bf0e150448cc3796a7adb7471ce006aae4de1816bbbaae6dd83dcf28f52b0
 SHA512 
f07950d10c01bda0915aa30c5c0b6ce2864754fe7dea38b5341336cd7665dcabfdc219969f1a3d2803db59bc23fc4284bc96b4087a596cb27a5d9eb075735469
 DIST portage-3.0.50.tar.bz2 1153508 BLAKE2B 
b90d93f8922acdb5486a52c1354c6c9829fac608971078a641b604b57240065eec4e82cc9cb2fb8b4ba485a7f2d52473c0a90295b29eb578638ad11cd3cf2943
 SHA512 
355841af862077f9203d6f8cbe904f4966516597444f38ef535fc06d0fe5c21d9c1da139a44407fdd69b56eb9c49c286187d856ef4e9b9bc6b21bab5b772a88f
 DIST portage-3.0.51.tar.bz2 1155503 BLAKE2B 
1095ab616993951da8f4d43cef4cf815672c67cb48ea2fe5aeb6b7c629058bfab1557d2b9508f2e3e9f38676733b5d60ec6a3686bc57840065c428508769cb1c
 SHA512 
bf237819173bed9df3b63ada067a2a99700618d88fd4b528146c56bdd592f2452003db6cc6da4a445b647eb4d8bb591260ea0d2a5627ad540526a2e802025836
-DIST portage-3.0.52.tar.bz2 1157447 BLAKE2B 
61e4d32f9713b9b0a2df6ca636b2d756dacdb93f862eeab8a8b46d436b9c90d3d5d04989023dc5580ce0c4a6827fa623e5b32ce3d5094ff56ccde7a53c1af81c
 SHA512 
1a249b140cc24b6d83314ad0b3f4ca73fcff3df01f1207c2fe661b16e78ab1155bb6dca4fb89100910fce13bf0fc21636232f9560360cf12f2c43b803d2a0429
-DIST portage-3.0.53.tar.bz2 1162321 BLAKE2B 
1c38bc97d9aca2ce4062ed0fc2ef9297911379a32f1ed32b4d5ced760970edbfb9579471efd69c0fc16e3227ef6444d60c2bb19be6d809eabe832250d340b4b5
 SHA512 
d747acc922da2d6f2dc10a8b5a6c7cf4b325ab903b3c5634d5aa1927bbfffa306076ad780a4634d7bcf6092b763b753b02c14f1a21197706559d370c6eee00a1
-DIST portage-3.0.54.tar.bz2 1164619 BLAKE2B 
b70ed74a557470068f873b544bc7efc497f4121b2189601c44f9ddc1571e80cdc1387148cdd705604a24a2357289385345df5d60e03e7ebff1e8797bed350fe4
 SHA512 
2e9e16dae4a30e2bfed2d5eab7eb4e4c8260cc1b5a826d247e98908fb8669e4e5176d7f59a01d4d7a302f874fe1d80c17da87bb87d31f98af7a79e1823fa4009
-DIST portage-3.0.55.tar.bz2 1167100 BLAKE2B 
8dd4ffa3f816e34a9afa5ba70d0ae252797a782cf8b3dd4df9c4fe52f1fb218d757b3679a5d43229accdbed52ae70bb6a706768839bf735b342bdfc598e252a1
 SHA512 
de891a7a91012546ded5ac6f3427324d1d959beeb7442339f350728bee3337ff49e48a113b191dc0d515f3545b8662ff26ad434bb9cbfbc23bd47938a8932fce
 DIST portage-3.0.56.tar.bz2 1166588 BLAKE2B 
f6e8d8dbfb3b157f1e5577419ef78c8e63b6f754ffa94da22e6466f11b77738e11fc9ad4803341b6640a6c7f48bd73bb02a12643b8176d60147e88aa1fb48314
 SHA512 
6eac4edb286f3ef0074cbaaf3b216c8dd40fe474e1a9bd6f86d7185cceabe19edb76b324af76d9fa1005ba8809d624354c21ab84284aba0d92e467612bd9fe47

diff --git 
a/sys-apps/portage/files/portage-3.0.54-Convert-portageq-helper-to-a-function.patch
 
b/sys-apps/portage/files/portage-3.0.54-Convert-portageq-helper-to-a-function.patch
deleted file mode 100644
index 970f49d6a001..
--- 
a/sys-apps/portage/files/portage-3.0.54-Convert-portageq-helper-to-a-function.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 27952b1d753ef4ea9bbd2307f8a9a315ad94557d Mon Sep 17 00:00:00 2001
-From: Mike Gilbert 
-Date: Thu, 26 Oct 2023 10:42:00 -0400
-Subject: [PATCH] Convert portageq helper to a function
-To: gentoo-portage-...@lists.gentoo.org
-
-This keeps it out of PATH in ebuilds to avoid breaking external
-utilities that call portageq.
-
-Bug: https://bugs.gentoo.org/906129
-Bug: https://bugs.gentoo.org/916287
-Bug: https://bugs.gentoo.org/916296
-Signed-off-by: Mike Gilbert 

- NEWS| 4 +++-
- bin/ebuild-helpers/portageq | 8 
- bin/phase-helpers.sh| 4 
- bin/portageq-wrapper| 1 -
- 4 files changed, 7 insertions(+), 10 deletions(-)
- delete mode 100755 bin/ebuild-helpers/portageq
-
-diff --git a/bin/ebuild-helpers/portageq b/bin/ebuild-helpers/portageq
-deleted file mode 100755
-index bd9d6b044..0
 a/bin/ebuild-helpers/portageq
-+++ /dev/null
-@@ -1,8 +0,0 @@
--#!/usr/bin/env bash
--# Copyright 2009-2023 Gentoo Authors
--# 

[gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/, sys-apps/portage/files/

2023-10-26 Thread Mike Gilbert
commit: ef59ea9a89cfb8bcec388c7ea1a962a4ca0940b6
Author: Mike Gilbert  gentoo  org>
AuthorDate: Thu Oct 26 15:50:22 2023 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Thu Oct 26 15:50:22 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef59ea9a

sys-apps/portage: backport portageq fix

Closes: https://bugs.gentoo.org/916287
Closes: https://bugs.gentoo.org/916296
Signed-off-by: Mike Gilbert  gentoo.org>

 54-Convert-portageq-helper-to-a-function.patch | 65 ++
 ...tage-3.0.54.ebuild => portage-3.0.54-r1.ebuild} |  3 +
 2 files changed, 68 insertions(+)

diff --git 
a/sys-apps/portage/files/portage-3.0.54-Convert-portageq-helper-to-a-function.patch
 
b/sys-apps/portage/files/portage-3.0.54-Convert-portageq-helper-to-a-function.patch
new file mode 100644
index ..970f49d6a001
--- /dev/null
+++ 
b/sys-apps/portage/files/portage-3.0.54-Convert-portageq-helper-to-a-function.patch
@@ -0,0 +1,65 @@
+From 27952b1d753ef4ea9bbd2307f8a9a315ad94557d Mon Sep 17 00:00:00 2001
+From: Mike Gilbert 
+Date: Thu, 26 Oct 2023 10:42:00 -0400
+Subject: [PATCH] Convert portageq helper to a function
+To: gentoo-portage-...@lists.gentoo.org
+
+This keeps it out of PATH in ebuilds to avoid breaking external
+utilities that call portageq.
+
+Bug: https://bugs.gentoo.org/906129
+Bug: https://bugs.gentoo.org/916287
+Bug: https://bugs.gentoo.org/916296
+Signed-off-by: Mike Gilbert 
+---
+ NEWS| 4 +++-
+ bin/ebuild-helpers/portageq | 8 
+ bin/phase-helpers.sh| 4 
+ bin/portageq-wrapper| 1 -
+ 4 files changed, 7 insertions(+), 10 deletions(-)
+ delete mode 100755 bin/ebuild-helpers/portageq
+
+diff --git a/bin/ebuild-helpers/portageq b/bin/ebuild-helpers/portageq
+deleted file mode 100755
+index bd9d6b044..0
+--- a/bin/ebuild-helpers/portageq
 /dev/null
+@@ -1,8 +0,0 @@
+-#!/usr/bin/env bash
+-# Copyright 2009-2023 Gentoo Authors
+-# Distributed under the terms of the GNU General Public License v2
+-
+-source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
+-
+-die "'${0##*/}' is not allowed in ebuild scope"
+-exit 1
+diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
+index 3f12b3707..6c2ecf0bc 100644
+--- a/bin/phase-helpers.sh
 b/bin/phase-helpers.sh
+@@ -1006,6 +1006,10 @@ best_version() {
+   ___best_version_and_has_version_common "$@"
+ }
+ 
++portageq() {
++die "portageq is not allowed in ebuild scope"
++}
++
+ if ___eapi_has_get_libdir; then
+   get_libdir() {
+   local libdir_var="LIBDIR_${ABI}"
+diff --git a/bin/portageq-wrapper b/bin/portageq-wrapper
+index afa2defe1..047d1d826 100755
+--- a/bin/portageq-wrapper
 b/bin/portageq-wrapper
+@@ -9,7 +9,6 @@ IFS=":"
+ set -f # in case ${PATH} contains any shell glob characters
+ 
+ for path in "${PORTAGE_BIN_PATH}" ${PATH}; do
+-  [[ ${path} == */portage/*/ebuild-helpers* ]] && continue
+   [[ -x ${path}/portageq ]] || continue
+   PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \
+   exec "${PORTAGE_PYTHON:-/usr/bin/python}" "${path}/portageq" 
"$@"
+-- 
+2.42.0
+

diff --git a/sys-apps/portage/portage-3.0.54.ebuild 
b/sys-apps/portage/portage-3.0.54-r1.ebuild
similarity index 98%
rename from sys-apps/portage/portage-3.0.54.ebuild
rename to sys-apps/portage/portage-3.0.54-r1.ebuild
index 5bf30b190b87..e117706672e2 100644
--- a/sys-apps/portage/portage-3.0.54.ebuild
+++ b/sys-apps/portage/portage-3.0.54-r1.ebuild
@@ -111,6 +111,9 @@ pkg_pretend() {
 }
 
 src_prepare() {
+   local PATCHES=(
+   
"${FILESDIR}/portage-3.0.54-Convert-portageq-helper-to-a-function.patch"
+   )
default
 
if use prefix-guest; then



[gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/, sys-apps/portage/files/

2023-07-30 Thread Sam James
commit: 477f52c4394e89e894be8665d1fcfd263a3c9f06
Author: Sam James  gentoo  org>
AuthorDate: Sun Jul 30 13:10:12 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Jul 30 13:10:22 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=477f52c4

sys-apps/portage: backport prefix init script shebang fix

Bug: https://bugs.gentoo.org/640658
Signed-off-by: Sam James  gentoo.org>

 ...age-3.0.49-prefixify-init-script-shebangs.patch |  29 ++
 sys-apps/portage/portage-3.0.49-r2.ebuild  | 303 +
 2 files changed, 332 insertions(+)

diff --git 
a/sys-apps/portage/files/portage-3.0.49-prefixify-init-script-shebangs.patch 
b/sys-apps/portage/files/portage-3.0.49-prefixify-init-script-shebangs.patch
new file mode 100644
index ..d4d050c1741c
--- /dev/null
+++ b/sys-apps/portage/files/portage-3.0.49-prefixify-init-script-shebangs.patch
@@ -0,0 +1,29 @@
+https://gitweb.gentoo.org/proj/portage.git/commit/?id=6066bb766f43ca06a5b0f08baa5946ff678f0c29
+
+From 6066bb766f43ca06a5b0f08baa5946ff678f0c29 Mon Sep 17 00:00:00 2001
+From: Benda Xu 
+Date: Sun, 25 Jun 2023 17:03:00 +0800
+Subject: bin/install-qa-check.d/05prefix: prefixify init-script shebangs.
+
+Init scripts in /etc/init.d have OpenRC shebangs "#!/sbin/openrc-run".
+They should be prefixified like a executable script in a Prefix.
+
+Signed-off-by: Benda Xu 
+Bug: https://bugs.gentoo.org/640658
+Closes: https://github.com/gentoo/portage/pull/1061
+Signed-off-by: Sam James 
+--- a/bin/install-qa-check.d/05prefix
 b/bin/install-qa-check.d/05prefix
+@@ -76,8 +76,8 @@ install_qa_check_prefix() {
+   fi
+   continue
+   fi
+-  # unprefixed shebang, is the script directly in ${PATH}?
+-  if [[ ":${PATH}:" == *":${fp}:"* ]] ; then
++  # unprefixed shebang, is the script directly in ${PATH} or an 
init script?
++  if [[ ":${PATH}:${EPREFIX}/etc/init.d:" == *":${fp}:"* ]] ; then
+   if [[ -e ${EROOT}${line[0]} || -e ${ED}${line[0]} ]] ; 
then
+   # is it unprefixed, but we can just fix it 
because a
+   # prefixed variant exists
+-- 
+cgit v1.2.3-18-g5258

diff --git a/sys-apps/portage/portage-3.0.49-r2.ebuild 
b/sys-apps/portage/portage-3.0.49-r2.ebuild
new file mode 100644
index ..bfea826b7585
--- /dev/null
+++ b/sys-apps/portage/portage-3.0.49-r2.ebuild
@@ -0,0 +1,303 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DISTUTILS_EXT=1
+PYTHON_COMPAT=( pypy3 python3_{10..12} )
+PYTHON_REQ_USE='bzip2(+),threads(+)'
+SETUPTOOLS_USE_DISTUTILS=local
+TMPFILES_OPTIONAL=1
+
+inherit distutils-r1 linux-info toolchain-funcs tmpfiles prefix
+
+DESCRIPTION="The package management and distribution system for Gentoo"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage;
+
+if [[ ${PV} ==  ]] ; then
+   EGIT_REPO_URI="
+   https://anongit.gentoo.org/git/proj/portage.git
+   https://github.com/gentoo/portage.git
+   "
+   inherit git-r3
+else
+   
SRC_URI="https://gitweb.gentoo.org/proj/portage.git/snapshot/${P}.tar.bz2;
+   KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc 
~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="apidoc build doc gentoo-dev +ipc +native-extensions +rsync-verify 
selinux test xattr"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+   dev-python/setuptools[${PYTHON_USEDEP}]
+   test? ( dev-vcs/git )
+"
+DEPEND="
+   >=app-arch/tar-1.27
+   dev-lang/python-exec:2
+   >=sys-apps/sed-4.0.5 sys-devel/patch
+   !build? ( $(python_gen_impl_dep 'ssl(+)') )
+   apidoc? (
+   dev-python/sphinx[${PYTHON_USEDEP}]
+   dev-python/sphinx-epytext[${PYTHON_USEDEP}]
+   )
+   doc? (
+   app-text/xmlto
+   ~app-text/docbook-xml-dtd-4.4
+   )
+"
+# Require sandbox-2.2 for bug #288863.
+# For whirlpool hash, require python[ssl] (bug #425046).
+# For compgen, require bash[readline] (bug #445576).
+# app-portage/gemato goes without PYTHON_USEDEP since we're calling
+# the executable.
+RDEPEND="
+   acct-user/portage
+   app-arch/zstd
+   >=app-arch/tar-1.27
+   dev-lang/python-exec:2
+   >=sys-apps/baselayout-2.9
+   >=sys-apps/findutils-4.4
+   !build? (
+   >=app-admin/eselect-1.2
+   >=app-shells/bash-5.0:0[readline]
+   >=sys-apps/sed-4.0.5
+   >=sec-keys/openpgp-keys-gentoo-release-20230329
+   rsync-verify? (
+   >=app-portage/gemato-14.5[${PYTHON_USEDEP}]
+   >=app-crypt/gnupg-2.2.4-r2[ssl(-)]
+   )
+   )
+   elibc_glibc? ( >=sys-apps/sandbox-2.2 )
+   elibc_musl? ( >=sys-apps/sandbox-2.2 )
+   kernel_linux? ( 

[gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/, sys-apps/portage/files/

2023-07-14 Thread Sam James
commit: 67e33dbaf367adfc465f322d0b6b5793c76207a8
Author: Oskari Pirhonen  gmail  com>
AuthorDate: Sat Jul 15 03:20:05 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Jul 15 03:44:01 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67e33dba

sys-apps/portage: backport message fix

Backport the "no ebuilds/binpkgs" message fix from the unreleased 3.0.50
to the affected versions.

Bug: https://bugs.gentoo.org/909853
Signed-off-by: Oskari Pirhonen  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/31891
Signed-off-by: Sam James  gentoo.org>

 ...epgraph.py-fix-no-ebuilds-binpkgs-message.patch | 43 ++
 ...0.48.1-r1.ebuild => portage-3.0.48.1-r2.ebuild} |  5 +++
 ...tage-3.0.49.ebuild => portage-3.0.49-r1.ebuild} |  5 +++
 3 files changed, 53 insertions(+)

diff --git 
a/sys-apps/portage/files/depgraph.py-fix-no-ebuilds-binpkgs-message.patch 
b/sys-apps/portage/files/depgraph.py-fix-no-ebuilds-binpkgs-message.patch
new file mode 100644
index ..97cff72cd85c
--- /dev/null
+++ b/sys-apps/portage/files/depgraph.py-fix-no-ebuilds-binpkgs-message.patch
@@ -0,0 +1,43 @@
+From b199d0307b47f9fb06dbe533d7e24926a561c238 Mon Sep 17 00:00:00 2001
+From: Oskari Pirhonen 
+Date: Sun, 9 Jul 2023 00:08:27 -0500
+Subject: [PATCH] depgraph.py: fix "no ebuilds/binpkgs" message
+
+The "there are no binary packages to satisfy" was being unconditionally
+output for packages that could not be found. Fix the logic for choosing
+between the "binary packages" and "ebuilds" form of the message.
+
+This is a temporary stopgap as alluded to by me in the bug, but the
+tl;dr is that some entries in the `myopts` dict have "y"/"n" values
+whereas some are True/unset, and this discrepancy should be sorted out.
+
+[sam: Add NEWS and Fixes, although the change in that commit _shouldn't_
+have been wrong, it is because of a quirk for now...]
+
+[oskari: remove NEWS for backport]
+
+Bug: https://bugs.gentoo.org/909853
+Signed-off-by: Oskari Pirhonen 
+Closes: https://github.com/gentoo/portage/pull/1065
+Fixes: 0b21a5a392bd84c07b94373991f59108fbe98516
+Signed-off-by: Sam James 
+---
+ lib/_emerge/depgraph.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
+index a36ab6351..1aeae6257 100644
+--- a/lib/_emerge/depgraph.py
 b/lib/_emerge/depgraph.py
+@@ -6456,7 +6456,7 @@ class depgraph:
+ cp_exists = True
+ break
+ 
+-if self._frozen_config.myopts.get("--usepkgonly", "y"):
++if self._frozen_config.myopts.get("--usepkgonly", False):
+ writemsg(
+ f"\nemerge: there are no binary packages to satisfy 
{green(xinfo)}.\n",
+ noiselevel=-1,
+-- 
+2.41.0
+

diff --git a/sys-apps/portage/portage-3.0.48.1-r1.ebuild 
b/sys-apps/portage/portage-3.0.48.1-r2.ebuild
similarity index 98%
rename from sys-apps/portage/portage-3.0.48.1-r1.ebuild
rename to sys-apps/portage/portage-3.0.48.1-r2.ebuild
index 9e5f7353bb48..d86dba628ab6 100644
--- a/sys-apps/portage/portage-3.0.48.1-r1.ebuild
+++ b/sys-apps/portage/portage-3.0.48.1-r2.ebuild
@@ -93,6 +93,11 @@ PDEPEND="
)
 "
 
+# message patch used in 3.0.48.1 and 3.0.49 (bug 909853)
+PATCHES=(
+   "${FILESDIR}/depgraph.py-fix-no-ebuilds-binpkgs-message.patch"
+)
+
 distutils_enable_tests pytest
 
 pkg_pretend() {

diff --git a/sys-apps/portage/portage-3.0.49.ebuild 
b/sys-apps/portage/portage-3.0.49-r1.ebuild
similarity index 98%
rename from sys-apps/portage/portage-3.0.49.ebuild
rename to sys-apps/portage/portage-3.0.49-r1.ebuild
index f4767cd601e3..5375872b2127 100644
--- a/sys-apps/portage/portage-3.0.49.ebuild
+++ b/sys-apps/portage/portage-3.0.49-r1.ebuild
@@ -93,6 +93,11 @@ PDEPEND="
)
 "
 
+# message patch used in 3.0.48.1 and 3.0.49 (bug 909853)
+PATCHES=(
+   "${FILESDIR}/depgraph.py-fix-no-ebuilds-binpkgs-message.patch"
+)
+
 distutils_enable_tests pytest
 
 pkg_pretend() {



[gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/, sys-apps/portage/files/

2023-02-27 Thread Sam James
commit: 509d54b8b3f926ed718bd97920b4bcc7e2238f41
Author: Sam James  gentoo  org>
AuthorDate: Tue Feb 28 03:14:21 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Feb 28 03:14:21 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=509d54b8

sys-apps/portage: backport QA notice improvement

Signed-off-by: Sam James  gentoo.org>

 ...ge-3.0.45.1-qa-notice-configure-func-decl.patch | 29 ++
 ...0.45.1-r1.ebuild => portage-3.0.45.1-r2.ebuild} |  1 +
 2 files changed, 30 insertions(+)

diff --git 
a/sys-apps/portage/files/portage-3.0.45.1-qa-notice-configure-func-decl.patch 
b/sys-apps/portage/files/portage-3.0.45.1-qa-notice-configure-func-decl.patch
new file mode 100644
index ..a621ab65d719
--- /dev/null
+++ 
b/sys-apps/portage/files/portage-3.0.45.1-qa-notice-configure-func-decl.patch
@@ -0,0 +1,29 @@
+From eca90b6049a9ce42ec6868f64abcab403c9f4190 Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Tue, 28 Feb 2023 03:10:26 +
+Subject: [PATCH] install-qa-check.d/90config-impl-decl: prefix warning with
+ 'QA Notice'
+
+... so tinderboxes can pick it up more easily.
+
+Signed-off-by: Sam James 
+--- a/bin/install-qa-check.d/90config-impl-decl
 b/bin/install-qa-check.d/90config-impl-decl
+@@ -92,12 +92,13 @@ config_impl_decl_check() {
+   # Drop out early if no impl decls found (all the arrays are the same 
size)
+   [[ ${#files[@]} -eq 0 ]] && return
+ 
+-  eqawarn 'Found the following implicit function declarations in 
configure logs:'
++  eqawarn 'QA Notice: Found the following implicit function declarations 
in configure logs:'
+   for l in "${!files[@]}"; do
+   eqawarn "  ${files[l]}:${lines[l]} - ${funcs[l]}"
+   eqatag 'config.log-impl-decl' "line=${lines[l]}" 
"func=${funcs[l]}" "${files[l]}"
+   done
+   eqawarn 'Check that no features were accidentally disabled.'
++  eqawarn 'See https://wiki.gentoo.org/wiki/Modern_C_porting.'
+ }
+ 
+ config_impl_decl_check
+-- 
+2.39.2
+

diff --git a/sys-apps/portage/portage-3.0.45.1-r1.ebuild 
b/sys-apps/portage/portage-3.0.45.1-r2.ebuild
similarity index 99%
rename from sys-apps/portage/portage-3.0.45.1-r1.ebuild
rename to sys-apps/portage/portage-3.0.45.1-r2.ebuild
index c226bd813658..b345f442048e 100644
--- a/sys-apps/portage/portage-3.0.45.1-r1.ebuild
+++ b/sys-apps/portage/portage-3.0.45.1-r2.ebuild
@@ -90,6 +90,7 @@ pkg_pretend() {
 
 python_prepare_all() {
local PATCHES=(
+   "${FILESDIR}"/${P}-qa-notice-configure-func-decl.patch
)
 
distutils-r1_python_prepare_all



[gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/, sys-apps/portage/files/

2023-01-12 Thread Sam James
commit: 8ddb68918c66718723eb3a220dbce1e55f3444a7
Author: Sam James  gentoo  org>
AuthorDate: Fri Jan 13 03:47:38 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Jan 13 03:47:38 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ddb6891

sys-apps/portage: drop 3.0.38.1-r6, 3.0.42-r1

Signed-off-by: Sam James  gentoo.org>

 sys-apps/portage/Manifest  |   2 -
 .../portage/files/portage-3.0.38.1-xz-32-bit.patch |  90 ---
 sys-apps/portage/portage-3.0.38.1-r6.ebuild| 292 -
 sys-apps/portage/portage-3.0.42-r1.ebuild  | 292 -
 4 files changed, 676 deletions(-)

diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
index ae06f1d83f9e..4edbecddeb93 100644
--- a/sys-apps/portage/Manifest
+++ b/sys-apps/portage/Manifest
@@ -1,4 +1,2 @@
-DIST portage-3.0.38.1.tar.bz2 1116216 BLAKE2B 
d1cb4cc1924673d07ea7174ad0a84b3af977dd28ca659695d3e4014e4aa83b054acba82a160e7c0a8d3d4fbc3514bea619c3d720e450cb4890818e4b1bc1e43a
 SHA512 
1375565e936276fd6cfd2a4f6f782b91e234e973d6a998f2276a076dd165272bcf12067fd01e77b238f194eac69edf967bbe3ac62edc3701fe9375c693622ab9
 DIST portage-3.0.41.tar.bz2 1119737 BLAKE2B 
6c6d1fa11f16362505e321eb530d233cf73a7e1cc7dab2fc88ad40701c16835e08a7d16a408381e2f717ac5f48d46344e57b9b5296be4eba0a7583540c6a81aa
 SHA512 
046621ee59b2b1b374a63091028ed3462b1212960b337e8e034c739d5c51d5ae1e7b491c88940199e710081409e38778749a5c86576cf5bb6c59b1890dc892b5
-DIST portage-3.0.42.tar.bz2 1122793 BLAKE2B 
9df93e5ebeab415bd3b56e4e1771b628f5e3622d997aa8818e7ce42f77d60ffcb1807093dbc44852c5b359c632c11dcb7db6c026f2e7e224293e7ebb9e64b286
 SHA512 
f3d2bb5a1adc801c641ff14043b1617831c646a9432b2602e48343d8264850bb410a1666d646b97e224864d56cc7acae0aa044a7476384030063fb77e4323724
 DIST portage-3.0.43.tar.bz2 1139615 BLAKE2B 
e0f2646c3b6d5d49ec23038ad27507f7b9c0c03b848e82aff336896802c07b29344f924c4525d880f8895ba38f8116a7c79ecea51c794a433da9bd146efadc20
 SHA512 
b5e5339f3b5446f5c8f9b319e86e82d260e004b0606c3d0eadf09f91c95de0279c64c0fc4d7f6251ebd2cf7a65ba1ba37d752ed48b712e72b8c024835e747691

diff --git a/sys-apps/portage/files/portage-3.0.38.1-xz-32-bit.patch 
b/sys-apps/portage/files/portage-3.0.38.1-xz-32-bit.patch
deleted file mode 100644
index fa50fbab01fc..
--- a/sys-apps/portage/files/portage-3.0.38.1-xz-32-bit.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-https://github.com/gentoo/portage/commit/6a47cc7bcf49b7c17fdca31969b6d6aeff84332c
-https://github.com/gentoo/portage/commit/041da67db3a61d19fa5b287db4da9c51794af115
-https://github.com/gentoo/portage/commit/6834e464803b5ac98f8ab1bbca5379970b5bc6d9
-
-From 6a47cc7bcf49b7c17fdca31969b6d6aeff84332c Mon Sep 17 00:00:00 2001
-From: Sam James 
-Date: Mon, 17 Oct 2022 19:37:03 +0100
-Subject: [PATCH] xz: add workaround for < xz 5.3.3_alpha 32-bit issue
-
-With older versions of xz, xz -T0 will on 32-bit systems
-try to allocate too much memory and bail out.
-
-After discussing with upstream, we set --memlimit-compress=50% as a
-way to make things work with both older & newer versions. This limiting
-is essentially already present with >= 5.3.3_alpha as -T0 includes it.
-
-Note that we don't need to do this for decompression as it's automatic
-there for newer versions and older versions -Tn a no-op.
-
-Signed-off-by: Sam James 
 a/bin/ecompress
-+++ b/bin/ecompress
-@@ -128,7 +128,7 @@ if [[ ${PORTAGE_COMPRESS_FLAGS+set} != "set" ]] ; then
-   # See: https://bugs.gentoo.org/672916
-   # Setting '--rm' will remove the source files after a 
successful compression.
-   lz4)  PORTAGE_COMPRESS_FLAGS="-m --rm";;
--  xz)   PORTAGE_COMPRESS_FLAGS="-9 -T$(___makeopts_jobs)";;
-+  xz)   PORTAGE_COMPRESS_FLAGS="-9 -T$(___makeopts_jobs) 
--memlimit-compress=50%";;
-   zstd) PORTAGE_COMPRESS_FLAGS="-q --rm -T$(___makeopts_jobs)";;
-   esac
- fi
-
-From 041da67db3a61d19fa5b287db4da9c51794af115 Mon Sep 17 00:00:00 2001
-From: Sam James 
-Date: Mon, 17 Oct 2022 23:07:58 +0100
-Subject: [PATCH] xz: pass -q to xz
-
-Avoids noise from memlimit-compress.
-
-Signed-off-by: Sam James 
 a/bin/ecompress
-+++ b/bin/ecompress
-@@ -128,7 +128,7 @@ if [[ ${PORTAGE_COMPRESS_FLAGS+set} != "set" ]] ; then
-   # See: https://bugs.gentoo.org/672916
-   # Setting '--rm' will remove the source files after a 
successful compression.
-   lz4)  PORTAGE_COMPRESS_FLAGS="-m --rm";;
--  xz)   PORTAGE_COMPRESS_FLAGS="-9 -T$(___makeopts_jobs) 
--memlimit-compress=50%";;
-+  xz)   PORTAGE_COMPRESS_FLAGS="-9 -T$(___makeopts_jobs) 
--memlimit-compress=50% -q";;
-   zstd) PORTAGE_COMPRESS_FLAGS="-q --rm -T$(___makeopts_jobs)";;
-   esac
- fi
-
-From 6834e464803b5ac98f8ab1bbca5379970b5bc6d9 Mon Sep 17 00:00:00 2001
-From: Sam James 
-Date: Fri, 21 Oct 2022 02:32:17 +0100
-Subject: [PATCH] ecompress: don't set -9 for xz
-MIME-Version: 

[gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/, sys-apps/portage/files/

2022-11-29 Thread Sam James
commit: abc758f4cb662024ad88c17fefb68767785f271e
Author: Sam James  gentoo  org>
AuthorDate: Wed Nov 30 07:05:38 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Nov 30 07:05:38 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abc758f4

sys-apps/portage: backport patsub_replacement disablement for Bash 5.2

Quoting Portage's NEWS:
"""
* ebuild: Handle Bash 5.2's change in behavior which enables the shopt
  'patsub_replacement' by default. This is needed to avoid breaking existing
  working ebuilds. Future EAPIs will need to adjust the logic
  added by this change. See bug #881383.
"""

Bug: https://bugs.gentoo.org/881383
Signed-off-by: Sam James  gentoo.org>

 ...ortage-3.0.39-bash-5.2-patsub_replacement.patch | 49 ++
 ...e-3.0.39-r2.ebuild => portage-3.0.39-r3.ebuild} |  1 +
 2 files changed, 50 insertions(+)

diff --git 
a/sys-apps/portage/files/portage-3.0.39-bash-5.2-patsub_replacement.patch 
b/sys-apps/portage/files/portage-3.0.39-bash-5.2-patsub_replacement.patch
new file mode 100644
index ..90c678998a05
--- /dev/null
+++ b/sys-apps/portage/files/portage-3.0.39-bash-5.2-patsub_replacement.patch
@@ -0,0 +1,49 @@
+https://github.com/gentoo/portage/commit/69cac73ba0a7bcf2e2cff88c60d389895a550623
+
+From 69cac73ba0a7bcf2e2cff88c60d389895a550623 Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Wed, 30 Nov 2022 01:09:12 +
+Subject: [PATCH] ebuild.sh: disable patsub_replacement in Bash 5.2
+
+patsub_replacement is a new option in bash-5.2 that is also default-on
+in that release. The default value is not gated by BASH_COMPAT (see bug 
#881383),
+hence we need to disable it for older Bashes to avoid behaviour changes in 
ebuilds
+and eclasses.
+
+Thanks to Kerin for both raising this & being persistent with trying
+to get Bash 5.2 to be suitable for use in Gentoo.
+
+Bug: https://bugs.gentoo.org/881383
+Thanks-to: Kerin Millar 
+Signed-off-by: Sam James 
+--- a/bin/ebuild.sh
 b/bin/ebuild.sh
+@@ -18,6 +18,7 @@ source "${PORTAGE_BIN_PATH}/isolated-functions.sh" || exit 1
+ # used instead.
+ __check_bash_version() {
+   # Figure out which min version of bash we require.
++  # Adjust patsub_replacement logic below on new EAPI!
+   local maj min
+   if ___eapi_bash_3_2 ; then
+   maj=3 min=2
+@@ -50,6 +51,19 @@ __check_bash_version() {
+   if ___eapi_bash_3_2 && [[ ${BASH_VERSINFO[0]} -gt 3 ]] ; then
+   shopt -s compat32
+   fi
++
++  # patsub_replacement is a new option in bash-5.2 that is also default-on
++  # in that release. The default value is not gated by BASH_COMPAT (see 
bug #881383),
++  # hence we need to disable it for older Bashes to avoid behaviour 
changes in ebuilds
++  # and eclasses.
++  #
++  # New EAPI note: a newer EAPI (after 8) may well adopt Bash 5.2 as its 
minimum version.
++  # If it does, this logic will need to be adjusted to only disable 
patsub_replacement
++  # for < ${new_api}!
++  if (( BASH_VERSINFO[0] >= 6 || ( BASH_VERSINFO[0] == 5 && 
BASH_VERSINFO[1] >= 2 ) )) ; then
++  shopt -u patsub_replacement
++  fi
++
+ }
+ __check_bash_version
+ 
+

diff --git a/sys-apps/portage/portage-3.0.39-r2.ebuild 
b/sys-apps/portage/portage-3.0.39-r3.ebuild
similarity index 99%
rename from sys-apps/portage/portage-3.0.39-r2.ebuild
rename to sys-apps/portage/portage-3.0.39-r3.ebuild
index 430e100baf73..a98bde44683f 100644
--- a/sys-apps/portage/portage-3.0.39-r2.ebuild
+++ b/sys-apps/portage/portage-3.0.39-r3.ebuild
@@ -86,6 +86,7 @@ pkg_pretend() {
 python_prepare_all() {
local PATCHES=(
"${FILESDIR}"/${P}-implicit-func-decls-no-fatal.patch
+   "${FILESDIR}"/${P}-bash-5.2-patsub_replacement.patch
)
 
distutils-r1_python_prepare_all



[gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/, sys-apps/portage/files/

2022-11-20 Thread Sam James
commit: 1d184f1a99a9bbf53b1fc0f288300ed1979099f2
Author: Sam James  gentoo  org>
AuthorDate: Sun Nov 20 23:36:46 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Nov 20 23:37:12 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d184f1a

sys-apps/portage: make Portage less noisy on implicit func. decls for now

We will undo this again soon, but we need fewer high profiles to be
broken first, as it impacts wider testing & bug finding.

Bug: https://bugs.gentoo.org/870412
Signed-off-by: Sam James  gentoo.org>

 ...rtage-3.0.39-implicit-func-decls-no-fatal.patch | 34 ++
 ...tage-3.0.39.ebuild => portage-3.0.39-r1.ebuild} |  1 +
 2 files changed, 35 insertions(+)

diff --git 
a/sys-apps/portage/files/portage-3.0.39-implicit-func-decls-no-fatal.patch 
b/sys-apps/portage/files/portage-3.0.39-implicit-func-decls-no-fatal.patch
new file mode 100644
index ..4a4e68f2690a
--- /dev/null
+++ b/sys-apps/portage/files/portage-3.0.39-implicit-func-decls-no-fatal.patch
@@ -0,0 +1,34 @@
+https://github.com/gentoo/portage/commit/0fdbbbdb5a80e331adf701f2b2c1f096695447c4
+
+From 0fdbbbdb5a80e331adf701f2b2c1f096695447c4 Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Sun, 20 Nov 2022 23:32:08 +
+Subject: [PATCH] install-qa-check.d/90gcc-warnings: don't make implicit func
+ decls fatal for now
+
+We need to do this at some point (as Clang 16 and GCC 14 are doing it, and
+they indicate runtime problems anyway), but there's too much breakage for now.
+
+We did find some extra bugs though. The main issue is too much high-profile
+stuff breaks rather than the total number of bugs, wrt Portage behaviour
+changing being suitable or not.
+
+Bug: https://bugs.gentoo.org/870412
+Signed-off-by: Sam James 
+--- a/bin/install-qa-check.d/90gcc-warnings
 b/bin/install-qa-check.d/90gcc-warnings
+@@ -153,9 +153,10 @@ gcc_warn_check() {
+   #   always_overflow=yes
+   #fi
+ 
+-  if [[ ${f} == *'[-Wimplicit-function-declaration]'* ]] 
; then
+-  implicit_func_decl=yes
+-  fi
++  # Disabled for now because too many failures. bug 
#870412.
++  #if [[ ${f} == *'[-Wimplicit-function-declaration]'* ]] 
; then
++  #   implicit_func_decl=yes
++  #fi
+ 
+   if [[ ${always_overflow} = yes || ${implicit_func_decl} 
= yes ]] ; then
+   eerror
+

diff --git a/sys-apps/portage/portage-3.0.39.ebuild 
b/sys-apps/portage/portage-3.0.39-r1.ebuild
similarity index 99%
rename from sys-apps/portage/portage-3.0.39.ebuild
rename to sys-apps/portage/portage-3.0.39-r1.ebuild
index 48ca5c0728ae..040a60847373 100644
--- a/sys-apps/portage/portage-3.0.39.ebuild
+++ b/sys-apps/portage/portage-3.0.39-r1.ebuild
@@ -85,6 +85,7 @@ pkg_pretend() {
 
 python_prepare_all() {
local PATCHES=(
+   "${FILESDIR}"/${P}-implicit-func-decls-no-fatal.patch
)
 
distutils-r1_python_prepare_all



[gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/, sys-apps/portage/files/

2022-11-19 Thread Sam James
commit: 00c689f4303e4dc12531af849a39d34ac7c2f6b8
Author: Sam James  gentoo  org>
AuthorDate: Sun Nov 20 02:45:55 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Nov 20 02:46:42 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00c689f4

sys-apps/portage: backport xz 32-bit fixes

Fixes issues on 32-bit systems with -Tn.

Note that we exclude the binpkg compression probe bits as the
parallel parts there aren't in 3.0.38.1.

Signed-off-by: Sam James  gentoo.org>

 .../portage/files/portage-3.0.38.1-xz-32-bit.patch | 90 ++
 ...0.38.1-r2.ebuild => portage-3.0.38.1-r3.ebuild} |  1 +
 2 files changed, 91 insertions(+)

diff --git a/sys-apps/portage/files/portage-3.0.38.1-xz-32-bit.patch 
b/sys-apps/portage/files/portage-3.0.38.1-xz-32-bit.patch
new file mode 100644
index ..fa50fbab01fc
--- /dev/null
+++ b/sys-apps/portage/files/portage-3.0.38.1-xz-32-bit.patch
@@ -0,0 +1,90 @@
+https://github.com/gentoo/portage/commit/6a47cc7bcf49b7c17fdca31969b6d6aeff84332c
+https://github.com/gentoo/portage/commit/041da67db3a61d19fa5b287db4da9c51794af115
+https://github.com/gentoo/portage/commit/6834e464803b5ac98f8ab1bbca5379970b5bc6d9
+
+From 6a47cc7bcf49b7c17fdca31969b6d6aeff84332c Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Mon, 17 Oct 2022 19:37:03 +0100
+Subject: [PATCH] xz: add workaround for < xz 5.3.3_alpha 32-bit issue
+
+With older versions of xz, xz -T0 will on 32-bit systems
+try to allocate too much memory and bail out.
+
+After discussing with upstream, we set --memlimit-compress=50% as a
+way to make things work with both older & newer versions. This limiting
+is essentially already present with >= 5.3.3_alpha as -T0 includes it.
+
+Note that we don't need to do this for decompression as it's automatic
+there for newer versions and older versions -Tn a no-op.
+
+Signed-off-by: Sam James 
+--- a/bin/ecompress
 b/bin/ecompress
+@@ -128,7 +128,7 @@ if [[ ${PORTAGE_COMPRESS_FLAGS+set} != "set" ]] ; then
+   # See: https://bugs.gentoo.org/672916
+   # Setting '--rm' will remove the source files after a 
successful compression.
+   lz4)  PORTAGE_COMPRESS_FLAGS="-m --rm";;
+-  xz)   PORTAGE_COMPRESS_FLAGS="-9 -T$(___makeopts_jobs)";;
++  xz)   PORTAGE_COMPRESS_FLAGS="-9 -T$(___makeopts_jobs) 
--memlimit-compress=50%";;
+   zstd) PORTAGE_COMPRESS_FLAGS="-q --rm -T$(___makeopts_jobs)";;
+   esac
+ fi
+
+From 041da67db3a61d19fa5b287db4da9c51794af115 Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Mon, 17 Oct 2022 23:07:58 +0100
+Subject: [PATCH] xz: pass -q to xz
+
+Avoids noise from memlimit-compress.
+
+Signed-off-by: Sam James 
+--- a/bin/ecompress
 b/bin/ecompress
+@@ -128,7 +128,7 @@ if [[ ${PORTAGE_COMPRESS_FLAGS+set} != "set" ]] ; then
+   # See: https://bugs.gentoo.org/672916
+   # Setting '--rm' will remove the source files after a 
successful compression.
+   lz4)  PORTAGE_COMPRESS_FLAGS="-m --rm";;
+-  xz)   PORTAGE_COMPRESS_FLAGS="-9 -T$(___makeopts_jobs) 
--memlimit-compress=50%";;
++  xz)   PORTAGE_COMPRESS_FLAGS="-9 -T$(___makeopts_jobs) 
--memlimit-compress=50% -q";;
+   zstd) PORTAGE_COMPRESS_FLAGS="-q --rm -T$(___makeopts_jobs)";;
+   esac
+ fi
+
+From 6834e464803b5ac98f8ab1bbca5379970b5bc6d9 Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Fri, 21 Oct 2022 02:32:17 +0100
+Subject: [PATCH] ecompress: don't set -9 for xz
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From xz(1):
+"""
+The differences between the presets are more significant than with gzip(1) and 
bzip2(1).  The selected compression settings determine the memory requirements 
of the decompressor, thus  us‐
+ing  a too high preset level might make it painful to decompress the file on 
an old system with little RAM.  Specifically, it's not a good idea to blindly 
use -9 for everything like it of‐
+ten is with gzip(1) and bzip2(1).
+[...]
+-7 ... -9
+ These are like -6 but with higher compressor and decompressor memory 
requirements.  These are useful only when compressing files bigger than 8 MiB, 
16 MiB, and 32 MiB, respectively.
+[...]
+•  DictSize  is  the  LZMA2 dictionary size.  It is waste of memory to use a 
dictionary bigger than the size of the uncompressed file.  This is why it is 
good to avoid using the presets -7
+... -9 when there's no real need for them.  At -6 and lower, the amount of 
memory wasted is usually low enough to not matter.
+"""
+
+Most things that ecompress touches are tiny (<32MB certainly). I made the
+mistake the man page warngs about -- don't assume it's a good idea just
+because of gzip & bzip2, and that's exactly what I did!
+
+Signed-off-by: Sam James 
+--- a/bin/ecompress
 b/bin/ecompress
+@@ -128,7 +128,7 @@ if [[ ${PORTAGE_COMPRESS_FLAGS+set} != "set" ]] ; then
+   # See: 

[gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/, sys-apps/portage/files/

2022-10-25 Thread Mike Gilbert
commit: c046ee45bcc9d2e6164b70f73acf7074e03d31f1
Author: Mike Gilbert  gentoo  org>
AuthorDate: Wed Oct 26 00:18:33 2022 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Wed Oct 26 00:20:24 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c046ee45

sys-apps/portage: update tmpfiles.d to create /tmp/portage

This is common alternate location for PORTAGE_TMPDIR.

Bug: https://bugs.gentoo.org/853283
Signed-off-by: Mike Gilbert  gentoo.org>

 sys-apps/portage/files/portage-tmpdir.conf   | 1 +
 .../portage/{portage-3.0.38.1-r1.ebuild => portage-3.0.38.1-r2.ebuild}   | 0
 2 files changed, 1 insertion(+)

diff --git a/sys-apps/portage/files/portage-tmpdir.conf 
b/sys-apps/portage/files/portage-tmpdir.conf
index 63a9bcf07097..4f6e20ccb521 100644
--- a/sys-apps/portage/files/portage-tmpdir.conf
+++ b/sys-apps/portage/files/portage-tmpdir.conf
@@ -1 +1,2 @@
 d /var/tmp/portage 0775 portage portage
+d /tmp/portage 0775 portage portage

diff --git a/sys-apps/portage/portage-3.0.38.1-r1.ebuild 
b/sys-apps/portage/portage-3.0.38.1-r2.ebuild
similarity index 100%
rename from sys-apps/portage/portage-3.0.38.1-r1.ebuild
rename to sys-apps/portage/portage-3.0.38.1-r2.ebuild



[gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/, sys-apps/portage/files/

2022-10-20 Thread Mike Gilbert
commit: 12c88ee1152d4745cfb14aaeb7c768786e66a0b5
Author: Mike Gilbert  gentoo  org>
AuthorDate: Thu Oct 20 15:48:36 2022 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Thu Oct 20 15:48:42 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12c88ee1

sys-apps/portage: drop 3.0.30-r3, 3.0.30-r5, 3.0.37

Signed-off-by: Mike Gilbert  gentoo.org>

 sys-apps/portage/Manifest  |   2 -
 sys-apps/portage/files/3.0.30-loong-abis.patch | 133 --
 sys-apps/portage/files/3.0.30-qa-checks.patch  | 137 --
 ...revert-default-enable-soname-dependencies.patch |  52 
 .../portage/files/3.0.30-revert-run-warn.patch |  64 -
 sys-apps/portage/portage-3.0.30-r3.ebuild  | 274 
 sys-apps/portage/portage-3.0.30-r5.ebuild  | 277 -
 sys-apps/portage/portage-3.0.37.ebuild | 273 
 8 files changed, 1212 deletions(-)

diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
index 83bee2aad096..a834b938f627 100644
--- a/sys-apps/portage/Manifest
+++ b/sys-apps/portage/Manifest
@@ -1,3 +1 @@
-DIST portage-3.0.30.tar.bz2 1157316 BLAKE2B 
56939618f4915f77dca6bb85d4a7cf98e50133b524f68a0b192c0a928ca209a0cb944c174dda78f1b5a071c02c190857ea8a7ecd514301c45e897b302542f52e
 SHA512 
accec770f63180b6d5d4cd08ef50f0cd01aa5701104156523f1a735d8ec3313a3b513629a33d8863285736515b6a3d56fc21498404da3a0f89b196655a98db7d
-DIST portage-3.0.37.tar.bz2 1113712 BLAKE2B 
531ff47c3a5cd45b4b33c83d96cedfd91750ad693755361d41632d2bb4352268a849accc5b452ad77106ff1ec625b3b4fea12da816f2c9675288148856b5ce09
 SHA512 
2eab8486d4a580ba0d91833b5306a4b8e11a1b120f44adbb81b8dc3a2aa1e6e5dd21e280471f3a74d5ac52ee00a3019c1d0b5621f5c9d523366ff29920400624
 DIST portage-3.0.38.1.tar.bz2 1116216 BLAKE2B 
d1cb4cc1924673d07ea7174ad0a84b3af977dd28ca659695d3e4014e4aa83b054acba82a160e7c0a8d3d4fbc3514bea619c3d720e450cb4890818e4b1bc1e43a
 SHA512 
1375565e936276fd6cfd2a4f6f782b91e234e973d6a998f2276a076dd165272bcf12067fd01e77b238f194eac69edf967bbe3ac62edc3701fe9375c693622ab9

diff --git a/sys-apps/portage/files/3.0.30-loong-abis.patch 
b/sys-apps/portage/files/3.0.30-loong-abis.patch
deleted file mode 100644
index 7558107570cd..
--- a/sys-apps/portage/files/3.0.30-loong-abis.patch
+++ /dev/null
@@ -1,133 +0,0 @@
-From f6cdba7689ea423245a232cc13103dd988363845 Mon Sep 17 00:00:00 2001
-From: WANG Xuerui 
-Date: Mon, 9 Aug 2021 15:31:25 +0800
-Subject: [PATCH] multilib_category.py: recognize LoongArch ABIs
-
-Add its ELF machine number constant as well. The Gentoo ARCH is "loong";
-all six ABIs defined in the LoongArch ELF psABI spec [1] are supported.
-The upstream binutils port currently implements an earlier version of the
-spec [2]; the ILP32 ABIs are never fully implemented so far, and the
-value for LP64D is coincidentally the same, so the code here stays
-compatible.
-
-This is preparatory work towards a port to the LoongArch architecture,
-which is the new RISC architecture from Loongson Corporation after
-switching away from MIPS.
-
-[1]: 
https://github.com/loongson/LoongArch-Documentation/blob/23d53fe146a4/docs/LoongArch-ELF-ABI-EN.adoc
-[2]: 
https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=include/elf/loongarch.h;h=b4d801ae9bd5a6c4562ca6b1cbae6e6d45d6c704;hb=HEAD
-
-Signed-off-by: WANG Xuerui 
-Closes: https://github.com/gentoo/portage/pull/740
-Signed-off-by: Sam James 

- lib/portage/dep/soname/multilib_category.py | 26 +
- lib/portage/util/elf/constants.py   |  9 +++
- 2 files changed, 35 insertions(+)
-
-diff --git a/lib/portage/dep/soname/multilib_category.py 
b/lib/portage/dep/soname/multilib_category.py
-index ab855d339..567b1d32e 100644
 a/lib/portage/dep/soname/multilib_category.py
-+++ b/lib/portage/dep/soname/multilib_category.py
-@@ -11,6 +11,7 @@
- # arm_{32,64}
- # hppa_{32,64}
- # ia_{32,64}
-+# loong_{ilp32s,ilp32f,ilp32d,lp64s,lp64f,lp64d}
- # m68k_{32,64}
- # mips_{eabi32,eabi64,n32,n64,o32,o64}
- # ppc_{32,64}
-@@ -37,6 +38,13 @@ from portage.util.elf.constants import (
- EF_MIPS_ABI2,
- EF_RISCV_FLOAT_ABI_DOUBLE,
- EF_RISCV_RVC,
-+EF_LOONGARCH_ABI_LP64_SOFT_FLOAT,
-+EF_LOONGARCH_ABI_LP64_SINGLE_FLOAT,
-+EF_LOONGARCH_ABI_LP64_DOUBLE_FLOAT,
-+EF_LOONGARCH_ABI_ILP32_SOFT_FLOAT,
-+EF_LOONGARCH_ABI_ILP32_SINGLE_FLOAT,
-+EF_LOONGARCH_ABI_ILP32_DOUBLE_FLOAT,
-+EF_LOONGARCH_ABI_MASK,
- ELFCLASS32,
- ELFCLASS64,
- EM_386,
-@@ -46,6 +54,7 @@ from portage.util.elf.constants import (
- EM_ARM,
- EM_ALTERA_NIOS2,
- EM_IA_64,
-+EM_LOONGARCH,
- EM_MIPS,
- EM_PARISC,
- EM_PPC,
-@@ -71,6 +80,7 @@ _machine_prefix_map = {
- EM_ALTERA_NIOS2: "nios2",
- EM_ARM: "arm",
- EM_IA_64: "ia64",
-+EM_LOONGARCH: "loong",
- EM_MIPS: "mips",
- EM_PARISC: "hppa",
- EM_PPC: "ppc",
-@@ -84,6 +94,15 @@ 

[gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/, sys-apps/portage/files/

2022-04-24 Thread WANG Xuerui
commit: cb587e35d0ef9e928d72c23645446bd5025183e3
Author: WANG Xuerui  gentoo  org>
AuthorDate: Sun Apr 24 13:26:23 2022 +
Commit: WANG Xuerui  gentoo  org>
CommitDate: Sun Apr 24 16:43:16 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb587e35

sys-apps/portage: add support for recognizing LoongArch ABIs

See: https://github.com/gentoo/gentoo/pull/25183
Signed-off-by: WANG Xuerui  gentoo.org>

 sys-apps/portage/files/3.0.30-loong-abis.patch | 133 
 sys-apps/portage/portage-3.0.30-r5.ebuild  | 277 +
 2 files changed, 410 insertions(+)

diff --git a/sys-apps/portage/files/3.0.30-loong-abis.patch 
b/sys-apps/portage/files/3.0.30-loong-abis.patch
new file mode 100644
index ..7558107570cd
--- /dev/null
+++ b/sys-apps/portage/files/3.0.30-loong-abis.patch
@@ -0,0 +1,133 @@
+From f6cdba7689ea423245a232cc13103dd988363845 Mon Sep 17 00:00:00 2001
+From: WANG Xuerui 
+Date: Mon, 9 Aug 2021 15:31:25 +0800
+Subject: [PATCH] multilib_category.py: recognize LoongArch ABIs
+
+Add its ELF machine number constant as well. The Gentoo ARCH is "loong";
+all six ABIs defined in the LoongArch ELF psABI spec [1] are supported.
+The upstream binutils port currently implements an earlier version of the
+spec [2]; the ILP32 ABIs are never fully implemented so far, and the
+value for LP64D is coincidentally the same, so the code here stays
+compatible.
+
+This is preparatory work towards a port to the LoongArch architecture,
+which is the new RISC architecture from Loongson Corporation after
+switching away from MIPS.
+
+[1]: 
https://github.com/loongson/LoongArch-Documentation/blob/23d53fe146a4/docs/LoongArch-ELF-ABI-EN.adoc
+[2]: 
https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=include/elf/loongarch.h;h=b4d801ae9bd5a6c4562ca6b1cbae6e6d45d6c704;hb=HEAD
+
+Signed-off-by: WANG Xuerui 
+Closes: https://github.com/gentoo/portage/pull/740
+Signed-off-by: Sam James 
+---
+ lib/portage/dep/soname/multilib_category.py | 26 +
+ lib/portage/util/elf/constants.py   |  9 +++
+ 2 files changed, 35 insertions(+)
+
+diff --git a/lib/portage/dep/soname/multilib_category.py 
b/lib/portage/dep/soname/multilib_category.py
+index ab855d339..567b1d32e 100644
+--- a/lib/portage/dep/soname/multilib_category.py
 b/lib/portage/dep/soname/multilib_category.py
+@@ -11,6 +11,7 @@
+ # arm_{32,64}
+ # hppa_{32,64}
+ # ia_{32,64}
++# loong_{ilp32s,ilp32f,ilp32d,lp64s,lp64f,lp64d}
+ # m68k_{32,64}
+ # mips_{eabi32,eabi64,n32,n64,o32,o64}
+ # ppc_{32,64}
+@@ -37,6 +38,13 @@ from portage.util.elf.constants import (
+ EF_MIPS_ABI2,
+ EF_RISCV_FLOAT_ABI_DOUBLE,
+ EF_RISCV_RVC,
++EF_LOONGARCH_ABI_LP64_SOFT_FLOAT,
++EF_LOONGARCH_ABI_LP64_SINGLE_FLOAT,
++EF_LOONGARCH_ABI_LP64_DOUBLE_FLOAT,
++EF_LOONGARCH_ABI_ILP32_SOFT_FLOAT,
++EF_LOONGARCH_ABI_ILP32_SINGLE_FLOAT,
++EF_LOONGARCH_ABI_ILP32_DOUBLE_FLOAT,
++EF_LOONGARCH_ABI_MASK,
+ ELFCLASS32,
+ ELFCLASS64,
+ EM_386,
+@@ -46,6 +54,7 @@ from portage.util.elf.constants import (
+ EM_ARM,
+ EM_ALTERA_NIOS2,
+ EM_IA_64,
++EM_LOONGARCH,
+ EM_MIPS,
+ EM_PARISC,
+ EM_PPC,
+@@ -71,6 +80,7 @@ _machine_prefix_map = {
+ EM_ALTERA_NIOS2: "nios2",
+ EM_ARM: "arm",
+ EM_IA_64: "ia64",
++EM_LOONGARCH: "loong",
+ EM_MIPS: "mips",
+ EM_PARISC: "hppa",
+ EM_PPC: "ppc",
+@@ -84,6 +94,15 @@ _machine_prefix_map = {
+ EM_X86_64: "x86",
+ }
+ 
++_loong_abi_map = {
++EF_LOONGARCH_ABI_LP64_SOFT_FLOAT: "lp64s",
++EF_LOONGARCH_ABI_LP64_SINGLE_FLOAT: "lp64f",
++EF_LOONGARCH_ABI_LP64_DOUBLE_FLOAT: "lp64d",
++EF_LOONGARCH_ABI_ILP32_SOFT_FLOAT: "ilp32s",
++EF_LOONGARCH_ABI_ILP32_SINGLE_FLOAT: "ilp32f",
++EF_LOONGARCH_ABI_ILP32_DOUBLE_FLOAT: "ilp32d",
++}
++
+ _mips_abi_map = {
+ E_MIPS_ABI_EABI32: "eabi32",
+ E_MIPS_ABI_EABI64: "eabi64",
+@@ -92,6 +111,12 @@ _mips_abi_map = {
+ }
+ 
+ 
++def _compute_suffix_loong(elf_header):
++
++loong_abi = elf_header.e_flags & EF_LOONGARCH_ABI_MASK
++return _loong_abi_map.get(loong_abi)
++
++
+ def _compute_suffix_mips(elf_header):
+ 
+ name = None
+@@ -136,6 +161,7 @@ def _compute_suffix_riscv(elf_header):
+ 
+ 
+ _specialized_funcs = {
++"loong": _compute_suffix_loong,
+ "mips": _compute_suffix_mips,
+ "riscv": _compute_suffix_riscv,
+ }
+diff --git a/lib/portage/util/elf/constants.py 
b/lib/portage/util/elf/constants.py
+index d86b39483..19b72cfa1 100644
+--- a/lib/portage/util/elf/constants.py
 b/lib/portage/util/elf/constants.py
+@@ -36,6 +36,7 @@ EM_X86_64 = 62
+ EM_ALTERA_NIOS2 = 113
+ EM_AARCH64 = 183
+ EM_RISCV = 243
++EM_LOONGARCH = 258
+ EM_ALPHA = 0x9026
+ 
+ E_ENTRY = 24
+@@ -52,3 +53,11 @@ EF_RISCV_FLOAT_ABI_SOFT = 0x
+ EF_RISCV_FLOAT_ABI_SINGLE = 0x0002
+ EF_RISCV_FLOAT_ABI_DOUBLE = 0x0004
+ EF_RISCV_FLOAT_ABI_QUAD = 0x0006
++
++EF_LOONGARCH_ABI_LP64_SOFT_FLOAT = 

[gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/, sys-apps/portage/files/

2022-04-15 Thread Sam James
commit: bb044a3dd58f5d6ac0fa66dfe07daf3c6773480e
Author: Sam James  gentoo  org>
AuthorDate: Fri Apr 15 08:35:57 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Apr 15 08:36:54 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb044a3d

sys-apps/portage: backport new QA checks; /run warning removal

portage.git is currently undergoing a fair bit of refactoring
and other non-trivial changes, so let's backport some useful bits.

- Backport QA checks (eend w/o ebegin, ebegin w/o eend, /var/tmp install dir)
- Drop obsolete /run-not-mounted warning

Bug: https://bugs.gentoo.org/835824
Bug: https://bugs.gentoo.org/835823
Bug: https://bugs.gentoo.org/832853
Bug: https://bugs.gentoo.org/493154
Bug: https://bugs.gentoo.org/837536
Signed-off-by: Sam James  gentoo.org>

 sys-apps/portage/files/3.0.30-qa-checks.patch  | 137 ++
 .../portage/files/3.0.30-revert-run-warn.patch |  64 +
 sys-apps/portage/portage-3.0.30-r2.ebuild  | 276 +
 3 files changed, 477 insertions(+)

diff --git a/sys-apps/portage/files/3.0.30-qa-checks.patch 
b/sys-apps/portage/files/3.0.30-qa-checks.patch
new file mode 100644
index ..19290d352f49
--- /dev/null
+++ b/sys-apps/portage/files/3.0.30-qa-checks.patch
@@ -0,0 +1,137 @@
+Backport a bunch of QA notice changes so tinderboxes etc can pick them up,
+given portage.git is currently undergoing a fair bit of refactoring.
+
+https://github.com/gentoo/portage/commit/7b44116b4a669a49e51e5a495ab62a25229e18e4
+https://github.com/gentoo/portage/commit/8ded447a1d194ad0190a174f7bb330417685d861
+https://github.com/gentoo/portage/commit/23c4a45827fccebb969d5130ccc234ed3d1a9b35
+https://github.com/gentoo/portage/commit/3994939f982f22afbc7aaf3b8eca6680ad85c617
+
+From: Sam James 
+Date: Sat, 2 Apr 2022 05:10:31 +0100
+Subject: [PATCH] bin/install-qa-check.d/95empty-dirs: update message for EAPI
+ 8
+
+Portage changed the default for >= EAPI 8 ("newer EAPIs" at the time, not
+actually specific to 8) in bfda0d2bd4ba03a4e77f488ec3fd4f9c6c351662 to
+enable FEATURES="strict-keepdir".
+
+Signed-off-by: Sam James 
+Closes: https://github.com/gentoo/portage/pull/802
+Signed-off-by: Sam James 
+--- a/bin/install-qa-check.d/95empty-dirs
 b/bin/install-qa-check.d/95empty-dirs
+@@ -33,7 +33,7 @@ find_empty_dirs() {
+   done
+   eqawarn
+   eqawarn "If those directories need to be preserved, please make 
sure to create"
+-  eqawarn "or mark them for keeping using 'keepdir'. Future 
versions of Portage"
++  eqawarn "or mark them for keeping using 'keepdir'. Portage for 
>= EAPI 8 ebuilds"
+   eqawarn "will strip empty directories from installation image."
+   fi
+ }
+
+
+
+From: Sam James 
+Date: Sun, 10 Apr 2022 17:51:02 +0100
+Subject: [PATCH] install-qa-check.d/20runtime-directories: warn on /var/tmp
+ too
+
+Bug: https://bugs.gentoo.org/493154
+Bug: https://bugs.gentoo.org/837536
+Signed-off-by: Sam James 
+--- a/bin/install-qa-check.d/20runtime-directories
 b/bin/install-qa-check.d/20runtime-directories
+@@ -1,10 +1,10 @@
+ # Check for directories that need to be created at runtime
+ 
+ runtime_dir_check() {
+-  # It's ok create these directories, but not to install into them. 
#493154
++  # It's ok to create these directories, but not to install into them. 
#493154
+   # TODO: We should add var/lib to this list.
+   local x f=
+-  for x in var/cache var/lock var/run run ; do
++  for x in var/cache var/lock var/run var/tmp run ; do
+   if [[ ! -L ${ED}/${x} && -d ${ED}/${x} ]] ; then
+   if [[ -z $(find "${ED}/${x}" -prune -empty) ]] ; then
+   f+=$(cd "${ED}"; find "${x}" -printf '  %p\n')
+
+From: Thomas Bracht Laumann Jespersen 
+Date: Mon, 11 Apr 2022 15:46:06 +0200
+Subject: [PATCH] eend: Output QA warning if ebegin has not been called
+
+The assumption here is that ebegin-eend aren't nested.
+
+Closes: https://bugs.gentoo.org/835824
+Signed-off-by: Thomas Bracht Laumann Jespersen 
+Closes: https://github.com/gentoo/portage/pull/807
+Signed-off-by: Sam James 
+--- a/bin/isolated-functions.sh
 b/bin/isolated-functions.sh
+@@ -339,6 +339,7 @@ ebegin() {
+   [[ ${RC_ENDCOL} == "yes" ]] && echo >&2
+   LAST_E_LEN=$(( 3 + ${#RC_INDENTATION} + ${#msg} ))
+   LAST_E_CMD="ebegin"
++  EBEGIN_EEND=1
+   return 0
+ }
+ 
+@@ -367,6 +368,11 @@ __eend() {
+ 
+ eend() {
+   [[ -n $1 ]] || eqawarn "QA Notice: eend called without first argument"
++  if [[ -v EBEGIN_EEND ]] ; then
++  unset EBEGIN_EEND
++  else
++  eqawarn "QA Notice: eend called without preceding ebegin 
(phase: ${EBUILD_PHASE})"
++  fi
+   local retval=${1:-0}
+   shift
+ 
+
+From: Thomas Bracht Laumann Jespersen 
+Date: Tue, 12 Apr 2022 10:59:11 +0200
+Subject: [PATCH] ebegin: Output QA warning if call to eend is 

[gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/, sys-apps/portage/files/

2018-01-01 Thread Mike Gilbert
commit: e5f430619b1dbdce1d9ba7836db55fee065798dd
Author: Mike Gilbert  gentoo  org>
AuthorDate: Sun Dec 31 15:18:27 2017 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Tue Jan  2 02:48:06 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5f43061

sys-apps/portage: exclude /var/tmp/ccache from tmpfiles cleanup

By default, systemd-tmpfiles removes files older than 30 days from /var/tmp.
The default portage config sets CCACHE_DIR=/var/tmp/ccache.

Bug: https://bugs.gentoo.org/490676#c14
Package-Manager: Portage-2.3.19_p3, Repoman-2.3.6_p37

 sys-apps/portage/files/portage-ccache.conf   | 2 ++
 sys-apps/portage/{portage-2.3.19.ebuild => portage-2.3.19-r1.ebuild} | 4 +++-
 sys-apps/portage/portage-.ebuild | 4 +++-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/sys-apps/portage/files/portage-ccache.conf 
b/sys-apps/portage/files/portage-ccache.conf
new file mode 100644
index 000..37857fde319
--- /dev/null
+++ b/sys-apps/portage/files/portage-ccache.conf
@@ -0,0 +1,2 @@
+# Prevent ccache files from being cleaned
+x /var/tmp/ccache

diff --git a/sys-apps/portage/portage-2.3.19.ebuild 
b/sys-apps/portage/portage-2.3.19-r1.ebuild
similarity index 99%
rename from sys-apps/portage/portage-2.3.19.ebuild
rename to sys-apps/portage/portage-2.3.19-r1.ebuild
index b4f03d91d2d..1c78b4a699f 100644
--- a/sys-apps/portage/portage-2.3.19.ebuild
+++ b/sys-apps/portage/portage-2.3.19-r1.ebuild
@@ -10,7 +10,7 @@ PYTHON_COMPAT=(
 )
 PYTHON_REQ_USE='bzip2(+),threads(+)'
 
-inherit distutils-r1
+inherit distutils-r1 tmpfiles
 
 DESCRIPTION="Portage is the package management and distribution system for 
Gentoo"
 HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage;
@@ -203,6 +203,8 @@ python_install_all() {
esetup.py "${targets[@]}"
fi
 
+   dotmpfiles "${FILESDIR}"/portage-ccache.conf
+
# Due to distutils/python-exec limitations
# these must be installed to /usr/bin.
local sbin_relocations='archive-conf dispatch-conf emaint env-update 
etc-update fixpackages regenworld'

diff --git a/sys-apps/portage/portage-.ebuild 
b/sys-apps/portage/portage-.ebuild
index adb4f2b5bde..e025371418a 100644
--- a/sys-apps/portage/portage-.ebuild
+++ b/sys-apps/portage/portage-.ebuild
@@ -10,7 +10,7 @@ PYTHON_COMPAT=(
 )
 PYTHON_REQ_USE='bzip2(+),threads(+)'
 
-inherit distutils-r1 git-r3
+inherit distutils-r1 git-r3 tmpfiles
 
 DESCRIPTION="Portage is the package management and distribution system for 
Gentoo"
 HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage;
@@ -202,6 +202,8 @@ python_install_all() {
esetup.py "${targets[@]}"
fi
 
+   dotmpfiles "${FILESDIR}"/portage-ccache.conf
+
# Due to distutils/python-exec limitations
# they must be installed to /usr/bin.
local sbin_relocations='archive-conf dispatch-conf emaint env-update 
etc-update fixpackages regenworld'



[gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/, sys-apps/portage/files/

2016-09-19 Thread Mike Gilbert
commit: 42c16a429662b3ddab73139603798748d43f2068
Author: Mike Gilbert  gentoo  org>
AuthorDate: Mon Sep 19 14:00:04 2016 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Mon Sep 19 14:00:11 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42c16a42

sys-apps/portage: apply fix for doc building to 2.3.1

Bug: https://bugs.gentoo.org/589210
Package-Manager: portage-2.3.0_p42

 ...ert-URI-changes-related-to-docbook-schema.patch | 39 ++
 sys-apps/portage/portage-2.3.1.ebuild  |  4 ++-
 2 files changed, 42 insertions(+), 1 deletion(-)

diff --git 
a/sys-apps/portage/files/2.3.1-doc-Revert-URI-changes-related-to-docbook-schema.patch
 
b/sys-apps/portage/files/2.3.1-doc-Revert-URI-changes-related-to-docbook-schema.patch
new file mode 100644
index ..ee191ff
--- /dev/null
+++ 
b/sys-apps/portage/files/2.3.1-doc-Revert-URI-changes-related-to-docbook-schema.patch
@@ -0,0 +1,39 @@
+From 35863a80b915939aac3ce6bf017d942cac879df8 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert 
+Date: Wed, 20 Jul 2016 12:30:05 -0400
+Subject: [PATCH] doc: Revert URI changes related to docbook schema
+
+This partially reverts b5365341dad167e314023df95d2c5e0f955962f0.
+
+X-Gentoo-Bug: 589210
+X-Gentoo-Bug-URL: https://bugs.gentoo.org/589210
+---
+ doc/custom.xsl  | 2 +-
+ doc/portage.docbook | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/doc/custom.xsl b/doc/custom.xsl
+index 11a2b9e..a7763ec 100644
+--- a/doc/custom.xsl
 b/doc/custom.xsl
+@@ -1,4 +1,4 @@
+-https://www.w3.org/1999/XSL/Transform; 
version="1.0">
++http://www.w3.org/1999/XSL/Transform; 
version="1.0">
+ 
+ 
+ 
+diff --git a/doc/portage.docbook b/doc/portage.docbook
+index f7d539a..811544f 100644
+--- a/doc/portage.docbook
 b/doc/portage.docbook
+@@ -1,6 +1,6 @@
+ 
+ https://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd; [
++  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd; [
+ 
+   
+   
+-- 
+2.10.0
+

diff --git a/sys-apps/portage/portage-2.3.1.ebuild 
b/sys-apps/portage/portage-2.3.1.ebuild
index ba8f996..4ea4ef7 100644
--- a/sys-apps/portage/portage-2.3.1.ebuild
+++ b/sys-apps/portage/portage-2.3.1.ebuild
@@ -78,7 +78,9 @@ TARBALL_PV=${PV}
 SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)"
 
-PATCHES=()
+PATCHES=(
+   
"${FILESDIR}/2.3.1-doc-Revert-URI-changes-related-to-docbook-schema.patch"
+)
 
 pkg_setup() {
use epydoc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )



[gentoo-commits] repo/gentoo:master commit in: sys-apps/portage/, sys-apps/portage/files/

2016-05-16 Thread Brian Dolbec
commit: b3bb9fb64ed7663d4afd6e2cb7b7be7a90f8f8b1
Author: Brian Dolbec  gentoo  org>
AuthorDate: Mon May 16 16:05:25 2016 +
Commit: Brian Dolbec  gentoo  org>
CommitDate: Mon May 16 16:14:42 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3bb9fb6

sys-apps/portage: Fix portage upgrade traceback when repoman is not installed

Easy workaround, emerge repoman, upgrade portage, unmerge repoman.
Alternative, edit /usr/lib/pythonX.Y/site-packages/const.py edite 
PORTAGE_PYM_PACKAGES
remove repoman from it.

Package-Manager: portage-2.3.0_rc1

 sys-apps/portage/files/portage-2.3.0_rc1.patch | 52 ++
 3.0_rc1.ebuild => portage-2.3.0_rc1-r1.ebuild} |  3 ++
 2 files changed, 55 insertions(+)

diff --git a/sys-apps/portage/files/portage-2.3.0_rc1.patch 
b/sys-apps/portage/files/portage-2.3.0_rc1.patch
new file mode 100644
index 000..8464462
--- /dev/null
+++ b/sys-apps/portage/files/portage-2.3.0_rc1.patch
@@ -0,0 +1,52 @@
+From 9ba1bea5e24fe839ef5bd833c3974a55d5333bf1 Mon Sep 17 00:00:00 2001
+From: Brian Dolbec 
+Date: Mon, 16 May 2016 02:45:45 -0700
+Subject: [PATCH] portage.const.py: Remove repoman from PORTAGE_PYM_PACKAGES
+
+Decca (in IRC) got a traceback due to the missing repoman install
+
+sysresccd / # emerge -e @system
+Calculating dependencies... done!
+Traceback (most recent call last):
+  File "/usr/lib/python-exec/python3.5/emerge", line 50, in 
+retval = emerge_main()
+  File "/usr/lib64/python3.5/site-packages/_emerge/main.py", line 1185, in 
emerge_main
+return run_action(emerge_config)
+  File "/usr/lib64/python3.5/site-packages/_emerge/actions.py", line 3236, in 
run_action
+emerge_config.args, spinner)
+  File "/usr/lib64/python3.5/site-packages/_emerge/actions.py", line 505, in 
action_build
+retval = mergetask.merge()
+  File "/usr/lib64/python3.5/site-packages/_emerge/Scheduler.py", line 958, in 
merge
+rval = self._handle_self_update()
+  File "/usr/lib64/python3.5/site-packages/_emerge/Scheduler.py", line 323, in 
_handle_self_update
+_prepare_self_update(self.settings)
+  File 
"/usr/lib64/python3.5/site-packages/portage/package/ebuild/doebuild.py", line 
2489, in _prepare_self_update
+symlinks=True)
+  File "/usr/lib64/python3.5/site-packages/portage/__init__.py", line 259, in 
__call__
+rval = self._func(*wrapped_args, **wrapped_kwargs)
+  File "/usr/lib64/python3.5/shutil.py", line 303, in copytree
+names = os.listdir(src)
+FileNotFoundError: [Errno 2] No such file or directory: 
b'/usr/lib64/python3.5/site-packages/repoman'
+
+Dirkjan  found  repoman was still included in the PORTAGE_PYM_PACKAGES 
which
+caused the traceback.
+---
+ pym/portage/const.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pym/portage/const.py b/pym/portage/const.py
+index 814d7f4..179efce 100644
+--- a/pym/portage/const.py
 b/pym/portage/const.py
+@@ -278,7 +278,7 @@ SUPPORTED_XPAK_EXTENSIONS = (".tbz2", ".xpak")
+ TIMESTAMP_FORMAT = "%a, %d %b %Y %H:%M:%S +"  # to be used with 
time.gmtime()
+ 
+ # Top-level names of Python packages installed by Portage.
+-PORTAGE_PYM_PACKAGES = ("_emerge", "portage", "repoman")
++PORTAGE_PYM_PACKAGES = ("_emerge", "portage")
+ 
+ RETURNCODE_POSTINST_FAILURE = 5
+ 
+-- 
+2.8.2
+

diff --git a/sys-apps/portage/portage-2.3.0_rc1.ebuild 
b/sys-apps/portage/portage-2.3.0_rc1-r1.ebuild
similarity index 99%
rename from sys-apps/portage/portage-2.3.0_rc1.ebuild
rename to sys-apps/portage/portage-2.3.0_rc1-r1.ebuild
index d76342d..7db2ef3 100644
--- a/sys-apps/portage/portage-2.3.0_rc1.ebuild
+++ b/sys-apps/portage/portage-2.3.0_rc1-r1.ebuild
@@ -78,6 +78,9 @@ TARBALL_PV=${PV}
 SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)"
 
+PATCHES=("${FILESDIR}/portage-2.3.0_rc1.patch"
+)
+
 pkg_setup() {
use epydoc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )
 }