Add --include and --includei option#3
Merged
rvoicilas merged 1 commit intoinotify-tools:masterfrom Oct 20, 2012
Merged
Conversation
Useful for e.g.:
while inotifywait -e modify -e close_write -e move_self \
--include '.*\.(bib|svg|tex)$' -r . ; do make ; done
Can't be easily emulated using --exclude, because it is not easy nor
pleasing to negate POSIX regular expressions.
Maybe it would be cleaner to control regular expressions via options,
e.g.:
--filter <pattern>
-i, --ignore-case
-v, --invert-filter
But that would break compatibility with older versions. Adding two new
options seems more inotify-tools style (like --excudei).
Same with library: Added inotifytools_ignore_events_by_inverted_regex()
(instead of extending old function) for backwards-compatibility.
rvoicilas
added a commit
that referenced
this pull request
Oct 20, 2012
Add --include and --includei option
jankratochvil
added a commit
to jankratochvil/inotify-tools
that referenced
this pull request
Aug 15, 2019
``` /var/cache/dnf/fedora-modular-42f5060c2cfa4ffa/ MOVED_TO,ISDIR repodata *** stack smashing detected ***: <unknown> terminated % #0 0x0000ffffa6d08c90 in raise () from /usr/lib64/libc.so.6 % inotify-tools#1 0x0000ffffa6cf6aa8 in abort () from /usr/lib64/libc.so.6 % inotify-tools#2 0x0000ffffa6d42acc in __libc_message () from /usr/lib64/libc.so.6 % inotify-tools#3 0x0000ffffa6db4f54 in __fortify_fail_abort () from /usr/lib64/libc.so.6 % inotify-tools#4 0x0000ffffa6db4f08 in __stack_chk_fail () from /usr/lib64/libc.so.6 % inotify-tools#5 0x0000ffffa6e4f958 in inotifytools_replace_filename (oldname=<optimized out>, newname=<optimized out>) at inotifytools.c:866 % inotify-tools#6 0x0000aaaab1b5de98 in main (argc=<optimized out>, argv=<optimized out>) at inotifywait.c:389 ``` A simple fix would be: ``` char *names[2+(sizeof(int)+sizeof(char*)-1)/sizeof(char*)]; ``` A similar fix is in: ``` inotify-tools_3.14-8.debian/debian/patches/0006-Fix-buffer-overrun-in-inotifytools.c.patch ``` I find the attached struct for callback data as a more clean and standard solution.
ericcurtin
pushed a commit
that referenced
this pull request
Jan 27, 2020
``` /var/cache/dnf/fedora-modular-42f5060c2cfa4ffa/ MOVED_TO,ISDIR repodata *** stack smashing detected ***: <unknown> terminated % #0 0x0000ffffa6d08c90 in raise () from /usr/lib64/libc.so.6 % #1 0x0000ffffa6cf6aa8 in abort () from /usr/lib64/libc.so.6 % #2 0x0000ffffa6d42acc in __libc_message () from /usr/lib64/libc.so.6 % #3 0x0000ffffa6db4f54 in __fortify_fail_abort () from /usr/lib64/libc.so.6 % #4 0x0000ffffa6db4f08 in __stack_chk_fail () from /usr/lib64/libc.so.6 % #5 0x0000ffffa6e4f958 in inotifytools_replace_filename (oldname=<optimized out>, newname=<optimized out>) at inotifytools.c:866 % #6 0x0000aaaab1b5de98 in main (argc=<optimized out>, argv=<optimized out>) at inotifywait.c:389 ``` A simple fix would be: ``` char *names[2+(sizeof(int)+sizeof(char*)-1)/sizeof(char*)]; ``` A similar fix is in: ``` inotify-tools_3.14-8.debian/debian/patches/0006-Fix-buffer-overrun-in-inotifytools.c.patch ``` I find the attached struct for callback data as a more clean and standard solution.
jankratochvil
added a commit
to jankratochvil/inotify-tools
that referenced
this pull request
Jul 14, 2023
Thinstation
pushed a commit
to Thinstation/thinstation
that referenced
this pull request
Oct 13, 2024
modified: ts/build/build.conf.example modified: ts/build/conf/devstation/thinstation.conf.buildtime modified: ts/build/packages/base/etc/systemd/system/profile-setup.service new file: ts/build/packages/devstation/bin/inotifywait modified: ts/build/packages/devstation/build/finalize modified: ts/build/packages/devstation/etc/init.d/persistent-files deleted: ts/build/packages/devstation/etc/systemd/system/persistence-backup.service deleted: ts/build/packages/devstation/etc/systemd/system/persistence-backup.timer deleted: ts/build/packages/devstation/etc/systemd/system/persistence-restore.service new file: ts/build/packages/devstation/etc/systemd/system/persistent-files.service modified: ts/build/packages/git/build/extra/bin/proxy-setup modified: ts/build/packages/installer/bin/install.sh modified: ts/build/packages/installer/bin/installer modified: ts/build/packages/locale/etc/systemd/system/console-keymap.service modified: ts/build/packages/ntpd/build/extra/etc/systemd/system/ntpd.service.d/override.conf modified: ts/build/packages/ntpd/build/finalize modified: ts/build/packages/ntpdate/etc/systemd/system/ntpdate.service modified: ts/build/packages/systemd/build/finalize modified: ts/ports/contrib/inotify-tools/.footprint modified: ts/ports/contrib/inotify-tools/.md5sum modified: ts/ports/contrib/inotify-tools/Pkgfile deleted: ts/ports/contrib/inotify-tools/inotify-tools#3.20.1-2.pkg.tar.xz new file: ts/ports/contrib/inotify-tools/inotify-tools#4.23.9.0-1.pkg.tar.xz modified: ts/ports/opt/dropbear/.md5sum modified: ts/ports/opt/dropbear/Pkgfile deleted: ts/ports/opt/dropbear/dropbear#2019.78-1.pkg.tar.xz new file: ts/ports/opt/dropbear/dropbear#2024.85-1.pkg.tar.xz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(also posted on the mailing list)
Add --include and --includei option
Useful for e.g.:
while inotifywait -e modify -e close_write -e move_self
--include '.*.(bib|svg|tex)$' -r . ; do make ; done
Can't be easily emulated using --exclude, because it is not easy nor
pleasing to negate POSIX regular expressions.
Maybe it would be cleaner to control regular expressions via options,
e.g.:
-i, --ignore-case
-v, --invert-filter
But that would break compatibility with older versions. Adding two new
options seems more inotify-tools style (like --excudei).
Same with library: Added inotifytools_ignore_events_by_inverted_regex()
(instead of extending old function) for backwards-compatibility.