Build those damn .deb's
How this shit works
init.sh is here to be able to easily redeploy the whole ecosystem on a new machine.
Scripts to handle common tasks
ynh-build, to build a new version of Yunohost packages from the git repositories
/scripts/, which is used by
ynh-buildbut can also be used to manually build stuff like metronome ...)
pbuilderbuild the packages (using
rebuilddhandles 'build jobs' (gets notified by
reprepromanages the HTTP(S) repo in
nginxto serve the repo
- (not yet repaired?) a custom service to handle hooks from github
These services should be running for everything to work properly
nginx) to have "nice" interface to monitor and read build logs
- (not yet repaired?) the github webhook handling service
rebuildd-job listto list jobs
rebuilddstarts the rebuildd server/daemon - for now I have to start it manually and
disownit. The service should be working but there's some weird stuff about lxc making it crashed ?
rebuildd-httpd 127.0.0.1:9998starts the monitoring/log web interface - same as
rebuildd, gotta start it manually for now :/
/var/www/repo/debian, you can list available packages with
reprepro list jessie
At the start of the build, pbuilder will call the hooks in scripts/pbuilder/hooks
If you need to rebuild custom packages (for instance, metronome ?)
- See scripts/ynh-custom-builds
- To build stuff, pbuilder needs to chroot in environnement.
- These are contained in
- You can rebuild them from
'Packages' are generally 'source packages' for debian people
Interesting note from this page
an maintainers, packages are source packages, not binary packages. They never interact directly with the internals binary packages. In fact only 'dpkg-deb' and 'dpkg' developers need to know what they are. In fact it is not recommended to do so.
If a developer were to explain someone how to build a Debian package, he will certainly explain how to make a source package and how to build it.
On the other hand, not every developer wants to submit his software to Debian (yet), but still wants to profit from the advantages a packaging system like 'dpkg' offers without releasing package source code. Personally I will release my freeware projects still as tar.gz files with source code etc. for all kind of platforms, while I plan to offer more and more '.deb' packages for the convenience of Debian users who just want to install and use my software.
Relaunching a build manually with a shell ?
- Copy the 'shell after error' hook :
cp /usr/share/doc/pbuilder/examples/C10shell /home/vinaigrette/scripts/pbuilder/hooks/
- cd /var/cache/rebuildd/build/
- /home/vinaigrette/scripts/rebuildd/build-binaries stretch rspamd 1.6.4 armhf
Removing "conflicting" sources
- Sometimes reprepro is an ass and wont let you add some sources because a supposedly more recent version already exists
- To make it happy, you can use the undocumented
reprepro removesrc <codename> <source-package-names> [<source-version>] # For instance reprepro removesrc stretch yunohost-admin 3.0.0+201804281857
What do I do if a job crashed for some weird reason ?
Sometimes build crash for random reason and just relaunching them fixes the
situation. But since that would be too simple, you can't just use the standard
'requeue' action of the
rebuildd-job command because your job will end up in
WAIT_LOCKED indifinetely -.- ...
Instead, you can re-add the job for the corresponding architecture. See
./scripts/rebuildd-job add --help.