Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Ismael Luceno (92d84f0c392699de31c845c55d903699a11fcecb)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Ismael Luceno (92d84f0c392699de31c845c55d903699a11fcecb)
  • Date: Mon, 7 Sep 2020 22:12:40 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

utils/qemu/DEPENDS
| 12 +-
utils/qemu/DETAILS
| 3
utils/qemu/HISTORY
| 16 +++
utils/qemu/PRE_BUILD
| 7 +

utils/qemu/patches/0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch
| 18 ++++
utils/qemu/patches/mmap-mremap-efault.patch
| 41 ++++++++++
utils/qemu/patches/musl-9p-limits_h.patch
| 10 ++
utils/qemu/patches/musl-F_SHLCK-and-F_EXLCK.patch
| 19 ++++
utils/qemu/patches/musl-fix-SIOCGSTAMPNS.patch
| 10 ++
utils/qemu/patches/musl-fix-duplicated-sysinfo.patch
| 10 ++
utils/qemu/patches/musl-fix-sigevent-and-sigval_t.patch
| 26 ++++++
11 files changed, 164 insertions(+), 8 deletions(-)

New commits:
commit 92d84f0c392699de31c845c55d903699a11fcecb
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

qemu: disable tmpfs

commit 389f2226ee14da2e278bdf2c502328fcc3cb4b0c
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

qemu: Fix build against musl libc

commit 19b389c0f37837c5d82f19a61d9770a9c1f3b739
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

qemu: Add fix for wrong include of sys/signal.h

commit b15f903af3d00b636d5a46105aa901e19397726f
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

qemu: Add dependency on usbredir

commit 4b1e81cf60a7204eb01584e7011b1483a3664d06
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

qemu 5.1.0

diff --git a/utils/qemu/DEPENDS b/utils/qemu/DEPENDS
index 2d733a2..59b6e8c 100755
--- a/utils/qemu/DEPENDS
+++ b/utils/qemu/DEPENDS
@@ -1,4 +1,4 @@
-depends python &&
+depends python3 "--python=python3" &&

if list_find "alsa" $QEMU_AUDIO; then
depends alsa-lib
@@ -48,11 +48,6 @@ optional_depends curl \
"--disable-curl" \
"for curl connectivity support" &&

-optional_depends BLUEZ \
- "--enable-bluez" \
- "--disable-bluez" \
- "for Bluetooth support" &&
-
optional_depends attr \
'--enable-attr' \
'--disable-attr' \
@@ -73,6 +68,11 @@ optional_depends spice \
'--disable-spice' \
'for SPICE virtualized desktop support' &&

+optional_depends usbredir \
+ --enable-usb-redir \
+ --disable-usb-redir \
+ 'for USB network redirection support' &&
+
optional_depends libusb \
'--enable-libusb' \
'--disable-libusb' \
diff --git a/utils/qemu/DETAILS b/utils/qemu/DETAILS
index 4a03ffc..b0f6216 100755
--- a/utils/qemu/DETAILS
+++ b/utils/qemu/DETAILS
@@ -1,5 +1,5 @@
SPELL=qemu
- VERSION=4.0.0
+ VERSION=5.1.0
SOURCE=$SPELL-$VERSION.tar.bz2
SOURCE2=$SOURCE.sig
SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-${VERSION%-*}"
@@ -14,6 +14,7 @@ SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-${VERSION%-*}"
KEYWORDS="emulator utils"
ENTERED=20051102
SECURITY_PATCH=1
+ TMPFS=OFF
SHORT="generic and open source processor emulator"
cat << EOF
QEMU achieves a good emulation speed by using dynamic translation.
diff --git a/utils/qemu/HISTORY b/utils/qemu/HISTORY
index 0c67bf0..d548c23 100644
--- a/utils/qemu/HISTORY
+++ b/utils/qemu/HISTORY
@@ -1,3 +1,19 @@
+2020-09-07 Ismael Luceno <ismael AT sourcemage.org>
+ * DETAILS: updated spell to 5.1.0
+ TMPFS=OFF
+ * DEPENDS: removed bluez (upstream removed the backend)
+ switched to python3
+ added dependency on usbredir
+ * PRE_BUILD: added fix for wrong include of sys/signal.h
+ *
patches/0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch,
+ patches/mmap-mremap-efault.patch,
+ patches/musl-9p-limits_h.patch,
+ patches/musl-F_SHLCK-and-F_EXLCK.patch,
+ patches/musl-fix-SIOCGSTAMPNS.patch,
+ patches/musl-fix-duplicated-sysinfo.patch,
+ patches/musl-fix-sigevent-and-sigval_t.patch:
+ added patches to fix build against musl libc
+
2019-08-09 Eric Sandall <sandalle AT sourcemage.org>
* These are quick fixes, I need this recompiled for the updated
nettle 3.5 that broke compatibility.
* DEPENDS: Dependencies changed since 2.11
diff --git a/utils/qemu/PRE_BUILD b/utils/qemu/PRE_BUILD
index 547eddb..78ca645 100755
--- a/utils/qemu/PRE_BUILD
+++ b/utils/qemu/PRE_BUILD
@@ -40,4 +40,9 @@ if ! list_find "${QEMU_CARDS}" "sb16"; then
fi &&

