[gentoo-dev] [PATCH] l10n.eclass: Update for unexpanded LINGUAS.

2017-12-29 Thread Ulrich Müller
---
This is meant to be merged after removal of LINGUAS from USE_EXPAND.

Any packages inheriting l10n.eclass but not using any of its functions
(i.e. relying only on the global scope snippet that adds linguas_* USE
flags) will be updated at the same time.

 eclass/l10n.eclass | 40 +---
 1 file changed, 21 insertions(+), 19 deletions(-)

diff --git a/eclass/l10n.eclass b/eclass/l10n.eclass
index 2283088d0d0a..d60f7befd0d2 100644
--- a/eclass/l10n.eclass
+++ b/eclass/l10n.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: l10n.eclass
@@ -12,8 +12,7 @@
 # conveniently handle localizations (translations) offered by packages.
 # These are meant to prevent code duplication for such boring tasks as
 # determining the cross-section between the user's set LINGUAS and what
-# is offered by the package; and generating the right list of linguas_*
-# USE flags.
+# is offered by the package.
 
 # @ECLASS-VARIABLE: PLOCALES
 # @DEFAULT_UNSET
@@ -33,11 +32,6 @@
 #
 # Example: PLOCALE_BACKUP="en_US"
 
-# Add linguas useflags
-for u in ${PLOCALES}; do
-   IUSE+=" linguas_${u}"
-done
-
 # @FUNCTION: l10n_for_each_locale_do
 # @USAGE: 
 # @DESCRIPTION:
