Re: [gentoo-dev] Need ARM/AArch64 test data for cpuid2cpuflags

2019-09-10 Thread Michał Górny
On Tue, 2019-09-10 at 22:44 +0200, Michał Górny wrote:
> Hi, everyone.
> 
> I've recently (finally!) started adding tests to cpuid2cpuflags.  Tests
> are based on mocked syscalls that return arch-specific data read from
> text files.  So far I've got x86 and ppc covered, and now I'd like to
> add tests for various arm hardware.  Since ARM covers a pretty broad
> range of hardware, I'd use as much data as possible, especially from
> different ARM generations.
> 
> If you have an ARM board and would like to help, please:
> 
> wget https://dev.gentoo.org/~mgorny/dist/cpuid2cpuflags-7-dev.tar.bz2
> tar -xf cpuid2cpuflags-7-dev.tar.bz2
> cd cpuid2cpuflags-7-dev
> ./configure
> make hwcap-dump
> ./hwcap-dump
> 
> and send me the output along with 'uname -m'.  TIA!
> 

I'm sorry but sending it this late, I forgot two more important things:

1. Name of the CPU or the board (i.e. something I can use to name
the test).

2. Output of cpuid2cpuflags, preferably verified against cpuinfo.

-- 
Best regards,
Michał Górny



signature.asc
Description: This is a digitally signed message part


[gentoo-portage-dev] [PATCH] x11-module-rebuild: support SYMLINK_LIB=no (bug 693980)

2019-09-10 Thread Zac Medico
Use a lib* glob to support SYMLINK_LIB=no.

Bug: https://bugs.gentoo.org/693980
Signed-off-by: Zac Medico 
---
 cnf/sets/portage.conf |  2 +-
 lib/portage/_sets/__init__.py |  2 +-
 lib/portage/_sets/dbapi.py| 15 ---
 3 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/cnf/sets/portage.conf b/cnf/sets/portage.conf
index 38c50a647..0d11d7891 100644
--- a/cnf/sets/portage.conf
+++ b/cnf/sets/portage.conf
@@ -76,7 +76,7 @@ files = /lib/modules
 # excluding the package that owns /usr/bin/Xorg.
 [x11-module-rebuild]
 class = portage.sets.dbapi.OwnerSet
-files = /usr/lib/xorg/modules
+files = /usr/lib*/xorg/modules
 exclude-files = /usr/bin/Xorg
 
 # Binary packages that have a different build time from a currently
diff --git a/lib/portage/_sets/__init__.py b/lib/portage/_sets/__init__.py
index 7b81c55e2..a569b273b 100644
--- a/lib/portage/_sets/__init__.py
+++ b/lib/portage/_sets/__init__.py
@@ -142,7 +142,7 @@ class SetConfig(object):
parser.remove_section("x11-module-rebuild")
parser.add_section("x11-module-rebuild")
parser.set("x11-module-rebuild", "class", 
"portage.sets.dbapi.OwnerSet")
-   parser.set("x11-module-rebuild", "files", 
"/usr/lib/xorg/modules")
+   parser.set("x11-module-rebuild", "files", 
"/usr/lib*/xorg/modules")
parser.set("x11-module-rebuild", "exclude-files", 
"/usr/bin/Xorg")
 
def update(self, setname, options):
diff --git a/lib/portage/_sets/dbapi.py b/lib/portage/_sets/dbapi.py
index 5d78fd1d3..5c600ec9e 100644
--- a/lib/portage/_sets/dbapi.py
+++ b/lib/portage/_sets/dbapi.py
@@ -1,8 +1,9 @@
-# Copyright 2007-2014 Gentoo Foundation
+# Copyright 2007-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 from __future__ import division
 
+import glob
 import re
 import time
 
@@ -67,11 +68,19 @@ class OwnerSet(PackageSet):
 
