Page found: Package helpers

Multiple pages have this name:

Package helpers

There are a set of scripts used to build trisquel packages. They are located in https://devel.trisquel.info/trisquel/package-helpers , and we call them helpers. We use them to modify and compile those packages coming from 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.

These helpers are similar to some of those in the gNewSense builder; we took some ideas and even some lines from them. If you plan to build an Ubuntu derivative of your own, we suggest you use builder instead of these helpers.

All packages in this list are in the appropriate blacklist in the repository updater, so they never enter into the repo from upstream and need to be compiled with these helpers and pushed into reprepro.

These helpers also need to be run by hand (and the results tested) any time the repo watchdog warns about pending updates from upstream.

To add a package to the list, just copy one (make-apache2 is a good template) and rename it to make-sourcePackageName.

Some recommendations:

  • 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 need of external files or patches. If you really need to include a file, place it at the DATA/sourcePackageName directory
  • Do not replace *all* references to Ubuntu in the package, just those that would actually be shown to the user. Avoid replacing copyright statements!
  • Try to write your replacements in a way they might work in future versions of the upstream package. Well written regexps and sed will help with that.

Writing new helpers

You'll need a copy of the package source as a basis to code and test your sed/awk command for the changes. Using the Trisquel package source is good enough for nearly all cases. In a separate directory (say $HOME/src ) do:

apt-get source package-name
If you now cd into the package-name-release directory you're in the same relative place package helper sed scripts are run.

List of available variables inside the helper scripts

CODENAME=belenos
The codename of the current Trisquel release
REVISION=7.0
The version number for the current Trisquel release
UPSTREAM=trusty
The upstream codename for the release
MIRROR=http://archive.ubuntu.com/ubuntu
The upstream mirror from where to get the sources
DEVELMIRROR=http://devel.trisquel.info/trisquel
The development mirror
Useful when a package depends on other that needs to be trisquelized first
LOCALMIRROR=http://archive.trisquel.info/trisquel # The official mirror
EXTERNAL="deb-src http://sample.repo.foo/ current main"
Makes the sources in that repository available for compilation
It will only be used if Ubuntu doesn't provide the package or its version is lower
$DATA/
Directory containing files for the helper
Put the files in helpers/DATA/$PACKAGE
Usage example: cp $DATA/file.txt debian/patches
VERSION=1
Trisquel version to append (as in 2.4-1ubuntu4+7.0trisquel1)
We append "+7.0trisquel1", which is +${REVISION}trisquel${VERSION}
Increase every time the helper is updated
COMPONENT=main
Tells the build system that the package comes from main, so the translations should be stripped
Use only when the rebranding doesn't affect the locales!
FAKEROOT=true
Tells the build system to use a fakeroot and compile as user "nobody"
PARALLEL=true
Compile with -j$NUM_PROCESSORS.

More information

Package helpers

Introduction

This set of scripts are helpers that modify and create the source packages coming 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.

This helpers are similar to some of those in the gNewSense builder, we took 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.

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 compiled with this helpers and pushed into reprepro.

To add a package to the list, follow the CONTRIBUTING guidelines. Steps

Those are the steps done by the helpers:

  • Create local apt configuration, so you don't need to be root to run the helpers.
  • Get the ubuntu and trisquel gpg keys.
  • Get the source packages from their original repo.
  • Uncompress them.
  • Apply the changes described in the helper.
  • Re-package it, adding "triquel$VERSION" version string.

Recommendations

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

sudo apt-get install dpkg-dev sed git gnupg-curl rpl devscripts quilt patch cdbs
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 need of external files or patches. If you really need to include a file, place it at the DATA/sourcePackageName directory

Do not replace all references to Ubuntu in the package, just those that would actually be shown to the user. Avoid replacing copyright statements!

Try to write your replacements in a way they might work in future versions of the upstream package. Well written regexps and sed will help with that.

You can test your changes by doing them inside the PACKAGES/sourcePackageName/source/ directory, and running

dpkg-source -b 
before being added to the helper script

Netinstall

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:

make-apt-setup
make-base-installer
make-choose-mirror
make-main-menu
make-netcfg
make-net-retriever
make-pkgsel
Then we push the results into the Trisquel repository and run the script make-debian-installer to build the final images.

You can search for Package helpers