Commit 8eecc5d9 authored by Julien Muchembled's avatar Julien Muchembled

build-rina: build with a normal user instead of root

parent 657859f8
......@@ -13,15 +13,15 @@ apt-sources =
apt-update =
for x in ${:apt-sources}
do echo deb [trusted=yes] file:`map $x` ./
done >>/etc/apt/sources.list
apt-get update
done |sudo sh -c "cat >>/etc/apt/sources.list
apt-get update"
[debuild-rina-base]
<= vm-run-base
mount.rina = ${irati-stack:location}
cd-source =
git clone -snc core.sparseCheckout=true /mnt/rina /rina
cd /rina
git clone -snc core.sparseCheckout=true /mnt/rina rina
cd rina
echo /${:component} > .git/info/sparse-checkout
git reset --hard
cd ${:component}
......@@ -32,7 +32,7 @@ cd-source =
[ "$dist" ] && dist=`lsb_release -sc`/$dist || dist=UNRELEASED
prepare =
build-deps =
mk-build-deps -irt 'apt-get -y'
mk-build-deps -irs sudo -t 'apt-get -y'
build =
dpkg-buildpackage -uc -b -jauto
finalize =
......@@ -57,12 +57,12 @@ command =
component = linux
prepare =
debian/dch-snapshot --force-distribution -D $dist
apt-get -y install kernel-wedge quilt python-six
sudo apt-get -y install kernel-wedge quilt python-six
QUILT_PATCHES=$PWD/debian/patches QUILT_PC=.pc quilt push --quiltrc - -a -q --fuzz=0
debian/rules debian/rules.gen || :
build =
arch=`dpkg-architecture -qDEB_HOST_ARCH`
make -j${:smp} -f debian/rules.gen binary-arch_$${arch}_none binary-libc-dev_$${arch}
fakeroot make -j${:smp} -f debian/rules.gen binary-arch_$${arch}_none binary-libc-dev_$${arch}
dpkg-genchanges -b -UBinary -UDescription \
>../linux_`dpkg-parsechangelog -S Version`_$${arch}.changes
......@@ -87,7 +87,7 @@ apt-sources = ${debuild-librina:location} ${debuild-rinad:location}
component = rina-tools
# check that the built packages install
finalize =
dpkg -i ../*.deb
sudo dpkg -i ../*.deb
${debuild-librina:finalize}
[test-rina]
......@@ -99,7 +99,7 @@ mount.slapos.package = ${slapos.package-repository:location}
commands = install test
install =
${:apt-update}
apt-get -y install librinad-dev rinad
sudo apt-get -y install librinad-dev rinad
: || {
mkdir rina-tools
cd rina-tools
......@@ -120,10 +120,10 @@ install =
MAKEFLAGS=-j${:smp} bin/buildout
}
/mnt/slapos.package/playbook/roles/rina/gen-ipcm-conf
systemctl enable ipcm-re6st
arch=`dpkg-architecture -qDEB_HOST_ARCH`
dpkg -i `map ${debuild-rina-kernel:location}`/linux-image-*-$${arch}_*.deb
sudo sh -c "/mnt/slapos.package/playbook/roles/rina/gen-ipcm-conf
systemctl enable ipcm-re6st
dpkg -i `map ${debuild-rina-kernel:location}`/linux-image-*-$${arch}_*.deb"
reboot
test = ( set -x
# TODO: more tests
......
......@@ -58,7 +58,7 @@ eggs = collective.recipe.template
[versions]
collective.recipe.template = 1.11
plone.recipe.command = 1.1
slapos.recipe.build = 0.25
slapos.recipe.build = 0.26
slapos.recipe.template = 2.7
# Replicate slapos stack, but without shacache to not have to compile the entire world for a simple test.
......
......@@ -137,7 +137,7 @@ slapos.cookbook = 1.0.41
slapos.core = 1.3.17
slapos.extension.strip = 0.1
slapos.libnetworkcache = 0.14.5
slapos.recipe.build = 0.25
slapos.recipe.build = 0.26
slapos.recipe.cmmi = 0.2
stevedore = 1.17.1
unicodecsv = 0.14.1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment