Re: [gentoo-dev] Guidance on distributed patented software

2021-09-25 Thread Joshua Kinard
On 9/24/2021 03:55, Hanno Böck wrote:
> On Fri, 24 Sep 2021 03:46:51 -0400
> Joshua Kinard  wrote:
> 
>> If I remember this weekend, I'll e-mail the libtomcrypt author and
>> see if they have any insight.  One would hope they did their own
>> research before possibly putting patented code out into the public
>> domain.
>>
>> Any idea if the Ed25519 forms are unencumbered?  As far as I know,
>> those were developed by DJB completely independent of ECDSA, so it
>> seems like those should be fine.
> 
> I would like to point out that we have no evidence that ECDSA is
> currently patent-encumbered either.
> The patents that are listed in Red Hat's openssl patches and the ones
> that people have been discussing around ecc are all expired. The only
> "evidence" we have around patent problems is that red hat does not give
> a clear answer when asked whether there are still issues. My hunch is
> that this is more of a "large company not answering questions"-problem
> than a patent problem, but of course I don't know that for sure.
> 
> ECDSA and the NIST curves have been around since > 20 years, so it's
> simply impossible that there are any valid patents covering those.
> (There is of course a slight possibility that there may be patents
> covering specific implementation details of ECDSA/NIST curves that were
> only described later.)

Then we are either A) being too paranoid and should just drop bindist from
the OpenSSL ebuilds, or B) we are not being paranoid enough and packages
like dropbear/libtomcrypt need bindist added, no?  It seems we're stuck in
the middle here because we don't have the right information.  If Red Hat or
IBM are being non-responsive over this, then surely some other distro out
there has already figured things out?


> I'm not entirely sure what you'd like to ask the libtomcrypt authors.
> "We think there may be patents, but we don't know. Did you consider
> that?"

No, actually, I was thinking something more along the lines of "Hey, are you
aware of these supposed patent claims about ECC/ECDSA implementations that
Red Hat says exist, and if so, did you do any research on them that you
could possibly share that led you to feeling confident to release your
implementation into the public domain".

But I am open to better language.  I just don't wanna sit here not knowing.
 Someone out there has to have the right information to settle this.

-- 
Joshua Kinard
Gentoo/MIPS
ku...@gentoo.org
rsa6144/5C63F4E3F5C6C943 2015-04-27
177C 1972 1FB8 F254 BAD0 3E72 5C63 F4E3 F5C6 C943

"The past tempts us, the present confuses us, the future frightens us.  And
our lives slip away, moment by moment, lost in that vast, terrible in-between."

--Emperor Turhan, Centauri Republic



[gentoo-dev] [PATCH] distutils-r1.eclass: fix formatting

2021-09-25 Thread Arthur Zamarin
- mark _distutils-r1_check_all_phase_mismatch as @INTERNAL
- fix list appearance for distutils_enable_tests options

