README.md 3.64 KB
Newer Older
Lars-Magnus Skog's avatar
Lars-Magnus Skog committed
1
2
## Introduction

3
This set of scripts are helpers that modify and create the source packages coming
Ruben Rodriguez's avatar
Ruben Rodriguez committed
4
5
6
7
from the Ubuntu upstream which need it. It might be because they contain
non-free stuff, references to Ubuntu that need to be changed, or because we
want the package to work our way.

mtsio's avatar
mtsio committed
8
This helpers are similar to some of those in the [gNewSense](http://www.gnewsense.org/Builder/HowToCreateYourOwnGNULinuxDistribution) builder, we took
Ruben Rodriguez's avatar
Ruben Rodriguez committed
9
10
11
some ideas and even some lines from them. If you plan to build an Ubuntu
derivative of your own, we suggest you to use Builder instead of this helpers.

12
13
Once a new package is added, it takes priority over the original one from Ubuntu,
so they never enter into the repo from upstream and need to be
14
compiled with this helpers and pushed into reprepro.
Ruben Rodriguez's avatar
Ruben Rodriguez committed
15

16
To add a package to the list, follow the [CONTRIBUTING](https://gitlab.trisquel.org/trisquel/package-helpers/blob/nabia/CONTRIBUTING.md) guidelines.
17
18
19
20
21
22
23
24
25
26
27

## Steps

Those are the steps done by the helpers:

1. Create local apt configuration, so you don't need to be root to run the helpers
2. Get the ubuntu and trisquel gpg keys
3. Get the source packages from their original repo
4. Uncompress them
5. Apply the changes described in the helper
6. Re-package it, adding "triquel$VERSION" version string
Ruben Rodriguez's avatar
Ruben Rodriguez committed
28

29
30
31
32
33
34
35
## Variables in helper scripts

* `VERSION` (required): The trisquel version for the helper.
* `EXTERNAL`: When building packages not coming from the upstream Ubuntu, the external `deb-src` in the same format as in `apt.sources.list`.
* `REPOKEY`: An additional GPG key to import for the helper. Mostly only used in conjunction with `EXTERNAL`.
* `BACKPORT(S)`: Must be set to `true` if the package is a backport.
* `QUILT`: If `skip`, avoids patches to be automatically applied. Only set this variables if you know what you are doing.
36
* `BUILD_UNTIL`: build this helper if the Trisquel REVISION number (e.g. Trisquel 10.0) is <= this number. To be used when we know that the helper will not be needed at a certain future release.
37

Lars-Magnus Skog's avatar
Lars-Magnus Skog committed
38
## Recommendations
Ruben Rodriguez's avatar
Ruben Rodriguez committed
39

40
41
* You don't need to use sudo in order to run those scripts, but some extra packages are needed:

42
     `sudo apt-get install cdbs devscripts dpkg-dev git gnupg patch quilt rpl sed python3-jsonschema python-pathlib`
43

Lars-Magnus Skog's avatar
Lars-Magnus Skog committed
44
45
46
* Take care to use the right sourcePackageName, many source packages produce
several binary packages. `apt-cache showsrc binary-package` can help you.
* If possible, use sed to replace chains in the upstream source without the
Ruben Rodriguez's avatar
Ruben Rodriguez committed
47
need of external files or patches. If you really need to include a file, place
Lars-Magnus Skog's avatar
Lars-Magnus Skog committed
48
49
it at the `DATA/sourcePackageName` directory
* Do not replace *all* references to Ubuntu in the package, just those that
Ruben Rodriguez's avatar
Ruben Rodriguez committed
50
would actually be shown to the user. Avoid replacing copyright statements!
Lars-Magnus Skog's avatar
Lars-Magnus Skog committed
51
* Try to write your replacements in a way they might work in future versions
Ruben Rodriguez's avatar
Ruben Rodriguez committed
52
of the upstream package. Well written regexps and sed will help with that.
53
* You can test your changes by doing them inside the _PACKAGES/sourcePackageName/source/_ directory,
54
and running `dpkg-source -b .`, before being added to the helper script
55
* You can check the status of failed build at https://jenkins.trisquel.org/job/build-watchdog/lastBuild/consoleText
Ruben Rodriguez's avatar
Ruben Rodriguez committed
56

Lars-Magnus Skog's avatar
Lars-Magnus Skog committed
57
## Netinstall
Ruben Rodriguez's avatar
Ruben Rodriguez committed
58
59
60
61
62
63
64

Included are the set of scipts used to generate the network installer images
found in Trisquel GNU/Linux LTS (version 2.0, 4.0, 6.0... and up). The scripts
may not be available for all versions.

To generate the images, we run the following scripts:

Lars-Magnus Skog's avatar
Lars-Magnus Skog committed
65
66
67
68
69
70
71
* `make-apt-setup`
* `make-base-installer`
* `make-choose-mirror`
* `make-main-menu`
* `make-netcfg`
* `make-net-retriever`
* `make-pkgsel`
Ruben Rodriguez's avatar
Ruben Rodriguez committed
72
73

Then we push the results into the Trisquel repository and run the script
Lars-Magnus Skog's avatar
Lars-Magnus Skog committed
74
`make-debian-installer` to build the final images.