From 338f53c30a343452ad7dbf136d0b25aee898a525 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Sat, 11 Nov 2023 07:10:40 -0700 Subject: [PATCH] turn off bootstrap image --- .../empanadas/templates/isomock.tmpl.cfg | 1 + mangle/versions/compare_pipe.sh | 29 +++++++++++++++++++ mangle/versions/generate_diff.sh | 5 ++++ mangle/versions/generate_src_list.sh | 10 +++++++ 4 files changed, 45 insertions(+) create mode 100644 mangle/versions/compare_pipe.sh create mode 100644 mangle/versions/generate_diff.sh create mode 100644 mangle/versions/generate_src_list.sh diff --git a/iso/empanadas/empanadas/templates/isomock.tmpl.cfg b/iso/empanadas/empanadas/templates/isomock.tmpl.cfg index 907e658..bcdd764 100644 --- a/iso/empanadas/empanadas/templates/isomock.tmpl.cfg +++ b/iso/empanadas/empanadas/templates/isomock.tmpl.cfg @@ -9,6 +9,7 @@ config_opts['releasever'] = '{{ major }}' config_opts['package_manager'] = '{{ pkgmanager|default("dnf") }}' config_opts['extra_chroot_dirs'] = [ '/run/lock', ] # config_opts['bootstrap_image'] = 'quay.io/{{ shortname|lower }}/{{ shortname|lower }}:{{ major }}' +config_opts['use_bootstrap_image'] = False # If compose is local, the bind mounts will be here {% if compose_dir_is_here %} diff --git a/mangle/versions/compare_pipe.sh b/mangle/versions/compare_pipe.sh new file mode 100644 index 0000000..70f78b5 --- /dev/null +++ b/mangle/versions/compare_pipe.sh @@ -0,0 +1,29 @@ +#!/bin/bash +if [ -f /tmp/old_newer ]; then + /bin/rm /tmp/old_newer +fi +if [ -f /tmp/new_newer ]; then + /bin/rm /tmp/new_newer +fi +for x in $(cat /tmp/endgame); do + VER1_NAME=$(echo ${x} | cut -d'|' -f 1 | sed 's/^\(.*\)-\([^-]\{1,\}\)-\([^-]\{1,\}\)$/\1/') + VER1_EPO=$(echo ${x} | cut -d'|' -f 1 | sed 's/^\(.*\)-\([^-]\{1,\}\)-\([^-]\{1,\}\)$/\2/' | cut -d':' -f1) + VER1_VER=$(echo ${x} | cut -d'|' -f 1 | sed 's/^\(.*\)-\([^-]\{1,\}\)-\([^-]\{1,\}\)$/\2/') + VER1_REL=$(echo ${x} | cut -d'|' -f 1 | sed 's/^\(.*\)-\([^-]\{1,\}\)-\([^-]\{1,\}\)$/\3/') + VER2_NAME=$(echo ${x} | cut -d'|' -f 2 | sed 's/^\(.*\)-\([^-]\{1,\}\)-\([^-]\{1,\}\)$/\1/') + VER2_EPO=$(echo ${x} | cut -d'|' -f 2 | sed 's/^\(.*\)-\([^-]\{1,\}\)-\([^-]\{1,\}\)$/\2/' | cut -d':' -f1) + VER2_VER=$(echo ${x} | cut -d'|' -f 2 | sed 's/^\(.*\)-\([^-]\{1,\}\)-\([^-]\{1,\}\)$/\2/') + VER2_REL=$(echo ${x} | cut -d'|' -f 2 | sed 's/^\(.*\)-\([^-]\{1,\}\)-\([^-]\{1,\}\)$/\3/') + VER1=$(echo ${x} | cut -d'|' -f 1) + VER2=$(echo ${x} | cut -d'|' -f 2) + rpmdev-vercmp ${VER1_EPO} ${VER1_VER} ${VER1_REL} ${VER2_EPO} ${VER2_VER} ${VER2_REL} 2>&1 > /dev/null + ret_val=$? + if [[ "$ret_val" -eq "11" ]]; then + echo ${VER1} >> /tmp/old_newer + fi + if [[ "$ret_val" -eq "12" ]]; then + echo ${VER2} >> /tmp/new_newer + fi +done + +echo "Files generated: /tmp/old_newer /tmp/new_newer" diff --git a/mangle/versions/generate_diff.sh b/mangle/versions/generate_diff.sh new file mode 100644 index 0000000..50bd6c6 --- /dev/null +++ b/mangle/versions/generate_diff.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +diff -y /tmp/list_a /tmp/list_b | grep '|' > /tmp/diffs +sed -e 's/\t//g' -e 's/ //g' /tmp/diffs > /tmp/endgame +echo "Cleaned table in /tmp/endgame" diff --git a/mangle/versions/generate_src_list.sh b/mangle/versions/generate_src_list.sh new file mode 100644 index 0000000..f674664 --- /dev/null +++ b/mangle/versions/generate_src_list.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +OLD_REPO="https://yumrepofs.build.resf.org/v1/projects/dff20351-7d36-4f7c-9eea-7f039f5026d0/repo/all/src" +NEW_REPO="https://yumrepofs.build.resf.org/v1/projects/6202c09e-6252-4d3a-bcd3-9c7751682970/repo/all/src" + +dnf repoquery --repofrompath=p,${OLD_REPO} --disablerepo=* --enablerepo=p -q -a --qf '%{NAME}-%{EPOCH}:%{VERSION}-%{RELEASE}' > /tmp/list_a + +dnf repoquery --repofrompath=q,${NEW_REPO} --disablerepo=* --enablerepo=q -q -a --qf '%{NAME}-%{EPOCH}:%{VERSION}-%{RELEASE}' > /tmp/list_b + +echo "Please manually compare to check for brand new or obsoleted packages"