[buildd-tools-devel] Bug#859867: Bug#859867: Bug#859867: Please add a package which automatically configures sbuild for Debian packaging
Johannes Schauer
josch at debian.org
Mon Jul 31 14:24:21 UTC 2017
Quoting Michael Stapelberg (2017-07-31 14:19:16)
> Unless I’m mistaken, the following is what we’d need to recommend to new
> users:
>
> % sudo apt install sbuild apt-cacher-ng lintian
Why install lintian?
> % sudo adduser --quiet -- "$USER" sbuild
Better:
sudo sbuild-adduser $USER
> % sudo sbuild-createchroot \
> --command-prefix=eatmydata \
> --include=eatmydata \
> --alias=UNRELEASED \
> --alias=sid \
> unstable \
> /srv/chroot/unstable-amd64-sbuild \
> http://localhost:3142/deb.debian.org/debian
That is *if* the machine of the user is amd64.
Also, this part would be Debian-specific. Downstream distributions would have
to adapt the alias and mirror values.
Also, didn't you also propose to make the schroot be run in a tmpfs the
default? In that case, eatmydata would be quite pointless, no?
> % echo 15 */6 * * * root /usr/share/doc/sbuild/examples/sbuild-update-all |
> sudo tee /etc/cron.d/sbuild-update-all
Every six hours? I find that a bit excessive. This should certainly be
configurable. Not everybody is behind an internet connection which is fast
enough and/or where one doesn't pay per MB.
> % newgrp sbuild
This would only have an effect on the currently open terminal and would have to
be executed again on every new terminal session until the user *really* logs
out and in again.
> That seems quite involved over, say, “apt install sbuild-setup &&
> sbuild-setup unstable”.
>
> Hence, I’d definitely appreciate a script which does all the over having to
> refer to a wiki page and copy&paste long commands.
Except that the sbuild-setup command would need to become quite complex because
it the user has to be able to control:
- how to setup schroot (overlayfs? tmpfs?)
- where to put the chroots
- which distribution aliases (distribution specific)
- which extra packages to include (like eatmydata)
- whether this is the first run or not (warn if the script is run for a second
time)
- how often to update the chroots via cron
And then we have a script with a complexity which is close to where
sbuild-createchroot already is.
Or are you actually convinced that it is possible to find a set of defaults
which fits even half the userbase of sbuild?
Since we are down to two mandatory (and two optional) commands after running
"apt install sbuild", I'd argue that a superior solution would be to improve
the documentation of which commands to run for a "typical" setup. I fear that
trying to create a "one-size-fits-all" script can have many unintended
side-effects (thinking of users behind bad or costly internet, who use schroot
for other purposes, who don't want to install another deamon like
apt-cacher-ng, who are not building for Debian but for downstreams...). I'm not
convinced that the time that the user would invest to *really* understand the
things that an sbuild-setup script is actually doing would not be better spent
in learning how to use the individual tools.
What do you think?
cheers, josch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: signature
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20170731/daad0a3d/attachment.sig>
More information about the Buildd-tools-devel
mailing list