X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=debian%2Frules;h=f1b0e62bca749b85d332d4a184dda6ba3afd3cb0;hp=12c3c728539d48c5ff666e1879ca363ab6878742;hb=60a2e5ba49290aeb71d745f194e63160781ca78c;hpb=0105f1709981e786d9e6e111548defaf944e8ef9 diff --git a/debian/rules b/debian/rules index 12c3c72..f1b0e62 100755 --- a/debian/rules +++ b/debian/rules @@ -51,6 +51,25 @@ install: build mkdir -p -m 700 $(DESTDIR)/$$i; \ done + # various files installation + install -m 644 etc/internal_options.conf $(DESTDIR)/etc + install -m 644 etc/decoder.xml $(DESTDIR)/etc + install -m 644 src/rootcheck/db/*.txt $(DESTDIR)/etc/shared + if [ -e etc/ossec.mc ]; then \ + install -m 440 etc/ossec.mc $(DESTDIR)/etc/ossec.conf; \ + else \ + install -m 440 etc/ossec-local.conf $(DESTDIR)/etc/ossec.conf; \ + fi + install -m 440 etc/ossec-*.conf $(DESTDIR)/etc + cp -r etc/rules/* $(DESTDIR)/rules + install -m 750 src/agentlessd/scripts/* $(DESTDIR)/agentless + install -s -m 755 bin/* $(DESTDIR)/bin + install -m 755 src/init/ossec-*.sh $(DESTDIR)/bin + ln -s ossec-local.sh $(DESTDIR)/bin/ossec-control + install -m 755 active-response/*.sh $(DESTDIR)/active-response/bin + install -m 755 active-response/firewalls/*.sh \ + $(DESTDIR)/active-response/bin + # attrs chmod -R 550 $(DESTDIR) chmod -R 770 $(DESTDIR)/queue/alerts @@ -67,32 +86,26 @@ install: build chmod -R 550 $(DESTDIR)/rules chmod 770 $(DESTDIR)/var/run chmod 550 $(DESTDIR)/etc - chmod 770 $(DESTDIR)/etc/shared + chmod 440 $(DESTDIR)/etc/internal_options.conf + chmod -R 770 $(DESTDIR)/etc/shared chmod 700 $(DESTDIR)/.ssh + chmod 755 $(DESTDIR)/active-response/bin/* + chmod 550 $(DESTDIR)/bin/* + chmod 440 $(DESTDIR)/etc/ossec.conf - # various files installation - install -m 644 etc/internal_options.conf $(DESTDIR)/etc - install -m 644 etc/decoder.xml $(DESTDIR)/etc - install -m 644 src/rootcheck/db/*.txt $(DESTDIR)/etc/shared - if [ -e etc/ossec.mc ]; then \ - install -m 440 etc/ossec.mc $(DESTDIR)/etc/ossec.conf; \ - else \ - install -m 440 etc/ossec-agent.conf $(DESTDIR)/etc/ossec.conf; \ - fi - install -m 440 etc/ossec-*.conf $(DESTDIR)/etc - cp -r etc/rules/* $(DESTDIR)/rules - find $(DESTDIR)/rules -type f -exec chmod 640 '{}' ';' - install -m 750 src/agentlessd/scripts/* $(DESTDIR)/agentless - install -s -m 755 bin/* $(DESTDIR)/bin - install -m 755 src/init/ossec-*.sh $(DESTDIR)/bin - ln -s ossec-local.sh $(DESTDIR)/bin/ossec-control - install -m 755 active-response/*.sh $(DESTDIR)/active-response/bin - install -m 755 active-response/firewalls/*.sh \ - $(DESTDIR)/active-response/bin + # fixups: no need for execute bits on files there + find $(DESTDIR)/rules -type f -exec chmod ugo-x '{}' ';' + find $(DESTDIR)/etc -type f -exec chmod ugo-x '{}' ';' # system init script mkdir -p $(PKGDIR)/etc/init.d - install -m 755 src/init/ossec-hids.init $(PKGDIR)/etc/init.d/ossec-hids + if [ -e ossec-hids-debian.init ]; then \ + install -m 755 ossec-hids-debian.init \ + $(PKGDIR)/etc/init.d/ossec-hids; \ + else \ + install -m 755 src/init/ossec-hids.init \ + $(PKGDIR)/etc/init.d/ossec-hids; \ + fi # system ossec-init echo "DIRECTORY=\"/var/ossec\"" > $(PKGDIR)/etc/ossec-init.conf