Signed-off-by: Arthur Zamarin 
---
 eclass/distutils-r1.eclass | 4 
 1 file changed, 4 insertions(+)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 1326809a8..3513a74c4 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -369,8 +369,11 @@ distutils_enable_sphinx() {
 # of RDEPEND to test?-BDEPEND.  The test-runner argument must be one of:
 #
 # - nose: nosetests (dev-python/nose)
+#
 # - pytest: dev-python/pytest
+#
 # - setup.py: setup.py test (no deps included)
+#
 # - unittest: for built-in Python unittest module
 #
 # Additionally, if --install is passed as the first parameter,
@@ -618,6 +621,7 @@ _distutils-r1_handle_pyproject_toml() {
 }
 
 # @FUNCTION: _distutils-r1_check_all_phase_mismatch
+# @INTERNAL
 # @DESCRIPTION:
 # Verify whether *_all phase impls is not called from from non-*_all
 # subphase.
-- 
2.33.0




[gentoo-dev] Last rites: dev-python/theano, dev-python/theano-pymc

2021-09-25 Thread Jakov Smolić
# Jakov Smolić  (2021-09-25)
# Upstream renamed the Theano project and continued as dev-python/aesara.
# No reverse dependencies.
# Removal on 2021-10-25.
dev-python/theano
dev-python/theano-pymc
-- 
Jakov



OpenPGP_signature
Description: OpenPGP digital signature


[gentoo-dev] [PATCH v2 6/6] bzr.eclass: Drop support for EBZR_INITIAL_URI

2021-09-25 Thread Ulrich Müller
This was historically used only for GNU Emacs, which had a slow
original repository and a fast (but possibly out of date) mirror.

Signed-off-by: Ulrich Müller 
---
 eclass/bzr.eclass | 25 +
 1 file changed, 1 insertion(+), 24 deletions(-)

diff --git a/eclass/bzr.eclass b/eclass/bzr.eclass
index 5dd5d40c13fa..b89f4216034f 100644
--- a/eclass/bzr.eclass
+++ b/eclass/bzr.eclass
@@ -82,17 +82,6 @@ EXPORT_FUNCTIONS src_unpack
 # @DESCRIPTION:
 # The repository URI for the source package.
 
-# @ECLASS-VARIABLE: EBZR_INITIAL_URI
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# The URI used for initial branching of the source repository.  If this
-# variable is set, the initial branch will be cloned from the location
-# specified, followed by a pull from ${EBZR_REPO_URI}.  This is intended
-# for special cases, e.g. when download from the original repository is
-# slow, but a fast mirror exists but may be out of date.
-#
-# Normally, this variable needs not be set.
-
 # @ECLASS-VARIABLE: EBZR_PROJECT
 # @DESCRIPTION:
 # The project name of your ebuild.  Normally, the branch will be stored
@@ -231,19 +220,7 @@ bzr_fetch() {
${EBZR_INIT_REPO_CMD} "${repo_dir}" \
|| die "${ECLASS}: can't create shared 
repository"
fi
-
-   if [[ -z ${EBZR_INITIAL_URI} ]]; then
-   _bzr_initial_fetch "${EBZR_REPO_URI}" "${branch_dir}"
-   else
-   # Workaround for faster initial download. This clones 
the
-   # branch from a fast server (which may be out of date), 
and
-   # subsequently pulls from the slow original repository.
-   _bzr_initial_fetch "${EBZR_INITIAL_URI}" "${branch_dir}"
-   if [[ ${EBZR_REPO_URI} != "${EBZR_INITIAL_URI}" ]]; then
-   EBZR_UPDATE_CMD="${EBZR_UPDATE_CMD} --remember 
--overwrite" \
-   bzr_update "${EBZR_REPO_URI}" 
"${branch_dir}"
-   fi
-   fi
+   _bzr_initial_fetch "${EBZR_REPO_URI}" "${branch_dir}"
else
_bzr_update "${EBZR_REPO_URI}" "${branch_dir}"
fi
-- 
2.33.0




[gentoo-dev] [PATCH v2 5/6] bzr.eclass: Don't rely on sandbox internals

2021-09-25 Thread Ulrich Müller
Signed-off-by: Ulrich Müller 
---
 eclass/bzr.eclass | 18 --
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/eclass/bzr.eclass b/eclass/bzr.eclass
index de73aed7f676..5dd5d40c13fa 100644
--- a/eclass/bzr.eclass
+++ b/eclass/bzr.eclass
@@ -201,16 +201,16 @@ _bzr_update() {
 # bzr branch or bzr pull, depending on whether there is an existing
 # working copy.
 bzr_fetch() {
-   local repo_dir branch_dir
-   local save_sandbox_write=${SANDBOX_WRITE} save_umask
+   local repo_dir branch_dir save_umask
 
[[ -n ${EBZR_REPO_URI} ]] || die "${ECLASS}: EBZR_REPO_URI is empty"
 
-   if [[ ! -d ${EBZR_STORE_DIR} ]] ; then
-   addwrite /
-   mkdir -p "${EBZR_STORE_DIR}" \
-   || die "${ECLASS}: can't mkdir ${EBZR_STORE_DIR}"
-   SANDBOX_WRITE=${save_sandbox_write}
+   if [[ ! -d ${EBZR_STORE_DIR} ]]; then
+   (
+   addwrite /
+   mkdir -p "${EBZR_STORE_DIR}" \
+   || die "${ECLASS}: can't mkdir 
${EBZR_STORE_DIR}"
+   )
fi
 
pushd "${EBZR_STORE_DIR}" > /dev/null \
@@ -220,7 +220,7 @@ bzr_fetch() {
branch_dir=${repo_dir}${EBZR_BRANCH:+/${EBZR_BRANCH}}
 
if [[ -n ${EVCS_UMASK} ]]; then
-   save_umask=$(umask)
+   save_umask=$(umask) || die
umask "${EVCS_UMASK}" || die
fi
addwrite "${EBZR_STORE_DIR}"
@@ -248,8 +248,6 @@ bzr_fetch() {
_bzr_update "${EBZR_REPO_URI}" "${branch_dir}"
fi
 
-   # Restore sandbox environment and umask
-   SANDBOX_WRITE=${save_sandbox_write}
if [[ -n ${save_umask} ]]; then
umask "${save_umask}" || die
fi
-- 
2.33.0




[gentoo-dev] [PATCH v2 4/6] bzr.eclass: Fix EBZR_OFFLINE logic

2021-09-25 Thread Ulrich Müller
Signed-off-by: Ulrich Müller 
---
 eclass/bzr.eclass | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/eclass/bzr.eclass b/eclass/bzr.eclass
index d5ac999aeb8c..de73aed7f676 100644
--- a/eclass/bzr.eclass
+++ b/eclass/bzr.eclass
@@ -158,8 +158,8 @@ EXPORT_FUNCTIONS src_unpack
 _bzr_initial_fetch() {
local repo_uri=$1 branch_dir=$2
 
-   if [[ -n "${EBZR_OFFLINE}" ]]; then
-   ewarn "EBZR_OFFLINE cannot be used when there is no local 
branch yet."
+   if [[ -n ${EBZR_OFFLINE} ]]; then
+   die "EBZR_OFFLINE cannot be used when there is no local branch 
yet."
fi
 
# fetch branch
@@ -179,7 +179,7 @@ _bzr_initial_fetch() {
 _bzr_update() {
local repo_uri=$1 branch_dir=$2
 
-   if [[ -n "${EBZR_OFFLINE}" ]]; then
+   if [[ -n ${EBZR_OFFLINE} ]]; then
einfo "skipping bzr pull -->"
einfo "   repository: ${repo_uri}"
else
@@ -241,7 +241,6 @@ bzr_fetch() {
_bzr_initial_fetch "${EBZR_INITIAL_URI}" "${branch_dir}"
if [[ ${EBZR_REPO_URI} != "${EBZR_INITIAL_URI}" ]]; then
EBZR_UPDATE_CMD="${EBZR_UPDATE_CMD} --remember 
--overwrite" \
-   EBZR_OFFLINE="" \
bzr_update "${EBZR_REPO_URI}" 
"${branch_dir}"
fi
fi
-- 
2.33.0




[gentoo-dev] [PATCH v2 3/6] bzr.eclass: Names of internal functions, eclassdoc, messages

2021-09-25 Thread Ulrich Müller
This should not make any functional difference.

Signed-off-by: Ulrich Müller 
---
 eclass/bzr.eclass | 47 +--
 1 file changed, 25 insertions(+), 22 deletions(-)

diff --git a/eclass/bzr.eclass b/eclass/bzr.eclass
index e76af5d41d57..d5ac999aeb8c 100644
--- a/eclass/bzr.eclass
+++ b/eclass/bzr.eclass
@@ -19,11 +19,9 @@
 # Note: Just set EBZR_REPO_URI to the URI of the branch and src_unpack()
 # of this eclass will export the branch to ${WORKDIR}/${P}.
 
-EBZR="bzr.eclass"
-
 case ${EAPI} in
7|8) ;;
-   *) die "${EBZR}: EAPI ${EAPI:-0} is not supported" ;;
+   *) die "${ECLASS}: EAPI ${EAPI:-0} is not supported" ;;
 esac
 
 PROPERTIES+=" live"
@@ -33,6 +31,7 @@ BDEPEND="dev-vcs/breezy"
 EXPORT_FUNCTIONS src_unpack
 
 # @ECLASS-VARIABLE: EBZR_STORE_DIR
+# @USER_VARIABLE
 # @DESCRIPTION:
 # The directory to store all fetched Bazaar live sources.
 : ${EBZR_STORE_DIR:=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/bzr-src}
@@ -125,6 +124,7 @@ EXPORT_FUNCTIONS src_unpack
 # Revision to fetch, defaults to the latest (see brz help revisionspec).
 
 # @ECLASS-VARIABLE: EBZR_OFFLINE
+# @USER_VARIABLE
 # @DESCRIPTION:
 # Set this variable to a non-empty value to disable automatic updating
 # of a bzr source tree.  This is intended to be set outside the ebuild
@@ -132,6 +132,7 @@ EXPORT_FUNCTIONS src_unpack
 : ${EBZR_OFFLINE=${EVCS_OFFLINE}}
 
 # @ECLASS-VARIABLE: EVCS_UMASK
+# @USER_VARIABLE
 # @DEFAULT_UNSET
 # @DESCRIPTION:
 # Set this variable to a custom umask.  This is intended to be set by
@@ -148,12 +149,13 @@ EXPORT_FUNCTIONS src_unpack
 # If this variable is set to a non-empty value, EBZR_CHECKOUT_CMD will
 # be used instead of EBZR_EXPORT_CMD to copy the sources to WORKDIR.
 
-# @FUNCTION: bzr_initial_fetch
+# @FUNCTION: _bzr_initial_fetch
 # @USAGE:  
+# @INTERNAL
 # @DESCRIPTION:
 # Internal function, retrieves the source code from a repository for the
 # first time, using ${EBZR_FETCH_CMD}.
-bzr_initial_fetch() {
+_bzr_initial_fetch() {
local repo_uri=$1 branch_dir=$2
 
if [[ -n "${EBZR_OFFLINE}" ]]; then
@@ -165,15 +167,16 @@ bzr_initial_fetch() {
einfo "   repository: ${repo_uri} => ${branch_dir}"
 
${EBZR_FETCH_CMD} ${EBZR_OPTIONS} "${repo_uri}" "${branch_dir}" \
-   || die "${EBZR}: can't branch from ${repo_uri}"
+   || die "${ECLASS}: can't branch from ${repo_uri}"
 }
 
-# @FUNCTION: bzr_update
+# @FUNCTION: _bzr_update
 # @USAGE:  
+# @INTERNAL
 # @DESCRIPTION:
 # Internal function, updates the source code from a repository, using
 # ${EBZR_UPDATE_CMD}.
-bzr_update() {
+_bzr_update() {
local repo_uri=$1 branch_dir=$2
 
if [[ -n "${EBZR_OFFLINE}" ]]; then
@@ -185,10 +188,10 @@ bzr_update() {
einfo "   repository: ${repo_uri}"
 
pushd "${branch_dir}" > /dev/null \
-   || die "${EBZR}: can't chdir to ${branch_dir}"
+   || die "${ECLASS}: can't chdir to ${branch_dir}"
${EBZR_UPDATE_CMD} ${EBZR_OPTIONS} "${repo_uri}" \
-   || die "${EBZR}: can't pull from ${repo_uri}"
-   popd > /dev/null || die "${EBZR}: popd failed"
+   || die "${ECLASS}: can't pull from ${repo_uri}"
+   popd > /dev/null || die "${ECLASS}: popd failed"
fi
 }
 
@@ -201,17 +204,17 @@ bzr_fetch() {
local repo_dir branch_dir
local save_sandbox_write=${SANDBOX_WRITE} save_umask
 
-   [[ -n ${EBZR_REPO_URI} ]] || die "${EBZR}: EBZR_REPO_URI is empty"
+   [[ -n ${EBZR_REPO_URI} ]] || die "${ECLASS}: EBZR_REPO_URI is empty"
 
if [[ ! -d ${EBZR_STORE_DIR} ]] ; then
addwrite /
mkdir -p "${EBZR_STORE_DIR}" \
-   || die "${EBZR}: can't mkdir ${EBZR_STORE_DIR}"
+   || die "${ECLASS}: can't mkdir ${EBZR_STORE_DIR}"
SANDBOX_WRITE=${save_sandbox_write}
fi
 
pushd "${EBZR_STORE_DIR}" > /dev/null \
-   || die "${EBZR}: can't chdir to ${EBZR_STORE_DIR}"
+   || die "${ECLASS}: can't chdir to ${EBZR_STORE_DIR}"
 
repo_dir=${EBZR_STORE_DIR}/${EBZR_PROJECT}
branch_dir=${repo_dir}${EBZR_BRANCH:+/${EBZR_BRANCH}}
@@ -226,16 +229,16 @@ bzr_fetch() {
if [[ ${repo_dir} != "${branch_dir}" && ! -d ${repo_dir}/.bzr 
]]; then
einfo "creating shared bzr repository: ${repo_dir}"
${EBZR_INIT_REPO_CMD} "${repo_dir}" \
-   || die "${EBZR}: can't create shared repository"
+   || die "${ECLASS}: can't create shared 
repository"
fi
 
if [[ -z ${EBZR_INITIAL_URI} ]]; then
-   bzr_initial_fetch "${EBZR_REPO_URI}" "${branch_dir}"
+   _bzr_initial_fetch "${EBZR_REPO_URI}" "${branch_dir}"
else
# 

[gentoo-dev] [PATCH v2 2/6] bzr.eclass: Update for dev-vcs/breezy, support EAPIs 7 and 8

2021-09-25 Thread Ulrich Müller
Signed-off-by: Ulrich Müller 
---
 eclass/bzr.eclass | 39 +++
 1 file changed, 15 insertions(+), 24 deletions(-)

diff --git a/eclass/bzr.eclass b/eclass/bzr.eclass
index fc1de9dc9ccc..e76af5d41d57 100644
--- a/eclass/bzr.eclass
+++ b/eclass/bzr.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: bzr.eclass
@@ -9,7 +9,7 @@
 # Mark Lee 
 # Ulrich Müller 
 # Christian Faulhammer 
-# @SUPPORTED_EAPIS: 2 3 4 5 6 7
+# @SUPPORTED_EAPIS: 7 8
 # @BLURB: generic fetching functions for the Bazaar VCS
 # @DESCRIPTION:
 # The bzr.eclass provides functions to fetch and unpack sources from
@@ -21,20 +21,15 @@
 
 EBZR="bzr.eclass"
 
-PROPERTIES+=" live"
-
-if [[ ${EBZR_REPO_URI%%:*} = sftp ]]; then
-   DEPEND=">=dev-vcs/bzr-2.6.0[sftp]"
-else
-   DEPEND=">=dev-vcs/bzr-2.6.0"
-fi
-
-case ${EAPI:-0} in
-   2|3|4|5|6) ;;
-   7) BDEPEND="${DEPEND}"; DEPEND="" ;;
+case ${EAPI} in
+   7|8) ;;
*) die "${EBZR}: EAPI ${EAPI:-0} is not supported" ;;
 esac
 
+PROPERTIES+=" live"
+
+BDEPEND="dev-vcs/breezy"
+
 EXPORT_FUNCTIONS src_unpack
 
 # @ECLASS-VARIABLE: EBZR_STORE_DIR
@@ -50,32 +45,32 @@ EXPORT_FUNCTIONS src_unpack
 # @ECLASS-VARIABLE: EBZR_INIT_REPO_CMD
 # @DESCRIPTION:
 # The Bazaar command to initialise a shared repository.
-: ${EBZR_INIT_REPO_CMD:="bzr init-repository --no-trees"}
+: ${EBZR_INIT_REPO_CMD:="brz init-shared-repository --no-trees"}
 
 # @ECLASS-VARIABLE: EBZR_FETCH_CMD
 # @DESCRIPTION:
 # The Bazaar command to fetch the sources.
-: ${EBZR_FETCH_CMD:="bzr branch --no-tree"}
+: ${EBZR_FETCH_CMD:="brz branch --no-tree"}
 
 # @ECLASS-VARIABLE: EBZR_UPDATE_CMD
 # @DESCRIPTION:
 # The Bazaar command to update the sources.
-: ${EBZR_UPDATE_CMD:="bzr pull --overwrite-tags"}
+: ${EBZR_UPDATE_CMD:="brz pull --overwrite-tags"}
 
 # @ECLASS-VARIABLE: EBZR_EXPORT_CMD
 # @DESCRIPTION:
 # The Bazaar command to export a branch.
-: ${EBZR_EXPORT_CMD:="bzr export"}
+: ${EBZR_EXPORT_CMD:="brz export"}
 
 # @ECLASS-VARIABLE: EBZR_CHECKOUT_CMD
 # @DESCRIPTION:
 # The Bazaar command to checkout a branch.
-: ${EBZR_CHECKOUT_CMD:="bzr checkout --lightweight -q"}
+: ${EBZR_CHECKOUT_CMD:="brz checkout --lightweight -q"}
 
 # @ECLASS-VARIABLE: EBZR_REVNO_CMD
 # @DESCRIPTION:
 # The Bazaar command to list a revision number of the branch.
-: ${EBZR_REVNO_CMD:="bzr revno"}
+: ${EBZR_REVNO_CMD:="brz revno"}
 
 # @ECLASS-VARIABLE: EBZR_OPTIONS
 # @DEFAULT_UNSET
@@ -87,9 +82,6 @@ EXPORT_FUNCTIONS src_unpack
 # @REQUIRED
 # @DESCRIPTION:
 # The repository URI for the source package.
-#
-# Note: If the ebuild uses an sftp:// URI, then the eclass will depend
-# on dev-vcs/bzr[sftp].
 
 # @ECLASS-VARIABLE: EBZR_INITIAL_URI
 # @DEFAULT_UNSET
@@ -130,8 +122,7 @@ EXPORT_FUNCTIONS src_unpack
 # @ECLASS-VARIABLE: EBZR_REVISION
 # @DEFAULT_UNSET
 # @DESCRIPTION:
-# Revision to fetch, defaults to the latest
-# (see http://bazaar-vcs.org/BzrRevisionSpec or bzr help revisionspec).
+# Revision to fetch, defaults to the latest (see brz help revisionspec).
 
 # @ECLASS-VARIABLE: EBZR_OFFLINE
 # @DESCRIPTION:
-- 
2.33.0




[gentoo-dev] [PATCH v2 1/6] bzr.eclass: Reinstate eclass

2021-09-25 Thread Ulrich Müller
Taken from commit 320fcf034f5e860454e0d2a28ed405c5b843c60c.

Signed-off-by: Ulrich Müller 
---
 eclass/bzr.eclass | 289 ++
 1 file changed, 289 insertions(+)
 create mode 100644 eclass/bzr.eclass

diff --git a/eclass/bzr.eclass b/eclass/bzr.eclass
new file mode 100644
index ..fc1de9dc9ccc
--- /dev/null
+++ b/eclass/bzr.eclass
@@ -0,0 +1,289 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: bzr.eclass
+# @MAINTAINER:
+# Ulrich Müller 
+# @AUTHOR:
+# Jorge Manuel B. S. Vicetto 
+# Mark Lee 
+# Ulrich Müller 
+# Christian Faulhammer 
+# @SUPPORTED_EAPIS: 2 3 4 5 6 7
+# @BLURB: generic fetching functions for the Bazaar VCS
+# @DESCRIPTION:
+# The bzr.eclass provides functions to fetch and unpack sources from
+# repositories of the Bazaar distributed version control system.
+# The eclass was originally derived from git.eclass.
+#
+# Note: Just set EBZR_REPO_URI to the URI of the branch and src_unpack()
+# of this eclass will export the branch to ${WORKDIR}/${P}.
+
+EBZR="bzr.eclass"
+
+PROPERTIES+=" live"
+
+if [[ ${EBZR_REPO_URI%%:*} = sftp ]]; then
+   DEPEND=">=dev-vcs/bzr-2.6.0[sftp]"
+else
+   DEPEND=">=dev-vcs/bzr-2.6.0"
+fi
+
+case ${EAPI:-0} in
+   2|3|4|5|6) ;;
+   7) BDEPEND="${DEPEND}"; DEPEND="" ;;
+   *) die "${EBZR}: EAPI ${EAPI:-0} is not supported" ;;
+esac
+
+EXPORT_FUNCTIONS src_unpack
+
+# @ECLASS-VARIABLE: EBZR_STORE_DIR
+# @DESCRIPTION:
+# The directory to store all fetched Bazaar live sources.
+: ${EBZR_STORE_DIR:=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/bzr-src}
+
+# @ECLASS-VARIABLE: EBZR_UNPACK_DIR
+# @DESCRIPTION:
+# The working directory where the sources are copied to.
+: ${EBZR_UNPACK_DIR:=${WORKDIR}/${P}}
+
+# @ECLASS-VARIABLE: EBZR_INIT_REPO_CMD
+# @DESCRIPTION:
+# The Bazaar command to initialise a shared repository.
+: ${EBZR_INIT_REPO_CMD:="bzr init-repository --no-trees"}
+
+# @ECLASS-VARIABLE: EBZR_FETCH_CMD
+# @DESCRIPTION:
+# The Bazaar command to fetch the sources.
+: ${EBZR_FETCH_CMD:="bzr branch --no-tree"}
+
+# @ECLASS-VARIABLE: EBZR_UPDATE_CMD
+# @DESCRIPTION:
+# The Bazaar command to update the sources.
+: ${EBZR_UPDATE_CMD:="bzr pull --overwrite-tags"}
+
+# @ECLASS-VARIABLE: EBZR_EXPORT_CMD
+# @DESCRIPTION:
+# The Bazaar command to export a branch.
+: ${EBZR_EXPORT_CMD:="bzr export"}
+
+# @ECLASS-VARIABLE: EBZR_CHECKOUT_CMD
+# @DESCRIPTION:
+# The Bazaar command to checkout a branch.
+: ${EBZR_CHECKOUT_CMD:="bzr checkout --lightweight -q"}
+
+# @ECLASS-VARIABLE: EBZR_REVNO_CMD
+# @DESCRIPTION:
+# The Bazaar command to list a revision number of the branch.
+: ${EBZR_REVNO_CMD:="bzr revno"}
+
+# @ECLASS-VARIABLE: EBZR_OPTIONS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The options passed to the fetch and update commands.
+
+# @ECLASS-VARIABLE: EBZR_REPO_URI
+# @DEFAULT_UNSET
+# @REQUIRED
+# @DESCRIPTION:
+# The repository URI for the source package.
+#
+# Note: If the ebuild uses an sftp:// URI, then the eclass will depend
+# on dev-vcs/bzr[sftp].
+
+# @ECLASS-VARIABLE: EBZR_INITIAL_URI
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The URI used for initial branching of the source repository.  If this
+# variable is set, the initial branch will be cloned from the location
+# specified, followed by a pull from ${EBZR_REPO_URI}.  This is intended
+# for special cases, e.g. when download from the original repository is
+# slow, but a fast mirror exists but may be out of date.
+#
+# Normally, this variable needs not be set.
+
+# @ECLASS-VARIABLE: EBZR_PROJECT
+# @DESCRIPTION:
+# The project name of your ebuild.  Normally, the branch will be stored
+# in the ${EBZR_STORE_DIR}/${EBZR_PROJECT} directory.
+#
+# If EBZR_BRANCH is set (see below), then a shared repository will be
+# created in that directory, and the branch will be located in
+# ${EBZR_STORE_DIR}/${EBZR_PROJECT}/${EBZR_BRANCH}.
+: ${EBZR_PROJECT:=${PN}}
+
+# @ECLASS-VARIABLE: EBZR_BRANCH
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The directory where to store the branch within a shared repository,
+# relative to ${EBZR_STORE_DIR}/${EBZR_PROJECT}.
+#
+# This variable should be set if there are several live ebuilds for
+# different branches of the same upstream project.  The branches can
+# then share the same repository in EBZR_PROJECT, which will save both
+# data traffic volume and disk space.
+#
+# If there is only a live ebuild for one single branch, EBZR_BRANCH
+# needs not be set.  In this case, the branch will be stored in a
+# stand-alone repository directly in EBZR_PROJECT.
+
+# @ECLASS-VARIABLE: EBZR_REVISION
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Revision to fetch, defaults to the latest
+# (see http://bazaar-vcs.org/BzrRevisionSpec or bzr help revisionspec).
+
+# @ECLASS-VARIABLE: EBZR_OFFLINE
+# @DESCRIPTION:
+# Set this variable to a non-empty value to disable automatic updating
+# of a bzr source tree.  This is intended to be set outside the ebuild
+# by users.
+: 

Re: [gentoo-dev] [PATCH 1/2] bzr.eclass: Reinstate eclass

2021-09-25 Thread Ulrich Mueller
> On Sat, 25 Sep 2021, Arthur Zamarin wrote:

> On 25/09/2021 12:36, Ulrich Müller wrote:
>> +if [[ -z ${EBZR_INITIAL_URI} ]]; then
>> +bzr_initial_fetch "${EBZR_REPO_URI}" "${branch_dir}"
>> +else
>> +# Workaround for faster initial download. This clones 
>> the
>> +# branch from a fast server (which may be out of date), 
>> and
>> +# subsequently pulls from the slow original repository.
>> +bzr_initial_fetch "${EBZR_INITIAL_URI}" "${branch_dir}"
>> +if [[ ${EBZR_REPO_URI} != "${EBZR_INITIAL_URI}" ]]; then
>> +EBZR_UPDATE_CMD="${EBZR_UPDATE_CMD} --remember 
>> --overwrite" \
>> +EBZR_OFFLINE="" \
>> +bzr_update "${EBZR_REPO_URI}" 
>> "${branch_dir}"
>> +fi

> This logic maybe can be improved and made easier, by defaulting
> EBZR_INITIAL_URI to be by default EBZR_REPO_URI (as a result, the
> first call to bzr_initial_fetch can be done outside the if), and if
> the ebuild writer changed it (check using the if here), then do the
> next bzr_update.

> Or another option, instead of setting by default, do the first fetch as:
> bzr_initial_fetch "${EBZR_INITIAL_URI:-${EBZR_REPO_URI}}" "${branch_dir}"
> But I think this one is less readable.

>> +fi

I am going to drop support for EBZR_INITIAL_URI altogether. This was a
special case used for GNU Emacs, which historically had a slow original
repository and a fast (but possibly out of date) mirror. It is unlikely
that we will need this again.

Ulrich


signature.asc
Description: PGP signature


Re: [gentoo-dev] [PATCH 1/2] bzr.eclass: Reinstate eclass

2021-09-25 Thread Arthur Zamarin

On 25/09/2021 12:36, Ulrich Müller wrote:

Taken from commit 320fcf034f5e860454e0d2a28ed405c5b843c60c.

Signed-off-by: Ulrich Müller 
---
  eclass/bzr.eclass | 289 ++
  1 file changed, 289 insertions(+)
  create mode 100644 eclass/bzr.eclass

diff --git a/eclass/bzr.eclass b/eclass/bzr.eclass
new file mode 100644
index ..fc1de9dc9ccc
--- /dev/null
+++ b/eclass/bzr.eclass
@@ -0,0 +1,289 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: bzr.eclass
+# @MAINTAINER:
+# Ulrich Müller 
+# @AUTHOR:
+# Jorge Manuel B. S. Vicetto 
+# Mark Lee 
+# Ulrich Müller 
+# Christian Faulhammer 
+# @SUPPORTED_EAPIS: 2 3 4 5 6 7
+# @BLURB: generic fetching functions for the Bazaar VCS
+# @DESCRIPTION:
+# The bzr.eclass provides functions to fetch and unpack sources from
+# repositories of the Bazaar distributed version control system.
+# The eclass was originally derived from git.eclass.
+#
+# Note: Just set EBZR_REPO_URI to the URI of the branch and src_unpack()
+# of this eclass will export the branch to ${WORKDIR}/${P}.
+
+EBZR="bzr.eclass"
+
+PROPERTIES+=" live"
+
+if [[ ${EBZR_REPO_URI%%:*} = sftp ]]; then
+   DEPEND=">=dev-vcs/bzr-2.6.0[sftp]"
+else
+   DEPEND=">=dev-vcs/bzr-2.6.0"
+fi
+
+case ${EAPI:-0} in
+   2|3|4|5|6) ;;
+   7) BDEPEND="${DEPEND}"; DEPEND="" ;;
+   *) die "${EBZR}: EAPI ${EAPI:-0} is not supported" ;;
+esac
+
+EXPORT_FUNCTIONS src_unpack
+
+# @ECLASS-VARIABLE: EBZR_STORE_DIR
+# @DESCRIPTION:
+# The directory to store all fetched Bazaar live sources.
+: ${EBZR_STORE_DIR:=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/bzr-src}
+
+# @ECLASS-VARIABLE: EBZR_UNPACK_DIR
+# @DESCRIPTION:
+# The working directory where the sources are copied to.
+: ${EBZR_UNPACK_DIR:=${WORKDIR}/${P}}
+
+# @ECLASS-VARIABLE: EBZR_INIT_REPO_CMD
+# @DESCRIPTION:
+# The Bazaar command to initialise a shared repository.
+: ${EBZR_INIT_REPO_CMD:="bzr init-repository --no-trees"}
+
+# @ECLASS-VARIABLE: EBZR_FETCH_CMD
+# @DESCRIPTION:
+# The Bazaar command to fetch the sources.
+: ${EBZR_FETCH_CMD:="bzr branch --no-tree"}
+
+# @ECLASS-VARIABLE: EBZR_UPDATE_CMD
+# @DESCRIPTION:
+# The Bazaar command to update the sources.
+: ${EBZR_UPDATE_CMD:="bzr pull --overwrite-tags"}
+
+# @ECLASS-VARIABLE: EBZR_EXPORT_CMD
+# @DESCRIPTION:
+# The Bazaar command to export a branch.
+: ${EBZR_EXPORT_CMD:="bzr export"}
+
+# @ECLASS-VARIABLE: EBZR_CHECKOUT_CMD
+# @DESCRIPTION:
+# The Bazaar command to checkout a branch.
+: ${EBZR_CHECKOUT_CMD:="bzr checkout --lightweight -q"}
+
+# @ECLASS-VARIABLE: EBZR_REVNO_CMD
+# @DESCRIPTION:
+# The Bazaar command to list a revision number of the branch.
+: ${EBZR_REVNO_CMD:="bzr revno"}
+
+# @ECLASS-VARIABLE: EBZR_OPTIONS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The options passed to the fetch and update commands.
+
+# @ECLASS-VARIABLE: EBZR_REPO_URI
+# @DEFAULT_UNSET
+# @REQUIRED
+# @DESCRIPTION:
+# The repository URI for the source package.
+#
+# Note: If the ebuild uses an sftp:// URI, then the eclass will depend
+# on dev-vcs/bzr[sftp].
+
+# @ECLASS-VARIABLE: EBZR_INITIAL_URI
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The URI used for initial branching of the source repository.  If this
+# variable is set, the initial branch will be cloned from the location
+# specified, followed by a pull from ${EBZR_REPO_URI}.  This is intended
+# for special cases, e.g. when download from the original repository is
+# slow, but a fast mirror exists but may be out of date.
+#
+# Normally, this variable needs not be set.
+
+# @ECLASS-VARIABLE: EBZR_PROJECT
+# @DESCRIPTION:
+# The project name of your ebuild.  Normally, the branch will be stored
+# in the ${EBZR_STORE_DIR}/${EBZR_PROJECT} directory.
+#
+# If EBZR_BRANCH is set (see below), then a shared repository will be
+# created in that directory, and the branch will be located in
+# ${EBZR_STORE_DIR}/${EBZR_PROJECT}/${EBZR_BRANCH}.
+: ${EBZR_PROJECT:=${PN}}
+
+# @ECLASS-VARIABLE: EBZR_BRANCH
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The directory where to store the branch within a shared repository,
+# relative to ${EBZR_STORE_DIR}/${EBZR_PROJECT}.
+#
+# This variable should be set if there are several live ebuilds for
+# different branches of the same upstream project.  The branches can
+# then share the same repository in EBZR_PROJECT, which will save both
+# data traffic volume and disk space.
+#
+# If there is only a live ebuild for one single branch, EBZR_BRANCH
+# needs not be set.  In this case, the branch will be stored in a
+# stand-alone repository directly in EBZR_PROJECT.
+
+# @ECLASS-VARIABLE: EBZR_REVISION
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Revision to fetch, defaults to the latest
+# (see http://bazaar-vcs.org/BzrRevisionSpec or bzr help revisionspec).
+
+# @ECLASS-VARIABLE: EBZR_OFFLINE
+# @DESCRIPTION:
+# Set this variable to a non-empty value to disable automatic updating
+# of a bzr source tree.  This is intended to be set 

Re: [gentoo-dev] [PATCH 1/2] bzr.eclass: Reinstate eclass

2021-09-25 Thread Michał Górny
On Sat, 2021-09-25 at 11:36 +0200, Ulrich Müller wrote:
> Taken from commit 320fcf034f5e860454e0d2a28ed405c5b843c60c.

I suppose you'll want to apply my comments as followup changes.

> 
> Signed-off-by: Ulrich Müller 
> ---
>  eclass/bzr.eclass | 289 ++
>  1 file changed, 289 insertions(+)
>  create mode 100644 eclass/bzr.eclass
> 
> diff --git a/eclass/bzr.eclass b/eclass/bzr.eclass
> new file mode 100644
> index ..fc1de9dc9ccc
> --- /dev/null
> +++ b/eclass/bzr.eclass
> @@ -0,0 +1,289 @@
> +# Copyright 1999-2019 Gentoo Authors
> +# Distributed under the terms of the GNU General Public License v2
> +
> +# @ECLASS: bzr.eclass
> +# @MAINTAINER:
> +# Ulrich Müller 
> +# @AUTHOR:
> +# Jorge Manuel B. S. Vicetto 
> +# Mark Lee 
> +# Ulrich Müller 
> +# Christian Faulhammer 
> +# @SUPPORTED_EAPIS: 2 3 4 5 6 7
> +# @BLURB: generic fetching functions for the Bazaar VCS
> +# @DESCRIPTION:
> +# The bzr.eclass provides functions to fetch and unpack sources from
> +# repositories of the Bazaar distributed version control system.
> +# The eclass was originally derived from git.eclass.
> +#
> +# Note: Just set EBZR_REPO_URI to the URI of the branch and src_unpack()
> +# of this eclass will export the branch to ${WORKDIR}/${P}.
> +
> +EBZR="bzr.eclass"

Why do we need this?  It seems as if someone is reinventing ${ECLASS}.

> +
> +PROPERTIES+=" live"
> +
> +if [[ ${EBZR_REPO_URI%%:*} = sftp ]]; then
> + DEPEND=">=dev-vcs/bzr-2.6.0[sftp]"
> +else
> + DEPEND=">=dev-vcs/bzr-2.6.0"
> +fi
> +
> +case ${EAPI:-0} in
> + 2|3|4|5|6) ;;
> + 7) BDEPEND="${DEPEND}"; DEPEND="" ;;
> + *) die "${EBZR}: EAPI ${EAPI:-0} is not supported" ;;
> +esac
> +
> +EXPORT_FUNCTIONS src_unpack
> +
> +# @ECLASS-VARIABLE: EBZR_STORE_DIR

