mirror of
https://git.rockylinux.org/rocky/comps.git
synced 2024-11-21 20:51:24 +00:00
make sync script more robust
This commit is contained in:
parent
e6db5db863
commit
010c928496
@ -1053,7 +1053,6 @@
|
|||||||
<packagereq variant="AppStream" type="default">tcpdump</packagereq>
|
<packagereq variant="AppStream" type="default">tcpdump</packagereq>
|
||||||
<packagereq variant="AppStream" type="default">wget</packagereq>
|
<packagereq variant="AppStream" type="default">wget</packagereq>
|
||||||
<packagereq variant="AppStream" type="default">vim-enhanced</packagereq>
|
<packagereq variant="AppStream" type="default">vim-enhanced</packagereq>
|
||||||
<packagereq variant="AppStream" type="default">insights-client</packagereq>
|
|
||||||
</packagelist>
|
</packagelist>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
@ -2358,7 +2357,7 @@
|
|||||||
<packagereq type="default">catatonit</packagereq>
|
<packagereq type="default">catatonit</packagereq>
|
||||||
<packagereq type="default">cglib</packagereq>
|
<packagereq type="default">cglib</packagereq>
|
||||||
<packagereq type="default">cifs-utils-devel</packagereq>
|
<packagereq type="default">cifs-utils-devel</packagereq>
|
||||||
<packagereq type="default" arch="x86_64">cxl-devel</packagereq>
|
<packagereq type="default">cxl-devel</packagereq>
|
||||||
<packagereq type="default">clucene-core-devel</packagereq>
|
<packagereq type="default">clucene-core-devel</packagereq>
|
||||||
<packagereq type="default">colord-devel</packagereq>
|
<packagereq type="default">colord-devel</packagereq>
|
||||||
<packagereq type="default">colord-devel-docs</packagereq>
|
<packagereq type="default">colord-devel-docs</packagereq>
|
||||||
|
@ -1058,7 +1058,7 @@
|
|||||||
<packagereq type="default" variant="AppStream">tcpdump</packagereq>
|
<packagereq type="default" variant="AppStream">tcpdump</packagereq>
|
||||||
<packagereq type="default" variant="AppStream">wget</packagereq>
|
<packagereq type="default" variant="AppStream">wget</packagereq>
|
||||||
<packagereq type="default" variant="AppStream">vim-enhanced</packagereq>
|
<packagereq type="default" variant="AppStream">vim-enhanced</packagereq>
|
||||||
<packagereq type="default" variant="AppStream">insights-client</packagereq>
|
<rhel_only><packagereq type="default" variant="AppStream">insights-client</packagereq></rhel_only>
|
||||||
<rhel_only><packagereq type="default" variant="AppStream">rhc</packagereq></rhel_only>
|
<rhel_only><packagereq type="default" variant="AppStream">rhc</packagereq></rhel_only>
|
||||||
</packagelist>
|
</packagelist>
|
||||||
</group>
|
</group>
|
||||||
@ -1903,7 +1903,7 @@
|
|||||||
<default>false</default>
|
<default>false</default>
|
||||||
<uservisible>false</uservisible>
|
<uservisible>false</uservisible>
|
||||||
<packagelist>
|
<packagelist>
|
||||||
<!-- Disable java until we have Java 21 which is what we'll ship in RHEL
|
<!-- Disable java until we have Java 21 which is what we'll ship in Rocky Linux
|
||||||
<packagereq type="default">java-1.8.0-openjdk-devel</packagereq>
|
<packagereq type="default">java-1.8.0-openjdk-devel</packagereq>
|
||||||
<packagereq type="default">java-1.8.0-openjdk-demo</packagereq>
|
<packagereq type="default">java-1.8.0-openjdk-demo</packagereq>
|
||||||
<packagereq type="default">java-1.8.0-openjdk-javadoc</packagereq>
|
<packagereq type="default">java-1.8.0-openjdk-javadoc</packagereq>
|
||||||
@ -1948,7 +1948,7 @@
|
|||||||
<packagereq type="default">log4j-slf4j</packagereq>
|
<packagereq type="default">log4j-slf4j</packagereq>
|
||||||
</packagelist>
|
</packagelist>
|
||||||
</group>
|
</group>
|
||||||
<!-- Disable java until we have Java 21 which is what we'll ship in RHEL
|
<!-- Disable java until we have Java 21 which is what we'll ship in Rocky Linux
|
||||||
<group variant="AppStream">
|
<group variant="AppStream">
|
||||||
<id>java-platform</id>
|
<id>java-platform</id>
|
||||||
<_name>Java Platform</_name>
|
<_name>Java Platform</_name>
|
||||||
@ -2583,7 +2583,7 @@
|
|||||||
<packagereq type="default">catatonit</packagereq>
|
<packagereq type="default">catatonit</packagereq>
|
||||||
<packagereq type="default">cglib</packagereq>
|
<packagereq type="default">cglib</packagereq>
|
||||||
<packagereq type="default">cifs-utils-devel</packagereq>
|
<packagereq type="default">cifs-utils-devel</packagereq>
|
||||||
<packagereq type="default" arch="x86_64">cxl-devel</packagereq>
|
<packagereq type="default">cxl-devel</packagereq>
|
||||||
<packagereq type="default">clucene-core-devel</packagereq>
|
<packagereq type="default">clucene-core-devel</packagereq>
|
||||||
<packagereq type="default">colord-devel</packagereq>
|
<packagereq type="default">colord-devel</packagereq>
|
||||||
<packagereq type="default">colord-devel-docs</packagereq>
|
<packagereq type="default">colord-devel-docs</packagereq>
|
||||||
|
@ -3648,7 +3648,6 @@
|
|||||||
<packagereq type="default">rasqal-devel</packagereq>
|
<packagereq type="default">rasqal-devel</packagereq>
|
||||||
<packagereq type="default">redhat-sb-certs</packagereq>
|
<packagereq type="default">redhat-sb-certs</packagereq>
|
||||||
<packagereq type="default">redland-devel</packagereq>
|
<packagereq type="default">redland-devel</packagereq>
|
||||||
<packagereq type="default">rhc-devel</packagereq>
|
|
||||||
<packagereq type="default">rpcgen</packagereq>
|
<packagereq type="default">rpcgen</packagereq>
|
||||||
<packagereq type="default">rpcsvc-proto-devel</packagereq>
|
<packagereq type="default">rpcsvc-proto-devel</packagereq>
|
||||||
<packagereq type="default">rrdtool-devel</packagereq>
|
<packagereq type="default">rrdtool-devel</packagereq>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE comps PUBLIC "-//Red Hat, Inc.//DTD Comps info//EN" "comps.dtd">
|
<!DOCTYPE comps PUBLIC "-//Rocky Enterprise Software Foundation//DTD Comps info//EN" "comps.dtd">
|
||||||
<comps>
|
<comps>
|
||||||
<group variant="BaseOS">
|
<group variant="BaseOS">
|
||||||
<id>conflicts-baseos</id>
|
<id>conflicts-baseos</id>
|
||||||
@ -3902,7 +3902,7 @@
|
|||||||
<packagereq type="default">rasqal-devel</packagereq>
|
<packagereq type="default">rasqal-devel</packagereq>
|
||||||
<packagereq type="default">redhat-sb-certs</packagereq>
|
<packagereq type="default">redhat-sb-certs</packagereq>
|
||||||
<packagereq type="default">redland-devel</packagereq>
|
<packagereq type="default">redland-devel</packagereq>
|
||||||
<packagereq type="default">rhc-devel</packagereq>
|
<rhel_only><packagereq type="default">rhc-devel</packagereq></rhel_only>
|
||||||
<packagereq type="default">rpcgen</packagereq>
|
<packagereq type="default">rpcgen</packagereq>
|
||||||
<packagereq type="default">rpcsvc-proto-devel</packagereq>
|
<packagereq type="default">rpcsvc-proto-devel</packagereq>
|
||||||
<packagereq type="default">rrdtool-devel</packagereq>
|
<packagereq type="default">rrdtool-devel</packagereq>
|
||||||
|
@ -1,14 +1,58 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
HOWMANY="-$1"
|
BRANCH=main
|
||||||
if [ -z $1 ]; then
|
VERS=c9s
|
||||||
HOWMANY="-1"
|
COMPS_FILE=comps-centos-stream-9.xml.in
|
||||||
|
COMPS_ROCKY=${COMPS_FILE/centos-stream-9/rocky-9-lh}
|
||||||
|
|
||||||
|
if [ ! -f "${COMPS_ROCKY}" ]; then
|
||||||
|
echo "Rocky Comps not found."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Fetching from upstream"
|
echo "Fetching from upstream"
|
||||||
git fetch https://gitlab.com/redhat/centos-stream/release-engineering/comps.git main
|
git clone https://gitlab.com/redhat/centos-stream/release-engineering/comps.git -b ${BRANCH} /var/tmp/${VERS}-comps
|
||||||
echo "Formatting patch and applying..."
|
echo "Copying comps file over"
|
||||||
git format-patch --stdout ${HOWMANY} FETCH_HEAD | sed -e 's/centos-stream-9/rocky-9-lh/' | git apply
|
cp /var/tmp/${VERS}-comps/${COMPS_FILE} "./${COMPS_ROCKY}"
|
||||||
|
|
||||||
|
echo "Modifying file with Rocky Branding"
|
||||||
|
while read -r pattern; do
|
||||||
|
sscript+="$pattern;"
|
||||||
|
done <<EOF
|
||||||
|
s/>redhat-release/>rocky-release/g
|
||||||
|
s/Red Hat Enterprise Linux/Rocky Linux/g
|
||||||
|
s/RHEL/Rocky Linux/g
|
||||||
|
s/Red Hat, Inc./Rocky Enterprise Software Foundation/g
|
||||||
|
EOF
|
||||||
|
sed -i "$sscript" "${COMPS_ROCKY}"
|
||||||
|
|
||||||
|
echo "Making sure some packages are RHEL only"
|
||||||
|
while read -r pattern; do
|
||||||
|
mscript+="$pattern;"
|
||||||
|
done <<EOF
|
||||||
|
/>insights-client</ s/(<packagereq.*>insights-client<\/packagereq>)/<rhel_only>\1<\/rhel_only>/g
|
||||||
|
/>rhc</ s/(<packagereq.*>rhc<\/packagereq>)/<rhel_only>\1<\/rhel_only>/g
|
||||||
|
/>rhc-devel</ s/(<packagereq.*>rhc-devel<\/packagereq>)/<rhel_only>\1<\/rhel_only>/g
|
||||||
|
/>subscription-manager</ s/(<packagereq.*>subscription-manager<\/packagereq>)/<rhel_only>\1<\/rhel_only>/g
|
||||||
|
/>subscription-manager-cockpit</ s/(<packagereq.*>subscription-manager-cockpit<\/packagereq>)/<rhel_only>\1<\/rhel_only>/g
|
||||||
|
/>libdnf-plugin-subscription-manager</ s/(<packagereq.*>libdnf-plugin-subscription-manager<\/packagereq>)/<rhel_only>\1<\/rhel_only>/g
|
||||||
|
EOF
|
||||||
|
sed -Ei "$mscript" "${COMPS_ROCKY}"
|
||||||
|
|
||||||
|
echo "Modifications to make sure certain scenarios work"
|
||||||
|
while read -r pattern; do
|
||||||
|
wscript+="$pattern;"
|
||||||
|
done <<EOF
|
||||||
|
/>kmod-kvdo</ s/type="default"/type="default" arch="ppc64le,s390x,x86_64"/g
|
||||||
|
/>vdo</ s/type="default"/type="default" arch="ppc64le,s390x,x86_64"/g
|
||||||
|
EOF
|
||||||
|
sed -i "$wscript" "${COMPS_ROCKY}"
|
||||||
|
|
||||||
|
echo "Generating proper XML"
|
||||||
|
/bin/bash ./scripts/update-comps "${COMPS_ROCKY/.in/}" rocky
|
||||||
|
|
||||||
|
echo "Cleaning up upstream"
|
||||||
|
rm -rf /var/tmp/${VERS}-comps
|
||||||
|
|
||||||
echo "!! DIFF OF CHANGES !!"
|
echo "!! DIFF OF CHANGES !!"
|
||||||
git --no-pager diff HEAD
|
git --no-pager diff HEAD
|
||||||
|
|
||||||
echo "You may now commit and push."
|
echo "You may now commit and push if there are any changes."
|
||||||
|
@ -1,14 +1,53 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
HOWMANY="-$1"
|
BRANCH=c10s
|
||||||
if [ -z $1 ]; then
|
VERS=c10s
|
||||||
HOWMANY="-1"
|
COMPS_FILE=comps-centos-stream-10.xml.in
|
||||||
|
COMPS_ROCKY=${COMPS_FILE/centos-stream-10/rocky-10-lh}
|
||||||
|
|
||||||
|
if [ ! -f "${COMPS_ROCKY}" ]; then
|
||||||
|
echo "Rocky Comps not found."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Fetching from upstream"
|
echo "Fetching from upstream"
|
||||||
git fetch https://gitlab.com/redhat/centos-stream/release-engineering/comps.git c10s
|
git clone https://gitlab.com/redhat/centos-stream/release-engineering/comps.git -b ${BRANCH} /var/tmp/${VERS}-comps
|
||||||
echo "Formatting patch and applying..."
|
echo "Copying comps file over"
|
||||||
git format-patch --stdout ${HOWMANY} FETCH_HEAD | sed -e 's/centos-stream-10/rocky-10-lh/' | git apply
|
cp /var/tmp/${VERS}-comps/${COMPS_FILE} "./${COMPS_ROCKY}"
|
||||||
|
|
||||||
|
echo "Modifying file with Rocky Branding"
|
||||||
|
while read -r pattern; do
|
||||||
|
sscript+="$pattern;"
|
||||||
|
done <<EOF
|
||||||
|
s/>redhat-release/>rocky-release/g
|
||||||
|
s/Red Hat Enterprise Linux/Rocky Linux/g
|
||||||
|
s/RHEL/Rocky Linux/g
|
||||||
|
s/Red Hat, Inc./Rocky Enterprise Software Foundation/g
|
||||||
|
EOF
|
||||||
|
sed -i "$sscript" "${COMPS_ROCKY}"
|
||||||
|
|
||||||
|
echo "Making sure some packages are RHEL only"
|
||||||
|
while read -r pattern; do
|
||||||
|
mscript+="$pattern;"
|
||||||
|
done <<EOF
|
||||||
|
/ <packagereq .*>insights-client/ s/(<packagereq.*>insights-client<\/packagereq>)/<rhel_only>\1<\/rhel_only>/g
|
||||||
|
EOF
|
||||||
|
sed -Ei "$mscript" "${COMPS_ROCKY}"
|
||||||
|
|
||||||
|
#echo "Modifications to make sure certain scenarios work"
|
||||||
|
#while read -r pattern; do
|
||||||
|
# wscript+="$pattern;"
|
||||||
|
#done <<EOF
|
||||||
|
#/>kmod-kvdo</ s/type="default"/type="default" arch="ppc64le,s390x,x86_64"/g
|
||||||
|
#/>vdo</ s/type="default"/type="default" arch="ppc64le,s390x,x86_64"/g
|
||||||
|
#EOF
|
||||||
|
#sed -i "$wscript" "${COMPS_ROCKY}"
|
||||||
|
|
||||||
|
echo "Generating proper XML"
|
||||||
|
/bin/bash ./scripts/update-comps "${COMPS_ROCKY/.in/}" rocky
|
||||||
|
|
||||||
|
echo "Cleaning up upstream"
|
||||||
|
rm -rf /var/tmp/${VERS}-comps
|
||||||
|
|
||||||
echo "!! DIFF OF CHANGES !!"
|
echo "!! DIFF OF CHANGES !!"
|
||||||
git --no-pager diff HEAD
|
git --no-pager diff HEAD
|
||||||
|
|
||||||
echo "You may now commit and push."
|
echo "You may now commit and push if there are any changes."
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
COMPSFILE=$1
|
COMPSFILE=$1
|
||||||
DISTRO=$2
|
DISTRO=$2
|
||||||
|
CURDIR="${0%/*}"
|
||||||
|
|
||||||
if [ -z "$COMPSFILE" ] || [ -z "$DISTRO" ]; then
|
if [ -z "$COMPSFILE" ] || [ -z "$DISTRO" ]; then
|
||||||
echo "Usage: $0 <compsfile> <distro>"
|
echo "Usage: $0 <compsfile> <distro>"
|
||||||
@ -9,7 +10,7 @@ if [ -z "$COMPSFILE" ] || [ -z "$DISTRO" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
LANG=C intltool-merge -x -u po/ $COMPSFILE.in $COMPSFILE
|
LANG=C intltool-merge -x -u po/ $COMPSFILE.in $COMPSFILE
|
||||||
xsltproc --stringparam distro $DISTRO --novalid -o $COMPSFILE comps-distro-only.xsl $COMPSFILE
|
xsltproc --stringparam distro $DISTRO --novalid -o $COMPSFILE ${CURDIR}/comps-distro-only.xsl $COMPSFILE
|
||||||
|
|
||||||
echo "Cleaning up empty space left over"
|
echo "Cleaning up empty space left over"
|
||||||
sed -i '/^ $/d' "${COMPSFILE}"
|
sed -i '/^ $/d' "${COMPSFILE}"
|
||||||
|
Loading…
Reference in New Issue
Block a user