PDA

View Full Version : Problem with createrepo for modified DVD ISO


Digimer
19th June 2010, 12:02 AM
Hi all,

I've been trying to create my own (minorly) custom distro for Fedora 13. All it really is is a custom kickstart and a changed up set of RPMs.

My problem is; I've added some RPMs and removed others, so I need to regenerate the files in dvd:/repodata to properly reflect what is in dvd:/Packages. I've tried various incantations of 'createrepo Packages/' but none seem to work. When I move the generated files into dvd:/repodata, roll the ISO, burn and install, the installer complains that the repo data is bad (sorry, I don't have the exact error at the moment).

So then, what is the magic incantation to properly regenerate the repodata for a modified Packages directory on a DVD?

Thanks!

Dies
19th June 2010, 01:09 AM
...
So then, what is the magic incantation to properly regenerate the repodata for a modified Packages directory on a DVD?


Unless I misunderstood, there isn't one. What you are trying to do wouldn't work even if the disk was rewritable...

Digimer
19th June 2010, 01:29 AM

Unless I misunderstood, there isn't one. What you are trying to do wouldn't work even if the disk was rewritable...

I thought it was fairly common to change the RPMs available in the 'Packages/' directory and re-roll the ISO. Isn't this, essentially, what Revisor and the like do? At some point, someone generates the contents of 'repodata/' when a new release or distro comes out, so it's certainly possible... Of course, I don't know *how*. :)

Digi

Dies
19th June 2010, 01:36 AM
I thought it was fairly common to change the RPMs available in the 'Packages/' directory and re-roll the ISO. Isn't this, essentially, what Revisor and the like do? At some point, someone generates the contents of 'repodata/' when a new release or distro comes out, so it's certainly possible... Of course, I don't know *how*. :)

Digi

That's why I said "Unless I misunderstood". ;)

It sounded to me like you made some changes, burned the DVD and then decided to regenerate repodata on the DVD itself, which of course is not possible.

If you're saying that createrepo failed when you ran it prior to creating the ISO then I guess we need to see your scripts/commands used, output from the failed command, etc.

glennzo
19th June 2010, 01:37 AM
Wouldn't you use something like createrepo --update ??

Digimer
19th June 2010, 01:59 AM
That's why I said "Unless I misunderstood". ;)

It sounded to me like you made some changes, burned the DVD and then decided to regenerate repodata on the DVD itself, which of course is not possible.

If you're saying that createrepo failed when you ran it prior to creating the ISO then I guess we need to see your scripts/commands used, output from the failed command, etc.

Sorry, I was doing all this on a copy of the ISO on my machine. I supposed I should have been cleared on that. :)

I mounted the ISO loopback, rsync'ed the contest to a work directory (inc. .discinfo and .treeinfo files), switched into that directory, removed some RPMs, replaced others with updated RPMs and added some new ones. I then ran 'createrepo -d Packages' which created the new directory 'Packages/repodata'. I moved those files into the original 'repodata' directory and re-rolled the ISO.

The main difference in that the pre-existing 'repodata' files had (signatures?) prefixed to their name:


[root@an-node02 an.f13]# ls -lah repodata/
total 14M
drwxr-sr-x. 2 digimer digimer 4.0K May 12 21:06 .
drwxr-xr-x. 8 digimer digimer 4.0K Jun 18 20:49 ..
-rw-r--r--. 1 digimer digimer 3.0M May 12 21:06 2afe2423e15169c6cb25a50c0f4f669946051200ae14a8ec04 8c88460a7ee5a7-filelists.sqlite.bz2
-rw-r--r--. 1 digimer digimer 388K May 12 21:06 86e11f09f6b6528cf78309fce8df2a7665c7988647612fea06 cd7cef0bd68a8d-Fedora-13-comps.xml.gz
-rw-r--r--. 1 digimer digimer 1.2M May 12 21:06 8b42560c067f508d2f06b8629da5294bb8b3ff6d0816cb34f0 ceaa739d009917-other.sqlite.bz2
-rw-r--r--. 1 digimer digimer 2.3M May 12 21:06 93e7d751fdd957e27f1ba4235542b094c752df811da5119c85 40190fb20ed291-primary.sqlite.bz2
-rw-r--r--. 1 digimer digimer 2.7M May 12 21:06 a6f2da1b4489e6e148c558921da9df74d6c44cc31d734849a7 4307d401d61115-filelists.xml.gz
-rw-r--r--. 1 digimer digimer 1.3M May 12 21:06 b16205e5d40dbb1097aaab69cc243aab78ce66ac5cb1824095 237b2e5533e765-other.xml.gz
-rw-r--r--. 1 digimer digimer 1.7M May 12 21:06 fce31f091be8211a394d8942fcf4f6cbeffa3d40d87b61af55 a97b1a88b46987-Fedora-13-comps.xml
-rw-r--r--. 1 digimer digimer 1.2M May 12 21:06 fd11a617a8e5dc6fe37efd32210c794f4656689f00bbe78a62 f6dcf850feaa87-primary.xml.gz
-rw-r--r--. 1 digimer digimer 4.1K May 12 21:06 repomd.xml
-r--r--r--. 1 digimer digimer 2.6K May 12 21:06 TRANS.TBL


