[gentoo-dev] Re: rfc: adding sbin directories to PATH for all users

2015-11-26 Thread Duncan
Kristian Fiskerstrand posted on Wed, 25 Nov 2015 21:15:37 +0100 as
excerpted:

> On 11/25/2015 09:16 PM, Mike Gilbert wrote:
>> On Wed, Nov 25, 2015 at 2:23 PM, Michał Górny 
>> wrote:
>>> On Wed, 25 Nov 2015 11:18:34 -0800 Daniel Campbell 
>>> wrote:
 Maybe I'm missing something, but `df` is in /bin. Do you use
 something else to determine free space?
>>> 
>>> btrfs fi df
>> 
>> In thins case, upstream's build system installs everything in bindir,
>> which I override to /sbin. I think that's where the ebuild was
>> installing things when I inherited it from the previous maintainer.
>> 
>> If William's PATH proposal is not implemented, I would be happy to move
>> it all to /bin if so desired. Just file a bug.
> 
> If moving it in the first place, wouldn't it go to /usr/bin as not being
> essential to system?

It's essential to system, as btrfs device scan is needed before mounting 
a multi-device btrfs, and btrfs check is a an fsck that may be needed to 
fix a broken btrfs /usr/ mount.

Else reiserfsck, e2fsck, fsck itself, and others, should be in /usr/sbin, 
not in /sbin/.

btrfs is the general userspace binary.  Subcommands such as check and 
device scan require device privs and don't normally work when run as 
ordinary users, but some subcommands such as filesystem df don't need 
device privs and work just fine when run as ordinary users.

(Not that I particularly care about the topic of the thread in general, 
as here: /sbin -> bin, /usr -> ., so all four locations, /bin, /sbin,
/usr/bin, /usr/sbin, point to the same single /bin, and I no longer have 
to worry about which dir something's in, unless I'm checking the 
canonical path as installed by the package, for which equery belongs 
works nicely.  But I'm a btrs user and upstream btrfs list regular so I 
care about that angle, thus this reply. =:^)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman




Re: [gentoo-dev] Re: rfc: adding sbin directories to PATH for all users

2015-11-26 Thread Alan McKinnon
On 26/11/2015 17:03, Duncan wrote:
> Kristian Fiskerstrand posted on Wed, 25 Nov 2015 21:15:37 +0100 as
> excerpted:
> 
>> On 11/25/2015 09:16 PM, Mike Gilbert wrote:
>>> On Wed, Nov 25, 2015 at 2:23 PM, Michał Górny 
>>> wrote:
 On Wed, 25 Nov 2015 11:18:34 -0800 Daniel Campbell 
 wrote:
> Maybe I'm missing something, but `df` is in /bin. Do you use
> something else to determine free space?

 btrfs fi df
>>>
>>> In thins case, upstream's build system installs everything in bindir,
>>> which I override to /sbin. I think that's where the ebuild was
>>> installing things when I inherited it from the previous maintainer.
>>>
>>> If William's PATH proposal is not implemented, I would be happy to move
>>> it all to /bin if so desired. Just file a bug.
>>
>> If moving it in the first place, wouldn't it go to /usr/bin as not being
>> essential to system?
> 
> It's essential to system, as btrfs device scan is needed before mounting 
> a multi-device btrfs, and btrfs check is a an fsck that may be needed to 
> fix a broken btrfs /usr/ mount.
> 
> Else reiserfsck, e2fsck, fsck itself, and others, should be in /usr/sbin, 
> not in /sbin/.
> 
> btrfs is the general userspace binary.  Subcommands such as check and 
> device scan require device privs and don't normally work when run as 
> ordinary users, but some subcommands such as filesystem df don't need 
> device privs and work just fine when run as ordinary users.
> 
> (Not that I particularly care about the topic of the thread in general, 
> as here: /sbin -> bin, /usr -> ., so all four locations, /bin, /sbin,
> /usr/bin, /usr/sbin, point to the same single /bin, and I no longer have 
> to worry about which dir something's in, unless I'm checking the 
> canonical path as installed by the package, for which equery belongs 
> works nicely.  But I'm a btrs user and upstream btrfs list regular so I 
> care about that angle, thus this reply. =:^)


