From d5014e654fcac765b1d00cf1926855529e40c3a8 Mon Sep 17 00:00:00 2001
From: Louis Abel <label@rockylinux.org>
Date: Thu, 8 Aug 2024 23:22:51 -0700
Subject: [PATCH] semi-consistent comps

rocky 9 lh comps roughly matched centos stream 9. it was missing rhel
specific packages, and sometimes made diff/merges difficult. we added
them back, but the difference here is we are taking advantage of stream
10's "rhel_only" kind of concept, assuming this does not mess up
diff/merges.
---
 comps-rocky-9-lh.xml    |  1 +
 comps-rocky-9-lh.xml.in | 11 +++++++++++
 scripts/update-comps    |  3 +++
 3 files changed, 15 insertions(+)

diff --git a/comps-rocky-9-lh.xml b/comps-rocky-9-lh.xml
index 67102b5..ff83f74 100644
--- a/comps-rocky-9-lh.xml
+++ b/comps-rocky-9-lh.xml
@@ -2853,6 +2853,7 @@
       <packagereq type="default">hyphen-devel</packagereq>
       <packagereq type="default">ibus-devel</packagereq>
       <packagereq type="default">ibus-devel-docs</packagereq>
+      <packagereq type="default">ibus-gtk4</packagereq>
       <packagereq type="default">ima-evm-utils-devel</packagereq>
       <packagereq type="default">inih-devel</packagereq>
       <packagereq type="default" arch="x86_64">intel-cmt-cat-devel</packagereq>
diff --git a/comps-rocky-9-lh.xml.in b/comps-rocky-9-lh.xml.in
index 007ba8d..d7fe763 100644
--- a/comps-rocky-9-lh.xml.in
+++ b/comps-rocky-9-lh.xml.in
@@ -272,6 +272,7 @@
       <packagereq type="mandatory" variant="BaseOS">selinux-policy-targeted</packagereq>
       <packagereq type="mandatory" variant="BaseOS">setup</packagereq>
       <packagereq type="mandatory" variant="BaseOS">shadow-utils</packagereq>
+      <rhel_only><packagereq type="conditional" requires="redhat-release" variant="BaseOS">subscription-manager</packagereq></rhel_only>
       <packagereq type="mandatory" variant="BaseOS">sssd-common</packagereq>
       <packagereq type="mandatory" variant="BaseOS">sssd-kcm</packagereq>
       <packagereq type="mandatory" variant="BaseOS">sudo</packagereq>
@@ -313,6 +314,8 @@
       <packagereq type="default" variant="BaseOS">sg3_utils-libs</packagereq>
       <packagereq type="default" variant="BaseOS">initscripts-rename-device</packagereq>
       <packagereq type="default" variant="AppStream">python3-libselinux</packagereq>
+      <rhel_only><packagereq type="default" variant="AppStream">insights-client</packagereq></rhel_only>
+      <rhel_only><packagereq type="default" variant="AppStream">rhc</packagereq></rhel_only>
       <packagereq type="optional" variant="BaseOS">dracut-config-generic</packagereq>
       <packagereq type="optional" variant="BaseOS">dracut-network</packagereq>
       <packagereq type="optional" variant="BaseOS" arch="s390x">libzfcphbaapi</packagereq>
@@ -1145,6 +1148,8 @@
       <packagereq type="default" variant="BaseOS">sos</packagereq>
       <packagereq type="default" variant="BaseOS">sssd</packagereq>
       <packagereq type="default" variant="BaseOS">strace</packagereq>
+      <rhel_only><packagereq type="conditional" requires="redhat-release" variant="BaseOS">subscription-manager-cockpit</packagereq></rhel_only>
+      <rhel_only><packagereq type="conditional" requires="redhat-release" variant="BaseOS">libdnf-plugin-subscription-manager</packagereq></rhel_only>
       <packagereq type="default" variant="BaseOS">teamd</packagereq>
       <packagereq type="default" variant="BaseOS">time</packagereq>
       <packagereq type="default" variant="BaseOS">unzip</packagereq>
@@ -1172,6 +1177,8 @@
       <packagereq type="default" variant="AppStream">tcpdump</packagereq>
       <packagereq type="default" variant="AppStream">wget</packagereq>
       <packagereq type="default" variant="AppStream">vim-enhanced</packagereq>
+      <rhel_only><packagereq type="default" variant="AppStream">insights-client</packagereq></rhel_only>
+      <rhel_only><packagereq type="default" variant="AppStream">rhc</packagereq></rhel_only>
     </packagelist>
   </group>
   <group>
@@ -1252,6 +1259,8 @@
       <packagereq type="default" variant="BaseOS">sos</packagereq>
       <packagereq type="default" variant="BaseOS">sssd</packagereq>
       <packagereq type="default" variant="BaseOS">strace</packagereq>
+      <rhel_only><packagereq type="conditional" requires="redhat-release" variant="BaseOS">subscription-manager-cockpit</packagereq></rhel_only>
+      <rhel_only><packagereq type="conditional" requires="redhat-release" variant="BaseOS">libdnf-plugin-subscription-manager</packagereq></rhel_only>
       <packagereq type="default" variant="BaseOS">teamd</packagereq>
       <packagereq type="default" variant="BaseOS">time</packagereq>
       <packagereq type="default" variant="BaseOS">unzip</packagereq>
@@ -1279,6 +1288,8 @@
       <packagereq type="default" variant="AppStream">tcpdump</packagereq>
       <packagereq type="default" variant="AppStream">wget</packagereq>
       <packagereq type="default" variant="AppStream">vim-enhanced</packagereq>
+      <rhel_only><packagereq type="default" variant="AppStream">insights-client</packagereq></rhel_only>
+      <rhel_only><packagereq type="default" variant="AppStream">rhc</packagereq></rhel_only>
     </packagelist>
   </group>
   <group>
diff --git a/scripts/update-comps b/scripts/update-comps
index de1fa06..d5be273 100755
--- a/scripts/update-comps
+++ b/scripts/update-comps
@@ -10,3 +10,6 @@ fi
 
 LANG=C intltool-merge -x -u po/ $COMPSFILE.in $COMPSFILE
 xsltproc --stringparam distro $DISTRO --novalid -o $COMPSFILE comps-distro-only.xsl $COMPSFILE
+
+echo "Cleaning up empty space left over"
+sed -i '/^      $/d' "${COMPSFILE}"
-- 
GitLab