From: r-ricci <r-ricci@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] inotify-tools: update to 4.23.9.0.
Date: Sat, 16 Nov 2024 19:42:40 +0100 [thread overview]
Message-ID: <20241116184240.EADC32EB0E@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-52982@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1268 bytes --]
There is an updated pull request by r-ricci against master on the void-packages repository
https://github.com/r-ricci/void-packages inotify-tools
https://github.com/void-linux/void-packages/pull/52982
inotify-tools: update to 4.23.9.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
@Gottox
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/52982.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-inotify-tools-52982.patch --]
[-- Type: text/x-diff, Size: 14398 bytes --]
From 4297089054bb8d462dd9195e0dd787bd2b464028 Mon Sep 17 00:00:00 2001
From: Roberto Ricci <io@r-ricci.it>
Date: Sat, 16 Nov 2024 17:39:17 +0100
Subject: [PATCH 1/3] musl: update sys/fanotify.h
---
.../patches/sys-fanotify.h-linux-5.9.patch | 90 +++++++++++++++++++
srcpkgs/musl/template | 2 +-
2 files changed, 91 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/musl/patches/sys-fanotify.h-linux-5.9.patch
diff --git a/srcpkgs/musl/patches/sys-fanotify.h-linux-5.9.patch b/srcpkgs/musl/patches/sys-fanotify.h-linux-5.9.patch
new file mode 100644
index 00000000000000..b37bcc8f2f3bab
--- /dev/null
+++ b/srcpkgs/musl/patches/sys-fanotify.h-linux-5.9.patch
@@ -0,0 +1,90 @@
+From 8adf42f7c13c2c569b35521db2615844ddd5a4a9 Mon Sep 17 00:00:00 2001
+From: Szabolcs Nagy <nsz@port70.net>
+Date: Mon, 13 Jul 2020 19:38:27 +0000
+Subject: [PATCH 1/2] sys/fanotify.h: update to linux v5.7
+
+see
+
+ linux commit 9e2ba2c34f1922ca1e0c7d31b30ace5842c2e7d1
+ fanotify: send FAN_DIR_MODIFY event flavor with dir inode and name
+
+ linux commit 44d705b0370b1d581f46ff23e5d33e8b5ff8ec58
+ fanotify: report name info for FAN_DIR_MODIFY event
+---
+ include/sys/fanotify.h | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/include/sys/fanotify.h b/include/sys/fanotify.h
+index b637c8f5..75766790 100644
+--- a/include/sys/fanotify.h
++++ b/include/sys/fanotify.h
+@@ -55,8 +55,9 @@ struct fanotify_response {
+ #define FAN_OPEN_PERM 0x10000
+ #define FAN_ACCESS_PERM 0x20000
+ #define FAN_OPEN_EXEC_PERM 0x40000
+-#define FAN_ONDIR 0x40000000
++#define FAN_DIR_MODIFY 0x00080000
+ #define FAN_EVENT_ON_CHILD 0x08000000
++#define FAN_ONDIR 0x40000000
+ #define FAN_CLOSE (FAN_CLOSE_WRITE | FAN_CLOSE_NOWRITE)
+ #define FAN_MOVE (FAN_MOVED_FROM | FAN_MOVED_TO)
+ #define FAN_CLOEXEC 0x01
+@@ -88,6 +89,7 @@ struct fanotify_response {
+ #define FAN_ALL_OUTGOING_EVENTS (FAN_ALL_EVENTS | FAN_ALL_PERM_EVENTS | FAN_Q_OVERFLOW)
+ #define FANOTIFY_METADATA_VERSION 3
+ #define FAN_EVENT_INFO_TYPE_FID 1
++#define FAN_EVENT_INFO_TYPE_DFID_NAME 2
+ #define FAN_ALLOW 0x01
+ #define FAN_DENY 0x02
+ #define FAN_AUDIT 0x10
+--
+2.47.0
+
+From d078f836578986d97728b71ee2a7fd33233fbd5d Mon Sep 17 00:00:00 2001
+From: Szabolcs Nagy <nsz@port70.net>
+Date: Sun, 25 Oct 2020 16:25:34 +0000
+Subject: [PATCH 2/2] sys/fanotify.h: add new FAN_* macros from linux v5.9
+
+Update fanotify.h, see
+
+ linux commit 929943b38daf817f2e6d303ea04401651fc3bc05
+ fanotify: add support for FAN_REPORT_NAME
+
+ linux commit 83b7a59896dd24015a34b7f00027f0ff3747972f
+ fanotify: add basic support for FAN_REPORT_DIR_FID
+
+ linux commit 08b95c338e0c5a96e47f4ca314ea1e7580ecb5d7
+ fanotify: remove event FAN_DIR_MODIFY
+
+FAN_DIR_MODIFY that was new in v5.7 is now removed from linux uapi,
+but kept in musl, so we don't break api, linux cannot reuse the
+value anyway.
+---
+ include/sys/fanotify.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/include/sys/fanotify.h b/include/sys/fanotify.h
+index 75766790..10e5f15e 100644
+--- a/include/sys/fanotify.h
++++ b/include/sys/fanotify.h
+@@ -71,6 +71,9 @@ struct fanotify_response {
+ #define FAN_ENABLE_AUDIT 0x40
+ #define FAN_REPORT_TID 0x100
+ #define FAN_REPORT_FID 0x200
++#define FAN_REPORT_DIR_FID 0x00000400
++#define FAN_REPORT_NAME 0x00000800
++#define FAN_REPORT_DFID_NAME (FAN_REPORT_DIR_FID | FAN_REPORT_NAME)
+ #define FAN_ALL_INIT_FLAGS (FAN_CLOEXEC | FAN_NONBLOCK | FAN_ALL_CLASS_BITS | FAN_UNLIMITED_QUEUE | FAN_UNLIMITED_MARKS)
+ #define FAN_MARK_ADD 0x01
+ #define FAN_MARK_REMOVE 0x02
+@@ -90,6 +93,7 @@ struct fanotify_response {
+ #define FANOTIFY_METADATA_VERSION 3
+ #define FAN_EVENT_INFO_TYPE_FID 1
+ #define FAN_EVENT_INFO_TYPE_DFID_NAME 2
++#define FAN_EVENT_INFO_TYPE_DFID 3
+ #define FAN_ALLOW 0x01
+ #define FAN_DENY 0x02
+ #define FAN_AUDIT 0x10
+--
+2.47.0
+
diff --git a/srcpkgs/musl/template b/srcpkgs/musl/template
index 66e5cf056e9624..04e22c4fb01166 100644
--- a/srcpkgs/musl/template
+++ b/srcpkgs/musl/template
@@ -2,7 +2,7 @@
pkgname=musl
reverts="1.2.0_1"
version=1.1.24
-revision=22
+revision=23
archs="*-musl"
bootstrap=yes
build_style=gnu-configure
From c5cb7a96d46a0cae1926bd5d9c2bbabe3dcbfd13 Mon Sep 17 00:00:00 2001
From: Roberto Ricci <io@r-ricci.it>
Date: Sat, 16 Nov 2024 19:40:51 +0100
Subject: [PATCH 2/3] musl: use faccessat2 to implement faccessat with flags
---
...essat2-syscall-to-implement-faccessa.patch | 245 ++++++++++++++++++
1 file changed, 245 insertions(+)
create mode 100644 srcpkgs/musl/patches/use-new-SYS_faccessat2-syscall-to-implement-faccessa.patch
diff --git a/srcpkgs/musl/patches/use-new-SYS_faccessat2-syscall-to-implement-faccessa.patch b/srcpkgs/musl/patches/use-new-SYS_faccessat2-syscall-to-implement-faccessa.patch
new file mode 100644
index 00000000000000..564d6dcaf33e61
--- /dev/null
+++ b/srcpkgs/musl/patches/use-new-SYS_faccessat2-syscall-to-implement-faccessa.patch
@@ -0,0 +1,245 @@
+From 9b7ed9702ce8925a5a947ad3bdbba126fe955aaf Mon Sep 17 00:00:00 2001
+From: Szabolcs Nagy <nsz@port70.net>
+Date: Tue, 28 Jul 2020 21:17:13 +0000
+Subject: [PATCH] bits/syscall.h: add __NR_faccessat2 from linux v5.8
+
+the linux faccessat syscall lacks a flag argument that is necessary
+to implement the posix api, see
+
+ linux commit c8ffd8bcdd28296a198f237cc595148a8d4adfbe
+ vfs: add faccessat2 syscall
+---
+ arch/aarch64/bits/syscall.h.in | 1 +
+ arch/arm/bits/syscall.h.in | 1 +
+ arch/i386/bits/syscall.h.in | 1 +
+ arch/m68k/bits/syscall.h.in | 1 +
+ arch/microblaze/bits/syscall.h.in | 1 +
+ arch/mips/bits/syscall.h.in | 1 +
+ arch/mips64/bits/syscall.h.in | 1 +
+ arch/mipsn32/bits/syscall.h.in | 1 +
+ arch/or1k/bits/syscall.h.in | 1 +
+ arch/powerpc/bits/syscall.h.in | 1 +
+ arch/powerpc64/bits/syscall.h.in | 1 +
+ arch/riscv64/bits/syscall.h.in | 1 +
+ arch/s390x/bits/syscall.h.in | 1 +
+ arch/sh/bits/syscall.h.in | 1 +
+ arch/x32/bits/syscall.h.in | 1 +
+ arch/x86_64/bits/syscall.h.in | 1 +
+ 16 files changed, 16 insertions(+)
+
+diff --git a/arch/aarch64/bits/syscall.h.in b/arch/aarch64/bits/syscall.h.in
+index 955e2cab..d7ae6792 100644
+--- a/arch/aarch64/bits/syscall.h.in
++++ b/arch/aarch64/bits/syscall.h.in
+@@ -287,4 +287,5 @@
+ #define __NR_fsconfig 431
+ #define __NR_fsmount 432
+ #define __NR_fspick 433
++#define __NR_faccessat2 439
+
+diff --git a/arch/arm/bits/syscall.h.in b/arch/arm/bits/syscall.h.in
+index a565a4ee..fb07f8f0 100644
+--- a/arch/arm/bits/syscall.h.in
++++ b/arch/arm/bits/syscall.h.in
+@@ -387,6 +387,7 @@
+ #define __NR_fsconfig 431
+ #define __NR_fsmount 432
+ #define __NR_fspick 433
++#define __NR_faccessat2 439
+
+ #define __ARM_NR_breakpoint 0x0f0001
+ #define __ARM_NR_cacheflush 0x0f0002
+diff --git a/arch/i386/bits/syscall.h.in b/arch/i386/bits/syscall.h.in
+index c95e108e..661b9d02 100644
+--- a/arch/i386/bits/syscall.h.in
++++ b/arch/i386/bits/syscall.h.in
+@@ -424,4 +424,5 @@
+ #define __NR_fsconfig 431
+ #define __NR_fsmount 432
+ #define __NR_fspick 433
++#define __NR_faccessat2 439
+
+diff --git a/arch/m68k/bits/syscall.h.in b/arch/m68k/bits/syscall.h.in
+index fb522b48..e6fb8c07 100644
+--- a/arch/m68k/bits/syscall.h.in
++++ b/arch/m68k/bits/syscall.h.in
+@@ -404,3 +404,4 @@
+ #define __NR_fsconfig 431
+ #define __NR_fsmount 432
+ #define __NR_fspick 433
++#define __NR_faccessat2 439
+diff --git a/arch/microblaze/bits/syscall.h.in b/arch/microblaze/bits/syscall.h.in
+index 59f86236..7401e9a8 100644
+--- a/arch/microblaze/bits/syscall.h.in
++++ b/arch/microblaze/bits/syscall.h.in
+@@ -425,4 +425,5 @@
+ #define __NR_fsconfig 431
+ #define __NR_fsmount 432
+ #define __NR_fspick 433
++#define __NR_faccessat2 439
+
+diff --git a/arch/mips/bits/syscall.h.in b/arch/mips/bits/syscall.h.in
+index 582fa3b5..16bcb7d3 100644
+--- a/arch/mips/bits/syscall.h.in
++++ b/arch/mips/bits/syscall.h.in
+@@ -406,4 +406,5 @@
+ #define __NR_fsconfig 4431
+ #define __NR_fsmount 4432
+ #define __NR_fspick 4433
++#define __NR_faccessat2 4439
+
+diff --git a/arch/mips64/bits/syscall.h.in b/arch/mips64/bits/syscall.h.in
+index 34b9752e..a618c278 100644
+--- a/arch/mips64/bits/syscall.h.in
++++ b/arch/mips64/bits/syscall.h.in
+@@ -336,4 +336,5 @@
+ #define __NR_fsconfig 5431
+ #define __NR_fsmount 5432
+ #define __NR_fspick 5433
++#define __NR_faccessat2 5439
+
+diff --git a/arch/mipsn32/bits/syscall.h.in b/arch/mipsn32/bits/syscall.h.in
+index d80cafa8..6ba3e33d 100644
+--- a/arch/mipsn32/bits/syscall.h.in
++++ b/arch/mipsn32/bits/syscall.h.in
+@@ -360,4 +360,5 @@
+ #define __NR_fsconfig 6431
+ #define __NR_fsmount 6432
+ #define __NR_fspick 6433
++#define __NR_faccessat2 6439
+
+diff --git a/arch/or1k/bits/syscall.h.in b/arch/or1k/bits/syscall.h.in
+index 8ffcfae8..8c3c4162 100644
+--- a/arch/or1k/bits/syscall.h.in
++++ b/arch/or1k/bits/syscall.h.in
+@@ -309,4 +309,5 @@
+ #define __NR_fsconfig 431
+ #define __NR_fsmount 432
+ #define __NR_fspick 433
++#define __NR_faccessat2 439
+
+diff --git a/arch/powerpc/bits/syscall.h.in b/arch/powerpc/bits/syscall.h.in
+index adcf63db..4fb6f248 100644
+--- a/arch/powerpc/bits/syscall.h.in
++++ b/arch/powerpc/bits/syscall.h.in
+@@ -413,4 +413,5 @@
+ #define __NR_fsconfig 431
+ #define __NR_fsmount 432
+ #define __NR_fspick 433
++#define __NR_faccessat2 439
+
+diff --git a/arch/powerpc64/bits/syscall.h.in b/arch/powerpc64/bits/syscall.h.in
+index 32545b39..13a834bb 100644
+--- a/arch/powerpc64/bits/syscall.h.in
++++ b/arch/powerpc64/bits/syscall.h.in
+@@ -385,4 +385,5 @@
+ #define __NR_fsconfig 431
+ #define __NR_fsmount 432
+ #define __NR_fspick 433
++#define __NR_faccessat2 439
+
+diff --git a/arch/riscv64/bits/syscall.h.in b/arch/riscv64/bits/syscall.h.in
+index 1db70cfb..d9d71baf 100644
+--- a/arch/riscv64/bits/syscall.h.in
++++ b/arch/riscv64/bits/syscall.h.in
+@@ -287,6 +287,7 @@
+ #define __NR_fsconfig 431
+ #define __NR_fsmount 432
+ #define __NR_fspick 433
++#define __NR_faccessat2 439
+
+ #define __NR_sysriscv __NR_arch_specific_syscall
+ #define __NR_riscv_flush_icache (__NR_sysriscv + 15)
+diff --git a/arch/s390x/bits/syscall.h.in b/arch/s390x/bits/syscall.h.in
+index c4c70474..6283452e 100644
+--- a/arch/s390x/bits/syscall.h.in
++++ b/arch/s390x/bits/syscall.h.in
+@@ -350,4 +350,5 @@
+ #define __NR_fsconfig 431
+ #define __NR_fsmount 432
+ #define __NR_fspick 433
++#define __NR_faccessat2 439
+
+diff --git a/arch/sh/bits/syscall.h.in b/arch/sh/bits/syscall.h.in
+index 4705ef93..d4ca4b7e 100644
+--- a/arch/sh/bits/syscall.h.in
++++ b/arch/sh/bits/syscall.h.in
+@@ -397,4 +397,5 @@
+ #define __NR_fsconfig 431
+ #define __NR_fsmount 432
+ #define __NR_fspick 433
++#define __NR_faccessat2 439
+
+diff --git a/arch/x32/bits/syscall.h.in b/arch/x32/bits/syscall.h.in
+index 4d72852e..22468520 100644
+--- a/arch/x32/bits/syscall.h.in
++++ b/arch/x32/bits/syscall.h.in
+@@ -296,6 +296,7 @@
+ #define __NR_fsconfig (0x40000000 + 431)
+ #define __NR_fsmount (0x40000000 + 432)
+ #define __NR_fspick (0x40000000 + 433)
++#define __NR_faccessat2 (0x40000000 + 439)
+
+ #define __NR_rt_sigaction (0x40000000 + 512)
+ #define __NR_rt_sigreturn (0x40000000 + 513)
+diff --git a/arch/x86_64/bits/syscall.h.in b/arch/x86_64/bits/syscall.h.in
+index 2d4634f6..e17bb1d4 100644
+--- a/arch/x86_64/bits/syscall.h.in
++++ b/arch/x86_64/bits/syscall.h.in
+@@ -343,4 +343,5 @@
+ #define __NR_fsconfig 431
+ #define __NR_fsmount 432
+ #define __NR_fspick 433
++#define __NR_faccessat2 439
+
+--
+2.47.0
+
+From 55fb9a177316aa46c639d93dd0323d9a9a8c160c Mon Sep 17 00:00:00 2001
+From: Rich Felker <dalias@aerifal.cx>
+Date: Wed, 9 Sep 2020 21:55:11 -0400
+Subject: [PATCH] use new SYS_faccessat2 syscall to implement faccessat with
+ flags
+
+commit 0a05eace163cee9b08571d2ff9d90f5e82d9c228 implemented AT_EACCESS
+for faccessat with a horrible hack, creating a child process to change
+switch uid/gid and perform the access probe without making potentially
+irreversible changes to the caller's credentials. this was due to the
+syscall lacking a flags argument.
+
+linux 5.8 introduced a new syscall, SYS_faccessat2, fixing this
+deficiency. use it if any flags are passed, and fallback to the old
+strategy on ENOSYS. continue using the old syscall when there are no
+flags.
+---
+ src/unistd/faccessat.c | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/src/unistd/faccessat.c b/src/unistd/faccessat.c
+index 76bbd4c7..557503eb 100644
+--- a/src/unistd/faccessat.c
++++ b/src/unistd/faccessat.c
+@@ -25,12 +25,17 @@ static int checker(void *p)
+
+ int faccessat(int fd, const char *filename, int amode, int flag)
+ {
+- if (!flag || (flag==AT_EACCESS && getuid()==geteuid() && getgid()==getegid()))
+- return syscall(SYS_faccessat, fd, filename, amode, flag);
++ if (flag) {
++ int ret = __syscall(SYS_faccessat2, fd, filename, amode, flag);
++ if (ret != -ENOSYS) return __syscall_ret(ret);
++ }
+
+- if (flag != AT_EACCESS)
++ if (flag & ~AT_EACCESS)
+ return __syscall_ret(-EINVAL);
+
++ if (!flag || (getuid()==geteuid() && getgid()==getegid()))
++ return syscall(SYS_faccessat, fd, filename, amode);
++
+ char stack[1024];
+ sigset_t set;
+ pid_t pid;
+--
+2.47.0
+
From 64a6921f41877f7aa26b874eb632065c354d78f6 Mon Sep 17 00:00:00 2001
From: Roberto Ricci <io@r-ricci.it>
Date: Sun, 10 Nov 2024 13:25:39 +0100
Subject: [PATCH 3/3] inotify-tools: update to 4.23.9.0.
---
srcpkgs/inotify-tools/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/inotify-tools/template b/srcpkgs/inotify-tools/template
index c27984b3543a73..53bda5b73e4e4b 100644
--- a/srcpkgs/inotify-tools/template
+++ b/srcpkgs/inotify-tools/template
@@ -1,6 +1,6 @@
# Template file for 'inotify-tools'
pkgname=inotify-tools
-version=3.20.11.0
+version=4.23.9.0
revision=1
build_style=gnu-configure
hostmakedepends="automake libtool"
@@ -9,7 +9,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://github.com/inotify-tools/inotify-tools"
distfiles="https://github.com/inotify-tools/inotify-tools/archive/${version}.tar.gz"
-checksum=58a3cde89e4a5111a87ac16b56b06a8f885460fca0aea51b69c856ce30a37a14
+checksum=1dfa33f80b6797ce2f6c01f454fd486d30be4dca1b0c5c2ea9ba3c30a5c39855
pre_configure() {
autoreconf -fi
next prev parent reply other threads:[~2024-11-16 18:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-10 12:40 [PR PATCH] " r-ricci
2024-11-16 17:01 ` [PR PATCH] [Updated] " r-ricci
2024-11-16 18:42 ` r-ricci [this message]
2024-11-16 18:55 ` r-ricci
2024-11-16 19:15 ` r-ricci
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241116184240.EADC32EB0E@inbox.vuxu.org \
--to=r-ricci@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).