From 3b6f6024aec311f70464a51c9c585a292f14c475 Mon Sep 17 00:00:00 2001 From: Dan Bungert Date: Mon, 28 Feb 2022 15:00:25 -0700 Subject: [PATCH 1/3] os-prober: build from a git Build os-prober from a git repo instead of staging the focal version. Point to my mirror of os-prober as salsa is currently down. --- snapcraft.yaml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index c4f89071..bf6bb39a 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -197,11 +197,12 @@ parts: os-prober: plugin: nil - stage-packages: [os-prober] - override-stage: | - snapcraftctl stage - for file in $(grep -lr /usr | grep 'usr/[^/]*/[^/]*-probe[sr]'); do - sed -i 's, \(/usr\), $SNAP\1,' $file - done - sed -i 's/mkdir "$tmpmnt"/mkdir -p "$tmpmnt"/' \ - usr/lib/os-probes/50mounted-tests + source-type: git + source: https://github.com/dbungert/os-prober + source-commit: 2f5ec629a224aa322cb34f1378793d9cef7006d1 + build-packages: + - build-essential + - debhelper + override-build: | + ./debian/rules build install + cp -a debian/os-prober/{usr,var} $SNAPCRAFT_PART_INSTALL From 9179777aa2c1b9b82c44a7eabd618cc04e88fa86 Mon Sep 17 00:00:00 2001 From: Dan Bungert Date: Mon, 28 Feb 2022 15:14:55 -0700 Subject: [PATCH 2/3] os-prober: use snapified source Use my branch of os-prober which adds env variables for finding the lib & share directories. And set those env variables. --- snapcraft.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index bf6bb39a..3a73b655 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -34,6 +34,9 @@ apps: PYTHON: $SNAP/usr/bin/python3.8 os-prober: command: usr/bin/os-prober + environment: + OS_PROBER_SHARE: $SNAP/usr/share + OS_PROBER_LIB: $SNAP/usr/lib parts: curtin: @@ -199,7 +202,7 @@ parts: plugin: nil source-type: git source: https://github.com/dbungert/os-prober - source-commit: 2f5ec629a224aa322cb34f1378793d9cef7006d1 + source-commit: 80d6a3157a814278af4f96da91f9ab7218e20fdc build-packages: - build-essential - debhelper From 5124762de469617fd2851bdaf7ef30ea43223d05 Mon Sep 17 00:00:00 2001 From: Dan Bungert Date: Mon, 28 Feb 2022 15:18:36 -0700 Subject: [PATCH 3/3] probert: rev for os-prober, mdadm --- snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index 3a73b655..02e89598 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -185,7 +185,7 @@ parts: - libnl-route-3-dev source: https://github.com/canonical/probert.git source-type: git - source-commit: 2bb505172b5f97372eb1abd12ced4629e852504b + source-commit: feada4cbd01a56bca8adbc98aab2507590a017d5 requirements: [requirements.txt] stage: - "*"