GNOME Bugzilla – Bug 705893
ostree commit: error: No data available
Last modified: 2013-08-14 05:56:33 UTC
When trying to commit a Fedora base tree, I get this: # ostree --repo=repo commit --subject 'Fedora 19 base' -b fedora/x86_64 --tree=dir=/data/build/ostree/fedora error: No data available This is my first commit to a repo created with: # ostree --repo=repo init The directory tree I'm adding was created with: yum -y --releasever=19 --nogpg --installroot=/srv/mycontainer --dis ablerepo='*' --enablerepo=fedora install systemd passwd yum fedora-release vim-m inimal
Failure happens during: lxgetattr("/data/build/ostree/fedora/var/log/journal" ...) in read_xattr_name_array() This is a directory: /data/build/ostree/fedora/var/log/journal # ls -l /data/build/ostree/fedora/var/log/ total 24 drwxr-xr-x+ 2 root root 4096 14. Jun 16:24 journal read_xattr_name_array() is trying to read an attirbute called: security.selinuxsystem.posix_acl_accesssystem.posix_acl_default
Created attachment 251495 [details] [review] Properly separate sorted xattr names We expect to be handling a string delimited by \0 characters, as returned by llistxattr(). So stick to that behavior here.
Created attachment 251496 [details] [review] Don't use XATTR_REPLACE with lsetxattr() If we pass XATTR_REPLACE then the attribute must already exist, which is not our intent. Passing zero creates the attribute if necessary, or replaces it when it already exists.
Created attachment 251497 [details] [review] Add some verbose log output when xattr functions fail If any of the system xattr functions fail, clearly write out the reason in the verbose log output.
Review of attachment 251495 [details] [review]: Ah yes, you can tell the xattr code is not well tested =(
Review of attachment 251496 [details] [review]: Looks right, thanks!
Review of attachment 251497 [details] [review]: ::: src/libostree/ostree-core.c @@ +190,1 @@ ot_util_set_error_from_errno (error, errno); I'd prefer doing this as g_prefix_error() instead; you can see those inconsistently scattered about the code. Although the argument list is probably overkill; just something like: g_prefix_error (error, "lgetxattr(%s) failed: ", path);
(In reply to comment #0) > When trying to commit a Fedora base tree, I get this: BTW, see also: http://fedorapeople.org/cgit/walters/public_git/fedora-ostree.git Briefly mentioned here: https://mail.gnome.org/archives/ostree-list/2013-June/msg00001.html
Attachment 251495 [details] pushed as c246c41 - Properly separate sorted xattr names Attachment 251496 [details] pushed as 3f9c150 - Don't use XATTR_REPLACE with lsetxattr() Attachment 251497 [details] pushed as 9794737 - Add some verbose log output when xattr functions fail Made the suggested changes to the logging of xattr functions.