[gentoo-commits] repo/gentoo:master commit in: dev-perl/Mail-Message/

2020-05-19 Thread Georgy Yakovlev
commit: e485fe4342612bbc0b74b4d383b34dff7adb32cd
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Wed May 20 05:45:21 2020 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Wed May 20 05:50:23 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e485fe43

dev-perl/Mail-Message: add ~ppc64 keyword

Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Georgy Yakovlev  gentoo.org>

 dev-perl/Mail-Message/Mail-Message-3.2.0.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-perl/Mail-Message/Mail-Message-3.2.0.ebuild 
b/dev-perl/Mail-Message/Mail-Message-3.2.0.ebuild
index 0bf3abfa7ab..c8723e8ba5f 100644
--- a/dev-perl/Mail-Message/Mail-Message-3.2.0.ebuild
+++ b/dev-perl/Mail-Message/Mail-Message-3.2.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -9,7 +9,7 @@ inherit perl-module
 
 DESCRIPTION="General Message Object for MIME Messsage Handling"
 SLOT="0"
-KEYWORDS="~alpha amd64 x86"
+KEYWORDS="~alpha amd64 ~ppc64 x86"
 IUSE="test"
 RESTRICT="!test? ( test )"
 



[gentoo-commits] repo/gentoo:master commit in: dev-perl/Mail-Transport/

2020-05-19 Thread Georgy Yakovlev
commit: 0ea378923d4623bd8fe403df44496a3037afd38f
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Wed May 20 05:45:41 2020 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Wed May 20 05:50:23 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ea37892

dev-perl/Mail-Transport: add ~ppc64 keyword

Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Georgy Yakovlev  gentoo.org>

 dev-perl/Mail-Transport/Mail-Transport-3.0.0.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-perl/Mail-Transport/Mail-Transport-3.0.0.ebuild 
b/dev-perl/Mail-Transport/Mail-Transport-3.0.0.ebuild
index a3de5e505ea..baf925325aa 100644
--- a/dev-perl/Mail-Transport/Mail-Transport-3.0.0.ebuild
+++ b/dev-perl/Mail-Transport/Mail-Transport-3.0.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -9,7 +9,7 @@ inherit perl-module
 
 DESCRIPTION="Base class for Email Message Exchange"
 SLOT="0"
-KEYWORDS="~alpha amd64 x86"
+KEYWORDS="~alpha amd64 ~ppc64 x86"
 IUSE="test"
 RESTRICT="!test? ( test )"
 



[gentoo-commits] repo/gentoo:master commit in: dev-perl/Mail-Box/

2020-05-19 Thread Georgy Yakovlev
commit: 327f24f785f5414fc1faf56b39ec5b1e7cf72aee
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Wed May 20 05:48:59 2020 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Wed May 20 05:50:24 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=327f24f7

dev-perl/Mail-Box: add ~ppc64 keyword

Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Georgy Yakovlev  gentoo.org>

 dev-perl/Mail-Box/Mail-Box-3.3.0.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-perl/Mail-Box/Mail-Box-3.3.0.ebuild 
b/dev-perl/Mail-Box/Mail-Box-3.3.0.ebuild
index 07545f347d9..8edb4eb1433 100644
--- a/dev-perl/Mail-Box/Mail-Box-3.3.0.ebuild
+++ b/dev-perl/Mail-Box/Mail-Box-3.3.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -11,7 +11,7 @@ inherit perl-module
 DESCRIPTION="Mail folder manager and MUA backend"
 
 SLOT="0"
-KEYWORDS="~alpha amd64 x86"
+KEYWORDS="~alpha amd64 ~ppc64 x86"
 IUSE="test"
 RESTRICT="!test? ( test )"
 



[gentoo-commits] repo/gentoo:master commit in: dev-perl/User-Identity/

2020-05-19 Thread Georgy Yakovlev
commit: ccd1968f5d20401f4a1ecd8a55c515fe5f672a27
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Wed May 20 05:44:59 2020 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Wed May 20 05:50:23 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ccd1968f

dev-perl/User-Identity: add ~ppc64 keyword

Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Georgy Yakovlev  gentoo.org>

 dev-perl/User-Identity/User-Identity-0.990.0.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-perl/User-Identity/User-Identity-0.990.0.ebuild 
b/dev-perl/User-Identity/User-Identity-0.990.0.ebuild
index 5d15ef744be..7c6c4acbc9a 100644
--- a/dev-perl/User-Identity/User-Identity-0.990.0.ebuild
+++ b/dev-perl/User-Identity/User-Identity-0.990.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -10,7 +10,7 @@ inherit perl-module
 DESCRIPTION="Maintains info about a physical person"
 
 SLOT="0"
-KEYWORDS="~alpha amd64 x86"
+KEYWORDS="~alpha amd64 ~ppc64 x86"
 IUSE="test"
 RESTRICT="!test? ( test )"
 



[gentoo-commits] repo/gentoo:master commit in: dev-perl/Object-Realize-Later/

2020-05-19 Thread Georgy Yakovlev
commit: 72444daf0e7fc7e2a6ba718dff480efb38c7686b
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Wed May 20 05:43:49 2020 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Wed May 20 05:50:22 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72444daf

dev-perl/Object-Realize-Later: add ~ppc64 keyword

Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Georgy Yakovlev  gentoo.org>

 dev-perl/Object-Realize-Later/Object-Realize-Later-0.190.0.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-perl/Object-Realize-Later/Object-Realize-Later-0.190.0.ebuild 
b/dev-perl/Object-Realize-Later/Object-Realize-Later-0.190.0.ebuild
index e8416a014e4..b44fcac9ee9 100644
--- a/dev-perl/Object-Realize-Later/Object-Realize-Later-0.190.0.ebuild
+++ b/dev-perl/Object-Realize-Later/Object-Realize-Later-0.190.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -10,7 +10,7 @@ inherit perl-module
 DESCRIPTION="Delayed creation of objects"
 
 SLOT="0"
-KEYWORDS="~alpha amd64 x86"
+KEYWORDS="~alpha amd64 ~ppc64 x86"
 IUSE="test"
 RESTRICT="!test? ( test )"
 



[gentoo-commits] repo/gentoo:master commit in: dev-perl/Mail-Box-POP3/

2020-05-19 Thread Georgy Yakovlev
commit: b91264d3e67f3203b760d8e47ff27a24bdb69045
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Wed May 20 05:47:58 2020 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Wed May 20 05:50:23 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b91264d3

dev-perl/Mail-Box-POP3: add ~ppc64 keyword:

Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Georgy Yakovlev  gentoo.org>

 dev-perl/Mail-Box-POP3/Mail-Box-POP3-3.3.0.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-perl/Mail-Box-POP3/Mail-Box-POP3-3.3.0.ebuild 
b/dev-perl/Mail-Box-POP3/Mail-Box-POP3-3.3.0.ebuild
index d76ac42b440..1235d297c5c 100644
--- a/dev-perl/Mail-Box-POP3/Mail-Box-POP3-3.3.0.ebuild
+++ b/dev-perl/Mail-Box-POP3/Mail-Box-POP3-3.3.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -9,7 +9,7 @@ inherit perl-module
 
 DESCRIPTION="Mail::Box connector via POP3"
 SLOT="0"
-KEYWORDS="~alpha amd64 x86"
+KEYWORDS="~alpha amd64 ~ppc64 x86"
 IUSE="test"
 RESTRICT="!test? ( test )"
 



[gentoo-commits] repo/gentoo:master commit in: dev-perl/Mail-Box-IMAP4/

2020-05-19 Thread Georgy Yakovlev
commit: 156bc1ccdc26f4ecd4bfe4d886d1f9f9e8325806
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Wed May 20 05:46:38 2020 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Wed May 20 05:50:23 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=156bc1cc

dev-perl/Mail-Box-IMAP4: add ~ppc64 keyword

Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Georgy Yakovlev  gentoo.org>

 dev-perl/Mail-Box-IMAP4/Mail-Box-IMAP4-3.2.0.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-perl/Mail-Box-IMAP4/Mail-Box-IMAP4-3.2.0.ebuild 
b/dev-perl/Mail-Box-IMAP4/Mail-Box-IMAP4-3.2.0.ebuild
index b9859fc246f..cf4a956b668 100644
--- a/dev-perl/Mail-Box-IMAP4/Mail-Box-IMAP4-3.2.0.ebuild
+++ b/dev-perl/Mail-Box-IMAP4/Mail-Box-IMAP4-3.2.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -9,7 +9,7 @@ inherit perl-module
 
 DESCRIPTION="Mail::Box connector via IMAP4"
 SLOT="0"
-KEYWORDS="~alpha amd64 x86"
+KEYWORDS="~alpha amd64 ~ppc64 x86"
 IUSE="test"
 RESTRICT="!test? ( test )"
 



[gentoo-commits] repo/gentoo:master commit in: dev-perl/Term-ReadLine-Gnu/

2020-05-19 Thread Georgy Yakovlev
commit: 697b21c79a2e91f741783553dd7cd800225756cb
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Wed May 20 05:41:47 2020 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Wed May 20 05:50:22 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=697b21c7

dev-perl/Term-ReadLine-Gnu: add ~ppc64 keyword

Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Georgy Yakovlev  gentoo.org>

 dev-perl/Term-ReadLine-Gnu/Term-ReadLine-Gnu-1.360.0.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-perl/Term-ReadLine-Gnu/Term-ReadLine-Gnu-1.360.0.ebuild 
b/dev-perl/Term-ReadLine-Gnu/Term-ReadLine-Gnu-1.360.0.ebuild
index 10ec83fa3e1..0c80b028554 100644
--- a/dev-perl/Term-ReadLine-Gnu/Term-ReadLine-Gnu-1.360.0.ebuild
+++ b/dev-perl/Term-ReadLine-Gnu/Term-ReadLine-Gnu-1.360.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -11,7 +11,7 @@ inherit perl-module
 DESCRIPTION="GNU Readline XS library wrapper"
 
 SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~s390 ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
 IUSE=""
 
 RDEPEND=">=sys-libs/readline-6.2:0="



[gentoo-commits] repo/gentoo:master commit in: net-mail/notmuch/

2020-05-19 Thread Georgy Yakovlev
commit: c57dfa733c3f42d3d5f5fade77fbcbe50c4212e2
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Wed May 20 05:50:11 2020 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Wed May 20 05:50:24 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c57dfa73

net-mail/notmuch: add ~ppc64 keyword

Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Georgy Yakovlev  gentoo.org>

 net-mail/notmuch/notmuch-0.29.3-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net-mail/notmuch/notmuch-0.29.3-r1.ebuild 
b/net-mail/notmuch/notmuch-0.29.3-r1.ebuild
index d2dc1e110e9..13810a43d49 100644
--- a/net-mail/notmuch/notmuch-0.29.3-r1.ebuild
+++ b/net-mail/notmuch/notmuch-0.29.3-r1.ebuild
@@ -18,7 +18,7 @@ LICENSE="GPL-3"
 # Sub-slot corresponds to major wersion of libnotmuch.so.X.Y.  Bump of Y is
 # meant to be binary backward compatible.
 SLOT="0/5"
-KEYWORDS="~alpha ~amd64 ~x86 ~x64-solaris"
+KEYWORDS="~alpha ~amd64 ~ppc64 ~x86 ~x64-solaris"
 REQUIRED_USE="
nmbug? ( python )
python? ( ${PYTHON_REQUIRED_USE} )



[gentoo-commits] repo/gentoo:master commit in: dev-ruby/http-accept/

2020-05-19 Thread Hans de Graaff
commit: 1863ccd4611483469f3a3d1819a10fb60021bbfa
Author: Hans de Graaff  gentoo  org>
AuthorDate: Tue May 19 18:21:22 2020 +
Commit: Hans de Graaff  gentoo  org>
CommitDate: Wed May 20 05:32:37 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1863ccd4

dev-ruby/http-accept: add ruby27

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Hans de Graaff  gentoo.org>

 dev-ruby/http-accept/http-accept-1.7.0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-ruby/http-accept/http-accept-1.7.0.ebuild 
b/dev-ruby/http-accept/http-accept-1.7.0.ebuild
index 391f22753ff..fe574509a5c 100644
--- a/dev-ruby/http-accept/http-accept-1.7.0.ebuild
+++ b/dev-ruby/http-accept/http-accept-1.7.0.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
-USE_RUBY="ruby24 ruby25 ruby26"
+USE_RUBY="ruby24 ruby25 ruby26 ruby27"
 
 RUBY_FAKEGEM_EXTRADOC="README.md"
 



[gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf-c/

2020-05-19 Thread Robin H. Johnson
commit: 4fe1341cc3226fa721a5e818ba6eeb03c42a009c
Author: Robin H. Johnson  gentoo  org>
AuthorDate: Wed May 20 05:06:20 2020 +
Commit: Robin H. Johnson  gentoo  org>
CommitDate: Wed May 20 05:08:03 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4fe1341c

dev-libs/protobuf-c: compile-fix ensure new enough dev-libs/protobuf

If the system has an old dev-libs/protobuf-2* installed, then it will
not be upgraded before protobuf-c tries to compile, which leads to
error:
```
t/issue330/issue330.protot/issue330/issue330.proto:1:10:
Unrecognized syntax identifier "proto3".
This parser only recognizes "proto2".
```

Signed-off-by: Robin H. Johnson  gentoo.org>

 dev-libs/protobuf-c/protobuf-c-1.3.2.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-libs/protobuf-c/protobuf-c-1.3.2.ebuild 
b/dev-libs/protobuf-c/protobuf-c-1.3.2.ebuild
index d6909a46a38..3c3dc101011 100644
--- a/dev-libs/protobuf-c/protobuf-c-1.3.2.ebuild
+++ b/dev-libs/protobuf-c/protobuf-c-1.3.2.ebuild
@@ -19,9 +19,9 @@ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 
s390 sparc x86"
 IUSE="static-libs test"
 RESTRICT="!test? ( test )"
 
-BDEPEND="dev-libs/protobuf:0
+BDEPEND=">=dev-libs/protobuf-3:0
virtual/pkgconfig[${MULTILIB_USEDEP}]"
-DEPEND="dev-libs/protobuf:0=[${MULTILIB_USEDEP}]"
+DEPEND=">=dev-libs/protobuf-3:0=[${MULTILIB_USEDEP}]"
 RDEPEND="${DEPEND}"
 
 S="${WORKDIR}/${MY_P}"



[gentoo-commits] repo/gentoo:master commit in: dev-python/tenacity/

2020-05-19 Thread Matthew Thode
commit: c69d673b67cc0a95d66be099124e00c862eaaf47
Author: Matthew Thode  gentoo  org>
AuthorDate: Wed May 20 04:42:52 2020 +
Commit: Matthew Thode  gentoo  org>
CommitDate: Wed May 20 04:44:08 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c69d673b

dev-python/tenacity: 6.1.0 ussuri bump

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Matthew Thode  gentoo.org>

 dev-python/tenacity/Manifest  |  1 +
 dev-python/tenacity/tenacity-6.1.0.ebuild | 28 
 2 files changed, 29 insertions(+)

diff --git a/dev-python/tenacity/Manifest b/dev-python/tenacity/Manifest
index f5ead182f12..f4db4fea869 100644
--- a/dev-python/tenacity/Manifest
+++ b/dev-python/tenacity/Manifest
@@ -1 +1,2 @@
 DIST tenacity-4.8.0.tar.gz 28057 BLAKE2B 
31451b061c594a47fdf4e6ae97e09c601d95ef76afc805d6f746624e3cf18a0f7c288567a5fd5ff8c264d00ce55a635afa2920799c256168dd89ac800f0d3ca3
 SHA512 
4662a92325de6b2dd7f6dd8823cecfdf0cc2f1390d054c8ba14f84fedb917cf5896d5c26aaaba9816303dea06ad7f922877c8a09e248319317155e2d6f509873
+DIST tenacity-6.1.0.tar.gz 33438 BLAKE2B 
e3f7c0ef19f98c0ac5b2a9a1be53241292d895547e5c10810ff94c27f34e8bbca7ef3aea79ce6e4042c84109e209b4be2913e6231233a3b050c18ed52f8af087
 SHA512 
a8f52f77e066a35c4a35cdd80fe01922613d9f4ca07975aece4a35bc743475f7540bf419e5095eacf94cb248ce33bdd89b46c5e3c5bd5a93bd99a601cf580732

diff --git a/dev-python/tenacity/tenacity-6.1.0.ebuild 
b/dev-python/tenacity/tenacity-6.1.0.ebuild
new file mode 100644
index 000..5050891c0b9
--- /dev/null
+++ b/dev-python/tenacity/tenacity-6.1.0.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7} )
+
+inherit distutils-r1
+
+DESCRIPTION="General-purpose retrying library"
+HOMEPAGE="https://github.com/jd/tenacity;
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE=""
+
+DEPEND="
+   dev-python/pbr[${PYTHON_USEDEP}]
+   virtual/python-futures[${PYTHON_USEDEP}]
+   dev-python/setuptools[${PYTHON_USEDEP}]
+"
+RDEPEND="
+   >=dev-python/six-1.9.0[${PYTHON_USEDEP}]
+   virtual/python-futures[${PYTHON_USEDEP}]
+   >=dev-python/monotonic-0.6[${PYTHON_USEDEP}]
+"



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: 103ae1aaa8a363b0cf2abb667ed13c624b3c431a
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 19:14:29 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 03:39:21 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=103ae1aa

catalyst: Drop ConfigParser

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/config.py | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/catalyst/config.py b/catalyst/config.py
index b527ada0..e1963f71 100644
--- a/catalyst/config.py
+++ b/catalyst/config.py
@@ -118,14 +118,3 @@ class SpecParser(ParserBase):
 def __init__(self, filename=""):
 if filename:
 self.parse_file(filename)
-
-
-class ConfigParser(ParserBase):
-
-key_value_separator = '='
-multiple_values = False
-empty_values = True
-
-def __init__(self, filename=""):
-if filename:
-self.parse_file(filename)



[gentoo-commits] proj/catalyst:pending/mattst88 commit in: catalyst/base/, targets/support/

2020-05-19 Thread Matt Turner
commit: 718a67fc8927ae28574182a0fe551e99ee6d66ce
Author: Matt Turner  gentoo  org>
AuthorDate: Wed May 20 02:22:11 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 03:13:13 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=718a67fc

catalyst: Only emit true boolean envars

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py  | 2 --
 targets/support/chroot-functions.sh | 6 +++---
 targets/support/kmerge.sh   | 4 ++--
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 8e2b08da..645a9f61 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1283,8 +1283,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 elif isinstance(self.settings[x], bool):
 if self.settings[x]:
 self.env[varname] = "true"
-else:
-self.env[varname] = "false"
 elif isinstance(self.settings[x], dict):
 if x in ['compress_definitions', 'decompress_definitions']:
 continue

