[packages/box64] upstream revert to fix getopts regression; rel 2

atler atler at pld-linux.org
Mon Jan 8 20:29:49 CET 2024


commit afcd7720669473b1048ffc261bbb9f14f418eea1
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon Jan 8 20:26:09 2024 +0100

    upstream revert to fix getopts regression; rel 2
    
    see: https://github.com/ptitSeb/box64/issues/1190

 box64.spec              |  4 +++-
 getopt-regression.patch | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+), 1 deletion(-)
---
diff --git a/box64.spec b/box64.spec
index 2083b6a..9f15dd9 100644
--- a/box64.spec
+++ b/box64.spec
@@ -18,11 +18,12 @@
 Summary:	Linux Userspace x86_64 Emulator
 Name:		box64
 Version:	0.2.6
-Release:	1
+Release:	2
 License:	MIT
 Group:		Applications
 Source0:	https://github.com/ptitSeb/box64/archive/v%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	12a691bad57bb0806a6e06c23c71121a
+Patch0:		getopt-regression.patch
 URL:		https://box86.org
 BuildRequires:	cmake >= 3.4
 BuildRequires:	python3
@@ -40,6 +41,7 @@ Linux systems, like ARM (host system needs to be 64bit little-endian).
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %cmake -B build \
diff --git a/getopt-regression.patch b/getopt-regression.patch
new file mode 100644
index 0000000..1784a51
--- /dev/null
+++ b/getopt-regression.patch
@@ -0,0 +1,32 @@
+From cbea2b544367675f710ebab74f4056ca1d18c203 Mon Sep 17 00:00:00 2001
+From: ptitSeb <sebastien.chev at gmail.com>
+Date: Sat, 6 Jan 2024 10:30:31 +0100
+Subject: [PATCH] Rollback commit 9201559 as it breaks some programs using
+ getopts (should help #1190)
+
+---
+ src/librarian/globalsymbols.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/librarian/globalsymbols.c b/src/librarian/globalsymbols.c
+index 6d96720b7..462af7fb2 100644
+--- a/src/librarian/globalsymbols.c
++++ b/src/librarian/globalsymbols.c
+@@ -20,7 +20,7 @@
+     if (GetGlobalNoWeakSymbolStartEnd(my_context->maplib, #A, &globoffs, &globend, -1, NULL, NULL)) {     \
+         printf_log(LOG_DEBUG, "Global " #A " workaround, @%p <- %p\n", (void*)globoffs, &A);              \
+         memcpy((void*)globoffs, &A, sizeof(A));                                                           \
+-    } else                                                                                                \
++    }                                                                                                     \
+     if (B && GetGlobalNoWeakSymbolStartEnd(my_context->maplib, #A, &globoffs, &globend, -1, NULL, B)) {   \
+         printf_log(LOG_DEBUG, "Global " #A " workaround, @%p <- %p\n", (void*)globoffs, &A);              \
+         memcpy((void*)globoffs, &A, sizeof(A));                                                           \
+@@ -30,7 +30,7 @@
+     if (GetGlobalNoWeakSymbolStartEnd(my_context->maplib, #A, &globoffs, &globend, -1, NULL, NULL)) {     \
+         printf_log(LOG_DEBUG, "Global " #A " workaround, @%p -> %p\n", (void*)globoffs, &A);              \
+         memcpy(&A, (void*)globoffs, sizeof(A));                                                           \
+-    } else                                                                                                \
++    }                                                                                                     \
+     if (B && GetGlobalNoWeakSymbolStartEnd(my_context->maplib, #A, &globoffs, &globend, -1, NULL, B)) {   \
+         printf_log(LOG_DEBUG, "Global " #A " workaround, @%p -> %p\n", (void*)globoffs, &A);              \
+         memcpy(&A, (void*)globoffs, sizeof(A));                                                           \
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/box64.git/commitdiff/afcd7720669473b1048ffc261bbb9f14f418eea1



More information about the pld-cvs-commit mailing list