25 lines
772 B
Bash
25 lines
772 B
Bash
|
#!/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" \;
|