@USER_VARIABLE?

> +# @DESCRIPTION:
> +# The directory to store all fetched Bazaar live sources.
> +: ${EBZR_STORE_DIR:=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/bzr-src}
> +
> +# @ECLASS-VARIABLE: EBZR_UNPACK_DIR
> +# @DESCRIPTION:
> +# The working directory where the sources are copied to.
> +: ${EBZR_UNPACK_DIR:=${WORKDIR}/${P}}
> +
> +# @ECLASS-VARIABLE: EBZR_INIT_REPO_CMD
> +# @DESCRIPTION:
> +# The Bazaar command to initialise a shared repository.
> +: ${EBZR_INIT_REPO_CMD:="bzr init-repository --no-trees"}
> +
> +# @ECLASS-VARIABLE: EBZR_FETCH_CMD
> +# @DESCRIPTION:
> +# The Bazaar command to fetch the sources.
> +: ${EBZR_FETCH_CMD:="bzr branch --no-tree"}
> +
> +# @ECLASS-VARIABLE: EBZR_UPDATE_CMD
> +# @DESCRIPTION:
> +# The Bazaar command to update the sources.
> +: ${EBZR_UPDATE_CMD:="bzr pull --overwrite-tags"}
> +
> +# @ECLASS-VARIABLE: EBZR_EXPORT_CMD
> +# @DESCRIPTION:
> +# The Bazaar command to export a branch.
> +: ${EBZR_EXPORT_CMD:="bzr export"}
> +
> +# @ECLASS-VARIABLE: EBZR_CHECKOUT_CMD
> +# @DESCRIPTION:
> +# The Bazaar command to checkout a branch.
> +: ${EBZR_CHECKOUT_CMD:="bzr checkout --lightweight -q"}
> +
> +# @ECLASS-VARIABLE: EBZR_REVNO_CMD
> +# @DESCRIPTION:
> +# The Bazaar command to list a revision number of the branch.
> +: ${EBZR_REVNO_CMD:="bzr revno"}

Are you sure that having these overrides is a good idea?  Your followup
patch pretty much proves that every ebuild redefining them would get
broken by switch to breezy.

> +
> +# @ECLASS-VARIABLE: EBZR_OPTIONS
> +# @DEFAULT_UNSET
> +# @DESCRIPTION:
> +# The options passed to the fetch and update commands.

Is this intended to be set by ebuild or by user?

> +
> +# @ECLASS-VARIABLE: EBZR_REPO_URI
> +# @DEFAULT_UNSET
> +# @REQUIRED
> +# @DESCRIPTION:
> +# The repository URI for the source package.
> +#
> +# Note: If the ebuild uses an sftp:// URI, then the eclass will depend
> +# on dev-vcs/bzr[sftp].
> +
> +# @ECLASS-VARIABLE: EBZR_INITIAL_URI
> +# @DEFAULT_UNSET
> +# @DESCRIPTION:
> +# The URI used for initial branching of the source repository.  If this
> +# variable is set, the initial branch will be cloned from the location
> +# specified, followed by a pull from ${EBZR_REPO_URI}.  This is intended
> +# for special cases, e.g. when download from the original repository is
> +# slow, but a fast mirror exists but may be out of date.
> +#
> +# Normally, this variable needs not be set.
> +
> +# @ECLASS-VARIABLE: EBZR_PROJECT
> +# @DESCRIPTION:
> +# The project name of your ebuild.  Normally, the branch will be stored
> +# in the ${EBZR_STORE_DIR}/${EBZR_PROJECT} directory.
> +#
> +# If EBZR_BRANCH is set (see below), then a shared repository will be
> +# created in that directory, and the branch will be located in
> +# ${EBZR_STORE_DIR}/${EBZR_PROJECT}/${EBZR_BRANCH}.
> +: ${EBZR_PROJECT:=${PN}}
> +
> +# @ECLASS-VARIABLE: EBZR_BRANCH
> +# @DEFAULT_UNSET
> +# @DESCRIPTION:
> +# The directory where to store the branch within a shared repository,
> +# relative to ${EBZR_STORE_DIR}/${EBZR_PROJECT}.
> +#
> +# This variable should be set if there are several live ebuilds for
> +# different branches of the same upstream project.  The branches can
> +# then share the 

