Commit 0bbde2a8 authored by Joanne Hugé's avatar Joanne Hugé

software/ors-amarisoft: give CAP_SYS_NICE permissions to lteenb with pre-installed local script

parent 797ac345
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
# not need these here). # not need these here).
[template] [template]
filename = instance.cfg filename = instance.cfg
md5sum = cc4f374a1cd654e15e1b2f9e97788ffd md5sum = 0ee897b4738b6e568456d7aa8c01bfd4
[template-lte-default] [template-lte-default]
_update_hash_filename_ = instance-default.jinja2.cfg _update_hash_filename_ = instance-default.jinja2.cfg
...@@ -23,7 +23,7 @@ md5sum = 6675abd2d45a65efbe5b3a8e2acfd001 ...@@ -23,7 +23,7 @@ md5sum = 6675abd2d45a65efbe5b3a8e2acfd001
[template-lte-enb] [template-lte-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg _update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = 40f30a7310ffb5819a7b86a49d43f9c2 md5sum = 516f66bd063a5054f95bac3e7884474a
[template-lte-mme] [template-lte-mme]
_update_hash_filename_ = instance-mme.jinja2.cfg _update_hash_filename_ = instance-mme.jinja2.cfg
......
...@@ -23,6 +23,8 @@ parts += ...@@ -23,6 +23,8 @@ parts +=
enb.jinja2.cfg enb.jinja2.cfg
# sdr driver is dependent on ENB thus should be added explicitely by software.cfg # sdr driver is dependent on ENB thus should be added explicitely by software.cfg
sdr-driver sdr-driver
lteenb-cap-sys-nice
lteenb-avx2-cap-sys-nice
# unimplemented parts - the http monitor and better log handling using logrotate # unimplemented parts - the http monitor and better log handling using logrotate
# apache-php # apache-php
# logrotate # logrotate
...@@ -83,10 +85,10 @@ eggs = ...@@ -83,10 +85,10 @@ eggs =
[amarisoft] [amarisoft]
recipe = slapos.recipe.build recipe = slapos.recipe.build
path = /opt/amarisoft/ path = /opt/amarisoft/lte
init = init =
import os import os
options['lte-version'] = os.readlink("%(path)s/lte" % options)[:-1] options['lte-version'] = os.readlink("%(path)s" % options)[:-1]
[copy-to-instance] [copy-to-instance]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
...@@ -98,7 +100,7 @@ url = ${:_profile_base_location_}/config/${:_buildout_section_name_} ...@@ -98,7 +100,7 @@ url = ${:_profile_base_location_}/config/${:_buildout_section_name_}
[unpack-to-instance] [unpack-to-instance]
recipe = slapos.recipe.build:download-unpacked recipe = slapos.recipe.build:download-unpacked
url = ${amarisoft:path}/${amarisoft:lte-version}/lte${:_buildout_section_name_}-linux-${amarisoft:lte-version}.tar.gz url = ${amarisoft:path}/lte${:_buildout_section_name_}-linux-${amarisoft:lte-version}.tar.gz
destination = ${buildout:directory}/${:_buildout_section_name_} destination = ${buildout:directory}/${:_buildout_section_name_}
strip-top-level-dir = true strip-top-level-dir = true
ignore-existing = true ignore-existing = true
...@@ -132,13 +134,13 @@ ims = ${ims.jinja2.cfg:md5sum} ...@@ -132,13 +134,13 @@ ims = ${ims.jinja2.cfg:md5sum}
[sdr] [sdr]
<= unpack-to-instance <= unpack-to-instance
url = ${amarisoft:path}/${amarisoft:lte-version}/trx_${:_buildout_section_name_}-linux-${amarisoft:lte-version}.tar.gz url = ${amarisoft:path}/trx_${:_buildout_section_name_}-linux-${amarisoft:lte-version}.tar.gz
destination = ${enb:destination}/x86_64 destination = ${enb:destination}/x86_64
md5sum = ${trx_sdr-linux:md5sum} md5sum = ${trx_sdr-linux:md5sum}
[lms] [lms]
<= unpack-to-instance <= unpack-to-instance
url = ${amarisoft:path}/${amarisoft:lte-version}/trx_${:_buildout_section_name_}-linux-${amarisoft:lte-version}.tar.gz url = ${amarisoft:path}/trx_${:_buildout_section_name_}-linux-${amarisoft:lte-version}.tar.gz
destination = ${enb:destination}/x86_64 destination = ${enb:destination}/x86_64
md5sum = ${trx_lms-linux:md5sum} md5sum = ${trx_lms-linux:md5sum}
...@@ -169,6 +171,25 @@ md5sum = 416b6167f70b12910fbbb9293038554c ...@@ -169,6 +171,25 @@ md5sum = 416b6167f70b12910fbbb9293038554c
filename = ${amarisoft:lte-version}/trx_sdr-linux-${amarisoft:lte-version}.tar.gz filename = ${amarisoft:lte-version}/trx_sdr-linux-${amarisoft:lte-version}.tar.gz
md5sum = e6960e3460f1a32c2436f36b2082995d md5sum = e6960e3460f1a32c2436f36b2082995d
[base-lteenb-cap-sys-nice]
recipe = plone.recipe.command
command =
getcap ${amarisoft:path}/${:binary} | grep cap_sys_nice+ep && exit 0;
# Make a copy or restore the copy, as patchelf will irreversibly change the md5sum
stat ${enb:destination}/${:binary}-unpriviledged ||
cp ${enb:destination}/${:binary} ${enb:destination}/${:binary}-unpriviledged &&
cp ${enb:destination}/${:binary}-unpriviledged ${enb:destination}/${:binary}
sudo -n ${amarisoft:path}/../give-cap-sys-nice-lteenb ${enb:destination}/${:binary} || true;
update-command = ${:command}
[lteenb-avx2-cap-sys-nice]
<= base-lteenb-cap-sys-nice
binary=lteenb
[lteenb-cap-sys-nice]
<= base-lteenb-cap-sys-nice
binary=lteenb-avx2
# this archive contains symbolic links # this archive contains symbolic links
#[www] #[www]
#<= unpack-to-instance #<= unpack-to-instance
......
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