AlmaLinux changes

This commit is contained in:
Andrew Lukoshko 2021-09-15 11:17:41 +00:00
parent 38167808be
commit e93ec9f6ce
2 changed files with 117 additions and 2 deletions

View File

@ -0,0 +1,94 @@
diff -Naur osinfo-db-20200813.orig/install-script/redhat.com/rhel-kickstart-desktop.xml osinfo-db-20200813.alma/install-script/redhat.com/rhel-kickstart-desktop.xml
--- osinfo-db-20200813.orig/install-script/redhat.com/rhel-kickstart-desktop.xml 2020-08-13 13:44:02.000000000 +0300
+++ osinfo-db-20200813.alma/install-script/redhat.com/rhel-kickstart-desktop.xml 2021-03-13 14:03:32.081390444 +0300
@@ -158,6 +158,13 @@
</xsl:otherwise>
</xsl:choose>
</xsl:when>
+ <xsl:when test="os/distro = 'almalinux'">
+ <xsl:text>http://repo.almalinux.org/almalinux/</xsl:text>
+ <xsl:call-template name="version"/>
+ <xsl:text>/BaseOS/</xsl:text>
+ <xsl:call-template name="arch"/>
+ <xsl:text>/os/</xsl:text>
+ </xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template name="appstream-url">
diff -Naur osinfo-db-20200813.orig/install-script/redhat.com/rhel-kickstart-jeos.xml osinfo-db-20200813.alma/install-script/redhat.com/rhel-kickstart-jeos.xml
--- osinfo-db-20200813.orig/install-script/redhat.com/rhel-kickstart-jeos.xml 2020-08-13 13:44:02.000000000 +0300
+++ osinfo-db-20200813.alma/install-script/redhat.com/rhel-kickstart-jeos.xml 2021-03-13 14:04:23.528039336 +0300
@@ -138,6 +138,13 @@
</xsl:otherwise>
</xsl:choose>
</xsl:when>
+ <xsl:when test="os/distro = 'almalinux'">
+ <xsl:text>http://repo.almalinux.org/almalinux/</xsl:text>
+ <xsl:call-template name="version"/>
+ <xsl:text>/BaseOS/</xsl:text>
+ <xsl:call-template name="arch"/>
+ <xsl:text>/os/</xsl:text>
+ </xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template match="/install-script-config">
diff -Naur osinfo-db-20200813.orig/os/almalinux.org/almalinux-8.xml osinfo-db-20200813.alma/os/almalinux.org/almalinux-8.xml
--- osinfo-db-20200813.orig/os/almalinux.org/almalinux-8.xml 1970-01-01 03:00:00.000000000 +0300
+++ osinfo-db-20200813.alma/os/almalinux.org/almalinux-8.xml 2021-03-13 16:06:46.622017282 +0300
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<libosinfo version="0.0.1">
+ <os id="http://almalinux.org/almalinux/8">
+ <short-id>almalinux8</short-id>
+ <name>AlmaLinux 8</name>
+ <version>8</version>
+ <vendor>AlmaLinux</vendor>
+ <family>linux</family>
+ <distro>almalinux</distro>
+ <codename>Purple Manul</codename>
+ <clones id="http://redhat.com/rhel/8.3"/>
+ <release-date>2021-03-30</release-date>
+ <media arch="x86_64">
+ <iso>
+ <system-id>LINUX</system-id>
+ <volume-id>AlmaLinux-8.*-x86_64.*</volume-id>
+ </iso>
+ <kernel>isolinux/vmlinuz</kernel>
+ <initrd>isolinux/initrd.img</initrd>
+ </media>
+ <tree arch="x86_64">
+ <url>http://repo.almalinux.org/almalinux/8/BaseOS/x86_64/os/</url>
+ <treeinfo>
+ <family>AlmaLinux</family>
+ <version>^8$</version>
+ <arch>x86_64</arch>
+ </treeinfo>
+ </tree>
+ <tree arch="all">
+ <treeinfo>
+ <family>AlmaLinux</family>
+ <version>^8$</version>
+ </treeinfo>
+ </tree>
+ <resources arch="all">
+ <minimum>
+ <n-cpus>1</n-cpus>
+ <cpu>1000000000</cpu>
+ <ram>1610612736</ram>
+ <storage>10737418240</storage>
+ </minimum>
+ <recommended>
+ <cpu>1000000000</cpu>
+ <ram>1610612736</ram>
+ <storage>21474836480</storage>
+ </recommended>
+ <network-install>
+ <ram>3221225472</ram>
+ </network-install>
+ </resources>
+ <installer>
+ <script id="http://redhat.com/rhel/kickstart/jeos"/>
+ <script id="http://redhat.com/rhel/kickstart/desktop"/>
+ </installer>
+ </os>
+</libosinfo>

