ports/185863: security/ossec-hids-client: ossec-hids-* ports don't build on FreeBSD 10 (clang related)
moto kawasaki
moto at kawasaki3.org
Mon Apr 7 08:40:03 UTC 2014
The following reply was made to PR ports/185863; it has been noted by GNATS.
From: moto kawasaki <moto at kawasaki3.org>
To: bug-followup at FreeBSD.org, rainer at ultra-secure.de
Cc:
Subject: Re: ports/185863: security/ossec-hids-client: ossec-hids-*
ports don't build on FreeBSD 10 (clang related)
Date: Mon, 07 Apr 2014 17:26:53 +0900 (JST)
Hello Nukama-san and Duffner-san,
I've just found that ossec-hids-* ports won't be compiled again, and
also the newer version of ossec-hids is available now.
I am sorry that I didn't search PR database before making patches, so
that it looks like I just had ignored your efforts but it is not my
intention. I appreciate you very much.
I also appreciate cgzones at https://github.com/ossec/ossec-hids/pull/132
I just cut and copy his patches, and it works.
At last, my environment is:
$ uname -a
FreeBSD flyingdutchman.kawasaki3.org 10.0-RELEASE FreeBSD 10.0-RELEASE
#0 r260789: Thu Jan 16 22:34:59 UTC 2014
root at snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
And I did portsnap (fetch and update) today (2014/Apr/07).
With this version of OS and ports tree, I could not compile
security/ossec-hids-* .
With the following patches, I can now compile and run
ossec-hids-local, although I see a lot of warnings during the
compilation, nor I didn't do the functionality test yet.
Thank you very much.
--
moto kawasaki <moto at kawasaki3.org> 090-2464-8454
security/ossec-hids-server/{distinfo,Makefile}
============================================================
--- Makefile.kawasaki 2014-04-07 17:23:52.814574981 +0900
+++ Makefile 2014-04-07 16:19:32.255854344 +0900
@@ -2,7 +2,7 @@
# $FreeBSD: head/security/ossec-hids-server/Makefile 340722 2014-01-22 17:00:46Z mat $
PORTNAME= ossec-hids
-PORTVERSION= 2.7
+PORTVERSION= 2.7.1
PORTREVISION?= 0
CATEGORIES= security
MASTER_SITES= http://www.ossec.net/files/ \
--- distinfo.kawasaki 2014-04-07 17:00:50.213688862 +0900
+++ distinfo 2014-04-07 17:00:45.764798949 +0900
@@ -1,2 +1,2 @@
-SHA256 (ossec-hids-2.7.tar.gz) = f8ac4a7d74068a8ca4f14e3c906bfa3a68a87fd026b463422bea79fe9d747249
-SIZE (ossec-hids-2.7.tar.gz) = 818656
+SHA256 (ossec-hids-2.7.1.tar.gz) = a81d11cd6c3f21058968f5c72c25b160d3218ea28d648d8abd6a78f4ae4196ec
+SIZE (ossec-hids-2.7.1.tar.gz) = 837818
============================================================
security/ossec-hids-server/files/patch-kawasaki
============================================================
--- ./install.sh.kawasaki 2013-10-30 03:13:44.000000000 +0900
+++ ./install.sh 2014-04-07 16:35:01.203771494 +0900
@@ -67,9 +67,6 @@
echo "5- ${installing}"
echo "DIR=\"${INSTALLDIR}\"" > ${LOCATION}
- echo "CC=${CC}" >> ${LOCATION}
- echo "GCC=${CC}" >> ${LOCATION}
- echo "CLANG=clang" >> ${LOCATION}
# Changing Config.OS with the new C flags
# Checking if debug is enabled
@@ -811,19 +808,6 @@
export PATH
fi
- ls "`which gcc`" > /dev/null 2>&1
- if [ ! $? = 0 ]; then
- ls "`which cc`" > /dev/null 2>&1
- if [ ! $? = 0 ]; then
- if [ "X${USER_BINARYINSTALL}" = "X" ]; then
- catError "0x3-dependencies"
- fi
- fi
- CC="cc"
- else
- CC="gcc"
- fi
-
PATH=$OLDOPATH
export PATH
}
--- ./src/Makefile.kawasaki 2013-10-30 03:13:44.000000000 +0900
+++ ./src/Makefile 2014-04-07 16:50:47.446724447 +0900
@@ -47,14 +47,14 @@
@echo "CEXTRA=-DCLIENT" >> ./Config.OS
setclang:
- @mv LOCATION LOCATION.backup
- @sed -e "s/^CC=.*/CC=clang/g" LOCATION.backup > LOCATION
- @rm LOCATION.backup
+ @mv Config.Make Config.Make.backup
+ @sed -e "s/^CC?=.*/CC=clang/g" Config.Make.backup > Config.Make
+ @rm Config.Make.backup
unsetclang:
- @mv LOCATION LOCATION.backup
- @sed -e "s/^CC=.*/CC=gcc/g" LOCATION.backup > LOCATION
- @rm LOCATION.backup
+ @mv Config.Make Config.Make.backup
+ @sed -e "s/^CC=clang/CC?=cc/g" Config.Make.backup > Config.Make
+ @rm Config.Make.backup
setprelude:
@echo "CPRELUDE=-DPRELUDE -lprelude `libprelude-config --pthread-cflags` `libprelude-config --libs`" >> ./Config.OS
--- ./src/Config.Make.kawasaki 2013-10-30 03:13:44.000000000 +0900
+++ ./src/Config.Make 2014-04-07 16:50:03.878707450 +0900
@@ -7,7 +7,7 @@
include ${PT}LOCATION
include ${PT}Config.OS
-
+CC?=cc
CFLAGS = -g -Wall -I${PT} -I${PT}headers ${CPATH} ${CEXTRA} ${DEXTRA} ${EEXTRA} ${FEXTRA} ${GEXTRA} ${HEXTRA} ${CGEOIP} -DARGV0=\"${NAME}\" -DXML_VAR=\"var\" -DOSSECHIDS
SOURCES = *.c
--- ./src/os_crypto/sha1/Makefile.kawasaki 2013-10-30 03:13:44.000000000 +0900
+++ ./src/os_crypto/sha1/Makefile 2014-04-07 16:36:13.421764455 +0900
@@ -9,8 +9,6 @@
SRCS = sha1_op.c
sha1_OBJS = sha1_op.o
-CC=$(GCC)
-
sha1:
$(CC) $(CFLAGS) -c $(SRCS)
--- ./src/os_crypto/sha1/md32_common.h.kawasaki 2013-10-30 03:13:44.000000000 +0900
+++ ./src/os_crypto/sha1/md32_common.h 2014-04-07 16:37:09.035772920 +0900
@@ -607,7 +607,7 @@
}
#ifndef MD32_REG_T
-#define MD32_REG_T long
+#define MD32_REG_T int
/*
* This comment was originaly written for MD5, which is why it
* discusses A-D. But it basically applies to all 32-bit digests,
--- ./src/init/shared.sh.kawasaki 2013-10-30 03:13:44.000000000 +0900
+++ ./src/init/shared.sh 2014-04-07 16:44:06.513752125 +0900
@@ -28,7 +28,6 @@
NAMESERVERS=`cat /etc/resolv.conf | grep "^nameserver" | cut -d " " -sf 2`
NAMESERVERS2=`cat /etc/resolv.conf | grep "^nameserver" | cut -sf 2`
HOST_CMD=`which host`
-CC=""
NAME="OSSEC HIDS"
INSTYPE="server"
DEFAULT_DIR=`grep DIR ${LOCATION} | cut -f2 -d\"`
--- ./src/LOCATION.kawasaki 2014-04-07 16:34:00.001772000 +0900
+++ ./src/LOCATION 2014-04-07 16:35:39.204784623 +0900
@@ -1,4 +1 @@
DIR="/usr/local/ossec-hids"
-CC=gcc
-GCC=gcc
-CLANG=clang
--- ./src/Makeall.kawasaki 2013-10-30 03:13:44.000000000 +0900
+++ ./src/Makeall 2014-04-07 16:40:21.797779054 +0900
@@ -104,7 +104,7 @@
else
echo 'int main() { short one = 1; char *cp = (char*)&one; if ( *cp == 0 ) return(1); else return(0); }' > isbigendian.c
- gcc -o isbigendian isbigendian.c
+ ${CC} -o isbigendian isbigendian.c
./isbigendian
if [ $? = 1 ]; then
echo "INFO: Big endian set."
============================================================
--
moto kawasaki <moto at kawasaki3.org> 090-2464-8454
More information about the freebsd-ports-bugs
mailing list