diff --git a/targets/support/chroot-functions.sh 
b/targets/support/chroot-functions.sh
index b6e221af..b531eb6a 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -117,7 +117,7 @@ setup_emerge_opts() {
emerge_opts=()
bootstrap_opts=()
 
-   if [[ "${clst_VERBOSE}" == "true" ]]
+   if [ -n "${clst_VERBOSE}" ]
then
emerge_opts+=(--verbose)
bootstrap_opts+=(-v)
@@ -256,7 +256,7 @@ run_merge() {
export EPAUSE_IGNORE=0
[[ $CONFIG_PROTECT != "-*"* ]] && export CONFIG_PROTECT="-*"
 
-   if [[ "${clst_VERBOSE}" == "true" ]]
+   if [ -n "${clst_VERBOSE}" ]
then
echo "ROOT=${ROOT} emerge ${emerge_opts[@]} -pt $@" || exit 1
emerge ${emerge_opts[@]} -pt $@ || exit 3
@@ -268,7 +268,7 @@ run_merge() {
 }
 
 show_debug() {
-   if [ "${clst_DEBUG}" = "1" ]
+   if [ -n "${clst_DEBUG}" ]
then
unset PACKAGES
echo "DEBUG:"

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 6b589493..702c5454 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -58,7 +58,7 @@ setup_gk_args() {
fi
fi
 
-   if [[ "${clst_VERBOSE}" == "true" ]]
+   if [ -n "${clst_VERBOSE}" ]
then
GK_ARGS+=(--loglevel=2)
fi
@@ -85,7 +85,7 @@ genkernel_compile(){
esac
# Build with genkernel using the set options
# callback is put here to avoid escaping issues
-   if [[ "${clst_VERBOSE}" == "true" ]]
+   if [ -n "${clst_VERBOSE}" ]
then
gk_callback_opts=(-vN)
else



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/

2020-05-19 Thread Matt Turner
commit: ff0b574a509e9b2796d25dabdcfb473ffa673fd1
Author: Matt Turner  gentoo  org>
AuthorDate: Wed May 20 02:26:52 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 03:15:02 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ff0b574a

catalyst: Support emitting int/float envars

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 645a9f61..5a8cd1df 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1283,6 +1283,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
 elif isinstance(self.settings[x], bool):
 if self.settings[x]:
 self.env[varname] = "true"
+elif isinstance(self.settings[x], (int, float)):
+self.env[varname] = str(self.settings[x])
 elif isinstance(self.settings[x], dict):
 if x in ['compress_definitions', 'decompress_definitions']:
 continue



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/

2020-05-19 Thread Matt Turner
commit: d97ef9d0879cc935258f5d30b84dd31d464abc9f
Author: Matt Turner  gentoo  org>
AuthorDate: Wed May 20 02:55:15 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 02:58:07 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d97ef9d0

catalyst: Don't even try to make envars from dicts

With the removal of the arch modules (presumably), the two exceptions
(compress_definitions and decompress_definitions) are the only dicts in
self.settings.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py | 22 ++
 1 file changed, 2 insertions(+), 20 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 9410f151..8e2b08da 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1285,28 +1285,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 self.env[varname] = "true"
 else:
 self.env[varname] = "false"
-# This handles a dictionary of objects just one level deep and no 
deeper!
-# Its currently used only for USE_EXPAND flags which are 
dictionaries of
-# lists in arch/amd64.py and friends.  If we wanted 
self.settigs[var]
-# of any depth, we should make this function recursive.
 elif isinstance(self.settings[x], dict):
-if x in ["compress_definitions",
- "decompress_definitions"]:
+if x in ['compress_definitions', 'decompress_definitions']:
 continue
-self.env[varname] = ' '.join(self.settings[x].keys())
-for y in self.settings[x].keys():
-varname2 = "clst_" + y.replace("/", "_")
-varname2 = varname2.replace("-", "_")
-varname2 = varname2.replace(".", "_")
-if isinstance(self.settings[x][y], str):
-self.env[varname2] = self.settings[x][y]
-elif isinstance(self.settings[x][y], list):
-self.env[varname2] = ' '.join(self.settings[x][y])
-elif isinstance(self.settings[x][y], bool):
-if self.settings[x][y]:
-self.env[varname] = "true"
-else:
-self.env[varname] = "false"
+log.warning("Not making envar for '%s', is a dict", x)
 
 if "makeopts" in self.settings:
 if isinstance(self.settings["makeopts"], str):



[gentoo-commits] proj/catalyst:pending/mattst88 commit in: catalyst/, etc/, catalyst/base/, doc/, examples/

2020-05-19 Thread Matt Turner
commit: 78120996ca9f89f7cbe2ad8027f62e8530216a9e
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 00:59:10 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 03:39:21 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=78120996

catalyst: Configure distcc_hosts in the config file

distcc_hosts are independent of the build itself, and therefore should
be configured system-wide in catalyst.conf and not in each spec file.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py   | 1 -
 catalyst/defaults.py | 1 +
 doc/catalyst-config.5.txt| 7 ++-
 doc/catalyst-spec.5.txt  | 6 --
 etc/catalyst.conf| 3 +--
 examples/generic_stage_template.spec | 7 ---
 examples/livecd-stage1_template.spec | 7 ---
 examples/livecd-stage2_template.spec | 7 ---
 examples/stage4_template.spec| 7 ---
 9 files changed, 8 insertions(+), 38 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index bc721ad4..00efd252 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -50,7 +50,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 "compression_mode",
 "cxxflags",
 "decompressor_search_order",
-"distcc_hosts",
 "fcflags",
 "fflags",
 "hostuse",

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index b31d5b50..27c3d9fa 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -10,6 +10,7 @@ from DeComp.definitions import DECOMPRESSOR_PROGRAM_OPTIONS, 
LIST_XATTRS_OPTIONS
 
 valid_config_file_values = frozenset([
 "digests",
+"distcc_hosts",
 "distdir",
 "envscript",
 "jobs",

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index cbef6092..570d42c2 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -78,7 +78,7 @@ be closed invalid.
 
 distcc::
 Enable distcc support for building. You have to set distcc_hosts in
-your spec file.
+your config file.
 
 icecream::
 Enable icecream compiler cluster support for building.
@@ -136,6 +136,11 @@ written to the target's make.conf if it is not the default 
value of
 Other settings
 ~~
 
+*distcc_hosts*::
+These are the hosts used as distcc slaves when distcc is enabled in
+your `catalyst.conf` (example: `127.0.0.1 192.168.0.1`).  It follows
+the same syntax as `distcc-config --set-hosts`.
+
 *jobs*::
 Integral value passed to *emerge(1)* as the parameter to --jobs and is
 used to define *MAKEOPTS* during the target build.

diff --git a/doc/catalyst-spec.5.txt b/doc/catalyst-spec.5.txt
index cf6b9cd7..682f4621 100644
--- a/doc/catalyst-spec.5.txt
+++ b/doc/catalyst-spec.5.txt
@@ -74,12 +74,6 @@ This specifies where the seed stage for this target comes 
from
 `$storedir/builds`.  The `rel_type` is also used as a path prefix for
 the seed.
 
-*distcc_hosts*::
-These are the hosts used as distcc slaves when distcc is enabled in
-your `catalyst.conf` (example: `127.0.0.1 192.168.0.1`).  It follows
-the same syntax as `distcc-config --set-hosts` and is entirely
-optional.
-
 *portage_confdir*::
 This is an optional directory containing portage configuration files
 (example: `/etc/portage`).  It follows the same syntax as

diff --git a/etc/catalyst.conf b/etc/catalyst.conf
index 81693c25..b0b284fa 100644
--- a/etc/catalyst.conf
+++ b/etc/catalyst.conf
@@ -35,8 +35,7 @@ options = [
# Enable FEATURES=ccache
# "ccache",
 
-   # Enable FEATURES=distcc. You have to set distcc_hosts in your spec
-   # file.
+   # Enable FEATURES=distcc. Make sure to set distcc_hosts too.
# "distcc",
 
# Enable FEATURES=icecream

diff --git a/examples/generic_stage_template.spec 
b/examples/generic_stage_template.spec
index 01c37789..8f0375c4 100644
--- a/examples/generic_stage_template.spec
+++ b/examples/generic_stage_template.spec
@@ -82,13 +82,6 @@ compressor_arch":
 #
 decompressor_search_order: lbzip2 bzip2 tar pixz xz gzip squashfs
 
-# These are the hosts used as distcc slaves when distcc is enabled in your
-# catalyst.conf.  It follows the same syntax as distcc-config --set-hosts and
-# is entirely optional.
-# example:
-# distcc_hosts: 127.0.0.1 192.168.0.1
-distcc_hosts:
-
 # This is an optional directory containing portage configuration files.  It
 # follows the same syntax as /etc/portage and should be consistent across all
 # targets to minimize problems.

diff --git a/examples/livecd-stage1_template.spec 
b/examples/livecd-stage1_template.spec
index c7086c91..b921372a 100644
--- a/examples/livecd-stage1_template.spec
+++ b/examples/livecd-stage1_template.spec
@@ -45,13 +45,6 @@ snapshot:
 # default/stage3-x86-2006.1
 source_subpath:
 
-# These are the hosts used as distcc slaves when distcc is enabled in your
-# catalyst.conf.  It follows the same syntax as distcc-config 

[gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/, doc/, catalyst/base/, catalyst/, etc/

2020-05-19 Thread Matt Turner
commit: 4dd822a8967a9d5a5c0c14bf57e53dd6c3abafe1
Author: Matt Turner  gentoo  org>
AuthorDate: Thu May 14 02:37:11 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 03:39:21 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4dd822a8

catalyst: Set jobs/load-average via catalyst.conf

We currently have two mechanisms of setting MAKEOPTS: in spec files and
in catalystrc.

Setting makeopts in spec files doesn't make sense. The spec should
describe the thing that's being built and not contain options that are
specific to the build system.

Setting makeopts via catalystrc is better, but it only applies to the
actual build system invocations, leaving emerge to run jobs serially or
again requiring configuration specific to the build machine to be put
into the spec file. For example:

update_seed_command: ... --jobs 5 --load-average 5

With jobs and load-average specified in catalyst.conf, catalyst has the
information required to configure both emerge and the build systems
emerge executes.

This removes the undocumented makeopts spec file option and replaces it
with jobs and load-average settings in catalyst.conf.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py  | 12 +---
 catalyst/defaults.py|  2 ++
 doc/catalyst-config.5.txt   | 15 ---
 etc/catalyst.conf   |  8 
 etc/catalystrc  |  3 ---
 targets/support/chroot-functions.sh |  8 
 6 files changed, 35 insertions(+), 13 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 5a8cd1df..bc721ad4 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -56,7 +56,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 "hostuse",
 "kerncache_path",
 "ldflags",
-"makeopts",
 "pkgcache_path",
 "portage_confdir",
 "portage_overlay",
@@ -1290,12 +1289,11 @@ class StageBase(TargetBase, ClearBase, GenBase):
 continue
 log.warning("Not making envar for '%s', is a dict", x)
 
-if "makeopts" in self.settings:
-if isinstance(self.settings["makeopts"], str):
-self.env["MAKEOPTS"] = self.settings["makeopts"]
-else:
-# ensure makeopts is a string
-self.env["MAKEOPTS"] = ' '.join(self.settings["makeopts"])
+makeopts = []
+for flag, setting in {'j': 'jobs', 'l': 'load-average'}.items():
+if setting in self.settings:
+makeopts.append(f'-{flag}{self.settings[setting]}')
+self.env['MAKEOPTS'] = ' '.join(makeopts)
 
 log.debug('setup_environment(); env = %r', self.env)
 

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 14f671fe..b31d5b50 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -12,6 +12,8 @@ valid_config_file_values = frozenset([
 "digests",
 "distdir",
 "envscript",
+"jobs",
+"load-average",
 "options",
 "port_logdir",
 "repo_basedir",

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index 7ac9a2a3..cbef6092 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -48,9 +48,9 @@ $ python3 -c 'import hashlib; 
print(hashlib.algorithms_available)'
 
 *envscript*::
 Environment script location, which allows users to set options such as
-HTTP proxies, `MAKEOPTS`, `GENTOO_MIRRORS`, or any other environment
-variables needed for building.  The envscript file sets environment
-variables using POSIX shell notation:
+HTTP proxies, `GENTOO_MIRRORS`, or any other environment variables
+needed for building.  The envscript file sets environment variables
+using POSIX shell notation:
 +
 -
 export FOO="bar"
@@ -136,6 +136,15 @@ written to the target's make.conf if it is not the default 
value of
 Other settings
 ~~
 
+*jobs*::
+Integral value passed to *emerge(1)* as the parameter to --jobs and is
+used to define *MAKEOPTS* during the target build.
+
+*load-average*::
+Floating-point value passed to *emerge(1)* as the parameter to
+--load-average and is used to define *MAKEOPTS* during the target
+build.
+
 *sharedir*::
 Catalyst runtime script location.  `/usr/share/catalyst` should work for
 most default installations.  If you are running catalyst from a Git

diff --git a/etc/catalyst.conf b/etc/catalyst.conf
index 2272cb86..81693c25 100644
--- a/etc/catalyst.conf
+++ b/etc/catalyst.conf
@@ -76,3 +76,11 @@ options = [
 # WARNING: If you use too much RAM everything will fail horribly and it is not 
our fault.
 # set size of /var/tmp/portage tmpfs in gigabytes
 # var_tmpfs_portage = 16
+
+# Integral value passed to emerge as the parameter to --jobs and is used to
+# define MAKEOPTS during the target build.
+# jobs = 4
+
+# Floating-point value passed to 

[gentoo-commits] repo/gentoo:master commit in: net-irc/quassel/

2020-05-19 Thread Georgy Yakovlev
commit: 9b790eb7ba2ed1a16a0f0d00c4b2b6044aed5f23
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Wed May 20 02:49:31 2020 +
Commit: Georgy Yakovlev  gentoo  org>
CommitDate: Wed May 20 02:50:03 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b790eb7

net-irc/quassel: add ~ppc64 keyword

both client and server work fine

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Georgy Yakovlev  gentoo.org>

 net-irc/quassel/quassel-0.13.1-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net-irc/quassel/quassel-0.13.1-r2.ebuild 
b/net-irc/quassel/quassel-0.13.1-r2.ebuild
index a5e136f8ab7..d418a0d39a5 100644
--- a/net-irc/quassel/quassel-0.13.1-r2.ebuild
+++ b/net-irc/quassel/quassel-0.13.1-r2.ebuild
@@ -8,7 +8,7 @@ inherit cmake xdg-utils pax-utils systemd
 if [[ ${PV} != ** ]]; then
MY_P=${PN}-${PV/_/-}
SRC_URI="https://quassel-irc.org/pub/${MY_P}.tar.bz2;
-   KEYWORDS="amd64 ~arm x86 ~amd64-linux ~sparc-solaris"
+   KEYWORDS="amd64 ~arm ~ppc64 x86 ~amd64-linux ~sparc-solaris"
S="${WORKDIR}/${MY_P}"
 else
EGIT_REPO_URI=( "https://github.com/${PN}/${PN}; )



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: 3d3a1b1b23adff8d97ca746c10d97bb4a02f88bb
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 19:14:29 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 02:33:46 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=3d3a1b1b

catalyst: Drop ConfigParser

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/config.py | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/catalyst/config.py b/catalyst/config.py
index b527ada0..e1963f71 100644
--- a/catalyst/config.py
+++ b/catalyst/config.py
@@ -118,14 +118,3 @@ class SpecParser(ParserBase):
 def __init__(self, filename=""):
 if filename:
 self.parse_file(filename)
-
-
-class ConfigParser(ParserBase):
-
-key_value_separator = '='
-multiple_values = False
-empty_values = True
-
-def __init__(self, filename=""):
-if filename:
-self.parse_file(filename)



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: doc/, catalyst/base/, etc/, examples/, catalyst/

2020-05-19 Thread Matt Turner
commit: 4899c4e6e4927162571022f6d03b32517def1a2e
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 00:59:10 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 02:33:46 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4899c4e6

catalyst: Configure distcc_hosts in the config file

distcc_hosts are independent of the build itself, and therefore should
be configured system-wide in catalyst.conf and not in each spec file.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py   | 1 -
 catalyst/defaults.py | 1 +
 doc/catalyst-config.5.txt| 7 ++-
 doc/catalyst-spec.5.txt  | 6 --
 etc/catalyst.conf| 3 +--
 examples/generic_stage_template.spec | 7 ---
 examples/livecd-stage1_template.spec | 7 ---
 examples/livecd-stage2_template.spec | 7 ---
 examples/stage4_template.spec| 7 ---
 9 files changed, 8 insertions(+), 38 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 9506e6b3..d806e027 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -50,7 +50,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 "compression_mode",
 "cxxflags",
 "decompressor_search_order",
-"distcc_hosts",
 "fcflags",
 "fflags",
 "hostuse",

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index b31d5b50..27c3d9fa 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -10,6 +10,7 @@ from DeComp.definitions import DECOMPRESSOR_PROGRAM_OPTIONS, 
LIST_XATTRS_OPTIONS
 
 valid_config_file_values = frozenset([
 "digests",
+"distcc_hosts",
 "distdir",
 "envscript",
 "jobs",

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index cbef6092..570d42c2 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -78,7 +78,7 @@ be closed invalid.
 
 distcc::
 Enable distcc support for building. You have to set distcc_hosts in
-your spec file.
+your config file.
 
 icecream::
 Enable icecream compiler cluster support for building.
@@ -136,6 +136,11 @@ written to the target's make.conf if it is not the default 
value of
 Other settings
 ~~
 
+*distcc_hosts*::
+These are the hosts used as distcc slaves when distcc is enabled in
+your `catalyst.conf` (example: `127.0.0.1 192.168.0.1`).  It follows
+the same syntax as `distcc-config --set-hosts`.
+
 *jobs*::
 Integral value passed to *emerge(1)* as the parameter to --jobs and is
 used to define *MAKEOPTS* during the target build.

diff --git a/doc/catalyst-spec.5.txt b/doc/catalyst-spec.5.txt
index cf6b9cd7..682f4621 100644
--- a/doc/catalyst-spec.5.txt
+++ b/doc/catalyst-spec.5.txt
@@ -74,12 +74,6 @@ This specifies where the seed stage for this target comes 
from
 `$storedir/builds`.  The `rel_type` is also used as a path prefix for
 the seed.
 
-*distcc_hosts*::
-These are the hosts used as distcc slaves when distcc is enabled in
-your `catalyst.conf` (example: `127.0.0.1 192.168.0.1`).  It follows
-the same syntax as `distcc-config --set-hosts` and is entirely
-optional.
-
 *portage_confdir*::
 This is an optional directory containing portage configuration files
 (example: `/etc/portage`).  It follows the same syntax as

diff --git a/etc/catalyst.conf b/etc/catalyst.conf
index 2272cb86..61ea1d4a 100644
--- a/etc/catalyst.conf
+++ b/etc/catalyst.conf
@@ -35,8 +35,7 @@ options = [
# Enable FEATURES=ccache
# "ccache",
 
-   # Enable FEATURES=distcc. You have to set distcc_hosts in your spec
-   # file.
+   # Enable FEATURES=distcc. Make sure to set distcc_hosts too.
# "distcc",
 
# Enable FEATURES=icecream

diff --git a/examples/generic_stage_template.spec 
b/examples/generic_stage_template.spec
index 01c37789..8f0375c4 100644
--- a/examples/generic_stage_template.spec
+++ b/examples/generic_stage_template.spec
@@ -82,13 +82,6 @@ compressor_arch":
 #
 decompressor_search_order: lbzip2 bzip2 tar pixz xz gzip squashfs
 
-# These are the hosts used as distcc slaves when distcc is enabled in your
-# catalyst.conf.  It follows the same syntax as distcc-config --set-hosts and
-# is entirely optional.
-# example:
-# distcc_hosts: 127.0.0.1 192.168.0.1
-distcc_hosts:
-
 # This is an optional directory containing portage configuration files.  It
 # follows the same syntax as /etc/portage and should be consistent across all
 # targets to minimize problems.

diff --git a/examples/livecd-stage1_template.spec 
b/examples/livecd-stage1_template.spec
index c7086c91..b921372a 100644
--- a/examples/livecd-stage1_template.spec
+++ b/examples/livecd-stage1_template.spec
@@ -45,13 +45,6 @@ snapshot:
 # default/stage3-x86-2006.1
 source_subpath:
 
-# These are the hosts used as distcc slaves when distcc is enabled in your
-# catalyst.conf.  It follows the same syntax as distcc-config 

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/, etc/, catalyst/base/, targets/support/, doc/

2020-05-19 Thread Matt Turner
commit: 96cc906860f38bf015b0fa0ea3cd9d256e73b568
Author: Matt Turner  gentoo  org>
AuthorDate: Thu May 14 02:37:11 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 02:33:46 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=96cc9068

catalyst: Set jobs/load-average via catalyst.conf

We currently have two mechanisms of setting MAKEOPTS: in spec files and
in catalystrc.

Setting makeopts in spec files doesn't make sense. The spec should
describe the thing that's being built and not contain options that are
specific to the build system.

Setting makeopts via catalystrc is better, but it only applies to the
actual build system invocations, leaving emerge to run jobs serially or
again requiring configuration specific to the build machine to be put
into the spec file. For example:

update_seed_command: ... --jobs 5 --load-average 5

With jobs and load-average specified in catalyst.conf, catalyst has the
information required to configure both emerge and the build systems
emerge executes.

This removes the undocumented makeopts spec file option and replaces it
with jobs and load-average settings in catalyst.conf.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py  | 12 +---
 catalyst/defaults.py|  2 ++
 doc/catalyst-config.5.txt   | 15 ---
 etc/catalystrc  |  3 ---
 targets/support/chroot-functions.sh |  8 
 5 files changed, 27 insertions(+), 13 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 9ea72b48..9506e6b3 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -56,7 +56,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 "hostuse",
 "kerncache_path",
 "ldflags",
-"makeopts",
 "pkgcache_path",
 "portage_confdir",
 "portage_overlay",
@@ -1305,12 +1304,11 @@ class StageBase(TargetBase, ClearBase, GenBase):
 else:
 self.env[varname] = "false"
 
-if "makeopts" in self.settings:
-if isinstance(self.settings["makeopts"], str):
-self.env["MAKEOPTS"] = self.settings["makeopts"]
-else:
-# ensure makeopts is a string
-self.env["MAKEOPTS"] = ' '.join(self.settings["makeopts"])
+makeopts = []
+for flag, setting in {'j': 'jobs', 'l': 'load-average'}.items():
+if setting in self.settings:
+makeopts.append(f'-{flag}{self.settings[setting]}')
+self.env['MAKEOPTS'] = ' '.join(makeopts)
 
 log.debug('setup_environment(); env = %r', self.env)
 

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 14f671fe..b31d5b50 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -12,6 +12,8 @@ valid_config_file_values = frozenset([
 "digests",
 "distdir",
 "envscript",
+"jobs",
+"load-average",
 "options",
 "port_logdir",
 "repo_basedir",

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index 7ac9a2a3..cbef6092 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -48,9 +48,9 @@ $ python3 -c 'import hashlib; 
print(hashlib.algorithms_available)'
 
 *envscript*::
 Environment script location, which allows users to set options such as
-HTTP proxies, `MAKEOPTS`, `GENTOO_MIRRORS`, or any other environment
-variables needed for building.  The envscript file sets environment
-variables using POSIX shell notation:
+HTTP proxies, `GENTOO_MIRRORS`, or any other environment variables
+needed for building.  The envscript file sets environment variables
+using POSIX shell notation:
 +
 -
 export FOO="bar"
@@ -136,6 +136,15 @@ written to the target's make.conf if it is not the default 
value of
 Other settings
 ~~
 
+*jobs*::
+Integral value passed to *emerge(1)* as the parameter to --jobs and is
+used to define *MAKEOPTS* during the target build.
+
+*load-average*::
+Floating-point value passed to *emerge(1)* as the parameter to
+--load-average and is used to define *MAKEOPTS* during the target
+build.
+
 *sharedir*::
 Catalyst runtime script location.  `/usr/share/catalyst` should work for
 most default installations.  If you are running catalyst from a Git

diff --git a/etc/catalystrc b/etc/catalystrc
index bcd729af..e7904128 100755
--- a/etc/catalystrc
+++ b/etc/catalystrc
@@ -1,5 +1,2 @@
 #!/bin/bash
 # This is an example catalystrc. As such, it doesn't actually *do* anything.
-
-# Uncomment the following to increase the number of threads used to compile.
-# export MAKEOPTS="-j16"

diff --git a/targets/support/chroot-functions.sh 
b/targets/support/chroot-functions.sh
index 47239b96..d4c50983 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -130,6 +130,14 @@ 

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: 200c12f64d3ed28747e8498ede15cbbacf9af6bf
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 19:14:29 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 02:29:23 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=200c12f6

catalyst: Drop ConfigParser

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/config.py | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/catalyst/config.py b/catalyst/config.py
index b527ada0..e1963f71 100644
--- a/catalyst/config.py
+++ b/catalyst/config.py
@@ -118,14 +118,3 @@ class SpecParser(ParserBase):
 def __init__(self, filename=""):
 if filename:
 self.parse_file(filename)
-
-
-class ConfigParser(ParserBase):
-
-key_value_separator = '='
-multiple_values = False
-empty_values = True
-
-def __init__(self, filename=""):
-if filename:
-self.parse_file(filename)



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/

2020-05-19 Thread Matt Turner
commit: 4ce21a9b855a20d8391f4d1aa866e76f01c51397
Author: Matt Turner  gentoo  org>
AuthorDate: Wed May 20 02:26:52 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 02:29:23 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4ce21a9b

catalyst: Support emitting int/float envars

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index e87f181d..9ea72b48 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1280,7 +1280,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 self.env[varname] = self.settings[x]
 elif isinstance(self.settings[x], list):
 self.env[varname] = ' '.join(self.settings[x])
-elif isinstance(self.settings[x], bool):
+elif isinstance(self.settings[x], (int, float, bool)):
 self.env[varname] = str(self.settings[x])
 # This handles a dictionary of objects just one level deep and no 
deeper!
 # Its currently used only for USE_EXPAND flags which are 
dictionaries of



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: examples/, doc/, etc/, catalyst/, catalyst/base/

2020-05-19 Thread Matt Turner
commit: 64e1f267de00dc845aba9e98eea6d6be49fa489a
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 00:59:10 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 02:29:23 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=64e1f267

catalyst: Configure distcc_hosts in the config file

distcc_hosts are independent of the build itself, and therefore should
be configured system-wide in catalyst.conf and not in each spec file.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py   | 1 -
 catalyst/defaults.py | 1 +
 doc/catalyst-config.5.txt| 7 ++-
 doc/catalyst-spec.5.txt  | 6 --
 etc/catalyst.conf| 3 +--
 examples/generic_stage_template.spec | 7 ---
 examples/livecd-stage1_template.spec | 7 ---
 examples/livecd-stage2_template.spec | 7 ---
 examples/stage4_template.spec| 7 ---
 9 files changed, 8 insertions(+), 38 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 9506e6b3..d806e027 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -50,7 +50,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 "compression_mode",
 "cxxflags",
 "decompressor_search_order",
-"distcc_hosts",
 "fcflags",
 "fflags",
 "hostuse",

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index b31d5b50..27c3d9fa 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -10,6 +10,7 @@ from DeComp.definitions import DECOMPRESSOR_PROGRAM_OPTIONS, 
LIST_XATTRS_OPTIONS
 
 valid_config_file_values = frozenset([
 "digests",
+"distcc_hosts",
 "distdir",
 "envscript",
 "jobs",

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index cbef6092..570d42c2 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -78,7 +78,7 @@ be closed invalid.
 
 distcc::
 Enable distcc support for building. You have to set distcc_hosts in
-your spec file.
+your config file.
 
 icecream::
 Enable icecream compiler cluster support for building.
@@ -136,6 +136,11 @@ written to the target's make.conf if it is not the default 
value of
 Other settings
 ~~
 
+*distcc_hosts*::
+These are the hosts used as distcc slaves when distcc is enabled in
+your `catalyst.conf` (example: `127.0.0.1 192.168.0.1`).  It follows
+the same syntax as `distcc-config --set-hosts`.
+
 *jobs*::
 Integral value passed to *emerge(1)* as the parameter to --jobs and is
 used to define *MAKEOPTS* during the target build.

diff --git a/doc/catalyst-spec.5.txt b/doc/catalyst-spec.5.txt
index cf6b9cd7..682f4621 100644
--- a/doc/catalyst-spec.5.txt
+++ b/doc/catalyst-spec.5.txt
@@ -74,12 +74,6 @@ This specifies where the seed stage for this target comes 
from
 `$storedir/builds`.  The `rel_type` is also used as a path prefix for
 the seed.
 
-*distcc_hosts*::
-These are the hosts used as distcc slaves when distcc is enabled in
-your `catalyst.conf` (example: `127.0.0.1 192.168.0.1`).  It follows
-the same syntax as `distcc-config --set-hosts` and is entirely
-optional.
-
 *portage_confdir*::
 This is an optional directory containing portage configuration files
 (example: `/etc/portage`).  It follows the same syntax as

diff --git a/etc/catalyst.conf b/etc/catalyst.conf
index 2272cb86..61ea1d4a 100644
--- a/etc/catalyst.conf
+++ b/etc/catalyst.conf
@@ -35,8 +35,7 @@ options = [
# Enable FEATURES=ccache
# "ccache",
 
-   # Enable FEATURES=distcc. You have to set distcc_hosts in your spec
-   # file.
+   # Enable FEATURES=distcc. Make sure to set distcc_hosts too.
# "distcc",
 
# Enable FEATURES=icecream

diff --git a/examples/generic_stage_template.spec 
b/examples/generic_stage_template.spec
index 01c37789..8f0375c4 100644
--- a/examples/generic_stage_template.spec
+++ b/examples/generic_stage_template.spec
@@ -82,13 +82,6 @@ compressor_arch":
 #
 decompressor_search_order: lbzip2 bzip2 tar pixz xz gzip squashfs
 
-# These are the hosts used as distcc slaves when distcc is enabled in your
-# catalyst.conf.  It follows the same syntax as distcc-config --set-hosts and
-# is entirely optional.
-# example:
-# distcc_hosts: 127.0.0.1 192.168.0.1
-distcc_hosts:
-
 # This is an optional directory containing portage configuration files.  It
 # follows the same syntax as /etc/portage and should be consistent across all
 # targets to minimize problems.

diff --git a/examples/livecd-stage1_template.spec 
b/examples/livecd-stage1_template.spec
index c7086c91..b921372a 100644
--- a/examples/livecd-stage1_template.spec
+++ b/examples/livecd-stage1_template.spec
@@ -45,13 +45,6 @@ snapshot:
 # default/stage3-x86-2006.1
 source_subpath:
 
-# These are the hosts used as distcc slaves when distcc is enabled in your
-# catalyst.conf.  It follows the same syntax as distcc-config 

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: targets/support/, catalyst/base/

2020-05-19 Thread Matt Turner
commit: 759584b0ea8c9adac497a1141ac26080ba8ab8a4
Author: Matt Turner  gentoo  org>
AuthorDate: Wed May 20 02:22:11 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 02:29:23 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=759584b0

catalyst: Emit bool envars as str(var)

This just capitalizes the values of the environemnt variables, since the
Python literals are capitalized.

Enables the next commit to use this path for other types as well.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py  | 5 +
 targets/support/chroot-functions.sh | 4 ++--
 targets/support/kmerge.sh   | 4 ++--
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 9410f151..e87f181d 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1281,10 +1281,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 elif isinstance(self.settings[x], list):
 self.env[varname] = ' '.join(self.settings[x])
 elif isinstance(self.settings[x], bool):
-if self.settings[x]:
-self.env[varname] = "true"
-else:
-self.env[varname] = "false"
+self.env[varname] = str(self.settings[x])
 # This handles a dictionary of objects just one level deep and no 
deeper!
 # Its currently used only for USE_EXPAND flags which are 
dictionaries of
 # lists in arch/amd64.py and friends.  If we wanted 
self.settigs[var]

diff --git a/targets/support/chroot-functions.sh 
b/targets/support/chroot-functions.sh
index b6e221af..47239b96 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -117,7 +117,7 @@ setup_emerge_opts() {
emerge_opts=()
bootstrap_opts=()
 
-   if [[ "${clst_VERBOSE}" == "true" ]]
+   if [[ "${clst_VERBOSE}" == "True" ]]
then
emerge_opts+=(--verbose)
bootstrap_opts+=(-v)
@@ -256,7 +256,7 @@ run_merge() {
export EPAUSE_IGNORE=0
[[ $CONFIG_PROTECT != "-*"* ]] && export CONFIG_PROTECT="-*"
 
-   if [[ "${clst_VERBOSE}" == "true" ]]
+   if [[ "${clst_VERBOSE}" == "True" ]]
then
echo "ROOT=${ROOT} emerge ${emerge_opts[@]} -pt $@" || exit 1
emerge ${emerge_opts[@]} -pt $@ || exit 3

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 6b589493..1a5fb458 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -58,7 +58,7 @@ setup_gk_args() {
fi
fi
 
-   if [[ "${clst_VERBOSE}" == "true" ]]
+   if [[ "${clst_VERBOSE}" == "True" ]]
then
GK_ARGS+=(--loglevel=2)
fi
@@ -85,7 +85,7 @@ genkernel_compile(){
esac
# Build with genkernel using the set options
# callback is put here to avoid escaping issues
-   if [[ "${clst_VERBOSE}" == "true" ]]
+   if [[ "${clst_VERBOSE}" == "True" ]]
then
gk_callback_opts=(-vN)
else



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: doc/, targets/support/, etc/, catalyst/, catalyst/base/

2020-05-19 Thread Matt Turner
commit: ebf0490e4b80c9ba2758c2c47135bd99c98dc4a1
Author: Matt Turner  gentoo  org>
AuthorDate: Thu May 14 02:37:11 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 02:29:23 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ebf0490e

catalyst: Set jobs/load-average via catalyst.conf

We currently have two mechanisms of setting MAKEOPTS: in spec files and
in catalystrc.

Setting makeopts in spec files doesn't make sense. The spec should
describe the thing that's being built and not contain options that are
specific to the build system.

Setting makeopts via catalystrc is better, but it only applies to the
actual build system invocations, leaving emerge to run jobs serially or
again requiring configuration specific to the build machine to be put
into the spec file. For example:

update_seed_command: ... --jobs 5 --load-average 5

With jobs and load-average specified in catalyst.conf, catalyst has the
information required to configure both emerge and the build systems
emerge executes.

This removes the undocumented makeopts spec file option and replaces it
with jobs and load-average settings in catalyst.conf.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py  | 12 +---
 catalyst/defaults.py|  2 ++
 doc/catalyst-config.5.txt   | 15 ---
 etc/catalystrc  |  3 ---
 targets/support/chroot-functions.sh |  8 
 5 files changed, 27 insertions(+), 13 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 9ea72b48..9506e6b3 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -56,7 +56,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 "hostuse",
 "kerncache_path",
 "ldflags",
-"makeopts",
 "pkgcache_path",
 "portage_confdir",
 "portage_overlay",
@@ -1305,12 +1304,11 @@ class StageBase(TargetBase, ClearBase, GenBase):
 else:
 self.env[varname] = "false"
 
-if "makeopts" in self.settings:
-if isinstance(self.settings["makeopts"], str):
-self.env["MAKEOPTS"] = self.settings["makeopts"]
-else:
-# ensure makeopts is a string
-self.env["MAKEOPTS"] = ' '.join(self.settings["makeopts"])
+makeopts = []
+for flag, setting in {'j': 'jobs', 'l': 'load-average'}.items():
+if setting in self.settings:
+makeopts.append(f'-{flag}{self.settings[setting]}')
+self.env['MAKEOPTS'] = ' '.join(makeopts)
 
 log.debug('setup_environment(); env = %r', self.env)
 

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 14f671fe..b31d5b50 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -12,6 +12,8 @@ valid_config_file_values = frozenset([
 "digests",
 "distdir",
 "envscript",
+"jobs",
+"load-average",
 "options",
 "port_logdir",
 "repo_basedir",

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index 7ac9a2a3..cbef6092 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -48,9 +48,9 @@ $ python3 -c 'import hashlib; 
print(hashlib.algorithms_available)'
 
 *envscript*::
 Environment script location, which allows users to set options such as
-HTTP proxies, `MAKEOPTS`, `GENTOO_MIRRORS`, or any other environment
-variables needed for building.  The envscript file sets environment
-variables using POSIX shell notation:
+HTTP proxies, `GENTOO_MIRRORS`, or any other environment variables
+needed for building.  The envscript file sets environment variables
+using POSIX shell notation:
 +
 -
 export FOO="bar"
@@ -136,6 +136,15 @@ written to the target's make.conf if it is not the default 
value of
 Other settings
 ~~
 
+*jobs*::
+Integral value passed to *emerge(1)* as the parameter to --jobs and is
+used to define *MAKEOPTS* during the target build.
+
+*load-average*::
+Floating-point value passed to *emerge(1)* as the parameter to
+--load-average and is used to define *MAKEOPTS* during the target
+build.
+
 *sharedir*::
 Catalyst runtime script location.  `/usr/share/catalyst` should work for
 most default installations.  If you are running catalyst from a Git

diff --git a/etc/catalystrc b/etc/catalystrc
index bcd729af..e7904128 100755
--- a/etc/catalystrc
+++ b/etc/catalystrc
@@ -1,5 +1,2 @@
 #!/bin/bash
 # This is an example catalystrc. As such, it doesn't actually *do* anything.
-
-# Uncomment the following to increase the number of threads used to compile.
-# export MAKEOPTS="-j16"

diff --git a/targets/support/chroot-functions.sh 
b/targets/support/chroot-functions.sh
index 47239b96..6aef750c 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -130,6 +130,14 @@ 

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: targets/support/

2020-05-19 Thread Matt Turner
commit: 5a8322accecab68d7b00637f288487354e7a01d3
Author: Matt Turner  gentoo  org>
AuthorDate: Wed May 20 01:20:02 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 01:49:30 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5a8322ac

targets: Remove copy_{file,symlink,lib} functions

Unused since the removal of the original netboot target.

I'm honestly kind of impressed with the strategy of running ldd and
recursively copying libraries to the netboot image. Unfortunately for
this strategy, dlopen() exists so this cannot work.

Fixes: 89f57e145f82 (targets: Delete the netboot target)
Signed-off-by: Matt Turner  gentoo.org>

 targets/support/chroot-functions.sh | 75 -
 1 file changed, 75 deletions(-)

diff --git a/targets/support/chroot-functions.sh 
b/targets/support/chroot-functions.sh
index d40279ae..d63e4918 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -335,81 +335,6 @@ run_default_funcs() {
fi
 }
 
-# Functions
-# Copy libs of a executable in the chroot
-function copy_libs() {
-   # Check if it's a dynamix exec
-   ldd ${1} > /dev/null 2>&1 || return
-
-   for lib in `ldd ${1} | awk '{ print $3 }'`
-   do
-   echo ${lib}
-   if [ -e ${lib} ]
-   then
-   if [ ! -e ${clst_root_path}/${lib} ]
-   then
-   copy_file ${lib}
-   [ -e "${clst_root_path}/${lib}" ] && \
-   strip -R .comment -R .note 
${clst_root_path}/${lib} \
-   || echo "WARNING : Cannot strip lib 
${clst_root_path}/${lib} !"
-   fi
-   else
-   echo "WARNING : Some library was not found for ${lib} !"
-   fi
-   done
-}
-
-function copy_symlink() {
-   STACK=${2}
-   [ "${STACK}" = "" ] && STACK=16 || STACK=$((${STACK} - 1 ))
-
-   if [ ${STACK} -le 0 ]
-   then
-   echo "WARNING : ${TARGET} : too many levels of symbolic links !"
-   return
-   fi
-
-   [ ! -e ${clst_root_path}/`dirname ${1}` ] && \
-   mkdir -p ${clst_root_path}/`dirname ${1}`
-   [ ! -e ${clst_root_path}/${1} ] && \
-   cp -vfdp ${1} ${clst_root_path}/${1}
-
-   if [[ -n $(type -p realpath) ]]; then
-   TARGET=`realpath ${1}`
-   else
-   TARGET=`readlink -f ${1}`
-   fi
-   if [ -h ${TARGET} ]
-   then
-   copy_symlink ${TARGET} ${STACK}
-   else
-   copy_file ${TARGET}
-   fi
-}
-
-function copy_file() {
-   f="${1}"
-
-   if [ ! -e "${f}" ]
-   then
-   echo "WARNING : File not found : ${f}"
-   continue
-   fi
-
-   [ ! -e ${clst_root_path}/`dirname ${f}` ] && \
-   mkdir -p ${clst_root_path}/`dirname ${f}`
-   [ ! -e ${clst_root_path}/${f} ] && \
-   cp -vfdp ${f} ${clst_root_path}/${f}
-   if [ -x ${f} -a ! -h ${f} ]
-   then
-   copy_libs ${f}
-   strip -R .comment -R .note ${clst_root_path}/${f} > /dev/null 
2>&1
-   elif [ -h ${f} ]
-   then
-   copy_symlink ${f}
-   fi
-}
-
 create_handbook_icon() {
# This function creates a local icon to the Gentoo Handbook
echo "[Desktop Entry]



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, catalyst/, etc/

2020-05-19 Thread Matt Turner
commit: 66e78a8d55d0ab99b48c7fe7a327aab9b05b2586
Author: Matt Turner  gentoo  org>
AuthorDate: Sat May 16 03:18:21 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 01:49:37 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=66e78a8d

catalyst: Convert catalyst.conf to TOML

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py |  4 +--
 catalyst/main.py   | 47 +++--
 etc/catalyst.conf  | 88 +++---
 3 files changed, 67 insertions(+), 72 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index febaf969..9410f151 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -857,8 +857,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
 if 'var_tmpfs_portage' not in self.settings:
 continue
 
-mount += ['-t', 'tmpfs', '-o', 'size=' +
-  self.settings['var_tmpfs_portage'] + 'G']
+mount += ['-t', 'tmpfs', '-o',
+  f"size={self.settings['var_tmpfs_portage']}G"]
 elif source == 'tmpfs':
 mount += ['-t', 'tmpfs']
 elif source == 'shm':

diff --git a/catalyst/main.py b/catalyst/main.py
index be06ccd7..159fe454 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -5,6 +5,8 @@ import os
 import sys
 import textwrap
 
+import toml
+
 from snakeoil.process import namespaces
 
 from DeComp.definitions import (COMPRESS_DEFINITIONS, DECOMPRESS_DEFINITIONS,
@@ -17,8 +19,7 @@ from catalyst.defaults import confdefaults, option_messages, 
DEFAULT_CONFIG_FILE
 from catalyst.support import CatalystError
 from catalyst.version import get_version
 
-
-conf_values = {}
+conf_values = confdefaults
 
 
 def version():
@@ -30,42 +31,20 @@ def version():
 
 
 def parse_config(config_files):
-# search a couple of different areas for the main config file
-myconf = {}
-
-# try and parse the config file "config_file"
 for config_file in config_files:
 log.notice('Loading configuration file: %s', config_file)
 try:
-config = catalyst.config.ConfigParser(config_file)
-myconf.update(config.get_values())
+conf_values.update(toml.load(config_file))
 except Exception as e:
 log.critical('Could not find parse configuration file: %s: %s',
  config_file, e)
 
-# now, load up the values into conf_values so that we can use them
-for x in list(confdefaults):
-if x in myconf:
-if x == 'options':
-conf_values[x] = set(myconf[x].split())
-elif x in ["decompressor_search_order"]:
-conf_values[x] = myconf[x].split()
-else:
-conf_values[x] = myconf[x]
-else:
-conf_values[x] = confdefaults[x]
-
 # print out any options messages
 for opt in conf_values['options']:
 if opt in option_messages:
 log.info(option_messages[opt])
 
-for key in ["digests", "envscript", "var_tmpfs_portage", "port_logdir",
-"local_overlay", "repos"]:
-if key in myconf:
-conf_values[key] = myconf[key]
-
-if "envscript" in myconf:
+if "envscript" in conf_values:
 log.info('Envscript support enabled.')
 
 # take care of any variable substitutions that may be left
@@ -297,17 +276,17 @@ def _main(parser, opts):
 conf_values['DEBUG'] = opts.debug
 conf_values['VERBOSE'] = opts.debug or opts.verbose
 
-options = set()
+options = []
 if opts.fetchonly:
-options.add('fetch')
+options.append('fetch')
 if opts.purge:
-options.add('purge')
+options.append('purge')
 if opts.purgeonly:
-options.add('purgeonly')
+options.append('purgeonly')
 if opts.purgetmponly:
-options.add('purgetmponly')
+options.append('purgetmponly')
 if opts.clear_autoresume:
-options.add('clear-autoresume')
+options.append('clear-autoresume')
 
 # Make sure we have some work before moving further.
 if not myspecfile and not mycmdline:
@@ -318,7 +297,7 @@ def _main(parser, opts):
 # import configuration file and import our main module using those settings
 parse_config(myconfigs)
 
-conf_values["options"].update(options)
+conf_values["options"].extend(options)
 log.notice('conf_values[options] = %s', conf_values['options'])
 
 # initialize our contents generator
@@ -335,7 +314,7 @@ def _main(parser, opts):
 
 if "digests" in conf_values:
 valid_digests = hashlib.algorithms_available
-digests = set(conf_values['digests'].split())
+digests = set(conf_values['digests'])
 conf_values['digests'] = digests
 
 # First validate all the requested digests are valid keys.

diff --git 

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: etc/, catalyst/base/, catalyst/, doc/, targets/support/

2020-05-19 Thread Matt Turner
commit: cb431104aaf4de58d88f383aedb7e65f3d6fc3e7
Author: Matt Turner  gentoo  org>
AuthorDate: Thu May 14 02:37:11 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 01:52:18 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=cb431104

catalyst: Set jobs/load-average via catalyst.conf

We currently have two mechanisms of setting MAKEOPTS: in spec files and
in catalystrc.

Setting makeopts in spec files doesn't make sense. The spec should
describe the thing that's being built and not contain options that are
specific to the build system.

Setting makeopts via catalystrc is better, but it only applies to the
actual build system invocations, leaving emerge to run jobs serially or
again requiring configuration specific to the build machine to be put
into the spec file. For example:

update_seed_command: ... --jobs 5 --load-average 5

With jobs and load-average specified in catalyst.conf, catalyst has the
information required to configure both emerge and the build systems
emerge executes.

This removes the undocumented makeopts spec file option and replaces it
with jobs and load-average settings in catalyst.conf.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py  | 12 +---
 catalyst/defaults.py|  2 ++
 doc/catalyst-config.5.txt   | 15 ---
 etc/catalystrc  |  3 ---
 targets/support/chroot-functions.sh |  8 
 5 files changed, 27 insertions(+), 13 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 9410f151..a53a58dd 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -56,7 +56,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 "hostuse",
 "kerncache_path",
 "ldflags",
-"makeopts",
 "pkgcache_path",
 "portage_confdir",
 "portage_overlay",
@@ -1308,12 +1307,11 @@ class StageBase(TargetBase, ClearBase, GenBase):
 else:
 self.env[varname] = "false"
 
-if "makeopts" in self.settings:
-if isinstance(self.settings["makeopts"], str):
-self.env["MAKEOPTS"] = self.settings["makeopts"]
-else:
-# ensure makeopts is a string
-self.env["MAKEOPTS"] = ' '.join(self.settings["makeopts"])
+makeopts = []
+for flag, setting in {'j': 'jobs', 'l': 'load-average'}.items():
+if setting in self.settings:
+makeopts.append(f'-{flag}{self.settings[setting]}')
+self.env['MAKEOPTS'] = ' '.join(makeopts)
 
 log.debug('setup_environment(); env = %r', self.env)
 

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 14f671fe..b31d5b50 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -12,6 +12,8 @@ valid_config_file_values = frozenset([
 "digests",
 "distdir",
 "envscript",
+"jobs",
+"load-average",
 "options",
 "port_logdir",
 "repo_basedir",

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index 7ac9a2a3..cbef6092 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -48,9 +48,9 @@ $ python3 -c 'import hashlib; 
print(hashlib.algorithms_available)'
 
 *envscript*::
 Environment script location, which allows users to set options such as
-HTTP proxies, `MAKEOPTS`, `GENTOO_MIRRORS`, or any other environment
-variables needed for building.  The envscript file sets environment
-variables using POSIX shell notation:
+HTTP proxies, `GENTOO_MIRRORS`, or any other environment variables
+needed for building.  The envscript file sets environment variables
+using POSIX shell notation:
 +
 -
 export FOO="bar"
@@ -136,6 +136,15 @@ written to the target's make.conf if it is not the default 
value of
 Other settings
 ~~
 
+*jobs*::
+Integral value passed to *emerge(1)* as the parameter to --jobs and is
+used to define *MAKEOPTS* during the target build.
+
+*load-average*::
+Floating-point value passed to *emerge(1)* as the parameter to
+--load-average and is used to define *MAKEOPTS* during the target
+build.
+
 *sharedir*::
 Catalyst runtime script location.  `/usr/share/catalyst` should work for
 most default installations.  If you are running catalyst from a Git

diff --git a/etc/catalystrc b/etc/catalystrc
index bcd729af..e7904128 100755
--- a/etc/catalystrc
+++ b/etc/catalystrc
@@ -1,5 +1,2 @@
 #!/bin/bash
 # This is an example catalystrc. As such, it doesn't actually *do* anything.
-
-# Uncomment the following to increase the number of threads used to compile.
-# export MAKEOPTS="-j16"

diff --git a/targets/support/chroot-functions.sh 
b/targets/support/chroot-functions.sh
index b6e221af..02fd8fef 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -130,6 +130,14 @@ 

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: 6ed67c24fe3bb8e3baa8c936249e4507c45f86a2
Author: Matt Turner  gentoo  org>
AuthorDate: Mon May 18 23:48:22 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 01:49:37 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=6ed67c24

catalyst: Remove spec file options from valid_config_file_values

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/defaults.py | 5 -
 1 file changed, 5 deletions(-)

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index ccabd88d..2f2c907f 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -17,12 +17,7 @@ required_config_file_values = [
 
 valid_config_file_values = required_config_file_values[:]
 valid_config_file_values.extend([
-"compression_mode",
-"compressor_arch",
-"compressor_options",
-"decompressor_search_order",
 "digests",
-"distcc",
 "envscript",
 "options",
 ])



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: f40238e0c5644db5dcaaab9f0305cc9d62b144a1
Author: Matt Turner  gentoo  org>
AuthorDate: Mon May 18 22:52:36 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 01:49:37 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=f40238e0

catalyst: Remove PythonDir setting

Was used to find the arch directory containing, e.g., sparc.py, but all
that code is gone now after the modules were converted to TOML.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/defaults.py | 1 -
 catalyst/main.py | 3 ---
 2 files changed, 4 deletions(-)

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 404f4892..f6bc1e14 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -64,7 +64,6 @@ confdefaults = {
 "options": set(),
 "pkgdir": "/var/cache/binpkgs",
 "port_tmpdir": "/var/tmp/portage",
-"PythonDir": "./catalyst",
 "repo_basedir": "/var/db/repos",
 "repo_name": "gentoo",
 "repos": "%(storedir)s/repos",

diff --git a/catalyst/main.py b/catalyst/main.py
index bad712fa..b01d7a6a 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -55,9 +55,6 @@ def parse_config(config_files):
 else:
 conf_values[x] = confdefaults[x]
 
-# add our python base directory to use for loading target arch's
-conf_values["PythonDir"] = os.path.dirname(os.path.realpath(__file__))
-
 # print out any options messages
 for opt in conf_values['options']:
 if opt in option_messages:



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: targets/support/

2020-05-19 Thread Matt Turner
commit: b4941f10b5ab361c9dbee8a1ed4957cba564eccd
Author: Matt Turner  gentoo  org>
AuthorDate: Wed May 20 01:24:58 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 01:49:37 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=b4941f10

targets: Remove check_genkernel_version() function

Existed to ensure a minimum genkernel version, and was last updated in
2005. genkernel is emerged during the catalyst build now, so we will
always have an updated version.

Signed-off-by: Matt Turner  gentoo.org>

 targets/support/chroot-functions.sh | 23 ---
 targets/support/kmerge.sh   |  2 --
 2 files changed, 25 deletions(-)

diff --git a/targets/support/chroot-functions.sh 
b/targets/support/chroot-functions.sh
index d63e4918..b6e221af 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -29,29 +29,6 @@ if [[ -z "${clst_CHOST}" ]] ; then
fi
 fi
 
-check_genkernel_version() {
-   local version parts=() major minor
-
-   version=$(genkernel --version)
-   if [[ -z ${version} ]] ; then
-   echo "ERROR: Could not detect genkernel version!"
-   exit 1
-   fi
-   printf 'Genkernel version '%s' found ... ' "${version}"
-
-   IFS='.' read -a parts <<<"${version}"
-   major=${parts[0]}
-   minor=${parts[1]}
-   if [[ ${major} -gt 3 || ( ${major} -eq 3 && ${minor} -ge 3 ) ]] ; then
-   echo "OK"
-   else
-   echo "FAIL"
-   echo "ERROR: Your genkernel version is too low in your seed 
stage."
-   echo "   genkernel version 3.3.0 or greater is required."
-   exit 1
-   fi
-}
-
 get_libdir() {
ABI=$(portageq envvar ABI)
DEFAULT_ABI=$(portageq envvar DEFAULT_ABI)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 1a432293..6b589493 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -2,8 +2,6 @@
 
 source /tmp/chroot-functions.sh
 
-check_genkernel_version
-
 install -d /tmp/kerncache
 PKGDIR=/tmp/kerncache/${clst_kname}/ebuilds
 



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: 3b721ac38a6d86c952e8d65e0bba942aa49a3628
Author: Matt Turner  gentoo  org>
AuthorDate: Mon May 18 22:41:54 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 01:49:37 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=3b721ac3

catalyst: Switch internal snapshot option parsing to SpecParser

The --snapshot/-s option internally creates a .spec file but uses the
ConfigParser (nominally used for parsing catalyst.conf) rather than
SpecParser (used for parsing .spec files) and as a result has to use
'=' rather than ':' as the key/value delimiter.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/main.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/catalyst/main.py b/catalyst/main.py
index b01d7a6a..be06ccd7 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -291,8 +291,8 @@ def _main(parser, opts):
 
 mycmdline = list()
 if opts.snapshot:
-mycmdline.append('target=snapshot')
-mycmdline.append('snapshot_treeish=' + opts.snapshot)
+mycmdline.append('target: snapshot')
+mycmdline.append('snapshot_treeish: ' + opts.snapshot)
 
 conf_values['DEBUG'] = opts.debug
 conf_values['VERBOSE'] = opts.debug or opts.verbose
@@ -354,7 +354,7 @@ def _main(parser, opts):
 
 if mycmdline:
 try:
-cmdline = catalyst.config.ConfigParser()
+cmdline = catalyst.config.SpecParser()
 cmdline.parse_lines(mycmdline)
 addlargs.update(cmdline.get_values())
 except CatalystError:



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: f300760bd89aef89810c3ebf6570df1ccd3379c2
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 19:14:29 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 01:52:18 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=f300760b

catalyst: Drop ConfigParser

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/config.py | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/catalyst/config.py b/catalyst/config.py
index b527ada0..e1963f71 100644
--- a/catalyst/config.py
+++ b/catalyst/config.py
@@ -118,14 +118,3 @@ class SpecParser(ParserBase):
 def __init__(self, filename=""):
 if filename:
 self.parse_file(filename)
-
-
-class ConfigParser(ParserBase):
-
-key_value_separator = '='
-multiple_values = False
-empty_values = True
-
-def __init__(self, filename=""):
-if filename:
-self.parse_file(filename)



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/

2020-05-19 Thread Matt Turner
commit: 6bacd678bab3be95318fe4dcd432ad627a3f2b3e
Author: Matt Turner  gentoo  org>
AuthorDate: Wed May 20 00:23:42 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 01:49:37 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=6bacd678

catalyst: Add decompressor_search_order as valid spec option

The next commit is going to remove this from the list of valid config
file options, where it should not be, and that list currently is used to
populate the list of valid spec options.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 0c311515..f39895fe 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -49,6 +49,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 "common_flags",
 "compression_mode",
 "cxxflags",
+"decompressor_search_order",
 "distcc_hosts",
 "fcflags",
 "fflags",



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: 59a3b592d0ede9f0bb6e323f58443acb6ef3b297
Author: Matt Turner  gentoo  org>
AuthorDate: Mon May 18 23:49:54 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 01:49:37 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=59a3b592

catalyst: Add a missing options to valid_config_file_values

And remove required_config_file_values since we want to support running
catalyst without a config file.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/defaults.py | 20 +++-
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 2f2c907f..412cb956 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -8,18 +8,20 @@ from DeComp.definitions import COMPRESSOR_PROGRAM_OPTIONS, 
XATTRS_OPTIONS
 from DeComp.definitions import DECOMPRESSOR_PROGRAM_OPTIONS, 
LIST_XATTRS_OPTIONS
 
 
-required_config_file_values = [
-"distdir",
-"portdir",
-"sharedir",
-"storedir",
-]
-
-valid_config_file_values = required_config_file_values[:]
-valid_config_file_values.extend([
+valid_config_file_values = frozenset([
 "digests",
+"distdir",
 "envscript",
 "options",
+"port_logdir",
+"repo_basedir",
+"repo_name",
+"repos",
+"sharedir",
+"storedir",
+"target_distdir",
+"target_pkgdir",
+"var_tmpfs_portage",
 ])
 
 confdefaults = {



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/

2020-05-19 Thread Matt Turner
commit: 3e1784975ab40fda968fe4f36a57e2cfb8edd695
Author: Matt Turner  gentoo  org>
AuthorDate: Wed May 20 00:11:36 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 01:49:37 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=3e178497

catalyst: Remove unused decompression_mode spec option

Never used.

Fixes: 99e9ceabe053 (DeComp bug fixes)
Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 651bf4e4..0c311515 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -49,7 +49,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 "common_flags",
 "compression_mode",
 "cxxflags",
-"decompression_mode",
 "distcc_hosts",
 "fcflags",
 "fflags",



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: 8443f89f3c5dfbc011a333e90bfef772a95e47cd
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 00:13:14 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 01:49:37 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=8443f89f

catalyst: Verify config options against valid_config_file_values

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/main.py | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/catalyst/main.py b/catalyst/main.py
index 159fe454..543895c6 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -15,7 +15,8 @@ from DeComp.contents import ContentsMap
 
 from catalyst import log
 import catalyst.config
-from catalyst.defaults import confdefaults, option_messages, 
DEFAULT_CONFIG_FILE
+from catalyst.defaults import (confdefaults, option_messages,
+   DEFAULT_CONFIG_FILE, valid_config_file_values)
 from catalyst.support import CatalystError
 from catalyst.version import get_version
 
@@ -34,7 +35,12 @@ def parse_config(config_files):
 for config_file in config_files:
 log.notice('Loading configuration file: %s', config_file)
 try:
-conf_values.update(toml.load(config_file))
+config = toml.load(config_file)
+for key in config:
+if key not in valid_config_file_values:
+log.critical("Unknown option '%s' in config file %s",
+ key, config_file)
+conf_values.update(config)
 except Exception as e:
 log.critical('Could not find parse configuration file: %s: %s',
  config_file, e)



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: 5b1793bc3d71b81c70a83b8fd92c0069c490f64d
Author: Matt Turner  gentoo  org>
AuthorDate: Mon May 18 23:36:41 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 01:49:37 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5b1793bc

catalyst: Delete unused {required,valid}_build_targets

Fixes: 11423a21603e ([2 of 3] Update module loading for the new python 
structure)
Signed-off-by: Matt Turner  gentoo.org>

 catalyst/defaults.py | 19 ---
 1 file changed, 19 deletions(-)

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index f6bc1e14..0da717f1 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -8,25 +8,6 @@ from DeComp.definitions import COMPRESSOR_PROGRAM_OPTIONS, 
XATTRS_OPTIONS
 from DeComp.definitions import DECOMPRESSOR_PROGRAM_OPTIONS, 
LIST_XATTRS_OPTIONS
 
 
-# these should never be touched
-required_build_targets = [
-"generic_stage_target",
-"targetbase",
-]
-
-# new build types should be added here
-valid_build_targets = [
-"embedded_target",
-"livecd_stage1_target",
-"livecd_stage2_target",
-"netboot_target",
-"snapshot_target",
-"stage1_target",
-"stage2_target",
-"stage3_target",
-"stage4_target",
-]
-
 required_config_file_values = [
 "distdir",
 "portdir",



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: examples/, catalyst/, catalyst/base/, doc/, etc/

2020-05-19 Thread Matt Turner
commit: 0dd66954c4614d82cca7e09b0aeefcdac81a772c
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 00:59:10 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 01:52:18 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=0dd66954

catalyst: Configure distcc_hosts in the config file

distcc_hosts are independent of the build itself, and therefore should
be configured system-wide in catalyst.conf and not in each spec file.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py   | 1 -
 catalyst/defaults.py | 1 +
 doc/catalyst-config.5.txt| 7 ++-
 doc/catalyst-spec.5.txt  | 6 --
 etc/catalyst.conf| 3 +--
 examples/generic_stage_template.spec | 7 ---
 examples/livecd-stage1_template.spec | 7 ---
 examples/livecd-stage2_template.spec | 7 ---
 examples/stage4_template.spec| 7 ---
 9 files changed, 8 insertions(+), 38 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index a53a58dd..d213eb35 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -50,7 +50,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 "compression_mode",
 "cxxflags",
 "decompressor_search_order",
-"distcc_hosts",
 "fcflags",
 "fflags",
 "hostuse",

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index b31d5b50..27c3d9fa 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -10,6 +10,7 @@ from DeComp.definitions import DECOMPRESSOR_PROGRAM_OPTIONS, 
LIST_XATTRS_OPTIONS
 
 valid_config_file_values = frozenset([
 "digests",
+"distcc_hosts",
 "distdir",
 "envscript",
 "jobs",

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index cbef6092..570d42c2 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -78,7 +78,7 @@ be closed invalid.
 
 distcc::
 Enable distcc support for building. You have to set distcc_hosts in
-your spec file.
+your config file.
 
 icecream::
 Enable icecream compiler cluster support for building.
@@ -136,6 +136,11 @@ written to the target's make.conf if it is not the default 
value of
 Other settings
 ~~
 
+*distcc_hosts*::
+These are the hosts used as distcc slaves when distcc is enabled in
+your `catalyst.conf` (example: `127.0.0.1 192.168.0.1`).  It follows
+the same syntax as `distcc-config --set-hosts`.
+
 *jobs*::
 Integral value passed to *emerge(1)* as the parameter to --jobs and is
 used to define *MAKEOPTS* during the target build.

diff --git a/doc/catalyst-spec.5.txt b/doc/catalyst-spec.5.txt
index cf6b9cd7..682f4621 100644
--- a/doc/catalyst-spec.5.txt
+++ b/doc/catalyst-spec.5.txt
@@ -74,12 +74,6 @@ This specifies where the seed stage for this target comes 
from
 `$storedir/builds`.  The `rel_type` is also used as a path prefix for
 the seed.
 
-*distcc_hosts*::
-These are the hosts used as distcc slaves when distcc is enabled in
-your `catalyst.conf` (example: `127.0.0.1 192.168.0.1`).  It follows
-the same syntax as `distcc-config --set-hosts` and is entirely
-optional.
-
 *portage_confdir*::
 This is an optional directory containing portage configuration files
 (example: `/etc/portage`).  It follows the same syntax as

diff --git a/etc/catalyst.conf b/etc/catalyst.conf
index 2272cb86..61ea1d4a 100644
--- a/etc/catalyst.conf
+++ b/etc/catalyst.conf
@@ -35,8 +35,7 @@ options = [
# Enable FEATURES=ccache
# "ccache",
 
-   # Enable FEATURES=distcc. You have to set distcc_hosts in your spec
-   # file.
+   # Enable FEATURES=distcc. Make sure to set distcc_hosts too.
# "distcc",
 
# Enable FEATURES=icecream

diff --git a/examples/generic_stage_template.spec 
b/examples/generic_stage_template.spec
index 01c37789..8f0375c4 100644
--- a/examples/generic_stage_template.spec
+++ b/examples/generic_stage_template.spec
@@ -82,13 +82,6 @@ compressor_arch":
 #
 decompressor_search_order: lbzip2 bzip2 tar pixz xz gzip squashfs
 
-# These are the hosts used as distcc slaves when distcc is enabled in your
-# catalyst.conf.  It follows the same syntax as distcc-config --set-hosts and
-# is entirely optional.
-# example:
-# distcc_hosts: 127.0.0.1 192.168.0.1
-distcc_hosts:
-
 # This is an optional directory containing portage configuration files.  It
 # follows the same syntax as /etc/portage and should be consistent across all
 # targets to minimize problems.

diff --git a/examples/livecd-stage1_template.spec 
b/examples/livecd-stage1_template.spec
index c7086c91..b921372a 100644
--- a/examples/livecd-stage1_template.spec
+++ b/examples/livecd-stage1_template.spec
@@ -45,13 +45,6 @@ snapshot:
 # default/stage3-x86-2006.1
 source_subpath:
 
-# These are the hosts used as distcc slaves when distcc is enabled in your
-# catalyst.conf.  It follows the same syntax as distcc-config 

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: etc/, catalyst/base/, catalyst/

2020-05-19 Thread Matt Turner
commit: adfb01ca3a36e74f500e384177404563023aa12b
Author: Matt Turner  gentoo  org>
AuthorDate: Sat May 16 21:53:11 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 01:49:37 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=adfb01ca

catalyst: Remove support for source_matching="loose"

This does not seem like a useful feature to me.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py |  3 ---
 catalyst/defaults.py   |  1 -
 catalyst/support.py|  6 +++---
 etc/catalyst.conf  | 12 
 4 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index f39895fe..febaf969 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -130,8 +130,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 decomp_opt=self.settings["decomp_opt"])
 self.accepted_extensions = self.decompressor.search_order_extensions(
 self.settings["decompressor_search_order"])
-log.notice("Source file specification matching setting is: %s",
-   self.settings["source_matching"])
 log.notice("Accepted source file extensions search order: %s",
self.accepted_extensions)
 # save resources, it is not always needed
@@ -409,7 +407,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 normpath(self.settings["storedir"] + "/builds/" +
  self.settings["source_subpath"]),
 self.accepted_extensions,
-self.settings["source_matching"] in ["strict"]
 )
 log.debug('Source path returned from file_check is: %s',
   self.settings["source_path"])

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 412cb956..14f671fe 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -45,7 +45,6 @@ confdefaults = {
 "repos": "%(storedir)s/repos",
 "sharedir": "/usr/share/catalyst",
 "shdir": "%(sharedir)s/targets",
-"source_matching": "strict",
 "storedir": "/var/tmp/catalyst",
 "target_distdir": "/var/cache/distfiles",
 "target_pkgdir": "/var/cache/binpkgs",

diff --git a/catalyst/support.py b/catalyst/support.py
index c4a5c797..a6a6854a 100644
--- a/catalyst/support.py
+++ b/catalyst/support.py
@@ -59,7 +59,7 @@ def cmd(mycmd, env=None, debug=False, fail_func=None):
 print_traceback=False)
 
 
-def file_check(filepath, extensions=None, strict=True):
+def file_check(filepath, extensions=None):
 '''Check for the files existence and that only one exists
 if others are found with various extensions
 '''
@@ -73,8 +73,8 @@ def file_check(filepath, extensions=None, strict=True):
 ".CONTENTS") and not x.endswith(".CONTENTS.gz") and not 
x.endswith(".DIGESTS")]
 if len(files) == 1:
 return files[0]
-if len(files) > 1 and strict:
-msg = "Ambiguos Filename: %s\nPlease specify the correct extension as 
well" % filepath
+if len(files) > 1:
+msg = "Ambiguous Filename: %s\nPlease specify the correct extension as 
well" % filepath
 raise CatalystError(msg, print_traceback=False)
 target_file = None
 for ext in extensions:

diff --git a/etc/catalyst.conf b/etc/catalyst.conf
index f64fe971..d33be15f 100644
--- a/etc/catalyst.conf
+++ b/etc/catalyst.conf
@@ -50,18 +50,6 @@ envscript="/etc/catalyst/catalystrc"
 # (These options can be used together)
 options="autoresume bindist kerncache pkgcache seedcache"
 
-# source_matching specifies how catalyst will match non-specific file names
-# if the filename is not found as an exact match.
-# ie: a filename without the extension specified.  "/path/to/foo"
-#
-# possible values are:
-#   "strict" meaning if more than one file of that name is present with any
-#file extension, then it will raise an exception.
-#   "loose"  meaning it will search for an existing filename with an added
-#extension from an ordered list of extensions determined from the
-#decompressor_search_order specification in the spec file or 
(default)
-source_matching="strict"
-
 # port_logdir is where all build logs will be kept. This dir will be 
automatically cleaned
 # of all logs over 30 days old. If left undefined the logs will remain in the 
build directory
 # as usual and get cleaned every time a stage build is restarted.



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: fd731821ae4c7b15c7fedfad794bd3b0d05ebb7a
Author: Matt Turner  gentoo  org>
AuthorDate: Mon May 18 23:34:13 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 01:49:37 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=fd731821

catalyst: Disallow config file options in spec files

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/support.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/catalyst/support.py b/catalyst/support.py
index 0925af47..c4a5c797 100644
--- a/catalyst/support.py
+++ b/catalyst/support.py
@@ -8,7 +8,6 @@ import time
 from subprocess import Popen
 
 from catalyst import log
-from catalyst.defaults import valid_config_file_values
 
 BASH_BINARY = "/bin/bash"
 
@@ -211,7 +210,7 @@ def addl_arg_parse(myspec, addlargs, requiredspec, 
validspec):
 "helper function to help targets parse additional arguments"
 messages = []
 for x in addlargs.keys():
-if x not in validspec and x not in valid_config_file_values and x not 
in requiredspec:
+if x not in validspec and x not in requiredspec:
 messages.append("Argument \""+x+"\" not recognized.")
 else:
 myspec[x] = addlargs[x]



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: 4c97ff75f71b5fc86b0a3b89bc960966fd0959a6
Author: Matt Turner  gentoo  org>
AuthorDate: Mon May 18 23:43:52 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 01:49:37 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4c97ff75

catalyst: Disallow DEBUG and VERBOSE in spec files

Catalyst has --debug/-d and --verbose/-v options for this.

Since conf_values is assigned in a very confusing manner in main.py, I
suspect these values were added to the list due to a misunderstanding.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/defaults.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 0da717f1..ccabd88d 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -20,13 +20,11 @@ valid_config_file_values.extend([
 "compression_mode",
 "compressor_arch",
 "compressor_options",
-"DEBUG",
 "decompressor_search_order",
 "digests",
 "distcc",
 "envscript",
 "options",
-"VERBOSE",
 ])
 
 confdefaults = {



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/, doc/

2020-05-19 Thread Matt Turner
commit: 5b3e7b3b13bad7bb602c7e01eb8403821a286d46
Author: Matt Turner  gentoo  org>
AuthorDate: Mon May 18 22:38:51 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 01:49:37 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5b3e7b3b

catalyst: Drop --cli option

This confusingly named option allowed you to specify and entire spec
file on the command line. It seems that the addition of the --snapshot /
-s option in commit ac746eff5363 (new -s option for creating snapshots)
in 2004 removed all known uses, so let's remove it.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/main.py   |  5 +
 doc/catalyst.1.txt | 10 --
 2 files changed, 1 insertion(+), 14 deletions(-)

diff --git a/catalyst/main.py b/catalyst/main.py
index 4ca1aa5b..bad712fa 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -202,9 +202,6 @@ def get_parser():
help='read specfile')
 group.add_argument('-s', '--snapshot', type=str,
help='Make an ebuild repo snapshot')
-group.add_argument('-C', '--cli',
-   default=[], nargs=argparse.REMAINDER,
-   help='catalyst commandline (MUST BE LAST OPTION)')
 
 return parser
 
@@ -294,8 +291,8 @@ def _main(parser, opts):
 if not myconfigs:
 myconfigs = [DEFAULT_CONFIG_FILE]
 myspecfile = opts.file
-mycmdline = opts.cli[:]
 
+mycmdline = list()
 if opts.snapshot:
 mycmdline.append('target=snapshot')
 mycmdline.append('snapshot_treeish=' + opts.snapshot)

diff --git a/doc/catalyst.1.txt b/doc/catalyst.1.txt
index 46e21e63..90d5a24b 100644
--- a/doc/catalyst.1.txt
+++ b/doc/catalyst.1.txt
@@ -31,11 +31,6 @@ OPTIONS
 This option is to be used to clear any autoresume points that have been saved
 for this target. It is used in conjunction with *-f*, *-C*, or both.
 
-*--cli*|*-C* 'KEY'='VALUE' ...::
-This option is to be used in place of a specfile. All options are passed
-to *catalyst* on the commandline. Please note that this option must
-be the last option passed to *catalyst* for everything to work correctly.
-
 *--config*|*-c* 'FILE'::
 Tell *catalyst* to use a user-defined configuration file. A sample
 configuration file is installed at '/etc/catalyst/catalyst.conf'.
@@ -75,11 +70,6 @@ Print the version information and exit
 
 EXAMPLES
 
-Using the commandline option (*-C*, *--cli*) to build a Portage snapshot:

-# catalyst -C target=snapshot version_stamp=my_date

-
 Using the specfile option (*-f*, *--file*) to build a stage target:
 ---
 # catalyst -f stage1-specfile.spec



[gentoo-commits] repo/gentoo:master commit in: net-misc/exabgp/files/, net-misc/exabgp/

2020-05-19 Thread Patrick McLean
commit: cf95a138451d35566712e45ae763c0470ea2254e
Author: Patrick McLean  sony  com>
AuthorDate: Wed May 20 01:15:57 2020 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Wed May 20 01:15:57 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf95a138

net-misc/exabgp: revbumps, add deps on user/group packages

Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Patrick McLean  gentoo.org>

 net-misc/exabgp/{exabgp-3.4.28-r1.ebuild => exabgp-3.4.28-r2.ebuild} | 2 ++
 net-misc/exabgp/{exabgp-4.2.7-r1.ebuild => exabgp-4.2.7-r2.ebuild}   | 2 ++
 net-misc/exabgp/files/exabgp.tmpfiles| 2 +-
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/net-misc/exabgp/exabgp-3.4.28-r1.ebuild 
b/net-misc/exabgp/exabgp-3.4.28-r2.ebuild
similarity index 95%
rename from net-misc/exabgp/exabgp-3.4.28-r1.ebuild
rename to net-misc/exabgp/exabgp-3.4.28-r2.ebuild
index c61d012c7a5..f6753117ebc 100644
--- a/net-misc/exabgp/exabgp-3.4.28-r1.ebuild
+++ b/net-misc/exabgp/exabgp-3.4.28-r2.ebuild
@@ -15,6 +15,8 @@ SLOT="0"
 KEYWORDS="~amd64"
 
 RDEPEND="
+   acct-group/exabgp
+   acct-user/exabgp
dev-python/ipaddr[${PYTHON_USEDEP}]
 "
 

diff --git a/net-misc/exabgp/exabgp-4.2.7-r1.ebuild 
b/net-misc/exabgp/exabgp-4.2.7-r2.ebuild
similarity index 96%
rename from net-misc/exabgp/exabgp-4.2.7-r1.ebuild
rename to net-misc/exabgp/exabgp-4.2.7-r2.ebuild
index 8714af508f9..bdcff317c20 100644
--- a/net-misc/exabgp/exabgp-4.2.7-r1.ebuild
+++ b/net-misc/exabgp/exabgp-4.2.7-r2.ebuild
@@ -17,6 +17,8 @@ IUSE="test"
 RESTRICT="!test? ( test )"
 
 RDEPEND="
+   acct-group/exabgp
+   acct-user/exabgp
dev-python/ipaddr[${PYTHON_USEDEP}]
 "
 BDEPEND="

diff --git a/net-misc/exabgp/files/exabgp.tmpfiles 
b/net-misc/exabgp/files/exabgp.tmpfiles
index 15836294400..80720cbfc1f 100644
--- a/net-misc/exabgp/files/exabgp.tmpfiles
+++ b/net-misc/exabgp/files/exabgp.tmpfiles
@@ -1,3 +1,3 @@
 f  /run/exabgp 0755exabgp  exabgp  -   -
-p  /run/exabgp//exabgp.in  0600exabgp  exabgp  -   -
+p  /run/exabgp/exabgp.in   0600exabgp  exabgp  -   -
 p  /run/exabgp/exabgp.out  0600exabgp  exabgp  -   -



[gentoo-commits] repo/gentoo:master commit in: acct-user/exabgp/

2020-05-19 Thread Patrick McLean
commit: 391c96e931eae1a9c243204373d9e9c06dc181d4
Author: Patrick McLean  sony  com>
AuthorDate: Wed May 20 01:14:26 2020 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Wed May 20 01:14:26 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=391c96e9

acct-user/exabgp: New package

Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.99, Repoman-2.3.22
RepoMan-Options: --force
Signed-off-by: Patrick McLean  gentoo.org>

 acct-user/exabgp/exabgp-0.ebuild | 13 +
 acct-user/exabgp/metadata.xml|  8 
 2 files changed, 21 insertions(+)

diff --git a/acct-user/exabgp/exabgp-0.ebuild b/acct-user/exabgp/exabgp-0.ebuild
new file mode 100644
index 000..a78e30a7b12
--- /dev/null
+++ b/acct-user/exabgp/exabgp-0.ebuild
@@ -0,0 +1,13 @@
+# Copyright 2019-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit acct-user
+
+DESCRIPTION="User for net-misc/exabgp"
+
+ACCT_USER_ID=316
+ACCT_USER_GROUPS=( exabgp )
+
+acct-user_add_deps

diff --git a/acct-user/exabgp/metadata.xml b/acct-user/exabgp/metadata.xml
new file mode 100644
index 000..cee379b1540
--- /dev/null
+++ b/acct-user/exabgp/metadata.xml
@@ -0,0 +1,8 @@
+
+http://www.gentoo.org/dtd/metadata.dtd;>
+
+   
+   chutz...@gentoo.org
+   Patrick McLean
+   
+



[gentoo-commits] repo/gentoo:master commit in: acct-group/exabgp/

2020-05-19 Thread Patrick McLean
commit: 9767b11654668d53a78474db7e76c97b320ddde2
Author: Patrick McLean  sony  com>
AuthorDate: Wed May 20 01:13:12 2020 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Wed May 20 01:13:12 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9767b116

acct-group/exabgp: New package

Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.99, Repoman-2.3.22
RepoMan-Options: --force
Signed-off-by: Patrick McLean  gentoo.org>

 acct-group/exabgp/exabgp-0.ebuild | 8 
 acct-group/exabgp/metadata.xml| 8 
 2 files changed, 16 insertions(+)

diff --git a/acct-group/exabgp/exabgp-0.ebuild 
b/acct-group/exabgp/exabgp-0.ebuild
new file mode 100644
index 000..ef1948f17ef
--- /dev/null
+++ b/acct-group/exabgp/exabgp-0.ebuild
@@ -0,0 +1,8 @@
+# Copyright 2019-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit acct-group
+
+ACCT_GROUP_ID=316

diff --git a/acct-group/exabgp/metadata.xml b/acct-group/exabgp/metadata.xml
new file mode 100644
index 000..cee379b1540
--- /dev/null
+++ b/acct-group/exabgp/metadata.xml
@@ -0,0 +1,8 @@
+
+http://www.gentoo.org/dtd/metadata.dtd;>
+
+   
+   chutz...@gentoo.org
+   Patrick McLean
+   
+



[gentoo-commits] repo/gentoo:master commit in: net-misc/exabgp/files/

2020-05-19 Thread Patrick McLean
commit: f222e2771a3bd2a794bb5e9816e15b17464d14c1
Author: Patrick McLean  sony  com>
AuthorDate: Wed May 20 01:08:29 2020 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Wed May 20 01:08:29 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f222e277

net-misc/exabgp: fix tmpfiles

Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Patrick McLean  gentoo.org>

 net-misc/exabgp/files/exabgp.tmpfiles | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net-misc/exabgp/files/exabgp.tmpfiles 
b/net-misc/exabgp/files/exabgp.tmpfiles
index 7415d342e27..15836294400 100644
--- a/net-misc/exabgp/files/exabgp.tmpfiles
+++ b/net-misc/exabgp/files/exabgp.tmpfiles
@@ -1,3 +1,3 @@
-f  /run/exabgp 0755exabgp  exabgp  -   -
-p  /run/exabgp.in  0600exabgp  exabgp  -   -
-p  /run/exabgp.out 0600exabgp  exabgp  -   -
+f  /run/exabgp 0755exabgp  exabgp  -   -
+p  /run/exabgp//exabgp.in  0600exabgp  exabgp  -   -
+p  /run/exabgp/exabgp.out  0600exabgp  exabgp  -   -



[gentoo-commits] data/api:master commit in: files/

2020-05-19 Thread Patrick McLean
commit: 64d770b26fc63d75f64f0e612b94b1ef6185f5c9
Author: Patrick McLean  gentoo  org>
AuthorDate: Wed May 20 01:11:27 2020 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Wed May 20 01:11:27 2020 +
URL:https://gitweb.gentoo.org/data/api.git/commit/?id=64d770b2

uid-gid.txt: add exabgp at 316

Signed-off-by: Patrick McLean  gentoo.org>

 files/uid-gid.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/files/uid-gid.txt b/files/uid-gid.txt
index 4995a09..eb807c9 100644
--- a/files/uid-gid.txt
+++ b/files/uid-gid.txt
@@ -226,6 +226,7 @@ vboxusers   -   304 acct
 vboxguest  305 305 acct
 vboxsf -   306 acct
 lldpd  315 315 acct
+exabgp 316 316 acct
 openntpd   321 321 acct
 ossec  330 330 acct
 ossecm 331 330 acct



[gentoo-commits] repo/gentoo:master commit in: net-misc/exabgp/

2020-05-19 Thread Patrick McLean
commit: 6a02234182cc32b9cad4598dd2c9deef293be7f6
Author: Patrick McLean  sony  com>
AuthorDate: Wed May 20 01:05:16 2020 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Wed May 20 01:06:09 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a022341

net-misc/exabgp-3.4.28-r1: revbump, add init script, logrotate, etc

Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Patrick McLean  gentoo.org>

 .../{exabgp-3.4.28.ebuild => exabgp-3.4.28-r1.ebuild}   | 17 -
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/net-misc/exabgp/exabgp-3.4.28.ebuild 
b/net-misc/exabgp/exabgp-3.4.28-r1.ebuild
similarity index 55%
rename from net-misc/exabgp/exabgp-3.4.28.ebuild
rename to net-misc/exabgp/exabgp-3.4.28-r1.ebuild
index 81f8af7bae6..c61d012c7a5 100644
--- a/net-misc/exabgp/exabgp-3.4.28.ebuild
+++ b/net-misc/exabgp/exabgp-3.4.28-r1.ebuild
@@ -4,7 +4,7 @@
 EAPI=7
 PYTHON_COMPAT=( python2_7 )
 DISTUTILS_USE_SETUPTOOLS=rdepend
-inherit distutils-r1
+inherit tmpfiles systemd distutils-r1
 
 DESCRIPTION="The BGP swiss army knife of networking"
 HOMEPAGE="https://github.com/Exa-Networks/exabgp;
@@ -17,3 +17,18 @@ KEYWORDS="~amd64"
 RDEPEND="
dev-python/ipaddr[${PYTHON_USEDEP}]
 "
+
+python_install_all() {
+   distutils-r1_python_install_all
+
+   newinitd "${FILESDIR}/${PN}.initd" ${PN}
+   newconfd "${FILESDIR}/${PN}.confd" ${PN}
+
+   newtmpfiles "${FILESDIR}/exabgp.tmpfiles" ${PN}.conf
+   systemd_dounit etc/systemd/*
+
+   insinto /etc/logrotate.d
+   newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+   keepdir /etc/exabgp
+}



[gentoo-commits] repo/gentoo:master commit in: net-misc/exabgp/

2020-05-19 Thread Patrick McLean
commit: 507e270aa762dafd08dc7a5020c089e460d466e9
Author: Patrick McLean  sony  com>
AuthorDate: Wed May 20 01:05:56 2020 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Wed May 20 01:06:09 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=507e270a

net-misc/exabgp: remove old

Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Patrick McLean  gentoo.org>

 net-misc/exabgp/Manifest|  3 ---
 net-misc/exabgp/exabgp-3.2.17.ebuild| 18 --
 net-misc/exabgp/exabgp-3.4.26-r1.ebuild | 16 
 net-misc/exabgp/exabgp-4.0.10.ebuild| 15 ---
 4 files changed, 52 deletions(-)

diff --git a/net-misc/exabgp/Manifest b/net-misc/exabgp/Manifest
index fe699328122..44d0f761062 100644
--- a/net-misc/exabgp/Manifest
+++ b/net-misc/exabgp/Manifest
@@ -1,5 +1,2 @@
-DIST exabgp-3.2.17.tar.gz 596373 BLAKE2B 
410b77af542160334d32e3e3ea54b25f45c990c56fe2dbef0714576eb9e728cebe6d1463c0f22b1240aaf8e99ccabc5f7334cd6c2b3c77426c94b2c048c8783c
 SHA512 
69dbff75caf287e9e0f6ab3707a2bbd576b0b4c8a8c318217cf88c8a1c417d47915b038bc7d64be3bbce9771caa550275703e5543fb5799afc7149dc9f054416
-DIST exabgp-3.4.26.tar.gz 544456 BLAKE2B 
75f62ce8a68588f711e86208f00cc6de9ae51a5c82f833b91459bc05974c8eff06fec080823adfecea7b75a43caa3310f6395bd22ab4e6a696f230787bbaae23
 SHA512 
6cfcc8a40e1e05dfa76df46d8b5e13ce85e73f078d6ab4d2e23dd85035c1ed52bbbde81602ea7572841e6e20d7d7183a7e968599f9e8314e1b89e3a6341f
 DIST exabgp-3.4.28.tar.gz 546611 BLAKE2B 
c4916fd903fe8853e99ba872d87dc97908546c53d34936019c809ffa18761c3044dd7a21aace9bf6e5bb6a2823d2178422b4cdc2e8f65d7be1fda6de2755ae4d
 SHA512 
40edde5262e3033b5fcccf1e6020cce1fe856b6e31420e14166d5e0d636e5f616283827af2cd82946d94a196ef76ed7c5330ac4bebc564329852869f13018403
-DIST exabgp-4.0.10.tar.gz 2907852 BLAKE2B 
2fad6c853aa7a6f136da3334df4b3bdcaaacd03d3fbf849510bcd40b0639bbcc521726797a196418f0ecd47047c65356ee047d30b009ee01b9d498e354ea3bfd
 SHA512 
a21f49e5e99e28cc848cddfd3992dc18ba57d879d0964da0b906d16dca37aa05a00892d643d6cdeea80d4e629fc55a014d9bc50764d520fda77e94145297832e
 DIST exabgp-4.2.7.tar.gz 2931058 BLAKE2B 
2c7bf175322a36c800a8a5874b699b01f4c3d4a8712b1f8decb73665cd214c25ccf657909cfef74610e6a5fd1903245bc4da638ac9245b04c6e63d8247d72d50
 SHA512 
9c53b78e3fc5ff9cef4d267e2cb3509dbcfdd4a3b21d2c7e40a8d873a9ac586b8d5bf860699b6f878cc221af341df140acdf88aaa26a79b0e7865ce7cc607e01

diff --git a/net-misc/exabgp/exabgp-3.2.17.ebuild 
b/net-misc/exabgp/exabgp-3.2.17.ebuild
deleted file mode 100644
index 5792e63eb1c..000
--- a/net-misc/exabgp/exabgp-3.2.17.ebuild
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-PYTHON_COMPAT=( python2_7 )
-
-inherit distutils-r1
-
-DESCRIPTION="The BGP swiss army knife of networking"
-HOMEPAGE="https://github.com/Exa-Networks/exabgp;
-SRC_URI="https://github.com/Exa-Networks/${PN}/archive/${P}.tar.gz;
-MY_P="${PN}-${PN}-${PV}"
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE=""

diff --git a/net-misc/exabgp/exabgp-3.4.26-r1.ebuild 
b/net-misc/exabgp/exabgp-3.4.26-r1.ebuild
deleted file mode 100644
index c0a9b4043db..000
--- a/net-misc/exabgp/exabgp-3.4.26-r1.ebuild
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python2_7 )
-
-inherit distutils-r1
-
-DESCRIPTION="The BGP swiss army knife of networking"
-HOMEPAGE="https://github.com/Exa-Networks/exabgp;
-SRC_URI="https://github.com/Exa-Networks/${PN}/archive/${PV}.tar.gz -> 
${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE=""

diff --git a/net-misc/exabgp/exabgp-4.0.10.ebuild 
b/net-misc/exabgp/exabgp-4.0.10.ebuild
deleted file mode 100644
index 3a13ef59ecf..000
--- a/net-misc/exabgp/exabgp-4.0.10.ebuild
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python3_6 )
-
-inherit distutils-r1
-
-DESCRIPTION="The BGP swiss army knife of networking"
-HOMEPAGE="https://github.com/Exa-Networks/exabgp;
-SRC_URI="https://github.com/Exa-Networks/${PN}/archive/${PV}.tar.gz -> 
${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64"



[gentoo-commits] repo/gentoo:master commit in: net-misc/exabgp/, net-misc/exabgp/files/

2020-05-19 Thread Patrick McLean
commit: de4fcd8eb8aa91102dfe549b36f78b9491229f83
Author: Patrick McLean  sony  com>
AuthorDate: Wed May 20 01:02:50 2020 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Wed May 20 01:06:09 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de4fcd8e

net-misc/exabgp-4.2.7-r1: revbump, add init script, logrotate, etc

Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Patrick McLean  gentoo.org>

 ...{exabgp-4.2.7.ebuild => exabgp-4.2.7-r1.ebuild} | 17 ++-
 net-misc/exabgp/files/exabgp-4.2.7-paths.patch |  8 +--
 net-misc/exabgp/files/exabgp.confd | 10 
 net-misc/exabgp/files/exabgp.initd | 59 ++
 net-misc/exabgp/files/exabgp.logrotate |  5 ++
 net-misc/exabgp/files/exabgp.tmpfiles  |  3 ++
 6 files changed, 97 insertions(+), 5 deletions(-)

diff --git a/net-misc/exabgp/exabgp-4.2.7.ebuild 
b/net-misc/exabgp/exabgp-4.2.7-r1.ebuild
similarity index 69%
rename from net-misc/exabgp/exabgp-4.2.7.ebuild
rename to net-misc/exabgp/exabgp-4.2.7-r1.ebuild
index a5eec248b4f..8714af508f9 100644
--- a/net-misc/exabgp/exabgp-4.2.7.ebuild
+++ b/net-misc/exabgp/exabgp-4.2.7-r1.ebuild
@@ -4,7 +4,7 @@
 EAPI=7
 PYTHON_COMPAT=( python3_{6,7,8} )
 DISTUTILS_USE_SETUPTOOLS=rdepend
-inherit distutils-r1
+inherit tmpfiles systemd distutils-r1
 
 DESCRIPTION="The BGP swiss army knife of networking"
 HOMEPAGE="https://github.com/Exa-Networks/exabgp;
@@ -35,3 +35,18 @@ python_test() {
./qa/bin/parsing || die "tests fail with ${EPYTHON}"
nosetests -v ./qa/tests/*_test.py || die "tests fail with ${EPYTHON}"
 }
+
+python_install_all() {
+   distutils-r1_python_install_all
+
+   newinitd "${FILESDIR}/${PN}.initd" ${PN}
+   newconfd "${FILESDIR}/${PN}.confd" ${PN}
+
+   newtmpfiles "${FILESDIR}/exabgp.tmpfiles" ${PN}.conf
+   systemd_dounit etc/systemd/*
+
+   insinto /etc/logrotate.d
+   newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+   keepdir /etc/exabgp
+}

diff --git a/net-misc/exabgp/files/exabgp-4.2.7-paths.patch 
b/net-misc/exabgp/files/exabgp-4.2.7-paths.patch
index 57f3a50748d..0744a00d693 100644
--- a/net-misc/exabgp/files/exabgp-4.2.7-paths.patch
+++ b/net-misc/exabgp/files/exabgp-4.2.7-paths.patch
@@ -3,11 +3,11 @@ index 58d47087..a4266d05 100644
 --- a/setup.py
 +++ b/setup.py
 @@ -31,7 +31,7 @@ def filesOf(directory):
- 
- 
+
+
  data_files = [
 -('etc/exabgp/examples', filesOf('etc/exabgp')),
-+('/etc/exabgp/examples', filesOf('etc/exabgp')),
++('share/exabgp/examples', filesOf('etc/exabgp')),
  ]
- 
+
  if platform.system() != 'NetBSD':

diff --git a/net-misc/exabgp/files/exabgp.confd 
b/net-misc/exabgp/files/exabgp.confd
new file mode 100644
index 000..2586be12393
--- /dev/null
+++ b/net-misc/exabgp/files/exabgp.confd
@@ -0,0 +1,10 @@
+# /etc/conf.d/exabgp
+
+# arguments to pass to exabgp
+#EXABGP_ARGS="/etc/exabgp/exabgp.conf"
+
+# user to run exabgp as
+#EXABGP_USER=exabgp
+
+# group to run exabgp as
+#EXABGP_GROUP=exabgp

diff --git a/net-misc/exabgp/files/exabgp.initd 
b/net-misc/exabgp/files/exabgp.initd
new file mode 100644
index 000..e220108d826
--- /dev/null
+++ b/net-misc/exabgp/files/exabgp.initd
@@ -0,0 +1,59 @@
+#!/sbin/openrc-run
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# default arguments
+: "${EXABGP_ARGS:=--env=/etc/${RC_SVCNAME}/exabgp.env 
/etc/${RC_SVCNAME}/exabgp.conf}"
+
+command="capsh"
+command_args="
+   --uid=${EXABGP_USER:-exabgp}
+   --gid=${EXABGP_GROUP:-exabgp}
+   --caps='cap_net_admin+epi cap_setuid+ep-i cap_setgid+ep-i'
+   -- -c \"/usr/bin/exabgp ${EXABGP_ARGS}\""
+command_background="yes"
+pidfile="/run/exabgp/${RC_SVCNAME}.pid"
+start_stop_daemon_args="
+   --stdout /var/log/${RC_SVCNAME}/exabgp.log
+   --stderr /var/log/${RC_SVCNAME}/exabgp.log"
+extra_started_commands="routes sessions"
+extra_commands="checkconfig"
+
+depend() {
+   need net
+}
+
+start_pre() {
+   checkpath -q -d -m 0755 -o "${EXABGP_USER}:${EXABGP_GROUP}" \
+   /run/exabgp || return
+
+   checkpath -q -p -m 0600 -o "${EXABGP_USER}:${EXABGP_GROUP}" \
+   /run/exabgp/${RC_SVCNAME}.{in,out} || return
+
+   checkconfig || return
+}
+
+stop_pre() {
+   # don't restart if the configuration is bad
+   if [ "${RC_CMD}" = restart ]; then
+   checkconfig || return
+   fi
+}
+
+checkconfig() {
+   ebegin "Checking configuration for ${RC_SVCNAME}"
+   exabgp -t ${EXABGP_ARGS}
+   eend ${?} "Invalid configuration"
+}
+
+sessions() {
+   ebegin "Querying sessions"
+   exabgpcli --env /etc/${RC_SVCNAME}/exabgp.env show neighbor summary
+   eend ${?} "exabgpcli failed"
+}
+
+routes() {
+   ebegin "Querying routes"
+   exabgpcli --env /etc/${RC_SVCNAME}/exabgp.env show adj-rib out
+ 

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: 0b200aa972b668a7a8e896995874904c47107377
Author: Matt Turner  gentoo  org>
AuthorDate: Mon May 18 23:36:41 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 00:14:19 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=0b200aa9

catalyst: Delete unused {required,valid}_build_targets

Fixes: 11423a21603e ([2 of 3] Update module loading for the new python 
structure)
Signed-off-by: Matt Turner  gentoo.org>

 catalyst/defaults.py | 19 ---
 1 file changed, 19 deletions(-)

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index f6bc1e14..0da717f1 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -8,25 +8,6 @@ from DeComp.definitions import COMPRESSOR_PROGRAM_OPTIONS, 
XATTRS_OPTIONS
 from DeComp.definitions import DECOMPRESSOR_PROGRAM_OPTIONS, 
LIST_XATTRS_OPTIONS
 
 
-# these should never be touched
-required_build_targets = [
-"generic_stage_target",
-"targetbase",
-]
-
-# new build types should be added here
-valid_build_targets = [
-"embedded_target",
-"livecd_stage1_target",
-"livecd_stage2_target",
-"netboot_target",
-"snapshot_target",
-"stage1_target",
-"stage2_target",
-"stage3_target",
-"stage4_target",
-]
-
 required_config_file_values = [
 "distdir",
 "portdir",



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: 49055f32f5ad518501990ab320ae8be39f8d9f3b
Author: Matt Turner  gentoo  org>
AuthorDate: Mon May 18 23:34:13 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 00:24:54 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=49055f32

catalyst: Disallow config file options in spec files

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/support.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/catalyst/support.py b/catalyst/support.py
index 0925af47..c4a5c797 100644
--- a/catalyst/support.py
+++ b/catalyst/support.py
@@ -8,7 +8,6 @@ import time
 from subprocess import Popen
 
 from catalyst import log
-from catalyst.defaults import valid_config_file_values
 
 BASH_BINARY = "/bin/bash"
 
@@ -211,7 +210,7 @@ def addl_arg_parse(myspec, addlargs, requiredspec, 
validspec):
 "helper function to help targets parse additional arguments"
 messages = []
 for x in addlargs.keys():
-if x not in validspec and x not in valid_config_file_values and x not 
in requiredspec:
+if x not in validspec and x not in requiredspec:
 messages.append("Argument \""+x+"\" not recognized.")
 else:
 myspec[x] = addlargs[x]



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: 7d3c8c9ca59d6c934ebd2c50269124ab74c99346
Author: Matt Turner  gentoo  org>
AuthorDate: Mon May 18 23:43:52 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 00:20:25 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=7d3c8c9c

catalyst: Disallow DEBUG and VERBOSE in spec files

Catalyst has --debug/-d and --verbose/-v options for this.

Since conf_values is assigned in a very confusing manner in main.py, I
suspect these values were added to the list due to a misunderstanding.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/defaults.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 0da717f1..ccabd88d 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -20,13 +20,11 @@ valid_config_file_values.extend([
 "compression_mode",
 "compressor_arch",
 "compressor_options",
-"DEBUG",
 "decompressor_search_order",
 "digests",
 "distcc",
 "envscript",
 "options",
-"VERBOSE",
 ])
 
 confdefaults = {



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: a366ca0ce932edbd073c569e5f0d551cbc52adae
Author: Matt Turner  gentoo  org>
AuthorDate: Mon May 18 23:48:22 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 00:24:54 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=a366ca0c

catalyst: Remove spec file options from valid_config_file_values

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/defaults.py | 5 -
 1 file changed, 5 deletions(-)

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index ccabd88d..2f2c907f 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -17,12 +17,7 @@ required_config_file_values = [
 
 valid_config_file_values = required_config_file_values[:]
 valid_config_file_values.extend([
-"compression_mode",
-"compressor_arch",
-"compressor_options",
-"decompressor_search_order",
 "digests",
-"distcc",
 "envscript",
 "options",
 ])



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: 474584e2f8822c1b878952e07b1d28a925c0b5e2
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 19:14:29 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 00:25:11 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=474584e2

catalyst: Drop ConfigParser

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/config.py | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/catalyst/config.py b/catalyst/config.py
index b527ada0..e1963f71 100644
--- a/catalyst/config.py
+++ b/catalyst/config.py
@@ -118,14 +118,3 @@ class SpecParser(ParserBase):
 def __init__(self, filename=""):
 if filename:
 self.parse_file(filename)
-
-
-class ConfigParser(ParserBase):
-
-key_value_separator = '='
-multiple_values = False
-empty_values = True
-
-def __init__(self, filename=""):
-if filename:
-self.parse_file(filename)



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/

2020-05-19 Thread Matt Turner
commit: 16d984fb450812edb39395cb08010615711495bc
Author: Matt Turner  gentoo  org>
AuthorDate: Wed May 20 00:23:42 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 00:23:42 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=16d984fb

catalyst: Add decompressor_search_order as valid spec option

The next commit is going to remove this from the list of valid config
file options, where it should not be, and that list currently is used to
populate the list of valid spec options.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 0c311515..f39895fe 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -49,6 +49,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 "common_flags",
 "compression_mode",
 "cxxflags",
+"decompressor_search_order",
 "distcc_hosts",
 "fcflags",
 "fflags",



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, etc/, catalyst/

2020-05-19 Thread Matt Turner
commit: 883744726a73ea1e97dd15e54c099444f4e7f538
Author: Matt Turner  gentoo  org>
AuthorDate: Sat May 16 21:53:11 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 00:24:54 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=88374472

catalyst: Remove support for source_matching="loose"

This does not seem like a useful feature to me.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py |  3 ---
 catalyst/defaults.py   |  1 -
 catalyst/support.py|  6 +++---
 etc/catalyst.conf  | 12 
 4 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index f39895fe..febaf969 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -130,8 +130,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 decomp_opt=self.settings["decomp_opt"])
 self.accepted_extensions = self.decompressor.search_order_extensions(
 self.settings["decompressor_search_order"])
-log.notice("Source file specification matching setting is: %s",
-   self.settings["source_matching"])
 log.notice("Accepted source file extensions search order: %s",
self.accepted_extensions)
 # save resources, it is not always needed
@@ -409,7 +407,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 normpath(self.settings["storedir"] + "/builds/" +
  self.settings["source_subpath"]),
 self.accepted_extensions,
-self.settings["source_matching"] in ["strict"]
 )
 log.debug('Source path returned from file_check is: %s',
   self.settings["source_path"])

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 412cb956..14f671fe 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -45,7 +45,6 @@ confdefaults = {
 "repos": "%(storedir)s/repos",
 "sharedir": "/usr/share/catalyst",
 "shdir": "%(sharedir)s/targets",
-"source_matching": "strict",
 "storedir": "/var/tmp/catalyst",
 "target_distdir": "/var/cache/distfiles",
 "target_pkgdir": "/var/cache/binpkgs",

diff --git a/catalyst/support.py b/catalyst/support.py
index c4a5c797..a6a6854a 100644
--- a/catalyst/support.py
+++ b/catalyst/support.py
@@ -59,7 +59,7 @@ def cmd(mycmd, env=None, debug=False, fail_func=None):
 print_traceback=False)
 
 
-def file_check(filepath, extensions=None, strict=True):
+def file_check(filepath, extensions=None):
 '''Check for the files existence and that only one exists
 if others are found with various extensions
 '''
@@ -73,8 +73,8 @@ def file_check(filepath, extensions=None, strict=True):
 ".CONTENTS") and not x.endswith(".CONTENTS.gz") and not 
x.endswith(".DIGESTS")]
 if len(files) == 1:
 return files[0]
-if len(files) > 1 and strict:
-msg = "Ambiguos Filename: %s\nPlease specify the correct extension as 
well" % filepath
+if len(files) > 1:
+msg = "Ambiguous Filename: %s\nPlease specify the correct extension as 
well" % filepath
 raise CatalystError(msg, print_traceback=False)
 target_file = None
 for ext in extensions:

diff --git a/etc/catalyst.conf b/etc/catalyst.conf
index f64fe971..d33be15f 100644
--- a/etc/catalyst.conf
+++ b/etc/catalyst.conf
@@ -50,18 +50,6 @@ envscript="/etc/catalyst/catalystrc"
 # (These options can be used together)
 options="autoresume bindist kerncache pkgcache seedcache"
 
-# source_matching specifies how catalyst will match non-specific file names
-# if the filename is not found as an exact match.
-# ie: a filename without the extension specified.  "/path/to/foo"
-#
-# possible values are:
-#   "strict" meaning if more than one file of that name is present with any
-#file extension, then it will raise an exception.
-#   "loose"  meaning it will search for an existing filename with an added
-#extension from an ordered list of extensions determined from the
-#decompressor_search_order specification in the spec file or 
(default)
-source_matching="strict"
-
 # port_logdir is where all build logs will be kept. This dir will be 
automatically cleaned
 # of all logs over 30 days old. If left undefined the logs will remain in the 
build directory
 # as usual and get cleaned every time a stage build is restarted.



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: 313b193aead3c5ab2e95902f7ab5f999828e9c23
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 00:13:14 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 00:24:54 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=313b193a

catalyst: Verify config options against valid_config_file_values

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/main.py | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/catalyst/main.py b/catalyst/main.py
index 159fe454..543895c6 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -15,7 +15,8 @@ from DeComp.contents import ContentsMap
 
 from catalyst import log
 import catalyst.config
-from catalyst.defaults import confdefaults, option_messages, 
DEFAULT_CONFIG_FILE
+from catalyst.defaults import (confdefaults, option_messages,
+   DEFAULT_CONFIG_FILE, valid_config_file_values)
 from catalyst.support import CatalystError
 from catalyst.version import get_version
 
@@ -34,7 +35,12 @@ def parse_config(config_files):
 for config_file in config_files:
 log.notice('Loading configuration file: %s', config_file)
 try:
-conf_values.update(toml.load(config_file))
+config = toml.load(config_file)
+for key in config:
+if key not in valid_config_file_values:
+log.critical("Unknown option '%s' in config file %s",
+ key, config_file)
+conf_values.update(config)
 except Exception as e:
 log.critical('Could not find parse configuration file: %s: %s',
  config_file, e)



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/, catalyst/base/, etc/, doc/

2020-05-19 Thread Matt Turner
commit: 0df8a1765acd3bf0734cda5ee528b57f47ac93e6
Author: Matt Turner  gentoo  org>
AuthorDate: Thu May 14 02:37:11 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 00:24:54 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=0df8a176

catalyst: Set jobs/load-average via catalyst.conf

We currently have two mechanisms of setting MAKEOPTS: in spec files and
in catalystrc.

Setting makeopts in spec files doesn't make sense. The spec should
describe the thing that's being built and not contain options that are
specific to the build system.

Setting makeopts via catalystrc is better, but it only applies to the
actual build system invocations, leaving emerge to run jobs serially or
again requiring configuration specific to the build machine to be put
into the spec file. For example:

update_seed_command: ... --jobs 5 --load-average 5

With jobs and load-average specified in catalyst.conf, catalyst has the
information required to configure both emerge and the build systems
emerge executes.

This removes the undocumented makeopts spec file option and replaces it
with jobs and load-average settings in catalyst.conf.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py | 12 +---
 catalyst/defaults.py   |  2 ++
 doc/catalyst-config.5.txt  | 24 +++-
 etc/catalystrc |  3 ---
 4 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 9410f151..a53a58dd 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -56,7 +56,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 "hostuse",
 "kerncache_path",
 "ldflags",
-"makeopts",
 "pkgcache_path",
 "portage_confdir",
 "portage_overlay",
@@ -1308,12 +1307,11 @@ class StageBase(TargetBase, ClearBase, GenBase):
 else:
 self.env[varname] = "false"
 
-if "makeopts" in self.settings:
-if isinstance(self.settings["makeopts"], str):
-self.env["MAKEOPTS"] = self.settings["makeopts"]
-else:
-# ensure makeopts is a string
-self.env["MAKEOPTS"] = ' '.join(self.settings["makeopts"])
+makeopts = []
+for flag, setting in {'j': 'jobs', 'l': 'load-average'}.items():
+if setting in self.settings:
+makeopts.append(f'-{flag}{self.settings[setting]}')
+self.env['MAKEOPTS'] = ' '.join(makeopts)
 
 log.debug('setup_environment(); env = %r', self.env)
 

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 14f671fe..b31d5b50 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -12,6 +12,8 @@ valid_config_file_values = frozenset([
 "digests",
 "distdir",
 "envscript",
+"jobs",
+"load-average",
 "options",
 "port_logdir",
 "repo_basedir",

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index 7ac9a2a3..4ea4690f 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -48,9 +48,9 @@ $ python3 -c 'import hashlib; 
print(hashlib.algorithms_available)'
 
 *envscript*::
 Environment script location, which allows users to set options such as
-HTTP proxies, `MAKEOPTS`, `GENTOO_MIRRORS`, or any other environment
-variables needed for building.  The envscript file sets environment
-variables using POSIX shell notation:
+HTTP proxies, `GENTOO_MIRRORS`, or any other environment variables
+needed for building.  The envscript file sets environment variables
+using POSIX shell notation:
 +
 -
 export FOO="bar"
@@ -136,6 +136,18 @@ written to the target's make.conf if it is not the default 
value of
 Other settings
 ~~
 
+*jobs*::
+Number of jobs to execute simultaneously.
+
+*load-average*::
+Load-average
+
+*port_logdir*::
+Location for build logs (example: `/var/tmp/catalyst/tmp`).  This dir
+will be automatically cleaned of all logs over 30 days old. If left
+undefined the logs will remain in the build directory as usual and get
+cleaned every time a stage build is restarted.
+
 *sharedir*::
 Catalyst runtime script location.  `/usr/share/catalyst` should work for
 most default installations.  If you are running catalyst from a Git
@@ -145,12 +157,6 @@ checkout, you should change this to point to your checkout 
directory.
 Location for built seeds, temporary files, and caches (example:
 `/var/tmp/catalyst`).
 
-*port_logdir*::
-Location for build logs (example: `/var/tmp/catalyst/tmp`).  This dir
-will be automatically cleaned of all logs over 30 days old. If left
-undefined the logs will remain in the build directory as usual and get
-cleaned every time a stage build is restarted.
-
 *var_tmpfs_portage*::
 Set the size of a `/var/tmp/portage` tmpfs in gigabytes (example:
 `16`).  If set, this 

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/

2020-05-19 Thread Matt Turner
commit: a6216d2689d7d67953063a26065c4aec2db0e5d1
Author: Matt Turner  gentoo  org>
AuthorDate: Wed May 20 00:11:36 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 00:14:17 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=a6216d26

catalyst: Remove unused decompression_mode spec option

Never used.

Fixes: 99e9ceabe053 (DeComp bug fixes)
Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 651bf4e4..0c311515 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -49,7 +49,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 "common_flags",
 "compression_mode",
 "cxxflags",
-"decompression_mode",
 "distcc_hosts",
 "fcflags",
 "fflags",



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: 09c9a23de7abc124442e7954db08f198dca62d34
Author: Matt Turner  gentoo  org>
AuthorDate: Mon May 18 23:49:54 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 00:24:54 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=09c9a23d

catalyst: Add a missing options to valid_config_file_values

And remove required_config_file_values since we want to support running
catalyst without a config file.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/defaults.py | 20 +++-
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 2f2c907f..412cb956 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -8,18 +8,20 @@ from DeComp.definitions import COMPRESSOR_PROGRAM_OPTIONS, 
XATTRS_OPTIONS
 from DeComp.definitions import DECOMPRESSOR_PROGRAM_OPTIONS, 
LIST_XATTRS_OPTIONS
 
 
-required_config_file_values = [
-"distdir",
-"portdir",
-"sharedir",
-"storedir",
-]
-
-valid_config_file_values = required_config_file_values[:]
-valid_config_file_values.extend([
+valid_config_file_values = frozenset([
 "digests",
+"distdir",
 "envscript",
 "options",
+"port_logdir",
+"repo_basedir",
+"repo_name",
+"repos",
+"sharedir",
+"storedir",
+"target_distdir",
+"target_pkgdir",
+"var_tmpfs_portage",
 ])
 
 confdefaults = {



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, etc/, catalyst/

2020-05-19 Thread Matt Turner
commit: da7e5a151eb2dfc6a1f4a0afd755d93582789ce6
Author: Matt Turner  gentoo  org>
AuthorDate: Sat May 16 03:18:21 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 00:24:54 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=da7e5a15

catalyst: Convert catalyst.conf to TOML

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py |  4 +--
 catalyst/main.py   | 47 +++--
 etc/catalyst.conf  | 88 +++---
 3 files changed, 67 insertions(+), 72 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index febaf969..9410f151 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -857,8 +857,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
 if 'var_tmpfs_portage' not in self.settings:
 continue
 
-mount += ['-t', 'tmpfs', '-o', 'size=' +
-  self.settings['var_tmpfs_portage'] + 'G']
+mount += ['-t', 'tmpfs', '-o',
+  f"size={self.settings['var_tmpfs_portage']}G"]
 elif source == 'tmpfs':
 mount += ['-t', 'tmpfs']
 elif source == 'shm':

diff --git a/catalyst/main.py b/catalyst/main.py
index be06ccd7..159fe454 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -5,6 +5,8 @@ import os
 import sys
 import textwrap
 
+import toml
+
 from snakeoil.process import namespaces
 
 from DeComp.definitions import (COMPRESS_DEFINITIONS, DECOMPRESS_DEFINITIONS,
@@ -17,8 +19,7 @@ from catalyst.defaults import confdefaults, option_messages, 
DEFAULT_CONFIG_FILE
 from catalyst.support import CatalystError
 from catalyst.version import get_version
 
-
-conf_values = {}
+conf_values = confdefaults
 
 
 def version():
@@ -30,42 +31,20 @@ def version():
 
 
 def parse_config(config_files):
-# search a couple of different areas for the main config file
-myconf = {}
-
-# try and parse the config file "config_file"
 for config_file in config_files:
 log.notice('Loading configuration file: %s', config_file)
 try:
-config = catalyst.config.ConfigParser(config_file)
-myconf.update(config.get_values())
+conf_values.update(toml.load(config_file))
 except Exception as e:
 log.critical('Could not find parse configuration file: %s: %s',
  config_file, e)
 
-# now, load up the values into conf_values so that we can use them
-for x in list(confdefaults):
-if x in myconf:
-if x == 'options':
-conf_values[x] = set(myconf[x].split())
-elif x in ["decompressor_search_order"]:
-conf_values[x] = myconf[x].split()
-else:
-conf_values[x] = myconf[x]
-else:
-conf_values[x] = confdefaults[x]
-
 # print out any options messages
 for opt in conf_values['options']:
 if opt in option_messages:
 log.info(option_messages[opt])
 
-for key in ["digests", "envscript", "var_tmpfs_portage", "port_logdir",
-"local_overlay", "repos"]:
-if key in myconf:
-conf_values[key] = myconf[key]
-
-if "envscript" in myconf:
+if "envscript" in conf_values:
 log.info('Envscript support enabled.')
 
 # take care of any variable substitutions that may be left
@@ -297,17 +276,17 @@ def _main(parser, opts):
 conf_values['DEBUG'] = opts.debug
 conf_values['VERBOSE'] = opts.debug or opts.verbose
 
-options = set()
+options = []
 if opts.fetchonly:
-options.add('fetch')
+options.append('fetch')
 if opts.purge:
-options.add('purge')
+options.append('purge')
 if opts.purgeonly:
-options.add('purgeonly')
+options.append('purgeonly')
 if opts.purgetmponly:
-options.add('purgetmponly')
+options.append('purgetmponly')
 if opts.clear_autoresume:
-options.add('clear-autoresume')
+options.append('clear-autoresume')
 
 # Make sure we have some work before moving further.
 if not myspecfile and not mycmdline:
@@ -318,7 +297,7 @@ def _main(parser, opts):
 # import configuration file and import our main module using those settings
 parse_config(myconfigs)
 
-conf_values["options"].update(options)
+conf_values["options"].extend(options)
 log.notice('conf_values[options] = %s', conf_values['options'])
 
 # initialize our contents generator
@@ -335,7 +314,7 @@ def _main(parser, opts):
 
 if "digests" in conf_values:
 valid_digests = hashlib.algorithms_available
-digests = set(conf_values['digests'].split())
+digests = set(conf_values['digests'])
 conf_values['digests'] = digests
 
 # First validate all the requested digests are valid keys.

diff --git 

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: examples/, etc/, catalyst/base/, doc/, catalyst/

2020-05-19 Thread Matt Turner
commit: 9446b0b4e4ec4bf3aeb5ded22430bacee1ed2a89
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 00:59:10 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 00:25:07 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=9446b0b4

catalyst: Configure distcc_hosts in the config file

distcc_hosts are independent of the build itself, and therefore should
be configured system-wide in catalyst.conf and not in each spec file.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py   | 1 -
 catalyst/defaults.py | 1 +
 doc/catalyst-config.5.txt| 7 ++-
 doc/catalyst-spec.5.txt  | 6 --
 etc/catalyst.conf| 3 +--
 examples/generic_stage_template.spec | 7 ---
 examples/livecd-stage1_template.spec | 7 ---
 examples/livecd-stage2_template.spec | 7 ---
 examples/stage4_template.spec| 7 ---
 9 files changed, 8 insertions(+), 38 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index a53a58dd..d213eb35 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -50,7 +50,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 "compression_mode",
 "cxxflags",
 "decompressor_search_order",
-"distcc_hosts",
 "fcflags",
 "fflags",
 "hostuse",

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index b31d5b50..27c3d9fa 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -10,6 +10,7 @@ from DeComp.definitions import DECOMPRESSOR_PROGRAM_OPTIONS, 
LIST_XATTRS_OPTIONS
 
 valid_config_file_values = frozenset([
 "digests",
+"distcc_hosts",
 "distdir",
 "envscript",
 "jobs",

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index 4ea4690f..efa707c7 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -78,7 +78,7 @@ be closed invalid.
 
 distcc::
 Enable distcc support for building. You have to set distcc_hosts in
-your spec file.
+your config file.
 
 icecream::
 Enable icecream compiler cluster support for building.
@@ -136,6 +136,11 @@ written to the target's make.conf if it is not the default 
value of
 Other settings
 ~~
 
+*distcc_hosts*::
+These are the hosts used as distcc slaves when distcc is enabled in
+your `catalyst.conf` (example: `127.0.0.1 192.168.0.1`).  It follows
+the same syntax as `distcc-config --set-hosts`.
+
 *jobs*::
 Number of jobs to execute simultaneously.
 

diff --git a/doc/catalyst-spec.5.txt b/doc/catalyst-spec.5.txt
index cf6b9cd7..682f4621 100644
--- a/doc/catalyst-spec.5.txt
+++ b/doc/catalyst-spec.5.txt
@@ -74,12 +74,6 @@ This specifies where the seed stage for this target comes 
from
 `$storedir/builds`.  The `rel_type` is also used as a path prefix for
 the seed.
 
-*distcc_hosts*::
-These are the hosts used as distcc slaves when distcc is enabled in
-your `catalyst.conf` (example: `127.0.0.1 192.168.0.1`).  It follows
-the same syntax as `distcc-config --set-hosts` and is entirely
-optional.
-
 *portage_confdir*::
 This is an optional directory containing portage configuration files
 (example: `/etc/portage`).  It follows the same syntax as

diff --git a/etc/catalyst.conf b/etc/catalyst.conf
index 2272cb86..61ea1d4a 100644
--- a/etc/catalyst.conf
+++ b/etc/catalyst.conf
@@ -35,8 +35,7 @@ options = [
# Enable FEATURES=ccache
# "ccache",
 
-   # Enable FEATURES=distcc. You have to set distcc_hosts in your spec
-   # file.
+   # Enable FEATURES=distcc. Make sure to set distcc_hosts too.
# "distcc",
 
# Enable FEATURES=icecream

diff --git a/examples/generic_stage_template.spec 
b/examples/generic_stage_template.spec
index 01c37789..8f0375c4 100644
--- a/examples/generic_stage_template.spec
+++ b/examples/generic_stage_template.spec
@@ -82,13 +82,6 @@ compressor_arch":
 #
 decompressor_search_order: lbzip2 bzip2 tar pixz xz gzip squashfs
 
-# These are the hosts used as distcc slaves when distcc is enabled in your
-# catalyst.conf.  It follows the same syntax as distcc-config --set-hosts and
-# is entirely optional.
-# example:
-# distcc_hosts: 127.0.0.1 192.168.0.1
-distcc_hosts:
-
 # This is an optional directory containing portage configuration files.  It
 # follows the same syntax as /etc/portage and should be consistent across all
 # targets to minimize problems.

diff --git a/examples/livecd-stage1_template.spec 
b/examples/livecd-stage1_template.spec
index c7086c91..b921372a 100644
--- a/examples/livecd-stage1_template.spec
+++ b/examples/livecd-stage1_template.spec
@@ -45,13 +45,6 @@ snapshot:
 # default/stage3-x86-2006.1
 source_subpath:
 
-# These are the hosts used as distcc slaves when distcc is enabled in your
-# catalyst.conf.  It follows the same syntax as distcc-config --set-hosts and
-# is entirely optional.
-# example:
-# distcc_hosts: 127.0.0.1 

[gentoo-commits] proj/releng:master commit in: tools-musl/, releases/specs/ppc/ppc64/, releases/specs/x86/i686/, ...

2020-05-19 Thread Matt Turner
commit: b8d1e0177a2c2fbe1279be2f59987f36196d9b13
Author: Matt Turner  gentoo  org>
AuthorDate: Wed May 20 00:03:17 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Wed May 20 00:04:13 2020 +
URL:https://gitweb.gentoo.org/proj/releng.git/commit/?id=b8d1e017

specs: Remove decompressor_search_order: ...

It's just been copied and pasted for no real reason.

Signed-off-by: Matt Turner  gentoo.org>

 releases/specs/amd64/hardened/stage1-nomultilib.spec | 1 -
 releases/specs/amd64/hardened/stage1-selinux-nomultilib.spec | 1 -
 releases/specs/amd64/hardened/stage1-selinux.spec| 1 -
 releases/specs/amd64/hardened/stage1.spec| 1 -
 releases/specs/amd64/hardened/stage2-nomultilib.spec | 1 -
 releases/specs/amd64/hardened/stage2-selinux-nomultilib.spec | 1 -
 releases/specs/amd64/hardened/stage2-selinux.spec| 1 -
 releases/specs/amd64/hardened/stage2.spec| 1 -
 releases/specs/amd64/hardened/stage3-nomultilib.spec | 1 -
 releases/specs/amd64/hardened/stage3-selinux-nomultilib.spec | 1 -
 releases/specs/amd64/hardened/stage3-selinux.spec| 1 -
 releases/specs/amd64/hardened/stage3.spec| 1 -
 releases/specs/amd64/hardened/stage4-minimal.spec| 1 -
 releases/specs/amd64/hardened/stage4-nomultilib-minimal.spec | 1 -
 releases/specs/amd64/stage1-nomultilib.spec  | 1 -
 releases/specs/amd64/stage1-x32.spec | 1 -
 releases/specs/amd64/stage1.spec | 1 -
 releases/specs/amd64/stage2-nomultilib.spec  | 1 -
 releases/specs/amd64/stage2-x32.spec | 1 -
 releases/specs/amd64/stage2.spec | 1 -
 releases/specs/amd64/stage3-nomultilib.spec  | 1 -
 releases/specs/amd64/stage3-x32.spec | 1 -
 releases/specs/amd64/stage3.spec | 1 -
 releases/specs/amd64/stage4-minimal.spec | 1 -
 releases/specs/amd64/stage4-nomultilib-minimal.spec  | 1 -
 releases/specs/arm64/stage4-minimal.spec | 1 -
 releases/specs/ia64/installcd-stage1.spec| 1 -
 releases/specs/ia64/installcd-stage2-minimal.spec| 1 -
 releases/specs/ia64/stage1.spec  | 1 -
 releases/specs/ia64/stage2.spec  | 1 -
 releases/specs/ia64/stage3.spec  | 1 -
 releases/specs/ppc/ppc32/g4/stage2.spec  | 1 -
 releases/specs/ppc/ppc32/g4/stage3.spec  | 1 -
 releases/specs/ppc/ppc32/installcd-stage1.spec   | 1 -
 releases/specs/ppc/ppc32/stage1.spec | 1 -
 releases/specs/ppc/ppc32/stage2.spec | 1 -
 releases/specs/ppc/ppc32/stage3.spec | 1 -
 releases/specs/ppc/ppc64/stage1-32ul.spec| 1 -
 releases/specs/ppc/ppc64/stage1.spec | 1 -
 releases/specs/ppc/ppc64/stage2-32ul.spec| 1 -
 releases/specs/ppc/ppc64/stage2.spec | 1 -
 releases/specs/ppc/ppc64/stage3-32ul.spec| 1 -
 releases/specs/ppc/ppc64/stage3.spec | 1 -
 releases/specs/ppc/ppc64le/stage1.spec   | 1 -
 releases/specs/ppc/ppc64le/stage3.spec   | 1 -
 releases/specs/s390/s390/stage1.spec | 1 -
 releases/specs/s390/s390/stage2.spec | 1 -
 releases/specs/s390/s390/stage3.spec | 1 -
 releases/specs/s390/s390x/stage1.spec| 1 -
 releases/specs/s390/s390x/stage2.spec| 1 -
 releases/specs/s390/s390x/stage3.spec| 1 -
 releases/specs/sparc/sparc/stage1.spec   | 1 -
 releases/specs/sparc/sparc/stage2.spec   | 1 -
 releases/specs/sparc/sparc/stage3.spec   | 1 -
 releases/specs/sparc/sparc/systemd-stage1.spec   | 1 -
 releases/specs/sparc/sparc/systemd-stage2.spec   | 1 -
 releases/specs/sparc/sparc/systemd-stage3.spec   | 1 -
 releases/specs/sparc/sparc64/stage1.spec | 1 -
 releases/specs/sparc/sparc64/stage2.spec | 1 -
 releases/specs/sparc/sparc64/stage3.spec | 1 -
 releases/specs/sparc/sparc64/systemd-stage1.spec | 1 -
 releases/specs/sparc/sparc64/systemd-stage2.spec | 1 -
 releases/specs/sparc/sparc64/systemd-stage3.spec | 1 -
 releases/specs/x86/hardened/stage1.spec  | 1 -
 releases/specs/x86/hardened/stage2.spec  | 1 -
 releases/specs/x86/hardened/stage3.spec  | 1 -
 releases/specs/x86/i686/stage1.spec  | 1 -
 

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, doc/, catalyst/, etc/

2020-05-19 Thread Matt Turner
commit: b5668f166f559fbf96e15e4e01fe926d358f6261
Author: Matt Turner  gentoo  org>
AuthorDate: Thu May 14 02:37:11 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 23:45:26 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=b5668f16

catalyst: Set jobs/load-average via catalyst.conf

We currently have two mechanisms of setting MAKEOPTS: in spec files and
in catalystrc.

Setting makeopts in spec files doesn't make sense. The spec should
describe the thing that's being built and not contain options that are
specific to the build system.

Setting makeopts via catalystrc is better, but it only applies to the
actual build system invocations, leaving emerge to run jobs serially or
again requiring configuration specific to the build machine to be put
into the spec file. For example:

update_seed_command: ... --jobs 5 --load-average 5

With jobs and load-average specified in catalyst.conf, catalyst has the
information required to configure both emerge and the build systems
emerge executes.

This removes the undocumented makeopts spec file option and replaces it
with jobs and load-average settings in catalyst.conf.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py | 12 +---
 catalyst/defaults.py   |  2 ++
 doc/catalyst-config.5.txt  | 24 +++-
 etc/catalystrc |  3 ---
 4 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 5c82a46d..655fc9c7 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -56,7 +56,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 "hostuse",
 "kerncache_path",
 "ldflags",
-"makeopts",
 "pkgcache_path",
 "portage_confdir",
 "portage_overlay",
@@ -1308,12 +1307,11 @@ class StageBase(TargetBase, ClearBase, GenBase):
 else:
 self.env[varname] = "false"
 
-if "makeopts" in self.settings:
-if isinstance(self.settings["makeopts"], str):
-self.env["MAKEOPTS"] = self.settings["makeopts"]
-else:
-# ensure makeopts is a string
-self.env["MAKEOPTS"] = ' '.join(self.settings["makeopts"])
+makeopts = []
+for flag, setting in {'j': 'jobs', 'l': 'load-average'}.items():
+if setting in self.settings:
+makeopts.append(f'-{flag}{self.settings[setting]}')
+self.env['MAKEOPTS'] = ' '.join(makeopts)
 
 log.debug('setup_environment(); env = %r', self.env)
 

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 14f671fe..b31d5b50 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -12,6 +12,8 @@ valid_config_file_values = frozenset([
 "digests",
 "distdir",
 "envscript",
+"jobs",
+"load-average",
 "options",
 "port_logdir",
 "repo_basedir",

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index 7ac9a2a3..4ea4690f 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -48,9 +48,9 @@ $ python3 -c 'import hashlib; 
print(hashlib.algorithms_available)'
 
 *envscript*::
 Environment script location, which allows users to set options such as
-HTTP proxies, `MAKEOPTS`, `GENTOO_MIRRORS`, or any other environment
-variables needed for building.  The envscript file sets environment
-variables using POSIX shell notation:
+HTTP proxies, `GENTOO_MIRRORS`, or any other environment variables
+needed for building.  The envscript file sets environment variables
+using POSIX shell notation:
 +
 -
 export FOO="bar"
@@ -136,6 +136,18 @@ written to the target's make.conf if it is not the default 
value of
 Other settings
 ~~
 
+*jobs*::
+Number of jobs to execute simultaneously.
+
+*load-average*::
+Load-average
+
+*port_logdir*::
+Location for build logs (example: `/var/tmp/catalyst/tmp`).  This dir
+will be automatically cleaned of all logs over 30 days old. If left
+undefined the logs will remain in the build directory as usual and get
+cleaned every time a stage build is restarted.
+
 *sharedir*::
 Catalyst runtime script location.  `/usr/share/catalyst` should work for
 most default installations.  If you are running catalyst from a Git
@@ -145,12 +157,6 @@ checkout, you should change this to point to your checkout 
directory.
 Location for built seeds, temporary files, and caches (example:
 `/var/tmp/catalyst`).
 
-*port_logdir*::
-Location for build logs (example: `/var/tmp/catalyst/tmp`).  This dir
-will be automatically cleaned of all logs over 30 days old. If left
-undefined the logs will remain in the build directory as usual and get
-cleaned every time a stage build is restarted.
-
 *var_tmpfs_portage*::
 Set the size of a `/var/tmp/portage` tmpfs in gigabytes (example:
 `16`).  If set, this 

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: doc/, examples/, catalyst/base/, etc/, catalyst/

2020-05-19 Thread Matt Turner
commit: b58f01ba231f0617f9bb9c2c71528937ff0dd305
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 00:59:10 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 23:45:26 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=b58f01ba

catalyst: Configure distcc_hosts in the config file

distcc_hosts are independent of the build itself, and therefore should
be configured system-wide in catalyst.conf and not in each spec file.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py   | 1 -
 catalyst/defaults.py | 1 +
 doc/catalyst-config.5.txt| 7 ++-
 doc/catalyst-spec.5.txt  | 6 --
 etc/catalyst.conf| 3 +--
 examples/generic_stage_template.spec | 7 ---
 examples/livecd-stage1_template.spec | 7 ---
 examples/livecd-stage2_template.spec | 7 ---
 examples/stage4_template.spec| 7 ---
 9 files changed, 8 insertions(+), 38 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 655fc9c7..6a482c20 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -50,7 +50,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 "compression_mode",
 "cxxflags",
 "decompression_mode",
-"distcc_hosts",
 "fcflags",
 "fflags",
 "hostuse",

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index b31d5b50..27c3d9fa 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -10,6 +10,7 @@ from DeComp.definitions import DECOMPRESSOR_PROGRAM_OPTIONS, 
LIST_XATTRS_OPTIONS
 
 valid_config_file_values = frozenset([
 "digests",
+"distcc_hosts",
 "distdir",
 "envscript",
 "jobs",

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index 4ea4690f..efa707c7 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -78,7 +78,7 @@ be closed invalid.
 
 distcc::
 Enable distcc support for building. You have to set distcc_hosts in
-your spec file.
+your config file.
 
 icecream::
 Enable icecream compiler cluster support for building.
@@ -136,6 +136,11 @@ written to the target's make.conf if it is not the default 
value of
 Other settings
 ~~
 
+*distcc_hosts*::
+These are the hosts used as distcc slaves when distcc is enabled in
+your `catalyst.conf` (example: `127.0.0.1 192.168.0.1`).  It follows
+the same syntax as `distcc-config --set-hosts`.
+
 *jobs*::
 Number of jobs to execute simultaneously.
 

diff --git a/doc/catalyst-spec.5.txt b/doc/catalyst-spec.5.txt
index cf6b9cd7..682f4621 100644
--- a/doc/catalyst-spec.5.txt
+++ b/doc/catalyst-spec.5.txt
@@ -74,12 +74,6 @@ This specifies where the seed stage for this target comes 
from
 `$storedir/builds`.  The `rel_type` is also used as a path prefix for
 the seed.
 
-*distcc_hosts*::
-These are the hosts used as distcc slaves when distcc is enabled in
-your `catalyst.conf` (example: `127.0.0.1 192.168.0.1`).  It follows
-the same syntax as `distcc-config --set-hosts` and is entirely
-optional.
-
 *portage_confdir*::
 This is an optional directory containing portage configuration files
 (example: `/etc/portage`).  It follows the same syntax as

diff --git a/etc/catalyst.conf b/etc/catalyst.conf
index 2272cb86..61ea1d4a 100644
--- a/etc/catalyst.conf
+++ b/etc/catalyst.conf
@@ -35,8 +35,7 @@ options = [
# Enable FEATURES=ccache
# "ccache",
 
-   # Enable FEATURES=distcc. You have to set distcc_hosts in your spec
-   # file.
+   # Enable FEATURES=distcc. Make sure to set distcc_hosts too.
# "distcc",
 
# Enable FEATURES=icecream

diff --git a/examples/generic_stage_template.spec 
b/examples/generic_stage_template.spec
index 01c37789..8f0375c4 100644
--- a/examples/generic_stage_template.spec
+++ b/examples/generic_stage_template.spec
@@ -82,13 +82,6 @@ compressor_arch":
 #
 decompressor_search_order: lbzip2 bzip2 tar pixz xz gzip squashfs
 
-# These are the hosts used as distcc slaves when distcc is enabled in your
-# catalyst.conf.  It follows the same syntax as distcc-config --set-hosts and
-# is entirely optional.
-# example:
-# distcc_hosts: 127.0.0.1 192.168.0.1
-distcc_hosts:
-
 # This is an optional directory containing portage configuration files.  It
 # follows the same syntax as /etc/portage and should be consistent across all
 # targets to minimize problems.

diff --git a/examples/livecd-stage1_template.spec 
b/examples/livecd-stage1_template.spec
index c7086c91..b921372a 100644
--- a/examples/livecd-stage1_template.spec
+++ b/examples/livecd-stage1_template.spec
@@ -45,13 +45,6 @@ snapshot:
 # default/stage3-x86-2006.1
 source_subpath:
 
-# These are the hosts used as distcc slaves when distcc is enabled in your
-# catalyst.conf.  It follows the same syntax as distcc-config --set-hosts and
-# is entirely optional.
-# example:
-# distcc_hosts: 127.0.0.1 192.168.0.1

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: 5505b112619bc4ef4fff1421b88d130701ecc22c
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 19:14:29 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 23:45:26 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5505b112

catalyst: Drop ConfigParser

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/config.py | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/catalyst/config.py b/catalyst/config.py
index b527ada0..e1963f71 100644
--- a/catalyst/config.py
+++ b/catalyst/config.py
@@ -118,14 +118,3 @@ class SpecParser(ParserBase):
 def __init__(self, filename=""):
 if filename:
 self.parse_file(filename)
-
-
-class ConfigParser(ParserBase):
-
-key_value_separator = '='
-multiple_values = False
-empty_values = True
-
-def __init__(self, filename=""):
-if filename:
-self.parse_file(filename)



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: 2751ef36ebb4d2d81a847e43578292794e16da19
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 00:13:14 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 23:45:26 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=2751ef36

catalyst: Verify config options against valid_config_file_values

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/main.py | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/catalyst/main.py b/catalyst/main.py
index 159fe454..543895c6 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -15,7 +15,8 @@ from DeComp.contents import ContentsMap
 
 from catalyst import log
 import catalyst.config
-from catalyst.defaults import confdefaults, option_messages, 
DEFAULT_CONFIG_FILE
+from catalyst.defaults import (confdefaults, option_messages,
+   DEFAULT_CONFIG_FILE, valid_config_file_values)
 from catalyst.support import CatalystError
 from catalyst.version import get_version
 
@@ -34,7 +35,12 @@ def parse_config(config_files):
 for config_file in config_files:
 log.notice('Loading configuration file: %s', config_file)
 try:
-conf_values.update(toml.load(config_file))
+config = toml.load(config_file)
+for key in config:
+if key not in valid_config_file_values:
+log.critical("Unknown option '%s' in config file %s",
+ key, config_file)
+conf_values.update(config)
 except Exception as e:
 log.critical('Could not find parse configuration file: %s: %s',
  config_file, e)



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: doc/, catalyst/, etc/, catalyst/base/

2020-05-19 Thread Matt Turner
commit: 5b418e8d13da381afd2896fab6c7584f1e10bb51
Author: Matt Turner  gentoo  org>
AuthorDate: Thu May 14 02:37:11 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 23:39:37 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5b418e8d

catalyst: Set jobs/load-average via catalyst.conf

We currently have two mechanisms of setting MAKEOPTS: in spec files and
in catalystrc.

Setting makeopts in spec files doesn't make sense. The spec should
describe the thing that's being built and not contain options that are
specific to the build system.

Setting makeopts via catalystrc is better, but it only applies to the
actual build system invocations, leaving emerge to run jobs serially or
again requiring configuration specific to the build machine to be put
into the spec file. For example:

update_seed_command: ... --jobs 5 --load-average 5

With jobs and load-average specified in catalyst.conf, catalyst has the
information required to configure both emerge and the build systems
emerge executes.

This removes the undocumented makeopts spec file option and replaces it
with jobs and load-average settings in catalyst.conf.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py | 12 +---
 catalyst/defaults.py   |  2 ++
 doc/catalyst-config.5.txt  | 24 +++-
 etc/catalystrc |  3 ---
 4 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 5c82a46d..655fc9c7 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -56,7 +56,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 "hostuse",
 "kerncache_path",
 "ldflags",
-"makeopts",
 "pkgcache_path",
 "portage_confdir",
 "portage_overlay",
@@ -1308,12 +1307,11 @@ class StageBase(TargetBase, ClearBase, GenBase):
 else:
 self.env[varname] = "false"
 
-if "makeopts" in self.settings:
-if isinstance(self.settings["makeopts"], str):
-self.env["MAKEOPTS"] = self.settings["makeopts"]
-else:
-# ensure makeopts is a string
-self.env["MAKEOPTS"] = ' '.join(self.settings["makeopts"])
+makeopts = []
+for flag, setting in {'j': 'jobs', 'l': 'load-average'}.items():
+if setting in self.settings:
+makeopts.append(f'-{flag}{self.settings[setting]}')
+self.env['MAKEOPTS'] = ' '.join(makeopts)
 
 log.debug('setup_environment(); env = %r', self.env)
 

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 14f671fe..b31d5b50 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -12,6 +12,8 @@ valid_config_file_values = frozenset([
 "digests",
 "distdir",
 "envscript",
+"jobs",
+"load-average",
 "options",
 "port_logdir",
 "repo_basedir",

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index 7ac9a2a3..4ea4690f 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -48,9 +48,9 @@ $ python3 -c 'import hashlib; 
print(hashlib.algorithms_available)'
 
 *envscript*::
 Environment script location, which allows users to set options such as
-HTTP proxies, `MAKEOPTS`, `GENTOO_MIRRORS`, or any other environment
-variables needed for building.  The envscript file sets environment
-variables using POSIX shell notation:
+HTTP proxies, `GENTOO_MIRRORS`, or any other environment variables
+needed for building.  The envscript file sets environment variables
+using POSIX shell notation:
 +
 -
 export FOO="bar"
@@ -136,6 +136,18 @@ written to the target's make.conf if it is not the default 
value of
 Other settings
 ~~
 
+*jobs*::
+Number of jobs to execute simultaneously.
+
+*load-average*::
+Load-average
+
+*port_logdir*::
+Location for build logs (example: `/var/tmp/catalyst/tmp`).  This dir
+will be automatically cleaned of all logs over 30 days old. If left
+undefined the logs will remain in the build directory as usual and get
+cleaned every time a stage build is restarted.
+
 *sharedir*::
 Catalyst runtime script location.  `/usr/share/catalyst` should work for
 most default installations.  If you are running catalyst from a Git
@@ -145,12 +157,6 @@ checkout, you should change this to point to your checkout 
directory.
 Location for built seeds, temporary files, and caches (example:
 `/var/tmp/catalyst`).
 
-*port_logdir*::
-Location for build logs (example: `/var/tmp/catalyst/tmp`).  This dir
-will be automatically cleaned of all logs over 30 days old. If left
-undefined the logs will remain in the build directory as usual and get
-cleaned every time a stage build is restarted.
-
 *var_tmpfs_portage*::
 Set the size of a `/var/tmp/portage` tmpfs in gigabytes (example:
 `16`).  If set, this 

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: ffb4ef0ab01be58730e8072008ad6864b0e50b3f
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 00:13:14 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 23:39:37 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ffb4ef0a

catalyst: Verify config options against valid_config_file_values

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/main.py | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/catalyst/main.py b/catalyst/main.py
index 159fe454..94900b00 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -15,7 +15,8 @@ from DeComp.contents import ContentsMap
 
 from catalyst import log
 import catalyst.config
-from catalyst.defaults import confdefaults, option_messages, 
DEFAULT_CONFIG_FILE
+from catalyst.defaults import (confdefaults, option_messages,
+   DEFAULT_CONFIG_FILE, valid_config_file_values)
 from catalyst.support import CatalystError
 from catalyst.version import get_version
 
@@ -44,6 +45,10 @@ def parse_config(config_files):
 if opt in option_messages:
 log.info(option_messages[opt])
 
+for key in conf_values:
+if key not in valid_config_file_values:
+log.critical(f"Unknown option '{key} in config file")
+
 if "envscript" in conf_values:
 log.info('Envscript support enabled.')
 



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: doc/, examples/, catalyst/, etc/, catalyst/base/

2020-05-19 Thread Matt Turner
commit: 6f29b57fef8d1780a7589b805cef6c60c22b9e87
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 00:59:10 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 23:39:37 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=6f29b57f

catalyst: Configure distcc_hosts in the config file

distcc_hosts are independent of the build itself, and therefore should
be configured system-wide in catalyst.conf and not in each spec file.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py   | 1 -
 catalyst/defaults.py | 1 +
 doc/catalyst-config.5.txt| 7 ++-
 doc/catalyst-spec.5.txt  | 6 --
 etc/catalyst.conf| 3 +--
 examples/generic_stage_template.spec | 7 ---
 examples/livecd-stage1_template.spec | 7 ---
 examples/livecd-stage2_template.spec | 7 ---
 examples/stage4_template.spec| 7 ---
 9 files changed, 8 insertions(+), 38 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 655fc9c7..6a482c20 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -50,7 +50,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 "compression_mode",
 "cxxflags",
 "decompression_mode",
-"distcc_hosts",
 "fcflags",
 "fflags",
 "hostuse",

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index b31d5b50..27c3d9fa 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -10,6 +10,7 @@ from DeComp.definitions import DECOMPRESSOR_PROGRAM_OPTIONS, 
LIST_XATTRS_OPTIONS
 
 valid_config_file_values = frozenset([
 "digests",
+"distcc_hosts",
 "distdir",
 "envscript",
 "jobs",

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index 4ea4690f..efa707c7 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -78,7 +78,7 @@ be closed invalid.
 
 distcc::
 Enable distcc support for building. You have to set distcc_hosts in
-your spec file.
+your config file.
 
 icecream::
 Enable icecream compiler cluster support for building.
@@ -136,6 +136,11 @@ written to the target's make.conf if it is not the default 
value of
 Other settings
 ~~
 
+*distcc_hosts*::
+These are the hosts used as distcc slaves when distcc is enabled in
+your `catalyst.conf` (example: `127.0.0.1 192.168.0.1`).  It follows
+the same syntax as `distcc-config --set-hosts`.
+
 *jobs*::
 Number of jobs to execute simultaneously.
 

diff --git a/doc/catalyst-spec.5.txt b/doc/catalyst-spec.5.txt
index cf6b9cd7..682f4621 100644
--- a/doc/catalyst-spec.5.txt
+++ b/doc/catalyst-spec.5.txt
@@ -74,12 +74,6 @@ This specifies where the seed stage for this target comes 
from
 `$storedir/builds`.  The `rel_type` is also used as a path prefix for
 the seed.
 
-*distcc_hosts*::
-These are the hosts used as distcc slaves when distcc is enabled in
-your `catalyst.conf` (example: `127.0.0.1 192.168.0.1`).  It follows
-the same syntax as `distcc-config --set-hosts` and is entirely
-optional.
-
 *portage_confdir*::
 This is an optional directory containing portage configuration files
 (example: `/etc/portage`).  It follows the same syntax as

diff --git a/etc/catalyst.conf b/etc/catalyst.conf
index 2272cb86..61ea1d4a 100644
--- a/etc/catalyst.conf
+++ b/etc/catalyst.conf
@@ -35,8 +35,7 @@ options = [
# Enable FEATURES=ccache
# "ccache",
 
-   # Enable FEATURES=distcc. You have to set distcc_hosts in your spec
-   # file.
+   # Enable FEATURES=distcc. Make sure to set distcc_hosts too.
# "distcc",
 
# Enable FEATURES=icecream

diff --git a/examples/generic_stage_template.spec 
b/examples/generic_stage_template.spec
index 01c37789..8f0375c4 100644
--- a/examples/generic_stage_template.spec
+++ b/examples/generic_stage_template.spec
@@ -82,13 +82,6 @@ compressor_arch":
 #
 decompressor_search_order: lbzip2 bzip2 tar pixz xz gzip squashfs
 
-# These are the hosts used as distcc slaves when distcc is enabled in your
-# catalyst.conf.  It follows the same syntax as distcc-config --set-hosts and
-# is entirely optional.
-# example:
-# distcc_hosts: 127.0.0.1 192.168.0.1
-distcc_hosts:
-
 # This is an optional directory containing portage configuration files.  It
 # follows the same syntax as /etc/portage and should be consistent across all
 # targets to minimize problems.

diff --git a/examples/livecd-stage1_template.spec 
b/examples/livecd-stage1_template.spec
index c7086c91..b921372a 100644
--- a/examples/livecd-stage1_template.spec
+++ b/examples/livecd-stage1_template.spec
@@ -45,13 +45,6 @@ snapshot:
 # default/stage3-x86-2006.1
 source_subpath:
 
-# These are the hosts used as distcc slaves when distcc is enabled in your
-# catalyst.conf.  It follows the same syntax as distcc-config --set-hosts and
-# is entirely optional.
-# example:
-# distcc_hosts: 127.0.0.1 192.168.0.1

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: 637e8f750a889c62d625ca12f60b0e48ab554e40
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 19:14:29 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 23:39:37 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=637e8f75

catalyst: Drop ConfigParser

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/config.py | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/catalyst/config.py b/catalyst/config.py
index b527ada0..e1963f71 100644
--- a/catalyst/config.py
+++ b/catalyst/config.py
@@ -118,14 +118,3 @@ class SpecParser(ParserBase):
 def __init__(self, filename=""):
 if filename:
 self.parse_file(filename)
-
-
-class ConfigParser(ParserBase):
-
-key_value_separator = '='
-multiple_values = False
-empty_values = True
-
-def __init__(self, filename=""):
-if filename:
-self.parse_file(filename)



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, etc/, catalyst/

2020-05-19 Thread Matt Turner
commit: ec3cddef28cf7cf9ca3d6719e743dbc43e8d9626
Author: Matt Turner  gentoo  org>
AuthorDate: Sat May 16 03:18:21 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 23:39:36 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ec3cddef

catalyst: Convert catalyst.conf to TOML

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py |  4 +--
 catalyst/main.py   | 47 +++--
 etc/catalyst.conf  | 88 +++---
 3 files changed, 67 insertions(+), 72 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 537ab752..5c82a46d 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -857,8 +857,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
 if 'var_tmpfs_portage' not in self.settings:
 continue
 
-mount += ['-t', 'tmpfs', '-o', 'size=' +
-  self.settings['var_tmpfs_portage'] + 'G']
+mount += ['-t', 'tmpfs', '-o',
+  f"size={self.settings['var_tmpfs_portage']}G"]
 elif source == 'tmpfs':
 mount += ['-t', 'tmpfs']
 elif source == 'shm':

diff --git a/catalyst/main.py b/catalyst/main.py
index be06ccd7..159fe454 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -5,6 +5,8 @@ import os
 import sys
 import textwrap
 
+import toml
+
 from snakeoil.process import namespaces
 
 from DeComp.definitions import (COMPRESS_DEFINITIONS, DECOMPRESS_DEFINITIONS,
@@ -17,8 +19,7 @@ from catalyst.defaults import confdefaults, option_messages, 
DEFAULT_CONFIG_FILE
 from catalyst.support import CatalystError
 from catalyst.version import get_version
 
-
-conf_values = {}
+conf_values = confdefaults
 
 
 def version():
@@ -30,42 +31,20 @@ def version():
 
 
 def parse_config(config_files):
-# search a couple of different areas for the main config file
-myconf = {}
-
-# try and parse the config file "config_file"
 for config_file in config_files:
 log.notice('Loading configuration file: %s', config_file)
 try:
-config = catalyst.config.ConfigParser(config_file)
-myconf.update(config.get_values())
+conf_values.update(toml.load(config_file))
 except Exception as e:
 log.critical('Could not find parse configuration file: %s: %s',
  config_file, e)
 
-# now, load up the values into conf_values so that we can use them
-for x in list(confdefaults):
-if x in myconf:
-if x == 'options':
-conf_values[x] = set(myconf[x].split())
-elif x in ["decompressor_search_order"]:
-conf_values[x] = myconf[x].split()
-else:
-conf_values[x] = myconf[x]
-else:
-conf_values[x] = confdefaults[x]
-
 # print out any options messages
 for opt in conf_values['options']:
 if opt in option_messages:
 log.info(option_messages[opt])
 
-for key in ["digests", "envscript", "var_tmpfs_portage", "port_logdir",
-"local_overlay", "repos"]:
-if key in myconf:
-conf_values[key] = myconf[key]
-
-if "envscript" in myconf:
+if "envscript" in conf_values:
 log.info('Envscript support enabled.')
 
 # take care of any variable substitutions that may be left
@@ -297,17 +276,17 @@ def _main(parser, opts):
 conf_values['DEBUG'] = opts.debug
 conf_values['VERBOSE'] = opts.debug or opts.verbose
 
-options = set()
+options = []
 if opts.fetchonly:
-options.add('fetch')
+options.append('fetch')
 if opts.purge:
-options.add('purge')
+options.append('purge')
 if opts.purgeonly:
-options.add('purgeonly')
+options.append('purgeonly')
 if opts.purgetmponly:
-options.add('purgetmponly')
+options.append('purgetmponly')
 if opts.clear_autoresume:
-options.add('clear-autoresume')
+options.append('clear-autoresume')
 
 # Make sure we have some work before moving further.
 if not myspecfile and not mycmdline:
@@ -318,7 +297,7 @@ def _main(parser, opts):
 # import configuration file and import our main module using those settings
 parse_config(myconfigs)
 
-conf_values["options"].update(options)
+conf_values["options"].extend(options)
 log.notice('conf_values[options] = %s', conf_values['options'])
 
 # initialize our contents generator
@@ -335,7 +314,7 @@ def _main(parser, opts):
 
 if "digests" in conf_values:
 valid_digests = hashlib.algorithms_available
-digests = set(conf_values['digests'].split())
+digests = set(conf_values['digests'])
 conf_values['digests'] = digests
 
 # First validate all the requested digests are valid keys.

diff --git 

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: b81a3c3634953a3cdb8cf7b1961c2635244573ff
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 00:13:14 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 23:30:23 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=b81a3c36

catalyst: Verify config options against valid_config_file_values

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/main.py | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/catalyst/main.py b/catalyst/main.py
index a20fb0d7..220de372 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -15,7 +15,8 @@ from DeComp.contents import ContentsMap
 
 from catalyst import log
 import catalyst.config
-from catalyst.defaults import confdefaults, option_messages, 
DEFAULT_CONFIG_FILE
+from catalyst.defaults import (confdefaults, option_messages,
+   DEFAULT_CONFIG_FILE, valid_config_file_values)
 from catalyst.support import CatalystError
 from catalyst.version import get_version
 
@@ -44,6 +45,10 @@ def parse_config(config_files):
 if opt in option_messages:
 log.info(option_messages[opt])
 
+for key in conf_values:
+if key not in valid_config_file_values:
+log.critical(f"Unknown option '{key} in config file")
+
 if "envscript" in conf_values:
 log.info('Envscript support enabled.')
 



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: etc/, examples/, doc/, catalyst/, catalyst/base/

2020-05-19 Thread Matt Turner
commit: 7839dbeee144b54aaad3476d9f6bc3fbc96c7009
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 00:59:10 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 23:30:23 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=7839dbee

catalyst: Configure distcc_hosts in the config file

distcc_hosts are independent of the build itself, and therefore should
be configured system-wide in catalyst.conf and not in each spec file.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py   | 1 -
 catalyst/defaults.py | 1 +
 doc/catalyst-config.5.txt| 7 ++-
 doc/catalyst-spec.5.txt  | 6 --
 etc/catalyst.conf| 3 +--
 examples/generic_stage_template.spec | 7 ---
 examples/livecd-stage1_template.spec | 7 ---
 examples/livecd-stage2_template.spec | 7 ---
 examples/stage4_template.spec| 7 ---
 9 files changed, 8 insertions(+), 38 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 2e6b349a..a8c8a4b4 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -50,7 +50,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 "compression_mode",
 "cxxflags",
 "decompression_mode",
-"distcc_hosts",
 "fcflags",
 "fflags",
 "hostuse",

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index b31d5b50..27c3d9fa 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -10,6 +10,7 @@ from DeComp.definitions import DECOMPRESSOR_PROGRAM_OPTIONS, 
LIST_XATTRS_OPTIONS
 
 valid_config_file_values = frozenset([
 "digests",
+"distcc_hosts",
 "distdir",
 "envscript",
 "jobs",

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index 4ea4690f..efa707c7 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -78,7 +78,7 @@ be closed invalid.
 
 distcc::
 Enable distcc support for building. You have to set distcc_hosts in
-your spec file.
+your config file.
 
 icecream::
 Enable icecream compiler cluster support for building.
@@ -136,6 +136,11 @@ written to the target's make.conf if it is not the default 
value of
 Other settings
 ~~
 
+*distcc_hosts*::
+These are the hosts used as distcc slaves when distcc is enabled in
+your `catalyst.conf` (example: `127.0.0.1 192.168.0.1`).  It follows
+the same syntax as `distcc-config --set-hosts`.
+
 *jobs*::
 Number of jobs to execute simultaneously.
 

diff --git a/doc/catalyst-spec.5.txt b/doc/catalyst-spec.5.txt
index cf6b9cd7..682f4621 100644
--- a/doc/catalyst-spec.5.txt
+++ b/doc/catalyst-spec.5.txt
@@ -74,12 +74,6 @@ This specifies where the seed stage for this target comes 
from
 `$storedir/builds`.  The `rel_type` is also used as a path prefix for
 the seed.
 
-*distcc_hosts*::
-These are the hosts used as distcc slaves when distcc is enabled in
-your `catalyst.conf` (example: `127.0.0.1 192.168.0.1`).  It follows
-the same syntax as `distcc-config --set-hosts` and is entirely
-optional.
-
 *portage_confdir*::
 This is an optional directory containing portage configuration files
 (example: `/etc/portage`).  It follows the same syntax as

diff --git a/etc/catalyst.conf b/etc/catalyst.conf
index 2272cb86..61ea1d4a 100644
--- a/etc/catalyst.conf
+++ b/etc/catalyst.conf
@@ -35,8 +35,7 @@ options = [
# Enable FEATURES=ccache
# "ccache",
 
-   # Enable FEATURES=distcc. You have to set distcc_hosts in your spec
-   # file.
+   # Enable FEATURES=distcc. Make sure to set distcc_hosts too.
# "distcc",
 
# Enable FEATURES=icecream

diff --git a/examples/generic_stage_template.spec 
b/examples/generic_stage_template.spec
index 01c37789..8f0375c4 100644
--- a/examples/generic_stage_template.spec
+++ b/examples/generic_stage_template.spec
@@ -82,13 +82,6 @@ compressor_arch":
 #
 decompressor_search_order: lbzip2 bzip2 tar pixz xz gzip squashfs
 
-# These are the hosts used as distcc slaves when distcc is enabled in your
-# catalyst.conf.  It follows the same syntax as distcc-config --set-hosts and
-# is entirely optional.
-# example:
-# distcc_hosts: 127.0.0.1 192.168.0.1
-distcc_hosts:
-
 # This is an optional directory containing portage configuration files.  It
 # follows the same syntax as /etc/portage and should be consistent across all
 # targets to minimize problems.

diff --git a/examples/livecd-stage1_template.spec 
b/examples/livecd-stage1_template.spec
index c7086c91..b921372a 100644
--- a/examples/livecd-stage1_template.spec
+++ b/examples/livecd-stage1_template.spec
@@ -45,13 +45,6 @@ snapshot:
 # default/stage3-x86-2006.1
 source_subpath:
 
-# These are the hosts used as distcc slaves when distcc is enabled in your
-# catalyst.conf.  It follows the same syntax as distcc-config --set-hosts and
-# is entirely optional.
-# example:
-# distcc_hosts: 127.0.0.1 192.168.0.1

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, doc/, catalyst/, etc/

2020-05-19 Thread Matt Turner
commit: d4afe2d2c1090ec462ae749653a570bd28489c10
Author: Matt Turner  gentoo  org>
AuthorDate: Thu May 14 02:37:11 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 23:30:23 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d4afe2d2

catalyst: Set jobs/load-average via catalyst.conf

We currently have two mechanisms of setting MAKEOPTS: in spec files and
in catalystrc.

Setting makeopts in spec files doesn't make sense. The spec should
describe the thing that's being built and not contain options that are
specific to the build system.

Setting makeopts via catalystrc is better, but it only applies to the
actual build system invocations, leaving emerge to run jobs serially or
again requiring configuration specific to the build machine to be put
into the spec file. For example:

update_seed_command: ... --jobs 5 --load-average 5

With jobs and load-average specified in catalyst.conf, catalyst has the
information required to configure both emerge and the build systems
emerge executes.

This removes the undocumented makeopts spec file option and replaces it
with jobs and load-average settings in catalyst.conf.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py | 12 +---
 catalyst/defaults.py   |  2 ++
 doc/catalyst-config.5.txt  | 24 +++-
 etc/catalystrc |  3 ---
 4 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 537ab752..2e6b349a 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -56,7 +56,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 "hostuse",
 "kerncache_path",
 "ldflags",
-"makeopts",
 "pkgcache_path",
 "portage_confdir",
 "portage_overlay",
@@ -1308,12 +1307,11 @@ class StageBase(TargetBase, ClearBase, GenBase):
 else:
 self.env[varname] = "false"
 
-if "makeopts" in self.settings:
-if isinstance(self.settings["makeopts"], str):
-self.env["MAKEOPTS"] = self.settings["makeopts"]
-else:
-# ensure makeopts is a string
-self.env["MAKEOPTS"] = ' '.join(self.settings["makeopts"])
+makeopts = []
+for flag, setting in {'j': 'jobs', 'l': 'load-average'}.items():
+if setting in self.settings:
+makeopts.append(f'-{flag}{self.settings[setting]}')
+self.env['MAKEOPTS'] = ' '.join(makeopts)
 
 log.debug('setup_environment(); env = %r', self.env)
 

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 14f671fe..b31d5b50 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -12,6 +12,8 @@ valid_config_file_values = frozenset([
 "digests",
 "distdir",
 "envscript",
+"jobs",
+"load-average",
 "options",
 "port_logdir",
 "repo_basedir",

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index 7ac9a2a3..4ea4690f 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -48,9 +48,9 @@ $ python3 -c 'import hashlib; 
print(hashlib.algorithms_available)'
 
 *envscript*::
 Environment script location, which allows users to set options such as
-HTTP proxies, `MAKEOPTS`, `GENTOO_MIRRORS`, or any other environment
-variables needed for building.  The envscript file sets environment
-variables using POSIX shell notation:
+HTTP proxies, `GENTOO_MIRRORS`, or any other environment variables
+needed for building.  The envscript file sets environment variables
+using POSIX shell notation:
 +
 -
 export FOO="bar"
@@ -136,6 +136,18 @@ written to the target's make.conf if it is not the default 
value of
 Other settings
 ~~
 
+*jobs*::
+Number of jobs to execute simultaneously.
+
+*load-average*::
+Load-average
+
+*port_logdir*::
+Location for build logs (example: `/var/tmp/catalyst/tmp`).  This dir
+will be automatically cleaned of all logs over 30 days old. If left
+undefined the logs will remain in the build directory as usual and get
+cleaned every time a stage build is restarted.
+
 *sharedir*::
 Catalyst runtime script location.  `/usr/share/catalyst` should work for
 most default installations.  If you are running catalyst from a Git
@@ -145,12 +157,6 @@ checkout, you should change this to point to your checkout 
directory.
 Location for built seeds, temporary files, and caches (example:
 `/var/tmp/catalyst`).
 
-*port_logdir*::
-Location for build logs (example: `/var/tmp/catalyst/tmp`).  This dir
-will be automatically cleaned of all logs over 30 days old. If left
-undefined the logs will remain in the build directory as usual and get
-cleaned every time a stage build is restarted.
-
 *var_tmpfs_portage*::
 Set the size of a `/var/tmp/portage` tmpfs in gigabytes (example:
 `16`).  If set, this 

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: etc/, catalyst/

2020-05-19 Thread Matt Turner
commit: 69ed1d18c01ee1a6ed0d5261fd6b9551449dae56
Author: Matt Turner  gentoo  org>
AuthorDate: Sat May 16 03:18:21 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 23:30:23 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=69ed1d18

catalyst: Convert catalyst.conf to TOML

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/main.py  | 49 +--
 etc/catalyst.conf | 88 ---
 2 files changed, 66 insertions(+), 71 deletions(-)

diff --git a/catalyst/main.py b/catalyst/main.py
index be06ccd7..a20fb0d7 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -5,6 +5,8 @@ import os
 import sys
 import textwrap
 
+import toml
+
 from snakeoil.process import namespaces
 
 from DeComp.definitions import (COMPRESS_DEFINITIONS, DECOMPRESS_DEFINITIONS,
@@ -17,8 +19,7 @@ from catalyst.defaults import confdefaults, option_messages, 
DEFAULT_CONFIG_FILE
 from catalyst.support import CatalystError
 from catalyst.version import get_version
 
-
-conf_values = {}
+conf_values = confdefaults
 
 
 def version():
@@ -30,42 +31,20 @@ def version():
 
 
 def parse_config(config_files):
-# search a couple of different areas for the main config file
-myconf = {}
-
-# try and parse the config file "config_file"
 for config_file in config_files:
 log.notice('Loading configuration file: %s', config_file)
 try:
-config = catalyst.config.ConfigParser(config_file)
-myconf.update(config.get_values())
+conf_values.update(toml.load(config_file))
 except Exception as e:
 log.critical('Could not find parse configuration file: %s: %s',
  config_file, e)
 
-# now, load up the values into conf_values so that we can use them
-for x in list(confdefaults):
-if x in myconf:
-if x == 'options':
-conf_values[x] = set(myconf[x].split())
-elif x in ["decompressor_search_order"]:
-conf_values[x] = myconf[x].split()
-else:
-conf_values[x] = myconf[x]
-else:
-conf_values[x] = confdefaults[x]
-
 # print out any options messages
 for opt in conf_values['options']:
 if opt in option_messages:
 log.info(option_messages[opt])
 
-for key in ["digests", "envscript", "var_tmpfs_portage", "port_logdir",
-"local_overlay", "repos"]:
-if key in myconf:
-conf_values[key] = myconf[key]
-
-if "envscript" in myconf:
+if "envscript" in conf_values:
 log.info('Envscript support enabled.')
 
 # take care of any variable substitutions that may be left
@@ -297,17 +276,17 @@ def _main(parser, opts):
 conf_values['DEBUG'] = opts.debug
 conf_values['VERBOSE'] = opts.debug or opts.verbose
 
-options = set()
+options = []
 if opts.fetchonly:
-options.add('fetch')
+options.append('fetch')
 if opts.purge:
-options.add('purge')
+options.append('purge')
 if opts.purgeonly:
-options.add('purgeonly')
+options.append('purgeonly')
 if opts.purgetmponly:
-options.add('purgetmponly')
+options.append('purgetmponly')
 if opts.clear_autoresume:
-options.add('clear-autoresume')
+options.append('clear-autoresume')
 
 # Make sure we have some work before moving further.
 if not myspecfile and not mycmdline:
@@ -316,9 +295,9 @@ def _main(parser, opts):
 # made it this far so start by outputting our version info
 version()
 # import configuration file and import our main module using those settings
-parse_config(myconfigs)
+conf_values = parse_config(myconfigs)
 
-conf_values["options"].update(options)
+conf_values["options"].extend(options)
 log.notice('conf_values[options] = %s', conf_values['options'])
 
 # initialize our contents generator
@@ -335,7 +314,7 @@ def _main(parser, opts):
 
 if "digests" in conf_values:
 valid_digests = hashlib.algorithms_available
-digests = set(conf_values['digests'].split())
+digests = set(conf_values['digests'])
 conf_values['digests'] = digests
 
 # First validate all the requested digests are valid keys.

diff --git a/etc/catalyst.conf b/etc/catalyst.conf
index d33be15f..2272cb86 100644
--- a/etc/catalyst.conf
+++ b/etc/catalyst.conf
@@ -10,53 +10,69 @@
 #
 # $ python3 -c 'import hashlib; print(hashlib.algorithms_available)'
 #
-digests="blake2b sha512"
+digests = ["blake2b", "sha512"]
 
 # envscript allows users to set options such as http proxies, MAKEOPTS,
 # GENTOO_MIRRORS, or any other environment variables needed for building.
 # The envscript file sets environment variables like so:
 # export FOO="bar"
-envscript="/etc/catalyst/catalystrc"
-
-# options set different build-time options for catalyst. Some 

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: 956f1ff062328d912174e0bbcfb5c2efb20bac14
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 19:14:29 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 23:30:23 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=956f1ff0

catalyst: Drop ConfigParser

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/config.py | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/catalyst/config.py b/catalyst/config.py
index b527ada0..e1963f71 100644
--- a/catalyst/config.py
+++ b/catalyst/config.py
@@ -118,14 +118,3 @@ class SpecParser(ParserBase):
 def __init__(self, filename=""):
 if filename:
 self.parse_file(filename)
-
-
-class ConfigParser(ParserBase):
-
-key_value_separator = '='
-multiple_values = False
-empty_values = True
-
-def __init__(self, filename=""):
-if filename:
-self.parse_file(filename)



[gentoo-commits] repo/proj/guru:dev commit in: dev-vcs/lazygit/

2020-05-19 Thread Sergey Torokhov
commit: bfe9fc62bd0d178b57fdecadd892646ec8122563
Author: Sergey Torokhov  yandex  ru>
AuthorDate: Tue May 19 23:05:19 2020 +
Commit: Sergey Torokhov  yandex  ru>
CommitDate: Tue May 19 23:09:22 2020 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=bfe9fc62

dev-vcs/lazygit: 0.20.4 version bump

Signed-off-by: Sergey Torokhov  yandex.ru>

 dev-vcs/lazygit/Manifest  |  1 +
 dev-vcs/lazygit/lazygit-0.20.4.ebuild | 36 +++
 2 files changed, 37 insertions(+)

diff --git a/dev-vcs/lazygit/Manifest b/dev-vcs/lazygit/Manifest
index 94a8496..7e89623 100644
--- a/dev-vcs/lazygit/Manifest
+++ b/dev-vcs/lazygit/Manifest
@@ -1,2 +1,3 @@
 DIST lazygit-0.19.tar.gz 9193308 BLAKE2B 
c07141661387094651cb6137579dea8ab5231b3e08b0733124cc97f1392251db592e01d60297356c8c5df1f1db554bc8a3be86cd07beed158d33b9eabdb015d4
 SHA512 
6259fdb98ae74ee59f395bd79fcbe3280b679883cbc0c190e64a36464c258597e18a6b70842cb242696536cfea35ea9c83f43b05ad20ead4f5120e436875abad
 DIST lazygit-0.20.3.tar.gz 9195508 BLAKE2B 
e20d6195ace5b36d2f47deaffeb838b547d87868ae7c63a7fc0b6f753648728575060ad90e9bbd3e379b30a6f657eeaf8479669a2f0660cadfae50fa7dd7efdc
 SHA512 
810112ee42c11e9750d68fd3c22047b1bdd79d2fa92ece2cfb959f631c143b1d412756cd4ca8fa81c81a9889d4bc7e37053fd94990ec8f4f0ea7ae9d244a6512
+DIST lazygit-0.20.4.tar.gz 9195728 BLAKE2B 
a662b86bfe142e8d157a1be99718b6c786771088c6417fc5667cf91dd5055f583220efef75d15ee7273b1e73f714b20e9b35cc1a74b47620d42d27f6f050dcb2
 SHA512 
c9924df0bbd4e22d6dbccefdd5428c92999256f31a73ffcc9603aaab66d3ad572292221b192b519929e232157cd5d297f32e0a45f96e308563f97ad936f5ed81

diff --git a/dev-vcs/lazygit/lazygit-0.20.4.ebuild 
b/dev-vcs/lazygit/lazygit-0.20.4.ebuild
new file mode 100644
index 000..df46884
--- /dev/null
+++ b/dev-vcs/lazygit/lazygit-0.20.4.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+EGO_PN="github.com/jesseduffield/lazygit"
+
+inherit golang-build golang-vcs-snapshot
+
+DESCRIPTION="Lazygit, a simple terminal UI for git commands"
+HOMEPAGE="https://github.com/jesseduffield/lazygit;
+SRC_URI="https://github.com/jesseduffield/${PN}/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc"
+
+DEPEND=( sys-libs/glibc )
+RDEPEND=(
+   ${DEPEND}
+   dev-vcs/git
+)
+
+DOCS=( src/${EGO_PN}/{CONTRIBUTING,README}.md )
+
+src_compile() {
+   GOPATH="${S}" go build -v -o bin/lazygit src/${EGO_PN}/main.go || die
+}
+
+src_install() {
+   dobin bin/lazygit
+
+   use doc && dodoc -r "src/${EGO_PN}/docs/."
+   einstalldocs
+}



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: 9e6b6f653090e0708db55f89a965cfa38b16ce5e
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 00:13:14 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 23:04:19 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=9e6b6f65

catalyst: Verify config options against valid_config_file_values

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/main.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/catalyst/main.py b/catalyst/main.py
index 4a55ebe2..853e77d8 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -15,7 +15,8 @@ from DeComp.contents import ContentsMap
 
 from catalyst import log
 import catalyst.config
-from catalyst.defaults import confdefaults, option_messages, 
DEFAULT_CONFIG_FILE
+from catalyst.defaults import (confdefaults, option_messages,
+   DEFAULT_CONFIG_FILE, valid_config_file_values)
 from catalyst.support import CatalystError
 from catalyst.version import get_version
 
@@ -47,8 +48,7 @@ def parse_config(config_files):
 if opt in option_messages:
 log.info(option_messages[opt])
 
-for key in ["digests", "envscript", "var_tmpfs_portage", "port_logdir",
-"local_overlay", "repos"]:
+for key in valid_config_file_values:
 if key in config:
 conf_values[key] = config[key]
 



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/, examples/, doc/, etc/, catalyst/

2020-05-19 Thread Matt Turner
commit: b2709575a3e97f76c4c176f7e552d820626ea232
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 00:59:10 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 23:04:19 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=b2709575

catalyst: Configure distcc_hosts in the config file

distcc_hosts are independent of the build itself, and therefore should
be configured system-wide in catalyst.conf and not in each spec file.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py   | 1 -
 catalyst/defaults.py | 1 +
 doc/catalyst-config.5.txt| 7 ++-
 doc/catalyst-spec.5.txt  | 6 --
 etc/catalyst.conf| 3 +--
 examples/generic_stage_template.spec | 7 ---
 examples/livecd-stage1_template.spec | 7 ---
 examples/livecd-stage2_template.spec | 7 ---
 examples/stage4_template.spec| 7 ---
 9 files changed, 8 insertions(+), 38 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 2e6b349a..a8c8a4b4 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -50,7 +50,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 "compression_mode",
 "cxxflags",
 "decompression_mode",
-"distcc_hosts",
 "fcflags",
 "fflags",
 "hostuse",

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index b31d5b50..27c3d9fa 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -10,6 +10,7 @@ from DeComp.definitions import DECOMPRESSOR_PROGRAM_OPTIONS, 
LIST_XATTRS_OPTIONS
 
 valid_config_file_values = frozenset([
 "digests",
+"distcc_hosts",
 "distdir",
 "envscript",
 "jobs",

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index 4ea4690f..efa707c7 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -78,7 +78,7 @@ be closed invalid.
 
 distcc::
 Enable distcc support for building. You have to set distcc_hosts in
-your spec file.
+your config file.
 
 icecream::
 Enable icecream compiler cluster support for building.
@@ -136,6 +136,11 @@ written to the target's make.conf if it is not the default 
value of
 Other settings
 ~~
 
+*distcc_hosts*::
+These are the hosts used as distcc slaves when distcc is enabled in
+your `catalyst.conf` (example: `127.0.0.1 192.168.0.1`).  It follows
+the same syntax as `distcc-config --set-hosts`.
+
 *jobs*::
 Number of jobs to execute simultaneously.
 

diff --git a/doc/catalyst-spec.5.txt b/doc/catalyst-spec.5.txt
index cf6b9cd7..682f4621 100644
--- a/doc/catalyst-spec.5.txt
+++ b/doc/catalyst-spec.5.txt
@@ -74,12 +74,6 @@ This specifies where the seed stage for this target comes 
from
 `$storedir/builds`.  The `rel_type` is also used as a path prefix for
 the seed.
 
-*distcc_hosts*::
-These are the hosts used as distcc slaves when distcc is enabled in
-your `catalyst.conf` (example: `127.0.0.1 192.168.0.1`).  It follows
-the same syntax as `distcc-config --set-hosts` and is entirely
-optional.
-
 *portage_confdir*::
 This is an optional directory containing portage configuration files
 (example: `/etc/portage`).  It follows the same syntax as

diff --git a/etc/catalyst.conf b/etc/catalyst.conf
index 2272cb86..61ea1d4a 100644
--- a/etc/catalyst.conf
+++ b/etc/catalyst.conf
@@ -35,8 +35,7 @@ options = [
# Enable FEATURES=ccache
# "ccache",
 
-   # Enable FEATURES=distcc. You have to set distcc_hosts in your spec
-   # file.
+   # Enable FEATURES=distcc. Make sure to set distcc_hosts too.
# "distcc",
 
# Enable FEATURES=icecream

diff --git a/examples/generic_stage_template.spec 
b/examples/generic_stage_template.spec
index 01c37789..8f0375c4 100644
--- a/examples/generic_stage_template.spec
+++ b/examples/generic_stage_template.spec
@@ -82,13 +82,6 @@ compressor_arch":
 #
 decompressor_search_order: lbzip2 bzip2 tar pixz xz gzip squashfs
 
-# These are the hosts used as distcc slaves when distcc is enabled in your
-# catalyst.conf.  It follows the same syntax as distcc-config --set-hosts and
-# is entirely optional.
-# example:
-# distcc_hosts: 127.0.0.1 192.168.0.1
-distcc_hosts:
-
 # This is an optional directory containing portage configuration files.  It
 # follows the same syntax as /etc/portage and should be consistent across all
 # targets to minimize problems.

diff --git a/examples/livecd-stage1_template.spec 
b/examples/livecd-stage1_template.spec
index c7086c91..b921372a 100644
--- a/examples/livecd-stage1_template.spec
+++ b/examples/livecd-stage1_template.spec
@@ -45,13 +45,6 @@ snapshot:
 # default/stage3-x86-2006.1
 source_subpath:
 
-# These are the hosts used as distcc slaves when distcc is enabled in your
-# catalyst.conf.  It follows the same syntax as distcc-config --set-hosts and
-# is entirely optional.
-# example:
-# distcc_hosts: 127.0.0.1 192.168.0.1

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/, etc/

2020-05-19 Thread Matt Turner
commit: e8fe54bee45e5c6dc700ed1a9041c3b5ec194374
Author: Matt Turner  gentoo  org>
AuthorDate: Sat May 16 03:18:21 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 23:04:15 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e8fe54be

catalyst: Convert catalyst.conf to TOML

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/main.py  | 29 +-
 etc/catalyst.conf | 88 ---
 2 files changed, 60 insertions(+), 57 deletions(-)

diff --git a/catalyst/main.py b/catalyst/main.py
index be06ccd7..4a55ebe2 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -5,6 +5,8 @@ import os
 import sys
 import textwrap
 
+import toml
+
 from snakeoil.process import namespaces
 
 from DeComp.definitions import (COMPRESS_DEFINITIONS, DECOMPRESS_DEFINITIONS,
@@ -30,42 +32,27 @@ def version():
 
 
 def parse_config(config_files):
-# search a couple of different areas for the main config file
-myconf = {}
+config = confdefaults
 
-# try and parse the config file "config_file"
 for config_file in config_files:
 log.notice('Loading configuration file: %s', config_file)
 try:
-config = catalyst.config.ConfigParser(config_file)
-myconf.update(config.get_values())
+config.update(toml.load(config_file))
 except Exception as e:
 log.critical('Could not find parse configuration file: %s: %s',
  config_file, e)
 
-# now, load up the values into conf_values so that we can use them
-for x in list(confdefaults):
-if x in myconf:
-if x == 'options':
-conf_values[x] = set(myconf[x].split())
-elif x in ["decompressor_search_order"]:
-conf_values[x] = myconf[x].split()
-else:
-conf_values[x] = myconf[x]
-else:
-conf_values[x] = confdefaults[x]
-
 # print out any options messages
-for opt in conf_values['options']:
+for opt in config['options']:
 if opt in option_messages:
 log.info(option_messages[opt])
 
 for key in ["digests", "envscript", "var_tmpfs_portage", "port_logdir",
 "local_overlay", "repos"]:
-if key in myconf:
-conf_values[key] = myconf[key]
+if key in config:
+conf_values[key] = config[key]
 
-if "envscript" in myconf:
+if "envscript" in conf_values:
 log.info('Envscript support enabled.')
 
 # take care of any variable substitutions that may be left

diff --git a/etc/catalyst.conf b/etc/catalyst.conf
index d33be15f..2272cb86 100644
--- a/etc/catalyst.conf
+++ b/etc/catalyst.conf
@@ -10,53 +10,69 @@
 #
 # $ python3 -c 'import hashlib; print(hashlib.algorithms_available)'
 #
-digests="blake2b sha512"
+digests = ["blake2b", "sha512"]
 
 # envscript allows users to set options such as http proxies, MAKEOPTS,
 # GENTOO_MIRRORS, or any other environment variables needed for building.
 # The envscript file sets environment variables like so:
 # export FOO="bar"
-envscript="/etc/catalyst/catalystrc"
-
-# options set different build-time options for catalyst. Some examples are:
-# autoresume = Attempt to resume a failed build, clear the autoresume flags 
with
-#  the -a option to the catalyst cmdline.  -p will clear the autoresume 
flags
-#  as well as your pkgcache and kerncache
-#  ( This option is not fully tested, bug reports welcome )
-# bindist = enables the bindist USE flag, please see package specific 
definition,
-#  however, it is suggested to enable this if redistributing builds.
-#  This optional USE flag is normally cleaned from the make.conf file on
-#  completion of the stage.  For a non-cleaned version,
-#  use sticky-config also (see below)
-# ccache = enables build time ccache support
-# distcc = enable distcc support for building. You have to set distcc_hosts in
-#  your spec file.
-# icecream = enables icecream compiler cluster support for building
-# keepwork = Prevents the removal of the working chroot path and any autoresume
-#  files or points.
-# kerncache = keeps a tbz2 of your built kernel and modules (useful if your
-#  build stops in livecd-stage2)
-# pkgcache = keeps a tbz2 of every built package (useful if your build stops
-#  prematurely)
-# seedcache = use the build output of a previous target if it exists to speed 
up
-#  the copy
-# sticky-config = enables the code that will keep any internal 'catalyst_use' 
flags
-#  added to the USE= for building the stage.  These are usually added for 
legal
-#  or specific needs in building the the early stage.  Mostly it is the
-#  'bindist' USE flag option that is used for legal reasons, please see its
-#  specific definition.  It will also keep any /etc/portage/package.*
-#  files or directories.
-#
-# (These options can be used 

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: etc/, catalyst/, catalyst/base/, doc/

2020-05-19 Thread Matt Turner
commit: 4109de01e511e420d612281b0555b458ca14c098
Author: Matt Turner  gentoo  org>
AuthorDate: Thu May 14 02:37:11 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 23:04:19 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4109de01

catalyst: Set jobs/load-average via catalyst.conf

We currently have two mechanisms of setting MAKEOPTS: in spec files and
in catalystrc.

Setting makeopts in spec files doesn't make sense. The spec should
describe the thing that's being built and not contain options that are
specific to the build system.

Setting makeopts via catalystrc is better, but it only applies to the
actual build system invocations, leaving emerge to run jobs serially or
again requiring configuration specific to the build machine to be put
into the spec file. For example:

update_seed_command: ... --jobs 5 --load-average 5

With jobs and load-average specified in catalyst.conf, catalyst has the
information required to configure both emerge and the build systems
emerge executes.

This removes the undocumented makeopts spec file option and replaces it
with jobs and load-average settings in catalyst.conf.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py | 12 +---
 catalyst/defaults.py   |  2 ++
 doc/catalyst-config.5.txt  | 24 +++-
 etc/catalystrc |  3 ---
 4 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 537ab752..2e6b349a 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -56,7 +56,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 "hostuse",
 "kerncache_path",
 "ldflags",
-"makeopts",
 "pkgcache_path",
 "portage_confdir",
 "portage_overlay",
@@ -1308,12 +1307,11 @@ class StageBase(TargetBase, ClearBase, GenBase):
 else:
 self.env[varname] = "false"
 
-if "makeopts" in self.settings:
-if isinstance(self.settings["makeopts"], str):
-self.env["MAKEOPTS"] = self.settings["makeopts"]
-else:
-# ensure makeopts is a string
-self.env["MAKEOPTS"] = ' '.join(self.settings["makeopts"])
+makeopts = []
+for flag, setting in {'j': 'jobs', 'l': 'load-average'}.items():
+if setting in self.settings:
+makeopts.append(f'-{flag}{self.settings[setting]}')
+self.env['MAKEOPTS'] = ' '.join(makeopts)
 
 log.debug('setup_environment(); env = %r', self.env)
 

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 14f671fe..b31d5b50 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -12,6 +12,8 @@ valid_config_file_values = frozenset([
 "digests",
 "distdir",
 "envscript",
+"jobs",
+"load-average",
 "options",
 "port_logdir",
 "repo_basedir",

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index 7ac9a2a3..4ea4690f 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -48,9 +48,9 @@ $ python3 -c 'import hashlib; 
print(hashlib.algorithms_available)'
 
 *envscript*::
 Environment script location, which allows users to set options such as
-HTTP proxies, `MAKEOPTS`, `GENTOO_MIRRORS`, or any other environment
-variables needed for building.  The envscript file sets environment
-variables using POSIX shell notation:
+HTTP proxies, `GENTOO_MIRRORS`, or any other environment variables
+needed for building.  The envscript file sets environment variables
+using POSIX shell notation:
 +
 -
 export FOO="bar"
@@ -136,6 +136,18 @@ written to the target's make.conf if it is not the default 
value of
 Other settings
 ~~
 
+*jobs*::
+Number of jobs to execute simultaneously.
+
+*load-average*::
+Load-average
+
+*port_logdir*::
+Location for build logs (example: `/var/tmp/catalyst/tmp`).  This dir
+will be automatically cleaned of all logs over 30 days old. If left
+undefined the logs will remain in the build directory as usual and get
+cleaned every time a stage build is restarted.
+
 *sharedir*::
 Catalyst runtime script location.  `/usr/share/catalyst` should work for
 most default installations.  If you are running catalyst from a Git
@@ -145,12 +157,6 @@ checkout, you should change this to point to your checkout 
directory.
 Location for built seeds, temporary files, and caches (example:
 `/var/tmp/catalyst`).
 
-*port_logdir*::
-Location for build logs (example: `/var/tmp/catalyst/tmp`).  This dir
-will be automatically cleaned of all logs over 30 days old. If left
-undefined the logs will remain in the build directory as usual and get
-cleaned every time a stage build is restarted.
-
 *var_tmpfs_portage*::
 Set the size of a `/var/tmp/portage` tmpfs in gigabytes (example:
 `16`).  If set, this 

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: 213af690f2d657ab8c1ebcb9045a6230f7c12cf8
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 19:14:29 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 23:04:19 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=213af690

catalyst: Drop ConfigParser

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/config.py | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/catalyst/config.py b/catalyst/config.py
index b527ada0..e1963f71 100644
--- a/catalyst/config.py
+++ b/catalyst/config.py
@@ -118,14 +118,3 @@ class SpecParser(ParserBase):
 def __init__(self, filename=""):
 if filename:
 self.parse_file(filename)
-
-
-class ConfigParser(ParserBase):
-
-key_value_separator = '='
-multiple_values = False
-empty_values = True
-
-def __init__(self, filename=""):
-if filename:
-self.parse_file(filename)



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/, catalyst/base/, etc/, doc/

2020-05-19 Thread Matt Turner
commit: 709612b50e6c25cbfa0275cdaffa8ec80bd2f146
Author: Matt Turner  gentoo  org>
AuthorDate: Thu May 14 02:37:11 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 22:54:21 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=709612b5

catalyst: Set jobs/load-average via catalyst.conf

We currently have two mechanisms of setting MAKEOPTS: in spec files and
in catalystrc.

Setting makeopts in spec files doesn't make sense. The spec should
describe the thing that's being built and not contain options that are
specific to the build system.

Setting makeopts via catalystrc is better, but it only applies to the
actual build system invocations, leaving emerge to run jobs serially or
again requiring configuration specific to the build machine to be put
into the spec file. For example:

update_seed_command: ... --jobs 5 --load-average 5

With jobs and load-average specified in catalyst.conf, catalyst has the
information required to configure both emerge and the build systems
emerge executes.

This removes the undocumented makeopts spec file option and replaces it
with jobs and load-average settings in catalyst.conf.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py | 12 +---
 catalyst/defaults.py   |  2 ++
 doc/catalyst-config.5.txt  | 24 +++-
 etc/catalystrc |  3 ---
 4 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 537ab752..2e6b349a 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -56,7 +56,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 "hostuse",
 "kerncache_path",
 "ldflags",
-"makeopts",
 "pkgcache_path",
 "portage_confdir",
 "portage_overlay",
@@ -1308,12 +1307,11 @@ class StageBase(TargetBase, ClearBase, GenBase):
 else:
 self.env[varname] = "false"
 
-if "makeopts" in self.settings:
-if isinstance(self.settings["makeopts"], str):
-self.env["MAKEOPTS"] = self.settings["makeopts"]
-else:
-# ensure makeopts is a string
-self.env["MAKEOPTS"] = ' '.join(self.settings["makeopts"])
+makeopts = []
+for flag, setting in {'j': 'jobs', 'l': 'load-average'}.items():
+if setting in self.settings:
+makeopts.append(f'-{flag}{self.settings[setting]}')
+self.env['MAKEOPTS'] = ' '.join(makeopts)
 
 log.debug('setup_environment(); env = %r', self.env)
 

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 14f671fe..b31d5b50 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -12,6 +12,8 @@ valid_config_file_values = frozenset([
 "digests",
 "distdir",
 "envscript",
+"jobs",
+"load-average",
 "options",
 "port_logdir",
 "repo_basedir",

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index 7ac9a2a3..4ea4690f 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -48,9 +48,9 @@ $ python3 -c 'import hashlib; 
print(hashlib.algorithms_available)'
 
 *envscript*::
 Environment script location, which allows users to set options such as
-HTTP proxies, `MAKEOPTS`, `GENTOO_MIRRORS`, or any other environment
-variables needed for building.  The envscript file sets environment
-variables using POSIX shell notation:
+HTTP proxies, `GENTOO_MIRRORS`, or any other environment variables
+needed for building.  The envscript file sets environment variables
+using POSIX shell notation:
 +
 -
 export FOO="bar"
@@ -136,6 +136,18 @@ written to the target's make.conf if it is not the default 
value of
 Other settings
 ~~
 
+*jobs*::
+Number of jobs to execute simultaneously.
+
+*load-average*::
+Load-average
+
+*port_logdir*::
+Location for build logs (example: `/var/tmp/catalyst/tmp`).  This dir
+will be automatically cleaned of all logs over 30 days old. If left
+undefined the logs will remain in the build directory as usual and get
+cleaned every time a stage build is restarted.
+
 *sharedir*::
 Catalyst runtime script location.  `/usr/share/catalyst` should work for
 most default installations.  If you are running catalyst from a Git
@@ -145,12 +157,6 @@ checkout, you should change this to point to your checkout 
directory.
 Location for built seeds, temporary files, and caches (example:
 `/var/tmp/catalyst`).
 
-*port_logdir*::
-Location for build logs (example: `/var/tmp/catalyst/tmp`).  This dir
-will be automatically cleaned of all logs over 30 days old. If left
-undefined the logs will remain in the build directory as usual and get
-cleaned every time a stage build is restarted.
-
 *var_tmpfs_portage*::
 Set the size of a `/var/tmp/portage` tmpfs in gigabytes (example:
 `16`).  If set, this 

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: 3db73f91f7b1d654bbed0463ec8f0a1703b7e2aa
Author: Matt Turner  gentoo  org>
AuthorDate: Mon May 18 23:34:13 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 22:54:21 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=3db73f91

catalyst: Disallow config file options in spec files

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/support.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/catalyst/support.py b/catalyst/support.py
index 0925af47..c4a5c797 100644
--- a/catalyst/support.py
+++ b/catalyst/support.py
@@ -8,7 +8,6 @@ import time
 from subprocess import Popen
 
 from catalyst import log
-from catalyst.defaults import valid_config_file_values
 
 BASH_BINARY = "/bin/bash"
 
@@ -211,7 +210,7 @@ def addl_arg_parse(myspec, addlargs, requiredspec, 
validspec):
 "helper function to help targets parse additional arguments"
 messages = []
 for x in addlargs.keys():
-if x not in validspec and x not in valid_config_file_values and x not 
in requiredspec:
+if x not in validspec and x not in requiredspec:
 messages.append("Argument \""+x+"\" not recognized.")
 else:
 myspec[x] = addlargs[x]



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/, examples/, etc/, catalyst/base/, doc/

2020-05-19 Thread Matt Turner
commit: 1d42325e371d07170f813b430c3c989bc41603d6
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 00:59:10 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 22:54:21 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=1d42325e

catalyst: Configure distcc_hosts in the config file

distcc_hosts are independent of the build itself, and therefore should
be configured system-wide in catalyst.conf and not in each spec file.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py   | 1 -
 catalyst/defaults.py | 1 +
 doc/catalyst-config.5.txt| 7 ++-
 doc/catalyst-spec.5.txt  | 6 --
 etc/catalyst.conf| 3 +--
 examples/generic_stage_template.spec | 7 ---
 examples/livecd-stage1_template.spec | 7 ---
 examples/livecd-stage2_template.spec | 7 ---
 examples/stage4_template.spec| 7 ---
 9 files changed, 8 insertions(+), 38 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 2e6b349a..a8c8a4b4 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -50,7 +50,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 "compression_mode",
 "cxxflags",
 "decompression_mode",
-"distcc_hosts",
 "fcflags",
 "fflags",
 "hostuse",

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index b31d5b50..27c3d9fa 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -10,6 +10,7 @@ from DeComp.definitions import DECOMPRESSOR_PROGRAM_OPTIONS, 
LIST_XATTRS_OPTIONS
 
 valid_config_file_values = frozenset([
 "digests",
+"distcc_hosts",
 "distdir",
 "envscript",
 "jobs",

diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index 4ea4690f..efa707c7 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -78,7 +78,7 @@ be closed invalid.
 
 distcc::
 Enable distcc support for building. You have to set distcc_hosts in
-your spec file.
+your config file.
 
 icecream::
 Enable icecream compiler cluster support for building.
@@ -136,6 +136,11 @@ written to the target's make.conf if it is not the default 
value of
 Other settings
 ~~
 
+*distcc_hosts*::
+These are the hosts used as distcc slaves when distcc is enabled in
+your `catalyst.conf` (example: `127.0.0.1 192.168.0.1`).  It follows
+the same syntax as `distcc-config --set-hosts`.
+
 *jobs*::
 Number of jobs to execute simultaneously.
 

diff --git a/doc/catalyst-spec.5.txt b/doc/catalyst-spec.5.txt
index cf6b9cd7..682f4621 100644
--- a/doc/catalyst-spec.5.txt
+++ b/doc/catalyst-spec.5.txt
@@ -74,12 +74,6 @@ This specifies where the seed stage for this target comes 
from
 `$storedir/builds`.  The `rel_type` is also used as a path prefix for
 the seed.
 
-*distcc_hosts*::
-These are the hosts used as distcc slaves when distcc is enabled in
-your `catalyst.conf` (example: `127.0.0.1 192.168.0.1`).  It follows
-the same syntax as `distcc-config --set-hosts` and is entirely
-optional.
-
 *portage_confdir*::
 This is an optional directory containing portage configuration files
 (example: `/etc/portage`).  It follows the same syntax as

diff --git a/etc/catalyst.conf b/etc/catalyst.conf
index 2272cb86..75a02027 100644
--- a/etc/catalyst.conf
+++ b/etc/catalyst.conf
@@ -35,8 +35,7 @@ options = [
# Enable FEATURES=ccache
# "ccache",
 
-   # Enable FEATURES=distcc. You have to set distcc_hosts in your spec
-   # file.
+# Enable FEATURES=distcc. You have to set distcc_hosts in your config file.
# "distcc",
 
# Enable FEATURES=icecream

diff --git a/examples/generic_stage_template.spec 
b/examples/generic_stage_template.spec
index 01c37789..8f0375c4 100644
--- a/examples/generic_stage_template.spec
+++ b/examples/generic_stage_template.spec
@@ -82,13 +82,6 @@ compressor_arch":
 #
 decompressor_search_order: lbzip2 bzip2 tar pixz xz gzip squashfs
 
-# These are the hosts used as distcc slaves when distcc is enabled in your
-# catalyst.conf.  It follows the same syntax as distcc-config --set-hosts and
-# is entirely optional.
-# example:
-# distcc_hosts: 127.0.0.1 192.168.0.1
-distcc_hosts:
-
 # This is an optional directory containing portage configuration files.  It
 # follows the same syntax as /etc/portage and should be consistent across all
 # targets to minimize problems.

diff --git a/examples/livecd-stage1_template.spec 
b/examples/livecd-stage1_template.spec
index c7086c91..b921372a 100644
--- a/examples/livecd-stage1_template.spec
+++ b/examples/livecd-stage1_template.spec
@@ -45,13 +45,6 @@ snapshot:
 # default/stage3-x86-2006.1
 source_subpath:
 
-# These are the hosts used as distcc slaves when distcc is enabled in your
-# catalyst.conf.  It follows the same syntax as distcc-config --set-hosts and
-# is entirely optional.
-# example:
-# distcc_hosts: 127.0.0.1 

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: etc/, catalyst/base/, catalyst/

2020-05-19 Thread Matt Turner
commit: b387321f6eaf3075914f2d4953f757bc04f159b6
Author: Matt Turner  gentoo  org>
AuthorDate: Sat May 16 21:53:11 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 22:54:21 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=b387321f

catalyst: Remove support for source_matching="loose"

This does not seem like a useful feature to me.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/base/stagebase.py |  3 ---
 catalyst/defaults.py   |  1 -
 catalyst/support.py|  6 +++---
 etc/catalyst.conf  | 12 
 4 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 651bf4e4..537ab752 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -130,8 +130,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 decomp_opt=self.settings["decomp_opt"])
 self.accepted_extensions = self.decompressor.search_order_extensions(
 self.settings["decompressor_search_order"])
-log.notice("Source file specification matching setting is: %s",
-   self.settings["source_matching"])
 log.notice("Accepted source file extensions search order: %s",
self.accepted_extensions)
 # save resources, it is not always needed
@@ -409,7 +407,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 normpath(self.settings["storedir"] + "/builds/" +
  self.settings["source_subpath"]),
 self.accepted_extensions,
-self.settings["source_matching"] in ["strict"]
 )
 log.debug('Source path returned from file_check is: %s',
   self.settings["source_path"])

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 412cb956..14f671fe 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -45,7 +45,6 @@ confdefaults = {
 "repos": "%(storedir)s/repos",
 "sharedir": "/usr/share/catalyst",
 "shdir": "%(sharedir)s/targets",
-"source_matching": "strict",
 "storedir": "/var/tmp/catalyst",
 "target_distdir": "/var/cache/distfiles",
 "target_pkgdir": "/var/cache/binpkgs",

diff --git a/catalyst/support.py b/catalyst/support.py
index c4a5c797..a6a6854a 100644
--- a/catalyst/support.py
+++ b/catalyst/support.py
@@ -59,7 +59,7 @@ def cmd(mycmd, env=None, debug=False, fail_func=None):
 print_traceback=False)
 
 
-def file_check(filepath, extensions=None, strict=True):
+def file_check(filepath, extensions=None):
 '''Check for the files existence and that only one exists
 if others are found with various extensions
 '''
@@ -73,8 +73,8 @@ def file_check(filepath, extensions=None, strict=True):
 ".CONTENTS") and not x.endswith(".CONTENTS.gz") and not 
x.endswith(".DIGESTS")]
 if len(files) == 1:
 return files[0]
-if len(files) > 1 and strict:
-msg = "Ambiguos Filename: %s\nPlease specify the correct extension as 
well" % filepath
+if len(files) > 1:
+msg = "Ambiguous Filename: %s\nPlease specify the correct extension as 
well" % filepath
 raise CatalystError(msg, print_traceback=False)
 target_file = None
 for ext in extensions:

diff --git a/etc/catalyst.conf b/etc/catalyst.conf
index f64fe971..d33be15f 100644
--- a/etc/catalyst.conf
+++ b/etc/catalyst.conf
@@ -50,18 +50,6 @@ envscript="/etc/catalyst/catalystrc"
 # (These options can be used together)
 options="autoresume bindist kerncache pkgcache seedcache"
 
-# source_matching specifies how catalyst will match non-specific file names
-# if the filename is not found as an exact match.
-# ie: a filename without the extension specified.  "/path/to/foo"
-#
-# possible values are:
-#   "strict" meaning if more than one file of that name is present with any
-#file extension, then it will raise an exception.
-#   "loose"  meaning it will search for an existing filename with an added
-#extension from an ordered list of extensions determined from the
-#decompressor_search_order specification in the spec file or 
(default)
-source_matching="strict"
-
 # port_logdir is where all build logs will be kept. This dir will be 
automatically cleaned
 # of all logs over 30 days old. If left undefined the logs will remain in the 
build directory
 # as usual and get cleaned every time a stage build is restarted.



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: efed4b7a1bd5e199920af2919e874cfdbc125e6d
Author: Matt Turner  gentoo  org>
AuthorDate: Mon May 18 22:52:36 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 22:54:21 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=efed4b7a

catalyst: Remove PythonDir setting

Was used to find the arch directory containing, e.g., sparc.py, but all
that code is gone now after the modules were converted to TOML.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/defaults.py | 1 -
 catalyst/main.py | 3 ---
 2 files changed, 4 deletions(-)

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 404f4892..f6bc1e14 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -64,7 +64,6 @@ confdefaults = {
 "options": set(),
 "pkgdir": "/var/cache/binpkgs",
 "port_tmpdir": "/var/tmp/portage",
-"PythonDir": "./catalyst",
 "repo_basedir": "/var/db/repos",
 "repo_name": "gentoo",
 "repos": "%(storedir)s/repos",

diff --git a/catalyst/main.py b/catalyst/main.py
index bad712fa..b01d7a6a 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -55,9 +55,6 @@ def parse_config(config_files):
 else:
 conf_values[x] = confdefaults[x]
 
-# add our python base directory to use for loading target arch's
-conf_values["PythonDir"] = os.path.dirname(os.path.realpath(__file__))
-
 # print out any options messages
 for opt in conf_values['options']:
 if opt in option_messages:



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: ab674651496be8d6a784d8fa0b978da76958d666
Author: Matt Turner  gentoo  org>
AuthorDate: Mon May 18 23:48:22 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 22:54:21 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ab674651

catalyst: Remove spec file options from valid_config_file_values

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/defaults.py | 5 -
 1 file changed, 5 deletions(-)

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index ccabd88d..2f2c907f 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -17,12 +17,7 @@ required_config_file_values = [
 
 valid_config_file_values = required_config_file_values[:]
 valid_config_file_values.extend([
-"compression_mode",
-"compressor_arch",
-"compressor_options",
-"decompressor_search_order",
 "digests",
-"distcc",
 "envscript",
 "options",
 ])



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: 2f37a2c19afb8e89c0139257a9765c969a34115e
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 19:14:29 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 22:54:21 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=2f37a2c1

catalyst: Drop ConfigParser

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/config.py | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/catalyst/config.py b/catalyst/config.py
index b527ada0..e1963f71 100644
--- a/catalyst/config.py
+++ b/catalyst/config.py
@@ -118,14 +118,3 @@ class SpecParser(ParserBase):
 def __init__(self, filename=""):
 if filename:
 self.parse_file(filename)
-
-
-class ConfigParser(ParserBase):
-
-key_value_separator = '='
-multiple_values = False
-empty_values = True
-
-def __init__(self, filename=""):
-if filename:
-self.parse_file(filename)



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: ed05b6e13d0eea2f6be2a631bea870978da150d0
Author: Matt Turner  gentoo  org>
AuthorDate: Mon May 18 23:49:54 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 22:54:21 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ed05b6e1

catalyst: Add a missing options to valid_config_file_values

And remove required_config_file_values since we want to support running
catalyst without a config file.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/defaults.py | 20 +++-
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 2f2c907f..412cb956 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -8,18 +8,20 @@ from DeComp.definitions import COMPRESSOR_PROGRAM_OPTIONS, 
XATTRS_OPTIONS
 from DeComp.definitions import DECOMPRESSOR_PROGRAM_OPTIONS, 
LIST_XATTRS_OPTIONS
 
 
-required_config_file_values = [
-"distdir",
-"portdir",
-"sharedir",
-"storedir",
-]
-
-valid_config_file_values = required_config_file_values[:]
-valid_config_file_values.extend([
+valid_config_file_values = frozenset([
 "digests",
+"distdir",
 "envscript",
 "options",
+"port_logdir",
+"repo_basedir",
+"repo_name",
+"repos",
+"sharedir",
+"storedir",
+"target_distdir",
+"target_pkgdir",
+"var_tmpfs_portage",
 ])
 
 confdefaults = {



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: c1f795bd90abdd5e8852212558f8d4d229f7f3b8
Author: Matt Turner  gentoo  org>
AuthorDate: Tue May 19 00:13:14 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 22:54:21 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=c1f795bd

catalyst: Verify config options against valid_config_file_values

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/main.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/catalyst/main.py b/catalyst/main.py
index a2444eeb..c44afbfe 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -15,7 +15,8 @@ from DeComp.contents import ContentsMap
 
 from catalyst import log
 import catalyst.config
-from catalyst.defaults import confdefaults, option_messages, 
DEFAULT_CONFIG_FILE
+from catalyst.defaults import (confdefaults, option_messages,
+   DEFAULT_CONFIG_FILE valid_config_file_values)
 from catalyst.support import CatalystError
 from catalyst.version import get_version
 
@@ -47,8 +48,7 @@ def parse_config(config_files):
 if opt in option_messages:
 log.info(option_messages[opt])
 
-for key in ["digests", "envscript", "var_tmpfs_portage", "port_logdir",
-"local_overlay", "repos"]:
+for key in valid_config_file_values:
 if key in config:
 conf_values[key] = config[key]
 



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: etc/, catalyst/

2020-05-19 Thread Matt Turner
commit: 1b2dd33da134cb8f6fbaa1b000e15b0b2836ef93
Author: Matt Turner  gentoo  org>
AuthorDate: Sat May 16 03:18:21 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 22:54:21 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=1b2dd33d

catalyst: Convert catalyst.conf to TOML

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/main.py  | 27 +
 etc/catalyst.conf | 88 ---
 2 files changed, 59 insertions(+), 56 deletions(-)

diff --git a/catalyst/main.py b/catalyst/main.py
index be06ccd7..a2444eeb 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -5,6 +5,8 @@ import os
 import sys
 import textwrap
 
+import toml
+
 from snakeoil.process import namespaces
 
 from DeComp.definitions import (COMPRESS_DEFINITIONS, DECOMPRESS_DEFINITIONS,
@@ -30,31 +32,16 @@ def version():
 
 
 def parse_config(config_files):
-# search a couple of different areas for the main config file
-myconf = {}
+config = confdefaults
 
-# try and parse the config file "config_file"
 for config_file in config_files:
 log.notice('Loading configuration file: %s', config_file)
 try:
-config = catalyst.config.ConfigParser(config_file)
-myconf.update(config.get_values())
+config.update(toml.load(config_file))
 except Exception as e:
 log.critical('Could not find parse configuration file: %s: %s',
  config_file, e)
 
-# now, load up the values into conf_values so that we can use them
-for x in list(confdefaults):
-if x in myconf:
-if x == 'options':
-conf_values[x] = set(myconf[x].split())
-elif x in ["decompressor_search_order"]:
-conf_values[x] = myconf[x].split()
-else:
-conf_values[x] = myconf[x]
-else:
-conf_values[x] = confdefaults[x]
-
 # print out any options messages
 for opt in conf_values['options']:
 if opt in option_messages:
@@ -62,10 +49,10 @@ def parse_config(config_files):
 
 for key in ["digests", "envscript", "var_tmpfs_portage", "port_logdir",
 "local_overlay", "repos"]:
-if key in myconf:
-conf_values[key] = myconf[key]
+if key in config:
+conf_values[key] = config[key]
 
-if "envscript" in myconf:
+if "envscript" in config:
 log.info('Envscript support enabled.')
 
 # take care of any variable substitutions that may be left

diff --git a/etc/catalyst.conf b/etc/catalyst.conf
index d33be15f..2272cb86 100644
--- a/etc/catalyst.conf
+++ b/etc/catalyst.conf
@@ -10,53 +10,69 @@
 #
 # $ python3 -c 'import hashlib; print(hashlib.algorithms_available)'
 #
-digests="blake2b sha512"
+digests = ["blake2b", "sha512"]
 
 # envscript allows users to set options such as http proxies, MAKEOPTS,
 # GENTOO_MIRRORS, or any other environment variables needed for building.
 # The envscript file sets environment variables like so:
 # export FOO="bar"
-envscript="/etc/catalyst/catalystrc"
-
-# options set different build-time options for catalyst. Some examples are:
-# autoresume = Attempt to resume a failed build, clear the autoresume flags 
with
-#  the -a option to the catalyst cmdline.  -p will clear the autoresume 
flags
-#  as well as your pkgcache and kerncache
-#  ( This option is not fully tested, bug reports welcome )
-# bindist = enables the bindist USE flag, please see package specific 
definition,
-#  however, it is suggested to enable this if redistributing builds.
-#  This optional USE flag is normally cleaned from the make.conf file on
-#  completion of the stage.  For a non-cleaned version,
-#  use sticky-config also (see below)
-# ccache = enables build time ccache support
-# distcc = enable distcc support for building. You have to set distcc_hosts in
-#  your spec file.
-# icecream = enables icecream compiler cluster support for building
-# keepwork = Prevents the removal of the working chroot path and any autoresume
-#  files or points.
-# kerncache = keeps a tbz2 of your built kernel and modules (useful if your
-#  build stops in livecd-stage2)
-# pkgcache = keeps a tbz2 of every built package (useful if your build stops
-#  prematurely)
-# seedcache = use the build output of a previous target if it exists to speed 
up
-#  the copy
-# sticky-config = enables the code that will keep any internal 'catalyst_use' 
flags
-#  added to the USE= for building the stage.  These are usually added for 
legal
-#  or specific needs in building the the early stage.  Mostly it is the
-#  'bindist' USE flag option that is used for legal reasons, please see its
-#  specific definition.  It will also keep any /etc/portage/package.*
-#  files or directories.
-#
-# (These options can be used together)
-options="autoresume 

[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: 40368d89e416725e50d1809bda7b0942aaca20b6
Author: Matt Turner  gentoo  org>
AuthorDate: Mon May 18 23:43:52 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 22:54:21 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=40368d89

catalyst: Disallow DEBUG and VERBOSE in spec files

Catalyst has --debug/-d and --verbose/-v options for this.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/defaults.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 0da717f1..ccabd88d 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -20,13 +20,11 @@ valid_config_file_values.extend([
 "compression_mode",
 "compressor_arch",
 "compressor_options",
-"DEBUG",
 "decompressor_search_order",
 "digests",
 "distcc",
 "envscript",
 "options",
-"VERBOSE",
 ])
 
 confdefaults = {



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: doc/, catalyst/

2020-05-19 Thread Matt Turner
commit: a0e1feb23ad5895ac6d1d07ffee386cde85e732f
Author: Matt Turner  gentoo  org>
AuthorDate: Mon May 18 22:38:51 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 22:54:21 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=a0e1feb2

catalyst: Drop --cli option

This confusingly named option allowed you to specify and entire spec
file on the command line. It seems that the addition of the --snapshot /
-s option in commit ac746eff5363 (new -s option for creating snapshots)
in 2004 removed all known uses, so let's remove it.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/main.py   |  5 +
 doc/catalyst.1.txt | 10 --
 2 files changed, 1 insertion(+), 14 deletions(-)

diff --git a/catalyst/main.py b/catalyst/main.py
index 4ca1aa5b..bad712fa 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -202,9 +202,6 @@ def get_parser():
help='read specfile')
 group.add_argument('-s', '--snapshot', type=str,
help='Make an ebuild repo snapshot')
-group.add_argument('-C', '--cli',
-   default=[], nargs=argparse.REMAINDER,
-   help='catalyst commandline (MUST BE LAST OPTION)')
 
 return parser
 
@@ -294,8 +291,8 @@ def _main(parser, opts):
 if not myconfigs:
 myconfigs = [DEFAULT_CONFIG_FILE]
 myspecfile = opts.file
-mycmdline = opts.cli[:]
 
+mycmdline = list()
 if opts.snapshot:
 mycmdline.append('target=snapshot')
 mycmdline.append('snapshot_treeish=' + opts.snapshot)

diff --git a/doc/catalyst.1.txt b/doc/catalyst.1.txt
index 46e21e63..90d5a24b 100644
--- a/doc/catalyst.1.txt
+++ b/doc/catalyst.1.txt
@@ -31,11 +31,6 @@ OPTIONS
 This option is to be used to clear any autoresume points that have been saved
 for this target. It is used in conjunction with *-f*, *-C*, or both.
 
-*--cli*|*-C* 'KEY'='VALUE' ...::
-This option is to be used in place of a specfile. All options are passed
-to *catalyst* on the commandline. Please note that this option must
-be the last option passed to *catalyst* for everything to work correctly.
-
 *--config*|*-c* 'FILE'::
 Tell *catalyst* to use a user-defined configuration file. A sample
 configuration file is installed at '/etc/catalyst/catalyst.conf'.
@@ -75,11 +70,6 @@ Print the version information and exit
 
 EXAMPLES
 
-Using the commandline option (*-C*, *--cli*) to build a Portage snapshot:

-# catalyst -C target=snapshot version_stamp=my_date

-
 Using the specfile option (*-f*, *--file*) to build a stage target:
 ---
 # catalyst -f stage1-specfile.spec



[gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/

2020-05-19 Thread Matt Turner
commit: 17622798705f1c8e6d24594c8aa99ccbbcf7e323
Author: Matt Turner  gentoo  org>
AuthorDate: Mon May 18 22:41:54 2020 +
Commit: Matt Turner  gentoo  org>
CommitDate: Tue May 19 22:54:21 2020 +
URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=17622798

catalyst: Switch internal snapshot option parsing to SpecParser

The --snapshot/-s option internally creates a .spec file but uses the
ConfigParser (nominally used for parsing catalyst.conf) rather than
SpecParser (used for parsing .spec files) and as a result has to use
'=' rather than ':' as the key/value delimiter.

Signed-off-by: Matt Turner  gentoo.org>

 catalyst/main.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/catalyst/main.py b/catalyst/main.py
index b01d7a6a..be06ccd7 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -291,8 +291,8 @@ def _main(parser, opts):
 
 mycmdline = list()
 if opts.snapshot:
-mycmdline.append('target=snapshot')
-mycmdline.append('snapshot_treeish=' + opts.snapshot)
+mycmdline.append('target: snapshot')
+mycmdline.append('snapshot_treeish: ' + opts.snapshot)
 
 conf_values['DEBUG'] = opts.debug
 conf_values['VERBOSE'] = opts.debug or opts.verbose
@@ -354,7 +354,7 @@ def _main(parser, opts):
 
 if mycmdline:
 try:
-cmdline = catalyst.config.ConfigParser()
+cmdline = catalyst.config.SpecParser()
 cmdline.parse_lines(mycmdline)
 addlargs.update(cmdline.get_values())
 except CatalystError:



  1   2   3   >