[gentoo-commits] proj/portage:master commit in: cnf/, /

2024-03-08 Thread Zac Medico
commit: 32e4a588cfd9548a28c74476d586a6b66b15bace
Author: Zac Medico  gentoo  org>
AuthorDate: Fri Mar  8 05:04:10 2024 +
Commit: Zac Medico  gentoo  org>
CommitDate: Fri Mar  8 05:04:10 2024 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=32e4a588

meson.build: Install dist-info METADATA

Install dist-info METADATA for pip to resolve dependencies:

# pip freeze | grep portage
portage==3.0.63

Suggested-by: Eli Schwartz  gmail.com>
Bug: https://bugs.gentoo.org/920330
Signed-off-by: Zac Medico  gentoo.org>

 cnf/METADATA |  3 +++
 meson.build  | 14 ++
 2 files changed, 17 insertions(+)

diff --git a/cnf/METADATA b/cnf/METADATA
new file mode 100644
index 00..57060b0856
--- /dev/null
+++ b/cnf/METADATA
@@ -0,0 +1,3 @@
+Metadata-Version: 2.1
+Name: portage
+Version: @VERSION@

diff --git a/meson.build b/meson.build
index e826f6ffad..b06e1f4881 100644
--- a/meson.build
+++ b/meson.build
@@ -97,6 +97,20 @@ if native_extensions
 subdir('src')
 endif
 
