cowbuilder(8)

๐Ÿ’… cowbuilder(8) ๐Ÿ’…

okay bestie, gather round, because today we're talking about cowbuilder, a manual page straight out of the cowdancer collection, and it's genuinely iconic. it's a pbuilder wrapper, it does cow magic, and by the end of this you're gonna be running it like the main character you are. ๐Ÿ„โœจ


๐ŸŽ€ NAME ๐ŸŽ€

cowbuilder โ€” a pbuilder wrapper for cowdancer. periodt. that's the whole vibe. ๐Ÿซถ


โœจ SYNOPSIS โœจ

here's the shape of it, keep these exact:

cowbuilder create [options]

cowbuilder update [options]

cowbuilder build [options] .dsc-file

cowbuilder login [options]

cowbuilder execute [options] -- script [script options]

cowbuilder dumpconfig

๐ŸŒˆ DESCRIPTION ๐ŸŒˆ

cowbuilder executes the specified pbuilder operation with cowdancer. that's it, that's the whole deal. it's giving "let pbuilder cook, but make it cow." ๐Ÿ”ฅ


๐Ÿ‘‘ COMMANDS ๐Ÿ‘‘

most commands invoke pbuilder with the specified commands โ€” so like, go read the pbuilder manual for the deets, bestie, it's all there. ๐Ÿ“–

  • create โ€” create the base.cow image. heads up: the directory for base.cow should be empty, or this command will fail. no cap. ๐Ÿšจ
  • update, up, u โ€” update the base.cow image. three names, one queen. ๐Ÿ’ซ
  • build, b โ€” build a package given a .dsc file. ๐Ÿ“ฆ
  • login, l โ€” start a session within the base.cow. hi bestie, you're inside now. ๐Ÿš
  • execute, e โ€” execute a command within the base.cow. ๐Ÿƒโ€โ™€๏ธ
  • dumpconfig โ€” dump configuration information, used for debugging. the "what is going ON" button. ๐Ÿ”

๐Ÿ’– OPTIONS ๐Ÿ’–

most options are the same as pbuilder, except for the following which are handled specially. so don't come for me about the other flags, they're pbuilder's business. ๐Ÿ’โ€โ™€๏ธ

  • --buildplace โ€” the place where COW operation takes place. ๐Ÿฎ
  • --basepath โ€” okay so this has a very different meaning to the --basetgz option of pbuilder, because there is no tgz. this option specifies the directory in which the COW master data is stored, and the default is /var/cache/pbuilder/base.cow. ๐Ÿ—‚๏ธ
  • --configfile [configuration file to load] โ€” an additional configuration file to read after all other configuration files have been read. late to the party, but welcome. ๐ŸŽ‰
  • --no-cowdancer-update โ€” do not use cowdancer on cowbuilder update. please use this option when cowdancer is interfering with the upgrade process, or when cowdancer itself is being upgraded within the chroot. trust, you'll know when it's time. ๐Ÿ˜Œ
  • --debian-etch-workaround โ€” workaround for Debian Etch. cow-shell will search for all files in the chroot, but it will work. lowkey a throwback, but okay. ๐Ÿ•ฐ๏ธ

๐Ÿฆ‹ CONFIGURATION FILES ๐Ÿฆ‹

cowbuilder reads the following configuration files per default. in this order, bestie, it matters. โญ

  • /usr/share/pbuilder/pbuilderrc โ€” application default, not to be changed. do not touch. ๐Ÿ™…โ€โ™€๏ธ
  • /etc/pbuilderrc โ€” system-wide default. ๐ŸŒ
  • ~/.pbuilderrc โ€” user default. ๐Ÿ 
  • anything specified with --configfile option โ€” additional configuration at runtime. ๐Ÿ•น๏ธ

๐ŸŒธ CONFIGURATION FILE OPTIONS ๐ŸŒธ

the possible configuration options are as follows. others are ignored. read that again. ๐Ÿซฃ

  • DISTRIBUTION=distribution
  • BUILDRESULT=directory
  • BUILDPLACE=directory
  • BASEPATH=path
  • MIRRORSITE=http://mirror
  • NO_COWDANCER_UPDATE=1 โ€” see --no-cowdancer-update ๐Ÿ‘€
  • DEBIAN_ETCH_WORKAROUND=1 โ€” see --debian-etch-workaround ๐Ÿ‘€

๐Ÿ”ฅ EXAMPLES ๐Ÿ”ฅ

cowbuilder create

create a base.cow image. iconic.

# cowbuilder create --hookdir /usr/share/doc/pbuilder/examples/workaround/ --distribution etch --debootstrap debootstrap --basepath /var/cache/pbuilder/base-test.cow
bash: /root/.pbuilderrc: No such file or directory
W: /home/dancer/.pbuilderrc does not exist
I: Running in no-targz mode
Distribution is etch.
Building the build environment
I: running debootstrap
/usr/sbin/debootstrap
I: Retrieving Release
     .
     .

cowbuilder update

update the base.cow image. glow-up time. โœจ

# cowbuilder update
bash: /root/.pbuilderrc: No such file or directory
I: Copying COW directory
I: Invoking pbuilder
W: /home/dancer/.pbuilderrc does not exist
I: Running in no-targz mode
I: copying local configuration
I: mounting /proc filesystem
I: mounting /dev/pts filesystem
I: policy-rc.d already exists
Refreshing the base.tgz
I: upgrading packages
     .
     .

cowbuilder build test_0.1.dsc

build the package specified in the dsc file, with the base.cow image. ๐Ÿง

pdebuild --pbuilder cowbuilder

run cowbuilder build against the current directory. the current directory should be an extracted Debian source package directory.

edit /etc/pbuilderrc to have PDEBUILD_PBUILDER=cowbuilder to make this the default behavior for pdebuild. set it and forget it, bestie. ๐Ÿ’พ

cowbuilder login --bindmounts /home/dancer

start a cow-shell session inside base.cow, with /home/dancer being bind-mounted to within chroot.

note that cowbuilder will not cow-protect what is inside /home/. just so you know. ๐Ÿ™ˆ
# cowbuilder login --bindmount ${HOME}
bash: /root/.pbuilderrc: No such file or directory
I: Copying COW directory
I: Invoking pbuilder
W: /home/dancer/.pbuilderrc does not exist
I: Running in no-targz mode
I: copying local configuration
I: mounting /proc filesystem
I: mounting /dev/pts filesystem
I: Mounting /home/dancer
I: policy-rc.d already exists
I: entering the shell
#

cowbuilder create --distribution sid --basepath /var/cache/pbuilder/base-test.cow

cowbuilder create --distribution sid --basepath
/var/cache/pbuilder/base-test.cow

create a base.cow image with the path /var/cache/pbuilder/base-test.cow and distribution sid. ๐ŸŽฏ


๐Ÿ’œ AUTHOR ๐Ÿ’œ

Junichi Uekawa (dancer@debian.org) โ€” absolute legend, we stan. ๐Ÿ‘‘


โญ SEE ALSO โญ

/usr/share/doc/pbuilder/pbuilder-doc.html, pbuilder(8), pdebuild(1)


and that's the whole page, bestie! this was cowbuilder(8) from cowdancer, dated 2007 Jun 17 โ€” yes, she's vintage, and yes, she still ate. ๐Ÿ’…๐ŸŽ€๐Ÿฆ‹ go make some cows. ๐Ÿ„๐Ÿ’–

๐Ÿ“ฆ where this page comes from