From 6b1db03296747381b4bbb4e74e9c7a9e460d36d2 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 15 Jun 2022 21:26:21 +0000 Subject: [PATCH] Complete revamp from old repo - Added 9 support - Ported over all code from personal Gitlab - html/ folder with files for easy content display - Updated README (more readme updates and setup guide coming soon) -Skip G. --- README.md | 34 + html/RHEL_Rocky8_Compare.html | 56 ++ html/RHEL_Rocky8_Compare_Beta_src_stg.html | 56 ++ html/RHEL_Rocky8_Compare_Beta_stg.html | 56 ++ html/RHEL_Rocky8_Compare_src.html | 58 ++ html/RHEL_Rocky8_Compare_src_stg.html | 55 ++ html/RHEL_Rocky8_Compare_stg.html | 55 ++ html/RHEL_Rocky8_Module_Compare.html | 29 + html/RHEL_Rocky8_Module_Compare_Beta_stg.html | 28 + html/RHEL_Rocky8_Module_Compare_stg.html | 28 + html/RHEL_Rocky9_Compare.html | 56 ++ html/RHEL_Rocky9_Compare_Beta_src_stg.html | 56 ++ html/RHEL_Rocky9_Compare_Beta_stg.html | 56 ++ html/RHEL_Rocky9_Compare_src.html | 56 ++ html/RHEL_Rocky9_Compare_src_stg.html | 55 ++ html/RHEL_Rocky9_Compare_stg.html | 56 ++ html/RHEL_Rocky9_Module_Compare.html | 29 + html/RHEL_Rocky9_Module_Compare_Beta_stg.html | 28 + html/RHEL_Rocky9_Module_Compare_stg.html | 29 + html/index.html | 56 ++ html/repocompare_menu.js | 76 ++ html/repocompare_results/readme.txt | 6 + mkrepofile.sh | 715 ++++++++++++++++++ module_compare_html.sh | 147 ++++ repo_compare_html.sh | 47 +- repo_compare_launcher.sh | 65 ++ repo_requires_html.sh | 129 ++++ 27 files changed, 2096 insertions(+), 21 deletions(-) create mode 100644 html/RHEL_Rocky8_Compare.html create mode 100644 html/RHEL_Rocky8_Compare_Beta_src_stg.html create mode 100644 html/RHEL_Rocky8_Compare_Beta_stg.html create mode 100644 html/RHEL_Rocky8_Compare_src.html create mode 100644 html/RHEL_Rocky8_Compare_src_stg.html create mode 100644 html/RHEL_Rocky8_Compare_stg.html create mode 100644 html/RHEL_Rocky8_Module_Compare.html create mode 100644 html/RHEL_Rocky8_Module_Compare_Beta_stg.html create mode 100644 html/RHEL_Rocky8_Module_Compare_stg.html create mode 100644 html/RHEL_Rocky9_Compare.html create mode 100644 html/RHEL_Rocky9_Compare_Beta_src_stg.html create mode 100644 html/RHEL_Rocky9_Compare_Beta_stg.html create mode 100644 html/RHEL_Rocky9_Compare_src.html create mode 100644 html/RHEL_Rocky9_Compare_src_stg.html create mode 100644 html/RHEL_Rocky9_Compare_stg.html create mode 100644 html/RHEL_Rocky9_Module_Compare.html create mode 100644 html/RHEL_Rocky9_Module_Compare_Beta_stg.html create mode 100644 html/RHEL_Rocky9_Module_Compare_stg.html create mode 100644 html/index.html create mode 100644 html/repocompare_menu.js create mode 100644 html/repocompare_results/readme.txt create mode 100755 mkrepofile.sh create mode 100755 module_compare_html.sh create mode 100755 repo_compare_launcher.sh create mode 100755 repo_requires_html.sh diff --git a/README.md b/README.md index 35210d2..9a1cf0c 100644 --- a/README.md +++ b/README.md @@ -9,3 +9,37 @@ Example call: ```./repo_compare_html.sh RHEL8_BaseOS Rocky8_BaseOS``` WARNING: only compares default modules right now! Non-default module comparisons coming soon(tm) WARNING: The order of the arguments VERY MUCH MATTERS! For Rocky 8 comparisons, RHEL repos should ALWAYS come first, they are the source to compare against! + +
+
+ +# ModuleCompare + +This is a similar script to the above RepoCompare, but will analyze all the module versions against each other from one distro to the next. + +It's called like the above script, except with a comma separated list of repositories that include modules. + +For example, a typical usage looks like this: ```./module_compare_html.sh RHEL8_AppStream,RHEL8_CodeReady Rocky8_AppStream,Rocky8_PowerTools``` + +The example compares all modules found in RHEL AppStream and CodeReady against their Rocky equivalents. + +Note that only the packages contained in a module are compared. No other metadata (module version strings, etc.) is considered, as it is likely unique and not meant to be copied. + +WARNING: As with the above script, the order of the arguments absolutely matters. Generally RHEL repos should be listed first, as the source to compare against. + + +
+
+ +# Support Scripts + +A couple support scripts are also in the repository: + +**mkrepofile.sh :** Create repo files for Rocky and duplicate ones with friendly names for the RHEL repos + +
+ +**repo_compare_launcher.sh :** Run all combinations of repocompare RHEL8 <---> Rocky8. Compares production, staging, source, modules, RHEL Beta, etc. + + + diff --git a/html/RHEL_Rocky8_Compare.html b/html/RHEL_Rocky8_Compare.html new file mode 100644 index 0000000..ba22ec6 --- /dev/null +++ b/html/RHEL_Rocky8_Compare.html @@ -0,0 +1,56 @@ + + Rocky Linux Live Package Difference Status + + + + + + + + + + +





+ +

BaseOS 8 Repositories:

+ + +



+ +

AppStream Repositories:

+ + +



+ +

