diff --git a/1000-lorax-anolis-add-loongarch-support.patch b/1000-lorax-anolis-add-loongarch-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..0376779dffc2862427470207543f1895ff9e5db4 --- /dev/null +++ b/1000-lorax-anolis-add-loongarch-support.patch @@ -0,0 +1,35 @@ +diff -Nur lorax-28.14.58/src/pylorax/__init__.py lorax-28.14.58.new/src/pylorax/__init__.py +--- lorax-28.14.58/src/pylorax/__init__.py 2021-03-05 05:40:56.000000000 +0800 ++++ lorax-28.14.58.new/src/pylorax/__init__.py 2021-09-24 11:34:15.413626911 +0800 +@@ -68,7 +68,7 @@ + DEFAULT_PLATFORM_ID = "platform:el8" + + class ArchData(DataHolder): +- lib64_arches = ("x86_64", "ppc64", "ppc64le", "s390x", "ia64", "aarch64") ++ lib64_arches = ("x86_64", "ppc64", "ppc64le", "s390x", "ia64", "aarch64", "loongarch64") + bcj_arch = dict(i386="x86", x86_64="x86", + ppc="powerpc", ppc64="powerpc", 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"] + + # ppc64 cannot boot an initrd > 32MiB so remove some drivers + if self.arch.basearch in ("ppc64", "ppc64le"): +diff -Nur lorax-28.14.58/src/pylorax/treebuilder.py lorax-28.14.58.new/src/pylorax/treebuilder.py +--- lorax-28.14.58/src/pylorax/treebuilder.py 2021-03-05 05:40:56.000000000 +0800 ++++ lorax-28.14.58.new/src/pylorax/treebuilder.py 2021-09-24 11:09:05.655014696 +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 836f096699d26b53fc03314fbab3c56dbb45df6e..64997a6c6e3f263f7f194476022281b75641de12 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: 28.14.68 -Release: 1%{?dist} +Release: 1%{anolis_release}%{?dist} Summary: Tool for creating the anaconda install images Group: Applications/System @@ -15,12 +16,15 @@ 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 Requires: lorax-templates -%if 0%{?rhel} >= 8 -Requires: lorax-templates-rhel +%if 0%{?rhel} >= 8 && 0%{?anolis} +Requires: lorax-templates-anolis %endif Requires: GConf2 @@ -261,6 +265,10 @@ getent passwd weldr >/dev/null 2>&1 || useradd -r -g weldr -d / -s /sbin/nologin %{_mandir}/man1/composer-cli.1* %changelog +* Mon Apr 18 2022 Liwei Ge 28.14.68-1.0.1 +- Update requires to lorax-templates-anolis for anolis +- Add loongarch64 support + * Fri Feb 04 2022 Brian C. Lane 28.14.68-1 - mkksiso: Fix check for unsupported arch error (bcl) Related: rhbz#2049205