make debrebuild actually build things
Hi,
this is a work-in-progress and at this stage a proof-of-concept to make debrebuild actually build stuff. My plan is to add an option called --builder
with the following possible values:
- none: the current behaviour
- sbuild: build with sbuild (this requires an existing sbuild+schroot setup)
- mmdebstrap: build inside an mmdebstrap throw-away chroot (requires no superuser privileges and no setup)
- dpkg: install dependencies with sudo and run dpkg-buildpackage without a chroot
- pbuilder: builds with pbuilder (I will not implement this)
- sbuild+unshare: use the sbuild unshare backend to create a chroot for building without needing superuser privileges or setup
You are free to decide which option you think is a sensible default.
We can also think of adding an option that allows adding arbitrary additional options to sbuild, pbuilder or mmdebstrap as it is run by debrebuild.
I also already added code to find the correct timestamp for a deb-src
sources.list entry so that the dsc referenced from the buildinfo can be retrieved automatically as well.
Currently, the build results will be put into the current directory as it is done by sbuild when run on a .dsc
. Is this a good default? Maybe there should be a switch controlling whether the user wants the output and an option to specify an output directory and a check so that files do not get overwritten.
An open question is if and how debrebuild should check whether the checksums in the provided buildinfo file can be reproduced. Problems:
- the value of the
Build-Date
field varies - the checksum of the
.dsc
varies because it is not signed (and even if we would sign it, it would have a different signature) - the buildinfo file itself is not signed (and even if we would sign it, it would have a different signature)
Should we then maybe only check the binary packages from the input buildinfo for their checksums? Debrebuild could then signify with its exit code whether the checksums matched or not.
Thanks!
cheers, josch