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 0ef6c82164c8ae29c4e055959d9a044ad6d8998e..9ececcdac16d9b9b8194e3d4e01d818b48891868 100644 --- a/lorax.spec +++ b/lorax.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.1 +%define anolis_release .0.2 # 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} @@ -16,6 +16,9 @@ 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 @@ -262,6 +265,9 @@ getent passwd weldr >/dev/null 2>&1 || useradd -r -g weldr -d / -s /sbin/nologin %{_mandir}/man1/composer-cli.1* %changelog +* Thu Sep 23 2021 Liwei Ge - 28.14.62-1.0.2 +- Add loongarch64 support + * Fri Jan 14 2022 Liwei Ge - 28.14.62-1.0.1 - Update requires to lorax-templates-anolis for anolis