PowerTools/CodeReady Repositories:

+ + +



+ +

Resilient Storage Repositories:

+ + +



+

High Availability Repositories:

+ + +



+ + + diff --git a/html/RHEL_Rocky8_Compare_Beta_src_stg.html b/html/RHEL_Rocky8_Compare_Beta_src_stg.html new file mode 100644 index 0000000..1fbfd63 --- /dev/null +++ b/html/RHEL_Rocky8_Compare_Beta_src_stg.html @@ -0,0 +1,56 @@ + + Rocky Linux Live Package Difference Status + + + + + +

+ + + + +





+ +

BaseOS 8 Beta SRPM Repositories:

+ + +



+ +

AppStream 8 Beta SRPM Repositories:

+ + +



+ +

PowerTools/CodeReady 8 Beta SRPM Repositories:

+ + +



+ +

Resilient Storage 8 Beta SRPM Repositories:

+ + +



+

High Availability 8 Beta SRPM Repositories:

+ + +



+ + + diff --git a/html/RHEL_Rocky8_Compare_Beta_stg.html b/html/RHEL_Rocky8_Compare_Beta_stg.html new file mode 100644 index 0000000..a79871f --- /dev/null +++ b/html/RHEL_Rocky8_Compare_Beta_stg.html @@ -0,0 +1,56 @@ + + Rocky Linux Live Package Difference Status + + + + + +

+ + + + +





+ +

BaseOS 8 Beta Repositories:

+ + +



+ +

AppStream 8 Beta Repositories:

+ + +



+ +

PowerTools/CodeReady 8 Beta Repositories:

+ + +



+ +

Resilient Storage 8 Beta Repositories:

+ + +



+

High Availability 8 Beta Repositories:

+ + +



+ + + diff --git a/html/RHEL_Rocky8_Compare_src.html b/html/RHEL_Rocky8_Compare_src.html new file mode 100644 index 0000000..b19476a --- /dev/null +++ b/html/RHEL_Rocky8_Compare_src.html @@ -0,0 +1,58 @@ + + + Rocky Linux Live Package Difference Status + + + + + + + +

+ + + +





+ +

BaseOS 8 SRPM Repositories:

+ + +



+ +

AppStream 8 SRPM Repositories:

+ + +



+ +

PowerTools/CodeReady 8 SRPM Repositories:

+ + +



+ +

Resilient Storage 8 SRPM Repositories:

+ + +



+

High Availability 8 SRPM Repositories:

+ + +



+ + + diff --git a/html/RHEL_Rocky8_Compare_src_stg.html b/html/RHEL_Rocky8_Compare_src_stg.html new file mode 100644 index 0000000..db14ab7 --- /dev/null +++ b/html/RHEL_Rocky8_Compare_src_stg.html @@ -0,0 +1,55 @@ + + Rocky Linux Live Package Difference Status + + + + + +

+ + + +





+ +

BaseOS 8 SRPM Repositories:

+ + +



+ +

AppStream 8 SRPM Repositories:

+ + +



+ +

PowerTools/CodeReady 8 SRPM Repositories:

+ + +



+ +

Resilient Storage 8 SRPM Repositories:

+ + +



+

High Availability 8 SRPM Repositories:

+ + +



+ + + diff --git a/html/RHEL_Rocky8_Compare_stg.html b/html/RHEL_Rocky8_Compare_stg.html new file mode 100644 index 0000000..b9f565e --- /dev/null +++ b/html/RHEL_Rocky8_Compare_stg.html @@ -0,0 +1,55 @@ + + Rocky Linux Live Package Difference Status + + + + + +

+ + + +





+ +

BaseOS Repositories:

+ + +



+ +

AppStream Repositories:

+ + +



+ +

PowerTools/CodeReady Repositories:

+ + +



+ +

Resilient Storage Repositories:

+ + +



+

High Availability Repositories:

+ + +



+ + + diff --git a/html/RHEL_Rocky8_Module_Compare.html b/html/RHEL_Rocky8_Module_Compare.html new file mode 100644 index 0000000..a3721d3 --- /dev/null +++ b/html/RHEL_Rocky8_Module_Compare.html @@ -0,0 +1,29 @@ + + Rocky Linux Live Package Difference Status + + + + + +

+ + + + +





+ +

AppStream + CodeReady/PowerTools 8 Modules:

+ + +



+ + + diff --git a/html/RHEL_Rocky8_Module_Compare_Beta_stg.html b/html/RHEL_Rocky8_Module_Compare_Beta_stg.html new file mode 100644 index 0000000..7eceb72 --- /dev/null +++ b/html/RHEL_Rocky8_Module_Compare_Beta_stg.html @@ -0,0 +1,28 @@ + + Rocky Linux Live Package Difference Status + + + + +

+ + + + +





+ +

AppStream + CodeReady/PowerTools 8 Beta/Staging Modules:

+ + +



+ + + diff --git a/html/RHEL_Rocky8_Module_Compare_stg.html b/html/RHEL_Rocky8_Module_Compare_stg.html new file mode 100644 index 0000000..11f04e5 --- /dev/null +++ b/html/RHEL_Rocky8_Module_Compare_stg.html @@ -0,0 +1,28 @@ + + Rocky Linux Live Package Difference Status + + + + +

+ + + + +





+ +

AppStream + CodeReady/PowerTools 8 Modules: (Staging)

+ + +



+ + + diff --git a/html/RHEL_Rocky9_Compare.html b/html/RHEL_Rocky9_Compare.html new file mode 100644 index 0000000..426c53e --- /dev/null +++ b/html/RHEL_Rocky9_Compare.html @@ -0,0 +1,56 @@ + + Rocky Linux Live Package Difference Status + + + + + +

+ + + + +





+ +

BaseOS 9 Repositories:

+ + +



+ +

AppStream 9 Repositories:

+ + +



+ +

PowerTools/CodeReady 9 Repositories:

+ + +



+ +

Resilient Storage 9 Repositories:

+ + +



+

High Availability 9 Repositories:

+ + +



+ + + diff --git a/html/RHEL_Rocky9_Compare_Beta_src_stg.html b/html/RHEL_Rocky9_Compare_Beta_src_stg.html new file mode 100644 index 0000000..fac8d19 --- /dev/null +++ b/html/RHEL_Rocky9_Compare_Beta_src_stg.html @@ -0,0 +1,56 @@ + + Rocky Linux Live Package Difference Status + + + + + +

+ + + + +





+ +

BaseOS 9 Beta SRPM Repositories:

+ + +



+ +

AppStream 9 Beta SRPM Repositories:

+ + +



+ +

PowerTools/CodeReady 9 Beta SRPM Repositories:

+ + +



+ +

Resilient Storage 9 Beta SRPM Repositories:

+ + +



+

High Availability 9 Beta SRPM Repositories:

+ + +



+ + + diff --git a/html/RHEL_Rocky9_Compare_Beta_stg.html b/html/RHEL_Rocky9_Compare_Beta_stg.html new file mode 100644 index 0000000..05f0dbf --- /dev/null +++ b/html/RHEL_Rocky9_Compare_Beta_stg.html @@ -0,0 +1,56 @@ + + Rocky Linux Live Package Difference Status + + + + + +

+ + + + +





+ +

BaseOS 9 Beta Repositories:

+ + +



+ +

AppStream 9 Beta Repositories:

+ + +



+ +

PowerTools/CodeReady 9 Beta Repositories:

+ + +



+ +

Resilient Storage 9 Beta Repositories:

+ + +



+

High Availability 9 Beta Repositories:

+ + +



+ + + diff --git a/html/RHEL_Rocky9_Compare_src.html b/html/RHEL_Rocky9_Compare_src.html new file mode 100644 index 0000000..889ed62 --- /dev/null +++ b/html/RHEL_Rocky9_Compare_src.html @@ -0,0 +1,56 @@ + + Rocky Linux Live Package Difference Status + + + + + +

+ + + + +





+ +

BaseOS 9 SRPM Repositories:

+ + +



+ +

AppStream 9 SRPM Repositories:

+ + +



+ +

PowerTools/CodeReady 9 SRPM Repositories:

+ + +



+ +

Resilient Storage 9 SRPM Repositories:

+ + +



+

High Availability 9 SRPM Repositories:

+ + +



+ + + diff --git a/html/RHEL_Rocky9_Compare_src_stg.html b/html/RHEL_Rocky9_Compare_src_stg.html new file mode 100644 index 0000000..b544cc3 --- /dev/null +++ b/html/RHEL_Rocky9_Compare_src_stg.html @@ -0,0 +1,55 @@ + + Rocky Linux Live Package Difference Status + + + + +

+ + + + +





+ +

BaseOS 9 Source Staging Repositories:

+ + +



+ +

AppStream 9 Source Staging Repositories:

+ + +



+ +

PowerTools/CodeReady 9 Source Staging Repositories:

+ + +



+ +

Resilient Storage 9 Source Repositories:

+ + +



+

High Availability 9 Source Repositories:

+ + +



+ + + diff --git a/html/RHEL_Rocky9_Compare_stg.html b/html/RHEL_Rocky9_Compare_stg.html new file mode 100644 index 0000000..ef17326 --- /dev/null +++ b/html/RHEL_Rocky9_Compare_stg.html @@ -0,0 +1,56 @@ + + Rocky Linux Live Package Difference Status + + + + + +

+ + + + +





+ +

BaseOS Repositories:

+ + +



+ +

AppStream Repositories:

+ + +



+ +

PowerTools/CodeReady Repositories:

+ + +



+ +

Resilient Storage Repositories:

+ + +



+

High Availability Repositories:

+ + +



+ + + diff --git a/html/RHEL_Rocky9_Module_Compare.html b/html/RHEL_Rocky9_Module_Compare.html new file mode 100644 index 0000000..81a6c66 --- /dev/null +++ b/html/RHEL_Rocky9_Module_Compare.html @@ -0,0 +1,29 @@ + + Rocky Linux Live Package Difference Status + + + + + +

+ + + + +





+ +

AppStream + CodeReady/PowerTools 9 Modules:

+ + +



+ + + diff --git a/html/RHEL_Rocky9_Module_Compare_Beta_stg.html b/html/RHEL_Rocky9_Module_Compare_Beta_stg.html new file mode 100644 index 0000000..e829e73 --- /dev/null +++ b/html/RHEL_Rocky9_Module_Compare_Beta_stg.html @@ -0,0 +1,28 @@ + + Rocky Linux Live Package Difference Status + + + + +

+ + + + +





+ +

AppStream + CodeReady/PowerTools 9 Beta/Staging Modules:

+ + +



+ + + diff --git a/html/RHEL_Rocky9_Module_Compare_stg.html b/html/RHEL_Rocky9_Module_Compare_stg.html new file mode 100644 index 0000000..209e664 --- /dev/null +++ b/html/RHEL_Rocky9_Module_Compare_stg.html @@ -0,0 +1,29 @@ + + Rocky Linux Live Package Difference Status + + + + +

+ + + + + +





+ +

AppStream + CodeReady/PowerTools 9 Modules: (Staging)

+ + +



+ + + diff --git a/html/index.html b/html/index.html new file mode 100644 index 0000000..ba22ec6 --- /dev/null +++ b/html/index.html @@ -0,0 +1,56 @@ + + Rocky Linux Live Package Difference Status + + + + + +

+ + + + +





+ +

BaseOS 8 Repositories:

+ + +



+ +

AppStream Repositories:

+ + +



+ +

PowerTools/CodeReady Repositories:

+ + +



+ +

Resilient Storage Repositories:

+ + +



+

High Availability Repositories:

+ + +



+ + + diff --git a/html/repocompare_menu.js b/html/repocompare_menu.js new file mode 100644 index 0000000..d978e62 --- /dev/null +++ b/html/repocompare_menu.js @@ -0,0 +1,76 @@ +document.getElementById('topMenu').innerHTML = ` +

Live RHEL <----> Rocky Linux Package Comparison

+ + +


+ This is a simple page to keep live track of the package differences/drift between RHEL and Rocky Linux. +

+ This page compares the RHEL repository package version(s) against the current Rocky public repos. +

+ The data on this page should be updated every 4 hours. +

+ Historical data can be found in this subdirectory: repocompare_results/ +

+ Important Note: This comparison only includes default modules and non-modular packages. +
+ +


+ +

Other Package comparisons between RHEL <--> Rocky Linux:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
RHEL/Rocky 8RHEL/Rocky 9RHEL 8 Beta / Rocky 8 StagingRHEL 9 Beta / Rocky 9 Staging
Package Repo Comparison (8)Package Repo Comparison (9)Package Repo Comparison (8 Beta)Package Repo Comparison (9 Beta)
SRPM Repo Comparison (8)SRPM Repo Comparison (9)SRPM Repo Comparison (8 Beta)SRPM Repo Comparison (9 Beta)
Modules Repo Comparison (8)Modules Repo Comparison (9)Modules Repo Comparison (8 Beta)Modules Repo Comparison (9 Beta)
Package Repo Comparison (8 staging)Package Repo Comparison (9 staging)
SRPM Repo Comparison (8 staging)SRPM Repo Comparison (9 staging)
Modules Repo Comparison (8 staging)Modules Repo Comparison (9 staging)
+ + + +`; diff --git a/html/repocompare_results/readme.txt b/html/repocompare_results/readme.txt new file mode 100644 index 0000000..655ba6d --- /dev/null +++ b/html/repocompare_results/readme.txt @@ -0,0 +1,6 @@ +Results from the repocompare launcher script should be written to this directory. + +You can then symlink or clone all of html/ (and this folder) to a web directory of your choice for browsing. + + +All html content should be static, no special server configs or code are needed. diff --git a/mkrepofile.sh b/mkrepofile.sh new file mode 100755 index 0000000..8852860 --- /dev/null +++ b/mkrepofile.sh @@ -0,0 +1,715 @@ +#!/bin/bash + +# Simple script to produce valid Rocky + RHEL repos with nice names +# (so the repo compare html script can be run against them) +# +# We assume we're running on a RHEL 8 box with a valid entitlement +# (and that /etc/yum.repos.d/redhat.repo exists) + +RHREPOFILE='/etc/yum.repos.d/redhat.repo' + +# what each RedHat main URL line should start with: +#RH8_URL_LINE="mirrorlist = https://rhui3.REGION.aws.ce.redhat.com/pulp/mirror/content/dist/rhel8/rhui/\$releasever/\$basearch" +RH8_URL_LINE="baseurl = https://cdn.redhat.com/content/dist/rhel8/8/\$basearch" +RH8_BETA_LINE="baseurl = https://cdn.redhat.com/content/beta/rhel8/8/\$basearch" +RH9_URL_LINE="baseurl = https://cdn.redhat.com/content/dist/rhel9/9/\$basearch" +RH9_BETA_LINE="baseurl = https://cdn.redhat.com/content/beta/rhel9/9/\$basearch" + + + +# Get the proper cert/key files - these are rotated regularly, so we need them as variables: +cacert=$(grep 'sslcacert' ${RHREPOFILE} | head -1) +clientkey=$(grep 'sslclientkey' ${RHREPOFILE} | head -1) +clientcert=$(grep 'sslclientcert' ${RHREPOFILE} | head -1) + + +# Big giant echo to (re)create Rocky/RHEL repo file +cat > /etc/yum.repos.d/rocky_repocompare.repo << EOF +# Test Rocky repos for comparison + +# RHEL 8 repos, with alternate names: +[RHEL8_BaseOS] +name = Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs) +${RH8_URL_LINE}/baseos/os +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 1 + + +[RHEL8_AppStream] +name = Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs) +${RH8_URL_LINE}/appstream/os +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 1 + + + +[RHEL8_CodeReady] +name = Red Hat CodeReady Linux Builder for RHEL 8 x86_64 (RPMs) +${RH8_URL_LINE}/codeready-builder/os +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 1 + + +[RHEL8_ResilientStorage] +name = Red Hat Enterprise Linux 8 for x86_64 - Resilient Storage (RPMs) +${RH8_URL_LINE}/resilientstorage/os +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 0 + + +[RHEL8_HighAvailability] +name = Red Hat Enterprise Linux 8 for x86_64 - High Availability (RPMs) +${RH8_URL_LINE}/highavailability/os +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 0 + + + +# RHEL 8 Source repos: + +[RHEL8_BaseOS_Source] +name = Red Hat Enterprise Linux 8 for x86_64 - BaseOS (Source RPMs) +${RH8_URL_LINE}/baseos/source/SRPMS +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 1 + + +[RHEL8_AppStream_Source] +name = Red Hat Enterprise Linux 8 for x86_64 - AppStream (Source RPMs) +${RH8_URL_LINE}/appstream/source/SRPMS +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 1 + + + +[RHEL8_CodeReady_Source] +name = Red Hat CodeReady Linux Builder for RHEL 8 x86_64 (Source RPMs) +${RH8_URL_LINE}/codeready-builder/source/SRPMS +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 1 + + + +[RHEL8_ResilientStorage_Source] +name = Red Hat Enterprise Linux 8 for x86_64 - Resilient Storage (Source RPMs) +${RH8_URL_LINE}/resilientstorage/source/SRPMS +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 0 + + +[RHEL8_HighAvailability_Source] +name = Red Hat Enterprise Linux 8 for x86_64 - High Availability (Source RPMs) +${RH8_URL_LINE}/highavailability/source/SRPMS +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 0 + + + + +# RHEL 9 repos, with alternate names: +[RHEL9_BaseOS] +name = Red Hat Enterprise Linux 9 for x86_64 - BaseOS (RPMs) +${RH9_URL_LINE}/baseos/os +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 1 + + +[RHEL9_AppStream] +name = Red Hat Enterprise Linux 9 for x86_64 - AppStream (RPMs) +${RH9_URL_LINE}/appstream/os +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 1 + + + +[RHEL9_CodeReady] +name = Red Hat CodeReady Linux Builder for RHEL 9 x86_64 (RPMs) +${RH9_URL_LINE}/codeready-builder/os +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 1 + + +[RHEL9_ResilientStorage] +name = Red Hat Enterprise Linux 9 for x86_64 - Resilient Storage (RPMs) +${RH9_URL_LINE}/resilientstorage/os +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 0 + + +[RHEL9_HighAvailability] +name = Red Hat Enterprise Linux 9 for x86_64 - High Availability (RPMs) +${RH9_URL_LINE}/highavailability/os +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 0 + + +# RHEL 9 Source repos: + +[RHEL9_BaseOS_Source] +name = Red Hat Enterprise Linux 9 for x86_64 - BaseOS (Source RPMs) +${RH9_URL_LINE}/baseos/source/SRPMS +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 1 + + +[RHEL9_AppStream_Source] +name = Red Hat Enterprise Linux 9 for x86_64 - AppStream (Source RPMs) +${RH9_URL_LINE}/appstream/source/SRPMS +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 1 + + + +[RHEL9_CodeReady_Source] +name = Red Hat CodeReady Linux Builder for RHEL 9 x86_64 (Source RPMs) +${RH9_URL_LINE}/codeready-builder/source/SRPMS +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 1 + + + + + + +######################################### +# (end of RHEL Repos) + + + +# Corresponding Rocky Repos: +[Rocky8_BaseOS] +name=Rocky8_BaseOS +baseurl=http://dl.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + +[Rocky8_AppStream] +name=Rocky8_AppStream +baseurl=http://dl.rockylinux.org/pub/rocky/8/AppStream/x86_64/os/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + +[Rocky8_CodeReady] +name=Rocky8_CodeReady +baseurl=http://dl.rockylinux.org/pub/rocky/8/PowerTools/x86_64/os/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + +[Rocky8_ResilientStorage] +name=Rocky8_ResilientStorage +baseurl=https://dl.rockylinux.org/pub/rocky/8/ResilientStorage/x86_64/os/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + +[Rocky8_HighAvailability] +name=Rocky8_HighAvailability +baseurl=https://dl.rockylinux.org/pub/rocky/8/HighAvailability/x86_64/os/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + + +# Rocky Staging repos: +[Rocky8_BaseOS_stg] +name=Rocky8_BaseOS_stg +baseurl=http://dl.rockylinux.org/stg/rocky/8/BaseOS/x86_64/os/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + +[Rocky8_AppStream_stg] +name=Rocky8_AppStream_stg +baseurl=http://dl.rockylinux.org/stg/rocky/8/AppStream/x86_64/os/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + +[Rocky8_CodeReady_stg] +name=Rocky8_CodeReady_stg +baseurl=http://dl.rockylinux.org/stg/rocky/8/PowerTools/x86_64/os/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + +[Rocky8_ResilientStorage_stg] +name=Rocky8_ResilientStorage_stg +baseurl=https://dl.rockylinux.org/stg/rocky/8/ResilientStorage/x86_64/os/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + +[Rocky8_HighAvailability_stg] +name=Rocky8_HighAvailability_stg +baseurl=https://dl.rockylinux.org/stg/rocky/8/HighAvailability/x86_64/os/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + + + + +# Rocky 9 Staging repos: +[Rocky9_BaseOS_stg] +name=Rocky9_BaseOS_stg +baseurl=https://yumrepofs.build.resf.org/v1/projects/55b17281-bc54-4929-8aca-a8a11d628738/repo/BaseOS/x86_64/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + +[Rocky9_AppStream_stg] +name=Rocky9_AppStream_stg +baseurl=https://yumrepofs.build.resf.org/v1/projects/55b17281-bc54-4929-8aca-a8a11d628738/repo/AppStream/x86_64/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + +[Rocky9_CodeReady_stg] +name=Rocky9_CodeReady_stg +baseurl=https://yumrepofs.build.resf.org/v1/projects/55b17281-bc54-4929-8aca-a8a11d628738/repo/CRB/x86_64/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + +[Rocky9_ResilientStorage_stg] +name=Rocky9_ResilientStorage_stg +baseurl=https://yumrepofs.build.resf.org/v1/projects/55b17281-bc54-4929-8aca-a8a11d628738/repo/ResilientStorage/x86_64/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + +[Rocky9_HighAvailability_stg] +name=Rocky9_HighAvailability_stg +baseurl=https://yumrepofs.build.resf.org/v1/projects/55b17281-bc54-4929-8aca-a8a11d628738/repo/HighAvailability/x86_64/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + + + +# Rocky Source repos: + +[Rocky8_BaseOS_Source] +name=Rocky8_BaseOS_Source +baseurl=http://dl.rockylinux.org/pub/rocky/8/BaseOS/source/tree/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + +[Rocky8_AppStream_Source] +name=Rocky8_AppStream_Source +baseurl=http://dl.rockylinux.org/pub/rocky/8/AppStream/source/tree/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + +[Rocky8_CodeReady_Source] +name=Rocky8_CodeReady_Source +baseurl=http://dl.rockylinux.org/pub/rocky/8/PowerTools/source/tree/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + +[Rocky8_ResilientStorage_Source] +name=Rocky8_ResilientStorage_Source +baseurl=https://dl.rockylinux.org/pub/rocky/8/ResilientStorage/source/tree/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + +[Rocky8_HighAvailability_Source] +name=Rocky8_HighAvailability_Source +baseurl=https://dl.rockylinux.org/pub/rocky/8/HighAvailability/source/tree/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + + + +# Rocky Staging sources: + +[Rocky8_BaseOS_Source_stg] +name=Rocky8_BaseOS_Source_Staging +baseurl=http://dl.rockylinux.org/stg/rocky/8/BaseOS/source/tree/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + +[Rocky8_AppStream_Source_stg] +name=Rocky8_AppStream_Source_Staging +baseurl=http://dl.rockylinux.org/stg/rocky/8/AppStream/source/tree/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + +[Rocky8_CodeReady_Source_stg] +name=Rocky8_CodeReady_Source_Staging +baseurl=http://dl.rockylinux.org/stg/rocky/8/PowerTools/source/tree/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + +[Rocky8_ResilientStorage_Source_stg] +name=Rocky8_ResilientStorage_Source_Staging +baseurl=https://dl.rockylinux.org/stg/rocky/8/ResilientStorage/source/tree/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + +[Rocky8_HighAvailability_Source_stg] +name=Rocky8_HighAvailability_Source_Staging +baseurl=https://dl.rockylinux.org/stg/rocky/8/HighAvailability/source/tree/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + + +# Rocky 9 Staging sources: + +[Rocky9_BaseOS_Source_stg] +name=Rocky9_BaseOS_Source_Staging +baseurl=https://yumrepofs.build.resf.org/v1/projects/55b17281-bc54-4929-8aca-a8a11d628738/repo/BaseOS/src/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + +[Rocky9_AppStream_Source_stg] +name=Rocky9_AppStream_Source_Staging +baseurl=https://yumrepofs.build.resf.org/v1/projects/55b17281-bc54-4929-8aca-a8a11d628738/repo/AppStream/src/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + +[Rocky9_CodeReady_Source_stg] +name=Rocky9_CodeReady_Source_Staging +baseurl=https://yumrepofs.build.resf.org/v1/projects/55b17281-bc54-4929-8aca-a8a11d628738/repo/CRB/src/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + +[Rocky9_ResilientStorage_Source_stg] +name=Rocky9_ResilientStorage_Source_Staging +baseurl=https://yumrepofs.build.resf.org/v1/projects/55b17281-bc54-4929-8aca-a8a11d628738/repo/ResilientStorage/src/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + +[Rocky9_HighAvailability_Source_stg] +name=Rocky9_HighAvailability_Source_Staging +baseurl=https://yumrepofs.build.resf.org/v1/projects/55b17281-bc54-4929-8aca-a8a11d628738/repo/HighAvailability/src/ +gpgcheck=0 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial + + +EOF + + + +cat > /etc/yum.repos.d/rhel8_beta.repo << EOF +# RHEL 8 Beta Repos + +[RHEL8_Beta_BaseOS] +name = Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs) (BETA) +${RH8_BETA_LINE}/baseos/os +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 1 + + +[RHEL8_Beta_AppStream] +name = Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs) (BETA) +${RH8_BETA_LINE}/appstream/os +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 1 + + + +[RHEL8_Beta_CodeReady] +name = Red Hat CodeReady Linux Builder for RHEL 8 x86_64 (RPMs) (BETA) +${RH8_BETA_LINE}/codeready-builder/os +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 1 + + +[RHEL8_Beta_ResilientStorage] +name = Red Hat Enterprise Linux 8 for x86_64 - Resilient Storage (RPMs) (BETA) +${RH8_BETA_LINE}/resilientstorage/os +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 0 + + +[RHEL8_Beta_HighAvailability] +name = Red Hat Enterprise Linux 8 for x86_64 - High Availability (RPMs) (BETA) +${RH8_BETA_LINE}/highavailability/os +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 0 + + + +# RHEL 8 Source repos: + +[RHEL8_Beta_BaseOS_Source] +name = Red Hat Enterprise Linux 8 for x86_64 - BaseOS (Source RPMs) (BETA) +${RH8_BETA_LINE}/baseos/source/SRPMS +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 1 + + +[RHEL8_Beta_AppStream_Source] +name = Red Hat Enterprise Linux 8 for x86_64 - AppStream (Source RPMs) (BETA) +${RH8_BETA_LINE}/appstream/source/SRPMS +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 1 + + + +[RHEL8_Beta_CodeReady_Source] +name = Red Hat CodeReady Linux Builder for RHEL 8 x86_64 (Source RPMs) (BETA) +${RH8_BETA_LINE}/codeready-builder/source/SRPMS +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 1 + + + +[RHEL8_Beta_ResilientStorage_Source] +name = Red Hat Enterprise Linux 8 for x86_64 - Resilient Storage (Source RPMs) (BETA) +${RH8_BETA_LINE}/resilientstorage/source/SRPMS +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 0 + + +[RHEL8_Beta_HighAvailability_Source] +name = Red Hat Enterprise Linux 8 for x86_64 - High Availability (Source RPMs) (BETA) +${RH8_BETA_LINE}/highavailability/source/SRPMS +enabled = 0 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +$cacert +$clientkey +$clientcert +metadata_expire = 86400 +enabled_metadata = 0 + +EOF diff --git a/module_compare_html.sh b/module_compare_html.sh new file mode 100755 index 0000000..30802ab --- /dev/null +++ b/module_compare_html.sh @@ -0,0 +1,147 @@ +#!/bin/bash + +# Simple script that takes a list of the modular packages in a group of repositories (like AppStream,CodeReady from RHEL 8) and +# compares them with the modules in another distribution (Like AppStream,PowerTools from Rocky 8) +# +# It uses straight dnf calls for its data, and requires the repos to be defined in repos.d/. Also requires git +# +# All modules and version are iterated over and compared. +# +# Usage takes the pattern : ./module_compare_html.sh REPO_A,REPO_B,REPO_C REPO_X,REPO_Y,REPO_Z +# +# Example: ./modules_compare_html.sh RHEL8_AppStream,RHEL8_CodeReady Rocky8_AppStream,Rocky8_PowerTools +# + +REPOS1=$1 +REPOS2=$2 + +# Get a complete list of modules+versions we want to compare against (usually from RHEL 8) +# This includes a list that consists of things like "perl:5.24 , perl:5.26 , python38:3.8" , etc. +MODULE_LIST1=$(dnf --disablerepo '*' --enablerepo "${REPOS1}" module list | +grep -v '^Name' | +grep -v '(RPMs)' | +grep -v 'Hint:' | +grep -vi ' subscription ' | +grep -vi ' metadata ' | +grep -v '^$' | +awk '{print $1":"$2}') + +IFS=' +' + +mkdir -p /tmp/module_compare +rm -f /tmp/module_compare/* + + +# HTML header: +echo "

Module Artifact Comparison for: ${REPOS1} vs. ${REPOS2}

" +echo ' + + +
+' + +echo " +

+Generated by Rocky Module Compare Script at: $(date +'%Y-%m-%d %H:%M:%S') +
+

+ + + +" + + + +# Big loop where we go through every possible module/version combination: +for module in ${MODULE_LIST1}; do + + # MODULE1 == complete module info from the 1st repos, while MODULE2 == complete module info from 2nd repos + # This includes all the different versions/releases, so we want to filter for the latest later + MODULE1=$(dnf --disablerepo '*' --enablerepo "${REPOS1}" module info "${module}" 2> /dev/null) + MODULE2=$(dnf --disablerepo '*' --enablerepo "${REPOS2}" module info "${module}" 2> /dev/null) + + + # Isolate the latest released version of each module, that's the only one we're intrested in (indicated by the "Version :" line in module info) + latest_version1=$(echo "${MODULE1}" | grep 'Version ' | awk '{print $3}' | sort -n | tail -1) + latest_version2=$(echo "${MODULE2}" | grep 'Version ' | awk '{print $3}' | sort -n | tail -1) + + + # Isolate individual module artifacts and write them (sorted) to a text file + # order of operations: awk to find version string through blank line, + # awk to find "Requires :" line, + # sed to remove "Artifacts", + # awk to isolate module rpm artifact ($2), + # sed to remove the distro tag after module (module+el8.4.0+xyz) + # sed to remove the git hash after "module+" ONLY IF we have a minor patch release (ie. module ends in a ".1.x86_64" or a ".2.src" or something similar) + # sed to remove everything after .module in the normal case (no minor patch release at the end) + #everything after ".module" (which is unique per-distro), except for ending ".$arch" (src/noarch/x86_64/etc.) + # remove any blank lines, + # and finally sort and write to text file + echo "${MODULE1}" | + awk "/${latest_version1}/ { show=1; next } show; /^$/ { show=0 }" | + awk "/Requires / { show=1; next } show; /^$/ { show=0 }" | + sed 's/Artifacts //' | + awk '{print $2}' | + sed 's/module+.*+/module+/g' | + sed 's/module+.*\.\(.*\)\./module.\1./g' | + sed 's/module+.*\./module./g' | + grep -v '^$' | + sort > "/tmp/module_compare/${module}_1" + + + # Do the same isolation of module rpms for module 2 and write that to a text file + echo "${MODULE2}" | + awk "/${latest_version2}/ { show=1; next } show; /^$/ { show=0 }" | + awk "/Requires / { show=1; next } show; /^$/ { show=0 }" | + sed 's/Artifacts //' | + awk '{print $2}' | + sed 's/module+.*+/module+/g' | + sed 's/module+.*\.\(.*\)\./module.\1./g' | + sed 's/module+.*\./module./g' | + grep -v '^$' | + sort > "/tmp/module_compare/${module}_2" + + + # Get list of differences from source repo (the "-" in git diff) + diff1=$(git --no-pager diff "/tmp/module_compare/${module}_1" "/tmp/module_compare/${module}_2" | grep -A1000 '@@' | grep '^\-' | sort) + + # and the "+" (repo2): + diff2=$(git --no-pager diff "/tmp/module_compare/${module}_1" "/tmp/module_compare/${module}_2" | grep -A1000 '@@' | grep '^\+' | sort) + + + # If module artifacts are completely identical, then we will say as much: + if [[ -z "${diff1}" ]] && [[ -z "${diff2}" ]]; then + diff1="Identical Packages" + diff2="Identical Packages" + fi + + # If module 2 is empty, then it doesn't exist: + if [ -s "/tmp/module_compare/${module}_1" ] && [ ! -s "/tmp/module_compare/${module}_2" ]; then + diff1="N/A" + diff2="Module packages not found" + fi + + + # swap line endings for
to make html friendly looking: + diff1=$(echo "${diff1}" | sed 's/$/
/') + diff2=$(echo "${diff2}" | sed 's/$/
/') + + # Now, write the table row line: + echo "" + +done + +echo "
Module Name:Version ${REPOS1} Pkg Diffs (-) ${REPOS2} Pkg Diffs (+)
${module} ${diff1} ${diff2}
" diff --git a/repo_compare_html.sh b/repo_compare_html.sh index 34cdae1..ae0fad7 100755 --- a/repo_compare_html.sh +++ b/repo_compare_html.sh @@ -4,38 +4,43 @@ # The arguments must be named dnf/yum repos on the system # # We will loop through the RPM names from SOURCEREPO, and attempt to find name/version/release matches in TARGETREPO -# An HTML table page will be output showing the differences +# An HTML table page will be sent to stdout showing the differences # -# -Skip Grube, 2021-06-29 + REPO1="$1" REPO2="$2" -pkglist1=`dnf repoquery --latest-limit 1 --repo ${REPO1} --queryformat "%{name} %{version} %{release}" | grep -vi " subscription "` #| tr '\n' ','` -pkglist2=`dnf repoquery --latest-limit 1 --repo ${REPO2} --queryformat "%{name} %{version} %{release}" | grep -vi " subscription "` +pkglist1=$(dnf repoquery --latest-limit 1 --repo "${REPO1}" --queryformat "%{name} %{version} %{release}" | grep -vi " subscription ") +pkglist2=$(dnf repoquery --latest-limit 1 --repo "${REPO2}" --queryformat "%{name} %{version} %{release}" | grep -vi " subscription ") -# Strip ending moduleXYZ and .el8* information away from the release info, as -# They may not match (or will never match in the module's case) -pkglist1=`echo "${pkglist1}" | sed -e 's/\.module.*$/\.module/g' | sed -e 's/\.el.*$//g'` -pkglist2=`echo "${pkglist2}" | sed -e 's/\.module.*$/\.module/g' | sed -e 's/\.el.*$//g'` +# Strip some ending package info off like this: +# 1: moduleXYZ info comes off +# 2: If a dotrelease tag is present (like .el8_4.3), then preserve the .3 but remove the el8_* tag +# 3: If a dotrelease tag is not present, then simply take the .el8* off from the end +# 4: Remove any trailing ".rocky" tag as well from the end if a dotrelease is not present +# The moduleXYZ will never match versions, and the el8 tagging may be different (el8 vs. el8_3, el8_4, etc.) +pkglist1=$(echo "${pkglist1}" | sed -e 's/\.module.*$/\.module/g' | sed -e 's/\.el.*\.\(.*\)$/\.\1/g' | sed -e 's/\.el.*$//g' | sed 's/\.rocky$//') +pkglist2=$(echo "${pkglist2}" | sed -e 's/\.module.*$/\.module/g' | sed -e 's/\.el.*\.\(.*\)$/\.\1/g' | sed -e 's/\.el.*$//g' | sed 's/\.rocky$//') # Turn the first pkg list into a comma-separated list (instead of newline-separated) # (makes it easier to use IFS=',' in all of our for loops) -pkglist1=`echo "${pkglist1}" | tr '\n' ','` +pkglist1=$(echo "${pkglist1}" | tr '\n' ',') #echo "$pkglist1" > debug1.txt #echo "$pkglist2" > debug2.txt + # HTML style header for table: echo "

Repo Version Differences for: ${REPO1} vs. ${REPO2}

" echo ' + +
+' + +echo " +Generated by Repo Requires Compare Script at: $(date +'%Y-%m-%d %H:%M:%S') +
+ + + + +" + + +# Now that we have our packages, their versions and requires info all in individual files, let's compare them! +# Simple use of git diff program to get "+" and "-" differences and spit them to an HTML table +IFS=' +' +for pkgfile in $(ls -1 /tmp/repocompare/${REPO1}/*); do + + + # Package name - should be same for both repos + pkg=$(basename ${pkgfile}) + + # Package version - source repo (3rd field in txt file) + version1=$(grep '#' ${pkgfile} | head -1 | awk '{print $3}') + + # Package release - sourcerepo (4th / last field in first line of txt file) + release1=$(grep '#' ${pkgfile} | head -1 | awk '{print $4}') + + + # If package doesn't exist in target repo, we'll stop here: (we can't compare Requires: for a non-existent package!) + if [ ! -f "/tmp/repocompare/${REPO2}/${pkg}" ]; then + echo "" + continue + fi + + # We confirmed the other package exists, now get the version and release for the destination package/repo (REPO2): + version2=$(grep '#' /tmp/repocompare/${REPO2}/${pkg} | head -1 | awk '{print $3}') + release2=$(grep '#' /tmp/repocompare/${REPO2}/${pkg} | head -1 | awk '{print $4}') + + + # If a package has different versions, that is also a special case - we don't want to compare Requires: + if [[ "${version1}" != "${version2}" ]] || [[ "${release1}" != "${release2}" ]]; then + echo "" + continue + fi + + + # Do a diff of the requires files, find only the lines that show differences (lines that start with + or -): + pkgdiff1=$(git --no-pager diff /tmp/repocompare/${REPO1}/${pkg} /tmp/repocompare/${REPO2}/${pkg} | grep -A1000 '@@' | grep '^\-' | sort) + pkgdiff1=$(echo "${pkgdiff1}" | grep -v '\-libc\.so\.6(' | grep -v '^\-libc\.so\.6$' ) + + pkgdiff2=$(git --no-pager diff /tmp/repocompare/${REPO1}/${pkg} /tmp/repocompare/${REPO2}/${pkg} | grep -A1000 '@@' | grep '^+' | sort) + + + # If our git diff command returned something (is not empty), then we want to display that as a table row: + if [[ ! -z "${pkgdiff1}" ]] || [[ ! -z "${pkgdiff2}" ]]; then + # Swap "\n" for "
", to make friendly html output: + pkgdiff1=$(echo "${pkgdiff1}" | sed 's/$/
/') + pkgdiff2=$(echo "${pkgdiff2}" | sed 's/$/
/') + + # Output table data with differences: + echo "" + fi + + # No package diff detected == don't print anything, go to the next package + +done + +echo "
${REPO1} Package ${REPO2} Package Diff -${REPO1} Diff +${REPO2})
${pkg}-${version1}-${release1} (DOES NOT EXIST) N/A N/A
${pkg}-${version1}-${release1} ${pkg}-${version2}-${release2} DIFFERENT VERSIONS - Comparison not valid N/A
${pkg}-${version1}-${release1} ${pkg}-${version2}-${release2} ${pkgdiff1} ${pkgdiff2}
" +