Package: incron
Severity: important
Tags: patch
User: debian-...@lists.debian.org
Usertags: arm64
incron FTBFS on arm64 with the following error.
In file included from icd-main.cpp:33:0:
inotify-cxx.h:40:34: fatal error: sys/inotify-syscalls.h: No such file or
directory
#include <sys/inotify-syscalls.h>
Looking at the code in question we find
// Use this if syscalls not defined
#ifndef __NR_inotify_init
#include <sys/inotify-syscalls.h>
#endif // __NR_inotify_init
So the code checks if the syscall number for inotify_init is defined, if it
isn't
then it assumes it needs to include sys/inotify-syscalls.h (a header which as far as I can tell
has not existed for years) to get the inotify stuff.
However the inotify_init syscall is deprecated and doesn't exist at all on
arm64 (and probablly
won't exist on other architectures that are regarded as completely new either).
The c library function inotify_init appears to now be implemented using
the inotify_init1 syscall (see excerpt below from glibc)
inotify_init (void)
{
return INLINE_SYSCALL (inotify_init1, 1, 0);
}
The attatched debdiff updates the conditional to also check for
inotify_init2, if there
Thanks to hrw for pointing this issue out and suggesting an initial fix
(though the one I went for was more
general than the one hrw proposed)
This was filed upstream with inotify-cxx (which seems to be embedded in
incron) at https://admin.aiken.cz:10443/bts/view.php?id=748 but upstream
closed it saying the project was abandoned.
If there is no maintainer response to this bug then it's likely an arm64
porter (possiblly but not nessaceally me) will NMU it. If you have any
objections please raise them now. If you are happy with an immediate NMU
please do say so.
diff -Nru incron-0.5.10/debian/changelog incron-0.5.10/debian/changelog
--- incron-0.5.10/debian/changelog 2014-03-20 22:38:56.000000000 +0000
+++ incron-0.5.10/debian/changelog 2014-11-02 13:08:49.000000000 +0000
@@ -1,3 +1,11 @@
+incron (0.5.10-2.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Update conditional check to allow build on architectures where deprecated
+ inotify_init syscall is not defined (in particular arm64).
+
+ -- Peter Michael Green <plugw...@debian.org> Sun, 02 Nov 2014 13:06:10 +0000
+
incron (0.5.10-2) unstable; urgency=medium
* Add a patch to fix bad handling of arguments with spaces in incrontabs
diff -Nru incron-0.5.10/debian/patches/fix_inotify_syscall_conditional
incron-0.5.10/debian/patches/fix_inotify_syscall_conditional
--- incron-0.5.10/debian/patches/fix_inotify_syscall_conditional
1970-01-01 00:00:00.000000000 +0000
+++ incron-0.5.10/debian/patches/fix_inotify_syscall_conditional
2014-11-02 13:16:52.000000000 +0000
@@ -0,0 +1,27 @@
+Description: Fix inotify syscall conditional
+ the code checks if the syscall number for inotify_init is defined, if it isn't
+ then it assumes it needs to include sys/inotify-syscalls.h (a header which as
+ far as I can tell has not existed for years) to get the inotify stuff.
+
+ However the inotify_init syscall is deprecated and doesn't exist at all on
+ arm64 (and probablly won't exist on other architectures that are regarded as
+ completely new either).
+
+ The c library function inotify_init appears to now be implemented using the
+ inotify_init1 syscall
+
+ This patch updates the conditional logic to also check for the inotify_init1
+ syscall number and hence allows it to build on arm64 (and presumablly other
+ new architectures).
+
+--- incron-0.5.10.orig/inotify-cxx.h
++++ incron-0.5.10/inotify-cxx.h
+@@ -36,7 +36,7 @@
+ #include <sys/inotify.h>
+
+ // Use this if syscalls not defined
+-#ifndef __NR_inotify_init
++#if not defined(__NR_inotify_init) && not defined(__NR_inotify_init1)
+ #include <sys/inotify-syscalls.h>
+ #endif // __NR_inotify_init
+
diff -Nru incron-0.5.10/debian/patches/series
incron-0.5.10/debian/patches/series
--- incron-0.5.10/debian/patches/series 2014-03-20 22:24:03.000000000 +0000
+++ incron-0.5.10/debian/patches/series 2014-11-02 13:12:40.000000000 +0000
@@ -2,3 +2,4 @@
fix_ftbfs_gcc47
fix_incrontab_path_with_spaces_handling
fix_incrontab_bad_ownership
+fix_inotify_syscall_conditional