@@ -103,19 +97,27 @@ l10n_find_plocales_changes() {
 # @FUNCTION: l10n_get_locales
 # @USAGE: [disabled]
 # @DESCRIPTION:
-# Determine which LINGUAS USE flags the user has enabled that are offered
-# by the package, as listed in PLOCALES, and return them. In case no locales
-# are selected, fall back on PLOCALE_BACKUP. When the disabled argument is
-# given, return the disabled useflags instead of the enabled ones.
+# Determine which LINGUAS the user has enabled that are offered by the
+# package, as listed in PLOCALES, and return them.  In case no locales
+# are selected, fall back on PLOCALE_BACKUP.  When the disabled argument
+# is given, return the disabled locales instead of the enabled ones.
 l10n_get_locales() {
local disabled_locales enabled_locales loc locs
-   for loc in ${PLOCALES}; do
-   if use linguas_${loc}; then
-   enabled_locales+="${loc} "
-   else
-   disabled_locales+="${loc} "
-   fi
-   done
+   if [[ -z ${LINGUAS+set} ]]; then
+   # enable all if unset
+   enabled_locales=${PLOCALES}
+   elif [[ -z ${LINGUAS} ]]; then
+   # disable all if empty
+   disabled_locales=${PLOCALES}
+   else
+   for loc in ${PLOCALES}; do
+   if has ${loc} ${LINGUAS}; then
+   enabled_locales+="${loc} "
+   else
+   disabled_locales+="${loc} "
+   fi
+   done
+   fi
if [[ ${1} == disabled ]]; then
locs=${disabled_locales}
else
-- 
2.15.1


pgptfG1IRTZhY.pgp
Description: PGP signature


[gentoo-dev] Dropping stable USE flags for 4.14

2017-12-29 Thread Alice Ferrazzi
Hello,

We have recently started the stabilization of gentoo-sources-4.14.8.

Very soon we received reports regarding broken e1000e driver [1] and moved
to gentoo-sources-4.14.8-r1.

Since then we keep receiving new problems related to 4.14.x kernel:

- IPSec is broken [2]

- Change in 4.14.9 broke nVIDIA driver [3]

- Colors on console are broken with some Radeon HD cards [4]

- BUG report on boot [5]

- Unbootable system with CONFIG_MCORE2 [6]

- ...more bugs [7]

While not all issues are present in gentoo-sources-4.14.8-r1 we are
concerned about the current stability/quality of the 4.14.x branch in
general and don't feel comfortable recommending 4.14.x branch for general
use at the moment. But that's what a stable USE flag means for most
Gentoo users.

So, for now, we have decided to drop gentoo-sources-4.14.x stable keywords.
We will keep watching 4.14 branch and once the stability/quality matches
our requirements we will restart stabilization.

Keep in mind: We are only dropping stable USE flags. If
gentoo-sources-4.14.x works for you and you want to keep it, just keyword
the package on your own!

[1] https://bugs.gentoo.org/641818

[2] https://bugs.gentoo.org/642454

[3] http://lkml.iu.edu/hypermail/linux/kernel/1712.3/00099.html

[4] https://bugzilla.kernel.org/show_bug.cgi?id=198273

[5] https://lkml.org/lkml/2017/12/25/177

[6] https://bugs.gentoo.org/642268

[7] 
https://bugzilla.kernel.org/buglist.cgi?bug_status=NEW_status=ASSIGNED_status=REOPENED=cf_kernel_version=equals_format=advanced=4.14.8

-- 
Thanks,
Alice Ferrazzi

Gentoo Kernel Project Leader
Gentoo Foundation Board Member
Mail: Alice Ferrazzi 
PGP: 2E4E 0856 461C 0585 1336 F496 5621 A6B2 8638 781A



Re: [gentoo-dev] Dropping stable USE flags for 4.14

2017-12-29 Thread Toralf Förster
On 12/29/2017 02:58 PM, Alice Ferrazzi wrote:
> While not all issues are present in gentoo-sources-4.14.8-r1 we are
> concerned about the current stability/quality of the 4.14.x branch in

4.14.9 prevents both my desktop and my server from being boot, hangs
very early in the process before dmesg could start.

Tried to bisect itm, w/o too much success, would have much more
difficulties to bisect the remote headless server.

Whilst both systems boot now again (I mainly had to switch to the
generic CPU instead the Intel MCORE2 config option and removed few extra
sanity chekcs and the GCC plugin and so on) I second you about the
quality of the current 4.1.4.X tree, especially for X>=9.

I complaint already at the LKML.


-- 
Toralf
PGP 23217DA7 9B888F45




signature.asc
Description: OpenPGP digital signature


Re: [gentoo-portage-dev] [PATCH] bin/doins.py: implement install -p option (bug 642632)

2017-12-29 Thread Mike Gilbert
On Fri, Dec 29, 2017 at 3:35 PM, Zac Medico  wrote:
> +   if self._parsed_options.preserve_timestamps:
> +   if sys.version_info >= (3, 3):
> +   os.utime(dest, ns=(sstat.st_mtime_ns, 
> sstat.st_mtime_ns))
> +   else:
> +   os.utime(dest, (sstat.st_mtime, 
> sstat.st_mtime))

It looks like you are copying mtime into both mtime and atime on the
new file. Is that a mistake?



Re: [gentoo-dev] Dropping stable USE flags for 4.14

2017-12-29 Thread Andreas K. Huettel
Am Freitag, 29. Dezember 2017, 15:46:03 CET schrieb Toralf Förster:
> On 12/29/2017 02:58 PM, Alice Ferrazzi wrote:
> > While not all issues are present in gentoo-sources-4.14.8-r1 we are
> > concerned about the current stability/quality of the 4.14.x branch in
> 

I'd suggest dropping stable for 4.12 too for the moment and instead 
stabilizing newest 4.9. 

(I had some hard crashes of my laptop with 4.12... since then running 4.9 
everywhere and very happy with it...)

-- 
Dr. Andreas K. Hüttel
tel. +49 151 241 67748 (mobile)
e-mail m...@akhuettel.de
http://www.akhuettel.de/

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


[gentoo-portage-dev] [PATCH] bin/doins.py: implement install -p option (bug 642632)

2017-12-29 Thread Zac Medico
Bug: https://bugs.gentoo.org/642632
---
 bin/doins.py| 13 ++---
 pym/portage/tests/bin/test_doins.py |  4 ++--
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/bin/doins.py b/bin/doins.py
index 92e450979..dceffee83 100644
--- a/bin/doins.py
+++ b/bin/doins.py
@@ -107,6 +107,7 @@ def _parse_install_options(
parser.add_argument('-g', '--group', default=-1, type=_parse_group)
parser.add_argument('-o', '--owner', default=-1, type=_parse_user)
parser.add_argument('-m', '--mode', default=0o755, type=_parse_mode)
+   parser.add_argument('-p', '--preserve-timestamps', action='store_true')
split_options = shlex.split(options)
namespace, remaining = parser.parse_known_args(split_options)
# Because parsing '--mode' option is partially supported. If unknown
@@ -168,7 +169,8 @@ class _InsInProcessInstallRunner(object):
True on success, otherwise False.
"""
dest = os.path.join(dest_dir, os.path.basename(source))
-   if not self._is_install_allowed(source, dest):
+   sstat = os.stat(source)
+   if not self._is_install_allowed(source, sstat, dest):
return False
 
# To emulate the `install` command, remove the dest file in
@@ -187,6 +189,11 @@ class _InsInProcessInstallRunner(object):
movefile._copyxattr(
source, dest,
exclude=self._xattr_exclude)
+   if self._parsed_options.preserve_timestamps:
+   if sys.version_info >= (3, 3):
+   os.utime(dest, ns=(sstat.st_mtime_ns, 
sstat.st_mtime_ns))
+   else:
+   os.utime(dest, (sstat.st_mtime, 
sstat.st_mtime))
except Exception:
logging.exception(
'Failed to copy file: '
@@ -195,13 +202,14 @@ class _InsInProcessInstallRunner(object):
return False
return True
 
-   def _is_install_allowed(self, source, dest):
+   def _is_install_allowed(self, source, source_stat, dest):
"""Returns if installing source into dest should work.
 
This is to keep compatibility with the `install` command.
 
Args:
source: path to the source file.
+   source_stat: stat result for the source file.
dest: path to the dest file.
 
Returns:
@@ -210,7 +218,6 @@ class _InsInProcessInstallRunner(object):
# To match `install` command, use stat() for source, while
# lstat() for dest. Raise an exception if stat(source) fails,
# intentionally.
-   source_stat = os.stat(source)
try:
dest_lstat = os.lstat(dest)
except OSError as e:
diff --git a/pym/portage/tests/bin/test_doins.py 
b/pym/portage/tests/bin/test_doins.py
index 14d7adfa6..dd40abf6e 100644
--- a/pym/portage/tests/bin/test_doins.py
+++ b/pym/portage/tests/bin/test_doins.py
@@ -38,7 +38,7 @@ class DoIns(setup_env.BinTestCase):
self.init()
try:
env = setup_env.env
-   env['INSOPTIONS'] = '-m0644'
+   env['INSOPTIONS'] = '-pm0644'
with open(os.path.join(env['S'], 'test'), 'w'):
pass
doins('test')
@@ -145,7 +145,7 @@ class DoIns(setup_env.BinTestCase):
env = setup_env.env
# Use an option which doins.py does not know.
# Then, fallback to `install` command is expected.
-   env['INSOPTIONS'] = '-p'
+   env['INSOPTIONS'] = '-b'
with open(os.path.join(env['S'], 'test'), 'w'):
pass
doins('test')
-- 
2.13.6




Re: [gentoo-dev] [PATCH 1/1] profiles: drop USE=cracklib from base/make.defaults.

2017-12-29 Thread William Hubbs
On Thu, Dec 28, 2017 at 05:42:19PM -0500, Michael Orlitzky wrote:
> We now have IUSE="+cracklib" in sys-apps/shadow, sys-auth/pambase, and
> sys-libs/pam (thanks robbat2).
> 
> Does that address everyone's concerns?
> 
> Enough so that I can revert the revert without anyone reverting the
> revert revert?

I would say go ahead and revert the revert.

William



signature.asc
Description: Digital signature


Re: [gentoo-portage-dev] [PATCH] bin/doins.py: implement install -p option (bug 642632)

2017-12-29 Thread Zac Medico
On 12/29/2017 02:13 PM, Mike Gilbert wrote:
> On Fri, Dec 29, 2017 at 3:35 PM, Zac Medico  wrote:
>> +   if self._parsed_options.preserve_timestamps:
>> +   if sys.version_info >= (3, 3):
>> +   os.utime(dest, 
>> ns=(sstat.st_mtime_ns, sstat.st_mtime_ns))
>> +   else:
>> +   os.utime(dest, (sstat.st_mtime, 
>> sstat.st_mtime))
> 
> It looks like you are copying mtime into both mtime and atime on the
> new file. Is that a mistake?
> 

Yeah, that's fixed in v2.
-- 
Thanks,
Zac



[gentoo-portage-dev] [PATCH v2] bin/doins.py: implement install -p option (bug 642632)

2017-12-29 Thread Zac Medico
Bug: https://bugs.gentoo.org/642632
---
[PATCH v2] fix to copy atime, and split out _set_timestamps function

 bin/doins.py| 28 +---
 pym/portage/tests/bin/test_doins.py |  6 --
 2 files changed, 29 insertions(+), 5 deletions(-)

diff --git a/bin/doins.py b/bin/doins.py
index 92e450979..0d03d8fb2 100644
--- a/bin/doins.py
+++ b/bin/doins.py
@@ -107,6 +107,7 @@ def _parse_install_options(
parser.add_argument('-g', '--group', default=-1, type=_parse_group)
parser.add_argument('-o', '--owner', default=-1, type=_parse_user)
parser.add_argument('-m', '--mode', default=0o755, type=_parse_mode)
+   parser.add_argument('-p', '--preserve-timestamps', action='store_true')
split_options = shlex.split(options)
namespace, remaining = parser.parse_known_args(split_options)
# Because parsing '--mode' option is partially supported. If unknown
@@ -139,6 +140,24 @@ def _set_attributes(options, path):
os.chmod(path, options.mode)
 
 
+def _set_timestamps(source_stat, dest):
+   """Apply timestamps from source_stat to dest.
+
+   Args:
+   source_stat: stat result for the source file.
+   dest: path to the dest file.
+   """
+   os.utime(dest, (source_stat.st_atime, source_stat.st_mtime))
+
+
+if sys.version_info >= (3, 3):
+   def _set_timestamps_ns(source_stat, dest):
+   os.utime(dest, ns=(source_stat.st_atime_ns, 
source_stat.st_mtime_ns))
+
+   _set_timestamps_ns.__doc__ = _set_timestamps.__doc__
+   _set_timestamps = _set_timestamps_ns
+
+
 class _InsInProcessInstallRunner(object):
"""Implements `install` command behavior running in a process."""
 
@@ -168,7 +187,8 @@ class _InsInProcessInstallRunner(object):
True on success, otherwise False.
"""
dest = os.path.join(dest_dir, os.path.basename(source))
-   if not self._is_install_allowed(source, dest):
+   sstat = os.stat(source)
+   if not self._is_install_allowed(source, sstat, dest):
return False
 
# To emulate the `install` command, remove the dest file in
@@ -187,6 +207,8 @@ class _InsInProcessInstallRunner(object):
movefile._copyxattr(
source, dest,
exclude=self._xattr_exclude)
+   if self._parsed_options.preserve_timestamps:
+   _set_timestamps(sstat, dest)
except Exception:
logging.exception(
'Failed to copy file: '
@@ -195,13 +217,14 @@ class _InsInProcessInstallRunner(object):
return False
return True
 
-   def _is_install_allowed(self, source, dest):
+   def _is_install_allowed(self, source, source_stat, dest):
"""Returns if installing source into dest should work.
 
This is to keep compatibility with the `install` command.
 
Args:
source: path to the source file.
+   source_stat: stat result for the source file.
dest: path to the dest file.
 
Returns:
@@ -210,7 +233,6 @@ class _InsInProcessInstallRunner(object):
# To match `install` command, use stat() for source, while
# lstat() for dest. Raise an exception if stat(source) fails,
# intentionally.
-   source_stat = os.stat(source)
try:
dest_lstat = os.lstat(dest)
except OSError as e:
diff --git a/pym/portage/tests/bin/test_doins.py 
b/pym/portage/tests/bin/test_doins.py
index 14d7adfa6..9b6c55d85 100644
--- a/pym/portage/tests/bin/test_doins.py
+++ b/pym/portage/tests/bin/test_doins.py
@@ -38,13 +38,15 @@ class DoIns(setup_env.BinTestCase):
self.init()
try:
env = setup_env.env
-   env['INSOPTIONS'] = '-m0644'
+   env['INSOPTIONS'] = '-pm0644'
with open(os.path.join(env['S'], 'test'), 'w'):
pass
doins('test')
st = os.lstat(env['D'] + '/test')
if stat.S_IMODE(st.st_mode) != 0o644:
raise tests.TestCase.failureException
+   if os.stat(os.path.join(env['S'], 'test')).st_mtime != 
st.st_mtime:
+   raise tests.TestCase.failureException
finally:
self.cleanup()
 
@@ -145,7 +147,7 @@ class DoIns(setup_env.BinTestCase):
env = setup_env.env
# Use an option which doins.py does not know.
   

[gentoo-dev] Masking 4.12

2017-12-29 Thread Alice Ferrazzi
Hello,

We recently dropped the stable keywords for 4.14,
but 4.12 (the next stable in gentoo-sources) is no more
maintained from upstream.

The last update that 4.12 got from upstream was 2017-09-20,
and upstream is no more backporting security fixes since then.
Because of this, we will proceed to mask 4.12.

Keep in mind: If 4.14 works for you, you can keyword it and
continue to use it, if you need a more stable kernel, please
move to 4.9.

-- 
Thanks,
Alice Ferrazzi

Gentoo Kernel Project Leader
Gentoo Foundation Board Member
Mail: Alice Ferrazzi 
PGP: 2E4E 0856 461C 0585 1336 F496 5621 A6B2 8638 781A