Summary: | sysutils/coreutils: gcp fails to set default ACL which causes OOo make failure | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | jau |
Component: | Individual Port(s) | Assignee: | freebsd-openoffice (Nobody) <openoffice> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | ||
Priority: | Normal | ||
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
jau
2006-12-27 08:20:12 UTC
State Changed From-To: open->feedback To which port does this PR apply? Responsible Changed From-To: freebsd-ports-bugs->linimon State Changed From-To: feedback->open Feedback received. Responsible Changed From-To: linimon->freebsd-ports-bugs >ports/107229: sysutils/coreutils: gcp fails to set default ACL which causes
>OOo make failure
Try the coreutils upgrade in PR ports/107954 first. If that doesn't
help, try debugging the problem with getfacl(1) and setfacl(1).
After that, try asking on the coreutils mailing list(s).
This problem still exists. The update to coreutils 6.7 does nothing to solve it. Now asking the coreutils mailing list. Quoting Mathias Picker:
>
> This problem still exists. The update to coreutils 6.7 does nothing to
> solve it. Now asking the coreutils mailing list.
Apparently the problem is that gcp tries to set the default
ACL also on non-directory files.
The current FreeBSD manual pages explain that default ACLs
are only allowed for directories. And since default a ACL is
something a new file or directory created under an existing
directory should inherit by default as their initial ACLs,
this makes perfect sense.
The correct behaviour for gcp would be to either
- not even try to set the default ACL for anything else but
directories or
- ignore the error returned unless the target is a directory.
Apparently some other environments allow setting default ACLs
for non-directory files and quietly ignore the issue, though,
setting the default value makes no sense, because other files
can inherit their initial ACLs only from the defaults set to
their parent directories.
Cheers,
// jau
.--- ..- -.- -.- .- .- .-.-.- ..- -.- -.- --- -. . -.
/ Jukka A. Ukkonen, Oxit Ltd, Finland
/__ M.Sc. (sw-eng & cs) (Phone) +358-500-606-671
/ Internet: Jukka.Ukkonen(a)Oxit.Fi (Home) +358-9-6215-280
/ Internet: jau(a)iki.fi
v
.--- .- ..- ...-.- .. -.- .. .-.-.- ..-. ..
+ + + + My opinions are mine and mine alone, not my employers. + + + +
This problem is caused by the following conditions. - preserve permissions. (-p) - copy a directory. (-r) - source directory have no default acl. at copy_acl in lib/acl.c acl_get_file return a zero count acl if a source directory have no default acl.(acl->ats_acl.acl_cnt == 0) acl_set_file return with error EINVAL, if acl is zero count. In this case, /bin/cp is not copy default acl. at preserve_dir_acls in src/bin/cp/util.c if (aclp->acl_cnt != 0 && aclsetf(dest_dir, ACL_TYPE_DEFAULT, acl) < 0) { fix patch following --- lib/acl.c~ Tue Sep 26 00:52:29 2006 +++ lib/acl.c Fri Mar 23 16:34:24 2007 @@ -280,7 +280,7 @@ return -1; } - if (acl_set_file (dst_name, ACL_TYPE_DEFAULT, acl)) + if (acl->ats_acl.acl_cnt > 0 && acl_set_file (dst_name, ACL_TYPE_DEFAULT, acl)) { error (0, errno, _("preserving permissions for %s"), quote (dst_name)); Responsible Changed From-To: freebsd-ports-bugs->lwhsu Since I took 111489, I'll take this. Hello, Please take a look at ports/111489: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/111489 Does upgrading to version 6.9 solve this issue? If so, I will close this PR, and commit ports/111489. Thanks in advanced. -- Best Regards, Li-Wen Hsu State Changed From-To: open->feedback Waiting for feedback. State Changed From-To: feedback->closed ports/111489 has been committed, and it's feeedback timeout on this PR. Please tell me if the problem still occurs, I'll reopen this PR. Hello. This problem still exist. I upgrade sysutils/coreutils 6.7 to 6.9, and building editors/openoffice-2 2.2.0_1. It was stopped with following errors. You can delete ./unxfbsdi.pro/inc to force it copy all include files again. /usr/local/bin/gcp -pRL ./unxfbsdi.pro/misc/build/mozilla/dist/include/* ./unxfbsdi.pro/inc /usr/local/bin/gcp: preserving permissions for `./unxfbsdi.pro/inc/addrbook': Invalid argument . . . /usr/local/bin/gcp: preserving permissions for `./unxfbsdi.pro/inc/zlib': Invalid argument dmake: Error code 3, while making './unxfbsdi.pro/misc/build/so_moz_include_files' '---* tg_merge.mk *---' ERROR: Error 65280 occurred while making /usr/ports/editors/openoffice.org-2/work/OOF680_m14/moz dmake: Error code 1, while making 'build_instsetoo_native' '---* *---' *** Error code 255 Stop in /usr/ports/editors/openoffice.org-2. State Changed From-To: closed->open The problem still occurs. hasi@cskk-sv.co.jp is right. copy_acl() from coreutils assumes acl_set_file() is linux one, which has an extension over posix1e to accept zero sized default ACL. FreeBSD's acl_set_file() doesn't do that (see base cp code). --- lib/acl.c.orig Mon Jul 16 11:03:58 2007 +++ lib/acl.c Mon Jul 16 11:32:49 2007 @@ -129,7 +129,14 @@ return -1; } - if (acl_set_file (dst_name, ACL_TYPE_DEFAULT, acl)) + /* From Linux acl_set_file(3) manpage: + " The behavior of acl_set_file() when the acl parameter refers + to an empty ACL and the type parameter is ACL_TYPE_DEFAULT + is an extension in the Linux implementation, in order that + all values returned by acl_get_file() can be passed to + acl_set_file(). " + /* Zero size ACL should be checked, like in /usr/src/bin/cp/utils.c:396 */ + if (acl->ats_acl.acl_cnt != 0 && acl_set_file (dst_name, ACL_TYPE_DEFAULT, acl)) { error (0, errno, _("preserving permissions for %s"), quote (dst_name)); State Changed From-To: open->feedback Ask for maintainer approval. People in freebsd-openoffice@freebsd.org keep asking... Is maintainer alive? Responsible Changed From-To: lwhsu->openoffice Maintainer seems gone, and I think it's best to let openoffice people to decide whether committing this patch or not. OpenOffice still fails to compile. Is anyone looking into this? Who is the contact in OO team who can apply this patch? Yuri State Changed From-To: feedback->open . State Changed From-To: open->feedback Could you please test if this issue still exists with an fresh ports tree? Thanks for your report. State Changed From-To: feedback->closed I think this is fixed in coreutils-7.5 (current version of coreutils port) |