Re: refuse to update certain files upon extraction

Lasse Kliemann <[email protected]> Tue, 18 Mar 2008 16:23:00 +0100
Newsgroups gmane.comp.archivers.star.user
Message-ID <[email protected]>
--===============0046685896==
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="ZG5hGh9V5E9QzVHS"
Content-Disposition: inline


--ZG5hGh9V5E9QzVHS
Content-Type: multipart/mixed; boundary="pMCBjikF2xGw87uL"
Content-Disposition: inline


--pMCBjikF2xGw87uL
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* Message by -Joerg Schilling- from Tue 2008-03-18:

> The problem is a Linux kernel bug.
>=20
> Any other backup tool (like e.g. dump/restore) will run into the same pro=
blem
> as Linux did not update the timestamp from the directory=20
> "send-backup-test/log/supervise/".
>=20
> You need to send a bug-report against Linux and get a fix for this proble=
m....

I've already prepared a minimal example to prove this, see the attached=20
files. The ctime of `sub' changes the first time that `rename' is run, but=
=20
not the second. I also tried this on Solaris, and there the ctime is=20
updated after the second run of `rename'.

Lasse


--pMCBjikF2xGw87uL
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=run

#!/bin/sh

rm -fr sub new &&
mkdir sub &&
stat sub &&
sleep 2 &&
echo running rename &&
./rename a &&
stat sub &&
sleep 2 &&
echo running rename again &&
./rename b &&
stat sub

--pMCBjikF2xGw87uL
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="rename.c"
Content-Transfer-Encoding: quoted-printable

#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>

int main(int argc, char** argv) {
	int fd;

	fd =3D open("new", O_WRONLY | O_NDELAY | O_TRUNC | O_CREAT, 0644);=09
	write(fd, argv[1], 1);
	close(fd);
	rename("new", "sub/x");

	return 0;
}

--pMCBjikF2xGw87uL--

--ZG5hGh9V5E9QzVHS
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (GNU/Linux)

iQIcBAEBAgAGBQJH395UAAoJEFYll6N4nhdvIBoQAKzcM5s8AnHtwzEG65fvclic
Kvn7zVS8e2YSZdaWDZW3AkWcQcurwQpHVyFU0sD+vzlPPrrWkYd4DLlkrnsSjzfT
Mscdv7EeriUG/opVAHbgQ7ji2Pgllk7oTxQ5Vd3gDP9Mva4Kgy7OVxrhWYxx/8+R
9BR+qH+vuUDCywfUvV2a/Et8eMWQm2kfb/lkMAZ4Fh2l0yghlUG26dADD7VLIZu9
Q86wmBHZ0AhK74ETRJmNnjzQJvGwx82i4Dm1xdNrY1W8R6khkgV3tBUaHfg9JOWM
WhhiW7B/U/u9eX5dP4H13ofeK33uoWaQ4MaOs2/Z6L0Fk/XcApUHA+eVduYsRtiU
0lhdzTEwHFBv+3vlV2bxF+QKv7w/WB9sTyov5O0HURlZX/SUxOCWW63zqtPSzL5v
ly4MCAq8Xedt/wIQf6BLJyNlsTZfIS5Cxjtffg5PKu0ehDe6qfApNmTRiaW2cHNJ
h8ytBYgwta3KYEpLSm3EQXjlumVXLvS5Iis3LYt8ImiarVC4I23QttPCW6lsbkaP
jHU+sd5Cwy1sFOg6k5hFOiMKl4B0ihzVDE/AYcg+apAwytafcryAhHrRwtOECfMl
GoxpcM90Jqz2ETkjr9h5HrxF11offQ+1I3tllswf/V640L1xqD8xSnsibLOECN40
Hu48VsAPsck3xp+5vXKh
=sQSt
-----END PGP SIGNATURE-----

--ZG5hGh9V5E9QzVHS--

--===============0046685896==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Star-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/star-users

--===============0046685896==--