diff --git a/0002-Get-system-architecture-by-bin-sh-executable-instead.patch b/0002-Get-system-architecture-by-bin-sh-executable-instead.patch new file mode 100644 index 0000000..bffc696 --- /dev/null +++ b/0002-Get-system-architecture-by-bin-sh-executable-instead.patch @@ -0,0 +1,39 @@ +From cb3e1864828802680a164e7a45ab058235c5404c Mon Sep 17 00:00:00 2001 +From: Mikhail Novosyolov +Date: Sat, 24 Aug 2019 21:33:23 +0300 +Subject: [PATCH] Get system architecture by /bin/sh executable instead of + parsing not standartized /etc/system-release + +There is no standard for /etc/system-release, and old code did not understand that "OS ROSA Nickel 64" is a 64-bit system. +--- + imgcreate/live.py | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/imgcreate/live.py b/imgcreate/live.py +index f63c2e0..027d14d 100644 +--- a/imgcreate/live.py ++++ b/imgcreate/live.py +@@ -24,6 +24,7 @@ import shutil + import subprocess + import logging + import re ++import platform + + from imgcreate.errors import * + from imgcreate.fs import * +@@ -742,9 +743,9 @@ menu end + """ + fail = False + missing = [] +- if os.path.exists(self._instroot + "/etc/system-release"): +- arch = subprocess.check_output("echo -n `sed 's/^.* release \\S* for //' " + self._instroot + "/etc/system-release`", shell=True) +- grub_arch = ("x64" if arch == "x86_64" else "ia32") ++ if os.path.exists(self._instroot + "/bin/sh"): ++ arch = platform.architecture(executable=self._instroot + "/bin/sh")[0] ++ grub_arch = ("x64" if arch == "64bit" else "ia32") + else: + grub_arch = "x64" + +-- +2.17.1 + diff --git a/livecd-tools.spec b/livecd-tools.spec index ff01a21..90b9931 100644 --- a/livecd-tools.spec +++ b/livecd-tools.spec @@ -3,7 +3,7 @@ Summary: Tools for building live CDs Name: livecd-tools Version: 21.1 -Release: 58 +Release: 59 Epoch: 1 License: GPLv2+ Group: System/Base @@ -34,6 +34,7 @@ Patch21: livecd-tools-21.1.use.add_drivers.patch Patch22: livecd-tools-21.1.no.vga.opts.patch Patch23: livecd-tools-21.1-genisoimage.patch Patch24: 0001-Run-setfiles-after-chroot.patch +Patch25: 0002-Get-system-architecture-by-bin-sh-executable-instead.patch Requires: python-imgcreate = %{EVRD} Requires: dosfstools