[gentoo-dev] [PATCH 4/5] vcs-snapshot.eclass: Detect and report invalid directory structure

2019-07-24 Thread Michał Górny
Detect when the archive does not contain a single top-level directory,
and abort in that case.  Otherwise, --strip-components would result
in unpredictable mess.

Signed-off-by: Michał Górny 
---
 eclass/vcs-snapshot.eclass | 16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/eclass/vcs-snapshot.eclass b/eclass/vcs-snapshot.eclass
index 312e9a4611e1..dbca6fd586d2 100644
--- a/eclass/vcs-snapshot.eclass
+++ b/eclass/vcs-snapshot.eclass
@@ -68,8 +68,20 @@ vcs-snapshot_src_unpack() {
 
debug-print "${FUNCNAME}: unpacking ${f} to 
${destdir}"
 
-   # XXX: check whether the directory structure 
inside is
-   # fine? i.e. if the tarball has actually a 
parent dir.
+   local topdirs=()
+   readarray -t topdirs \
+   < <(tar -t -f "${DISTDIR}/${f}" | cut 
-d/ -f1 | sort -u)
+   if [[ ${#topdirs[@]} -gt 1 ]]; then
+   eerror "The archive ${f} contains 
multiple or no top directory."
+   eerror "It is impossible for 
vcs-snapshot to unpack this correctly."
+   eerror "Top directories found:"
+   local d
+   for d in "${topdirs[@]}"; do
+   eerror "${d}"
+   done
+   die "${FUNCNAME}: Invalid directory 
structure in archive ${f}"
+   fi
+
mkdir "${destdir}" || die
# -o (--no-same-owner) to avoid restoring 
original owner
einfo "Unpacking ${f}"
-- 
2.22.0




[gentoo-dev] [PATCH 5/5] vcs-snapshot.eclass: Detect unnecessary usage and complain

2019-07-24 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/vcs-snapshot.eclass | 12 
 1 file changed, 12 insertions(+)

diff --git a/eclass/vcs-snapshot.eclass b/eclass/vcs-snapshot.eclass
index dbca6fd586d2..c01cf01f052c 100644
--- a/eclass/vcs-snapshot.eclass
+++ b/eclass/vcs-snapshot.eclass
@@ -58,6 +58,7 @@ EXPORT_FUNCTIONS src_unpack
 vcs-snapshot_src_unpack() {
debug-print-function ${FUNCNAME} "${@}"
 
+   local renamed_any=
local f
 
for f in ${A}
@@ -81,6 +82,7 @@ vcs-snapshot_src_unpack() {
done
die "${FUNCNAME}: Invalid directory 
structure in archive ${f}"
fi
+   [[ ${topdirs[0]} != ${f%.tar*} ]] && 
renamed_any=1
 
mkdir "${destdir}" || die
# -o (--no-same-owner) to avoid restoring 
original owner
@@ -96,4 +98,14 @@ vcs-snapshot_src_unpack() {
;;
esac
done
+
+   if [[ ! ${renamed_any} ]]; then
+   local w=eerror
+   [[ ${EAPI} == [0123456] ]] && w=eqawarn
+   "${w}" "${FUNCNAME} did not find any archives that needed 
renaming."
+   "${w}" "Please verify that its usage is really necessary, and 
remove"
+   "${w}" "the inherit if it is not."
+
+   [[ ${w} == eerror ]] && die "${FUNCNAME}: Unnecessary usage 
detected"
+   fi
 }
-- 
2.22.0




[gentoo-dev] [PATCH 3/5] vcs-snapshot.eclass: Add verbose einfo for unpacking

2019-07-24 Thread Michał Górny
Add an einfo call to make explicit notice of each archive being
unpacked.

Signed-off-by: Michał Górny 
---
 eclass/vcs-snapshot.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/vcs-snapshot.eclass b/eclass/vcs-snapshot.eclass
index 2e734c509d1a..312e9a4611e1 100644
--- a/eclass/vcs-snapshot.eclass
+++ b/eclass/vcs-snapshot.eclass
@@ -72,6 +72,7 @@ vcs-snapshot_src_unpack() {
# fine? i.e. if the tarball has actually a 
parent dir.
mkdir "${destdir}" || die
# -o (--no-same-owner) to avoid restoring 
original owner
+   einfo "Unpacking ${f}"
tar -C "${destdir}" -x -o --strip-components 1 \
-f "${DISTDIR}/${f}" || die
;;
-- 
2.22.0




[gentoo-dev] [PATCH 1/5] vcs-snapshot.eclass: Allow EAPI 7

2019-07-24 Thread Michał Górny
Signed-off-by: Michał Górny 
---
 eclass/vcs-snapshot.eclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/eclass/vcs-snapshot.eclass b/eclass/vcs-snapshot.eclass
index 316a37773d43..321e307b894d 100644
--- a/eclass/vcs-snapshot.eclass
+++ b/eclass/vcs-snapshot.eclass
@@ -1,10 +1,10 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: vcs-snapshot.eclass
 # @MAINTAINER:
 # mgo...@gentoo.org
-# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6
+# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
 # @BLURB: support eclass for unpacking VCS snapshot tarballs
 # @DESCRIPTION:
 # This eclass provides a convenience src_unpack() which does unpack all
@@ -40,7 +40,7 @@
 # in ${WORKDIR}/${P} and ${WORKDIR}/${P}-otherstuff respectively.
 
 case ${EAPI:-0} in
-   0|1|2|3|4|5|6) ;;
+   0|1|2|3|4|5|6|7) ;;
*) die "vcs-snapshot.eclass API in EAPI ${EAPI} not yet established."
 esac
 
-- 
2.22.0




[gentoo-dev] [PATCH 2/5] vcs-snapshot.eclass: Update 'unusage' warning

2019-07-24 Thread Michał Górny
Nowadays both GitHub and GitLab snapshot do not need this eclass,
so make it clear it's needed only for BitBucket.  Also make the warning
uppercase because people still don't read it.

Signed-off-by: Michał Górny 
---
 eclass/vcs-snapshot.eclass | 33 ++---
 1 file changed, 18 insertions(+), 15 deletions(-)

diff --git a/eclass/vcs-snapshot.eclass b/eclass/vcs-snapshot.eclass
index 321e307b894d..2e734c509d1a 100644
--- a/eclass/vcs-snapshot.eclass
+++ b/eclass/vcs-snapshot.eclass
@@ -7,33 +7,36 @@
 # @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
 # @BLURB: support eclass for unpacking VCS snapshot tarballs
 # @DESCRIPTION:
+# THIS ECLASS IS NOT NECESSARY FOR MODERN GITHUB AND GITLAB SNAPSHOTS.
+# THEIR DIRECTORY STRUCTURE IS ENTIRELY PREDICTABLE, SO UPDATE YOUR
+# EBUILD TO USE /ARCHIVE/ URI AND SET S IF NECESSARY.
+#
 # This eclass provides a convenience src_unpack() which does unpack all
 # the tarballs in SRC_URI to locations matching their (local) names,
 # discarding the original parent directory.
 #
-# The typical use case are VCS snapshots, coming from bitbucket
-# and similar services. They have hash appended to the directory name
-# which makes extracting them a painful experience. But if you just use
-# a SRC_URI arrow to rename it (which you're likely have to do anyway),
-# vcs-snapshot will just extract it into a matching directory.
+# The typical use case are VCS tag snapshots coming from BitBucket
+# (but not GitHub or GitLab).  They have hash appended to the directory
+# name which makes extracting them a painful experience.  But if you are
+# using a SRC_URI arrow to rename them (which quite likely you have to
+# do anyway), vcs-snapshot will just extract them into matching
+# directories.
 #
 # Please note that this eclass handles only tarballs (.tar, .tar.gz,
-# .tar.bz2 & .tar.xz). For any other file format (or suffix) it will
-# fall back to regular unpack. Support for additional formats may be
-# added at some point so please keep your SRC_URIs clean.
-#
-# Note: this eclass is no longer needed with the new-style 'archive'
-# GitHub URLs. They have sane directory names and stable contents,
-# so you should really prefer them.
+# .tar.bz2 & .tar.xz).  For any other file format (or suffix) it will
+# fall back to regular unpack.  Support for additional formats may be
+# added in the future if necessary.
 #
 # @EXAMPLE:
 #
 # @CODE
-# EAPI=6
+# EAPI=7
 # inherit vcs-snapshot
 #
-# SRC_URI="https://github.com/example/${PN}/tarball/v${PV} -> ${P}.tar.gz
-#  https://github.com/example/${PN}-otherstuff/tarball/v${PV} -> 
${P}-otherstuff.tar.gz"
+# SRC_URI="
+#https://bitbucket.org/foo/bar/get/${PV}.tar.bz2 -> ${P}.tar.bz2
+#https://bitbucket.org/foo/bar-otherstuff/get/${PV}.tar.bz2
+#-> ${P}-otherstuff.tar.bz2"
 # @CODE
 #
 # and however the tarballs were originally packed, all files will appear
-- 
2.22.0




Re: [gentoo-dev] [RFC] New QA policy: Packages must not disable installing manpages via USE flags

2019-07-24 Thread desultory
On 07/24/19 10:40, Kent Fredric wrote:
> On Tue, 23 Jul 2019 23:56:52 -0400
> desultory  wrote:
> 
>> avoid optional documentation,
>> while the proposal in question explicitly would
> 
> I assume you meant 'optional dependencies' here right? :)
> 
The user-side effects pf the proposal in question, were it to become
policy, would be that anyone seeking to not install what is presently
optional documentation would either be:
(1) wasting build time and space (and, depending on implementation,
dependencies) on their build system (potentially  masking the files from
being installed);
(2) wasting the space in their installed image(s) (if they did not mask
the files which would not currently be installed anyway); or
(3) wasting their own time working around what the developers would be
required by policy to implement by repackaging the software themselves
to avoid the time and space drawbacks (though this would generally be
expected to be a rather exceptional case, as it would be relatively
extreme to avoid what would be a distfile and some file masking from the
user side).

Developer-side effects of the proposal in question would explicitly
force developers to use bespoke workarounds to avoid adding optional
dependencies to packages, for questionable gains.

So, while I was commenting on user-side effects, the phrasing applies to
developer-side effects  given s/documentation/dependencies/.

As I have noted elsewhere, there is a solution for which the majority of
the tooling exists which could achieve the same ends as the proposal in
question without causing developers in general significant additional
overhead beyond the status quo, while as a side effect providing
additional services to users. However, the proposal in question
specifically avoids offloading the newly generated work to automated
systems in favor of, evidently, optimizing for maximum consumption of
resources with minimal standardization.



[gentoo-dev] Last-rites: kde-misc/plasma-active-window-control

2019-07-24 Thread Andreas Sturmlechner
# Andreas Sturmlechner  (2019-07-24)
# Unmaintained and broken with current Plasma, removal in 30 days
# Bugs: https://bugs.kde.org/show_bug.cgi?id=404359,
# https://bugs.kde.org/show_bug.cgi?id=404360, see also HOMEPAGE comments
kde-misc/plasma-active-window-control






[gentoo-dev] Finalizing: GSoC-2019: BLAS/LAPACK Runtime Switching

2019-07-24 Thread Mo Zhou
Hi Gentoo Developers,

I'm finalizing the GSoC2019 project "BLAS and LAPACK runtime switch".[1]
The
documentation for user and developer is available here:

  https://wiki.gentoo.org/wiki/Blas-lapack-switch

BLAS and LAPACK are dense numerical algebra libraries of
"libc-importance" to
scientific computing users. The runtime switching mechanism enables
users to
easily switch the BLAS/LAPACK library system-wide, without recompiling
anything. A similar feature has been long-existing in Debian system, as
known
as the update-alternatives mechanism. In Gentoo we implemented this
feature
with eselect modules.

This mechanism has been tested by some users and gentoo science team
developers.
Thanks to these early testers, we've got some positive feed backs:

  https://github.com/gentoo/sci/issues/805#issuecomment-510469206
  https://github.com/gentoo/sci/issues/805#issuecomment-512097570

I sincerely invite users and developers who heavily rely on BLAS/LAPACK
libraries to test it. Should you find any problem, or have any
suggestion/question, please let me know :-)

[1]
https://wiki.gentoo.org/wiki/Google_Summer_of_Code/2019/Ideas/BLAS_and_LAPACK_runtime_switching



Re: [gentoo-dev] [RFC] New QA policy: Packages must not disable installing manpages via USE flags

2019-07-24 Thread Kent Fredric
On Tue, 23 Jul 2019 23:56:52 -0400
desultory  wrote:

> avoid optional documentation,
> while the proposal in question explicitly would

I assume you meant 'optional dependencies' here right? :)



pgp36j4n0ZoM_.pgp
Description: OpenPGP digital signature