+if system_wide
+   METADATA = configure_file(
+   input : 'cnf/METADATA',
+   output : 'METADATA',
+   configuration : conf_data
+   )
+   install_data(
+   [
+   METADATA
+   ],
+   install_dir : py.get_install_dir() / 
'portage-@0@.dist-info'.format(conf_data.get('VERSION'))
+   )
+endif
+
 test(
 'pytest',
 py,



[gentoo-commits] proj/portage:master commit in: cnf/, /

2024-02-08 Thread Sam James
commit: 914d21b02b2b9bc5c8f32284e069685ba62432fd
Author: Matoro Mahri  matoro  tk>
AuthorDate: Sun Oct 29 21:22:44 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Feb  9 07:26:32 2024 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=914d21b0

cnf: add arch-specific configuration example for arc

Signed-off-by: Matoro Mahri  matoro.tk>
Signed-off-by: Sam James  gentoo.org>

 NEWS   |  6 ++
 cnf/make.conf.example.arc.diff | 46 ++
 2 files changed, 52 insertions(+)

diff --git a/NEWS b/NEWS
index 0bb525a629..220a0f4f7e 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,12 @@ Release notes take the form of the following optional 
categories:
 * Bug fixes
 * Cleanups
 
+portage-3.0.62 (UNRELEASED)
+--
+
+Features:
+* cnf: make.conf.example.arc: add for the arc arch.
+
 portage-3.0.61 (2024-01-05)
 --
 

diff --git a/cnf/make.conf.example.arc.diff b/cnf/make.conf.example.arc.diff
new file mode 100644
index 00..4775cb3634
--- /dev/null
+++ b/cnf/make.conf.example.arc.diff
@@ -0,0 +1,46 @@
+--- make.conf.example
 make.conf.example
+@@ -22,6 +22,15 @@
+ # Example:
+ #USE="X gtk gnome -alsa"
+ 
++# Host Setting
++# 
++#
++# 32-bit ARC systems should use this host setting:
++CHOST="arc-snps-linux-gnu"
++
++# 64-bit ARCv3 and above systems may use this host setting:
++#CHOST="arc64-snps-linux-gnu"
++
+ # Host and optimization settings
+ # ==
+ #
+@@ -39,7 +48,17 @@
+ # -frecord-gcc-switches, since otherwise the check could result in false
+ # positive results.
+ #
+-# Please refer to the GCC manual for a list of possible values.
++# -mcpu= compiles code that runs exclusively on a particular CPU.
++#
++# -mtune= compiles code that is optimized for a particular CPU, 
but
++# will run on the CPU specified in -mcpu, or all ARC CPUs if -mcpu= is not
++# specified.
++#
++# -mfpu= specifies the capabilities of the FPU to generate floating-point
++# instructions for.
++#
++# Please refer to the "ARC Options" section of the GCC manual for a list of
++# possible CPU and FPU values.
+ #
+ #CFLAGS="-O2 -pipe"
+ #
+@@ -76,7 +95,7 @@
+ # DO NOT PUT ANYTHING BUT YOUR SPECIFIC ~ARCHITECTURE IN THE LIST.
+ # IF YOU ARE UNSURE OF YOUR ARCH, OR THE IMPLICATIONS, DO NOT MODIFY THIS.
+ #
+-#ACCEPT_KEYWORDS="~arch"
++#ACCEPT_KEYWORDS="~arc"
+ 
+ # ACCEPT_LICENSE is used to mask packages based on licensing restrictions.
+ # It may contain both license and group names, where group names are



[gentoo-commits] proj/portage:master commit in: cnf/, lib/_emerge/, man/, lib/portage/

2024-01-15 Thread Zac Medico
commit: 825db01b91a37dcd9890ee5bf9f462ea524ac5cc
Author: Zac Medico  gentoo  org>
AuthorDate: Tue Jan 16 05:06:36 2024 +
Commit: Zac Medico  gentoo  org>
CommitDate: Tue Jan 16 05:20:37 2024 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=825db01b

Add merge-wait FEATURES setting enabled by default

Add a new merge-wait FEATURES setting, enabled by default,
which prevents packages from being merged while other packages
are building. Previously, this behavior was already implemented
for packages that satisfy direct or indirect dependencies of
the system set. This feature can be disabled only for other
packages which do not satisfy direct or indirect dependencies
of the system set, in order to trade the possibility of random
build failures for greater parallelism.

Currently, it is known that having merge-wait disabled can
cause "random" build failures for builds using setuptools when
setuptools plugins are merged during the build.

Bug: https://bugs.gentoo.org/663324
Signed-off-by: Zac Medico  gentoo.org>

 cnf/make.globals |  4 ++--
 lib/_emerge/Scheduler.py | 14 --
 lib/portage/const.py |  3 ++-
 man/make.conf.5  | 16 +---
 4 files changed, 25 insertions(+), 12 deletions(-)

diff --git a/cnf/make.globals b/cnf/make.globals
index af2642988a..2bb7a65593 100644
--- a/cnf/make.globals
+++ b/cnf/make.globals
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 # System-wide defaults for the Portage system
 
@@ -77,7 +77,7 @@ FETCHCOMMAND_SFTP="bash -c \"x=\\\${2#sftp://} ; 
host=\\\${x%%/*} ; port=\\\${ho
 FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs
   binpkg-multi-instance buildpkg-live
   config-protect-if-modified distlocks ebuild-locks
-  fixlafiles ipc-sandbox merge-sync multilib-strict
+  fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict
   network-sandbox news parallel-fetch pkgdir-index-trusted pid-sandbox
   preserve-libs protect-owned qa-unresolved-soname-deps
   sandbox sfperms strict

diff --git a/lib/_emerge/Scheduler.py b/lib/_emerge/Scheduler.py
index ae01214d32..9950792dc9 100644
--- a/lib/_emerge/Scheduler.py
+++ b/lib/_emerge/Scheduler.py
@@ -1521,14 +1521,16 @@ class Scheduler(PollScheduler):
 self.curval += 1
 merge = PackageMerge(merge=build, scheduler=self._sched_iface)
 self._running_tasks[id(merge)] = merge
-if (
-not build.build_opts.buildpkgonly
-and build.pkg in self._deep_system_deps
+# By default, merge-wait only allows merge when no builds are 
executing.
+# As a special exception, dependencies on system packages are 
frequently
+# unspecified and will therefore force merge-wait.
+is_system_pkg = build.pkg in self._deep_system_deps
+if not build.build_opts.buildpkgonly and (
+"merge-wait" in build.settings.features or is_system_pkg
 ):
-# Since dependencies on system packages are frequently
-# unspecified, merge them only when no builds are executing.
 self._merge_wait_queue.append(merge)
-merge.addStartListener(self._system_merge_started)
+if is_system_pkg:
+merge.addStartListener(self._system_merge_started)
 else:
 self._task_queues.merge.add(merge)
 merge.addExitListener(self._merge_exit)

diff --git a/lib/portage/const.py b/lib/portage/const.py
index bf310bb6e0..1f468a1abf 100644
--- a/lib/portage/const.py
+++ b/lib/portage/const.py
@@ -1,5 +1,5 @@
 # portage: Constants
-# Copyright 1998-2023 Gentoo Authors
+# Copyright 1998-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 import os
@@ -194,6 +194,7 @@ SUPPORTED_FEATURES = frozenset(
 "keepwork",
 "lmirror",
 "merge-sync",
+"merge-wait",
 "metadata-transfer",
 "mirror",
 "mount-sandbox",

diff --git a/man/make.conf.5 b/man/make.conf.5
index f527166da3..20dc9cb52d 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -1,4 +1,4 @@
-.TH "MAKE.CONF" "5" "Mar 2023" "Portage @VERSION@" "Portage"
+.TH "MAKE.CONF" "5" "Jan 2024" "Portage @VERSION@" "Portage"
 .SH "NAME"
 make.conf \- custom settings for Portage
 .SH "SYNOPSIS"
@@ -565,6 +565,15 @@ After a package is merged or unmerged, sync relevant files 
to
 disk in order to avoid data\-loss in the event of a power failure.
 This feature is enabled by default.
 .TP
+.B merge\-wait
+Wait for all builds to complete before merging new packages, which only
+matters when using the \fBemerge\fR(1) \fB\-\-jobs\fR option. This
+feature is always effectively enabled and it cannot be disabled for
+packages 

[gentoo-commits] proj/portage:master commit in: cnf/

2023-12-10 Thread Sam James
commit: db400f7cd0c40bfce5f9eccb34c3945e58ff8952
Author: Andreas K. Hüttel  gentoo  org>
AuthorDate: Tue Sep 26 22:48:14 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Dec 10 22:59:23 2023 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=db400f7c

Switch default binary package format to gpkg

Signed-off-by: Andreas K. Hüttel  gentoo.org>
Signed-off-by: Sam James  gentoo.org>

 cnf/make.globals | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cnf/make.globals b/cnf/make.globals
index 86e9b5b744..af2642988a 100644
--- a/cnf/make.globals
+++ b/cnf/make.globals
@@ -38,9 +38,9 @@ PORTAGE_TMPDIR="/var/tmp"
 # existing installs where bzip2 is used for backward compatibility.
 BINPKG_COMPRESS="zstd"
 
-# The format used for binary packages. The default is use old "xpak" format.
-# Set to "gpkg" to use new gentoo binary package format.
-BINPKG_FORMAT="xpak"
+# The format used for binary packages. The default is to use the new "gpkg" 
format.
+# Set to "xpak" to use the old gentoo binary package format.
+BINPKG_FORMAT="gpkg"
 
 # The binary package default GPG signing command.
 # flock is used to avoid a racing condition of gnupg



[gentoo-commits] proj/portage:master commit in: cnf/

2023-10-13 Thread Sam James
commit: 3bf2144eb34101c0539dc4d3e057c13d0790f8d7
Author: Florian Schmaus  gentoo  org>
AuthorDate: Mon Oct  9 11:01:14 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Oct 13 10:18:00 2023 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=3bf2144e

repos.conf: set value of sync-rsync-verify-max-age for ::gentoo to 3

The value sync-rsync-verify-max-age specifies the default age in
days. The current value of 24 is too high for an repo with daily
changes like ::gentoo, and was set under the assumption that
max-age denotes hours [1].

1: 8d99acdb3f4f ("rsync: Issue an explicit warning if Manifest
timestamp is >24hr old")

Signed-off-by: Florian Schmaus  gentoo.org>
Fixes: 8d99acdb3f4f ("rsync: Issue an explicit warning if Manifest timestamp is 
>24hr old")
Closes: https://github.com/gentoo/portage/pull/1125
Signed-off-by: Sam James  gentoo.org>

 cnf/repos.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cnf/repos.conf b/cnf/repos.conf
index 6cb6e3b3c4..f16fd352ee 100644
--- a/cnf/repos.conf
+++ b/cnf/repos.conf
@@ -8,7 +8,7 @@ sync-uri = rsync://rsync.gentoo.org/gentoo-portage
 auto-sync = yes
 sync-rsync-verify-jobs = 1
 sync-rsync-verify-metamanifest = yes
-sync-rsync-verify-max-age = 24
+sync-rsync-verify-max-age = 3
 sync-openpgp-key-path = /usr/share/openpgp-keys/gentoo-release.asc
 sync-openpgp-keyserver = hkps://keys.gentoo.org
 sync-openpgp-key-refresh-retry-count = 40



[gentoo-commits] proj/portage:master commit in: cnf/, /

2023-09-19 Thread Sam James
commit: 3bc7bfef51d88fd716e882d3931f2873e3493e01
Author: John Helmert III  gentoo  org>
AuthorDate: Sun Jan  1 18:14:57 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Sep 19 07:18:44 2023 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=3bc7bfef

make.globals: default-on FEATURES=pkgdir-index-trusted

Commit fbbe0cfe29020313ae44fb2a6afa87c2951ae028 indicates that the rationale 
for having
this disabled is to tolerate manual additions/removals of binpkgs in the PKGDIR.

I don't think there are many people doing this, so it should be safe to enable
this by default for quicker operations with PKGDIR.

[sam: This is only used for local operations, we don't reindex remote indexes,
so there's no issue with not having indexes be signed (although we do plan
on doing that at some point).]

Bug: https://bugs.gentoo.org/889300
Signed-off-by: John Helmert III  gentoo.org>
Closes: https://github.com/gentoo/portage/pull/970
Signed-off-by: Sam James  gentoo.org>

 NEWS | 5 +
 cnf/make.globals | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index 2e2246a611..2e88b894b8 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,11 @@
 portage-3.0.52 (UNRELEASED)
 --
 
+Breaking changes:
+* FEATURES=pkgdir-index-trusted is now on by default. This improves performance
+  with binpkgs, but does require that users run `emaint binhost --fix` if they
+  manually add or remove binpkgs from their PKGDIR (bug #889300).
+
 Features:
 * bintree: Add new API member (invalid_paths) to allow gentoolkit to later
   clean up invalid binpkgs (bug #900224).

diff --git a/cnf/make.globals b/cnf/make.globals
index bfefcc5235..86e9b5b744 100644
--- a/cnf/make.globals
+++ b/cnf/make.globals
@@ -78,7 +78,7 @@ FEATURES="assume-digests binpkg-docompress binpkg-dostrip 
binpkg-logs
   binpkg-multi-instance buildpkg-live
   config-protect-if-modified distlocks ebuild-locks
   fixlafiles ipc-sandbox merge-sync multilib-strict
-  network-sandbox news parallel-fetch pid-sandbox
+  network-sandbox news parallel-fetch pkgdir-index-trusted pid-sandbox
   preserve-libs protect-owned qa-unresolved-soname-deps
   sandbox sfperms strict
   unknown-features-warn unmerge-logs unmerge-orphans userfetch



[gentoo-commits] proj/portage:master commit in: cnf/

2023-08-03 Thread Sam James
commit: 697e297e45c69ee81199f5c40894ee276370726b
Author: James Le Cuirot  gentoo  org>
AuthorDate: Thu Aug  3 19:46:52 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Aug  3 21:15:08 2023 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=697e297e

Fix risc vs riscv typo in Meson file

Closes: https://github.com/gentoo/portage/pull/1076
Signed-off-by: Sam James  gentoo.org>

 cnf/meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cnf/meson.build b/cnf/meson.build
index d0d4c9ab1..abd151465 100644
--- a/cnf/meson.build
+++ b/cnf/meson.build
@@ -66,8 +66,8 @@ arch = {
 'loongarch64' : 'loong',
 'mips64' : 'mips',
 'parisc' : 'hppa',
-'riscv32' : 'risc',
-'riscv64' : 'risc',
+'riscv32' : 'riscv',
+'riscv64' : 'riscv',
 's390x' : 's390',
 'sh4' : 'sh',
 'sparc64' : 'sparc',



[gentoo-commits] proj/portage:master commit in: cnf/

2023-08-03 Thread Sam James
commit: c96f8a304f4486f4a491cd351a5b4ace0f7b00de
Author: James Le Cuirot  gentoo  org>
AuthorDate: Thu Aug  3 18:15:38 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Aug  3 21:15:08 2023 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=c96f8a30

Fix Meson CPU detection for make.conf

I used the CPU name rather than the family by mistake.

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

 cnf/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cnf/meson.build b/cnf/meson.build
index 00af62085..d0d4c9ab1 100644
--- a/cnf/meson.build
+++ b/cnf/meson.build
@@ -59,7 +59,7 @@ if eprefix != ''
 )
 endif
 
-arch = host_machine.cpu()
+arch = host_machine.cpu_family()
 
 arch = {
 'aarch64' : 'arm64',



[gentoo-commits] proj/portage:master commit in: cnf/, /

2022-12-09 Thread Sam James
commit: 8b9bd1288793d81310fc29e806076ea0b48f276c
Author: WANG Xuerui  gentoo  org>
AuthorDate: Sat Dec  3 09:48:51 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Dec 10 01:47:32 2022 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=8b9bd128

cnf: add arch-specific configuration example for loong

This is partially based on the riscv text.

Bug: https://bugs.gentoo.org/884135
Signed-off-by: WANG Xuerui  gentoo.org>
Closes: https://github.com/gentoo/portage/pull/956
Signed-off-by: Sam James  gentoo.org>

 NEWS |  2 +-
 cnf/make.conf.example.loong.diff | 56 
 2 files changed, 57 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index 8f4983e06..2fd09bbaa 100644
--- a/NEWS
+++ b/NEWS
@@ -2,7 +2,7 @@ portage-3.0.42 (UNRELEASED)
 --
 
 Features:
-* TODO
+* cnf: make.conf.example.loong: add for the loong arch (bug #884135).
 
 Bug fixes:
 * glsa: Abort if a GLSA's arch list doesn't match the expected format (bug 
#882797).

diff --git a/cnf/make.conf.example.loong.diff b/cnf/make.conf.example.loong.diff
new file mode 100644
index 0..7df06b172
--- /dev/null
+++ b/cnf/make.conf.example.loong.diff
@@ -0,0 +1,56 @@
+--- make.conf.example
 make.conf.example
+@@ -22,6 +22,13 @@
+ # Example:
+ #USE="X gtk gnome -alsa"
+ 
++# Host Setting
++# ===
++#
++# All LoongArch64 systems built with the LP64D ABI, which is the default,
++# should use this host setting:
++CHOST="loongarch64-unknown-linux-gnu"
++
+ # Host and optimization settings
+ # ==
+ #
+@@ -39,9 +46,29 @@
+ # -frecord-gcc-switches, since otherwise the check could result in false
+ # positive results.
+ #
+-# Please refer to the GCC manual for a list of possible values.
++# -march= tells the compiler to take full advantage of the ABI and
++# instructions available on a certain LoongArch CPU model (none defined at the
++# present), micro-architecture (e.g. LA464), or generic ISA level (e.g.
++# loongarch64 = as defined in the LoongArch ISA manual v1.00). This will
++# produce code which may not run on other LoongArch CPUs supporting different
++# ISA levels or modules.
++#
++# -mtune= results in code optimised for a specific CPU
++# model, micro-architecture (e.g. LA464) or generic ISA level, without
++# breaking compatibility with other LoongArch CPUs supporting the same ISA.
++#
++# -mabi= specifies the ABI, i.e. the integer and floating-point
++# calling convention to use. Care should be taken while setting both -march
++# and -mabi, as some calling conventions are impossible to implement on some
++# ISAs.
++#
++# Please refer to the section "LoongArch Options" of the GCC manual and/or the
++# 《龙芯架构工具链约定》/ "LoongArch Toolchain Conventions" document for a
++# list of possible values for these options.
+ #
++# Decent examples:
+ #CFLAGS="-O2 -pipe"
++#CFLAGS="-march=la464 -mtune=la464 -O2 -pipe"
+ #
+ # If you set a CFLAGS above, then this line will set your default C++ flags to
+ # the same settings.
+@@ -76,7 +103,7 @@
+ # DO NOT PUT ANYTHING BUT YOUR SPECIFIC ~ARCHITECTURE IN THE LIST.
+ # IF YOU ARE UNSURE OF YOUR ARCH, OR THE IMPLICATIONS, DO NOT MODIFY THIS.
+ #
+-#ACCEPT_KEYWORDS="~arch"
++#ACCEPT_KEYWORDS="~loong"
+ 
+ # ACCEPT_LICENSE is used to mask packages based on licensing restrictions.
+ # It may contain both license and group names, where group names are



[gentoo-commits] proj/portage:master commit in: cnf/sets/

2022-09-30 Thread Sam James
commit: f034ac4a678a6da8d854f82a52d4fe523bf6cb8f
Author: Sam James  gentoo  org>
AuthorDate: Thu Sep 29 02:37:14 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Sep 30 20:35:00 2022 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=f034ac4a

cnf: sets: add @rust-rebuild set

Rust is statically linked like Go and this is useful for us
to mention in GLSAs (and possibly dev-lang/rust{,-bin}'s pkg_postinst).

Bug: https://bugs.gentoo.org/827974
Bug: https://bugs.gentoo.org/865115
Signed-off-by: Sam James  gentoo.org>
Closes: https://github.com/gentoo/portage/pull/915
Signed-off-by: Sam James  gentoo.org>

 cnf/sets/portage.conf | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/cnf/sets/portage.conf b/cnf/sets/portage.conf
index 3738f147d..2e02f91f9 100644
--- a/cnf/sets/portage.conf
+++ b/cnf/sets/portage.conf
@@ -115,3 +115,9 @@ class = portage.sets.dbapi.ChangedDepsSet
 class = portage.sets.dbapi.VariableSet
 variable = BDEPEND
 includes = dev-lang/go
+
+# Installed packages for which vdb *DEPEND includes virtual/rust
+[rust-rebuild]
+class = portage.sets.dbapi.VariableSet
+variable = BDEPEND
+includes = virtual/rust



[gentoo-commits] proj/portage:master commit in: cnf/sets/

2022-09-28 Thread Sam James
commit: 38c479d46dc91be66877d857a3682534eb1b5f12
Author: Sam James  gentoo  org>
AuthorDate: Sat Sep 10 06:22:44 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Sep 28 23:56:08 2022 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=38c479d4

cnf: sets: convert @golang-rebuild into VariableSet

This allows rebuilding *all* Go packages
correctly, rather than purely going off
inherit.

There's a few reasons to do this:
1. Even if (and it's a big if) we suppose that
all Go packages should inherit a Go eclass,
there will be packages in user repositories
which don't do that;

2. Eclasses are, by their nature,
repository-specific. This solution
is a generic approach independent
of the eclass layout in ::gentoo.

Bug: https://bugs.gentoo.org/827974
Bug: https://bugs.gentoo.org/865115
Signed-off-by: Sam James  gentoo.org>
Closes: https://github.com/gentoo/portage/pull/898
Signed-off-by: Sam James  gentoo.org>

 cnf/sets/portage.conf | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cnf/sets/portage.conf b/cnf/sets/portage.conf
index c4ad2efca..3738f147d 100644
--- a/cnf/sets/portage.conf
+++ b/cnf/sets/portage.conf
@@ -110,8 +110,8 @@ class = portage.sets.dbapi.UnavailableBinaries
 [changed-deps]
 class = portage.sets.dbapi.ChangedDepsSet
 
-# Installed packages that inherit from known go related eclasses.
+# Installed packages for which vdb *DEPEND includes dev-lang/go.
 [golang-rebuild]
 class = portage.sets.dbapi.VariableSet
-variable = INHERITED
-includes = golang-base golang-build golang-vcs golang-vcs-snapshot go-module
+variable = BDEPEND
+includes = dev-lang/go



[gentoo-commits] proj/portage:master commit in: cnf/repo.postsync.d/, bin/ebuild-helpers/bsd/, bin/ebuild-helpers/unprivileged/, ...

2022-07-25 Thread Fabian Groffen
commit: b716e3591933300aa3eedff56ab92d54dd17c516
Author: Fabian Groffen  gentoo  org>
AuthorDate: Mon Jul 25 15:18:14 2022 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Mon Jul 25 15:18:14 2022 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=b716e359

*: use /usr/bin/env bash iso /bin/bash

For Prefix systems it's better not to use host-provided bash (if it
exists at all), and this is in line with python usage as well.

Signed-off-by: Fabian Groffen  gentoo.org>

 bin/bashrc-functions.sh   | 2 +-
 bin/deprecated-path   | 2 +-
 bin/eapi.sh   | 2 +-
 bin/eapi7-ver-funcs.sh| 2 +-
 bin/ebuild-helpers/bsd/sed| 2 +-
 bin/ebuild-helpers/die| 2 +-
 bin/ebuild-helpers/dobin  | 2 +-
 bin/ebuild-helpers/doconfd| 2 +-
 bin/ebuild-helpers/dodir  | 2 +-
 bin/ebuild-helpers/dodoc  | 2 +-
 bin/ebuild-helpers/doenvd | 2 +-
 bin/ebuild-helpers/doexe  | 2 +-
 bin/ebuild-helpers/dohard | 2 +-
 bin/ebuild-helpers/doheader   | 2 +-
 bin/ebuild-helpers/dohtml | 2 +-
 bin/ebuild-helpers/doinfo | 2 +-
 bin/ebuild-helpers/doinitd| 2 +-
 bin/ebuild-helpers/doins  | 2 +-
 bin/ebuild-helpers/dolib  | 2 +-
 bin/ebuild-helpers/dolib.a| 2 +-
 bin/ebuild-helpers/dolib.so   | 2 +-
 bin/ebuild-helpers/doman  | 2 +-
 bin/ebuild-helpers/domo   | 2 +-
 bin/ebuild-helpers/dosbin | 2 +-
 bin/ebuild-helpers/dosed  | 2 +-
 bin/ebuild-helpers/dosym  | 2 +-
 bin/ebuild-helpers/elog   | 2 +-
 bin/ebuild-helpers/emake  | 2 +-
 bin/ebuild-helpers/fowners| 2 +-
 bin/ebuild-helpers/fperms | 2 +-
 bin/ebuild-helpers/keepdir| 2 +-
 bin/ebuild-helpers/newins | 2 +-
 bin/ebuild-helpers/nonfatal   | 2 +-
 bin/ebuild-helpers/portageq   | 2 +-
 bin/ebuild-helpers/prepall| 2 +-
 bin/ebuild-helpers/prepalldocs| 2 +-
 bin/ebuild-helpers/prepallinfo| 2 +-
 bin/ebuild-helpers/prepallman | 2 +-
 bin/ebuild-helpers/prepallstrip   | 2 +-
 bin/ebuild-helpers/prepinfo   | 2 +-
 bin/ebuild-helpers/prepman| 2 +-
 bin/ebuild-helpers/prepstrip  | 2 +-
 bin/ebuild-helpers/unprivileged/chown | 2 +-
 bin/ebuild-helpers/xattr/install  | 2 +-
 bin/ebuild-pyhelper   | 2 +-
 bin/ebuild.sh | 2 +-
 bin/ecompress | 2 +-
 bin/ecompress-file| 2 +-
 bin/emerge-webrsync   | 2 +-
 bin/estrip| 2 +-
 bin/etc-update| 2 +-
 bin/helper-functions.sh   | 2 +-
 bin/isolated-functions.sh | 2 +-
 bin/misc-functions.sh | 2 +-
 bin/phase-functions.sh| 2 +-
 bin/phase-helpers.sh  | 2 +-
 bin/save-ebuild-env.sh| 2 +-
 cnf/repo.postsync.d/example   | 2 +-
 make.conf.example-repatch.sh  | 2 +-
 misc/emerge-delta-webrsync| 2 +-
 60 files changed, 60 insertions(+), 60 deletions(-)

diff --git a/bin/bashrc-functions.sh b/bin/bashrc-functions.sh
index cc025467f..a45587b28 100644
--- a/bin/bashrc-functions.sh
+++ b/bin/bashrc-functions.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 

diff --git a/bin/deprecated-path b/bin/deprecated-path
index b8aaadbda..dba39125f 100755
--- a/bin/deprecated-path
+++ b/bin/deprecated-path
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Copyright 2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # Author:

diff --git a/bin/eapi.sh b/bin/eapi.sh
index 689e09b10..d90c3cd2e 100644
--- a/bin/eapi.sh
+++ b/bin/eapi.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Copyright 2012-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 

diff --git a/bin/eapi7-ver-funcs.sh b/bin/eapi7-ver-funcs.sh
index b4e98f4e7..fa61b6cce 100644
--- a/bin/eapi7-ver-funcs.sh
+++ b/bin/eapi7-ver-funcs.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 

diff --git a/bin/ebuild-helpers/bsd/sed b/bin/ebuild-helpers/bsd/sed
index 8bece09cd..2d7b844da 100755
--- a/bin/ebuild-helpers/bsd/sed
+++ b/bin/ebuild-helpers/bsd/sed
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Copyright 2007-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 

diff --git a/bin/ebuild-helpers/die b/bin/ebuild-helpers/die
index 5c6b1d2cb..5348acbd3 100755
--- a/bin/ebuild-helpers/die
+++ 

[gentoo-commits] proj/portage:master commit in: cnf/

2022-04-11 Thread Mike Gilbert
commit: dbb4d075ee4991e2b5efdc55dc2d1da2572d8afd
Author: Mike Gilbert  gentoo  org>
AuthorDate: Mon Apr 11 12:50:12 2022 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Mon Apr 11 12:50:12 2022 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=dbb4d075

dispatch-conf: add a warning about changing the use-rcs setting

If there are existing files in the archive directory, this may cause
conflicts with the files/directories managed using rcs.

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

 cnf/dispatch-conf.conf | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cnf/dispatch-conf.conf b/cnf/dispatch-conf.conf
index d21434963..96574eb8e 100644
--- a/cnf/dispatch-conf.conf
+++ b/cnf/dispatch-conf.conf
@@ -15,6 +15,9 @@ archive-dir=${EPREFIX}/etc/config-archive
 # the ci(1) man page, users can control access to RCS files by setting
 # the permissions of the directory containing the files (see
 # archive-dir above).
+# WARNING: When changing this setting, you should ensure that
+# archive-dir is empty by removing or renaming any existing directory.
+# Otherwise, conflicts may occur (bug 837533).
 # (yes or no)
 use-rcs=no
 



[gentoo-commits] proj/portage:master commit in: cnf/

2022-02-06 Thread Zac Medico
commit: 10534a84f0438cf065925c18b64fe7203a840a73
Author: Robert Booth  ishigoya  com>
AuthorDate: Sun Feb  6 19:17:41 2022 +
Commit: Zac Medico  gentoo  org>
CommitDate: Sun Feb  6 19:19:21 2022 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=10534a84

dispatch-conf.conf: frozen-files is space-separated

Bug: https://bugs.gentoo.org/830618
Signed-off-by: Zac Medico  gentoo.org>

 cnf/dispatch-conf.conf | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cnf/dispatch-conf.conf b/cnf/dispatch-conf.conf
index 7efce8ade..d21434963 100644
--- a/cnf/dispatch-conf.conf
+++ b/cnf/dispatch-conf.conf
@@ -61,5 +61,6 @@ ignore-previously-merged=no
 # Per-session log file of changes made to configuration files
 #log-file=/var/log/dispatch-conf.log
 
-# List of frozen files for which dispatch-conf will automatically zap updates
+# Space-separated list of frozen files for which dispatch-conf will
+# automatically zap updates
 #frozen-files=""



[gentoo-commits] proj/portage:master commit in: cnf/

2021-11-16 Thread Zac Medico
commit: 9032155a5d755dc08555a4caff835869f47f0b17
Author: Marek Szuba  gentoo  org>
AuthorDate: Tue Nov 16 21:11:53 2021 +
Commit: Zac Medico  gentoo  org>
CommitDate: Tue Nov 16 21:14:53 2021 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=9032155a

Add make.conf.example for riscv

Bug: https://bugs.gentoo.org/812434
Signed-off-by: Zac Medico  gentoo.org>

 cnf/make.conf.example.riscv.diff | 61 
 1 file changed, 61 insertions(+)

diff --git a/cnf/make.conf.example.riscv.diff b/cnf/make.conf.example.riscv.diff
new file mode 100644
index 0..df1e6a70d
--- /dev/null
+++ b/cnf/make.conf.example.riscv.diff
@@ -0,0 +1,61 @@
+--- make.conf.example
 make.conf.example
+@@ -22,6 +22,15 @@
+ # Example:
+ #USE="X gtk gnome -alsa"
+ 
++# Host Setting
++# ===
++#
++# All RV64 systems should use this host setting:
++CHOST="riscv64-unknown-linux-gnu"
++
++# whereas all RV32 ones should use:
++#CHOST="riscv32-unknown-linux-gnu"
++
+ # Host and optimization settings
+ # ==
+ #
+@@ -39,9 +48,31 @@
+ # -frecord-gcc-switches, since otherwise the check could result in false
+ # positive results.
+ #
+-# Please refer to the GCC manual for a list of possible values.
++# -mcpu= tells the compiler to take full advantage of the ABI and
++# instructions available on a certain CPU. This will produce code which may
++# not run on other RISC-V CPUs, even if they support the same ISA.
++#
++# -mtune= results in code optimised for a specific CPU
++# (e.g. SiFive U74) or family (e.g. the SiFive 7 series) without breaking
++# compatibility with other RISC-V CPUs supporting the same ISA.
++#
++# -march= specifies the exact ISA for which to generate code.
++# This is normally not needed if you set -mcpu but might be useful for CPUs
++# not explicitly supported by gcc yet. Should that be the case and you aren't
++# sure what ISA string to use, the output of /proc/cpuinfo might give you a 
hint.
++#
++# -mabi= specifies the integer and floating-point calling 
convention
++# to use. Again, this is normally not needed if you set -mcpu. Care should be
++# taken while setting both -march and -mabi, as some calling conventions are
++# impossible to implement on some ISAs.
++#
++# Please refer to the section "RISC-V Options" of the GCC manual for a list
++# of possible ABI, architecture, CPU and feature values.
++#
++# Decent examples:
+ #
+-#CFLAGS="-O2 -pipe"
++#CFLAGS="-mcpu=sifive-u74 -O2 -pipe"
++#CFLAGS="-mtune=sifive-7-series -O2 -pipe"
+ #
+ # If you set a CFLAGS above, then this line will set your default C++ flags to
+ # the same settings.
+@@ -76,7 +107,7 @@
+ # DO NOT PUT ANYTHING BUT YOUR SPECIFIC ~ARCHITECTURE IN THE LIST.
+ # IF YOU ARE UNSURE OF YOUR ARCH, OR THE IMPLICATIONS, DO NOT MODIFY THIS.
+ #
+-#ACCEPT_KEYWORDS="~arch"
++#ACCEPT_KEYWORDS="~riscv"
+ 
+ # ACCEPT_LICENSE is used to mask packages based on licensing restrictions.
+ # It may contain both license and group names, where group names are



[gentoo-commits] proj/portage:master commit in: cnf/, man/, lib/portage/tests/emerge/

2021-02-22 Thread Zac Medico
commit: bba152098af82e5bc2686d9facb3c0a88bcbdba0
Author: Zac Medico  gentoo  org>
AuthorDate: Mon Feb 22 12:37:56 2021 +
Commit: Zac Medico  gentoo  org>
CommitDate: Mon Feb 22 12:55:48 2021 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=bba15209

make.globals: default enable FEATURES=binpkg-multi-instance

Bug: https://bugs.gentoo.org/715112
Signed-off-by: Zac Medico  gentoo.org>

 cnf/make.globals| 1 +
 lib/portage/tests/emerge/test_simple.py | 4 ++--
 man/make.conf.5 | 1 +
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/cnf/make.globals b/cnf/make.globals
index dd3f28f70..b8bc90ae0 100644
--- a/cnf/make.globals
+++ b/cnf/make.globals
@@ -54,6 +54,7 @@ FETCHCOMMAND_SFTP="bash -c \"x=\\\${2#sftp://} ; 
host=\\\${x%%/*} ; port=\\\${ho
 
 # Default user options
 FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs
+  binpkg-multi-instance
   config-protect-if-modified distlocks ebuild-locks
   fixlafiles ipc-sandbox merge-sync multilib-strict
   network-sandbox news parallel-fetch pid-sandbox

diff --git a/lib/portage/tests/emerge/test_simple.py 
b/lib/portage/tests/emerge/test_simple.py
index d26146aa9..6e282337f 100644
--- a/lib/portage/tests/emerge/test_simple.py
+++ b/lib/portage/tests/emerge/test_simple.py
@@ -322,11 +322,11 @@ call_has_and_best_version() {
rm_cmd + ("-rf", cachedir),
emerge_cmd + ("--oneshot", "virtual/foo"),
lambda: self.assertFalse(os.path.exists(
-   os.path.join(pkgdir, "virtual", "foo-0.tbz2"))),
+   os.path.join(pkgdir, "virtual", "foo", 
"foo-0-1.xpak"))),
({"FEATURES" : "unmerge-backup"},) + \
emerge_cmd + ("--unmerge", "virtual/foo"),
lambda: self.assertTrue(os.path.exists(
-   os.path.join(pkgdir, "virtual", "foo-0.tbz2"))),
+   os.path.join(pkgdir, "virtual", "foo", 
"foo-0-1.xpak"))),
emerge_cmd + ("--pretend", "dev-libs/A"),
ebuild_cmd + (test_ebuild, "manifest", "clean", 
"package", "merge"),
emerge_cmd + ("--pretend", "--tree", 
"--complete-graph", "dev-libs/A"),

diff --git a/man/make.conf.5 b/man/make.conf.5
index 76e0ac155..e78751c16 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -316,6 +316,7 @@ BUILD_TIME metadata to select the latest builds.
 The \fBeclean\-pkg\fR command can be used to prune old builds from PKGDIR.
 It is also possible to remove packages manually, and then run
 \(aqemaint \-\-fix binhost' to update the ${PKGDIR}/Packages index.
+This feature is enabled by default.
 .TP
 .B buildpkg
 Binary packages will be created for all packages that are merged. Also see



[gentoo-commits] proj/portage:master commit in: cnf/sets/

2020-11-01 Thread Zac Medico
commit: 075c1951e1ac84e99a2219ff14be4a366d274f36
Author: Georgy Yakovlev  gentoo  org>
AuthorDate: Fri Oct 16 19:43:54 2020 +
Commit: Zac Medico  gentoo  org>
CommitDate: Sun Nov  1 21:11:09 2020 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=075c1951

cnf/sets/portage.conf: add new sets for go rebuilding go packages

go-built binaries may contain security
vulnerabilities if a binary built with vulnerable compiler.
go is known to embed vulnerable code to all binaries it builds, if
vulnerability was present in the compiler or one of standard libraries.

This commit adds `golang-rebuild` set, which allows easy
rebuild of most go-compiled system packages.

simple 'emerge @golang-rebuild' should rebuild everything affected.
a prompt to run this command can be added to postinst message in
dev-lang/go ebuild.

Closes: https://github.com/gentoo/portage/pull/630
Bug: https://bugs.gentoo.org/752153
Signed-off-by: Georgy Yakovlev  gentoo.org>
Signed-off-by: Zac Medico  gentoo.org>

 cnf/sets/portage.conf | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/cnf/sets/portage.conf b/cnf/sets/portage.conf
index 0d11d7891..22f0fa3a5 100644
--- a/cnf/sets/portage.conf
+++ b/cnf/sets/portage.conf
@@ -103,3 +103,9 @@ class = portage.sets.dbapi.UnavailableBinaries
 # to the matching portdb entry.
 [changed-deps]
 class = portage.sets.dbapi.ChangedDepsSet
+
+# Installed packages that inherit from known go related eclasses.
+[golang-rebuild]
+class = portage.sets.dbapi.VariableSet
+variable = INHERITED
+includes = golang-base golang-build golang-vcs golang-vcs-snapshot go-module



[gentoo-commits] proj/portage:master commit in: cnf/repo.postsync.d/

2020-10-14 Thread Zac Medico
commit: 21e996f9d25ef578b4f4fc4f96c336383136c66f
Author: Zac Medico  gentoo  org>
AuthorDate: Wed Oct 14 22:52:28 2020 +
Commit: Zac Medico  gentoo  org>
CommitDate: Wed Oct 14 22:59:37 2020 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=21e996f9

cnf/repo.postsync.d/example: Detect metadata/pkg_desc_index in repo

Detect when the repo includes a metadata/pkg_desc_index file and in
that case skip the call to egencache --update-pkg-desc-index.

Signed-off-by: Zac Medico  gentoo.org>

 cnf/repo.postsync.d/example | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cnf/repo.postsync.d/example b/cnf/repo.postsync.d/example
index f7c6f5092..72d91a60e 100644
--- a/cnf/repo.postsync.d/example
+++ b/cnf/repo.postsync.d/example
@@ -45,7 +45,8 @@ if [ -n "${repository_name}" ]; then
ret=1
fi
fi
-
+fi
+if [ -n "${repository_name}" ] && ! [ -e 
"${repository_path}/metadata/pkg_desc_index" ]; then
# Regenerate the metadata/pkg_desc_index file. This is not
# needed for https://gitweb.gentoo.org/repo/sync/gentoo.git which
# provides a freshly generated copy. The --external-cache-only



[gentoo-commits] proj/portage:master commit in: cnf/repo.postsync.d/, bin/, man/

2020-09-14 Thread Zac Medico
commit: c783c57205107bfa75441b90a35f414163baad42
Author: Zac Medico  gentoo  org>
AuthorDate: Sat Sep 12 23:09:56 2020 +
Commit: Zac Medico  gentoo  org>
CommitDate: Mon Sep 14 06:23:58 2020 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=c783c572

egencache: add --external-cache-only option (bug 737470)

The --external-cache-only option is useful for client-side
use cases where writing cache files inside the repository itself
may interfere with repository verification. This option is
currently supported for --update and --update-pkg-desc-index
actions, for which consumers of the corresponding cache or
index files are already capable of consuming files from the
external cache directory (/var/cache/edb/dep).

Bug: https://bugs.gentoo.org/737470
Signed-off-by: Zac Medico  gentoo.org>

 bin/egencache   | 44 ++--
 cnf/repo.postsync.d/example | 19 +--
 man/egencache.1 |  9 -
 3 files changed, 43 insertions(+), 29 deletions(-)

diff --git a/bin/egencache b/bin/egencache
index 532e37f20..4ee63edad 100755
--- a/bin/egencache
+++ b/bin/egencache
@@ -107,6 +107,9 @@ def parse_args(args):
common.add_argument("--config-root",
help="location of portage config files",
dest="portage_configroot")
+   common.add_argument("--external-cache-only",
+   action="store_true",
+   help="Output only to the external cache (not the repository 
itself)")
common.add_argument("--gpg-dir",
help="override the PORTAGE_GPG_DIR variable",
dest="gpg_dir")
@@ -246,7 +249,7 @@ def parse_args(args):
 
 class GenCache:
def __init__(self, portdb, cp_iter=None, max_jobs=None, max_load=None,
-   rsync=False):
+   rsync=False, external_cache_only=False):
# The caller must set portdb.porttrees in order to constrain
# findname, cp_list, and cpv_list to the desired tree.
tree = portdb.porttrees[0]
@@ -263,18 +266,21 @@ class GenCache:
else:
self._cp_set = None
self._cp_missing = set()
-   write_auxdb = "metadata-transfer" in portdb.settings.features
+   write_auxdb = external_cache_only or "metadata-transfer" in 
portdb.settings.features
self._regen = MetadataRegen(portdb, cp_iter=cp_iter,
consumer=self._metadata_callback,
max_jobs=max_jobs, max_load=max_load,
write_auxdb=write_auxdb, main=True)
self.returncode = os.EX_OK
conf = portdb.repositories.get_repo_for_location(tree)
-   self._trg_caches = tuple(conf.iter_pregenerated_caches(
-   self._auxdbkeys, force=True, readonly=False))
-   if not self._trg_caches:
-   raise Exception("cache formats '%s' aren't supported" %
-   (" ".join(conf.cache_formats),))
+   if external_cache_only:
+   self._trg_caches = ()
+   else:
+   self._trg_caches = tuple(conf.iter_pregenerated_caches(
+   self._auxdbkeys, force=True, readonly=False))
+   if not self._trg_caches:
+   raise Exception("cache formats '%s' aren't 
supported" %
+   (" ".join(conf.cache_formats),))
 
if rsync:
for trg_cache in self._trg_caches:
@@ -1092,7 +1098,8 @@ def egencache_main(args):
gen_cache = GenCache(portdb, cp_iter=cp_iter,
max_jobs=options.jobs,
max_load=options.load_average,
-   rsync=options.rsync)
+   rsync=options.rsync,
+   external_cache_only=options.external_cache_only)
gen_cache.run()
if options.tolerant:
ret.append(os.EX_OK)
@@ -1100,20 +1107,21 @@ def egencache_main(args):
ret.append(gen_cache.returncode)
 
if options.update_pkg_desc_index:
-   if repo_config.writable:
+   if not options.external_cache_only and repo_config.writable:
writable_location = repo_config.location
else:
writable_location = os.path.join(portdb.depcachedir,
repo_config.location.lstrip(os.sep))
-   msg = [
-   "WARNING: Repository is not writable: %s" % (
-   repo_config.location,),
-   " Using cache directory instead: %s" % (
-   writable_location,)
-  

[gentoo-commits] proj/portage:master commit in: cnf/repo.postsync.d/, man/, bin/

2020-09-07 Thread Zac Medico
commit: 00bb1df12827cfce898e6fce8514d59a4cc844b1
Author: Zac Medico  gentoo  org>
AuthorDate: Tue Sep  1 06:44:57 2020 +
Commit: Zac Medico  gentoo  org>
CommitDate: Tue Sep  8 00:35:38 2020 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=00bb1df1

egencache --update-pkg-desc-index: emulate esync --verbose output (bug 737470)

When the --verbose flag is given, make --update-pkg-desc-index emulate
esync --verbose output. Example:

 * Searching for changes

 [ N] acct-group/ultimaker (0):  Group for ultimaker
 [ N] acct-user/ultimaker (0):  User for ultimaker
 [ U] www-client/opera (70.0.3728.144):  A fast and secure web browser
 [MU] www-client/opera-developer (72.0.3798.0):  A fast and secure web browser
 [ U] x11-libs/gtksourceview (4.6.1-r1):  A text widget implementing syntax 
highlighting and other features

Bug: https://bugs.gentoo.org/737470
Signed-off-by: Zac Medico  gentoo.org>

 bin/egencache   | 76 +
 cnf/repo.postsync.d/example |  2 +-
 man/egencache.1 |  3 ++
 3 files changed, 74 insertions(+), 7 deletions(-)

diff --git a/bin/egencache b/bin/egencache
index 264c600fe..532e37f20 100755
--- a/bin/egencache
+++ b/bin/egencache
@@ -35,6 +35,7 @@ else:
 
 signal.signal(debug_signum, debug_signal)
 
+import functools
 import io
 import logging
 import subprocess
@@ -50,8 +51,10 @@ portage._internal_caller = True
 from portage import os, _encodings, _unicode_encode, _unicode_decode
 from _emerge.MetadataRegen import MetadataRegen
 from portage.cache.cache_errors import CacheError, StatCollision
-from portage.cache.index.pkg_desc_index import pkg_desc_index_line_format
+from portage.cache.index.pkg_desc_index import pkg_desc_index_line_format, 
pkg_desc_index_line_read
 from portage.const import TIMESTAMP_FORMAT
+from portage.dep import _repo_separator
+from portage.output import colorize, EOutput
 from portage.package.ebuild._parallel_manifest.ManifestScheduler import 
ManifestScheduler
 from portage.util import cmp_sort_key, writemsg_level
 from portage.util._async.AsyncFunction import AsyncFunction
@@ -131,6 +134,9 @@ def parse_args(args):
common.add_argument("--ignore-default-opts",
action="store_true",
help="do not use the EGENCACHE_DEFAULT_OPTS environment 
variable")
+   common.add_argument("-v", "--verbose",
+   action="count", default=0,
+   help="increase verbosity")
common.add_argument("--write-timestamp",
action="store_true",
help="write metadata/timestamp.chk as required for rsync 
repositories")
@@ -448,13 +454,27 @@ class GenCache:
trg_cache._prune_empty_dirs()
 
 class GenPkgDescIndex:
-   def __init__(self, portdb, output_file):
+   def __init__(self, repo_config, portdb, output_file, verbose=False):
self.returncode = os.EX_OK
+   self._repo_config = repo_config
self._portdb = portdb
self._output_file = output_file
+   self._verbose = verbose
 
def run(self):
 
+   display_updates = self._verbose > 0
+   old = {}
+   new = {}
+   if display_updates:
+   try:
+   with open(self._output_file, 'rt', 
encoding=_encodings["repo.content"]) as f:
+   for line in f:
+   pkg_desc = 
pkg_desc_index_line_read(line)
+   old[pkg_desc.cp] = pkg_desc
+   except FileNotFoundError:
+   pass
+
portage.util.ensure_dirs(os.path.dirname(self._output_file))
f = portage.util.atomic_ofstream(self._output_file,
encoding=_encodings["repo.content"])
@@ -466,10 +486,52 @@ class GenPkgDescIndex:
continue
desc, = portdb.aux_get(pkgs[-1], ["DESCRIPTION"])
 
-   f.write(pkg_desc_index_line_format(cp, pkgs, desc))
+   line = pkg_desc_index_line_format(cp, pkgs, desc)
+   f.write(line)
+   if display_updates:
+   new[cp] = pkg_desc_index_line_read(line)
 
f.close()
 
+   if display_updates:
+   out = EOutput()
+   out.einfo("Searching for changes")
+   print("")
+   items = sorted(new.values(), key=lambda pkg_desc: 
pkg_desc.cp)
+   haspkgs = False
+   for pkg_desc in items:
+   masked = False
+   version = 
self._portdb.xmatch("bestmatch-visible",
+   

[gentoo-commits] proj/portage:master commit in: cnf/repo.postsync.d/

2020-08-08 Thread Zac Medico
commit: f5ffdbf201e784e1cf559ffe33d0da1c6935b687
Author: Zac Medico  gentoo  org>
AuthorDate: Sun Aug  2 23:33:05 2020 +
Commit: Zac Medico  gentoo  org>
CommitDate: Sun Aug  9 04:43:52 2020 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=f5ffdbf2

cnf/repo.postsync.d/example: add egencache --update-pkg-desc-index (bug 735626)

Add an egencache --update-pkg-desc-index example for users
of app-portage/esearch to migrate to.

Bug: https://bugs.gentoo.org/735626
Reviewed-by: Brian Dolbec  gentoo.org>
Signed-off-by: Zac Medico  gentoo.org>

 cnf/repo.postsync.d/example | 15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/cnf/repo.postsync.d/example b/cnf/repo.postsync.d/example
index 533bf719c..708c7c4b9 100644
--- a/cnf/repo.postsync.d/example
+++ b/cnf/repo.postsync.d/example
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # Example /etc/portage/repo.postsync.d script. Make it executable (chmod +x) 
for
 # Portage to process it.
 #
@@ -45,6 +45,19 @@ if [ -n "${repository_name}" ]; then
ret=1
fi
fi
+
+   # Regenerate the metadata/pkg_desc_index file if needed. It's not
+   # needed for https://gitweb.gentoo.org/repo/sync/gentoo.git which
+   # provides a freshly generated copy.
+   if [[ ! -e ${repository_path}/metadata/pkg_desc_index || (
+   -d ${repository_path}/metadata/md5-cache &&
+   -n $(find "${repository_path}/metadata/md5-cache" -type f 
-newer "${repository_path}/metadata/pkg_desc_index" -print -quit) ) ]]; then
+   if ! egencache --update-pkg-desc-index 
--repo="${repository_name}"
+   then
+   echo "!!! egencache failed!"
+   ret=1
+   fi
+   fi
 fi
 
 # Return explicit status.



[gentoo-commits] proj/portage:master commit in: cnf/

2020-05-03 Thread Zac Medico
commit: 73acbb1a7f235f3eeda6a289684e4f43ffdd7dd6
Author: Zac Medico  gentoo  org>
AuthorDate: Sun Apr 26 21:53:49 2020 +
Commit: Zac Medico  gentoo  org>
CommitDate: Sun May  3 20:27:15 2020 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=73acbb1a

make.globals: add default BINPKG_COMPRESS setting (bug 715108)

The ebuild will have a default enabled USE=zstd which changes the
default to zstd here.

Bug: https://bugs.gentoo.org/715108
Bug: https://bugs.gentoo.org/719456
Reviewed-by: Brian Dolbec  gentoo.org>
Signed-off-by: Zac Medico  gentoo.org>

 cnf/make.globals | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/cnf/make.globals b/cnf/make.globals
index 139e1ce97..4a59dbe3c 100644
--- a/cnf/make.globals
+++ b/cnf/make.globals
@@ -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
 # System-wide defaults for the Portage system
 
@@ -34,6 +34,9 @@ RPMDIR="/var/cache/rpm"
 # Temporary build directory
 PORTAGE_TMPDIR="/var/tmp"
 
+# The compression used for binary packages. Defaults to zstd when USE=zstd is 
enabled.
+BINPKG_COMPRESS="bzip2"
+
 # Fetching command (3 tries, passive ftp for firewall compatibility)
 FETCHCOMMAND="wget -t 3 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" 
\"\${URI}\""
 RESUMECOMMAND="wget -c -t 3 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" 
\"\${URI}\""



[gentoo-commits] proj/portage:master commit in: cnf/, lib/portage/, man/, lib/_emerge/

2020-02-08 Thread Zac Medico
commit: 9d28f5168c11fa689a1f3061fc9a8c8220ff8374
Author: Zac Medico  gentoo  org>
AuthorDate: Sat Feb  8 23:27:40 2020 +
Commit: Zac Medico  gentoo  org>
CommitDate: Sat Feb  8 23:38:11 2020 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=9d28f516

Support FEATURES=qa-unresolved-soname-deps (bug 708448)

Support FEATURES=qa-unresolved-soname-deps so that it's possible to
disable the QA warning that was introduced for bug 704320. This is
useful for systems that may have incomplete PROVIDES metadata due
to alternative package managers or experimentation with a new
architecture.

Bug: https://bugs.gentoo.org/708448
Bug: https://bugs.gentoo.org/704320
Signed-off-by: Zac Medico  gentoo.org>

 cnf/make.globals   |  3 ++-
 lib/_emerge/EbuildPhase.py | 13 -
 lib/portage/const.py   |  1 +
 man/make.conf.5|  4 
 4 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/cnf/make.globals b/cnf/make.globals
index 50511e812..139e1ce97 100644
--- a/cnf/make.globals
+++ b/cnf/make.globals
@@ -53,7 +53,8 @@ FEATURES="assume-digests binpkg-docompress binpkg-dostrip 
binpkg-logs
   config-protect-if-modified distlocks ebuild-locks
   fixlafiles ipc-sandbox merge-sync multilib-strict
   network-sandbox news parallel-fetch pid-sandbox
-  preserve-libs protect-owned sandbox sfperms strict
+  preserve-libs protect-owned qa-unresolved-soname-deps
+  sandbox sfperms strict
   unknown-features-warn unmerge-logs unmerge-orphans userfetch
   userpriv usersandbox usersync"
 

diff --git a/lib/_emerge/EbuildPhase.py b/lib/_emerge/EbuildPhase.py
index 828e6e126..234a273a0 100644
--- a/lib/_emerge/EbuildPhase.py
+++ b/lib/_emerge/EbuildPhase.py
@@ -453,11 +453,14 @@ class _PostPhaseCommands(CompositeTask):
if msg:
self.scheduler.output(msg, 
log_path=self.settings.get("PORTAGE_LOG_FILE"))
 
-   # This operates on REQUIRES metadata generated by the 
above function call.
-   future = self._soname_deps_qa()
-   # If an unexpected exception occurs, then this will 
raise it.
-   future.add_done_callback(lambda future: future.result())
-   self._start_task(AsyncTaskFuture(future=future), 
self._default_final_exit)
+   if 'qa-unresolved-soname-deps' in 
self.settings.features:
+   # This operates on REQUIRES metadata generated 
by the above function call.
+   future = self._soname_deps_qa()
+   # If an unexpected exception occurs, then this 
will raise it.
+   future.add_done_callback(lambda future: 
future.result())
+   
self._start_task(AsyncTaskFuture(future=future), self._default_final_exit)
+   else:
+   self._default_final_exit(task)
else:
self._default_final_exit(task)
 

diff --git a/lib/portage/const.py b/lib/portage/const.py
index e95039fd5..f6be9258f 100644
--- a/lib/portage/const.py
+++ b/lib/portage/const.py
@@ -180,6 +180,7 @@ SUPPORTED_FEATURES   = frozenset([
"preserve-libs",
"protect-owned",
"python-trace",
+   "qa-unresolved-soname-deps",
"sandbox",
"selinux",
"sesandbox",

diff --git a/man/make.conf.5 b/man/make.conf.5
index 494d5f003..f82fed65a 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -607,6 +607,10 @@ If \fIcollision\-protect\fR is enabled then it takes 
precedence over
 Output a verbose trace of python execution to stderr when a command's
 \-\-debug option is enabled.
 .TP
+.B qa\-unresolved\-soname\-deps
+Trigger a QA warning when a package installs files with unresolved soname
+dependencies.
+.TP
 .B sandbox
 Enable sandbox\-ing when running \fBemerge\fR(1) and \fBebuild\fR(1).
 .TP



[gentoo-commits] proj/portage:master commit in: cnf/

2019-10-21 Thread Michał Górny
commit: 03c54e340073620f489ca85bca94267a198174fe
Author: Michał Górny  gentoo  org>
AuthorDate: Mon Oct 21 14:59:43 2019 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon Oct 21 18:07:40 2019 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=03c54e34

make.globals: Change FETCHCOMMAND_RSYNC to --copy-links

Change FETCHCOMMAND_RSYNC to use '-Lt' over '-a'.  Notably, this
replaces --links with --copy-links option, i.e. makes rsync copy
underlying files when symlinks are met.  This is important since
we do not transfer symlink targets, therefore '-l' ends up creating
dangling symlinks.

This also removes most of the other options that are irrelevant or even
undesirable to distfile fetching, that is:

- '-r' since we always fetch a single file, so recursive operation is
  unnecessary
- '-p', '-o', '-g' since we want to apply our permissions and ownership
  for distfiles rather than copying the one from mirrors,
- '-D' since we do not expect any devices or specials in distfiles.

Copying timestamps is preserved in case it's helpful in determining
whether files need to be refetched.

Bug: https://bugs.gentoo.org/698046
Reviewed-by: Zac Medico  gentoo.org>
Signed-off-by: Michał Górny  gentoo.org>

 cnf/make.globals | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cnf/make.globals b/cnf/make.globals
index 9eeb7a01e..50511e812 100644
--- a/cnf/make.globals
+++ b/cnf/make.globals
@@ -38,8 +38,8 @@ PORTAGE_TMPDIR="/var/tmp"
 FETCHCOMMAND="wget -t 3 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" 
\"\${URI}\""
 RESUMECOMMAND="wget -c -t 3 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" 
\"\${URI}\""
 
-FETCHCOMMAND_RSYNC="rsync -avP \"\${URI}\" \"\${DISTDIR}/\${FILE}\""
-RESUMECOMMAND_RSYNC="rsync -avP \"\${URI}\" \"\${DISTDIR}/\${FILE}\""
+FETCHCOMMAND_RSYNC="rsync -LtvP \"\${URI}\" \"\${DISTDIR}/\${FILE}\""
+RESUMECOMMAND_RSYNC="rsync -LtvP \"\${URI}\" \"\${DISTDIR}/\${FILE}\""
 
 # NOTE: rsync will evaluate quotes embedded inside PORTAGE_SSH_OPTS
 FETCHCOMMAND_SSH="bash -c \"x=\\\${2#ssh://} ; host=\\\${x%%/*} ; 
port=\\\${host##*:} ; host=\\\${host%:*} ; [[ \\\${host} = \\\${port} ]] && 
port= ; exec rsync --rsh=\\\"ssh \\\${port:+-p\\\${port}} \\\${3}\\\" -avP 
\\\"\\\${host}:/\\\${x#*/}\\\" \\\"\\\$1\\\"\" rsync \"\${DISTDIR}/\${FILE}\" 
\"\${URI}\" \"\${PORTAGE_SSH_OPTS}\""



[gentoo-commits] proj/portage:master commit in: cnf/

2019-09-25 Thread Zac Medico
commit: 64d34590d6ef8825538ff3ad4539a9ea8404b41e
Author: Bertrand Jacquin  jacquin  bzh>
AuthorDate: Wed Sep 25 23:07:57 2019 +
Commit: Zac Medico  gentoo  org>
CommitDate: Thu Sep 26 00:02:44 2019 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=64d34590

repos.conf: remove mention of squashdelta from default config

squashdelta was removed in 090c8c91dad9 ("portage/sync/modules: Remove
the squashdelta module")

Bug: https://bugs.gentoo.org/614422
Closes: https://github.com/gentoo/portage/pull/461
Signed-off-by: Zac Medico  gentoo.org>

 cnf/repos.conf | 4 
 1 file changed, 4 deletions(-)

diff --git a/cnf/repos.conf b/cnf/repos.conf
index e71b704db..6cb6e3b3c 100644
--- a/cnf/repos.conf
+++ b/cnf/repos.conf
@@ -17,7 +17,3 @@ sync-openpgp-key-refresh-retry-delay-exp-base = 2
 sync-openpgp-key-refresh-retry-delay-max = 60
 sync-openpgp-key-refresh-retry-delay-mult = 4
 sync-webrsync-verify-signature = yes
-
-# for daily squashfs snapshots
-#sync-type = squashdelta
-#sync-uri = mirror://gentoo/../snapshots/squashfs



[gentoo-commits] proj/portage:master commit in: cnf/

2019-07-04 Thread Michał Górny
commit: ed2a826f8d2fc5b74a714e0e37561cec25abc79b
Author: Michał Górny  gentoo  org>
AuthorDate: Fri Jul  5 05:17:20 2019 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Jul  5 05:39:33 2019 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=ed2a826f

repos.conf: Default to using Gentoo keyservers

Default to using hkps://keys.gentoo.org which are guaranteed to hold
the newest copies of Gentoo keys, are secured against key poisoning
and are more reliable than SKS.

Reviewed-by: Zac Medico  gentoo.org>
Signed-off-by: Michał Górny  gentoo.org>

 cnf/repos.conf | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cnf/repos.conf b/cnf/repos.conf
index e84840bf2..2d73b3e35 100644
--- a/cnf/repos.conf
+++ b/cnf/repos.conf
@@ -10,6 +10,7 @@ sync-rsync-verify-jobs = 1
 sync-rsync-verify-metamanifest = yes
 sync-rsync-verify-max-age = 24
 sync-openpgp-key-path = /usr/share/openpgp-keys/gentoo-release.asc
+sync-openpgp-keyserver = hkps://keys.gentoo.org
 sync-openpgp-key-refresh-retry-count = 40
 sync-openpgp-key-refresh-retry-overall-timeout = 1200
 sync-openpgp-key-refresh-retry-delay-exp-base = 2



[gentoo-commits] proj/portage:master commit in: cnf/, man/, lib/portage/_compat_upgrade/

2019-06-09 Thread Zac Medico
commit: 0f934d642c3d9cbba66f9e34c821f49cf5b0c8f0
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sun Jun  9 19:52:31 2019 +
Commit: Zac Medico  gentoo  org>
CommitDate: Sun Jun  9 21:37:19 2019 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=0f934d64

Update default RPMDIR to /var/cache/rpm.

After the other locations have been updated, RPMDIR is the only
directory with a default under /usr/portage. Update its default along
the lines of PKGDIR.

Bug: https://bugs.gentoo.org/687734
Signed-off-by: Ulrich Müller  gentoo.org>
Signed-off-by: Zac Medico  gentoo.org>

 cnf/make.globals |  2 +-
 lib/portage/_compat_upgrade/default_locations.py | 13 -
 man/make.conf.5  |  4 ++--
 3 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/cnf/make.globals b/cnf/make.globals
index b01cca599..9eeb7a01e 100644
--- a/cnf/make.globals
+++ b/cnf/make.globals
@@ -29,7 +29,7 @@ ACCEPT_RESTRICT="*"
 # Miscellaneous paths
 DISTDIR="/var/cache/distfiles"
 PKGDIR="/var/cache/binpkgs"
-RPMDIR="/usr/portage/rpm"
+RPMDIR="/var/cache/rpm"
 
 # Temporary build directory
 PORTAGE_TMPDIR="/var/tmp"

diff --git a/lib/portage/_compat_upgrade/default_locations.py 
b/lib/portage/_compat_upgrade/default_locations.py
index 91f300637..e61a72e3d 100644
--- a/lib/portage/_compat_upgrade/default_locations.py
+++ b/lib/portage/_compat_upgrade/default_locations.py
@@ -9,6 +9,7 @@ from portage.const import GLOBAL_CONFIG_PATH
 
 COMPAT_DISTDIR = 'usr/portage/distfiles'
 COMPAT_PKGDIR = 'usr/portage/packages'
+COMPAT_RPMDIR = 'usr/portage/rpm'
 COMPAT_MAIN_REPO = 'usr/portage'
 
 
@@ -46,13 +47,19 @@ def main():
except OSError:
do_pkgdir = False
 
+   compat_rpmdir = os.path.join(portage.const.EPREFIX or '/', 
COMPAT_RPMDIR)
+   try:
+   do_rpmdir = os.path.samefile(config['RPMDIR'], compat_rpmdir)
+   except OSError:
+   do_rpmdir = False
+
compat_main_repo = os.path.join(portage.const.EPREFIX or '/', 
COMPAT_MAIN_REPO)
try:
do_main_repo = 
os.path.samefile(config.repositories.mainRepoLocation(), compat_main_repo)
except OSError:
do_main_repo = False
 
-   if do_distdir or do_pkgdir:
+   if do_distdir or do_pkgdir or do_rpmdir:
config_path = os.path.join(os.environ['ED'], 
GLOBAL_CONFIG_PATH.lstrip(os.sep), 'make.globals')
with open(config_path) as f:
content = f.read()
@@ -64,6 +71,10 @@ def main():
compat_setting = 
'PKGDIR="{}"'.format(compat_pkgdir)
out.einfo('Setting make.globals default {} for 
backward compatibility'.format(compat_setting))
content = re.sub('^PKGDIR=.*$', compat_setting, 
content, flags=re.MULTILINE)
+   if do_rpmdir:
+   compat_setting = 
'RPMDIR="{}"'.format(compat_rpmdir)
+   out.einfo('Setting make.globals default {} for 
backward compatibility'.format(compat_setting))
+   content = re.sub('^RPMDIR=.*$', compat_setting, 
content, flags=re.MULTILINE)
with open(config_path, 'wt') as f:
f.write(content)
 

diff --git a/man/make.conf.5 b/man/make.conf.5
index 4c9f00675..d73bb9bac 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -1,4 +1,4 @@
-.TH "MAKE.CONF" "5" "Apr 2019" "Portage VERSION" "Portage"
+.TH "MAKE.CONF" "5" "Jun 2019" "Portage VERSION" "Portage"
 .SH "NAME"
 make.conf \- custom settings for Portage
 .SH "SYNOPSIS"
@@ -1125,7 +1125,7 @@ Defaults to /.
 \fBRPMDIR\fR = \fI[path]\fR
 Defines the location where created RPM packages will be stored.
 .br
-Defaults to /usr/portage/rpm.
+Defaults to /var/cache/rpm.
 .TP
 \fBSYNC\fR = \fI[RSYNC]\fR
 Insert your preferred rsync mirror here.  This rsync server



[gentoo-commits] proj/portage:master commit in: cnf/

2019-04-20 Thread Zac Medico
commit: cde445abb6d3bcc357355589c4d6d9365069d247
Author: Zac Medico  gentoo  org>
AuthorDate: Fri Apr 19 05:14:57 2019 +
Commit: Zac Medico  gentoo  org>
CommitDate: Fri Apr 19 05:16:10 2019 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=cde445ab

cnf/make.conf.example: remove comment about DISTDIR and PKGDIR in PORTDIR

Reported-by: Matt Whitlock  mattwhitlock.name>
Bug: https://bugs.gentoo.org/378603#c32
Signed-off-by: Zac Medico  gentoo.org>

 cnf/make.conf.example | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/cnf/make.conf.example b/cnf/make.conf.example
index 94210faa9..a309a5c43 100644
--- a/cnf/make.conf.example
+++ b/cnf/make.conf.example
@@ -107,10 +107,7 @@
 # this, you must update your /etc/portage/make.profile symlink accordingly.
 # ***Warning***
 # Data stored inside PORTDIR is in peril of being overwritten or deleted by
-# the emerge --sync command. The default value of PORTAGE_RSYNC_OPTS
-# will protect the default locations of DISTDIR and PKGDIR, but users are
-# warned that any other locations inside PORTDIR are not necessarily safe
-# for data storage.
+# the emerge --sync command.
 #PORTDIR=/var/db/repos/gentoo
 #
 # DISTDIR is where all of the source code tarballs will be placed for



[gentoo-commits] proj/portage:master commit in: cnf/, man/, lib/portage/package/ebuild/, lib/portage/package/ebuild/_config/

2019-02-12 Thread Ulrich Müller
commit: 94669648977c1ea851b0911a1ec99c64b4c18273
Author: Ulrich Müller  gentoo  org>
AuthorDate: Tue Feb 12 14:15:32 2019 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Tue Feb 12 22:34:07 2019 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=94669648

Don't define a default for ACCEPT_LICENSE

In its 2019-02-10 meeting, the Gentoo Council has decided that the
default for ACCEPT_LICENSE should be changed to @FREE. We take that
opportunity to move the default to make.defaults in the base profile,
for the following reasons:
 - The setting depends on the @FREE license group, which itself is not
   defined in Portage, but in profiles/license_groups.
 - Setting the default in profiles will allow to perform the switchover
   at a precise time, independent of Portage release and stabilisation
   schedule.
 - Profiles are a better location to define the default distro policy.
 - GLEP 23 says so.

Bug: https://bugs.gentoo.org/677800
Signed-off-by: Ulrich Müller  gentoo.org>

 cnf/make.conf.example  | 8 
 cnf/make.globals   | 3 +--
 lib/portage/package/ebuild/_config/special_env_vars.py | 3 +--
 lib/portage/package/ebuild/config.py   | 4 ++--
 man/make.conf.5| 6 +++---
 5 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/cnf/make.conf.example b/cnf/make.conf.example
index ffebd24d4..70cb8b19b 100644
--- a/cnf/make.conf.example
+++ b/cnf/make.conf.example
@@ -1,4 +1,4 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 # Contains local system settings for Portage system
 
@@ -84,11 +84,11 @@
 # license_groups file (see portage(5) man page). In addition to license
 # and group names, the * and -* wildcard tokens are also supported.
 #
-# Accept any license except those in the EULA license group (default).
-#ACCEPT_LICENSE="* -@EULA"
-#
 # Only accept licenses in the FREE license group (i.e. Free Software).
 #ACCEPT_LICENSE="-* @FREE"
+#
+# Accept any license except those in the EULA license group.
+#ACCEPT_LICENSE="* -@EULA"
 
 # Portage Directories
 # ===

diff --git a/cnf/make.globals b/cnf/make.globals
index 5a3015ae2..b4ed8c466 100644
--- a/cnf/make.globals
+++ b/cnf/make.globals
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 # System-wide defaults for the Portage system
 
@@ -23,7 +23,6 @@ FCFLAGS=""
 # Approved by the mirror-admin team.
 GENTOO_MIRRORS="http://distfiles.gentoo.org;
 
-ACCEPT_LICENSE="* -@EULA"
 ACCEPT_PROPERTIES="*"
 ACCEPT_RESTRICT="*"
 

diff --git a/lib/portage/package/ebuild/_config/special_env_vars.py 
b/lib/portage/package/ebuild/_config/special_env_vars.py
index f4f2bec2c..f9a0c3c0e 100644
--- a/lib/portage/package/ebuild/_config/special_env_vars.py
+++ b/lib/portage/package/ebuild/_config/special_env_vars.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2018 Gentoo Foundation
+# Copyright 2010-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 from __future__ import unicode_literals
@@ -199,7 +199,6 @@ global_only_vars = frozenset([
 ])
 
 default_globals = {
-   'ACCEPT_LICENSE':   '* -@EULA',
'ACCEPT_PROPERTIES':'*',
'PORTAGE_BZIP2_COMMAND':'bzip2',
 }

diff --git a/lib/portage/package/ebuild/config.py 
b/lib/portage/package/ebuild/config.py
index 8de23e2e5..2981f7e31 100644
--- a/lib/portage/package/ebuild/config.py
+++ b/lib/portage/package/ebuild/config.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2018 Gentoo Foundation
+# Copyright 2010-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 from __future__ import unicode_literals
@@ -2278,7 +2278,7 @@ class config(object):
for curdb in mydbs:
mysplit.extend(curdb.get('ACCEPT_LICENSE', 
'').split())
mysplit = prune_incremental(mysplit)
-   accept_license_str = ' '.join(mysplit)
+   accept_license_str = ' '.join(mysplit) or '* -@EULA'
self.configlist[-1]['ACCEPT_LICENSE'] = 
accept_license_str

self._license_manager.set_accept_license_str(accept_license_str)
else:

diff --git a/man/make.conf.5 b/man/make.conf.5
index a8f5b639f..adbd6dc85 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -1,4 +1,4 @@
-.TH "MAKE.CONF" "5" "Nov 2018" "Portage VERSION" "Portage"
+.TH "MAKE.CONF" "5" "Feb 2019" "Portage VERSION" "Portage"
 .SH "NAME"
 make.conf \- custom settings for Portage
 .SH "SYNOPSIS"
@@ -64,7 +64,7 @@ file (see \fBportage\fR(5)). In addition to license and group 
names, the
 for further information:
 

[gentoo-commits] proj/portage:master commit in: cnf/

2018-12-12 Thread Michał Górny
commit: 55a9d4ccc5ac90b454638f9205f8a5d20ca8b47a
Author: Michał Górny  gentoo  org>
AuthorDate: Wed Dec 12 17:36:48 2018 +
Commit: Michał Górny  gentoo  org>
CommitDate: Wed Dec 12 18:41:25 2018 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=55a9d4cc

Enable {ipc,network,pid}-sandbox by default

The sandboxes are stable enough to be enabled by default, and they all
prevent undesirable situations.  Furthermore, they all gracefully handle
missing namespace support.

Reviewed-by: Zac Medico  gentoo.org>
Signed-off-by: Michał Górny  gentoo.org>

 cnf/make.globals | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/cnf/make.globals b/cnf/make.globals
index d394a1890..1bcc7ce64 100644
--- a/cnf/make.globals
+++ b/cnf/make.globals
@@ -52,10 +52,11 @@ FETCHCOMMAND_SFTP="bash -c \"x=\\\${2#sftp://} ; 
host=\\\${x%%/*} ; port=\\\${ho
 # Default user options
 FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs
   config-protect-if-modified distlocks ebuild-locks
-  fixlafiles merge-sync multilib-strict news
-  parallel-fetch preserve-libs protect-owned
-  sandbox sfperms strict unknown-features-warn unmerge-logs
-  unmerge-orphans userfetch userpriv usersandbox usersync"
+  fixlafiles ipc-sandbox merge-sync multilib-strict
+  network-sandbox news parallel-fetch pid-sandbox
+  preserve-libs protect-owned sandbox sfperms strict
+  unknown-features-warn unmerge-logs unmerge-orphans userfetch
+  userpriv usersandbox usersync"
 
 # Ignore file collisions in /lib/modules since files inside this directory
 # are never unmerged, and therefore collisions must be ignored in order for



[gentoo-commits] proj/portage:master commit in: cnf/, lib/portage/dbapi/, bin/, lib/portage/package/ebuild/, man/, lib/portage/

2018-11-05 Thread Michał Górny
commit: 3f50bfc1ae5bb211135d1c9286087ca39626ddf9
Author: Michał Górny  gentoo  org>
AuthorDate: Thu Nov  1 09:42:08 2018 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon Nov  5 18:48:28 2018 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=3f50bfc1

Support disabling docompress for binary package builds

Add FEATURES=binpkg-docompress that can be used whether docompress
compression is performed before or after creating binary packages.  With
the feature enabled (the default), the current behavior of storing
compressed files in binpkg is preserved.  With it disabled, uncompressed
files are stored inside binary package and are compressed when
installing.

Storing uncompressed files in binary packages has two advantages:

1. Avoids the double-compression penalty, effectively improving binary
   package compression speed and compression ratio.

2. Allows the same packages to be reused on systems with different
   docompress configurations.

The option is roughly backwards compatible.  Old Portage versions will
install packages created with FEATURES=-binpkg-docompress correctly,
albeit without compression.  Portage with FEATURES=binpkg-docompress
should install old binpackages semi-correctly, potentially recompressing
them (and throwing already-compressed warnings on format mismatch).
The new behavior is left off by default to avoid those problems.

Signed-off-by: Michał Górny  gentoo.org>
Reviewed-by: Zac Medico  gentoo.org>

 bin/misc-functions.sh  | 43 ++
 bin/phase-functions.sh |  2 +-
 cnf/make.globals   |  2 +-
 lib/portage/const.py   |  1 +
 lib/portage/dbapi/vartree.py   | 12 ++
 lib/portage/package/ebuild/doebuild.py |  4 +++-
 man/ebuild.1   |  5 
 man/make.conf.5|  6 +
 8 files changed, 68 insertions(+), 7 deletions(-)

diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index db7aaed5a..3b3a5e09c 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -109,10 +109,13 @@ install_qa_check() {
 
[[ -d ${ED%/}/usr/share/info ]] && prepinfo
 
-   # Apply compression.
-   "${PORTAGE_BIN_PATH}"/ecompress --queue "${PORTAGE_DOCOMPRESS[@]}"
-   "${PORTAGE_BIN_PATH}"/ecompress --ignore "${PORTAGE_DOCOMPRESS_SKIP[@]}"
-   "${PORTAGE_BIN_PATH}"/ecompress --dequeue
+   # If binpkg-docompress is enabled, apply compression before creating
+   # the binary package.
+   if has binpkg-docompress ${FEATURES}; then
+   "${PORTAGE_BIN_PATH}"/ecompress --queue 
"${PORTAGE_DOCOMPRESS[@]}"
+   "${PORTAGE_BIN_PATH}"/ecompress --ignore 
"${PORTAGE_DOCOMPRESS_SKIP[@]}"
+   "${PORTAGE_BIN_PATH}"/ecompress --dequeue
+   fi
 
export STRIP_MASK
if ___eapi_has_dostrip; then
@@ -160,6 +163,38 @@ install_qa_check() {
rm -f "${ED%/}"/usr/share/info/dir{,.gz,.bz2} || die "rm failed!"
 }
 
+__dyn_instprep() {
+   if [[ -e ${PORTAGE_BUILDDIR}/.instprepped ]] ; then
+   __vecho ">>> It appears that '$PF' is already instprepped; 
skipping."
+   __vecho ">>> Remove '${PORTAGE_BUILDDIR}/.instprepped' to force 
instprep."
+   return 0
+   fi
+
+   if has chflags ${FEATURES}; then
+   # Save all the file flags for restoration afterwards.
+   mtree -c -p "${ED}" -k flags > "${T}/bsdflags.mtree"
+   # Remove all the file flags so that we can do anything 
necessary.
+   chflags -R noschg,nouchg,nosappnd,nouappnd "${ED}"
+   chflags -R nosunlnk,nouunlnk "${ED}" 2>/dev/null
+   fi
+
+   # If binpkg-docompress is disabled, we need to apply compression
+   # before installing.
+   if ! has binpkg-docompress ${FEATURES}; then
+   "${PORTAGE_BIN_PATH}"/ecompress --queue 
"${PORTAGE_DOCOMPRESS[@]}"
+   "${PORTAGE_BIN_PATH}"/ecompress --ignore 
"${PORTAGE_DOCOMPRESS_SKIP[@]}"
+   "${PORTAGE_BIN_PATH}"/ecompress --dequeue
+   fi
+
+   if has chflags ${FEATURES}; then
+   # Restore all the file flags that were saved earlier on.
+   mtree -U -e -p "${ED}" -k flags < "${T}/bsdflags.mtree" &> 
/dev/null
+   fi
+
+   >> "${PORTAGE_BUILDDIR}/.instprepped" || \
+   die "Failed to create ${PORTAGE_BUILDDIR}/.instprepped"
+}
+
 preinst_qa_check() {
postinst_qa_check preinst
 }

diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
index 51b480bfb..d8ebf3d3e 100644
--- a/bin/phase-functions.sh
+++ b/bin/phase-functions.sh
@@ -288,7 +288,7 @@ __dyn_clean() {
 
if [[ $EMERGE_FROM = binary ]] || ! has keepwork $FEATURES; then
rm -f 
"$PORTAGE_BUILDDIR"/.{ebuild_changed,logid,pretended,setuped,unpacked,prepared} 
\
-   

[gentoo-commits] proj/portage:master commit in: cnf/

2018-08-12 Thread Zac Medico
commit: d40b9fc1f9591efab0c28fc1cbee1980dc86c735
Author: Mart Raudsepp  gentoo  org>
AuthorDate: Sun Aug 12 10:02:14 2018 +
Commit: Zac Medico  gentoo  org>
CommitDate: Sun Aug 12 10:03:20 2018 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=d40b9fc1

Initial cnf/make.conf.example.arm64.diff (bug 636674)

Bug: https://bugs.gentoo.org/636674

 cnf/make.conf.example.arm64.diff | 37 +
 1 file changed, 37 insertions(+)

diff --git a/cnf/make.conf.example.arm64.diff b/cnf/make.conf.example.arm64.diff
new file mode 100644
index 0..db1fee704
--- /dev/null
+++ b/cnf/make.conf.example.arm64.diff
@@ -0,0 +1,37 @@
+--- make.conf.example
 make.conf.example
+@@ -39,9 +39,24 @@
+ # -frecord-gcc-switches, since otherwise the check could result in false
+ # positive results.
+ #
+-# Please refer to the GCC manual for a list of possible values.
++# -mcpu specifies the name of the target processor, optionally suffixed by one
++# or more feature modifiers. -march and -mtune are automatically deduced,
++# unless set as well.
++# -march specifies the name of the target architecture, optionally suffixed
++# by one or more feature modifiers.
++# -mtune specifies the name of the target processor for which to tune
++# performance of the code.
++# Set -march and -mtune if you want to build binaries that run with the given
++# architecture instructions and is tuned for a more specific CPU without
++# using its added instructions.
++# Set only -mcpu if you want to build binaries that are most optimal for the
++# given CPU, but might not run on others.
++#
++# Please refer to the GCC manual "AArch64 Options" section for a list of
++# possible architecture, CPU and feature values.
+ #
+ #CFLAGS="-O2 -pipe"
++#CLFAGS="-O2 -pipe -mcpu=native"
+ #
+ # If you set a CFLAGS above, then this line will set your default C++ flags to
+ # the same settings.
+@@ -76,7 +91,7 @@
+ # DO NOT PUT ANYTHING BUT YOUR SPECIFIC ~ARCHITECTURE IN THE LIST.
+ # IF YOU ARE UNSURE OF YOUR ARCH, OR THE IMPLICATIONS, DO NOT MODIFY THIS.
+ #
+-#ACCEPT_KEYWORDS="~arch"
++#ACCEPT_KEYWORDS="~arm64"
+ 
+ # ACCEPT_LICENSE is used to mask packages based on licensing restrictions.
+ # It may contain both license and group names, where group names are



[gentoo-commits] proj/portage:master commit in: cnf/, lib/portage/tests/resolver/, man/, lib/portage/, ...

2018-07-31 Thread Michał Górny
commit: 8c5598c1af2c4c96546f196e2213211ec9cd7e7a
Author: Michał Górny  gentoo  org>
AuthorDate: Sun Jun  4 08:21:45 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Tue Jul 31 17:24:02 2018 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=8c5598c1

Replace implicit {FEATURES->USE}=test forcing with USE default

Use an explicit USE_ORDER entry to control mapping FEATURES=test into
default-enabled USE=test, rather than forcing/masking it depending
on the state of FEATURES.

This makes it possible for users to enable (or disable) USE=test
independently of FEATURES.  An example use case is installing test
dependencies and building test cases without actually running tests
at a particular moment which is something I've been doing quite
frequently with LLVM.

Reviewed-by: Zac Medico  gentoo.org>
Closes: https://github.com/gentoo/portage/pull/347

 cnf/make.globals   |   2 +-
 lib/portage/eapi.py|   2 +-
 lib/portage/package/ebuild/config.py   |  52 ++
 .../tests/resolver/test_features_test_use.py   | 108 -
 man/make.conf.5|   6 +-
 5 files changed, 102 insertions(+), 68 deletions(-)

diff --git a/cnf/make.globals b/cnf/make.globals
index 08a37a534..04a708af8 100644
--- a/cnf/make.globals
+++ b/cnf/make.globals
@@ -107,7 +107,7 @@ CONFIG_PROTECT="/etc"
 CONFIG_PROTECT_MASK="/etc/env.d"
 
 # Disable auto-use
-USE_ORDER="env:pkg:conf:defaults:pkginternal:repo:env.d"
+USE_ORDER="env:pkg:conf:defaults:pkginternal:features:repo:env.d"
 
 # Mode bits for ${WORKDIR} (see ebuild.5).
 PORTAGE_WORKDIR_MODE="0700"

diff --git a/lib/portage/eapi.py b/lib/portage/eapi.py
index 158d58243..5e12e976d 100644
--- a/lib/portage/eapi.py
+++ b/lib/portage/eapi.py
@@ -170,7 +170,7 @@ def _get_eapi_attrs(eapi):
exports_EBUILD_PHASE_FUNC = (eapi is None or 
eapi_exports_EBUILD_PHASE_FUNC(eapi)),
exports_PORTDIR = (eapi is None or eapi_exports_PORTDIR(eapi)),
exports_ECLASSDIR = (eapi is not None and 
eapi_exports_ECLASSDIR(eapi)),
-   feature_flag_test = True,
+   feature_flag_test = False,
feature_flag_targetroot = (eapi is not None and 
eapi_has_targetroot(eapi)),
hdepend = (eapi is not None and eapi_has_hdepend(eapi)),
iuse_defaults = (eapi is None or eapi_has_iuse_defaults(eapi)),

diff --git a/lib/portage/package/ebuild/config.py 
b/lib/portage/package/ebuild/config.py
index 320d9f6c0..37c5c6656 100644
--- a/lib/portage/package/ebuild/config.py
+++ b/lib/portage/package/ebuild/config.py
@@ -294,6 +294,7 @@ class config(object):
self.configlist = [
self.configdict['env.d'],
self.configdict['repo'],
+   self.configdict['features'],
self.configdict['pkginternal'],
self.configdict['globals'],
self.configdict['defaults'],
@@ -461,13 +462,16 @@ class config(object):
# back up our incremental variables:
self.configdict={}
self._use_expand_dict = {}
-   # configlist will contain: [ env.d, globals, defaults, 
conf, pkg, backupenv, env ]
+   # configlist will contain: [ env.d, globals, features, 
defaults, conf, pkg, backupenv, env ]
self.configlist.append({})
self.configdict["env.d"] = self.configlist[-1]
 
self.configlist.append({})
self.configdict["repo"] = self.configlist[-1]
 
+   self.configlist.append({})
+   self.configdict["features"] = self.configlist[-1]
+
self.configlist.append({})
self.configdict["pkginternal"] = self.configlist[-1]
 
@@ -868,7 +872,7 @@ class config(object):
# reasonable defaults; this is important as without 
USE_ORDER,
# USE will always be "" (nothing set)!
if "USE_ORDER" not in self:
-   self["USE_ORDER"] = 
"env:pkg:conf:defaults:pkginternal:repo:env.d"
+   self["USE_ORDER"] = 
"env:pkg:conf:defaults:pkginternal:features:repo:env.d"
self.backup_changes("USE_ORDER")
 
if "CBUILD" not in self and "CHOST" in self:
@@ -1292,6 +1296,7 @@ class config(object):
del self._penv[:]
self.configdict["pkg"].clear()
self.configdict["pkginternal"].clear()
+   self.configdict["features"].clear()
self.configdict["repo"].clear()
 

[gentoo-commits] proj/portage:master commit in: cnf/

2018-07-11 Thread Zac Medico
commit: 36dca004be44e2ca51cf0188958e9404136a049f
Author: Zac Medico  gentoo  org>
AuthorDate: Wed Jul 11 17:58:32 2018 +
Commit: Zac Medico  gentoo  org>
CommitDate: Wed Jul 11 18:00:42 2018 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=36dca004

cnf/repos.conf: allow sync-allow-hardlinks in DEFAULT

If we have a local sync-allow-hardlinks setting in [gentoo],
it overrides the DEFAULT section. The default setting for
sync-allow-hardlinks is already done in the RepoConfig
class.

Fixes: 84822ef7a214 ("rsync: quarantine data prior to verification (bug 
660410)")

 cnf/repos.conf | 1 -
 1 file changed, 1 deletion(-)

diff --git a/cnf/repos.conf b/cnf/repos.conf
index 419f6d118..352073cfd 100644
--- a/cnf/repos.conf
+++ b/cnf/repos.conf
@@ -6,7 +6,6 @@ location = /usr/portage
 sync-type = rsync
 sync-uri = rsync://rsync.gentoo.org/gentoo-portage
 auto-sync = yes
-sync-allow-hardlinks = yes
 sync-rsync-verify-jobs = 1
 sync-rsync-verify-metamanifest = yes
 sync-rsync-verify-max-age = 24



[gentoo-commits] proj/portage:master commit in: cnf/

2018-05-11 Thread Michał Górny
commit: a77e2e15e088bee783cb6288f23856fef020a91a
Author: Michał Górny  gentoo  org>
AuthorDate: Fri Mar 23 16:40:13 2018 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri May 11 07:48:20 2018 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=a77e2e15

repos.conf: Use openpgp-keys-* as key provider for gemato

Switch the key provider from unmaintained app-crypt/gentoo-keys
to app-crypt/openpgp-keys-gentoo-release.  The latter has the advantage
of supplying current, working keys in the more portable OpenPGP format
(rather than GnuPG binary keyring).

Reviewed-by: Zac Medico  gentoo.org>

 cnf/repos.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cnf/repos.conf b/cnf/repos.conf
index 987be6462..352073cfd 100644
--- a/cnf/repos.conf
+++ b/cnf/repos.conf
@@ -9,7 +9,7 @@ auto-sync = yes
 sync-rsync-verify-jobs = 1
 sync-rsync-verify-metamanifest = yes
 sync-rsync-verify-max-age = 24
-sync-openpgp-key-path = 
/var/lib/gentoo/gkeys/keyrings/gentoo/release/pubring.gpg
+sync-openpgp-key-path = /usr/share/openpgp-keys/gentoo-release.asc
 sync-openpgp-key-refresh-retry-count = 40
 sync-openpgp-key-refresh-retry-overall-timeout = 1200
 sync-openpgp-key-refresh-retry-delay-exp-base = 2



[gentoo-commits] proj/portage:master commit in: cnf/, man/, pym/portage/sync/modules/rsync/

2018-02-05 Thread Michał Górny
commit: 8d99acdb3f4fba258dfcdf3b659e400a8066d296
Author: Michał Górny  gentoo  org>
AuthorDate: Thu Feb  1 12:06:26 2018 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon Feb  5 18:43:21 2018 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=8d99acdb

rsync: Issue an explicit warning if Manifest timestamp is >24hr old

Issue an explicit warning if the Manifest timestamp for Gentoo
repository is 24 hours behind the system clock. This is meant to detect
attacks based on preventing the user from upgrading.

Reviewed-by: Zac Medico  gentoo.org>

 cnf/repos.conf |  1 +
 man/portage.5  |  4 
 pym/portage/sync/modules/rsync/__init__.py |  1 +
 pym/portage/sync/modules/rsync/rsync.py| 21 +
 4 files changed, 27 insertions(+)

diff --git a/cnf/repos.conf b/cnf/repos.conf
index 4a40ff4fc..984ecd220 100644
--- a/cnf/repos.conf
+++ b/cnf/repos.conf
@@ -7,6 +7,7 @@ sync-type = rsync
 sync-uri = rsync://rsync.gentoo.org/gentoo-portage
 auto-sync = yes
 sync-rsync-verify-metamanifest = yes
+sync-rsync-verify-max-age = 24
 sync-openpgp-key-path = 
/var/lib/gentoo/gkeys/keyrings/gentoo/release/pubring.gpg
 
 # for daily squashfs snapshots

diff --git a/man/portage.5 b/man/portage.5
index d4f755f51..54ce7eec9 100644
--- a/man/portage.5
+++ b/man/portage.5
@@ -1086,6 +1086,10 @@ directories if appropriate.
 Number of parallel jobs to use when verifying nested Manifests. Defaults
 to the apparent number of processors.
 .TP
+.B sync\-rsync\-verify\-max\-age
+Warn if repository is older than the specified number of days. Disabled
+when 0. Defaults to disabled.
+.TP
 .B sync\-rsync\-verify\-metamanifest = yes|no
 Require the repository to contain a signed MetaManifest and verify
 it using \fBapp\-portage/gemato\fR. Defaults to no.

diff --git a/pym/portage/sync/modules/rsync/__init__.py 
b/pym/portage/sync/modules/rsync/__init__.py
index 27a2548c0..cb80f6d66 100644
--- a/pym/portage/sync/modules/rsync/__init__.py
+++ b/pym/portage/sync/modules/rsync/__init__.py
@@ -29,6 +29,7 @@ module_spec = {
'sync-rsync-extra-opts',
'sync-rsync-vcs-ignore',
'sync-rsync-verify-jobs',
+   'sync-rsync-verify-max-age',
'sync-rsync-verify-metamanifest',
),
}

diff --git a/pym/portage/sync/modules/rsync/rsync.py 
b/pym/portage/sync/modules/rsync/rsync.py
index dc4674548..ac841545d 100644
--- a/pym/portage/sync/modules/rsync/rsync.py
+++ b/pym/portage/sync/modules/rsync/rsync.py
@@ -6,6 +6,7 @@ import logging
 import time
 import signal
 import socket
+import datetime
 import io
 import re
 import random
@@ -109,6 +110,20 @@ class RsyncSync(NewBase):
writemsg_level("!!! sync-rsync-verify-jobs not 
a positive integer: %s\n" % (self.verify_jobs,),
level=logging.WARNING, noiselevel=-1)
self.verify_jobs = None
+   # Support overriding max age.
+   self.max_age = self.repo.module_specific_options.get(
+   'sync-rsync-verify-max-age', '')
+   if self.max_age:
+   try:
+   self.max_age = int(self.max_age)
+   if self.max_age < 0:
+   raise ValueError(self.max_age)
+   except ValueError:
+   writemsg_level("!!! sync-rsync-max-age must be 
a non-negative integer: %s\n" % (self.max_age,),
+   level=logging.WARNING, noiselevel=-1)
+   self.max_age = 0
+   else:
+   self.max_age = 0
 
openpgp_env = None
if self.verify_metamanifest and gemato is not None:
@@ -339,6 +354,12 @@ class RsyncSync(NewBase):
ts = m.find_timestamp()
if ts is None:
raise 
RuntimeError('Timestamp not found in Manifest')
+   if (self.max_age != 0 and
+   
(datetime.datetime.utcnow() - ts.ts).days > self.max_age):
+   out.ewarn('Manifest is 
over %d days old, this is suspicious!' % (self.max_age,))
+   out.ewarn('You may want 
to try using another mirror and/or reporting this one:')
+   out.ewarn('  %s' % 
(dosyncuri,))
+   out.ewarn('')
 
   

[gentoo-commits] proj/portage:master commit in: cnf/

2017-12-10 Thread Zac Medico
commit: 8401685e8d03c8d3ba0e2c7fc432f430880a4c8c
Author: Zac Medico  gentoo  org>
AuthorDate: Sun Dec 10 09:17:33 2017 +
Commit: Zac Medico  gentoo  org>
CommitDate: Sun Dec 10 09:21:40 2017 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=8401685e

PORTAGE_XATTR_EXCLUDE: add common user.* attributes (bug 640290)

Common user.* attributes should be safe to exclude, and they
are not supported on tmpfs, except for user.pax.* attributes
that are supported with the patch from bug 470644.

See: https://www.freedesktop.org/wiki/CommonExtendedAttributes/
Bug: https://bugs.gentoo.org/612612
Bug: https://bugs.gentoo.org/640290

 cnf/make.globals | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/cnf/make.globals b/cnf/make.globals
index ea50ab615..08a37a534 100644
--- a/cnf/make.globals
+++ b/cnf/make.globals
@@ -127,8 +127,11 @@ PORTAGE_GPG_SIGNING_COMMAND="gpg --sign --digest-algo 
SHA256 --clearsign --yes -
 # security.* attributes may be special (see bug 461868), but
 # security.capability is specifically not excluded (bug 548516).
 # system.nfs4_acl attributes are irrelevant, see bug #475496.
+# user.* attributes are not supported on tmpfs (bug 640290), but
+# user.pax.* is supported with the patch from bug 470644.
 PORTAGE_XATTR_EXCLUDE="btrfs.* security.evm security.ima
-   security.selinux system.nfs4_acl"
+   security.selinux system.nfs4_acl user.apache_handler
+   user.Beagle.* user.dublincore.* user.mime_encoding user.xdg.*"
 
 #*
 #**  DO NOT EDIT THIS FILE  **



[gentoo-commits] proj/portage:master commit in: cnf/

2017-08-02 Thread Michał Górny
commit: 8868b38ec1d26c264f27031fbb4d496e7e8fe62a
Author: Michał Górny  gentoo  org>
AuthorDate: Wed Jul 26 07:16:52 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Wed Aug  2 08:06:38 2017 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=8868b38e

make.globals: Enable FEATURES=multilib-strict by default

Enable the multilib-strict feature necessary for Portage to detect
ebuilds not respecting libdir for libraries. Since those issues were
reliably fixed over the years and we're nearing the removal of 'lib'
symlink, I think we can safely enable it by default for our users
without risking many additional issues for them.

At the same time, many proxied maintainers keep submitting ebuilds that
do not respect libdir, and that require us to explicitly point that out
to them. Having Portage detect that by default would be really helpful.

Acked-by: Zac Medico  gentoo.org>

 cnf/make.globals | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cnf/make.globals b/cnf/make.globals
index 18eba947b..ea50ab615 100644
--- a/cnf/make.globals
+++ b/cnf/make.globals
@@ -52,7 +52,8 @@ FETCHCOMMAND_SFTP="bash -c \"x=\\\${2#sftp://} ; 
host=\\\${x%%/*} ; port=\\\${ho
 # Default user options
 FEATURES="assume-digests binpkg-logs
   config-protect-if-modified distlocks ebuild-locks
-  fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned
+  fixlafiles merge-sync multilib-strict news
+  parallel-fetch preserve-libs protect-owned
   sandbox sfperms strict unknown-features-warn unmerge-logs
   unmerge-orphans userfetch userpriv usersandbox usersync"
 



[gentoo-commits] proj/portage:master commit in: cnf/

2017-01-06 Thread Brian Dolbec
commit: 9784eec5e074924b4ee9ccb3e90582d195c6dbdc
Author: Ilya Tumaykin  gmail  com>
AuthorDate: Fri Jan  6 21:58:02 2017 +
Commit: Brian Dolbec  gentoo  org>
CommitDate: Fri Jan  6 22:12:20 2017 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=9784eec5

Update cnf/make.conf.example.${ARCH}.diff patches wrt 98f930d4d

Otherwise they fail to apply, which makes portage- fail at prepare
phase.

Signed-off-by: Brian Dolbec  gentoo.org>

 cnf/make.conf.example.alpha.diff  | 2 +-
 cnf/make.conf.example.amd64-fbsd.diff | 2 +-
 cnf/make.conf.example.amd64.diff  | 2 +-
 cnf/make.conf.example.arm.diff| 2 +-
 cnf/make.conf.example.hppa.diff   | 2 +-
 cnf/make.conf.example.ia64.diff   | 2 +-
 cnf/make.conf.example.m68k.diff   | 2 +-
 cnf/make.conf.example.mips.diff   | 2 +-
 cnf/make.conf.example.ppc.diff| 2 +-
 cnf/make.conf.example.ppc64.diff  | 2 +-
 cnf/make.conf.example.s390.diff   | 2 +-
 cnf/make.conf.example.sh.diff | 2 +-
 cnf/make.conf.example.sparc-fbsd.diff | 2 +-
 cnf/make.conf.example.sparc.diff  | 2 +-
 cnf/make.conf.example.x86-fbsd.diff   | 2 +-
 cnf/make.conf.example.x86.diff| 2 +-
 16 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/cnf/make.conf.example.alpha.diff b/cnf/make.conf.example.alpha.diff
index 5306999..83c09ea 100644
--- a/cnf/make.conf.example.alpha.diff
+++ b/cnf/make.conf.example.alpha.diff
@@ -15,7 +15,7 @@
 +#CHOST="alphaev67-unknown-linux-gnu"
 +CHOST="alpha-unknown-linux-gnu"
 +
- # Host and optimization settings 
+ # Host and optimization settings
  # ==
  #
 @@ -39,10 +50,18 @@

diff --git a/cnf/make.conf.example.amd64-fbsd.diff 
b/cnf/make.conf.example.amd64-fbsd.diff
index 1277b6d..a02329b 100644
--- a/cnf/make.conf.example.amd64-fbsd.diff
+++ b/cnf/make.conf.example.amd64-fbsd.diff
@@ -9,7 +9,7 @@
 +#
 +CHOST="x86_64-gentoo-freebsd7.1"
 +
- # Host and optimization settings 
+ # Host and optimization settings
  # ==
  #
 @@ -39,10 +44,35 @@

diff --git a/cnf/make.conf.example.amd64.diff b/cnf/make.conf.example.amd64.diff
index dfa4b42..8286df6 100644
--- a/cnf/make.conf.example.amd64.diff
+++ b/cnf/make.conf.example.amd64.diff
@@ -9,7 +9,7 @@
 +#
 +CHOST="x86_64-pc-linux-gnu"
 +
- # Host and optimization settings 
+ # Host and optimization settings
  # ==
  #
 @@ -39,10 +44,35 @@

diff --git a/cnf/make.conf.example.arm.diff b/cnf/make.conf.example.arm.diff
index e52d1bc..200e476 100644
--- a/cnf/make.conf.example.arm.diff
+++ b/cnf/make.conf.example.arm.diff
@@ -17,7 +17,7 @@
 +#
 +CHOST="armv4l-unknown-linux-gnu"
 +
- # Host and optimization settings 
+ # Host and optimization settings
  # ==
  #
 @@ -39,10 +52,22 @@

diff --git a/cnf/make.conf.example.hppa.diff b/cnf/make.conf.example.hppa.diff
index 2d17b37..78db02e 100644
--- a/cnf/make.conf.example.hppa.diff
+++ b/cnf/make.conf.example.hppa.diff
@@ -16,7 +16,7 @@
 +#CHOST="hppa1.1-unknown-linux-gnu"
 +#CHOST="hppa2.0-unknown-linux-gnu"
 +
- # Host and optimization settings 
+ # Host and optimization settings
  # ==
  #
 @@ -39,14 +51,38 @@

diff --git a/cnf/make.conf.example.ia64.diff b/cnf/make.conf.example.ia64.diff
index 68a0cb0..378db8a 100644
--- a/cnf/make.conf.example.ia64.diff
+++ b/cnf/make.conf.example.ia64.diff
@@ -11,7 +11,7 @@
 +
 +CHOST="ia64-unknown-linux-gnu"
 +
- # Host and optimization settings 
+ # Host and optimization settings
  # ==
  #
 @@ -76,7 +83,7 @@

diff --git a/cnf/make.conf.example.m68k.diff b/cnf/make.conf.example.m68k.diff
index f967461..7d82b3b 100644
--- a/cnf/make.conf.example.m68k.diff
+++ b/cnf/make.conf.example.m68k.diff
@@ -11,7 +11,7 @@
 +#
 +CHOST="m68k-unknown-linux-gnu"
 +
- # Host and optimization settings 
+ # Host and optimization settings
  # ==
  #
 @@ -41,7 +48,7 @@

diff --git a/cnf/make.conf.example.mips.diff b/cnf/make.conf.example.mips.diff
index 7d3d83d..0b521a7 100644
--- a/cnf/make.conf.example.mips.diff
+++ b/cnf/make.conf.example.mips.diff
@@ -11,7 +11,7 @@
 +
 +CHOST="mips-unknown-linux-gnu"
 +
- # Host and optimization settings 
+ # Host and optimization settings
  # ==
  #
 @@ -39,10 +46,15 @@

diff --git a/cnf/make.conf.example.ppc.diff b/cnf/make.conf.example.ppc.diff
index b34de8e..a7ef9cf 100644
--- a/cnf/make.conf.example.ppc.diff
+++ b/cnf/make.conf.example.ppc.diff
@@ -11,7 +11,7 @@
 +
 +CHOST="powerpc-unknown-linux-gnu"
 +
- # Host and optimization settings 
+ # Host and optimization settings
  # ==
  #
 @@ -39,10 +46,56 @@

diff --git a/cnf/make.conf.example.ppc64.diff b/cnf/make.conf.example.ppc64.diff
index 961508e..73ce993 100644
--- a/cnf/make.conf.example.ppc64.diff
+++ b/cnf/make.conf.example.ppc64.diff
@@ -11,7 +11,7 @@
 +
 +CHOST="powerpc64-unknown-linux-gnu"
 +
- # Host and 

[gentoo-commits] proj/portage:master commit in: cnf/

2017-01-06 Thread Brian Dolbec
commit: 98f930d4d490dd0daf87e9b4c8192a3ad34a624d
Author: Brian Dolbec  gentoo  org>
AuthorDate: Fri Jan  6 17:51:11 2017 +
Commit: Brian Dolbec  gentoo  org>
CommitDate: Fri Jan  6 17:58:59 2017 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=98f930d4

cnf/make.conf.example: Whitespace cleanup

 cnf/make.conf.example | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/cnf/make.conf.example b/cnf/make.conf.example
index 1df3093..a3b09b5 100644
--- a/cnf/make.conf.example
+++ b/cnf/make.conf.example
@@ -22,7 +22,7 @@
 # Example:
 #USE="X gtk gnome -alsa"
 
-# Host and optimization settings 
+# Host and optimization settings
 # ==
 #
 # For optimal performance, enable a CFLAGS setting appropriate for your CPU.
@@ -143,7 +143,7 @@
 # defined.
 #PORTDIR_OVERLAY=/usr/local/portage
 
-# Fetching files 
+# Fetching files
 # ==
 #
 # If you need to set a proxy for wget or lukemftp, add the appropriate "export
@@ -228,7 +228,7 @@
 #
 # PORTAGE_RSYNC_EXTRA_OPTS can be used to feed additional options to the rsync
 # command used by `emerge --sync`. This will not change the default options
-# which are set by PORTAGE_RSYNC_OPTS (don't change those unless you know 
+# which are set by PORTAGE_RSYNC_OPTS (don't change those unless you know
 # exactly what you're doing).
 #PORTAGE_RSYNC_EXTRA_OPTS=""
 #
@@ -291,7 +291,7 @@
 # Note that to display ccache statistics outside of portage, you must
 # remember to give the correct path to the cache.
 #
-#$ CCACHE_DIR=/var/tmp/ccache ccache -s 
+#$ CCACHE_DIR=/var/tmp/ccache ccache -s
 #
 #CCACHE_DIR="${PORTAGE_TMPDIR}/ccache"
 
@@ -306,11 +306,11 @@
 # PORTAGE_ELOG_SYSTEM: selects the module(s) to process the log messages. 
Modules
 #  included in portage are (empty means logging is 
disabled):
 #  echo (display messages again when emerge exits)
-#  save (saves one log per package in 
$PORT_LOGDIR/elog, 
+#  save (saves one log per package in 
$PORT_LOGDIR/elog,
 #/var/log/portage/elog if $PORT_LOGDIR is 
unset)
 #  custom (passes all messages to 
$PORTAGE_ELOG_COMMAND)
 #  syslog (sends all messages to syslog)
-#  mail (send all messages to the mailserver defined 
+#  mail (send all messages to the mailserver defined
 #in $PORTAGE_ELOG_MAILURI)
 #  save_summary (like "save" but merges all messages
 #in $PORT_LOGDIR/elog/summary.log,
@@ -327,7 +327,7 @@
 
 # PORTAGE_ELOG_COMMAND: only used with the "custom" logging module. Specifies 
a command
 #  to process log messages. Two variables are expanded:
-#  ${PACKAGE} - expands to the cpv entry of the 
processed 
+#  ${PACKAGE} - expands to the cpv entry of the 
processed
 #   package (see $PVR in ebuild(5))
 #  ${LOGFILE} - absolute path to the logfile
 #  Both variables have to be 
quoted with single quotes



[gentoo-commits] proj/portage:master commit in: cnf/

2017-01-06 Thread Brian Dolbec
commit: d5fe26e92c3a990134f0e660d7fd0f4f8c7ebf11
Author: Vaibhav Niku  yandex  com>
AuthorDate: Fri Jan  6 17:52:29 2017 +
Commit: Brian Dolbec  gentoo  org>
CommitDate: Fri Jan  6 17:59:04 2017 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=d5fe26e9

cnf/make.conf.example: Fix incorrect "it's" usage, should be "its"

 cnf/make.conf.example | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cnf/make.conf.example b/cnf/make.conf.example
index a3b09b5..04f3a02 100644
--- a/cnf/make.conf.example
+++ b/cnf/make.conf.example
@@ -135,7 +135,7 @@
 # ${CATEGORY}:${PF}:MMDD-HHMMSS.log in the directory specified.
 # If the directory does not exist, it will be created automatically and
 # group permissions will be applied to it.  If the directory already
-# exists, portage will not modify it's permissions.
+# exists, portage will not modify its permissions.
 #PORT_LOGDIR=""
 #
 # PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
@@ -258,7 +258,7 @@
 #PORTAGE_NICENESS=3
 #
 # PORTAGE_IONICE_COMMAND provides a command for portage to call in order to
-# adjust the io priority of portage and it's subprocesses. Default is
+# adjust the io priority of portage and its subprocesses. Default is
 # unset.
 #PORTAGE_IONICE_COMMAND="ionice -c 3 -p \${PID}"
 #



[gentoo-commits] proj/portage:master commit in: cnf/

2015-12-15 Thread Brian Dolbec
commit: 028a0a107d279f12c222e773ce0b598f6fafc680
Author: NP-Hardass  gentoo  org>
AuthorDate: Mon Dec 14 03:08:41 2015 +
Commit: Brian Dolbec  gentoo  org>
CommitDate: Tue Dec 15 00:26:01 2015 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=028a0a10

Add .git dir to excluded dirs in default PORTAGE_RSYNC_OPTS

Content-Disposition: attachment;
 filename­d-.git-dir-to-excluded-dirs-in-default-PORTAGE_RSY.patch

>From b49fba5c16a931d3ab041446dd8aeba4d2403260 Mon Sep 17 00:00:00 2001
From: NP-Hardass  gentoo.org>
Date: Sun, 13 Dec 2015 21:20:39 -0500
Subject: [PATCH] Add .git dir to excluded dirs in default PORTAGE_RSYNC_OPTS

Adding the .git dir to the default exclude dirs should have no ill side
effects as rsync is not allowed when .git dirs are present and should,
on the user's side prevent future potential sync issues like those that
we recently experienced.

 cnf/make.globals | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cnf/make.globals b/cnf/make.globals
index 82d8cc1..836bb5c 100644
--- a/cnf/make.globals
+++ b/cnf/make.globals
@@ -92,7 +92,7 @@ PORTAGE_RSYNC_RETRIES="-1"
 # Number of seconds rsync will wait before timing out.
 #RSYNC_TIMEOUT="180"
 
-PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times 
--omit-dir-times --compress --force --whole-file --delete --stats 
--human-readable --timeout=180 --exclude=/distfiles --exclude=/local 
--exclude=/packages"
+PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times 
--omit-dir-times --compress --force --whole-file --delete --stats 
--human-readable --timeout=180 --exclude=/distfiles --exclude=/local 
--exclude=/packages --exclude=/.git"
 
 # The number of days after the last `emerge --sync` that a warning
 # message should be produced.



[gentoo-commits] proj/portage:master commit in: cnf/, man/

2015-05-14 Thread Brian Dolbec
commit: 0ae17fe11588c91003aa0e579a2fef42654cabfe
Author: Mike Frysinger vapier AT gentoo DOT org
AuthorDate: Thu May 14 10:47:45 2015 +
Commit: Brian Dolbec dolsen AT gentoo DOT org
CommitDate: Thu May 14 19:01:22 2015 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=0ae17fe1

make.conf: point people to ccache(1) for cache size details

Rather than duplicate documentation for how ccache's -M flag behaves,
point people directly to the ccache(1) man page for details.

Also increase the default to 5GiB to better match current ccache.

X-Gentoo-Bug: 539510
X-Gentoo-Bug-url: https://bugs.gentoo.org/539510
Reported-by: Toralf Förster toralf.foerster AT gmx.de

 cnf/make.conf.example | 6 +++---
 man/make.conf.5   | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/cnf/make.conf.example b/cnf/make.conf.example
index 70384c6..b897f02 100644
--- a/cnf/make.conf.example
+++ b/cnf/make.conf.example
@@ -280,10 +280,10 @@
 # CCACHE_SIZE and CCACHE_DIR are used to control the behavior of ccache, and
 # and are only used if ccache is in FEATURES.
 #
-# CCACHE_SIZE sets the space limitations for ccache. The default size is
-# 2G, or 2 gigabytes.  Units are specified with 'G', 'M', or 'K'.
+# CCACHE_SIZE sets the space limitations for ccache. The default size depends
+# on ccache itself; see the -M flag in the ccache(1) man page for details.
 #
-#CCACHE_SIZE=512M
+#CCACHE_SIZE=5GiB
 #
 # CCACHE_DIR sets the ccache path.  If not specified, portage will default
 # to ${PORTAGE_TMPDIR}/ccache.

diff --git a/man/make.conf.5 b/man/make.conf.5
index 298eb80..a7417f3 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -122,8 +122,8 @@ man page for more information.
 Defaults to /var/tmp/ccache
 .TP
 \fBCCACHE_SIZE\fR = \fIsize\fR
-This controls the space use limitations for ccache.  The default is 2 gigabytes
-('2G').  Sizes are specified with 'G', 'M', or 'K'.
+This controls the space use limitations for ccache.  See the \fI\-M\fR flag in
+the \fBccache\fR(1) man page for more information.
 .TP
 .B CFLAGS CXXFLAGS
 Use these variables to set the desired optimization/CPU instruction settings



[gentoo-commits] proj/portage:master commit in: cnf/, man/

2015-05-14 Thread Mike Frysinger
commit: d85f5c8c38c0dd296ef09b4b34bb40e20e84f2a8
Author: Mike Frysinger vapier AT gentoo DOT org
AuthorDate: Thu May 14 10:47:45 2015 +
Commit: Mike Frysinger vapier AT gentoo DOT org
CommitDate: Thu May 14 10:49:11 2015 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=d85f5c8c

make.conf: point people to ccache(1) for cache size details

Rather than duplicate documentation for how ccache's -M flag behaves,
point people directly to the ccache(1) man page for details.

Also increase the default to 5GiB to better match current ccache.

X-Gentoo-Bug: 539510
X-Gentoo-Bug-url: https://bugs.gentoo.org/539510
Reported-by: Toralf Förster toralf.foerster AT gmx.de

 cnf/make.conf.example | 6 +++---
 man/make.conf.5   | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/cnf/make.conf.example b/cnf/make.conf.example
index 70384c6..b897f02 100644
--- a/cnf/make.conf.example
+++ b/cnf/make.conf.example
@@ -280,10 +280,10 @@
 # CCACHE_SIZE and CCACHE_DIR are used to control the behavior of ccache, and
 # and are only used if ccache is in FEATURES.
 #
-# CCACHE_SIZE sets the space limitations for ccache. The default size is
-# 2G, or 2 gigabytes.  Units are specified with 'G', 'M', or 'K'.
+# CCACHE_SIZE sets the space limitations for ccache. The default size depends
+# on ccache itself; see the -M flag in the ccache(1) man page for details.
 #
-#CCACHE_SIZE=512M
+#CCACHE_SIZE=5GiB
 #
 # CCACHE_DIR sets the ccache path.  If not specified, portage will default
 # to ${PORTAGE_TMPDIR}/ccache.

diff --git a/man/make.conf.5 b/man/make.conf.5
index 298eb80..a7417f3 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -122,8 +122,8 @@ man page for more information.
 Defaults to /var/tmp/ccache
 .TP
 \fBCCACHE_SIZE\fR = \fIsize\fR
-This controls the space use limitations for ccache.  The default is 2 gigabytes
-('2G').  Sizes are specified with 'G', 'M', or 'K'.
+This controls the space use limitations for ccache.  See the \fI\-M\fR flag in
+the \fBccache\fR(1) man page for more information.
 .TP
 .B CFLAGS CXXFLAGS
 Use these variables to set the desired optimization/CPU instruction settings



[gentoo-commits] proj/portage:master commit in: cnf/, pym/_emerge/

2015-05-04 Thread Zac Medico
commit: 8018584e78fa8b2714122eb2fda8488c94e7cc77
Author: Zac Medico zmedico AT gentoo DOT org
AuthorDate: Sun May  3 19:18:16 2015 +
Commit: Zac Medico zmedico AT gentoo DOT org
CommitDate: Mon May  4 06:26:48 2015 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=8018584e

PORTAGE_XATTR_EXCLUDE: preserve security.capability (bug 548516)

Also, fix BinpkgExtractorAsync tar options to preserve
security.capability attributes.

X-Gentoo-Bug: 548516
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=548516
Acked-by: Brian Dolbec dolsen AT gentoo.org

 cnf/make.globals| 6 --
 pym/_emerge/BinpkgExtractorAsync.py | 5 -
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/cnf/make.globals b/cnf/make.globals
index dd99618..82d8cc1 100644
--- a/cnf/make.globals
+++ b/cnf/make.globals
@@ -123,9 +123,11 @@ PORTAGE_ELOG_MAILFROM=portage@localhost
 PORTAGE_GPG_SIGNING_COMMAND=gpg --sign --digest-algo SHA256 --clearsign --yes 
--default-key \\${PORTAGE_GPG_KEY}\ --homedir \\${PORTAGE_GPG_DIR}\ 
\\${FILE}\
 
 # btrfs.* attributes are irrelevant, see bug #527636.
-# Security labels are special, see bug #461868.
+# security.* attributes may be special (see bug 461868), but
+# security.capability is specifically not excluded (bug 548516).
 # system.nfs4_acl attributes are irrelevant, see bug #475496.
-PORTAGE_XATTR_EXCLUDE=btrfs.* security.* system.nfs4_acl
+PORTAGE_XATTR_EXCLUDE=btrfs.* security.evm security.ima
+   security.selinux system.nfs4_acl
 
 #*
 #**  DO NOT EDIT THIS FILE  **

diff --git a/pym/_emerge/BinpkgExtractorAsync.py 
b/pym/_emerge/BinpkgExtractorAsync.py
index 6aaa448..0bf3c74 100644
--- a/pym/_emerge/BinpkgExtractorAsync.py
+++ b/pym/_emerge/BinpkgExtractorAsync.py
@@ -23,7 +23,10 @@ class BinpkgExtractorAsync(SpawnProcess):
process = subprocess.Popen([tar, --help], 
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
output = process.communicate()[0]
if b--xattrs in output:
-   tar_options = --xattrs
+   tar_options = [--xattrs, 
--xattrs-include='*']
+   for x in 
portage.util.shlex_split(self.env.get(PORTAGE_XATTR_EXCLUDE, )):
+   
tar_options.append(portage._shell_quote(--xattrs-exclude=%s % x))
+   tar_options =  .join(tar_options)
 
decomp_cmd = _decompressors.get(
compression_probe(self.pkg_path))



[gentoo-commits] proj/portage:master commit in: cnf/

2015-03-10 Thread Zac Medico
commit: ff3c131aeee6f053a6f9a706c1f1be279696c957
Author: Marc Schiffbauer mschiff AT gentoo DOT org
AuthorDate: Tue Mar 10 16:23:52 2015 +
Commit: Zac Medico zmedico AT gentoo DOT org
CommitDate: Tue Mar 10 17:51:50 2015 +
URL:https://gitweb.gentoo.org/proj/portage.git/commit/?id=ff3c131a

dispatch-conf.conf: less-opts --quit-if-one-screen for bug 501886

Use --quit-if-one-screen instead of --QUIT-AT-EOF, so that less doesn't
quit automatically when the user has scrolled to the bottom.

X-Gentoo-Bug: 501886
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=501886
Signed-off-by: Zac Medico zmedico AT gentoo.org
Acked-by: Brian Dolbec dolsen AT gentoo.org

 cnf/dispatch-conf.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cnf/dispatch-conf.conf b/cnf/dispatch-conf.conf
index 125b7cc..7efce8a 100644
--- a/cnf/dispatch-conf.conf
+++ b/cnf/dispatch-conf.conf
@@ -31,7 +31,7 @@ diff=diff -Nu '%s' '%s'
 pager=
 
 # Default options used if less is the pager
-less-opts=--no-init --QUIT-AT-EOF
+less-opts=--no-init --quit-if-one-screen
 
 # Diff for interactive merges.
 # %s output file



[gentoo-commits] proj/portage:master commit in: cnf/repo.postsync.d/, /

2014-12-06 Thread Brian Dolbec
commit: ddf87266433247e1ec9aa90b8ffab99a240be7e4
Author: Michał Górny mgorny AT gentoo DOT org
AuthorDate: Fri Dec  5 16:12:17 2014 +
Commit: Brian Dolbec brian.dolbec AT gmail DOT com
CommitDate: Sun Dec  7 05:39:22 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ddf87266

Install a verbose example repo.postsync.d script

Brian Dolbec dolsen AT gentoo.org: Move the example to repo.postsync.d.
Remove the final hook run else section for the new independant repo.postsync.d 
directory.
Reword comments for the changes.

---
 cnf/repo.postsync.d/example | 51 +
 setup.py|  1 +
 2 files changed, 52 insertions(+)

diff --git a/cnf/repo.postsync.d/example b/cnf/repo.postsync.d/example
new file mode 100644
index 000..533bf71
--- /dev/null
+++ b/cnf/repo.postsync.d/example
@@ -0,0 +1,51 @@
+#!/bin/sh
+# Example /etc/portage/repo.postsync.d script. Make it executable (chmod +x) 
for
+# Portage to process it.
+#
+# With portage-2.2.16 and newer, all repo.postsync.d hooks will be called 
multiple
+# times after syncing each repository.
+#
+# Older versions of Portage support syncing only one repository.
+# In those versions, the postsync.d hooks will be called only once,
+# and they will not be passed any parameters.
+
+# On a repo.postsync.d hook call, positional parameters contain
+# information about the just-synced repository.
+
+# Your hook can control it's actions depending on any of the three
+# parameters passed in to it.
+#
+# They are as follows:
+#
+# The repository name.
+repository_name=${1}
+# The URI to which the repository was synced.
+sync_uri=${2}
+# The path to the repository.
+repository_path=${3}
+
+# Portage assumes that a hook succeeded if it exits with 0 code. If no
+# explicit exit is done, the exit code is the exit code of last spawned
+# command. Since our script is a bit more complex, we want to control
+# the exit code explicitly.
+ret=0
+
+if [ -n ${repository_name} ]; then
+   # Repository name was provided, so we're in a post-repository hook.
+   echo * In post-repository hook for ${repository_name}
+   echo ** synced from remote repository ${sync_uri}
+   echo ** synced into ${repository_path}
+
+   # Gentoo comes with pregenerated cache but the other repositories
+   # usually don't. Generate them to improve performance.
+   if [ ${repository_name} != gentoo ]; then
+   if ! egencache --update --repo=${repository_name} --jobs=4
+   then
+   echo !!! egencache failed!
+   ret=1
+   fi
+   fi
+fi
+
+# Return explicit status.
+exit ${ret}

diff --git a/setup.py b/setup.py
index 4388a99..440cbba 100755
--- a/setup.py
+++ b/setup.py
@@ -629,6 +629,7 @@ setup(
['$portage_setsdir', ['cnf/sets/portage.conf']],
['$docdir', ['NEWS', 'RELEASE-NOTES']],
['$portage_base/bin', ['bin/deprecated-path']],
+   ['$sysconfdir/portage/repo.postsync.d', 
['cnf/repo.postsync.d/example']],
],
 
cmdclass = {



[gentoo-commits] proj/portage:master commit in: cnf/

2014-11-01 Thread Zac Medico
commit: 2fcdb5f36face97b4a8ce74831d287bd1dd9c2bf
Author: Zac Medico zmedico AT gentoo DOT org
AuthorDate: Sat Nov  1 20:55:34 2014 +
Commit: Zac Medico zmedico AT gentoo DOT org
CommitDate: Sun Nov  2 02:53:43 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2fcdb5f3

Add btrfs.* to default PORTAGE_XATTR_EXCLUDE (527636)

In bug #527636 a user reported that install-xattr failed to copy
btrfs.compression attributes when doins was installing a file from
$FILESDIR. It is unlinkly that a package will have a valid use for
btrfs.* attributes when installing files to $D. Therefore, exclude
btrfs.* attributes in order to avoid reports like this in the
future.

X-Gentoo-Bug: 527636
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=527636
Acked-by: Brian Dolbec dolsen AT gentoo.org

---
 cnf/make.globals | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cnf/make.globals b/cnf/make.globals
index 013c556..dd99618 100644
--- a/cnf/make.globals
+++ b/cnf/make.globals
@@ -122,9 +122,10 @@ PORTAGE_ELOG_MAILFROM=portage@localhost
 # Signing command used by repoman
 PORTAGE_GPG_SIGNING_COMMAND=gpg --sign --digest-algo SHA256 --clearsign --yes 
--default-key \\${PORTAGE_GPG_KEY}\ --homedir \\${PORTAGE_GPG_DIR}\ 
\\${FILE}\
 
+# btrfs.* attributes are irrelevant, see bug #527636.
 # Security labels are special, see bug #461868.
 # system.nfs4_acl attributes are irrelevant, see bug #475496.
-PORTAGE_XATTR_EXCLUDE=security.* system.nfs4_acl
+PORTAGE_XATTR_EXCLUDE=btrfs.* security.* system.nfs4_acl
 
 #*
 #**  DO NOT EDIT THIS FILE  **