summaryrefslogtreecommitdiffstats
path: root/recipes-security
diff options
context:
space:
mode:
authorJackie Huang <jackie.huang@windriver.com>2017-09-14 11:27:08 +0800
committerArmin Kuster <akuster808@gmail.com>2017-09-15 08:01:07 -0700
commita35bcc9495cc78737741adbc09d9f96235044899 (patch)
treea7946afc07655f0e234afe91e44f05a3116c1918 /recipes-security
parent838f698bd994e8a1ba47608cd6940b8c88461259 (diff)
downloadmeta-security-a35bcc9495cc78737741adbc09d9f96235044899.tar.gz
samhain: avoid searching host dir for postgresql
Add a patch to avoid searching host dir for postgresql, and set PGSQL_INC_DIR and PGSQL_LIB_DIR instead. Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'recipes-security')
-rw-r--r--recipes-security/samhain/files/samhain-avoid-searching-host-for-postgresql.patch134
-rw-r--r--recipes-security/samhain/samhain.inc3
2 files changed, 136 insertions, 1 deletions
diff --git a/recipes-security/samhain/files/samhain-avoid-searching-host-for-postgresql.patch b/recipes-security/samhain/files/samhain-avoid-searching-host-for-postgresql.patch
new file mode 100644
index 0000000..6bf67e0
--- /dev/null
+++ b/recipes-security/samhain/files/samhain-avoid-searching-host-for-postgresql.patch
@@ -0,0 +1,134 @@
1From 3e2ca7e06b16ceff6d12beb5113312f6525df595 Mon Sep 17 00:00:00 2001
2From: Jackie Huang <jackie.huang@windriver.com>
3Date: Thu, 14 Sep 2017 11:02:12 +0800
4Subject: [PATCH] configure.ac: avoid searching host for postgresql
5
6Upstream-Status: Inappropriate [cross compile specific]
7
8Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
9---
10 configure.ac | 101 +++--------------------------------------------------------
11 1 file changed, 5 insertions(+), 96 deletions(-)
12
13diff --git a/configure.ac b/configure.ac
14index a224c68..f658d53 100644
15--- a/configure.ac
16+++ b/configure.ac
17@@ -1278,90 +1278,11 @@ AC_ARG_WITH(database,
18 AC_DEFINE(WITH_POSTGRES)
19 AC_DEFINE(WITH_DATABASE)
20 #
21- PGCONF="no"
22- MY_PATH="${PATH}:/usr/local/bin:/usr/local/pgsql/bin"
23- OLD_IFS="$IFS"
24- IFS=":"
25- for ff in ${MY_PATH}
26- do
27- if test -f "$ff/pg_config"
28- then
29- PGCONF="$ff/pg_config"
30- fi
31- done
32- IFS="${OLD_IFS}"
33- #
34- #
35- if test "x${PGCONF}" = "xno"
36- then
37- AC_MSG_CHECKING(for PostgreSQL in /usr/local/pgsql /usr/pgsql /usr/local /usr PGSQL_HOME)
38- pgsql_directory="/usr/local/pgsql /usr/pgsql /usr/local /usr ${PGSQL_HOME}"
39- for i in $pgsql_directory; do
40- if test -r $i/include/pgsql/libpq-fe.h; then
41- PGSQL_INC_DIR=$i/include
42- PGSQL_DIR=$i
43- # use AC_CHECK_HEADERS to check for pgsql/libpq-fe.h
44- fi
45- done
46- if test -z "$PGSQL_DIR"; then
47- for i in $pgsql_directory; do
48- if test -r $i/include/postgresql/libpq-fe.h; then
49- PGSQL_INC_DIR=$i/include
50- PGSQL_DIR=$i
51- fi
52- done
53- fi
54- if test -z "$PGSQL_DIR"; then
55- for i in $pgsql_directory; do
56- if test -r $i/include/libpq-fe.h; then
57- PGSQL_INC_DIR=$i/include
58- PGSQL_DIR=$i
59- fi
60- done
61- fi
62-
63- if test -z "$PGSQL_DIR"; then
64- tmp=""
65- for i in $pgsql_directory; do
66- tmp="$tmp $i/include $i/include/pgsql $i/include/postgresql"
67- done
68- FAIL_MESSAGE("PostgreSQL header file (libpq-fe.h)", $tmp)
69- fi
70-
71- for i in lib lib/pgsql lib/postgresql; do
72- str="$PGSQL_DIR/$i/libpq.*"
73- for j in `echo $str`; do
74- if test -r $j; then
75- PGSQL_LIB_DIR="$PGSQL_DIR/$i"
76- break 2
77- fi
78- done
79- done
80-
81- if test -z "$PGSQL_LIB_DIR"; then
82- for ff in $pgsql_directory; do
83- for i in lib lib/pgsql lib/postgresql; do
84- str="$ff/$i/libpq.*"
85- for j in `echo $str`; do
86- if test -r $j; then
87- PGSQL_LIB_DIR="$ff/$i"
88- break 3
89- fi
90- done
91- done
92- done
93- fi
94-
95- if test -z "$PGSQL_LIB_DIR"; then
96- tmp=""
97- for i in $pgsql_directory; do
98- tmp="$i/lib $i/lib/pgsql $i/lib/postgresql"
99- done
100- FAIL_MESSAGE("postgresql library libpq", $tmp)
101- fi
102-
103- AC_MSG_RESULT(yes)
104-
105+ if test -z "${PGSQL_LIB_DIR}" ; then
106+ FAIL_MESSAGE("PGSQL_LIB_DIR is not set!")
107+ elif test -z "${PGSQL_INC_DIR}" ; then
108+ FAIL_MESSAGE("PGSQL_INC_DIR is not set!")
109+ else
110 LIBS="$LIBS -L${PGSQL_LIB_DIR} -lpq -lm"
111 if test x"$enable_static" = xyes; then
112 LIBS="$LIBS -L${PGSQL_LIB_DIR} -lpq -lcrypt -lm"
113@@ -1370,18 +1291,6 @@ AC_ARG_WITH(database,
114 fi
115 # CFLAGS="$CFLAGS -I${PGSQL_INC_DIR}"
116 CPPFLAGS="$CPPFLAGS -I${PGSQL_INC_DIR}"
117- AC_CHECK_HEADERS(pgsql/libpq-fe.h)
118- AC_CHECK_HEADERS(postgresql/libpq-fe.h)
119- else
120- pg_lib_dir=`${PGCONF} --libdir`
121- if test x"$enable_static" = xyes; then
122- LIBS="$LIBS -L${pg_lib_dir} -lpq -lcrypt -lm"
123- else
124- LIBS="$LIBS -L${pg_lib_dir} -lpq -lm"
125- fi
126- pg_inc_dir=`${PGCONF} --includedir`
127- # CFLAGS="$CFLAGS -I${pg_inc_dir}"
128- CPPFLAGS="$CPPFLAGS -I${pg_inc_dir}"
129 fi
130 elif test "x${withval}" = "xodbc"; then
131 AC_MSG_CHECKING(for odbc in /usr /usr/local ODBC_HOME)
132--
1332.11.0
134
diff --git a/recipes-security/samhain/samhain.inc b/recipes-security/samhain/samhain.inc
index d25f653..a11b7d8 100644
--- a/recipes-security/samhain/samhain.inc
+++ b/recipes-security/samhain/samhain.inc
@@ -12,6 +12,7 @@ SRC_URI = "http://la-samhna.de/archive/samhain_signed-${PV}.tar.gz \
12 file://samhain-pid-path.patch \ 12 file://samhain-pid-path.patch \
13 file://samhain-sha256-big-endian.patch \ 13 file://samhain-sha256-big-endian.patch \
14 file://samhain-configure-add-option-for-ps.patch \ 14 file://samhain-configure-add-option-for-ps.patch \
15 file://samhain-avoid-searching-host-for-postgresql.patch \
15 file://${INITSCRIPT_NAME}.init \ 16 file://${INITSCRIPT_NAME}.init \
16 file://${INITSCRIPT_NAME}.default \ 17 file://${INITSCRIPT_NAME}.default \
17 file://samhain.service \ 18 file://samhain.service \
@@ -50,7 +51,7 @@ PACKAGECONFIG ??= "postgresql ps \
50 ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \ 51 ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
51" 52"
52 53
53PACKAGECONFIG[postgresql] = "--with-database=postgresql --enable-xml-log, , postgresql" 54PACKAGECONFIG[postgresql] = "--with-database=postgresql --enable-xml-log PGSQL_INC_DIR=${STAGING_INCDIR} PGSQL_LIB_DIR=${STAGING_LIBDIR}, , postgresql"
54PACKAGECONFIG[suidcheck] = "--enable-suidcheck, , " 55PACKAGECONFIG[suidcheck] = "--enable-suidcheck, , "
55PACKAGECONFIG[logwatch] = "--enable-login-watch, , " 56PACKAGECONFIG[logwatch] = "--enable-login-watch, , "
56PACKAGECONFIG[mounts] = "--enable-mounts-check, , " 57PACKAGECONFIG[mounts] = "--enable-mounts-check, , "