def mapPathsToAtoms(self, paths, exclude_paths=None):
"""
-   All paths must begin with a slash, must include EPREFIX, and
-   must not include ROOT.
+   All paths must begin with a slash, and must not include EROOT.
+   Supports globs.
"""
rValue = set()
vardb = self._db
+
+   eroot = vardb.settings['EROOT']
+   expanded_paths = []
+   for p in paths:
+   expanded_paths.extend(expanded_p[len(eroot)-1:] for 
expanded_p in
+   glob.iglob(os.path.join(eroot, 
p.lstrip(os.sep
+   paths = expanded_paths
+
pkg_str = vardb._pkg_str
if exclude_paths is None:
for link, p in vardb._owners.iter_owners(paths):
-- 
2.21.0




Re: [gentoo-dev] Use acct-* for qmail users

2019-09-10 Thread Michael Orlitzky
On 9/10/19 4:25 PM, Rolf Eike Beer wrote:
> 
> I'm not entirely sure. It's what qmail always has done and what the eclass 
> also did.
> 

This is suggested by the qmail documentation,

  http://lifewithqmail.org/lwq.html#create-users

...but goes back to at least 1998, and likely earlier. I grepped the
source and don't see any obvious uses of $HOME. It was probably
suggested by DJB simply because it's a directory, and guaranteed to
exist on the various platforms that qmail supported at the time.

It would be best if someone who runs qmail could change them all to
/dev/null and see if anything breaks. The home directory is already
unwritable, and none of the users have shells, so I'm optimistic.

At present, the following code is repeated six times,

  ACCT_USER_HOME=/var/qmail
  ACCT_USER_HOME_OWNER=root:qmail
  ACCT_USER_HOME_PERMS=0755
  ACCT_USER_GROUPS=( nofiles )

and you have to keep them in sync for eternity. It would be less
error-prone if you could create that directory (and /var/qmail/alias)
only once, in the qmail ebuild, since that's the package that uses those
directories.



[gentoo-dev] Need ARM/AArch64 test data for cpuid2cpuflags

2019-09-10 Thread Michał Górny
Hi, everyone.

I've recently (finally!) started adding tests to cpuid2cpuflags.  Tests
are based on mocked syscalls that return arch-specific data read from
text files.  So far I've got x86 and ppc covered, and now I'd like to
add tests for various arm hardware.  Since ARM covers a pretty broad
range of hardware, I'd use as much data as possible, especially from
different ARM generations.

If you have an ARM board and would like to help, please:

wget https://dev.gentoo.org/~mgorny/dist/cpuid2cpuflags-7-dev.tar.bz2
tar -xf cpuid2cpuflags-7-dev.tar.bz2
cd cpuid2cpuflags-7-dev
./configure
make hwcap-dump
./hwcap-dump

and send me the output along with 'uname -m'.  TIA!

-- 
Best regards,
Michał Górny



signature.asc
Description: This is a digitally signed message part


Re: [gentoo-dev] Use acct-* for qmail users

2019-09-10 Thread Rolf Eike Beer
Am Dienstag, 10. September 2019, 21:14:51 CEST schrieb Mike Gilbert:
> On Tue, Sep 10, 2019 at 11:48 AM Rolf Eike Beer  wrote:
> > I have created a PR here that removes manual creation of users and groups
> > from qmail.eclass and uses acct-* for that. There are already fixed uids
> > and gids for these things, I just put them into ebuilds:
> > 
> > https://github.com/gentoo/gentoo/pull/12898
> 
> Do the users actually need home directories?
> 
> Please see Michael Orlitzky's proposed guidelines.
> 
> https://archives.gentoo.org/gentoo-dev/message/fc55ac57cd92d9c1e156d13c882b0
> 8cf

I'm not entirely sure. It's what qmail always has done and what the eclass 
also did.


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] Use acct-* for qmail users

2019-09-10 Thread Mike Gilbert
On Tue, Sep 10, 2019 at 11:48 AM Rolf Eike Beer  wrote:
>
> I have created a PR here that removes manual creation of users and groups from
> qmail.eclass and uses acct-* for that. There are already fixed uids and gids
> for these things, I just put them into ebuilds:
>
> https://github.com/gentoo/gentoo/pull/12898

Do the users actually need home directories?

Please see Michael Orlitzky's proposed guidelines.

https://archives.gentoo.org/gentoo-dev/message/fc55ac57cd92d9c1e156d13c882b08cf



Re: [gentoo-dev] rfc: go 1.13 and go modules

2019-09-10 Thread Kent Fredric
On Tue, 10 Sep 2019 13:31:01 -0500
William Hubbs  wrote:

> It looks like we would also need a way to honor the GOPROXY environment
> variable as well.

Or ... mirror://goproxy/



pgpSON8XaRx39.pgp
Description: OpenPGP digital signature


Re: [gentoo-dev] rfc: go 1.13 and go modules

2019-09-10 Thread William Hubbs
On Mon, Sep 09, 2019 at 06:21:42PM -0500, William Hubbs wrote:
> On Mon, Sep 09, 2019 at 03:57:18PM -0700, Georgy Yakovlev wrote:
> > On Monday, September 9, 2019 2:46:16 PM PDT William Hubbs wrote:
> > > On Tue, Sep 10, 2019 at 08:35:17AM +1200, Kent Fredric wrote:
> > > > On Mon, 9 Sep 2019 12:34:18 -0500
> > > > 
> > > > William Hubbs  wrote:
> > > > > There is another option I want to try which is adding "go mod vendor" 
> > > > > to
> > > > > src_unpack for go packages.
> > > > 
> > > > Is it infeasible to write a tool that you execute as a maintainer, that
> > > > simulates what "go mod vendor" would do, but instead emits a list of
> > > > entries for SRC_URI, and then have an eclass or something construct the
> > > > vendor dir from those?
> > > > 
> > > > That's what is available for rust stuff.
> > > 
> > > I'm not sure how feasible something like that is.
> > > 
> > > $ go list -m all
> > > 
> > > will list the dependencies of a module, but that doesn't look like it
> > > can be translated into src_uri format.
> > > 
> > > You would basically have to parse go.mod exactly the way upstream does
> > > it and come up with a way to download the correct versions of the
> > > source.
> > > 
> > > William
> > 
> > check mail-client/aerc ebuild.
> > I use "go list -m all" and manually format EGO_VENDOR string which will be 
> > translated into SRC_URI by eclass.
> > tool is certainly possible and should be quite easy to implement.
> > some manual editing will still be needed if dealing with forked packages/
> > repos, but looks pretty straightforward.
> > This is very similar approach to cargo ebuilds and it supports offline 
> > installs, PM checksumming and does not require packaging every single go 
> > dependency as a package.
> 
> Ok, I took a quick look at this.
> We will need another eclass similar to the golang-vcs-snapshot eclass,
> but it doesn't need to mess with GOPATH since GOPATH isn't used by go
> modules.
> 
> I will also look at go list -m all and see what comes out of it.

It looks like we would also need a way to honor the GOPROXY environment
variable as well.

Thanks,

William


signature.asc
Description: Digital signature


[gentoo-dev] Use acct-* for qmail users

2019-09-10 Thread Rolf Eike Beer
I have created a PR here that removes manual creation of users and groups from 
qmail.eclass and uses acct-* for that. There are already fixed uids and gids 
for these things, I just put them into ebuilds:

https://github.com/gentoo/gentoo/pull/12898

signature.asc
Description: This is a digitally signed message part.