simple script to automate dpkg developer bootstrap

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

simple script to automate dpkg developer bootstrap

Joao Miguel Ferreira
Hello all,

I wrote this simple script to automate my cloning, making and building process for working with dpkg. Nothing new about it. All in it I got it from existing documentation, README files and such.

it's very "personnal" :)

expected to be run as root (real-root; did not try any other approach)

enjoy
Joao
=====================================
#!/bin/bash
echo "________________________________________Part I --- apt"
sleep 3
echo "________________________________________apt update"
apt update
#pt upgrade -y
echo "________________________________________apt install stuff"
apt install -y git ca-certificates libmodule-build-perl fakeroot gpg cppcheck shellcheck aspell aspell-en codespell i18nspector libtest-strict-perl libtest-minimumversion-perl libtest-perl-critic-perl libtest-pod-perl libtest-pod-coverage-perl libtest-spelling-perl libtest-synopsis-perl

echo "________________________________________Part II --- clone sources"
sleep 3
echo "________________________________________git clone a"
git clone https://git.dpkg.org/git/dpkg/dpkg.git
echo "________________________________________git clone b"
git clone https://git.dpkg.org/git/dpkg/dpkg-tests.git


echo "________________________________________Part III --- add remotes"
cd dpkg
pwd
sleep 10
echo "________________________________________remote add hadrons a"
git remote add guillem https://git.hadrons.org/git/debian/dpkg/dpkg.git
git fetch guillem
cd ..
echo "________________________________________remote add hadrons b"
cd dpkg-tests
pwd
git remote add guillem https://git.hadrons.org/git/debian/dpkg/dpkg-tests.git
git fetch guillem
echo "________________________________________remote adding done"
cd ..
pwd

cd dpkg
pwd
echo "________________________________________Part IV --- build and check dpkg"
sleep 10
echo "________________________________________apt build-dep"
apt build-dep -y .
echo "________________________________________autogen"
./autogen
echo "________________________________________configure"
./configure
echo "________________________________________make distcheck"
make distcheck
echo "________________________________________make check"
sleep 10
make check TESTSUITEFLAGS=--verbose TEST_PARALLEL=$(nproc) AUTHOR_TESTING=1
echo "________________________________________Part II end"

cd ..
pwd
cd dpkg-tests
pwd
sleep 10
echo "________________________________________Part V --- dpkg-tests"
echo "________________________________________db-regen"
./db-regen
echo "________________________________________make test"
echo "DPKG_BUILDTREE = $(realpath ../dpkg)" > .pkg-tests.conf
echo "DPKG_SERIES = 1.20.x" >>.pkg-tests.conf
make test
echo "________________________________________The End"
echo "________________________________________The End"