[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to create a Release file



Am Freitag, den 21.04.2006, 17:28 +0200 schrieb Tomas Davidek:
> Hello,
>    I am having troubles when creating the Release file for my "private" 
> repository. According to
> http://www.debian.org/doc/manuals/securing-debian-howto/ch7.en.html#s-deb-pack-sign
> I create the file via
> 
>      $ rm -f dists/testing/Release
>      $ apt-ftparchive release dists/testing > dists/testing/Release
>      $ gpg --sign -ba -o dists/testing/Release.gpg dists/testing/Release
> 
> Then, when trying apt-get update, I get the following error message:
> ------------
> Failed to fetch http://www-ucjf.troja.mff.cuni.cz/~davidek/debian/dists/testing/Release  Unable to find expected entry  main/binary-i386/Packages in Meta-index file (malformed Release file?)
> Reading package lists... Done
> W: Conflicting distribution: http://www-ucjf.troja.mff.cuni.cz testing Release (expected testing but got )
                                                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^

This is important. Your Release-file does not contain a Suite: (nor a
Codename:) field. I don't know, what the first part of the error means.

> ------------
> Well, I don't understand it - the file main/binary-i386/Packages does
> not exits, there is only main/binary-i386/Packages.gz. Is that ok ?

I guess this should not be a problem.

> I rather suspect that there is something wrong with the Release file
> itself, it seems some header is missing. My Release looks like:
> ----------
> Date: Fri, 21 Apr 2006 13:45:27 UTC
> MD5Sum:
>  d41d8cd98f00b204e9800998ecf8427e                0 Release
>  488884a11d9ba1cc5fe28646ca9b9e3c             1269 main/binary-amd64/Packages.gz
>  ab29d796accdd96e9f700399d1f70ef9              925 main/binary-amd64/Sources.gz
>  a7a653a9884509b6f6612cab71047ab9             1269 main/binary-i386/Packages.gz
> ----------
> while the Debian ones have a header in the beginning:
> ---------------
> Origin: Debian
> Label: Debian-Security
> Suite: testing
> Codename: etch
> Date: Mon, 17 Apr 2006 08:35:59 UTC
> Architectures: amd64 alpha arm hppa i386 ia64 m68k mips mipsel powerpc s390 sparc
> Components: updates/main updates/contrib updates/non-free
> Description: Debian testing Security Updates
> MD5Sum:
>  5c8b4d953e776a92ca7d6da9edcb7196             7914 main/binary-alpha/Packages
>  927ab0a52245a0be815c50f5fdb58ca5             1867 main/binary-alpha/Packages.gz
> ----------------
> Is that important ?

Yes. One error you always got. But these entries are also necessary to
allow a user to pin your repository.

> If so, is there any script to generate the header or do I have to do
> it myself ? 

You can put the information into a "configuration" file and run
apt-ftparchive with this file. The content of the file would look like
this:

APT::FTPArchive::Release::Origin "...";
APT::FTPArchive::Release::Label "...";
APT::FTPArchive::Release::Description "...";
APT::FTPArchive::Release::Suite "testing";
APT::FTPArchive::Release::Codename "etch";
APT::FTPArchive::Release::Architectures "...";
APT::FTPArchive::Release::Components "...";

Alternatively you can use the '-o' option on command line for every
entry:

apt-ftparchive \
        -o APT::FTPArchive::Release::Origin="..." \
        -o APT::FTPArchive::Release::Label="..." \
        -o APT::FTPArchive::Release::Architectures="..." \
        -o APT::FTPArchive::Release::Components="..." \
        -o APT::FTPArchive::Release::Description="..." \
        -o APT::FTPArchive::Release::Codename="etch" \
        -o APT::FTPArchive::Release::Suite="testing" \
        release dists/testing > dists/testing/Release.tmp
mv Release.tmp Release

There is an issue directly outputting Release with the above command
(not using Release.tmp). The problem is, that in this case the Release
file contains a 0-entry for itself (you can verify this with your own
Release file).

> Maybe the problem could be that I am running sarge on the system where
> I  generate the packages and all the files for repository ? (i.e.
> older version of apt-utils ?)

That shouldn't be a problem. I run debarchiver from Sid on my Sarge
system to generate a valid repository for Experimental, Sid and Sarge.
And there are no problems.

> Thanks a lot for any hint,

Maybe this can help you too:
http://wiki.debian.org/HowToSetupADebianRepository

Regards, Daniel



Reply to: