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