Setup Debian repository that support multiple distribution

News and discussion about development of the Debian OS itself

Setup Debian repository that support multiple distribution

Postby kthawan » 2009-12-08 23:11

Hi,

I am trying to setup Debian repository for my custom Debian package. Currently, I use dpkg-scanpackages and setup folder layout as below

/dist/lenny/contrib/binary-amd64
/dist/lenny/contrib/binary-id386

/pool/xxxxx-i386.deb
/pool/xxxxx-amd64.deb

Then I use below script to generate index files
Code: Select all
for DIST in ${DISTRIBUTIONS[@]}
do
  for ARCH in ${ARCHS[@]}
  do
     echo "Updating debian packages list for $DIST-$ARCH"
     dpkg-scanpackages --arch $ARCH --multiversion $POOL_DIR /dev/null > $DIST_ROOT/$DIST/contrib/binary-$ARCH/Packages
   
     gzip -9c $DIST_ROOT/$DIST/contrib/binary-$ARCH/Packages > $DIST_ROOT/$DIST/contrib/binary-$ARCH/Packages.gz
     bzip2 -9  $DIST_ROOT/$DIST/contrib/binary-$ARCH/Packages
     echo
  done
done


However, I just realize that if I want to support multiple distributions then I have to have separate binary pool for each distribution. Nevertheless, I don't see those kind of layout in official Debian repository.

After doing some research, I found that other repository helper program such as mini-dinstall will read changelog file so that it will put package into correct distribution that it support. It seem like dpkg-scanpackages does not use this mechanism.

Any suggestions?


PS: The distribution list in changelog allows single package to be included into multiple distributions, but what if I also have the same version of software packaged for each Debian distribution then I cannot put them into the same directory because of the name collision. Will this mean that I cannot use a single binary pool?
kthawan
 
Posts: 2
Joined: 2009-12-08 22:18

Re: Setup Debian repository that support multiple distribution

Postby bugsbunny » 2009-12-09 14:22

PS: The distribution list in changelog allows single package to be included into multiple distributions, but what if I also have the same version of software packaged for each Debian distribution then I cannot put them into the same directory because of the name collision. Will this mean that I cannot use a single binary pool?
I'll answer this part. If you recompile for a different distribution the versionn should be modified. You can append to the end of the version string to indicate what distribution you're recompiling for. Ut's what all Debian backported packages end with ~bpoxx where xx represents the distribution it's recompiled for (40 for etch, 50 for lenny). Subsequent changes get +x added on (x being an integer).
Security updates just add a string like lenny1 or squeeze2 to the end of the version. (sid always has the original version).

This is also why you see ubuntu in the version string for Debian packages that they've taken and recompiled just for Ubuntu.
User avatar
bugsbunny
 
Posts: 5355
Joined: 2008-07-06 17:04

Re: Setup Debian repository that support multiple distribution

Postby plugwash » 2009-12-09 23:37

bugsbunny wrote:This is also why you see ubuntu in the version string for Debian packages that they've taken and recompiled just for Ubuntu.

Wrong, when ubuntu simply recompiles a package (which they do on all packages imported from debian) they don't change the version number. They only change it if they make changes to the source.
plugwash
 
Posts: 2508
Joined: 2006-09-17 01:10

Re: Setup Debian repository that support multiple distribution

Postby kthawan » 2009-12-10 16:32

Thanks for all suggestions.

Do your guys recommend any other repository program? (reprepro ... )
kthawan
 
Posts: 2
Joined: 2009-12-08 22:18


Return to Debian Development

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable