[Pkg-ossec-devel] [SCM] Git repository for pkg-ossec branch, debian, updated. 20e1db16d04181ea0167328fd1fb43860316492d

Jose Antonio Quevedo joseantonio.quevedo at gmail.com
Tue Jul 26 23:04:06 UTC 2011


The following commit has been merged in the debian branch:
commit 7859b3bc31dbc4f00a6ae60a5f593fcc77577f20
Author: Javier Fernandez-Sanguino <jfs at debian.org>
Date:   Mon Jul 25 22:27:36 2011 +0200

    Create symlinks for missing directories and create additional directories
    in the ossec-hids-agent.dirs and ossec-hids-server.dirs files
    
    Conflicts:
    
    	debian/ossec-hids-agent.dirs
    	debian/ossec-hids-server.dirs
    	debian/rules

diff --git a/debian/ossec-hids-agent.dirs b/debian/ossec-hids-agent.dirs
new file mode 100644
index 0000000..aefa56d
--- /dev/null
+++ b/debian/ossec-hids-agent.dirs
@@ -0,0 +1,7 @@
+usr/bin/
+usr/lib/ossec/
+var/ossec/active-response/bin
+var/ossec/agentless
+var/ossec/queue
+var/ossec/rules
+var/ossec/stats
diff --git a/debian/ossec-hids-server.dirs b/debian/ossec-hids-server.dirs
new file mode 100644
index 0000000..0046d5a
--- /dev/null
+++ b/debian/ossec-hids-server.dirs
@@ -0,0 +1,8 @@
+usr/bin/
+usr/lib/ossec/
+var/ossec/.ssh
+var/ossec/active-response/bin
+var/ossec/agentless
+var/ossec/queue
+var/ossec/rules
+var/ossec/stats
diff --git a/debian/rules b/debian/rules
index 1a4bff0..dd285b6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,162 +19,121 @@ export DH_OPTIONS
 PKG_BASENAME="ossec-hids"
 CURDIR="`pwd`"
 
-
+configure: configure-stamp
 configure-stamp:
 	dh_testdir
-
-
-	touch configure-stamp
-
-configure-%: configure-stamp
-
-#	USER_LANGUAGE="en"	# Here we have to choose if autodetect or ask to the user. First choice preferred.
-#	USER_NO_STOP="no"
-#	USER_UPDATE="" 
-
-#	BUILD="yes"	# variable used to stop the installation script
-
-
-#configure-local:
-
-#	USER_INSTALL_TYPE="local"
-
-#configure-server:
-
-#	USER_INSTALL_TYPE="server"
-
-#configure-agent:
-
-#	USER_INSTALL_TYPE="agent"
-
-
-build-local: #configure-local
-
-	dh_testdir
-
-	USER_INSTALL_TYPE="local" BUILD="yes" USER_LANGUAGE="en" USER_NO_STOP="no" USER_DIR="/var/ossec" USER_ENABLE_EMAIL="n" EMAIL_NOTIFY="n" USER_ENABLE_ACTIVE_RESPONSE="n" USER_ENABLE_SYSCHECK="n" USER_ENABLE_ROOTCHECK="n" ./install.sh debug
-
-	touch build-local-stamp
-
-build-server: #configure-server
-
-# Possible values for:
-# - USER_LANGUAGE: any value in $(ls ./etc/templates/)
-# - USER_DIR == DESTDIR <-- values assigned now have to change in the near future.
-# - USER_DELETE_DIR: set this variable to "y" if you want to delete the $USER_DIR directory without being asked by the system.
-# - 
-
-	dh_testdir
-
-	USER_INSTALL_TYPE="server" BUILD="yes" USER_LANGUAGE="en" USER_NO_STOP="no" ACTIVE_RESPONSE="n" USER_DIR="/var/ossec" USER_DELETE_DIR="" USER_ENABLE_EMAIL="n" EMAIL_NOTIFY="n" USER_ENABLE_ACTIVE_RESPONSE="n" USER_ENABLE_SYSLOG="n" USER_ENABLE_SYSCHECK="n" USER_ENABLE_ROOTCHECK="n" ./install.sh debug
-
-	touch build-server-stamp
-
-build-agent: #configure-agent
-
-# - USER_AGENT_SERVER_IP : needed to configure the client. Could we use a domain name?
-#			!! IT WAS SET TO "127.0.0.1" for testing purposes.
-# 
-
+# TBD - Configure CFLAGS in src/Config.OS
+	echo > src/Config.OS
+	touch $@
+
+build: configure build-stamp 
+build-stamp: 
+	cd src && make all
+	cd src && make build
+	touch $@
+
+build-indep: build-indep-stamp
+build-indep-stamp:
+# Nothing to do here, yet
+	touch $@
+
+install-arch: build
 	dh_testdir