[gentoo-dev] [PATCH 2/2] bzr.eclass: Update for dev-vcs/breezy, support EAPIs 7 and 8

2021-09-25 Thread Ulrich Müller
Signed-off-by: Ulrich Müller 
---
 eclass/bzr.eclass | 39 +++
 1 file changed, 15 insertions(+), 24 deletions(-)

diff --git a/eclass/bzr.eclass b/eclass/bzr.eclass
index fc1de9dc9ccc..e76af5d41d57 100644
--- a/eclass/bzr.eclass
+++ b/eclass/bzr.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: bzr.eclass
@@ -9,7 +9,7 @@
 # Mark Lee 
 # Ulrich Müller 
 # Christian Faulhammer 
-# @SUPPORTED_EAPIS: 2 3 4 5 6 7
+# @SUPPORTED_EAPIS: 7 8
 # @BLURB: generic fetching functions for the Bazaar VCS
 # @DESCRIPTION:
 # The bzr.eclass provides functions to fetch and unpack sources from
@@ -21,20 +21,15 @@
 
 EBZR="bzr.eclass"
 
-PROPERTIES+=" live"
-
-if [[ ${EBZR_REPO_URI%%:*} = sftp ]]; then
-   DEPEND=">=dev-vcs/bzr-2.6.0[sftp]"
-else
-   DEPEND=">=dev-vcs/bzr-2.6.0"
-fi
-
-case ${EAPI:-0} in
-   2|3|4|5|6) ;;
-   7) BDEPEND="${DEPEND}"; DEPEND="" ;;
+case ${EAPI} in
+   7|8) ;;
*) die "${EBZR}: EAPI ${EAPI:-0} is not supported" ;;
 esac
 
