Skip to content
Snippets Groups Projects
README.md 1.3 KiB
Newer Older
Santiago Rodriguez's avatar
Santiago Rodriguez committed
# Trisquel build system configuration
Santiago Rodriguez's avatar
Santiago Rodriguez committed

Santiago Rodriguez's avatar
Santiago Rodriguez committed
## Requirements
Santiago Rodriguez's avatar
Santiago Rodriguez committed

Ruben Rodriguez's avatar
Ruben Rodriguez committed
  - Install sbuild:
Santiago Rodriguez's avatar
Santiago Rodriguez committed

        sudo apt-get install sbuild schroot debootstrap eatmydata zstd
Santiago Rodriguez's avatar
Santiago Rodriguez committed

Ruben Rodriguez's avatar
Ruben Rodriguez committed
  - Configure schroot fstab for ccache
Santiago Rodriguez's avatar
Santiago Rodriguez committed

Ruben Rodriguez's avatar
Ruben Rodriguez committed
        dir=/var/cache/ccache-sbuild
        sudo install --group=sbuild --mode=2775 -d $dir
        echo $dir $dir none rw,bind 0 0 | sudo tee -a /etc/schroot/sbuild/fstab
Santiago Rodriguez's avatar
Santiago Rodriguez committed

Ruben Rodriguez's avatar
Ruben Rodriguez committed
        cat << END |sudo tee $dir/sbuild-setup
        #!/bin/sh
        export CCACHE_DIR=$dir
        export CCACHE_UMASK=002
        export CCACHE_COMPRESS=1
        unset CCACHE_HARDLINK
        export PATH="/usr/lib/ccache:\$PATH"
        exec "\$@"
        END
Santiago Rodriguez's avatar
Santiago Rodriguez committed

Ruben Rodriguez's avatar
Ruben Rodriguez committed
        sudo chmod a+rx $dir/sbuild-setup
Santiago Rodriguez's avatar
Santiago Rodriguez committed

Ruben Rodriguez's avatar
Ruben Rodriguez committed
  - Add your user to the sbuild group
Santiago Rodriguez's avatar
Santiago Rodriguez committed

        sudo addgroup $USER sbuild && newgrp sbuild
Santiago Rodriguez's avatar
Santiago Rodriguez committed

Santiago Rodriguez's avatar
Santiago Rodriguez committed
## Creating the environment
Santiago Rodriguez's avatar
Santiago Rodriguez committed

The first time you will need to create the build jails. This is a one time job that must be done for each version/arch you want to use

Ruben Rodriguez's avatar
Ruben Rodriguez committed
    sudo ./sbuild-create.sh $CODENAME $ARCH
Santiago Rodriguez's avatar
Santiago Rodriguez committed

Ruben Rodriguez's avatar
Ruben Rodriguez committed
This will create the build jails for $CODENAME (flidas, belenos, etc). You can test the jails with:
Santiago Rodriguez's avatar
Santiago Rodriguez committed

Ruben Rodriguez's avatar
Ruben Rodriguez committed
    schroot -c $CODENAME-$ARCH
Santiago Rodriguez's avatar
Santiago Rodriguez committed

Ruben Rodriguez's avatar
Ruben Rodriguez committed
You can upgrade the jail with this command:
Santiago Rodriguez's avatar
Santiago Rodriguez committed

Ruben Rodriguez's avatar
Ruben Rodriguez committed
    sudo sbuild-update -udcar $CODENAME-$ARCH
Santiago Rodriguez's avatar
Santiago Rodriguez committed

Ruben Rodriguez's avatar
Ruben Rodriguez committed
The binary packages can be built from a dsc by running:
Santiago Rodriguez's avatar
Santiago Rodriguez committed

    sbuild --no-run-litian -v -A --dist $CODENAME --arch $ARCH file.dsc