On Monday 20 July 2009 19:55:30 Kumar Appaiah wrote: > On Mon, Jul 20, 2009 at 10:19:29AM -0500, Kumar Appaiah wrote: > > > If you are looking for small private archive: > > > > > > http://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_small_ > > >public_package_archive > > > > > > Also debi command in devscript may reduce dpkg -i. > > > > Thanks for that. It'd be nice to automate the build process as well > > though, and combine it with these tools. > > So, I used Osamu's reference to create a small repository for myself, > and then put together this piece of 5 minute shell jugglery for one > command building of packages to load in there. It's really not neat, > but hey, works well for a 5 minute effort. > I've had a pretty easy time using reprepro for making a personal repository. You can use it as a partial mirror of what you already have and also be able to add an extra dist section (like lenny-backports) for the backported packages. You can still use dupload or dput to upload the packages by configuring an incoming directory for reprepro to watch. Or you can just add the .changes to reprepro explicitly by calling "reprepro -b /path/to/repos include $source_$arch.changes". Using reprepro makes it easy to upload the new packages to an "experimental" dist for testing, then call "reprepro -b /path/to/repos copysrc experimental lenny-backports $srcname". I had to learn this the hard way, because occasionally some backported packages don't work properly. > Just run it with the sid source package as argument, and (assuming > your directories are set up like mine), it should result in a > backported package for you. > > I am looking to Wikify this, with full procedure on how to set up the > mirror, the pbuilder/cowbuilder build environment and finally building > packages. But before that, I'd appreciate it if others can suggest > workarounds for the following kludges: > > 1. I download the Sources file from the mirror. It might become stale, > so I'd have to remove it periodically. > 2. I am parsing the output of grep-dctrl with certain > assumptions. They might fail for some cases, and are not robust. > 3. Judging the name of the changes file from the .dsc. > 4. Checking for errors and bailing out. > > Thanks! > > Kumar > > #!/bin/sh > > if [ ! -n "$1" ]; > then > echo "Usage: `basename $0` <sid_package>" > exit 1; > fi > > if [ ! -s Sources ]; > then > wget > ftp://ftp.utexas.edu/pub/debian/dists/unstable/main/source/Sources.bz2 -O - > |bzcat > Sources fi > > FILE=$(grep-dctrl -X -S "$1" -s Directory,Files < Sources |awk > '/^Directory/ { url = $NF} /\.dsc$/ { url = url "/" $NF} > END { print url}') > echo $FILE > dget -d "ftp://ftp.utexas.edu/pub/debian/$FILE" > sudo cowbuilder --configfile ~/.pbuilderrc-lenny --build $(basename > "$FILE") dupload -t aceslinc /var/cache/pbuilder/result/$(basename > "${FILE%.dsc}")_amd64.changes If you have a spare machine, or enough spare ram to run virtualbox, you may want to take a look at cowpoke (in the devscripts package). Cowpoke will run cowbuilder on a remote machine (or VM if you use virtualbox). Here you get the benefit of having a build log saved for you, having lintian run on the result (you may not care about this) and also having the .changes file signed (you may not care about this either). On a related note, I've been spending the last week on rebuilding lenny packages using alternative CFLAGS and -march options. I have a friend who's running gentoo, and he keeps telling me that they have a better system for building packages with the options the you select. I decided to try and make my own quick, sloppy build system using multiple buildd's with cowpoke as an example. I've had mixed results with some packages honoring those options and other packages ignoring them. It's been a very interesting experiment. -- Thanks: Joseph Rawson
Attachment:
signature.asc
Description: This is a digitally signed message part.