Change in osmo-ci[master]: repo-install-test: don't mount /data

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

osmith gerrit-no-reply at lists.osmocom.org
Wed May 27 11:56:16 UTC 2020


osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/18518 )


Change subject: repo-install-test: don't mount /data
......................................................................

repo-install-test: don't mount /data

The "run-inside-docker.sh" script is running as root (in order to be
able to install packages). Do not mount an outside directory as /data
inside the image anymore, where the script would write temporary data.
This causes problems on jenkins, as the temporary files are written as
root and jenkins is then unable to wipe the workspace.

I had used this for debugging when I wrote the script initially, but
almost the same can be done now with INTERACTIVE=1 and cat on the
temporary files.

Related: OS#4563
Change-Id: If7e1d83580c2951e7e50181ba7e755b987675e4b
---
M scripts/repo-install-test.sh
M scripts/repo-install-test/run-inside-docker.sh
2 files changed, 9 insertions(+), 10 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/18/18518/1

diff --git a/scripts/repo-install-test.sh b/scripts/repo-install-test.sh
index 4bc0fab..ac8242d 100755
--- a/scripts/repo-install-test.sh
+++ b/scripts/repo-install-test.sh
@@ -52,7 +52,6 @@
 # * SYS_NICE: needed for changing CPUScheduling{Policy,Priority} (osmo-bts systemd service files)
 docker run	--rm \
 		-v "$OSMO_CI_DIR/scripts/repo-install-test:/repo-install-test:ro" \
-		-v "$OSMO_CI_DIR/_repo_install_test_data:/data" \
 		--name "$CONTAINER" \
 		-e FEED="$FEED" \
 		-e DISTRO="$DISTRO" \
diff --git a/scripts/repo-install-test/run-inside-docker.sh b/scripts/repo-install-test/run-inside-docker.sh
index 4265180..c8a28fe 100755
--- a/scripts/repo-install-test/run-inside-docker.sh
+++ b/scripts/repo-install-test/run-inside-docker.sh
@@ -94,15 +94,15 @@
 	echo "keepcache=1" >> /etc/dnf/dnf.conf
 }
 
-# Filter /data/osmocom_packages_all.txt through a blacklist_$DISTRO.txt and store the result in
-# /data/osmocom_packages.txt.
+# Filter $PWD/osmocom_packages_all.txt through a blacklist_$DISTRO.txt and store the result in
+# $PWD/osmocom_packages.txt.
 filter_packages_txt() {
 	# Copy distro specific blacklist file, remove comments and sort it
-	grep -v "^#" /repo-install-test/blacklist_$DISTRO.txt | sort -u > /data/blacklist.txt
+	grep -v "^#" /repo-install-test/blacklist_$DISTRO.txt | sort -u > blacklist.txt
 
 	# Generate list of pkgs to be installed from available pkgs minus the ones blacklisted
-	comm -23 /data/osmocom_packages_all.txt \
-		/data/blacklist.txt > /data/osmocom_packages.txt
+	comm -23 osmocom_packages_all.txt \
+		blacklist.txt > osmocom_packages.txt
 }
 
 install_repo_packages_debian() {
@@ -112,10 +112,10 @@
 	# https://www.debian.org/doc/manuals/aptitude/ch02s04s05.en.html
 	aptitude search -F%p \
 		"?origin($OBS) ?architecture(native)" | sort \
-		> /data/osmocom_packages_all.txt
+		> osmocom_packages_all.txt
 
 	filter_packages_txt
-	apt install -y $(cat /data/osmocom_packages.txt)
+	apt install -y $(cat osmocom_packages.txt)
 }
 
 install_repo_packages_centos() {
@@ -127,10 +127,10 @@
 		--repoid="network_osmocom_$FEED" \
 		--archlist="x86_64,noarch" \
 		--qf="%{name}" \
-		> /data/osmocom_packages_all.txt
+		> osmocom_packages_all.txt
 
 	filter_packages_txt
-	dnf install -y $(cat /data/osmocom_packages.txt)
+	dnf install -y $(cat osmocom_packages.txt)
 }
 
 test_binaries_version() {

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/18518
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: If7e1d83580c2951e7e50181ba7e755b987675e4b
Gerrit-Change-Number: 18518
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200527/b93214ef/attachment.htm>


More information about the gerrit-log mailing list