The contents of the generated 'Packages/repodata' on the other hand looked like this:


[root@an-node02 an.f13]# createrepo -d Packages/
1337/1337 - m4-1.4.13-4.fc12.x86_64.rpm
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete

[root@an-node02 an.f13]# ls -lah Packages/repodata/
total 4.7M
drwxr-sr-x. 2 root digimer 4.0K Jun 18 20:56 .
drwxr-sr-x. 3 digimer digimer 88K Jun 18 20:56 ..
-rw-r--r--. 1 root digimer 1.1M Jun 18 20:56 filelists.sqlite.bz2
-rw-r--r--. 1 root digimer 874K Jun 18 20:56 filelists.xml.gz
-rw-r--r--. 1 root digimer 576K Jun 18 20:56 other.sqlite.bz2
-rw-r--r--. 1 root digimer 620K Jun 18 20:56 other.xml.gz
-rw-r--r--. 1 root digimer 964K Jun 18 20:56 primary.sqlite.bz2
-rw-r--r--. 1 root digimer 515K Jun 18 20:56 primary.xml.gz
-rw-r--r--. 1 root digimer 2.7K Jun 18 20:56 repomd.xml


I am guessing that there is some sort of signing option that the man page seems to not document, or some extra step that anaconda requires.

Thanks!

---------- Post added at 08:59 PM CDT ---------- Previous post was at 08:57 PM CDT ----------

Wouldn't you use something like createrepo --update ??

I tried that just now with the following results:


[root@an-node02 an.f13]# createrepo --update Packages
Previous repo file missing:
1337/1337 - m4-1.4.13-4.fc12.x86_64.rpm
Saving Primary metadata
Saving file lists metadata
Saving other metadata

[root@an-node02 an.f13]# ls -lah Packages/repodata/
total 2.1M
drwxr-sr-x. 2 root digimer 4.0K Jun 18 20:58 .
drwxr-sr-x. 3 digimer digimer 88K Jun 18 20:58 ..
-rw-r--r--. 1 root digimer 874K Jun 18 20:58 filelists.xml.gz
-rw-r--r--. 1 root digimer 620K Jun 18 20:58 other.xml.gz
-rw-r--r--. 1 root digimer 515K Jun 18 20:58 primary.xml.gz
-rw-r--r--. 1 root digimer 1.4K Jun 18 20:58 repomd.xml


Notice it says that it couldn't find the old repo file? I've tried before using '-c repodata', but it then puts the output in 'repodata/repodata'...

Thank you, also. It's nice having people try to help after so little luck! :)

Digi

Dies
19th June 2010, 02:16 AM
Sorry, I was doing all this on a copy of the ISO on my machine. I supposed I should have been cleared on that. :)
...
Digi

I probably shouldn't have assumed you were doing something as silly as that, but better to do that right off the bat instead of half an hour later. :D

What you're doing sounds fine to me, the only thing I can think of is that maybe you didn't update the checksum in .treeinfo

If you didn't, give that a shot and let us know how it went. ;)

Digimer
19th June 2010, 02:23 AM
I probably shouldn't have assumed you were doing something as silly as that, but better to do that right off the bat instead of half an hour later. :D

What you're doing sounds fine to me, the only thing I can think of is that maybe you didn't update the checksum in .treeinfo

If you didn't, give that a shot and let us know how it went. ;)

It's all good. :)

Stupid question time; How do I update the checksums in .treeinfo? :P

Dies
19th June 2010, 02:28 AM
The only one you should have to worry about is the one for repodata/repomd.xml, it's the last one in [checksums]

Get the new checksum by doing

sha256sum repomd.xml

then open .treeinfo with your favorite editor and replace the old sum with the new one.

Digimer
19th June 2010, 02:42 AM
The only one you should have to worry about is the one for repodata/repomd.xml, it's the last one in [checksums]

Get the new checksum by doing

sha256sum repomd.xml

then open .treeinfo with your favorite editor and replace the old sum with the new one.

I'll give that a go shortly. Before I do though, do you have any insight into the file name differences between the existing repodata files and the ones created by createrepo? Specifically the lack of the prefix, or what the prefix is?

Digi