[gentoo-dev] Gentoo Social Contract, Council: please fix the mess you cause

2018-03-25 Thread Francisco Blas Izquierdo Riera (klondike)
Dear Gentoo Council,

During the meeting you held on December (see the logs here:
https://projects.gentoo.org/council/meeting-logs/20171210.txt ), you
voted for restricting the gentoo-dev mailing list. Although in said
meeting somebody raised that such a change affected the Gentoo Social
Contract as it referred users to provide comments on the gentoo-dev
mailing list (see
https://www.gentoo.org/get-started/philosophy/social-contract.html )
this was dismissed by one of your members (which has, in the past,
called the Gentoo Social Contract "dead law") by saying that the right
place to send such comments is gentoo-project (but willingly ignoring
that such a reference has been part of it since the first archived draft
version
https://web.archive.org/web/20021112053724/http://www.gentoo.org:80/main/en/contract.xml
and the first non draft version
https://web.archive.org/web/20031203222653/http://www.gentoo.org:80/main/en/contract.xml
which predate the gentoo-project mailing list) and apparently ignored by
the rest.

This was noted after the vote had happened and to the best of my
knowledge hadn't been raised before. Despite that, on the next meeting
where the topic was discussed a different council member stated that
said person did not "any pertinent new information since last vote".

Now, three months after, no action has been carried by the council on
this very specific regard despite being made aware of it. This clearly
shows that the current council members not only take hastened decissions
without even doing propper research, they don't try to clean up the mess
they cause after their own decissions.

Given the inaction by the council, I'm propossing to apply either of
these two changes to the Gentoo Social contract.

First propossal:
Replace "Comments are welcome. Please send them to our
gentoo-dev@lists.gentoo.org  mailing
list." by "Comments by selected people are welcome. Please send them to
our gentoo-dev@lists.gentoo.org 
mailing list.". Which clearly reflects the new ivory tower philosophy
the Council is making the Gentoo Project take.

Second propossal:
Replace "Comments are welcome. Please send them to our
gentoo-dev@lists.gentoo.org  mailing
list." by "Comments by selected people are welcome. Please send them to
our gentoo-proj...@lists.gentoo.org
 mailing list CCing the Gentoo
Foundation trustees on trust...@lists.gentoo.org
.". Which ensures trustees get a
notification of such propossals and still keeps the social contract open
to comments for anybody.

Please note, in the spirit of the second propossal I'm CCing gentoo-project.

Klondike



signature.asc
Description: OpenPGP digital signature


[gentoo-dev] Automated Package Removal and Addition Tracker, for the week ending 2018-03-25 23:59 UTC

2018-03-25 Thread Robin H. Johnson
The attached list notes all of the packages that were added or removed
from the tree, for the week ending 2018-03-25 23:59 UTC.

Removals:
app-crypt/monkeysign  20180320-19:14 k_f   d520be16ca4
dev-libs/libgames-support 20180325-07:58 leio  40ed9dd1a31
dev-php/PEAR-Benchmark20180319-14:42 grknight  85952b0b4b9
dev-php/PEAR-Calendar 20180319-14:43 grknight  e7b4884970b
dev-php/PEAR-Console_Color20180319-14:44 grknight  2077799c30c
dev-php/PEAR-Crypt_Blowfish   20180319-14:45 grknight  a43abd7f861
dev-php/PEAR-Crypt_RC420180319-14:45 grknight  ae9f718eb57
dev-php/PEAR-Math_Stats   20180319-14:54 grknight  85ef4d97f7c
dev-php/PEAR-Net_DIME 20180319-14:53 grknight  f166659b7dd
dev-php/PEAR-Net_FTP  20180319-14:52 grknight  5f6f1208648
dev-php/PEAR-Net_IMAP 20180319-14:52 grknight  f619cf3e281
dev-php/PEAR-Net_LMTP 20180319-14:51 grknight  e486fbb2383
dev-php/PEAR-Net_Server   20180319-14:51 grknight  d6ee3dd5e56
dev-php/PEAR-PHP_CompatInfo   20180319-14:50 grknight  cb110bc6d60
dev-php/PEAR-Structures_DataGrid  20180319-14:49 grknight  7febb3c211c
dev-php/PEAR-XML_Beautifier   20180319-14:47 grknight  7f86877c9b9
dev-php/PEAR-XML_Feed_Parser  20180319-14:48 grknight  cd502c8ad06
dev-texlive/texlive-langindic 20180325-12:06 aballier  95711fd7146

Additions:
app-benchmarks/geekbench  20180323-23:03 mgornyb272f01ac9a
app-crypt/openpgp-keys-gentoo-release 20180323-16:37 mgorny3d2f810a9f8
app-emulation/glean   20180320-06:25 alexxyc80fe4a45d4
app-misc/skim 20180324-06:21 radhermit 4a640c4f8d5
dev-db/influxdb   20180323-21:15 williamh  e6b47481f9d
dev-libs/pigpio   20180317-13:00 mgornycd447c2a862
dev-python/invoke 20180320-18:59 grozin046914dab63
dev-python/python-recaptcha   20180321-14:05 hanno bd01a4a2de5
dev-python/twine  20180324-08:43 radhermit 466d1ab1a0f
dev-python/vpython20180320-19:07 grozin9dbd6bfe543
dev-util/spirv-headers20180313-01:07 mattst88  606f54a2632
dev-util/spirv-tools  20180313-01:10 mattst88  9c4878c78c9
dev-util/statifier20180322-23:43 mgornyefe2f748b65
games-action/trine-enchanted-edition  20180325-16:30 chewi ec3bd08eda2
net-analyzer/telegraf 20180325-22:58 williamh  f1f92235433
net-libs/davix20180319-11:00 amadio70da1fa7589
net-misc/ubridge  20171223-14:27 mgorny39abda0e971
sys-apps/ipmicfg  20180325-00:39 mgorny31b9f87dbb0
sys-apps/portage-mgorny   20180321-16:20 mgorny07e16448e9f
sys-fs/fuse-common20180319-11:11 radhermit d30a5e26942
www-plugins/passff20180302-23:46 mgorny2c24bf3a88d
x11-misc/xwallpaper   20180321-05:47 mgornyd211ade1305

--
Robin Hugh Johnson
Gentoo Linux Developer
E-Mail : robb...@gentoo.org
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85
Removed Packages:
dev-texlive/texlive-langindic,removed,aballier,20180325-12:06,95711fd7146
dev-libs/libgames-support,removed,leio,20180325-07:58,40ed9dd1a31
app-crypt/monkeysign,removed,k_f,20180320-19:14,d520be16ca4
dev-php/PEAR-Math_Stats,removed,grknight,20180319-14:54,85ef4d97f7c
dev-php/PEAR-Net_DIME,removed,grknight,20180319-14:53,f166659b7dd
dev-php/PEAR-Net_FTP,removed,grknight,20180319-14:52,5f6f1208648
dev-php/PEAR-Net_IMAP,removed,grknight,20180319-14:52,f619cf3e281
dev-php/PEAR-Net_LMTP,removed,grknight,20180319-14:51,e486fbb2383
dev-php/PEAR-Net_Server,removed,grknight,20180319-14:51,d6ee3dd5e56
dev-php/PEAR-PHP_CompatInfo,removed,grknight,20180319-14:50,cb110bc6d60
dev-php/PEAR-Structures_DataGrid,removed,grknight,20180319-14:49,7febb3c211c
dev-php/PEAR-XML_Feed_Parser,removed,grknight,20180319-14:48,cd502c8ad06
dev-php/PEAR-XML_Beautifier,removed,grknight,20180319-14:47,7f86877c9b9
dev-php/PEAR-Crypt_RC4,removed,grknight,20180319-14:45,ae9f718eb57
dev-php/PEAR-Crypt_Blowfish,removed,grknight,20180319-14:45,a43abd7f861
dev-php/PEAR-Console_Color,removed,grknight,20180319-14:44,2077799c30c
dev-php/PEAR-Calendar,removed,grknight,20180319-14:43,e7b4884970b
dev-php/PEAR-Benchmark,removed,grknight,20180319-14:42,85952b0b4b9
Added Packages:
net-analyzer/telegraf,added,williamh,20180325-22:58,f1f92235433
x11-misc/xwallpaper,added,mgorny,20180321-05:47,d211ade1305
games-action/trine-enchanted-edition,added,chewi,20180325-16:30,ec3bd08eda2
sys-apps/ipmicfg,added,mgorny,20180325-00:39,31b9f87dbb0
app-benchmarks/geekbench,added,mgorny,20180323-23:03,b272f01ac9a
dev-python/twine,added,radhermit,20180324-08:43,466d1ab1a0f
app-misc/skim,added,radhermit,20180324-06

[gentoo-portage-dev] [PATCH 4/7] Introduce control variables for estrip

2018-03-25 Thread Zac Medico
From: Michał Górny 

---
 bin/misc-functions.sh  | 3 ++-
 bin/phase-helpers.sh   | 2 ++
 bin/save-ebuild-env.sh | 2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index a7af3ec73..30e911fd6 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -224,7 +224,8 @@ install_qa_check() {
ecompressdir --dequeue
ecompress --dequeue
 
-   "${PORTAGE_BIN_PATH}"/estrip --queue /
+   "${PORTAGE_BIN_PATH}"/estrip --queue "${PORTAGE_DOSTRIP[@]}"
+   "${PORTAGE_BIN_PATH}"/estrip --ignore "${PORTAGE_DOSTRIP_SKIP[@]}"
"${PORTAGE_BIN_PATH}"/estrip --dequeue
 
# Create NEEDED.ELF.2 regardless of RESTRICT=binchecks, since this info 
is
diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index 5eeecfef7..f1f8d3992 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -20,6 +20,8 @@ export MOPREFIX=${PN}
 export PORTAGE_DOCOMPRESS_SIZE_LIMIT="128"
 declare -a PORTAGE_DOCOMPRESS=( /usr/share/{doc,info,man} )
 declare -a PORTAGE_DOCOMPRESS_SKIP=( /usr/share/doc/${PF}/html )
+declare -a PORTAGE_DOSTRIP=( / )
+declare -a PORTAGE_DOSTRIP_SKIP=()
 
 into() {
if [ "$1" == "/" ]; then
diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh
index e5ae8af88..f624f44ec 100644
--- a/bin/save-ebuild-env.sh
+++ b/bin/save-ebuild-env.sh
@@ -15,7 +15,7 @@ __save_ebuild_env() {
if has --exclude-init-phases $* ; then
unset S _E_DESTTREE _E_INSDESTTREE _E_DOCDESTTREE_ 
_E_EXEDESTTREE_ \
PORTAGE_DOCOMPRESS_SIZE_LIMIT PORTAGE_DOCOMPRESS \
-   PORTAGE_DOCOMPRESS_SKIP
+   PORTAGE_DOCOMPRESS_SKIP PORTAGE_DOSTRIP 
PORTAGE_DOSTRIP_SKIP
if [[ -n $PYTHONPATH &&
${PYTHONPATH%%:*} -ef $PORTAGE_PYM_PATH ]] ; then
if [[ $PYTHONPATH == *:* ]] ; then
-- 
2.13.6




[gentoo-portage-dev] [PATCH 7/7] Add dostrip for EAPI 7

2018-03-25 Thread Zac Medico
From: Michał Górny 

Bug: https://bugs.gentoo.org/203891
Closes: https://github.com/mgorny/portage/issues/8
---
 bin/eapi.sh|  4 
 bin/ebuild.sh  |  2 +-
 bin/phase-helpers.sh   | 26 ++
 bin/save-ebuild-env.sh |  2 +-
 4 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/bin/eapi.sh b/bin/eapi.sh
index 326eb387e..1445c3ec7 100644
--- a/bin/eapi.sh
+++ b/bin/eapi.sh
@@ -76,6 +76,10 @@ ___eapi_has_docompress() {
[[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3)$ ]]
 }
 
+___eapi_has_dostrip() {
+   [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|5|6)$ ]]
+}
+
 ___eapi_has_nonfatal() {
[[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3)$ ]]
 }
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 061b1aff4..11441bfb2 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -59,7 +59,7 @@ else
# These dummy functions are for things that are likely to be called
# in global scope, even though they are completely useless during
# the "depend" phase.
-   funcs="diropts docompress exeopts get_KV insopts
+   funcs="diropts docompress dostrip exeopts get_KV insopts
KV_major KV_micro KV_minor KV_to_int
libopts register_die_hook register_success_hook
__strip_duplicate_slashes
diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index 020a49592..556d089b5 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -163,6 +163,32 @@ docompress() {
fi
 }
 
+dostrip() {
+   ___eapi_has_dostrip || die "'${FUNCNAME}' not supported in this EAPI"
+
+   local f g
+   if [[ $1 = "-x" ]]; then
+   shift
+   for f; do
+   f=$(__strip_duplicate_slashes "${f}"); f=${f%/}
+   [[ ${f:0:1} = / ]] || f="/${f}"
+   for g in "${PORTAGE_DOSTRIP_SKIP[@]}"; do
+   [[ ${f} = "${g}" ]] && continue 2
+   done
+   PORTAGE_DOSTRIP_SKIP+=( "${f}" )
+   done
+   else
+   for f; do
+   f=$(__strip_duplicate_slashes "${f}"); f=${f%/}
+   [[ ${f:0:1} = / ]] || f="/${f}"
+   for g in "${PORTAGE_DOSTRIP[@]}"; do
+   [[ ${f} = "${g}" ]] && continue 2
+   done
+   PORTAGE_DOSTRIP+=( "${f}" )
+   done
+   fi
+}
+
 useq() {
has $EBUILD_PHASE prerm postrm || eqawarn \
"QA Notice: The 'useq' function is deprecated (replaced by 
'use')"
diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh
index f624f44ec..947ac79d5 100644
--- a/bin/save-ebuild-env.sh
+++ b/bin/save-ebuild-env.sh
@@ -60,7 +60,7 @@ __save_ebuild_env() {
unpack __strip_duplicate_slashes econf einstall \
__dyn_setup __dyn_unpack __dyn_clean \
into insinto exeinto docinto \
-   insopts diropts exeopts libopts docompress \
+   insopts diropts exeopts libopts docompress dostrip \
__abort_handler __abort_prepare __abort_configure 
__abort_compile \
__abort_test __abort_install __dyn_prepare __dyn_configure \
__dyn_compile __dyn_test __dyn_install \
-- 
2.13.6




[gentoo-portage-dev] [PATCH 6/7] Allow individually allowing strip w/ RESTRICT=strip

2018-03-25 Thread Zac Medico
From: Michał Górny 

Update RESTRICT=strip to control the default strip inclusion list
as specified in EAPI 7 rather than disabling stripping entirely.
This makes it possible to strip individual files.
---
 bin/estrip   | 4 ++--
 bin/phase-helpers.sh | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/bin/estrip b/bin/estrip
index 24c6a461c..009dccfa0 100755
--- a/bin/estrip
+++ b/bin/estrip
@@ -16,7 +16,7 @@ exp_tf() {
done
 }
 exp_tf FEATURES compressdebug installsources nostrip splitdebug xattr
-exp_tf RESTRICT binchecks installsources splitdebug strip
+exp_tf RESTRICT binchecks installsources splitdebug
 
 if ! ___eapi_has_prefix_variables; then
EPREFIX= ED=${D}
@@ -24,7 +24,7 @@ fi
 
 banner=false
 SKIP_STRIP=false
-if ${RESTRICT_strip} || ${FEATURES_nostrip} ; then
+if ${FEATURES_nostrip} ; then
SKIP_STRIP=true
banner=true
${FEATURES_installsources} || exit 0
diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index f1f8d3992..020a49592 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -21,6 +21,7 @@ export PORTAGE_DOCOMPRESS_SIZE_LIMIT="128"
 declare -a PORTAGE_DOCOMPRESS=( /usr/share/{doc,info,man} )
 declare -a PORTAGE_DOCOMPRESS_SKIP=( /usr/share/doc/${PF}/html )
 declare -a PORTAGE_DOSTRIP=( / )
+has strip ${RESTRICT} && PORTAGE_DOSTRIP=()
 declare -a PORTAGE_DOSTRIP_SKIP=()
 
 into() {
-- 
2.13.6




[gentoo-portage-dev] [PATCH 2/7] Disarm prepstrip & prepallstrip

2018-03-25 Thread Zac Medico
From: Michał Górny 

Move stripping logic to a new estrip helper (that is not exposed
to ebuilds) and make prepstrip & prepallstrip do nothing.
---
 bin/ebuild-helpers/prepallstrip |  11 +-
 bin/ebuild-helpers/prepstrip| 387 +--
 bin/estrip  | 390 
 bin/misc-functions.sh   |   4 +-
 4 files changed, 400 insertions(+), 392 deletions(-)
 create mode 100755 bin/estrip

diff --git a/bin/ebuild-helpers/prepallstrip b/bin/ebuild-helpers/prepallstrip
index 59fa7cc61..4c6d47bb2 100755
--- a/bin/ebuild-helpers/prepallstrip
+++ b/bin/ebuild-helpers/prepallstrip
@@ -1,11 +1,8 @@
 #!/bin/bash
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
+# Note: this really does nothing these days. It's going to be banned
+# when the last consumers are gone.
 
-if ! ___eapi_has_prefix_variables; then
-   ED=${D}
-fi
-
-exec prepstrip "${ED}"
+exit 0
diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 74ab52c5b..4c6d47bb2 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -2,388 +2,7 @@
 # Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
+# Note: this really does nothing these days. It's going to be banned
+# when the last consumers are gone.
 
-# avoid multiple calls to `has`.  this creates things like:
-#   FEATURES_foo=false
-# if "foo" is not in $FEATURES
-tf() { "$@" && echo true || echo false ; }
-exp_tf() {
-   local flag var=$1
-   shift
-   for flag in "$@" ; do
-   eval ${var}_${flag}=$(tf has ${flag} ${!var})
-   done
-}
-exp_tf FEATURES compressdebug installsources nostrip splitdebug xattr
-exp_tf RESTRICT binchecks installsources splitdebug strip
-
-if ! ___eapi_has_prefix_variables; then
-   EPREFIX= ED=${D}
-fi
-
-banner=false
-SKIP_STRIP=false
-if ${RESTRICT_strip} || ${FEATURES_nostrip} ; then
-   SKIP_STRIP=true
-   banner=true
-   ${FEATURES_installsources} || exit 0
-fi
-
-PRESERVE_XATTR=false
-if [[ ${KERNEL} == linux ]] && ${FEATURES_xattr} ; then
-   PRESERVE_XATTR=true
-   if type -P getfattr >/dev/null && type -P setfattr >/dev/null ; then
-   dump_xattrs() {
-   getfattr -d -m - --absolute-names "$1"
-   }
-   restore_xattrs() {
-   setfattr --restore=-
-   }
-   else
-   dump_xattrs() {
-   PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \
-   "${PORTAGE_PYTHON:-/usr/bin/python}" \
-   "${PORTAGE_BIN_PATH}/xattr-helper.py" --dump < <(echo 
-n "$1")
-   }
-   restore_xattrs() {
-   PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \
-   "${PORTAGE_PYTHON:-/usr/bin/python}" \
-   "${PORTAGE_BIN_PATH}/xattr-helper.py" --restore
-   }
-   fi
-fi
-
-# look up the tools we might be using
-for t in STRIP:strip OBJCOPY:objcopy READELF:readelf ; do
-   v=${t%:*} # STRIP
-   t=${t#*:} # strip
-   eval ${v}=\"${!v:-${CHOST}-${t}}\"
-   type -P -- ${!v} >/dev/null || eval ${v}=${t}
-done
-
-# Figure out what tool set we're using to strip stuff
-unset SAFE_STRIP_FLAGS DEF_STRIP_FLAGS SPLIT_STRIP_FLAGS
-case $(${STRIP} --version 2>/dev/null) in
-*elfutils*) # dev-libs/elfutils
-   # elfutils default behavior is always safe, so don't need to specify
-   # any flags at all
-   SAFE_STRIP_FLAGS=""
-   DEF_STRIP_FLAGS="--remove-comment"
-   SPLIT_STRIP_FLAGS="-f"
-   ;;
-*GNU*) # sys-devel/binutils
-   # We'll leave out -R .note for now until we can check out the relevance
-   # of the section when it has the ALLOC flag set on it ...
-   SAFE_STRIP_FLAGS="--strip-unneeded"
-   DEF_STRIP_FLAGS="-R .comment -R .GCC.command.line -R 
.note.gnu.gold-version"
-   SPLIT_STRIP_FLAGS=
-   ;;
-esac
-: ${PORTAGE_STRIP_FLAGS=${SAFE_STRIP_FLAGS} ${DEF_STRIP_FLAGS}}
-
-prepstrip_sources_dir=${EPREFIX}/usr/src/debug/${CATEGORY}/${PF}
-
-debugedit=$(type -P debugedit)
-if [[ -z ${debugedit} ]]; then
-   debugedit_paths=(
-   "${EPREFIX}/usr/libexec/rpm/debugedit"
-   )
-   for x in "${debugedit_paths[@]}"; do
-   if [[ -x ${x} ]]; then
-   debugedit=${x}
-   break
-   fi
-   done
-fi
-[[ ${debugedit} ]] && debugedit_found=true || debugedit_found=false
-debugedit_warned=false
-
-# Setup $T filesystem layout that we care about.
-tmpdir="${T}/prepstrip"
-rm -rf "${tmpdir}"
-mkdir -p 

[gentoo-portage-dev] [PATCH 3/7] estrip: Use queue/dequeue logic

2018-03-25 Thread Zac Medico
From: Michał Górny 

---
 bin/estrip| 70 +++
 bin/misc-functions.sh |  3 ++-
 2 files changed, 61 insertions(+), 12 deletions(-)

diff --git a/bin/estrip b/bin/estrip
index 431624498..309a2962e 100755
--- a/bin/estrip
+++ b/bin/estrip
@@ -30,6 +30,59 @@ if ${RESTRICT_strip} || ${FEATURES_nostrip} ; then
${FEATURES_installsources} || exit 0
 fi
 
+while [[ $# -gt 0 ]] ; do
+   case $1 in
+   --ignore)
+   shift
+
+   skip_dirs=()
+   for skip; do
+   if [[ -d ${ED%/}/${skip#/} ]]; then
+   skip_dirs+=( "${ED%/}/${skip#/}" )
+   else
+   rm -f "${ED%/}/${skip#/}.estrip" || die
+   fi
+   done
+
+   if [[ ${skip_dirs[@]} ]]; then
+   find "${skip_dirs[@]}" -name '*.estrip' -delete || die
+   fi
+
+   exit 0
+   ;;
+   --queue)
+   shift
+
+   find_paths=()
+   for path; do
+   if [[ -e ${ED%/}/${path#/} ]]; then
+   find_paths+=( "${ED%/}/${path#/}" )
+   fi
+   done
+
+   if [[ ${find_paths[@]} ]]; then
+   while IFS= read -r path; do
+   >> "${path}.estrip" || die
+   done < <(
+   scanelf -yqRBF '#k%F' -k '.symtab' 
"${find_paths[@]}"
+   find "${find_paths[@]}" -type f ! -type l -name 
'*.a'
+   )
+   fi
+
+   exit 0
+   ;;
+   --dequeue)
+   [[ -n ${2} ]] && die "${0##*/}: --dequeue takes no additional 
arguments"
+   break
+   ;;
+   *)
+   die "${0##*/}: unknown arguments '$*'"
+   exit 1
+   ;;
+   esac
+   shift
+done
+
 PRESERVE_XATTR=false
 if [[ ${KERNEL} == linux ]] && ${FEATURES_xattr} ; then
PRESERVE_XATTR=true
@@ -253,7 +306,7 @@ if ! ${RESTRICT_binchecks} && ! ${RESTRICT_strip} ; then
# and start stripping the files ourselves.  The log parsing can be done 
in
# parallel though.
log=${tmpdir}/scanelf-already-stripped.log
-   scanelf -yqRBF '#k%F' -k '!.symtab' "$@" | sed -e "s#^${ED%/}/##" > 
"${log}"
+   scanelf -yqRBF '#k%F' -k '!.symtab' "${ED}" | sed -e "s#^${ED%/}/##" > 
"${log}"
qa_var="QA_PRESTRIPPED_${ARCH/-/_}"
[[ -n ${!qa_var} ]] && QA_PRESTRIPPED="${!qa_var}"
if [[ -n ${QA_PRESTRIPPED} && -s ${log} && \
@@ -286,16 +339,11 @@ else
get_inode_number() { stat -c '%i' "$1"; }
 fi
 cd "${tmpdir}/inodes" || die "cd failed unexpectedly"
-while read -r x ; do
-   inode_link=$(get_inode_number "${x}") || die "stat failed unexpectedly"
-   echo "${x}" >> "${inode_link}" || die "echo failed unexpectedly"
-done < <(
-   # Use sort -u to eliminate duplicates for bug #445336.
-   (
-   scanelf -yqRBF '#k%F' -k '.symtab' "$@"
-   find "$@" -type f ! -type l -name '*.a'
-   ) | LC_ALL=C sort -u
-)
+while IFS= read -d '' -r x ; do
+   rm -f "${x}" || die
+   inode_link=$(get_inode_number "${x%.estrip}") || die "stat failed 
unexpectedly"
+   echo "${x%.estrip}" >> "${inode_link}" || die "echo failed unexpectedly"
+done < <(find "${ED}" -name '*.estrip' -print0)
 
 # Now we look for unstripped binaries.
 for inode_link in $(shopt -s nullglob; echo *) ; do
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 199e09fe9..a7af3ec73 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -224,7 +224,8 @@ install_qa_check() {
ecompressdir --dequeue
ecompress --dequeue
 
-   "${PORTAGE_BIN_PATH}"/estrip "${ED}"
+   "${PORTAGE_BIN_PATH}"/estrip --queue /
+   "${PORTAGE_BIN_PATH}"/estrip --dequeue
 
# Create NEEDED.ELF.2 regardless of RESTRICT=binchecks, since this info 
is
# too useful not to have (it's required for things like preserve-libs), 
and
-- 
2.13.6




[gentoo-portage-dev] [PATCH 5/7] estrip: Report pre-stripped files even with RESTRICT=strip

2018-03-25 Thread Zac Medico
From: Michał Górny 

The purpose of RESTRICT=strip is to prevent files from being stripped,
not to silence QA checks about pre-stripped files.
---
 bin/estrip | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/estrip b/bin/estrip
index 309a2962e..24c6a461c 100755
--- a/bin/estrip
+++ b/bin/estrip
@@ -301,7 +301,7 @@ process_elf() {
 # The existance of the section .symtab tells us that a binary is stripped.
 # We want to log already stripped binaries, as this may be a QA violation.
 # They prevent us from getting the splitdebug data.
-if ! ${RESTRICT_binchecks} && ! ${RESTRICT_strip} ; then
+if ! ${RESTRICT_binchecks} ; then
# We need to do the non-stripped scan serially first before we turn 
around
# and start stripping the files ourselves.  The log parsing can be done 
in
# parallel though.
-- 
2.13.6




[gentoo-portage-dev] [PATCH 1/7] prepstrip: Disable parallel work

2018-03-25 Thread Zac Medico
From: Michał Górny 

---
 bin/ebuild-helpers/prepstrip | 20 +++-
 1 file changed, 3 insertions(+), 17 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 2136e0d4d..74ab52c5b 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -2,7 +2,7 @@
 # Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-source "${PORTAGE_BIN_PATH}"/helper-functions.sh || exit 1
+source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
 
 # avoid multiple calls to `has`.  this creates things like:
 #   FEATURES_foo=false
@@ -99,8 +99,6 @@ fi
 [[ ${debugedit} ]] && debugedit_found=true || debugedit_found=false
 debugedit_warned=false
 
-__multijob_init
-
 # Setup $T filesystem layout that we care about.
 tmpdir="${T}/prepstrip"
 rm -rf "${tmpdir}"
@@ -256,8 +254,6 @@ if ! ${RESTRICT_binchecks} && ! ${RESTRICT_strip} ; then
# parallel though.
log=${tmpdir}/scanelf-already-stripped.log
scanelf -yqRBF '#k%F' -k '!.symtab' "$@" | sed -e "s#^${ED%/}/##" > 
"${log}"
-   (
-   __multijob_child_init
qa_var="QA_PRESTRIPPED_${ARCH/-/_}"
[[ -n ${!qa_var} ]] && QA_PRESTRIPPED="${!qa_var}"
if [[ -n ${QA_PRESTRIPPED} && -s ${log} && \
@@ -278,8 +274,6 @@ if ! ${RESTRICT_binchecks} && ! ${RESTRICT_strip} ; then
else
rm -f "${log}"
fi
-   ) &
-   __multijob_post_fork
 fi
 
 # Since strip creates a new inode, we need to know the initial set of
@@ -313,10 +307,8 @@ do
banner=true
fi
 
-   (
-   __multijob_child_init
-   f=$(file "${x}") || exit 0
-   [[ -z ${f} ]] && exit 0
+   f=$(file "${x}") || continue
+   [[ -z ${f} ]] && continue
 
if ! ${SKIP_STRIP} ; then
# The noglob funk is to support STRIP_MASK="/*/booga" and to 
keep
@@ -368,16 +360,10 @@ do
if ${was_not_writable} ; then
chmod u-w "${x}"
fi
-   ) &
-   __multijob_post_fork
 
 done < "${inode_link}"
 done
 
-# With a bit more work, we could run the rsync processes below in
-# parallel, but not sure that'd be an overall improvement.
-__multijob_finish
-
 cd "${tmpdir}"/sources/ && cat * > "${tmpdir}/debug.sources" 2>/dev/null
 if [[ -s ${tmpdir}/debug.sources ]] && \
${FEATURES_installsources} && \
-- 
2.13.6




[gentoo-portage-dev] [PATCH 0/7] Add dostrip for EAPI 7

2018-03-25 Thread Zac Medico
The series contains dostrip patches cherry picked from portage-mgorny:

commit 38273616460fef9b36d3862f366f49f8ba5e7911
Author: Michał Górny 
Date:   2018-03-25 14:37:44 +0200

Add dostrip for EAPI 7

Bug: https://bugs.gentoo.org/203891
Closes: https://github.com/mgorny/portage/issues/8

commit ddb250cf5291a83cd5d44910428f666445147448
Author: Michał Górny 
Date:   2018-03-25 14:32:40 +0200

Allow individually allowing strip w/ RESTRICT=strip

Update RESTRICT=strip to control the default strip inclusion list
as specified in EAPI 7 rather than disabling stripping entirely.
This makes it possible to strip individual files.

commit ef5f2d3574d4f73d6e5fce7e3e798e2a05cc1893
Author: Michał Górny 
Date:   2018-03-25 14:31:36 +0200

estrip: Report pre-stripped files even with RESTRICT=strip

The purpose of RESTRICT=strip is to prevent files from being stripped,
not to silence QA checks about pre-stripped files.

commit 46f0f9cf8d02ab498ab7b4fec4419e507433839b
Author: Michał Górny 
Date:   2018-03-25 14:11:20 +0200

Introduce control variables for estrip

commit 5ccafc3662ada431e5c75ec35aeb06cc86ee53ba
Author: Michał Górny 
Date:   2018-03-25 14:05:19 +0200

estrip: Use queue/dequeue logic

commit ee10e26763051396eea077a640c47796674403cc
Author: Michał Górny 
Date:   2018-03-25 13:16:24 +0200

Disarm prepstrip & prepallstrip

Move stripping logic to a new estrip helper (that is not exposed
to ebuilds) and make prepstrip & prepallstrip do nothing.


commit ae52aceeb86253a8b5742b287229614340017e55
Author: Michał Górny 
Date:   2018-03-24 14:03:02 +0100

prepstrip: Disable parallel work


Michał Górny (7):
  prepstrip: Disable parallel work
  Disarm prepstrip & prepallstrip
  estrip: Use queue/dequeue logic
  Introduce control variables for estrip
  estrip: Report pre-stripped files even with RESTRICT=strip
  Allow individually allowing strip w/ RESTRICT=strip
  Add dostrip for EAPI 7

 bin/eapi.sh |   4 +
 bin/ebuild-helpers/prepallstrip |  11 +-
 bin/ebuild-helpers/prepstrip| 401 +---
 bin/ebuild.sh   |   2 +-
 bin/estrip  | 438 
 bin/misc-functions.sh   |   6 +-
 bin/phase-helpers.sh|  29 +++
 bin/save-ebuild-env.sh  |   4 +-
 8 files changed, 486 insertions(+), 409 deletions(-)
 create mode 100755 bin/estrip

-- 
2.13.6




Re: [gentoo-dev] New Portage fork: sys-apps/portage-mgorny

2018-03-25 Thread Vadim A. Misbakh-Soloviov
Well, in *my* opinion, in turn, having possibility to {R,}DEPEND on package 
from exact repo is much and much more needed functionality.

Say, I have pkg2 in my repo, that depends on pkg1, which is in my repo too.
Then, I (or user) add other repo having pkg1 too. Or, say, gentoo maintainers 
bump pkg1 to a newer version (while I'm slacking a bit).
And my pkg1 is a bit different from gentoo's (let it be patchset, or, say, 
lua.eclass support for lua overlay).

So, that changes results in random unexpected behaviour as blocks, runtime 
breakage and so on.

And renaming all the packages to not collide with gentoo/other repos naming 
is, well, not an option, I think.


Or, another example:
I making pkg4 in my repo1, which depends on pkg3 from repo2 (where I 100% sure 
it fits all the requirements and the patchsets), while pkg3 in ::gentoo 
doesn't (and it can even have a bug about that opened for a century already).

Currently, it is no way to say "only dep-pkg from that exact repo is 100% 
works as expected", so there is still the chance, that someday pkg4 would fail 
to build because suddenly pkg3 was reinstalled from another "incompatible" 
repo...
And, honestly, current ways to resolve that issue (adding dummy-useflags, 
copy_here, and so on) looks as very dirty hacks.





Re: [gentoo-dev] New Portage fork: sys-apps/portage-mgorny

2018-03-25 Thread Kent Fredric
On Sat, 24 Mar 2018 21:43:41 -0700
Zac Medico  wrote:

> But if the majority demographic is as you describe, then they shouldn't
> be using anything having dependencies that require package.unmask or **
> keywords changes.

Again, they *dont*, the problem is portage makes the mistake of
thinking they do.

This happens especially around virtuals where there is an existing
problem of portage not doing the right thing when perl-core/* exists in
some definition.

I don't have details on hand to give you as to how this happens,
but I've seen this happen often enough around packages *I maintain* and
*I* can't explain why portage is trying to install it, only that
--auto-unmask-keep-masks=y makes the problem mysteriously go away.

The question for me is not "auto unmask is good" vs "autounmask is
bad", autounmask is fine on its own and is very useful.

Its the default of --autounmask-keep-masks=n that I find short on value.

If anything, I suggest there needs to be an
--autounmask-keep-masks=conditional, or something, that narrows the
range of solutions portage will try and only attempt to unmask ** or
package.mask in the following conditions:

- An explicitly masked package/version is explicitly requested on the command 
line.
- A package is a direct dependency of of the above
- As above, but for the world file

That is, assume the only reason for masked packages to be considered is:
- The user in some way directly requested them
- A logical consequence of the user directly requesting a masked package



pgpBA7OyKTQKm.pgp
Description: OpenPGP digital signature