1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
#!/bin/sh
set -e
cd "$AUTOPKGTEST_TMP"
sed -i 's/modules: True/modules: False/' /etc/debomatic/debomatic.conf
grep /etc/debomatic/debomatic.conf -e "modules: False" || exit 1
sed -i "s|incoming: /incoming|incoming: $AUTOPKGTEST_TMP/incoming|" /etc/debomatic/debomatic.conf
grep /etc/debomatic/debomatic.conf -e "incoming: $AUTOPKGTEST_TMP/incoming" || exit 1
sed -i "s|loglevel: info|loglevel: debug|" /etc/debomatic/debomatic.conf
grep /etc/debomatic/debomatic.conf -e "loglevel: debug" || exit 1
sed -i "s|crossbuild: False|crossbuild: True|" /etc/debomatic/debomatic.conf
grep /etc/debomatic/debomatic.conf -e "crossbuild: True" || exit 1
if [ $(dpkg-architecture -qDEB_HOST_ARCH) = "arm64" ]
then
sed -i "s|hostarchitecture: None|hostarchitecture: amd64|" /etc/debomatic/debomatic.conf
grep /etc/debomatic/debomatic.conf -e "hostarchitecture: amd64" || exit 1
else
sed -i "s|hostarchitecture: None|hostarchitecture: arm64|" /etc/debomatic/debomatic.conf
grep /etc/debomatic/debomatic.conf -e "hostarchitecture: arm64" || exit 1
fi
mkdir -p $HOME/.dput.d/profiles
cat > $HOME/.dput.d/profiles/local.json << EOF
{
"meta": "debomatic",
"incoming": "$AUTOPKGTEST_TMP/incoming",
"method": "local",
"check-debs": {
"skip": true
}
}
EOF
mkdir "$AUTOPKGTEST_TMP"/incoming
version=$(rmadison -u debian -a source -s unstable hello-traditional | cut -d"|" -f 2 | xargs)
upstream=$(echo $version | cut -d"-" -f1 | xargs)
component=$(rmadison -u debian -a source -s unstable hello-traditional | cut -d"|" -f 3 | cut -d"/" -f2 | sed 's/unstable/main/' | xargs)
dget -u http://deb.debian.org/debian/pool/$component/h/hello-traditional/hello-traditional_$version.dsc
cd hello-traditional-$upstream/
debuild -S -d -uc -us
dput local ../hello-traditional_"$version"_source.changes
debomatic -c /etc/debomatic/debomatic.conf -o "$AUTOPKGTEST_TMP"/incoming/hello-traditional_"$version"_source.changes -i
cat "$AUTOPKGTEST_TMP"/incoming/unstable/pool/hello-traditional_$version/hello-traditional_$version.buildlog
grep "$AUTOPKGTEST_TMP"/incoming/unstable/pool/hello-traditional_$version/hello-traditional_$version.buildlog -e "Status: successful" || exit 1
if [ $(dpkg-architecture -qDEB_HOST_ARCH) = "arm64" ]
then
grep "$AUTOPKGTEST_TMP"/incoming/unstable/pool/hello-traditional_$version/hello-traditional_$version.buildlog -e "hello-traditional_"$version"_amd64.changes:$" || exit 1
else
grep "$AUTOPKGTEST_TMP"/incoming/unstable/pool/hello-traditional_$version/hello-traditional_$version.buildlog -e "hello-traditional_"$version"_arm64.changes:$" || exit 1
fi
rm -fr /etc/schroot/chroot.d/unstable-*-debomatic-*
rm -fr /etc/sbuild/chroot/unstable-*-debomatic
rm -fr /$AUTOPKGTEST_TMP/incoming/unstable/unstable
|