[PATCH 2/2] acl-permissions: Document FreeBSD ACL_TYPE_NFS4 acls

2015-07-05 Thread Andreas Gruenbacher
* lib/set-permissions.c (set_acls): Document where support for FreeBSD ACL_TYPE_NFS4 acls should go. * lib/get-permissions.c (get_permissions): Likewise. --- lib/get-permissions.c | 6 ++ lib/set-permissions.c | 9 + 2 files changed, 15 insertions(+) diff --git a/lib/get-permissions.c

[PATCH 1/2] acl-permissions: Fix on FreeBSD

2015-07-05 Thread Andreas Gruenbacher
When a directory doesn't have an ACL_TYPE_DEFAULT acl, acl_get_file will return an empty acl, but when trying to set that acl, FreeBSD's acl_set_file will fail with errno == EINVAL. Instead, FreeBSD expects acl_delete_def_file to be used. * lib/acl-internal.c (acl_default_nontrivial): Recognize em

[PATCH] acl-permissions: Fix build on Mac OS X and older AIX (Bug#20681)

2015-05-29 Thread Andreas Gruenbacher
/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2015-05-29 Andreas Gruenbacher + acl-permissions: Fix build on Mac OS X and older AIX (Bug#20681) + * lib/set-permissions.c (set_acls): Fix more errors introduced in the acl + module rewrite. + acl-permissions: Fix build on Solaris

[PATCH] acl-permissions: Fix build on Solaris and Cygwin

2015-05-29 Thread Andreas Gruenbacher
Reported by Tom G. Christensen : * lib/set-permissions.c (set_acls): The count, entries, ace_count, and ace_entries variables have moved into struct permission_context but they were still accessed as local vraiables here. --- lib/set-permissions.c | 12 ++-- 1 file changed, 6 insertions(+)

[GNULIB v2 0/2] Improved acl handling

2015-05-26 Thread Andreas Gruenbacher
Hello, these are the remaining two gnulib patches from the patch set originally posted on 12 April. These patches (and the richacl patches on top) are also available here: https://github.com/andreas-gruenbacher/gnulib https://github.com/andreas-gruenbacher/coreutils On the coreutils side

[GNULIB v2 2/2] qacl: Reimplement qset_acl and qcopy_acl

2015-05-26 Thread Andreas Gruenbacher
Implement get_permissions and set_permissions primitives for getting all the permissions of a file, storing them, and later setting them. (In the minimal case, the permissions consist only of a file mode.) Reimplement qset_acl and qcopy_acl based on these new primitives: this avoids code duplicatio

[GNULIB v2 1/2] file-has-acl: Split feature tests again

2015-05-26 Thread Andreas Gruenbacher
b/file-has-acl.c | 15 +-- m4/acl.m4 | 24 +--- 3 files changed, 27 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 960eec3..c5100ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2015-04-28 Andreas Gruenbacher + + fi

[COREUTILS 1/2] build: updated gnulib acl handling

2015-04-12 Thread Andreas Gruenbacher
This changes how ls checks for acls on Linux (it no longer requires libacl) and rewrites how acls are set and copied between files. * gnulib: Update to latest. * gl/lib/tempname.c.diff: Adjust for gnulib changes. * gl/lib/tempname.h.diff: Likewise. * src/local.mk (src_ls_LDADD): Only link with th

[GNULIB 0/4] Improved acl handling

2015-04-12 Thread Andreas Gruenbacher
setting permissions and implements set_acl and copy_acl based on these primitives; a lot of the mess in the original code disappears. These patches (and the richacl patches on top) are available here: https://github.com/andreas-gruenbacher/gnulib I will follow up with the necessary coreutils

[GNULIB 3/4] qacl: Simplify HP-UP acl_nontrivial check

2015-04-12 Thread Andreas Gruenbacher
* lib/acl-internal.c: Remove struct stat parameter from HP-UX's version of acl_nontrivial. Check if the acl has at most three entries instead (it must have exactly three entries according to the HP-UX documentation). Ignore uids and gids as long as an entry is either for a user (i.e., the owner), a

[COREUTILS 2/2] ls: Don't treat lack of acl support as an error

2015-04-12 Thread Andreas Gruenbacher
* src/ls.c (file_has_acl_cache): When a file system doesn't support acls, fail with errno set to ENOTSUP. (gobble_file): Don't treat lack of acl support as an error. --- src/ls.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/ls.c b/src/ls.c index b308dd3..884e

[GNULIB 1/4] acl, qacl: split off shared functions into separate object file

2015-04-12 Thread Andreas Gruenbacher
Some of the helper functions in file-has-acl.c are used from qcopy-acl.c while file_has_acl() isn't needed there. Split the shared functions off into acl-internal.c. * lib/file-has-acl.c: Remove helper functions here. * lib/acl-internal.c: Add helper functions here. * modules/qacl: Use acl-intern

[GNULIB 4/4] qacl: Reimplement qset_acl and qcopy_acl

2015-04-12 Thread Andreas Gruenbacher
Implement get_permissions and set_permissions primitives for getting all the permissions of a file, storing them, and later setting them. (In the minimal case, the permissions consist only of a file mode.) Reimplement qset_acl and qcopy_acl based on these new primitives: this avoids code duplicatio

[COREUTILS 0/2] Improved acl handling

2015-04-12 Thread Andreas Gruenbacher
Hello, here are the simple changes for pulling in the gnulib acl handling improvements into coreutils. These patches (and the richacl patches on top) are available here: https://github.com/andreas-gruenbacher/coreutils I have tested the code with and without ACL support on Linux. The code

[GNULIB 2/4] acl: On Linux, check for acls without libacl

2015-04-12 Thread Andreas Gruenbacher
On Linux, use the getxattr syscall instead of the acl_extended_file libacl library function to check for the presence of acls, avoiding a library dependency. * lib/file-has-acl.c: Include xattr headers if we have them. (file_has_acl): On Linux, use getxattr(). * m4/acl.m4 (gl_FUNC_ACL): Define LIB

[PATCH] tempname: new try_tempname function

2015-02-03 Thread Andreas Gruenbacher
From: Andreas Gruenbacher 2015-02-03 2:11 GMT+01:00 Paul Eggert : > Thanks, one further suggestion. The above can be simplified to: > > if (__lxstat64 (_STAT_VER, tmpl, &st) == 0) > __set_errno (EEXIST); > return errno == ENOENT ? 0 : -1; Here's one (hopefull

[PATCH] Add missing header files

2015-02-01 Thread Andreas Gruenbacher
Reported at https://savannah.gnu.org/bugs/index.php?44151: * lib/symlinkat.c: Add for fstatat() and string.h for strlen(). --- lib/symlinkat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/symlinkat.c b/lib/symlinkat.c index ce10d94..ec85114 100644 --- a/lib/symlinkat.c +++ b/lib/syml

[PATCH] tempname: new try_tempname function

2015-01-31 Thread Andreas Gruenbacher
The way how gen_tempname() creates files is not always sufficient. For example, it may make sense to create directories when creating the temporary file or directory fails with errno set to ENOENT. Add a try_tempname() variant of gen-tempname() that allows to do all that, and implement gen_tempnam

[PATCH] tempname: new try_tempname function

2015-01-31 Thread Andreas Gruenbacher
The way how gen_tempname() creates files is not always sufficient. For example, it may make sense to create directories when creating the temporary file or directory fails with errno set to ENOENT. Add a try_tempname() variant of gen-tempname() that allows to do all that and implement gen_tempname

Re: [bug-patch] patch on x86-interix

2011-05-26 Thread Andreas Gruenbacher
On Thursday 26 May 2011 10:43:41 Markus Duft wrote: > On 05/25/11 22:43, Bruno Haible wrote: > > [CCing bug-gnulib] > > > > Markus Duft wrote in > > : > >> For quite a while now, i have patch working on x86-interix with a small > >

Re: [PATCH 1/4] Avoid an 'empty declaration' / 'extraneous semicolon' warning

2010-04-27 Thread Andreas Gruenbacher
On Tuesday 27 April 2010 23:38:47 Eric Blake wrote: > Do you have commit rights to gnulib yet? No ... and judging from how things went the last time, getting the additional paperwork done would probably take months on our end :) Andreas

Re: [PATCH 4/4] Use AM_MISSING_PROG when making bison the default YACC here

2010-04-27 Thread Andreas Gruenbacher
On Wednesday 28 April 2010 00:15:59 Bruno Haible wrote: > Hi Andreas, > > > * m4/bison.m4 (gl_BISON): We need to use AM_MISSING_PROG for making > > bison the default YACC or else packages cannot be built without bison. > ># getdate.y works with bison only. > > - : ${YACC='bison -y'} > > Can

Re: [PATCH 3/4] Avoid a stupid 'const object should have initializer' warning

2010-04-27 Thread Andreas Gruenbacher
On Wednesday 28 April 2010 00:00:35 Bruno Haible wrote: > Andreas Gruenbacher wrote: > > diff --git a/lib/getdate.y b/lib/getdate.y > > index 445865b..dcfe3cc 100644 > > --- a/lib/getdate.y > > +++ b/lib/getdate.y > > @@ -152,7 +152,7 @@ typedef struct > > #

Re: [PATCH 2/4] Avoid an utimes(2) warning

2010-04-27 Thread Andreas Gruenbacher
On Tuesday 27 April 2010 23:56:34 Bruno Haible wrote: > Hi Andreas, > > > * lib/utimens.c: On some systems, the timestamp parameter of > > utimens(2) is not declared as a const *; avoid warnings in that case. > > You mean the parameter of futimesat(), futimes(), lutimes()? I know that utimes() i

Re: [PATCH 3/4] Avoid a stupid 'const object should have initializer' warning

2010-04-27 Thread Andreas Gruenbacher
On Tuesday 27 April 2010 23:42:07 Eric Blake wrote: > On 04/27/2010 03:24 PM, Andreas Gruenbacher wrote: > > * lib/getdate.y (RELATIVE_TIME_0): Avoid a stupid 'const object should > > have initializer' warning. > > > > @@ -152,7 +152,7 @@ typedef s

Re: [PATCH 2/4] Avoid an utimes(2) warning

2010-04-27 Thread Andreas Gruenbacher
On Tuesday 27 April 2010 23:41:08 Eric Blake wrote: > On 04/27/2010 03:23 PM, Andreas Gruenbacher wrote: > > * lib/utimens.c: On some systems, the timestamp parameter of > > utimens(2) is not declared as a const *; avoid warnings in that case. > > utimes(2), not utimens(2).

[PATCH 3/4] Avoid a stupid 'const object should have initializer' warning

2010-04-27 Thread Andreas Gruenbacher
* lib/getdate.y (RELATIVE_TIME_0): Avoid a stupid 'const object should have initializer' warning. Signed-off-by: Andreas Gruenbacher --- ChangeLog |3 +++ lib/getdate.y |2 +- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6743cc

[PATCH 1/4] Avoid an 'empty declaration' / 'extraneous semicolon' warning

2010-04-27 Thread Andreas Gruenbacher
* lib/canonicalize-lgpl.c: Avoid an 'empty declaration' / 'extraneous semicolon' warning with some compilers. Signed-off-by: Andreas Gruenbacher --- ChangeLog |5 + lib/canonicalize-lgpl.c |2 ++ 2 files changed, 7 insertions(+), 0 deletions(-) di

[PATCH 4/4] Use AM_MISSING_PROG when making bison the default YACC here

2010-04-27 Thread Andreas Gruenbacher
* m4/bison.m4 (gl_BISON): We need to use AM_MISSING_PROG for making bison the default YACC or else packages cannot be built without bison. Signed-off-by: Andreas Gruenbacher --- ChangeLog |3 +++ m4/bison.m4 |4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a

[PATCH 2/4] Avoid an utimes(2) warning

2010-04-27 Thread Andreas Gruenbacher
* lib/utimens.c: On some systems, the timestamp parameter of utimens(2) is not declared as a const *; avoid warnings in that case. Signed-off-by: Andreas Gruenbacher --- ChangeLog |3 +++ lib/utimens.c |4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog

[PATCH 0/4] A few portability fixes

2010-04-27 Thread Andreas Gruenbacher
Hello, here are a few fixes for getting rid of warnings on Solaris and Tru64: the first three are just for avoiding warnings; the last one is an actual bug fix. Thanks, Andreas Andreas Gruenbacher (4): Avoid an 'empty declaration' / 'extraneous semicolon' warning Avoid

[PATCH] Use "git -h" in bootstrap instead of "git --help"

2010-04-19 Thread Andreas Gruenbacher
ydra.nixos.org/, which by default doesn't have man installed.) Grep for the full option name in the summary, too. Signed-off-by: Andreas Gruenbacher --- ChangeLog |7 +++ build-aux/bootstrap |4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Chang

Re: diffseq: Introduce EQUAL_IDX for comparing indexes instead of elements

2010-04-18 Thread Andreas Gruenbacher
On Monday 19 April 2010 00:04:54 Bruno Haible wrote: > I'm applying this instead. It should be trivial for you to update > patch/src/merge.c accordingly. Sure, your modified version does the same job. Thanks, Andreas

Re: diffseq: Introduce EQUAL_IDX for comparing indexes instead of elements

2010-04-18 Thread Andreas Gruenbacher
On Sunday 18 April 2010 16:13:01 Andreas Gruenbacher wrote: > Hello, > > here is a change to diffseq whcih I need in GNU patch: patch has a historic > feature called "plan B" for when only little memory is available; it then > doesn't load the entire patch and file

diffseq: Introduce EQUAL_IDX for comparing indexes instead of elements

2010-04-18 Thread Andreas Gruenbacher
ined instead of EQUAL, do not assume that the x and y vectors are directly accessible as xvec and yvec. Use EQUAL_IDX() instead of EQUAL() to compare vector elements. Signed-off-by: Andreas Gruenbacher --- lib/diffseq.h | 28 1 files changed, 20 insertions(+), 8 del

Re: [PATCH] Really update the git index to avoid false -dirty versions

2010-04-12 Thread Andreas Gruenbacher
On Monday 12 April 2010 19:38:07 Jim Meyering wrote: > Andreas Gruenbacher wrote: > > > On Monday 12 April 2010 18:25:01 Jim Meyering wrote: > >> Can you describe a scenario in which > >> using "git update-index --refresh" makes > >> git-version-ge

Re: [PATCH] Really update the git index to avoid false -dirty versions

2010-04-12 Thread Andreas Gruenbacher
On Monday 12 April 2010 18:25:01 Jim Meyering wrote: > Can you describe a scenario in which > using "git update-index --refresh" makes > git-version-gen work better than with "git status"? > In the example I tried (touch an unmodified, vc'd file), > they appear to have the same net effect. I can't

[PATCH] Really update the git index to avoid false -dirty versions

2010-04-12 Thread Andreas Gruenbacher
* build-aux/git-version-gen: Use git update-index here; git status will leave the index outdated. --- build-aux/git-version-gen |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen index 16da2a8..e754c77 100755 --- a/buil

Re: [bug-patch] Re: GNU patch 2.6.1 fails to build on IRIX

2010-01-15 Thread Andreas Gruenbacher
On Friday 15 January 2010 14:26:41 Eric Blake wrote: > [adding bug-patch] > > According to Stuart Shelton on 1/14/2010 9:47 AM: > > On IRIX (and, indeed, any platform without strnlen() or strndup()), > > Hmm. 'gnulib-tool --with-tests --create-testdir --dir=dir xstrndup', then > configuring that

Re: [bug-patch] GNU Patch 2.6.1 fails to build on Darwin

2010-01-13 Thread Andreas Gruenbacher
Hello, On Monday 11 January 2010 02:45:41 pm Ludovic Courtès wrote: > Hello, > > Patch 2.6.1 fails to build on Darwin with Apple’s “GCC” [0]: does the latest version on ftp://alpha.gnu.org/gnu/patch/ work for you? Thanks, Andreas