Compare commits
11 Commits
a117e6092b
...
e2cecd4306
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2cecd4306 | ||
|
|
8c105a7e3f | ||
|
|
7832c5aa34 | ||
|
|
029f3b5181 | ||
|
|
d54ae1531f | ||
|
|
293c0936e7 | ||
|
|
33ab43155f | ||
|
|
5d2694846f | ||
|
|
4b38bf5585 | ||
|
|
baf6cefda3 | ||
|
|
9e18e322d9 |
@ -1,3 +1,4 @@
|
|||||||
|
From 14fefba9691639c7909aa748b9d29f72b0b4cf83 Mon Sep 17 00:00:00 2001
|
||||||
From: isoft <wenjuan.qiu@i-soft.com.cn>
|
From: isoft <wenjuan.qiu@i-soft.com.cn>
|
||||||
Date: Fri, 28 Oct 2022 02:43:32 +0000
|
Date: Fri, 28 Oct 2022 02:43:32 +0000
|
||||||
Subject: Patch sw64 modify
|
Subject: Patch sw64 modify
|
||||||
|
|||||||
33
0001-pylorax-Fix-mksparse-ftruncate-size-handling.patch
Normal file
33
0001-pylorax-Fix-mksparse-ftruncate-size-handling.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
From 8e67d8e2369e6045970aaad632b5bf32fb611b1f Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Brian C. Lane" <bcl@redhat.com>
|
||||||
|
Date: Fri, 11 Jun 2021 09:28:16 -0700
|
||||||
|
Subject: [PATCH] pylorax: Fix mksparse ftruncate size handling
|
||||||
|
|
||||||
|
Make sure that os.ftruncate() is called with an int() size. Before python
|
||||||
|
3.10 it used to handle this internally, but in 3.9 it was deprecated and
|
||||||
|
in 3.10 it now raises an error:
|
||||||
|
|
||||||
|
TypeError: 'float' object cannot be interpreted as an integer
|
||||||
|
|
||||||
|
This makes sure that the size is truncated to an int(). The value is in
|
||||||
|
bytes, so truncation does not lose anything.
|
||||||
|
---
|
||||||
|
src/pylorax/imgutils.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/pylorax/imgutils.py b/src/pylorax/imgutils.py
|
||||||
|
index d38f056..44d5b55 100644
|
||||||
|
--- a/src/pylorax/imgutils.py
|
||||||
|
+++ b/src/pylorax/imgutils.py
|
||||||
|
@@ -130,7 +130,7 @@ def mkrootfsimg(rootdir, outfile, label, size=2, sysroot=""):
|
||||||
|
def mksparse(outfile, size):
|
||||||
|
'''use os.ftruncate to create a sparse file of the given size.'''
|
||||||
|
fobj = open(outfile, "w")
|
||||||
|
- os.ftruncate(fobj.fileno(), size)
|
||||||
|
+ os.ftruncate(fobj.fileno(), int(size))
|
||||||
|
|
||||||
|
def mkqcow2(outfile, size, options=None):
|
||||||
|
'''use qemu-img to create a file of the given size.
|
||||||
|
--
|
||||||
|
2.45.2
|
||||||
|
|
||||||
38
0001-support-riscv64-for-lorax.patch
Normal file
38
0001-support-riscv64-for-lorax.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
From fa014d1430eba080f8a30b600441b19297fee67b Mon Sep 17 00:00:00 2001
|
||||||
|
From: ouuleilei <wangliu@iscas.ac.cn>
|
||||||
|
Date: Wed, 9 Aug 2023 17:15:11 +0800
|
||||||
|
Subject: [PATCH] support riscv64 for lorax
|
||||||
|
|
||||||
|
---
|
||||||
|
src/pylorax/__init__.py | 2 +-
|
||||||
|
src/pylorax/treebuilder.py | 1 +
|
||||||
|
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py
|
||||||
|
index 8700ff5..ee79a6f 100644
|
||||||
|
--- a/src/pylorax/__init__.py
|
||||||
|
+++ b/src/pylorax/__init__.py
|
||||||
|
@@ -64,7 +64,7 @@ DRACUT_DEFAULT = ["--xz", "--install", "/.buildstamp", "--no-early-microcode", "
|
||||||
|
DEFAULT_PLATFORM_ID = "platform:f32"
|
||||||
|
|
||||||
|
class ArchData(DataHolder):
|
||||||
|
- lib64_arches = ("x86_64", "ppc64le", "s390x", "ia64", "aarch64")
|
||||||
|
+ lib64_arches = ("x86_64", "ppc64le", "s390x", "ia64", "aarch64", "riscv64")
|
||||||
|
bcj_arch = dict(i386="x86", x86_64="x86",
|
||||||
|
ppc64le="powerpc",
|
||||||
|
arm="arm", armhfp="arm")
|
||||||
|
diff --git a/src/pylorax/treebuilder.py b/src/pylorax/treebuilder.py
|
||||||
|
index 5a1386c..f0120bb 100644
|
||||||
|
--- a/src/pylorax/treebuilder.py
|
||||||
|
+++ b/src/pylorax/treebuilder.py
|
||||||
|
@@ -42,6 +42,7 @@ templatemap = {
|
||||||
|
'aarch64': 'aarch64.tmpl',
|
||||||
|
'arm': 'arm.tmpl',
|
||||||
|
'armhfp': 'arm.tmpl',
|
||||||
|
+ 'riscv64': 'riscv64.tmpl',
|
||||||
|
}
|
||||||
|
|
||||||
|
def generate_module_info(moddir, outfile=None):
|
||||||
|
--
|
||||||
|
2.39.1
|
||||||
|
|
||||||
29
lorax.spec
29
lorax.spec
@ -3,14 +3,12 @@
|
|||||||
|
|
||||||
Name: lorax
|
Name: lorax
|
||||||
Version: 34.1
|
Version: 34.1
|
||||||
Release: 3
|
Release: 7
|
||||||
Summary: A set of tools used to create bootable images
|
Summary: A set of tools used to create bootable images
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: https://github.com/weldr/lorax
|
URL: https://github.com/weldr/lorax
|
||||||
Source0: https://github.com/weldr/lorax/archive/%{name}-%{version}-1.tar.gz
|
Source0: https://github.com/weldr/lorax/archive/%{name}-%{version}-1.tar.gz
|
||||||
%ifarch sw_64
|
|
||||||
Source1: sw64.tar.gz
|
Source1: sw64.tar.gz
|
||||||
%endif
|
|
||||||
|
|
||||||
Patch0: 0001-ignore-the-dir-that-without-kernel-version.patch
|
Patch0: 0001-ignore-the-dir-that-without-kernel-version.patch
|
||||||
Patch1: 0001-add-text-mode-selection-menu-in-grub-configuration.patch
|
Patch1: 0001-add-text-mode-selection-menu-in-grub-configuration.patch
|
||||||
@ -28,11 +26,10 @@ Patch12: backport-Improve-lmc-no-virt-error-handling.patch
|
|||||||
Patch13: backport-Add-POSTIN-scriptlet-error-to-the-log-monitor-list.patch
|
Patch13: backport-Add-POSTIN-scriptlet-error-to-the-log-monitor-list.patch
|
||||||
Patch14: backport-Remove-LD_PRELOAD-libgomp.so.1-from-lmc-no-virt.patch
|
Patch14: backport-Remove-LD_PRELOAD-libgomp.so.1-from-lmc-no-virt.patch
|
||||||
Patch16: add-param-name_prefix-to-make-name-used-by-register_blueprint-unique.patch
|
Patch16: add-param-name_prefix-to-make-name-used-by-register_blueprint-unique.patch
|
||||||
|
Patch17: 0001-pylorax-Fix-mksparse-ftruncate-size-handling.patch
|
||||||
Patch100: 0001-support-loongarch-for-lorax.patch
|
Patch100: 0001-support-loongarch-for-lorax.patch
|
||||||
|
|
||||||
%ifarch sw_64
|
|
||||||
Patch200: 0001-add-sw64-architecture.patch
|
Patch200: 0001-add-sw64-architecture.patch
|
||||||
%endif
|
Patch300: 0001-support-riscv64-for-lorax.patch
|
||||||
|
|
||||||
BuildRequires: python3-devel python3-sphinx_rtd_theme python3-magic
|
BuildRequires: python3-devel python3-sphinx_rtd_theme python3-magic
|
||||||
BuildRequires: python3-pytest python3-pytest-mock python3-pocketlint python3-gevent
|
BuildRequires: python3-pytest python3-pytest-mock python3-pocketlint python3-gevent
|
||||||
@ -140,6 +137,7 @@ build images, etc. from the command line.
|
|||||||
%patch13 -p1
|
%patch13 -p1
|
||||||
%patch14 -p1
|
%patch14 -p1
|
||||||
%patch16 -p1
|
%patch16 -p1
|
||||||
|
%patch17 -p1
|
||||||
%ifarch loongarch64
|
%ifarch loongarch64
|
||||||
%patch100 -p1
|
%patch100 -p1
|
||||||
%endif
|
%endif
|
||||||
@ -148,6 +146,10 @@ build images, etc. from the command line.
|
|||||||
%patch200 -p1
|
%patch200 -p1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%ifarch riscv64
|
||||||
|
%patch300 -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%make_build
|
%make_build
|
||||||
|
|
||||||
@ -232,6 +234,21 @@ getent passwd weldr >/dev/null 2>&1 || useradd -r -g weldr -d / -s /sbin/nologin
|
|||||||
%{_mandir}/man1/*.1*
|
%{_mandir}/man1/*.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Dec 13 2024 liweigang <liweigang.lwg@gmail.com> - 34.1-7
|
||||||
|
- Clean spec
|
||||||
|
|
||||||
|
* Thu Jun 13 2024 ouuleilei <wangliu@iscas.ac.cn> - 34.1-6
|
||||||
|
- pylorax: Fix mksparse ftruncate size handling
|
||||||
|
|
||||||
|
* Wed Aug 09 2023 ouuleilei <wangliu@iscas.ac.cn> - 34.1-5
|
||||||
|
- support riscv64 for lorax
|
||||||
|
|
||||||
|
* Mon Jun 19 2023 xinghe <xinghe2@h-partners.com> - 34.1-4
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:ensure that the src package contains the loongson and sw patches
|
||||||
|
|
||||||
* Mon Dec 11 2022 qiuwenjuan <wenjuan.qiu@i-soft.com.cn> - 34.1-3
|
* Mon Dec 11 2022 qiuwenjuan <wenjuan.qiu@i-soft.com.cn> - 34.1-3
|
||||||
- Type:requirement
|
- Type:requirement
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user