View File

@ -1,12 +1,15 @@
# -*- rpm-spec -*- # -*- rpm-spec -*-
%define PatchedSource ../%{name}-%{version}-patched.tar.xz
Summary: osinfo database files Summary: osinfo database files
Name: osinfo-db Name: osinfo-db
Version: 20210215 Version: 20210215
Release: 1%{?dist} Release: 1%{?dist}.alma
License: LGPLv2+ License: LGPLv2+
Source0: https://fedorahosted.org/releases/l/i/libosinfo/%{name}-%{version}.tar.xz Source0: https://fedorahosted.org/releases/l/i/libosinfo/%{name}-%{version}.tar.xz
Source1: https://fedorahosted.org/releases/l/i/libosinfo/%{name}-%{version}.tar.xz.asc Source1: https://fedorahosted.org/releases/l/i/libosinfo/%{name}-%{version}.tar.xz.asc
Patch0: osinfo-db-20200813-add_almalinux.patch
URL: http://libosinfo.org/ URL: http://libosinfo.org/
BuildRequires: intltool BuildRequires: intltool
BuildRequires: osinfo-db-tools BuildRequires: osinfo-db-tools
@ -18,8 +21,23 @@ The osinfo database provides information about operating systems and
hypervisor platforms to facilitate the automated configuration and hypervisor platforms to facilitate the automated configuration and
provisioning of new virtual machines provisioning of new virtual machines
%prep
%setup
%patch0 -p1
# Remove spurious leftovers from when applying the patches
find ../%{name}-%{version}/ -name "*.orig" -exec rm -f {} \;
# For us to be able to apply patches on top of a rebase, we:
# 1. unpack the sources
# 2. patch the sources
# 3. pack the sources in a tarball
# 4. feed the patched tarball to osinfo-db-import
%build
tar -cvJf %{PatchedSource} ../%{name}-%{version}/
%install %install
osinfo-db-import --root %{buildroot} --dir %{_datadir}/osinfo %{SOURCE0} osinfo-db-import --root %{buildroot} --dir %{_datadir}/osinfo %{PatchedSource}
%if 0%{?rhel} %if 0%{?rhel}
# Remove the upstream virtio-win / spice-guest-tools drivers # Remove the upstream virtio-win / spice-guest-tools drivers
find %{buildroot}/%{_datadir}/osinfo/os/microsoft.com/ -name "win-*.d" -type d -exec rm -rf {} + find %{buildroot}/%{_datadir}/osinfo/os/microsoft.com/ -name "win-*.d" -type d -exec rm -rf {} +
@ -37,6 +55,9 @@ find %{buildroot}/%{_datadir}/osinfo/os/microsoft.com/ -name "win-*.d" -type d -
%{_datadir}/osinfo/schema %{_datadir}/osinfo/schema
%changelog %changelog
* Mon Apr 19 2021 Andrew Lukoshko <alukoshko@almalinux.org> - 20210215-1.alma
- Add AlmaLinux 8 detection
* Mon Feb 15 2021 Fabiano Fidêncio <fidencio@redhat.com> - 20210215-1 * Mon Feb 15 2021 Fabiano Fidêncio <fidencio@redhat.com> - 20210215-1
- Resolves: rhbz#1903300 - rebase osinfo-db to latest fedora - Resolves: rhbz#1903300 - rebase osinfo-db to latest fedora