cd "${SOURCE_DIRECTORY}" &&
-apply_patch_dir patches
+apply_patch_dir patches &&
+# Fix wrong include
+sed -i '/^#include/{s@<sys/signal[.]@<signal.@}' \
+ include/qemu/osdep.h \
+ linux-user/syscall.c \
+ linux-user/fd-trans.c
diff --git
a/utils/qemu/patches/0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch

b/utils/qemu/patches/0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch
new file mode 100644
index 0000000..e434b23
--- /dev/null
+++
b/utils/qemu/patches/0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch
@@ -0,0 +1,18 @@
+Updated version of
0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch for qemu-3.0.0
+from alpine, original author Natanael Copa.
+--- a/linux-user/signal.c
++++ b/linux-user/signal.c
+@@ -25,6 +25,13 @@
+ #include "trace.h"
+ #include "signal-common.h"
+
++#ifndef __SIGRTMIN
++#define __SIGRTMIN 32
++#endif
++#ifndef __SIGRTMAX
++#define __SIGRTMAX (NSIG-1)
++#endif
++
+ static struct target_sigaction sigact_table[TARGET_NSIG];
+
+ static void host_signal_handler(int host_signum, siginfo_t *info,
diff --git a/utils/qemu/patches/mmap-mremap-efault.patch
b/utils/qemu/patches/mmap-mremap-efault.patch
new file mode 100644
index 0000000..b033d23
--- /dev/null
+++ b/utils/qemu/patches/mmap-mremap-efault.patch
@@ -0,0 +1,41 @@
+Source: @pullmoll
+Upstream: no
+Reason: errno=EFAULT when the address passed to mremap(2) is not valid
+
+See Rich Felker's comment at
https://www.openwall.com/lists/musl/2017/06/21/2 for
+why we need to return errno as described in man mremap(2) from
qemu-user-static.
+Also speed up the loop when checking for increasing the mappings size to go
+in steps of TARGET_PAGE_SIZE and OR-in a check for the very last byte of the
range.
+
+--- a/linux-user/mmap.c
++++ b/linux-user/mmap.c
+@@ -692,7 +692,7 @@
+ if (!guest_range_valid(old_addr, old_size) ||
+ ((flags & MREMAP_FIXED) &&
+ !guest_range_valid(new_addr, new_size))) {
+- errno = ENOMEM;
++ errno = EFAULT;
+ return -1;
+ }
+
+@@ -728,9 +728,10 @@
+ abi_ulong addr;
+ for (addr = old_addr + old_size;
+ addr < old_addr + new_size;
+- addr++) {
++ addr += TARGET_PAGE_SIZE) {
+ prot |= page_get_flags(addr);
+ }
++ prot |= page_get_flags(old_addr + new_size - 1);
+ }
+ if (prot == 0) {
+ host_addr = mremap(g2h(old_addr), old_size, new_size, flags);
+@@ -738,7 +739,7 @@
+ mmap_reserve(old_addr + old_size, new_size - old_size);
+ }
+ } else {
+- errno = ENOMEM;
++ errno = EFAULT;
+ host_addr = MAP_FAILED;
+ }
+ /* Check if address fits target address space */
diff --git a/utils/qemu/patches/musl-9p-limits_h.patch
b/utils/qemu/patches/musl-9p-limits_h.patch
new file mode 100644
index 0000000..5d0c5be
--- /dev/null
+++ b/utils/qemu/patches/musl-9p-limits_h.patch
@@ -0,0 +1,10 @@
+--- a/hw/9pfs/9p.c
++++ b/hw/9pfs/9p.c
+@@ -11,6 +11,7 @@
+ *
+ */
+
++#include <linux/limits.h>
+ #include "qemu/osdep.h"
+ #include <glib/gprintf.h>
+ #include "hw/virtio/virtio.h"
diff --git a/utils/qemu/patches/musl-F_SHLCK-and-F_EXLCK.patch
b/utils/qemu/patches/musl-F_SHLCK-and-F_EXLCK.patch
new file mode 100644
index 0000000..548c0e6
--- /dev/null
+++ b/utils/qemu/patches/musl-F_SHLCK-and-F_EXLCK.patch
@@ -0,0 +1,19 @@
+This patch was not upstreamed to qemu as those should probably be
+defined in musl libc.
+
+--- a/linux-user/syscall.c
++++ b/linux-user/syscall.c
+@@ -114,6 +114,13 @@
+
+ #include "qemu.h"
+
++#ifndef F_SHLCK
++#define F_SHLCK 8
++#endif
++#ifndef F_EXLCK
++#define F_EXLCK 4
++#endif
++
+ #ifndef CLONE_IO
+ #define CLONE_IO 0x80000000 /* Clone io context */
+ #endif
diff --git a/utils/qemu/patches/musl-fix-SIOCGSTAMPNS.patch
b/utils/qemu/patches/musl-fix-SIOCGSTAMPNS.patch
new file mode 100644
index 0000000..fb7dd7c
--- /dev/null
+++ b/utils/qemu/patches/musl-fix-SIOCGSTAMPNS.patch
@@ -0,0 +1,10 @@
+--- a/linux-user/syscall.c
++++ b/linux-user/syscall.c
+@@ -34,6 +34,7 @@
+ #include <sys/resource.h>
+ #include <sys/swap.h>
+ #include <linux/capability.h>
++#include <linux/sockios.h>
+ #include <sched.h>
+ #include <sys/timex.h>
+ #ifdef __ia64__
diff --git a/utils/qemu/patches/musl-fix-duplicated-sysinfo.patch
b/utils/qemu/patches/musl-fix-duplicated-sysinfo.patch
new file mode 100644
index 0000000..dbe8c17
--- /dev/null
+++ b/utils/qemu/patches/musl-fix-duplicated-sysinfo.patch
@@ -0,0 +1,10 @@
+--- a/linux-user/syscall.c
++++ b/linux-user/syscall.c
+@@ -16,5 +16,6 @@
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+ #define _ATFILE_SOURCE
++#define _LINUX_SYSINFO_H /* to avoid duplicated sysinfo struct definition */
+ #include "qemu/osdep.h"
+ #include "qemu/cutils.h"
+ #include "qemu/path.h"
diff --git a/utils/qemu/patches/musl-fix-sigevent-and-sigval_t.patch
b/utils/qemu/patches/musl-fix-sigevent-and-sigval_t.patch
new file mode 100644
index 0000000..61a5236
--- /dev/null
+++ b/utils/qemu/patches/musl-fix-sigevent-and-sigval_t.patch
@@ -0,0 +1,26 @@
+Origin: Void-Linux
+
+--- a/linux-user/syscall.c
++++ b/linux-user/syscall.c
+@@ -5020,9 +5020,20 @@
+ return 0;
+ }
+
+-static inline abi_long target_to_host_sigevent(struct sigevent *host_sevp,
++struct host_sigevent {
++ union sigval sigev_value;
++ int sigev_signo;
++ int sigev_notify;
++ union {
++ int _pad[64-sizeof(int) * 2 + sizeof(union sigval)];
++ int _tid;
++ } _sigev_un;
++};
++
++static inline abi_long target_to_host_sigevent(struct sigevent *sevp,
+ abi_ulong target_addr)
+ {
++ struct host_sigevent *host_sevp = (struct host_sigevent *) sevp;
+ struct target_sigevent *target_sevp;
+
+ if (!lock_user_struct(VERIFY_READ, target_sevp, target_addr, 1)) {



  • [SM-Commit] GIT changes to master grimoire by Ismael Luceno (92d84f0c392699de31c845c55d903699a11fcecb), Ismael Luceno, 09/07/2020

Archive powered by MHonArc 2.6.24.

Top of Page