+PROPERTIES+=" live"
+
+BDEPEND="dev-vcs/breezy"
+
 EXPORT_FUNCTIONS src_unpack
 
 # @ECLASS-VARIABLE: EBZR_STORE_DIR
@@ -50,32 +45,32 @@ EXPORT_FUNCTIONS src_unpack
 # @ECLASS-VARIABLE: EBZR_INIT_REPO_CMD
 # @DESCRIPTION:
 # The Bazaar command to initialise a shared repository.
-: ${EBZR_INIT_REPO_CMD:="bzr init-repository --no-trees"}
+: ${EBZR_INIT_REPO_CMD:="brz init-shared-repository --no-trees"}
 
 # @ECLASS-VARIABLE: EBZR_FETCH_CMD
 # @DESCRIPTION:
 # The Bazaar command to fetch the sources.
-: ${EBZR_FETCH_CMD:="bzr branch --no-tree"}
+: ${EBZR_FETCH_CMD:="brz branch --no-tree"}
 
 # @ECLASS-VARIABLE: EBZR_UPDATE_CMD
 # @DESCRIPTION:
 # The Bazaar command to update the sources.
-: ${EBZR_UPDATE_CMD:="bzr pull --overwrite-tags"}
+: ${EBZR_UPDATE_CMD:="brz pull --overwrite-tags"}
 
 # @ECLASS-VARIABLE: EBZR_EXPORT_CMD
 # @DESCRIPTION:
 # The Bazaar command to export a branch.
