cvs-buildpackage: CVS trees and automated builds
Hi guys,
I have converted all my packages over to my CVS build tree,
and have succesfully exported, and built packages by one command:
__> cvs-buildpackage -rsudo
run in my working directory.
So, I can compile all the packages I want by just running:
__> cd /usr/local/src/Work; for i in *; do
> (cd $i; cvs-buildpackage -rsudo )
> done
All we need now is source dependencies, then we could use
pkg-order and do this right. I'll write up the man page for
cvs-buildpackage and the config script used to configure work and
archive directories, and I'll upload it soon (either by tommorrow, or
next week; I'm going away for the weekend).
BTW, does any one actually use pkg-order?
manoj
Just to give you-all a feel of how I converted packages, here's a
brief recipe.
I kept all my packages in the directory
__> ls -asCF /usr/local/src/Packages/
total 18
1 ./ 1 dist/ 1 miscfiles/
1 ../ 1 html-check/ 1 pkg-order/
1 angband/ 1 kernel-package/ 1 psgml/
1 angband-doc/ 1 latex2html/ 1 tm/
1 c2man/ 1 mailagent/ 1 vm/
1 cgi-modules/ 1 make/ 1 w3-el/
__> ls -asCF /usr/local/src/Packages/make
total 589
1 ./ 1 make-3.75/ 586 make_3.75.orig.tar.gz
1 ../
Step 1:
Create a working directory, /usr/local/src/Work. Edit my CVS
modules file preparing the repository for all the new modules,
aliases, etc.
Step 2:
Unpack original sources in the work directory
__> cd /usr/local/src/Work
__> find ../Packages -type f -name \*.orig.tar.gz | while read i; do
> tar zxf $i ; done
__> rename 's/\.orig//' *
Create a copy of the directory (in case I mess up)
__> for i in *; do
> j=`echo $i | sed 's/-.*$//'`
> cp -a $i $j
> done
Step 3:
I created a scratch script, (included below) which outputs the
steps taken for the rest of the process. I just created 2 xterms,
and used cut and paste. For example, for make:
__> cvsify make 3.75 6
builtin cd make
cvs import -ko -m 'Initial Import' debian/make upstream upstream_version_3_75
builtin cd ..
rm -rf make
cvs co make
diff -qBbwr make-3.75 make | grep -v CVS
builtin cd ../Packages/make/make-3.75
sudo ./debian/rules clean
diff -qBbwr . ../../../Work/make | grep -v CVS
#
# Add to the following definition based on the diff output above
#
FILES_DIFFERENT=debian
tar cf - $FILES_DIFFERENT | (builtin cd ../../../Work/make; tar xvvpf -)
cd ..
rm -rf make-3.75 make_3.75-6*
builtin cd ../../Work/make
cvs add debian
cd debian
cvs add -m 'Initial revision' `cvs update 2>/dev/null | egrep '^?' | sed 's/?//'`
cd ..
cvs update 2>/dev/null | egrep '^M' | sed 's/^M//'
cvs commit -m 'Added all debian changes'
~/bin/cvs-buildpackage -rsudo -d -n
cvs tag debian_version_3_75-6
cd ..
rm -rf make-3.75
All done.
---------------------------------------------------------------------------
---------------------------------------------------------------------------
#! /usr/bin/perl
# -*- Mode: Perl -*-
# cvsify ---
# Author : Manoj Srivastava ( srivasta@tiamat.datasync.com )
# Created On : Wed May 28 11:38:18 1997
# Created On Node : tiamat.datasync.com
# Last Modified By : Manoj Srivastava
# Last Modified On : Wed May 28 15:18:29 1997
# Last Machine Used: tiamat.datasync.com
# Update Count : 8
# Status : Unknown, Use with caution!
# HISTORY :
# Description :
#
#
$package = shift;
$version= shift;
$deb=shift;
($tversion = $version) =~ tr/\./_/;
$ko = "-ko" if $deb;
$import_msg="Initial Import";
$vendor_tag='upstream';
$import_tag="upstream_version_$tversion";
$add_msg="Initial revision";
$commit_msg='Added all debian changes';
$final_tag="debian_version_$tversion-$deb";
print <<EOINPUT;
builtin cd $package
cvs import $ko -m '$import_msg' debian/$package $vendor_tag $import_tag
builtin cd ..
rm -rf $package
cvs co $package
diff -qBbwr $package-$version $package | grep -v CVS
builtin cd ../Packages/$package/${package}-$version
sudo ./debian/rules clean
diff -qBbwr . ../../../Work/$package | grep -v CVS
#
# Add to the following definition based on the diff output above
#
FILES_DIFFERENT=debian
tar cf - \$FILES_DIFFERENT | (builtin cd ../../../Work/$package; tar xvvpf -)
cd ..
rm -rf $package-$version $ {package}_$ {version}-$ {deb}*
builtin cd ../../Work/$package
cvs add debian
cd debian
cvs add -m '$add_msg' `cvs update 2>/dev/null | egrep '^\?' | sed 's/\?//'`
cd ..
cvs update 2>/dev/null | egrep '^M' | sed 's/^M//'
cvs commit -m '$commit_msg'
~/bin/cvs-buildpackage -rsudo -d -n
cvs tag $final_tag
cd ..
rm -rf $package-$version
EOINPUT
--
I think the best way I've heard this put is "Pascal gives you a water
pistol filled with distilled water. C not only gives you a loaded
.357, it points it at your head as a default. Why do you think
Pascal is taught in school? And which would you rather have when
there was a hungry bear in the area?" Jim Harkins
(jharkins@sagpd1.UUCP)
Manoj Srivastava <url:mailto:srivasta@acm.org>
Mobile, Alabama USA <url:http://www.datasync.com/%7Esrivasta/>
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: