debian.org porterboxes

The Debian project runs machines with unusual architectures that can be used for porting and validating fixes.


    $ tmux
    # or
    $ screen

Using sbuild+unshare

You may use sbuild (in unshare mode) to build a package, but also to get a "chroot"-environment to work on your package.


  $ sbuild --chroot-mode=unshare --dist=<distro> --anything-failed-commands=%SBUILD_SHELL <pkg>
  # optionally add --arch=<arch> for a different architecture (for example armel on armhf).
  

Alternatively pass --starting-build-commands=%SBUILD_SHELL to get a shell before dpkg-buildpackage, or pass any other hooks (see man sbuild).

Note that the chroot is cleaned when the shell is closed.


  $ apt install screen # to get multiple shells.
  $ unshare --net
  $ su - sbuild
  $ cd /build/reproducible-path/<pkg>_<version>/
  $ dpkg-buildpackage -b
  

  $ unshare --map-root-user --map-auto
  $ cd /tmp/tmp.sbuild.*
  

  $ sbuild --extra-repository='deb http://deb.debian.org/debian experimental main'
  

  $ sbuild --chroot-mode=unshare --dist=<distro> --starting-build-commands=%SBUILD_SHELL hello-traditional
  

Using schroot


    $ schroot -l

    # Pick your own session name:
    $ echo -n "Session ID: " && read sessionid && schroot -b -c sid -n $sessionid
    # or use a random one:
    $ sessionid=$(schroot -b -c sid)

    $ dd-schroot-cmd -c $sessionid apt-get update
    $ dd-schroot-cmd -c $sessionid apt-get dist-upgrade
    [..]
    Do it for real [Y/n]: 
    [..]

    $ dd-schroot-cmd -c $sessionid apt-get build-dep hello
    [..]
    Do it for real [Y/n]: 
    [..]

    $ dd-schroot-cmd -c $sessionid apt-get install debhelper/jessie-backports
    [..]

    $ schroot -r -c $sessionid

    (sid_arch-dchroot)user@porterbox:~$ apt-get source hello

    (sid_arch-dchroot)user@porterbox:~$ exit
    $ schroot -e -c $sessionid
    $ exit

    $ schroot-list-sessions

    $ schroot --list --all-sessions