• simple script to automate dpkg developer bootstrap

    From Joao Miguel Ferreira@21:1/5 to All on Fri Apr 24 12:40:02 2020
    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"

    <div dir="ltr"><div>Hello all,</div><div><br></div><div>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.<br><
    /div><div><br></div><div>it&#39;s very &quot;personnal&quot; :)</div><div><br></div><div><div>expected to be run as root (real-root; did not try any other approach)</div><div><br></div>enjoy</div><div>Joao<br></div><div>===================================
    ==</div><div>#!/bin/bash<br>echo &quot;________________________________________Part I --- apt&quot;<br>sleep 3<br>echo &quot;________________________________________apt update&quot;<br>apt update<br>#pt upgrade -y<br>echo &quot;___________________________
    _____________apt install stuff&quot;<br>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<br><br>echo &quot;________________________________________Part II --- clone sources&quot;<br>sleep 3<br>echo &quot;________________________________________git clone a&quot;<br>git
    clone <a href="https://git.dpkg.org/git/dpkg/dpkg.git">https://git.dpkg.org/git/dpkg/dpkg.git</a><br>echo &quot;________________________________________git clone b&quot;<br>git clone <a href="https://git.dpkg.org/git/dpkg/dpkg-tests.git">https://git.dpkg.
    org/git/dpkg/dpkg-tests.git</a><br><br><br>echo &quot;________________________________________Part III --- add remotes&quot;<br>cd dpkg<br>pwd<br>sleep 10<br>echo &quot;________________________________________remote add hadrons a&quot;<br>git remote add
    guillem <a href="https://git.hadrons.org/git/debian/dpkg/dpkg.git">https://git.hadrons.org/git/debian/dpkg/dpkg.git</a><br>git fetch guillem<br>cd ..<br>echo &quot;________________________________________remote add hadrons b&quot;<br>cd dpkg-tests<br>pwd<
    git remote add guillem <a href="https://git.hadrons.org/git/debian/dpkg/dpkg-tests.git">https://git.hadrons.org/git/debian/dpkg/dpkg-tests.git</a><br>git fetch guillem<br>echo &quot;________________________________________remote adding done&quot;<br>
    cd ..<br>pwd<br><br>cd dpkg<br>pwd<br>echo &quot;________________________________________Part IV --- build and check dpkg&quot;<br>sleep 10<br>echo &quot;________________________________________apt build-dep&quot;<br>apt build-dep -y .<br>echo &quot;_____
    ___________________________________autogen&quot;<br>./autogen<br>echo &quot;________________________________________configure&quot;<br>./configure<br>echo &quot;________________________________________make distcheck&quot;<br>make distcheck<br>echo &quot;_
    _______________________________________make check&quot;<br>sleep 10<br>make check TESTSUITEFLAGS=--verbose TEST_PARALLEL=$(nproc) AUTHOR_TESTING=1<br>echo &quot;________________________________________Part II end&quot;<br><br>cd ..<br>pwd<br>cd dpkg-
    tests<br>pwd<br>sleep 10<br>echo &quot;________________________________________Part V --- dpkg-tests&quot;<br>echo &quot;________________________________________db-regen&quot;<br>./db-regen<br>echo &quot;________________________________________make test&
    quot;<br>echo &quot;DPKG_BUILDTREE = $(realpath ../dpkg)&quot; &gt; .pkg-tests.conf<br>echo &quot;DPKG_SERIES = 1.20.x&quot; &gt;&gt;.pkg-tests.conf<br>make test<br>echo &quot;________________________________________The End&quot;<br>echo &quot;___________
    _____________________________The End&quot;</div><div><br></div></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)