Picking a random (i.e. most recent) post to reply to.

I don't really care what the default PATH is, I always set it to my
liking anyway. I understand all the historical arguments but I don't
think they matter too much these days anymore as times and OSes do change.

I feel that the / vs /usr split is rather pointless on modern systems,
but I do like the bin vs sbin split because it makes my life easier
(which is the entire point of any env var when you think about it). When
working as a user I'd rather not have my tab completion results
cluttered with apps I have to be root to use properly.

I vote to leave things as they are, and I also vote for showing people
who don;t like it how to change $PATH

-- 
Alan McKinnon
alan.mckin...@gmail.com




Re: [gentoo-dev] rfc: adding sbin directories to PATH for all users

2015-11-26 Thread Peter Stuge
Mike Gilbert wrote:
> > I would like for us to discuss adding the sbin directories to PATH for
> > all users.
> 
> I support this idea. The distinction between bin and sbin is stupid.

I support it too FWIW.


//Peter



[gentoo-dev] New arches??

2015-11-26 Thread Andreas K. Huettel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512


Hi all, 

just curious, where did "riscv" come from

(and nios2, but that seem's to have been around for longer...)

Cheers

- -- 

Andreas K. Huettel
Gentoo Linux developer 
dilfri...@gentoo.org
http://www.akhuettel.de/

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.1

iQJ8BAEBCgBmBQJWV2DzXxSAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ0RkJDMzI0NjNBOTIwMDY5MTQ2NkMzNDBF
MTM4NkZEN0VGNEI1Nzc5AAoJEOE4b9fvS1d5as8QAI36V2fceFQcc8ZOVCGE4blk
HIzuCwBmqZ0eo2OhdleP+vtENi0986qj2SvtTBfH9gwBJSemWjjnPBn59m7+w/Kc
qswfbjOBW2xPheKunbd2SqjXKdWGOdF5bCf6tGfxJrkrmF90N2dKFFCNJOODU9xL
kEvClgKbJWb0i6Ni9zXBiDy6UKx4VRLBWUxvUTYreT0Zl0kHJPi1ZUGIbi6Jr45A
Pc/n1xs1W9ZKu1a1krO6ht/Cvm0CkeEd/A0p4Yil8CvE0g/xFJ6kUg2Ma6XWm+i8
5H7RDcG9SxjRqmje80pb/FAQNWfCpT5eWYzpoP21a0cSzCJCs4ywryxjDW1Qf3n0
VFp/bCyV3T99iiXsiaWxb0+3dc3a2cQ5K3l9avM1xwyWn65ODOa/IvxpnvxSj/16
bQwYHghVgz1Ln9sk+Xr879Bux5M9FB+Fa40Xf4o4GB1M2XsZ3UN3FvInkXrGeY1+
eMMtiBax6ezNLE/7ON7H0F02QLshfD2A8NJ2AoVU3gE81J6VrS6BGLarGh2nCtog
YpjXjPBbzahFHtCt6L3fl+T3DpbeZyAkplfNrZ4e6WWC2V9xpsw2J7gnmsGonH08
JADWFFZJ9qTm/P4HQvVYF0QS8B6wgThUIBrOScWzRFPh1Z3h4VMtYuT/YPckmsuX
fi/WvpczYjANMKvETZqY
=039W
-END PGP SIGNATURE-



Re: [gentoo-dev] [PATCH 03/29] python-utils-r1.eclass: Add missing ||die on file read

2015-11-26 Thread Michał Górny
On Wed, 25 Nov 2015 17:16:24 +0100
Michał Górny  wrote:

> On Sun, 22 Nov 2015 20:50:44 +0100
> Michał Górny  wrote:
> 
> > ---
> >  eclass/python-utils-r1.eclass | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
> > index 0a04e12..201b0c4 100644
> > --- a/eclass/python-utils-r1.eclass
> > +++ b/eclass/python-utils-r1.eclass
> > @@ -1038,12 +1038,12 @@ python_fix_shebang() {
> > local shebang i
> > local error= from=
> >  
> > -   IFS= read -r shebang <"${f}"
> > +   IFS= read -r shebang <"${f}" || die  
> 
> This gives failure for empty files. We need to revert it, and possibly
> find a better way of distinguishing I/O failure from 'no input' error.

Going to add two more patches, one of them fixing this.

-- 
Best regards,
Michał Górny



pgpRaFUlsXFdQ.pgp
Description: OpenPGP digital signature


[gentoo-dev] [PATCH 1/2] python-utils-r1.eclass: python_fix_shebang, skip empty files

2015-11-26 Thread Michał Górny
Skip empty files when traversing directories in python_fix_shebangs.
This prevents read from failing on them, and avoids opening them
unnecessarily.
---
 eclass/python-utils-r1.eclass | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 0a04e12..95689f6 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1030,9 +1030,12 @@ python_fix_shebang() {
 
local path f
for path; do
-   local any_correct any_fixed is_recursive
+   local any_correct any_fixed find_args is_recursive
 
-   [[ -d ${path} ]] && is_recursive=1
+   if [[ -d ${path} ]]; then
+   is_recursive=1
+   find_args=( -size +0c )
+   fi
 
while IFS= read -r -d '' f; do
local shebang i
@@ -1128,7 +1131,7 @@ python_fix_shebang() {
eerror "  requested impl: ${EPYTHON}"
die "${FUNCNAME}: conversion of incompatible 
shebang requested"
fi
-   done < <(find "${path}" -type f -print0 || die)
+   done < <(find "${path}" -type f "${find_args[@]}" -print0 || 
die)
 
if [[ ! ${any_fixed} ]]; then
eqawarn "QA warning: ${FUNCNAME}, ${path#${D}} did not 
match any fixable files."
-- 
2.6.3




[gentoo-dev] [PATCH 2/2] python-utils-r1.eclass: python_fix_shebang, accept symlink as parameter

2015-11-26 Thread Michał Górny
Add '-H' option to find to allow following symlinks passed as
parameters. This makes python_fix_shebang handle either file symlinks
passed directly, or directory symlinks passed directly for recursive
traversal. Both were currently ignored silently.
---
 eclass/python-utils-r1.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 95689f6..84a2588 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1131,7 +1131,7 @@ python_fix_shebang() {
eerror "  requested impl: ${EPYTHON}"
die "${FUNCNAME}: conversion of incompatible 
shebang requested"
fi
-   done < <(find "${path}" -type f "${find_args[@]}" -print0 || 
die)
+   done < <(find -H "${path}" -type f "${find_args[@]}" -print0 || 
die)
 
if [[ ! ${any_fixed} ]]; then
eqawarn "QA warning: ${FUNCNAME}, ${path#${D}} did not 
match any fixable files."
-- 
2.6.3




Re: [gentoo-dev] [PATCH 1/2] python-utils-r1.eclass: python_fix_shebang, skip empty files

2015-11-26 Thread Michał Górny
On Thu, 26 Nov 2015 23:30:08 +0100
Michał Górny  wrote:

> Skip empty files when traversing directories in python_fix_shebangs.
> This prevents read from failing on them, and avoids opening them
> unnecessarily.

Soo... this patch fixes failure with blueman but doesn't with
gnome-python-common-base. I'm going to debug that one later today.

-- 
Best regards,
Michał Górny



pgpYKsk28N3Jo.pgp
Description: OpenPGP digital signature