On 7 Apr 2010, at 3:06 AM, Robert Vogelgesang wrote:
On Mon, Apr 05, 2010 at 03:40:23PM -0700, Ian Ward Comfort wrote:
>
git://github.com/icomfort/cobbler.git fetch-repomd-safely
I know I'm nit-picking here.
In fetch-repomd-safely you are mentioning createrepo's -C option and
the mtime of repomd.xml, but this is not 100 % correct.
I'm currently investigating an issue with "cobbler reposync" when
configured to use "createrepo --update -C", please see cobbler trac
issue #579. Your fetch-repomd-safely probably won't fix this, but
on my "research" for #579 I've noticed the following:
"createrepo --update -C" checks the ctime, not the mtime of the files.
You're right. The man page for createrepo(8) mentions only
"timestamps"; I assumed mtime was intended, but the software actually
checks ctime.
The patch itself is still correct, and in fact I think the commit
message is, too, with the exception of s/mtime/ctime/. For whatever
reason (I haven't investigated) Cobbler's wget invocation clobbers the
file's ctime. [1]
I've pushed a revised branch to Github, which corrects the commit
message.
I don't known if there's a real reason for this, maybe this
is a
bug. "cobbler reposync" uses "chown -R" and "chmod -R 755"
to "fix"
ownership and the permissions of the repository, which totally
messes up the ctimes, but only after createrepo has finished. So
there's probably something more to fix to get "createrepo --update -
C" right.
Hm, that's unusual. We run with "-c cache -s sha --update -C" here,
on RHEL5.5, and mirroring works properly -- so far as we can tell --
with this and my other patches. Maybe you're seeing the problem fixed
by my createrepo-always branch?
[1] $ touch file &&
stat file | grep Change &&
sleep 1 &&
wget -q
http://www.google.com/ -O file &&
stat file | grep Change
Change: 2010-04-08 16:57:07.000000000 -0700
Change: 2010-04-08 16:57:08.000000000 -0700
--
Ian Ward Comfort <icomfort(a)stanford.edu>
Systems Team Lead, Academic Computing Services, Stanford University