[Forensics-changes] [yara] 05/06: Really fix FTBFS on kfreebsd -- by reverting to using the Linux-style procfs.

Hilko Bengen bengen at moszumanska.debian.org
Sat Nov 11 13:01:07 UTC 2017


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch master
in repository yara.

commit 2d833c2e5bfb7fab87f73b3638596e2f5d2d4185
Author: Hilko Bengen <bengen at debian.org>
Date:   Sat Nov 11 13:58:08 2017 +0100

    Really fix FTBFS on kfreebsd -- by reverting to using the Linux-style procfs.
---
 debian/patches/0001-Fix-FTBFS-on-kfreebsd.patch    | 30 --------------
 ...tyle-procfs-on-kFreeBSD-because-struct-pt.patch | 47 ++++++++++++++++++++++
 debian/patches/series                              |  2 +-
 3 files changed, 48 insertions(+), 31 deletions(-)

diff --git a/debian/patches/0001-Fix-FTBFS-on-kfreebsd.patch b/debian/patches/0001-Fix-FTBFS-on-kfreebsd.patch
deleted file mode 100644
index 9799b38..0000000
--- a/debian/patches/0001-Fix-FTBFS-on-kfreebsd.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From: Hilko Bengen <bengen at debian.org>
-Date: Fri, 10 Nov 2017 23:36:59 +0100
-Subject: Fix FTBFS on kfreebsd
-
----
- configure.ac | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index e8fa183..86aa327 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -42,13 +42,15 @@ case $host_os in
-     linux*|netbsd*)
-             CFLAGS="$CFLAGS -DUSE_LINUX_PROC"
-             proc_interface=linux ;;
--    freebsd*)
-+    freebsd*|kfreebsd*)
-             CFLAGS="$CFLAGS -DUSE_FREEBSD_PROC"
-             proc_interface=freebsd ;;
-     openbsd*)
-             CFLAGS="$CFLAGS -DUSE_OPENBSD_PROC"
-             proc_interface=openbsd ;;
--    *)      proc_interface=none ;;
-+    *)
-+            CFLAGS="$CFLAGS -DUSE_NO_PROC"
-+            proc_interface=none ;;
- esac
- 
- AC_C_BIGENDIAN
diff --git a/debian/patches/0001-Use-Linux-style-procfs-on-kFreeBSD-because-struct-pt.patch b/debian/patches/0001-Use-Linux-style-procfs-on-kFreeBSD-because-struct-pt.patch
new file mode 100644
index 0000000..238cab6
--- /dev/null
+++ b/debian/patches/0001-Use-Linux-style-procfs-on-kFreeBSD-because-struct-pt.patch
@@ -0,0 +1,47 @@
+From: Hilko Bengen <bengen at debian.org>
+Date: Fri, 10 Nov 2017 23:36:59 +0100
+Subject: Use Linux-style procfs on kFreeBSD because struct ptrace_vm_entry is
+ not defined.
+
+---
+ configure.ac         | 6 ++++--
+ libyara/proc/linux.c | 2 +-
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index e8fa183..f96b3a8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -39,7 +39,7 @@ case $host_os in
+              proc_interface=mach ;;
+     mingw*) CFLAGS="$CFLAGS -DUSE_WINDOWS_PROC"
+             proc_interface=windows ;;
+-    linux*|netbsd*)
++    linux*|netbsd*|kfreebsd*)
+             CFLAGS="$CFLAGS -DUSE_LINUX_PROC"
+             proc_interface=linux ;;
+     freebsd*)
+@@ -48,7 +48,9 @@ case $host_os in
+     openbsd*)
+             CFLAGS="$CFLAGS -DUSE_OPENBSD_PROC"
+             proc_interface=openbsd ;;
+-    *)      proc_interface=none ;;
++    *)
++            CFLAGS="$CFLAGS -DUSE_NO_PROC"
++            proc_interface=none ;;
+ esac
+ 
+ AC_C_BIGENDIAN
+diff --git a/libyara/proc/linux.c b/libyara/proc/linux.c
+index de55e77..7f7e225 100644
+--- a/libyara/proc/linux.c
++++ b/libyara/proc/linux.c
+@@ -37,7 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ #include <sys/wait.h>
+ #include <errno.h>
+ 
+-#if defined(__NetBSD__)
++#if defined(__NetBSD__) || defined(__FreeBSD_kernel__)
+ #define PTRACE_ATTACH PT_ATTACH
+ #define PTRACE_DETACH PT_DETACH
+ #define _XOPEN_SOURCE 500
diff --git a/debian/patches/series b/debian/patches/series
index 43012e4..ee94629 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1 @@
-0001-Fix-FTBFS-on-kfreebsd.patch
+0001-Use-Linux-style-procfs-on-kFreeBSD-because-struct-pt.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/yara.git



More information about the forensics-changes mailing list