From b5733d3b0e885f264707b56c0f4da0c0351db9dc Mon Sep 17 00:00:00 2001 From: q66 Date: Fri, 1 Jul 2022 17:19:47 +0200 Subject: [PATCH 1/2] New package: networkmanager-dmenu-2.1.0 --- srcpkgs/networkmanager-dmenu/template | 19 +++ .../qemu/patches/fix-linux-user-ppc32.patch | 117 ++++++++++++++++++ 2 files changed, 136 insertions(+) create mode 100644 srcpkgs/networkmanager-dmenu/template create mode 100644 srcpkgs/qemu/patches/fix-linux-user-ppc32.patch diff --git a/srcpkgs/networkmanager-dmenu/template b/srcpkgs/networkmanager-dmenu/template new file mode 100644 index 000000000000..ed8510b65e32 --- /dev/null +++ b/srcpkgs/networkmanager-dmenu/template @@ -0,0 +1,19 @@ +# Template file for 'networkmanager-dmenu' +pkgname=networkmanager-dmenu +version=2.1.0 +revision=1 +depends="python3 NetworkManager python3-gobject" +short_desc="Control NetworkManager via dmenu" +maintainer="Ishaan Bhimwal " +license="MIT" +homepage="https://github.com/firecat53/networkmanager-dmenu" +distfiles="https://github.com/firecat53/networkmanager-dmenu/archive/refs/tags/v${version}.tar.gz" +checksum=f39090bb924969dd5e76e8b07dd57ba89f146f444f225106383345d458de0729 + +do_install() { + vbin networkmanager_dmenu + vlicense LICENSE.txt + vdoc README.md + vsconf config.ini.example + vinstall networkmanager_dmenu.desktop 644 /usr/share/applications +} diff --git a/srcpkgs/qemu/patches/fix-linux-user-ppc32.patch b/srcpkgs/qemu/patches/fix-linux-user-ppc32.patch new file mode 100644 index 000000000000..cd47435d5aa9 --- /dev/null +++ b/srcpkgs/qemu/patches/fix-linux-user-ppc32.patch @@ -0,0 +1,117 @@ +commit 37814f62c2cc7aba2eea073014d6c53dcd5bf42c +Author: q66 +Date: Fri Jul 1 16:53:55 2022 +0200 + + fix linux-user build on 32-bit ppc + + Partial revert https://gitlab.com/qemu-project/qemu/-/commit/9d1401b79463e74adbfac69d836789d4e103fb61 + and https://gitlab.com/qemu-project/qemu/-/commit/0a7e01904d407baa73c1baddbdfc9ccf2ace8356 + +diff --git a/common-user/host/ppc/safe-syscall.inc.S b/common-user/host/ppc/safe-syscall.inc.S +new file mode 100644 +index 0000000..e69de29 +diff --git a/common-user/safe-syscall-error.c b/common-user/safe-syscall-error.c +index cf74b50..a36132c 100644 +--- a/common-user/safe-syscall-error.c ++++ b/common-user/safe-syscall-error.c +@@ -12,6 +12,7 @@ + #include "qemu/osdep.h" + #include "user/safe-syscall.h" + ++#if !defined(__powerpc__) || defined(__powerpc64__) + /* + * This is intended to be invoked via tail-call on the error path + * from the assembly in host/arch/safe-syscall.inc.S. This takes +@@ -23,3 +24,4 @@ long safe_syscall_set_errno_tail(int value) + errno = value; + return -1; + } ++#endif +diff --git a/include/user/safe-syscall.h b/include/user/safe-syscall.h +index 61a04e2..793fe84 100644 +--- a/include/user/safe-syscall.h ++++ b/include/user/safe-syscall.h +@@ -125,6 +125,8 @@ + * kinds of restartability. + */ + ++#if !defined(__powerpc__) || defined(__powerpc64__) ++ + /* The core part of this function is implemented in assembly */ + extern long safe_syscall_base(int *pending, long number, ...); + extern long safe_syscall_set_errno_tail(int value); +@@ -137,4 +139,10 @@ extern char safe_syscall_end[]; + safe_syscall_base(&((TaskState *)thread_cpu->opaque)->signal_pending, \ + __VA_ARGS__) + ++#else ++ ++#define safe_syscall syscall ++ ++#endif ++ + #endif +diff --git a/linux-user/include/host/ppc/host-signal.h b/linux-user/include/host/ppc/host-signal.h +new file mode 100644 +index 0000000..b80384d +--- /dev/null ++++ b/linux-user/include/host/ppc/host-signal.h +@@ -0,0 +1,38 @@ ++/* ++ * host-signal.h: signal info dependent on the host architecture ++ * ++ * Copyright (c) 2003-2005 Fabrice Bellard ++ * Copyright (c) 2021 Linaro Limited ++ * ++ * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. ++ * See the COPYING file in the top-level directory. ++ */ ++ ++#ifndef PPC_HOST_SIGNAL_H ++#define PPC_HOST_SIGNAL_H ++ ++/* The third argument to a SA_SIGINFO handler is ucontext_t. */ ++typedef ucontext_t host_sigcontext; ++ ++static inline uintptr_t host_signal_pc(host_sigcontext *uc) ++{ ++ return uc->uc_mcontext.regs->nip; ++} ++ ++static inline void host_signal_set_pc(host_sigcontext *uc, uintptr_t pc) ++{ ++ uc->uc_mcontext.regs->nip = pc; ++} ++ ++static inline void *host_signal_mask(host_sigcontext *uc) ++{ ++ return &uc->uc_sigmask; ++} ++ ++static inline bool host_signal_write(siginfo_t *info, host_sigcontext *uc) ++{ ++ return uc->uc_mcontext.regs->trap != 0x400 ++ && (uc->uc_mcontext.regs->dsisr & 0x02000000); ++} ++ ++#endif +diff --git a/linux-user/signal.c b/linux-user/signal.c +index 092e70b..b8dfa8a 100644 +--- a/linux-user/signal.c ++++ b/linux-user/signal.c +@@ -800,6 +800,7 @@ void queue_signal(CPUArchState *env, int sig, int si_type, + /* Adjust the signal context to rewind out of safe-syscall if we're in it */ + static inline void rewind_if_in_safe_syscall(void *puc) + { ++#if !defined(__powerpc__) || defined(__powerpc64__) + host_sigcontext *uc = (host_sigcontext *)puc; + uintptr_t pcreg = host_signal_pc(uc); + +@@ -807,6 +808,7 @@ static inline void rewind_if_in_safe_syscall(void *puc) + && pcreg < (uintptr_t)safe_syscall_end) { + host_signal_set_pc(uc, (uintptr_t)safe_syscall_start); + } ++#endif + } + + static void host_signal_handler(int host_sig, siginfo_t *info, void *puc) From 864859358f11106cd289e998f4dffb29737c5b08 Mon Sep 17 00:00:00 2001 From: Ishaan Bhimwal Date: Sat, 2 Jul 2022 18:30:12 +0530 Subject: [PATCH 2/2] Delete fix-linux-user-ppc32.patch --- .../qemu/patches/fix-linux-user-ppc32.patch | 117 ------------------ 1 file changed, 117 deletions(-) delete mode 100644 srcpkgs/qemu/patches/fix-linux-user-ppc32.patch diff --git a/srcpkgs/qemu/patches/fix-linux-user-ppc32.patch b/srcpkgs/qemu/patches/fix-linux-user-ppc32.patch deleted file mode 100644 index cd47435d5aa9..000000000000 --- a/srcpkgs/qemu/patches/fix-linux-user-ppc32.patch +++ /dev/null @@ -1,117 +0,0 @@ -commit 37814f62c2cc7aba2eea073014d6c53dcd5bf42c -Author: q66 -Date: Fri Jul 1 16:53:55 2022 +0200 - - fix linux-user build on 32-bit ppc - - Partial revert https://gitlab.com/qemu-project/qemu/-/commit/9d1401b79463e74adbfac69d836789d4e103fb61 - and https://gitlab.com/qemu-project/qemu/-/commit/0a7e01904d407baa73c1baddbdfc9ccf2ace8356 - -diff --git a/common-user/host/ppc/safe-syscall.inc.S b/common-user/host/ppc/safe-syscall.inc.S -new file mode 100644 -index 0000000..e69de29 -diff --git a/common-user/safe-syscall-error.c b/common-user/safe-syscall-error.c -index cf74b50..a36132c 100644 ---- a/common-user/safe-syscall-error.c -+++ b/common-user/safe-syscall-error.c -@@ -12,6 +12,7 @@ - #include "qemu/osdep.h" - #include "user/safe-syscall.h" - -+#if !defined(__powerpc__) || defined(__powerpc64__) - /* - * This is intended to be invoked via tail-call on the error path - * from the assembly in host/arch/safe-syscall.inc.S. This takes -@@ -23,3 +24,4 @@ long safe_syscall_set_errno_tail(int value) - errno = value; - return -1; - } -+#endif -diff --git a/include/user/safe-syscall.h b/include/user/safe-syscall.h -index 61a04e2..793fe84 100644 ---- a/include/user/safe-syscall.h -+++ b/include/user/safe-syscall.h -@@ -125,6 +125,8 @@ - * kinds of restartability. - */ - -+#if !defined(__powerpc__) || defined(__powerpc64__) -+ - /* The core part of this function is implemented in assembly */ - extern long safe_syscall_base(int *pending, long number, ...); - extern long safe_syscall_set_errno_tail(int value); -@@ -137,4 +139,10 @@ extern char safe_syscall_end[]; - safe_syscall_base(&((TaskState *)thread_cpu->opaque)->signal_pending, \ - __VA_ARGS__) - -+#else -+ -+#define safe_syscall syscall -+ -+#endif -+ - #endif -diff --git a/linux-user/include/host/ppc/host-signal.h b/linux-user/include/host/ppc/host-signal.h -new file mode 100644 -index 0000000..b80384d ---- /dev/null -+++ b/linux-user/include/host/ppc/host-signal.h -@@ -0,0 +1,38 @@ -+/* -+ * host-signal.h: signal info dependent on the host architecture -+ * -+ * Copyright (c) 2003-2005 Fabrice Bellard -+ * Copyright (c) 2021 Linaro Limited -+ * -+ * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. -+ * See the COPYING file in the top-level directory. -+ */ -+ -+#ifndef PPC_HOST_SIGNAL_H -+#define PPC_HOST_SIGNAL_H -+ -+/* The third argument to a SA_SIGINFO handler is ucontext_t. */ -+typedef ucontext_t host_sigcontext; -+ -+static inline uintptr_t host_signal_pc(host_sigcontext *uc) -+{ -+ return uc->uc_mcontext.regs->nip; -+} -+ -+static inline void host_signal_set_pc(host_sigcontext *uc, uintptr_t pc) -+{ -+ uc->uc_mcontext.regs->nip = pc; -+} -+ -+static inline void *host_signal_mask(host_sigcontext *uc) -+{ -+ return &uc->uc_sigmask; -+} -+ -+static inline bool host_signal_write(siginfo_t *info, host_sigcontext *uc) -+{ -+ return uc->uc_mcontext.regs->trap != 0x400 -+ && (uc->uc_mcontext.regs->dsisr & 0x02000000); -+} -+ -+#endif -diff --git a/linux-user/signal.c b/linux-user/signal.c -index 092e70b..b8dfa8a 100644 ---- a/linux-user/signal.c -+++ b/linux-user/signal.c -@@ -800,6 +800,7 @@ void queue_signal(CPUArchState *env, int sig, int si_type, - /* Adjust the signal context to rewind out of safe-syscall if we're in it */ - static inline void rewind_if_in_safe_syscall(void *puc) - { -+#if !defined(__powerpc__) || defined(__powerpc64__) - host_sigcontext *uc = (host_sigcontext *)puc; - uintptr_t pcreg = host_signal_pc(uc); - -@@ -807,6 +808,7 @@ static inline void rewind_if_in_safe_syscall(void *puc) - && pcreg < (uintptr_t)safe_syscall_end) { - host_signal_set_pc(uc, (uintptr_t)safe_syscall_start); - } -+#endif - } - - static void host_signal_handler(int host_sig, siginfo_t *info, void *puc)