-: ${EBZR_EXPORT_CMD:="bzr export"}
+: ${EBZR_EXPORT_CMD:="brz export"}
 
 # @ECLASS-VARIABLE: EBZR_CHECKOUT_CMD
 # @DESCRIPTION:
 # The Bazaar command to checkout a branch.
-: ${EBZR_CHECKOUT_CMD:="bzr checkout --lightweight -q"}
+: ${EBZR_CHECKOUT_CMD:="brz checkout --lightweight -q"}
 
 # @ECLASS-VARIABLE: EBZR_REVNO_CMD
 # @DESCRIPTION:
 # The Bazaar command to list a revision number of the branch.
-: ${EBZR_REVNO_CMD:="bzr revno"}
+: ${EBZR_REVNO_CMD:="brz revno"}
 
 # @ECLASS-VARIABLE: EBZR_OPTIONS
 # @DEFAULT_UNSET
@@ -87,9 +82,6 @@ EXPORT_FUNCTIONS src_unpack
 # @REQUIRED
 # @DESCRIPTION:
 # The repository URI for the source package.
-#
-# Note: If the ebuild uses an sftp:// URI, then the eclass will depend
-# on dev-vcs/bzr[sftp].
 
 # @ECLASS-VARIABLE: EBZR_INITIAL_URI
 # @DEFAULT_UNSET