-
-	USER_INSTALL_TYPE="agent" BUILD="yes" USER_LANGUAGE="en" USER_NO_STOP="n" ACTIVE_RESPONSE="n" USER_DIR="/var/ossec" USER_DELETE_DIR="" USER_AGENT_SERVER_IP="127.0.0.1" USER_ENABLE_ACTIVE_RESPONSE="n" ./install.sh debug
-
-	touch build-agent-stamp
-
-build-stamp: build-local build-server build-agent
-
-	touch build-stamp
-
-build: build-stamp 
-
-
-install: install-doc install-server install-agent install-local
-
-
-install-%:
-
+	dh_testroot
+	dh_prep -a
+	dh_installdirs -a
+# Server files and directories
+	install -m 755 bin/ossec debian/ossec-hids-server/usr/bin/
+	install -m 755 bin/ossec* debian/ossec-hids-server/usr/lib/ossec
+	-rm -f debian/ossec-hids-server/usr/bin/ossec
+	-rm -f debian/ossec-hids-server/usr/bin/ossec-agentd
+	for file in manage_agents syscheck_update verify-agent-conf  \
+		clear_stats list_agents agent_control syscheck_control \
+		rootcheck_control ; do \
+		install -m 755 bin/$$file debian/ossec-hids-server/usr/lib/ossec/ ; \
+	done
+	cd debian/ossec-hids-server/var/ossec && ln -s bin ../../usr/lib/ossec/
+	cd debian/ossec-hids-server/var/ossec && ln -s etc ../../etc/ossec/
+	cd debian/ossec-hids-server/var/ossec && ln -s logs ../logs/ossec/
+# Agent files and directories
+	install -m 755 bin/ossec-agentd debian/ossec-hids-agent/usr/bin/
+	for file in agent-auth ossec-logcollector ossec-syscheckd ossec-execd \
+		manage_agents ; do \
+		install -m 755 bin/$$file debian/ossec-hids-agent/usr/lib/ossec/ ; \
+	done
+	dh_install -a
+	cd debian/ossec-hids-agent/var/ossec && ln -s bin ../../usr/lib/ossec/
+	cd debian/ossec-hids-agent/var/ossec && ln -s etc ../../etc/ossec/
+	cd debian/ossec-hids-agent/var/ossec && ln -s logs ../logs/ossec/
+
+install-indep: build-indep
 	dh_testdir
 	dh_testroot
-	dh_prep
-	dh_installdirs
-
-	USER_LANGUAGE="en"
-	USER_NO_STOP="no"
-#	USER_UPDATE = 
-	BUILD="no"
-
-	BASE_DESTDIR="$(CURDIR)/debian"
-
-install-doc:
-
-	PKG="$(PKG_BASENAME)-doc"
-	DESTDIR = "$(BASE_DESTDIR)/$(PKG)"
-
-# This target needs to be done
-	dh_install
-
-install-local:
-
-	PKG="$(PKG_BASENAME)-local"
-	DESTDIR = "$(BASE_DESTDIR)/$(PKG)"
-
-	USER_INSTALL_TYPE="$(USER_INSTALL_TYPE)" BUILD="$(BUILD)" USER_LANGUAGE="$(USER_LANGUAGE)" USER_NO_STOP="n" USER_DIR="$(DESTDIR)" ./install.sh debug
-
-	dh_install
-
-
-install-server:
-
-	PKG="$(PKG_BASENAME)-server"
-	DESTDIR = "$(BASE_DESTDIR)/$(PKG)"
-
-	USER_INSTALL_TYPE="$(USER_INSTALL_TYPE)" BUILD="$(BUILD)" USER_LANGUAGE="$(USER_LANGUAGE)" USER_NO_STOP="n" ./install.sh
-
-	dh_install
-
-install-client:
+	dh_prep -i
+	dh_installdirs -i
+	dh_install -i
+
+install: install-arch install-indep
+
+binary: binary-arch binary-indep
+
+binary-arch: build install-arch
+	dh_testdir -a
+	dh_testroot -a
+	dh_installdocs -a 
+	dh_installexamples -a
+	dh_installdebconf -a
+	dh_installman -a 
+	dh_installchangelogs -a 
+	dh_link -a
+	dh_strip -a
+	dh_compress -a
+	dh_fixperms -a
+	dh_makeshlibs -a
+	dh_installdeb -a
+	dh_perl -a
+	dh_shlibdeps -a
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+binary-indep: build-indep install-indep
+	dh_testdir -i
+	dh_testroot -i
+	dh_installdocs -i
+	dh_installexamples -i
+	dh_installdebconf -i
+	dh_installman -i 
+	dh_installchangelogs -i
+	dh_link -i
+	dh_strip -i
+	dh_compress -i
+	dh_fixperms -i
+	dh_makeshlibs -i
+	dh_installdeb -i
+	dh_perl -i
+	dh_shlibdeps -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
 
-	PKG="$(PKG_BASENAME)-client"
-	DESTDIR = "$(BASE_DESTDIR)/$(PKG)"
-
-	USER_INSTALL_TYPE="$(USER_INSTALL_TYPE)" BUILD="$(BUILD)" USER_LANGUAGE="$(USER_LANGUAGE)" USER_NO_STOP="n" ./install.sh
-	dh_install
-
-binary:
-
-binary-arch:
-
-binary-indep:
 
 get-orig-source:
 
-
-clean-doc:		## are we really needing clean-* targets? ---> we already have dh_clean at clean target
-
-#	$(MAKE) clean-doc
-
-clean-local:
-
-#	$(MAKE) clean-local
-
-clean-server:
-
-#	$(MAKE) clean-server
-
-clean-client:
-
-#	$(MAKE) clean-client
-
-clean: #clean-local clean-server clean-client clean-doc
-
+clean: 
 	dh_testdir
 	dh_testroot
-
-#	rm -f build-stamp configure-stamp	#  <-- already done by dh_clean, so don't needed
-
-
+	cd src && make clean
+# Clean up additional auto-generated files
+	for file in etc/ossec.mc src/Config.OS \
+		src/analysisd/compiled_rules/compiled_rules.h \
+		src/analysisd/ossec-logtest src/analysisd/ossec-makelists \
+		src/isbigendian src/isbigendian.c ; do \
+		[ -e $$file ] && rm -f $$file; \
+		done
+	-rm -rf bin/
 	dh_clean
 
+
 #%:
 #	dh $@ 

-- 
Git repository for pkg-ossec



More information about the Pkg-ossec-devel mailing list