Add script for individual package comparisons

This commit is contained in:
Al Bowles 2023-07-10 08:57:36 -05:00
parent f70cd0d2bc
commit c032fbb907
No known key found for this signature in database
GPG Key ID: 9B42314A30F1A3D1
2 changed files with 35 additions and 6 deletions

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 {} \;
```
(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" \;