summaryrefslogtreecommitdiff
path: root/build-recipe-livebuild
diff options
context:
space:
mode:
authorJan Blunck <jblunck@infradead.org>2014-07-07 18:01:41 +0200
committerJan Blunck <jblunck@infradead.org>2014-07-08 21:02:09 +0200
commited06a77c16cd3be654d7ea9076232bbb06d84743 (patch)
tree7e28438e0a19b45854bfd77c324266506b8ee4cb /build-recipe-livebuild
parentbf717097fe8630705b139a4ecf41e4e48653d354 (diff)
livebuild: Prevent users from configuring archives in lb config
Since the OBS live-build only has access to the configured repositories (due to the lack of network access) the user shall not configure archives inside the configuration itself. Signed-off-by: Jan Blunck <jblunck@infradead.org>
Diffstat (limited to 'build-recipe-livebuild')
-rw-r--r--build-recipe-livebuild4
1 files changed, 4 insertions, 0 deletions
diff --git a/build-recipe-livebuild b/build-recipe-livebuild
index 7b6f095..5570a29 100644
--- a/build-recipe-livebuild
+++ b/build-recipe-livebuild
@@ -76,6 +76,10 @@ EOF
tar -xvf $BUILD_ROOT/$TOPDIR/SOURCES/$RECIPEFILE \
-C $BUILD_ROOT/$TOPDIR/LIVEBUILD_ROOT || cleanup_and_exit 1
+ # Sanity check to not configure archives inside configuration
+ local files=($BUILD_ROOT/$TOPDIR/LIVEBUILD_ROOT/config/archives/*)
+ [ ${#files[@]} -gt 0 ] && cleanup_and_exit 1
+
if [ -f $BUILD_ROOT/$TOPDIR/SOURCES/livebuild_pre_run ] ; then
cp $BUILD_ROOT/$TOPDIR/SOURCES/livebuild_pre_run \
$BUILD_ROOT/.build.livebuild_pre_run