@@ -130,8 +122,7 @@ EXPORT_FUNCTIONS src_unpack
 # @ECLASS-VARIABLE: EBZR_REVISION
 # @DEFAULT_UNSET
 # @DESCRIPTION:
-# Revision to fetch, defaults to the latest
-# (see http://bazaar-vcs.org/BzrRevisionSpec or bzr help revisionspec).
+# Revision to fetch, defaults to the latest (see brz help revisionspec).
 
 # @ECLASS-VARIABLE: EBZR_OFFLINE
 # @DESCRIPTION:
-- 
2.33.0




[gentoo-dev] [PATCH 1/2] bzr.eclass: Reinstate eclass

2021-09-25 Thread Ulrich Müller
Taken from commit 320fcf034f5e860454e0d2a28ed405c5b843c60c.

Signed-off-by: Ulrich Müller 
---
 eclass/bzr.eclass | 289 ++
 1 file changed, 289 insertions(+)
 create mode 100644 eclass/bzr.eclass

diff --git a/eclass/bzr.eclass b/eclass/bzr.eclass
new file mode 100644
index ..fc1de9dc9ccc
--- /dev/null
+++ b/eclass/bzr.eclass
@@ -0,0 +1,289 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: bzr.eclass
+# @MAINTAINER:
+# Ulrich Müller 
+# @AUTHOR:
+# Jorge Manuel B. S. Vicetto 
+# Mark Lee 
+# Ulrich Müller 
+# Christian Faulhammer 
+# @SUPPORTED_EAPIS: 2 3 4 5 6 7
+# @BLURB: generic fetching functions for the Bazaar VCS
+# @DESCRIPTION:
+# The bzr.eclass provides functions to fetch and unpack sources from
+# repositories of the Bazaar distributed version control system.
+# The eclass was originally derived from git.eclass.
+#
+# Note: Just set EBZR_REPO_URI to the URI of the branch and src_unpack()
+# of this eclass will export the branch to ${WORKDIR}/${P}.
+
+EBZR="bzr.eclass"
+
+PROPERTIES+=" live"
+
+if [[ ${EBZR_REPO_URI%%:*} = sftp ]]; then
+   DEPEND=">=dev-vcs/bzr-2.6.0[sftp]"
+else
+   DEPEND=">=dev-vcs/bzr-2.6.0"
+fi
+
+case ${EAPI:-0} in
+   2|3|4|5|6) ;;
+   7) BDEPEND="${DEPEND}"; DEPEND="" ;;
+   *) die "${EBZR}: EAPI ${EAPI:-0} is not supported" ;;
+esac
+
+EXPORT_FUNCTIONS src_unpack
+
+# @ECLASS-VARIABLE: EBZR_STORE_DIR
+# @DESCRIPTION:
+# The directory to store all fetched Bazaar live sources.
+: ${EBZR_STORE_DIR:=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/bzr-src}
+
+# @ECLASS-VARIABLE: EBZR_UNPACK_DIR
+# @DESCRIPTION:
+# The working directory where the sources are copied to.
+: ${EBZR_UNPACK_DIR:=${WORKDIR}/${P}}
+
+# @ECLASS-VARIABLE: EBZR_INIT_REPO_CMD
+# @DESCRIPTION:
+# The Bazaar command to initialise a shared repository.
+: ${EBZR_INIT_REPO_CMD:="bzr init-repository --no-trees"}
+
+# @ECLASS-VARIABLE: EBZR_FETCH_CMD
+# @DESCRIPTION:
+# The Bazaar command to fetch the sources.
+: ${EBZR_FETCH_CMD:="bzr branch --no-tree"}
+
+# @ECLASS-VARIABLE: EBZR_UPDATE_CMD
+# @DESCRIPTION:
+# The Bazaar command to update the sources.
+: ${EBZR_UPDATE_CMD:="bzr pull --overwrite-tags"}
+
+# @ECLASS-VARIABLE: EBZR_EXPORT_CMD
+# @DESCRIPTION:
+# The Bazaar command to export a branch.
+: ${EBZR_EXPORT_CMD:="bzr export"}
+
+# @ECLASS-VARIABLE: EBZR_CHECKOUT_CMD
+# @DESCRIPTION:
+# The Bazaar command to checkout a branch.
+: ${EBZR_CHECKOUT_CMD:="bzr checkout --lightweight -q"}
+
+# @ECLASS-VARIABLE: EBZR_REVNO_CMD
+# @DESCRIPTION:
+# The Bazaar command to list a revision number of the branch.
+: ${EBZR_REVNO_CMD:="bzr revno"}
+
+# @ECLASS-VARIABLE: EBZR_OPTIONS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The options passed to the fetch and update commands.
+
+# @ECLASS-VARIABLE: EBZR_REPO_URI
+# @DEFAULT_UNSET
+# @REQUIRED
+# @DESCRIPTION:
+# The repository URI for the source package.
+#
+# Note: If the ebuild uses an sftp:// URI, then the eclass will depend
+# on dev-vcs/bzr[sftp].
+
+# @ECLASS-VARIABLE: EBZR_INITIAL_URI
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The URI used for initial branching of the source repository.  If this
+# variable is set, the initial branch will be cloned from the location
+# specified, followed by a pull from ${EBZR_REPO_URI}.  This is intended
+# for special cases, e.g. when download from the original repository is
+# slow, but a fast mirror exists but may be out of date.
+#
+# Normally, this variable needs not be set.
+
+# @ECLASS-VARIABLE: EBZR_PROJECT
+# @DESCRIPTION:
+# The project name of your ebuild.  Normally, the branch will be stored
+# in the ${EBZR_STORE_DIR}/${EBZR_PROJECT} directory.
+#
+# If EBZR_BRANCH is set (see below), then a shared repository will be
+# created in that directory, and the branch will be located in
+# ${EBZR_STORE_DIR}/${EBZR_PROJECT}/${EBZR_BRANCH}.
+: ${EBZR_PROJECT:=${PN}}
+
+# @ECLASS-VARIABLE: EBZR_BRANCH
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The directory where to store the branch within a shared repository,
+# relative to ${EBZR_STORE_DIR}/${EBZR_PROJECT}.
+#
+# This variable should be set if there are several live ebuilds for
+# different branches of the same upstream project.  The branches can
+# then share the same repository in EBZR_PROJECT, which will save both
+# data traffic volume and disk space.
+#
+# If there is only a live ebuild for one single branch, EBZR_BRANCH
+# needs not be set.  In this case, the branch will be stored in a
+# stand-alone repository directly in EBZR_PROJECT.
+
+# @ECLASS-VARIABLE: EBZR_REVISION
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Revision to fetch, defaults to the latest
+# (see http://bazaar-vcs.org/BzrRevisionSpec or bzr help revisionspec).
+
+# @ECLASS-VARIABLE: EBZR_OFFLINE
+# @DESCRIPTION:
+# Set this variable to a non-empty value to disable automatic updating
+# of a bzr source tree.  This is intended to be set outside the ebuild
+# by users.
+: