Add script for individual package comparisons #1

Open
raktajino wants to merge 1 commits from manual_compare into main
2 changed files with 35 additions and 6 deletions
Showing only changes of commit c032fbb907 - Show all commits

View File

@ -86,3 +86,8 @@ A couple support scripts are also in the repository:
10 2 * * * root find /opt/repocompare_results/ -iname "*.html" -type f -mtime +7 -exec rm -f {} \; 10 2 * * * root find /opt/repocompare_results/ -iname "*.html" -type f -mtime +7 -exec rm -f {} \;
``` ```
(things might be cleaned up, to make results location more flexible) (things might be cleaned up, to make results location more flexible)
## Manual Comparisons
The repocompare output generally includes false positives and might require further scrutiny to determine which packages actually need updates.
Please see the [documentation](https://testing.rocky.page/) for an overview of the process.

24
manual_compare.sh Normal file
View File

@ -0,0 +1,24 @@
#!/bin/bash
# Script to do "manual" repocompare of a single package.
# This script must run on a RHEL 8 box with a valid entitlement.
# Usage:
# ./repocompare.sh [version] [repo] [package]
#
# Examples:
# ./repocompare.sh 9 BaseOS grub2
# ./repocompare.sh 8 AppStream ansible-core
version="$1"
repo="$2" # BaseOS, AppStream, CodeReady, ResilientStorage, HighAvailability
package="$3"
# TODO only if /etc/yum.repos.d/rocky_repocompare.repo is more than 4 hours old
./mkrepofile.sh
for distro in "Rocky" "RHEL"; do
dnf download --refresh --source --repo ${distro}${version}_${repo}_Source ${package}
done
find ./ -name "$package*" -exec sh -c "rpm -qp --qf '%-18{DISTRIBUTION} %{NAME} %{VERSION} %{RELEASE} ' {} && rpm -qp --changelog {} | head -n 1" \;