Your message dated Sun, 10 Jun 2012 17:15:33 +0000
with message-id <[email protected]>
and subject line Bug#676572: fixed in metastore 1+20080623+debian-3
has caused the Debian Bug report #676572,
regarding metastore: Extended attributes without value aren't handled properly
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
676572: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=676572
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: metastore
Version: 1+20080623+debian-2
Severity: normal
Tags: upstream patch
Dear Maintainer,
Extended attributes without value make metastore print error and exit,
prematurely ending update of .metastore file, thus corrupting it in
almost all imaginable cases (as long as xattrs are used, of course).
The issue was originally reported by Todd A. Jacobs at launchpad:
https://bugs.launchpad.net/bugs/937306
Zak Wilcox prepared a fix (http://git.io/JZnLLA), which I slightly
modified and commited to my repo, as David's one is defunct atm:
https://github.com/przemoc/metastore/commit/f75ca58c96
[ BTW my repo has debian changes already merged in and one new feature:
option allowing .git directories traversal. ]
Regards,
Przemysław Pawełczyk
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages metastore depends on:
ii libc6 2.13-32
metastore recommends no packages.
metastore suggests no packages.
-- no debconf information
>From f75ca58c96bba3f4d7294aec031bd9300f278e9f Mon Sep 17 00:00:00 2001
From: Zak Wilcox <[email protected]>
Date: Tue, 29 May 2012 14:09:22 +0200
Subject: [PATCH 1/2] Fix false error when writing zero-length records.
Quoting Todd A. Jacobs, https://bugs.launchpad.net/bugs/937306:
DATA LOSS WARNING: Using metastore in its current condition can lead to
loss of metadata. See below for details.
First of all, metastore provides confusing and useless feedback to the
user when storing extended attributes without defined values. To
consistently re-create this problem:
$ touch foo
$ setfattr -n user.bar foo
$ metastore -s foo
Failed to write to file: Success
$ echo $?
1
The error message and exit status imply the operation has failed, but it
has not--at least, not completely. You can see that metastore *appears*
to have succeeded as follows:
$ rm foo
$ touch foo
$ metastore -a foo
./foo: changing metadata
./foo: adding xattr user.bar
$ echo $?
0
$ getfattr -d foo
# file: foo
user.bar
So, the .metadata file seems to contains all the correct information,
but it provides this contradictory and cryptic error message to the user
on save. However, the .metadata file *is* actually broken, but you only
see it when saving multiple extended attributes where at least one of
them has no defined value.
$ rm foo; rm .metadata
$ touch foo
$ setfattr -n user.bar foo
$ setfattr -n user.baz -v quux foo
$ getfattr -d foo
# file: foo
user.bar
user.baz="quux"
$ metastore -s foo
Failed to write to file: Success
$ echo $?
1
$ rm foo
$ touch foo
$ metastore -a
Attempt to read beyond end of file, corrupt file?
$ echo $?
1
So, there are really two things that need fixing:
1. The incredibly cryptic error message on save.
What is the actual error condition it is trying to report?
2. The proper handling of extended attributes without values.
Signed-off-by: Przemyslaw Pawelczyk <[email protected]>
---
utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils.c b/utils.c
index d9ac4cf..a96e56e 100644
--- a/utils.c
+++ b/utils.c
@@ -109,7 +109,7 @@ binary_print(const char *s, ssize_t len)
void
xfwrite(const void *ptr, size_t size, FILE *stream)
{
- if (fwrite(ptr, size, 1, stream) != 1) {
+ if (size && fwrite(ptr, size, 1, stream) != 1) {
msg(MSG_CRITICAL, "Failed to write to file: %s\n",
strerror(errno));
exit(EXIT_FAILURE);
--
1.7.10
--- End Message ---
--- Begin Message ---
Source: metastore
Source-Version: 1+20080623+debian-3
We believe that the bug you reported is fixed in the latest version of
metastore, which is due to be installed in the Debian FTP archive:
metastore_1+20080623+debian-3.debian.tar.gz
to main/m/metastore/metastore_1+20080623+debian-3.debian.tar.gz
metastore_1+20080623+debian-3.dsc
to main/m/metastore/metastore_1+20080623+debian-3.dsc
metastore_1+20080623+debian-3_amd64.deb
to main/m/metastore/metastore_1+20080623+debian-3_amd64.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Romain Francoise <[email protected]> (supplier of updated metastore package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Sun, 10 Jun 2012 17:42:59 +0200
Source: metastore
Binary: metastore
Architecture: source amd64
Version: 1+20080623+debian-3
Distribution: unstable
Urgency: low
Maintainer: Romain Francoise <[email protected]>
Changed-By: Romain Francoise <[email protected]>
Description:
metastore - Store and restore metadata from a filesystem
Closes: 676572
Changes:
metastore (1+20080623+debian-3) unstable; urgency=low
.
* Handle xattrs with empty value correctly; thanks to Przemysław Pawełczyk
(closes: #676572, LP: #937306).
* Switch to debhelper compat level 9.
* Enable all hardening options.
* Don't overwrite environment CFLAGS, use CPPFLAGS.
* Bump Standards-Version to 3.9.3, no changes needed.
Checksums-Sha1:
6ae06f01386faf6abdeed232ec6c17a0d48352cc 1225 metastore_1+20080623+debian-3.dsc
fa1df21eef9fe0998a9a95acfaaa96469df0c8ed 3936
metastore_1+20080623+debian-3.debian.tar.gz
0ce50bea6ee22c3c03a8ca323d0e037bf78fdc5e 17116
metastore_1+20080623+debian-3_amd64.deb
Checksums-Sha256:
662e208c0861331225fe1c772c9ddde242c023a94dfcfd15ba90447bf90b343c 1225
metastore_1+20080623+debian-3.dsc
f4e7244709df909c2aec8a63e535d3c4e41bd7211bb82827e58ea69a23400441 3936
metastore_1+20080623+debian-3.debian.tar.gz
881e4de3eae8149e38124c0066b9fa745ba525c5b3718367fdd696f03aa3dc3f 17116
metastore_1+20080623+debian-3_amd64.deb
Files:
339fa879b0df7ba380babf5f14bf2e9a 1225 misc optional
metastore_1+20080623+debian-3.dsc
2cdd90583780c1631a5e81cbcdea1eff 3936 misc optional
metastore_1+20080623+debian-3.debian.tar.gz
c0c6c48ed20364cd1dcb68efd6ee4522 17116 misc optional
metastore_1+20080623+debian-3_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAk/UxfUACgkQogN2vsA8Vt8xvwCdFy+/LeVSmr9/dAh3LUd78CGg
K0gAn1QA0vs6IPXynN9WjfwTmgdloRjh
=P1vW
-----END PGP SIGNATURE-----
--- End Message ---