diff --git a/1000-lorax-anolis-add-loongarch-support.patch b/1000-lorax-anolis-add-loongarch-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..4c3959ae9ca0d266506879d0ddb49be003c2f478 --- /dev/null +++ b/1000-lorax-anolis-add-loongarch-support.patch @@ -0,0 +1,35 @@ +diff -Nur lorax-34.9.21/src/pylorax/__init__.py lorax-34.9.21.new/src/pylorax/__init__.py +--- lorax-34.9.21/src/pylorax/__init__.py 2022-11-19 07:38:09.000000000 +0800 ++++ lorax-34.9.21.new/src/pylorax/__init__.py 2022-12-20 10:42:57.019077973 +0800 +@@ -64,7 +64,7 @@ + DEFAULT_PLATFORM_ID = "platform:el9" + + class ArchData(DataHolder): +- lib64_arches = ("x86_64", "ppc64le", "s390x", "ia64", "aarch64") ++ lib64_arches = ("x86_64", "ppc64le", "s390x", "ia64", "aarch64", "loongarch64") + bcj_arch = dict(i386="x86", x86_64="x86", + ppc64le="powerpc", + arm="arm", armhfp="arm") +@@ -351,7 +351,10 @@ + for arg in user_dracut_args: + dracut_args += arg.split(" ", 1) + +- anaconda_args = dracut_args + ["--add", "anaconda pollcdrom qemu qemu-net prefixdevname-tools"] ++ if self.arch.basearch == "loongarch64": ++ anaconda_args = dracut_args + ["--add", "anaconda pollcdrom qemu qemu-net"] ++ else: ++ anaconda_args = dracut_args + ["--add", "anaconda pollcdrom qemu qemu-net prefixdevname-tools"] + + logger.info("dracut args = %s", dracut_args) + logger.info("anaconda args = %s", anaconda_args) +diff -Nur lorax-34.9.21/src/pylorax/treebuilder.py lorax-34.9.21.new/src/pylorax/treebuilder.py +--- lorax-34.9.21/src/pylorax/treebuilder.py 2022-11-19 07:38:09.000000000 +0800 ++++ lorax-34.9.21.new/src/pylorax/treebuilder.py 2022-12-20 10:44:14.092459301 +0800 +@@ -43,6 +43,7 @@ + 'aarch64': 'aarch64.tmpl', + 'arm': 'arm.tmpl', + 'armhfp': 'arm.tmpl', ++ 'loongarch64': 'loongarch64.tmpl', + } + + def generate_module_info(moddir, outfile=None): diff --git a/lorax.spec b/lorax.spec index d9e5b21a1301c4ea3f13949133bb77c06448acac..0abf44f417740955aee24f08721bb0e5fc3717f9 100644 --- a/lorax.spec +++ b/lorax.spec @@ -1,10 +1,11 @@ +%define anolis_release .0.1 # NOTE: This specfile is generated from upstream at https://github.com/rhinstaller/lorax # NOTE: Please submit changes as a pull request %define debug_package %{nil} Name: lorax Version: 34.9.21 -Release: 1%{?dist} +Release: 1%{anolis_release}%{?dist} Summary: Tool for creating the anaconda install images License: GPLv2+ @@ -14,14 +15,17 @@ URL: https://github.com/weldr/lorax # git checkout -b archive-branch lorax-%%{version}-%%{release} # tito build --tgz Source0: %{name}-%{version}.tar.gz +# Add by anolis +Patch1000: 1000-lorax-anolis-add-loongarch-support.patch +# End BuildRequires: python3-devel BuildRequires: make BuildRequires: systemd-rpm-macros Requires: lorax-templates -%if 0%{?rhel} >= 9 -Requires: lorax-templates-rhel +%if 0%{?rhel} >= 9 && 0%{?anolis} +Requires: lorax-templates-anolis %endif Requires: cpio @@ -185,6 +189,10 @@ make DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} install %{_datadir}/lorax/templates.d/* %changelog +* Tue Dec 20 2022 Liwei Ge 34.9.21-1.0.1 +- Update requires to lorax-templates-anolis for anolis +- Add loongarch64 support + * Fri Nov 18 2022 Brian C. Lane 34.9.21-1 - livemedia-creator: Allow file: url without networking (bcl) Resolves: rhbz#2132511