From d96c5fe5962c175973059e72036940070a559964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Torres=20P=C3=A9rez?= Date: Tue, 17 Dec 2024 13:15:11 +0100 Subject: [PATCH] Disable added repos before signing image --- files/scripts/dev/disableRepos.sh | 9 +++++++++ files/scripts/home/disableRepos.sh | 7 +++++++ recipes/dev/dev-recipe.yml | 4 ++++ recipes/recipe-home.yml | 4 ++++ 4 files changed, 24 insertions(+) create mode 100644 files/scripts/dev/disableRepos.sh create mode 100644 files/scripts/home/disableRepos.sh diff --git a/files/scripts/dev/disableRepos.sh b/files/scripts/dev/disableRepos.sh new file mode 100644 index 0000000..2279b18 --- /dev/null +++ b/files/scripts/dev/disableRepos.sh @@ -0,0 +1,9 @@ +#!/usr/bin/bash + +set -eoux pipefail + +sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/fedora-cisco-openh264.repo + +sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/atim-lazygit-fedora-41.repo +sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/atim-starship-fedora-41.repo +sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/atim-ubuntu-fonts-fedora-41.repo diff --git a/files/scripts/home/disableRepos.sh b/files/scripts/home/disableRepos.sh new file mode 100644 index 0000000..55885ed --- /dev/null +++ b/files/scripts/home/disableRepos.sh @@ -0,0 +1,7 @@ +#!/usr/bin/bash + +set -eoux pipefail + +sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/fedora-cisco-openh264.repo + +sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/atim-ubuntu-fonts-fedora-41.repo diff --git a/recipes/dev/dev-recipe.yml b/recipes/dev/dev-recipe.yml index 9f9724b..4349711 100644 --- a/recipes/dev/dev-recipe.yml +++ b/recipes/dev/dev-recipe.yml @@ -30,3 +30,7 @@ modules: file-conflict-policy: skip - from-file: common/autofirma.yml + + - type: script + scripts: + - dev/disableRepos.sh diff --git a/recipes/recipe-home.yml b/recipes/recipe-home.yml index ef5f1b1..8a4d18a 100644 --- a/recipes/recipe-home.yml +++ b/recipes/recipe-home.yml @@ -37,4 +37,8 @@ modules: - from-file: common/autofirma.yml + - type: script + scripts: + - home/disableRepos.sh + - type: signing # this sets up the proper policy & signing files for signed images to work fully