vinaigrette/README.md

88 lines
3.7 KiB
Markdown
Raw Normal View History

2017-09-01 17:35:08 +02:00
Vinaigrette
===========
Build those damn .deb's
2017-09-01 17:38:36 +02:00
Todo
-----
2017-09-01 17:35:08 +02:00
- [ ] Understand how the whole arch shit works
- When do we need a specific arch (e.g. armhf) build ? (e.g. for pure python stuff we don't care, but probably for C/C++ we do ?)
2017-09-01 17:38:36 +02:00
- How does it actually works (debootstrap stuff ?)
- How do we manage extra archs like armel, arm64 ...?
2017-09-01 17:35:08 +02:00
- [ ] Test repo in practice
- Dummy tests when using vinaigrette.yunohost.org in sources.list
2017-09-01 17:38:36 +02:00
- Test metronome on arm ?
- Test stretch builds
2017-09-01 17:35:08 +02:00
- [ ] Moar cleaning of scripts (e.g. specific arch argument in `build_deb` ?)
2017-09-01 17:38:36 +02:00
Content
-------
2017-09-01 17:35:08 +02:00
The script `init.sh` is here to be able to easily redeploy the whole ecosystem on a new machine.
2017-09-01 17:38:36 +02:00
#### Scripts to handle common tasks
2017-09-01 17:35:08 +02:00
- `ynh-build`, to build a new version of Yunohost packages from the git repositories
- `build_deb` (in `/scripts/`, which is used by `ynh-build` but can also be used to manually build stuff like metronome ...)
2017-09-01 17:38:36 +02:00
#### Tools used
2017-09-01 17:35:08 +02:00
- `pbuilder` build the packages (using `dpkg-buildpackage` I believe)
- `rebuildd` handles 'build jobs' (gets notified by
- `reprepro` manages the HTTP(S) repo in `/var/www/repo/debian/`
- `nginx` to serve the repo
- (not yet repaired?) a custom service to handle hooks from github
2017-09-01 17:38:36 +02:00
#### Services
2017-09-01 17:35:08 +02:00
These services should be running for everything to work properly
- `rebuildd`
- `rebuildd-httpd` (and `nginx`) to have "nice" interface to monitor and read build logs
- (not yet repaired?) the github webhook handling service
2017-09-01 17:38:36 +02:00
Useful commands
---------------
2017-09-01 17:35:08 +02:00
- `rebuildd-job list` to list jobs
- `rebuildd` starts the rebuildd server/daemon - for now I have to start it manually and `disown` it. The service should be working but there's some weird stuff about lxc making it crashed ?
- `rebuildd-httpd 127.0.0.1:9998` starts the monitoring/log web interface - same as `rebuildd`, gotta start it manually for now :/
- in `/var/www/repo/debian`, you can list available packages with `reprepro list jessie`
2017-09-01 17:38:36 +02:00
How this shit works
-------------------
2017-09-01 17:35:08 +02:00
2017-09-01 18:45:37 +02:00
![](doc/buildchain.png)
2017-09-01 17:35:08 +02:00
2017-09-01 17:38:36 +02:00
Misc notes
----------
2017-09-01 17:35:08 +02:00
2017-09-04 19:13:28 +02:00
#### Hooks thingy
At the start of the build, pbuilder will call the hooks in scripts/pbuilder/hooks
2017-09-01 17:38:36 +02:00
#### If you need to rebuild custom packages (for instance, metronome ?)
2017-09-01 17:35:08 +02:00
- Go to a git clone of https://github.com/yunohost/metronome/
- Inside the git clone, call `/path/to/build_deb -c jessie -d unstable .`
2017-09-01 17:38:36 +02:00
- This will build the source and add a rebuildd job.
2017-09-01 17:35:08 +02:00
2017-09-01 17:38:36 +02:00
#### Chroot images
2017-09-01 17:35:08 +02:00
- To build stuff, pbuilder needs to chroot in environnement.
- These are contained in `images/$arch/$dist.tgz`
- You may be able to regerate them 'from scratch' with `rebuildd-init-build-system`. Not sure entirely how this works though. I guess it reads distributions and archs from conf file ?
2017-09-07 01:45:06 +02:00
#### 'Packages' are generally 'source packages' for debian people
Interesting note from [this page](http://tldp.org/HOWTO/html_single/Debian-Binary-Package-Building-HOWTO/)
>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.