diff options
author | miwi <miwi@FreeBSD.org> | 2007-06-09 18:41:07 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2007-06-09 18:41:07 +0800 |
commit | 8f99f84857253f2ffe29ef055ca53f3db521e00e (patch) | |
tree | c3a26c6b5f650dead14d7ecf3f3b7ffd78eb32f3 /security/ossec-hids-server | |
parent | 084c92e4cece1bccf72901c3ff372bf917aba6e0 (diff) | |
download | freebsd-ports-gnome-8f99f84857253f2ffe29ef055ca53f3db521e00e.tar.gz freebsd-ports-gnome-8f99f84857253f2ffe29ef055ca53f3db521e00e.tar.zst freebsd-ports-gnome-8f99f84857253f2ffe29ef055ca53f3db521e00e.zip |
- Respect DOCS
- Fix pkg-plist
- Fix rc script
PR: 113259
Submitted by: Paul Schmehl <pauls@utdallas.edu>
Approved by: maintainer
Diffstat (limited to 'security/ossec-hids-server')
-rw-r--r-- | security/ossec-hids-server/Makefile | 28 | ||||
-rw-r--r-- | security/ossec-hids-server/files/ossec-hids.in | 4 | ||||
-rw-r--r-- | security/ossec-hids-server/files/pkg-message.in | 11 | ||||
-rw-r--r-- | security/ossec-hids-server/pkg-plist | 169 | ||||
-rw-r--r-- | security/ossec-hids-server/pkg-plist.client | 34 |
5 files changed, 120 insertions, 126 deletions
diff --git a/security/ossec-hids-server/Makefile b/security/ossec-hids-server/Makefile index 1d91fe92c0a3..8a556335b804 100644 --- a/security/ossec-hids-server/Makefile +++ b/security/ossec-hids-server/Makefile @@ -18,6 +18,11 @@ COMMENT= A security tool to monitor and check logs and intrusions USE_RC_SUBR= ossec-hids +SUB_LIST= PORTNAME=${PORTNAME} +SUB_FILES= pkg-message +PLIST_SUB= PORTNAME=${PORTNAME} +PORTDOCS= BUGS CONFIG CONTRIB INSTALL LICENSE README + .include <bsd.port.pre.mk> .if defined(CLIENT_ONLY) @@ -34,8 +39,6 @@ post-patch: @${REINPLACE_CMD} 's|PREFIX|${PREFIX}/${PORTNAME}|' ${WRKSRC}/src/LOCATION @${REINPLACE_CMD} 's|PREFIX|${PREFIX}/${PORTNAME}|' ${WRKSRC}/src/headers/defs.h -do-configure: - do-build: @cd ${WRKSRC}/src;${MAKE} all;${MAKE} build @@ -51,12 +54,27 @@ do-install: .endif post-install: +.if defined(CLIENT_ONLY) + ${CP} ${WRKSRC}/etc/ossec-agent.conf ${PREFIX}/${PORTNAME}/etc/ossec.conf.sample + @if [ ! -f ${PREFIX}/${PORTNAME}/etc/ossec.conf ]; then \ + ${CP} ${WRKSRC}/etc/ossec-agent.conf ${PREFIX}/${PORTNAME}/etc/ossec.conf; \ + fi +.elif defined(LOCAL_ONLY) + ${CP} ${WRKSRC}/etc/ossec-local.conf ${PREFIX}/${PORTNAME}/etc/ossec.conf.sample @if [ ! -f ${PREFIX}/${PORTNAME}/etc/ossec.conf ]; then \ - ${CP} ${PREFIX}/${PORTNAME}/etc/ossec.conf.sample ${PREFIX}/${PORTNAME}/etc/ossec.conf ; \ + ${CP} ${WRKSRC}/etc/ossec-local.conf ${PREFIX}/${PORTNAME}/etc/ossec.conf; \ fi +.else + @if [ ! -f ${PREFIX}/${PORTNAME}/etc/ossec.conf ]; then \ + ${CP} ${WRKSRC}/etc/ossec-server.conf ${PREFIX}/${PORTNAME}/etc/ossec.conf; \ + fi +.endif -.if defined(CLIENT_ONLY) -PLIST=${PKGDIR}/pkg-plist.client +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR} .endif + @${CAT} ${PKGMESSAGE} + .include <bsd.port.post.mk> diff --git a/security/ossec-hids-server/files/ossec-hids.in b/security/ossec-hids-server/files/ossec-hids.in index d441686c5e05..e8d644dbd5f7 100644 --- a/security/ossec-hids-server/files/ossec-hids.in +++ b/security/ossec-hids-server/files/ossec-hids.in @@ -20,8 +20,8 @@ stop_cmd=${name}_stop restart_cmd=${name}_restart status_cmd=${name}_status -command="%%PREFIX%%/bin/ossec-control" -required_files="%%PREFIX%%/etc/ossec.conf" +command="%%PREFIX%%/%%PORTNAME%%/bin/ossec-control" +required_files="%%PREFIX%%/%%PORTNAME%%/etc/ossec.conf" ossechids_start() { $command start diff --git a/security/ossec-hids-server/files/pkg-message.in b/security/ossec-hids-server/files/pkg-message.in new file mode 100644 index 000000000000..438309da3e53 --- /dev/null +++ b/security/ossec-hids-server/files/pkg-message.in @@ -0,0 +1,11 @@ +After installation, you need to edit the ossec.conf file to reflect the correct settings +for your environment. All the files related to %%PORTNAME%% have been installed in +%%PREFIX%%/%%PORTNAME%% and its subdirectories. + +For information on proper configuration, see http://www.ossec.net/. + +To enable the startup script, add ossec-hids_enable="YES" to /etc/rc.conf. + +When you deinstall this port after starting the daemons once, many directories that are +created by the daemons will remain. To fully remove the port you need to delete those +directories manually. diff --git a/security/ossec-hids-server/pkg-plist b/security/ossec-hids-server/pkg-plist index dec6a5e3acf4..5ef71a9c51eb 100644 --- a/security/ossec-hids-server/pkg-plist +++ b/security/ossec-hids-server/pkg-plist @@ -1,85 +1,84 @@ -ossec-hids/active-response/bin/disable-account.sh -ossec-hids/active-response/bin/firewall-drop.sh -ossec-hids/active-response/bin/host-deny.sh -ossec-hids/active-response/bin/route-null.sh -ossec-hids/bin/clear_stats -ossec-hids/bin/list_agents -ossec-hids/bin/manage_agents -ossec-hids/bin/ossec-agentd -ossec-hids/bin/ossec-analysisd -ossec-hids/bin/ossec-control -ossec-hids/bin/ossec-execd -ossec-hids/bin/ossec-logcollector -ossec-hids/bin/ossec-maild -ossec-hids/bin/ossec-monitord -ossec-hids/bin/ossec-remoted -ossec-hids/bin/ossec-syscheckd -ossec-hids/bin/syscheck_update -ossec-hids/etc/decoder.xml -ossec-hids/etc/internal_options.conf -@unexec if cmp -s %D/ossec-hids/etc/ossec.conf.sample %D/ossec-hids/etc/ossec.conf; then rm -f %D/ossec-hids/etc/ossec.conf; fi -ossec-hids/etc/ossec.conf.sample -@exec if [ ! -f %D/ossec-hids/etc/ossec.conf ] ; then cp -p %D/ossec-hids/etc/ossec.conf.sample %D/ossec-hids/etc/orbit.conf; fi -ossec-hids/etc/shared/rootkit_files.txt -ossec-hids/etc/shared/rootkit_trojans.txt -ossec-hids/logs/ossec.log -ossec-hids/rules/apache_rules.xml -ossec-hids/rules/arpwatch_rules.xml -ossec-hids/rules/attack_rules.xml -ossec-hids/rules/firewall_rules.xml -ossec-hids/rules/ftpd_rules.xml -ossec-hids/rules/hordeimp_rules.xml -ossec-hids/rules/ids_rules.xml -ossec-hids/rules/imapd_rules.xml -ossec-hids/rules/local_rules.xml -ossec-hids/rules/mailscanner_rules.xml -ossec-hids/rules/ms-exchange_rules.xml -ossec-hids/rules/ms_ftpd_rules.xml -ossec-hids/rules/msauth_rules.xml -ossec-hids/rules/named_rules.xml -ossec-hids/rules/netscreenfw_rules.xml -ossec-hids/rules/ossec_rules.xml -ossec-hids/rules/pam_rules.xml -ossec-hids/rules/pix_rules.xml -ossec-hids/rules/policy_rules.xml -ossec-hids/rules/postfix_rules.xml -ossec-hids/rules/proftpd_rules.xml -ossec-hids/rules/pure-ftpd_rules.xml -ossec-hids/rules/racoon_rules.xml -ossec-hids/rules/rules_config.xml -ossec-hids/rules/sendmail_rules.xml -ossec-hids/rules/smbd_rules.xml -ossec-hids/rules/spamd_rules.xml -ossec-hids/rules/squid_rules.xml -ossec-hids/rules/sshd_rules.xml -ossec-hids/rules/symantec-av_rules.xml -ossec-hids/rules/syslog_rules.xml -ossec-hids/rules/telnetd_rules.xml -ossec-hids/rules/vpn_concentrator_rules.xml -ossec-hids/rules/vpopmail_rules.xml -ossec-hids/rules/vsftpd_rules.xml -ossec-hids/rules/web_rules.xml -ossec-hids/rules/zeus_rules.xml -@dirrm ossec-hids/var/run -@dirrm ossec-hids/var -@dirrm ossec-hids/tmp -@dirrm ossec-hids/stats -@dirrm ossec-hids/rules -@dirrm ossec-hids/queue/syscheck -@dirrm ossec-hids/queue/rootcheck -@dirrm ossec-hids/queue/rids -@dirrm ossec-hids/queue/ossec -@dirrm ossec-hids/queue/fts -@dirrm ossec-hids/queue/alerts -@dirrm ossec-hids/queue/agent-info -@dirrm ossec-hids/queue -@dirrm ossec-hids/logs/firewall -@dirrm ossec-hids/logs/archives -@dirrm ossec-hids/logs/alerts -@dirrm ossec-hids/logs -@dirrm ossec-hids/etc/shared -@dirrm ossec-hids/etc -@dirrm ossec-hids/bin -@dirrm ossec-hids/active-response/bin -@dirrm ossec-hids/active-response -@dirrm ossec-hids +%%PORTNAME%%/active-response/bin/disable-account.sh +%%PORTNAME%%/active-response/bin/firewall-drop.sh +%%PORTNAME%%/active-response/bin/host-deny.sh +%%PORTNAME%%/active-response/bin/route-null.sh +%%PORTNAME%%/bin/clear_stats +%%PORTNAME%%/bin/list_agents +%%PORTNAME%%/bin/manage_agents +%%PORTNAME%%/bin/ossec-agentd +%%PORTNAME%%/bin/ossec-analysisd +%%PORTNAME%%/bin/ossec-control +%%PORTNAME%%/bin/ossec-execd +%%PORTNAME%%/bin/ossec-logcollector +%%PORTNAME%%/bin/ossec-maild +%%PORTNAME%%/bin/ossec-monitord +%%PORTNAME%%/bin/ossec-remoted +%%PORTNAME%%/bin/ossec-syscheckd +%%PORTNAME%%/bin/syscheck_update +%%PORTNAME%%/etc/decoder.xml +%%PORTNAME%%/etc/internal_options.conf +@unexec if cmp -s %D/%%PORTNAME%%/etc/ossec.conf %D/%%PORTNAME%%/etc/ossec.conf.sample; then rm -f %D/%%PORTNAME%%/etc/ossec.conf; fi +%%PORTNAME%%/etc/ossec.conf.sample +%%PORTNAME%%/etc/shared/rootkit_files.txt +%%PORTNAME%%/etc/shared/rootkit_trojans.txt +%%PORTNAME%%/logs/ossec.log +%%PORTNAME%%/rules/apache_rules.xml +%%PORTNAME%%/rules/arpwatch_rules.xml +%%PORTNAME%%/rules/attack_rules.xml +%%PORTNAME%%/rules/firewall_rules.xml +%%PORTNAME%%/rules/ftpd_rules.xml +%%PORTNAME%%/rules/hordeimp_rules.xml +%%PORTNAME%%/rules/ids_rules.xml +%%PORTNAME%%/rules/imapd_rules.xml +%%PORTNAME%%/rules/local_rules.xml +%%PORTNAME%%/rules/mailscanner_rules.xml +%%PORTNAME%%/rules/ms-exchange_rules.xml +%%PORTNAME%%/rules/ms_ftpd_rules.xml +%%PORTNAME%%/rules/msauth_rules.xml +%%PORTNAME%%/rules/named_rules.xml +%%PORTNAME%%/rules/netscreenfw_rules.xml +%%PORTNAME%%/rules/ossec_rules.xml +%%PORTNAME%%/rules/pam_rules.xml +%%PORTNAME%%/rules/pix_rules.xml +%%PORTNAME%%/rules/policy_rules.xml +%%PORTNAME%%/rules/postfix_rules.xml +%%PORTNAME%%/rules/proftpd_rules.xml +%%PORTNAME%%/rules/pure-ftpd_rules.xml +%%PORTNAME%%/rules/racoon_rules.xml +%%PORTNAME%%/rules/rules_config.xml +%%PORTNAME%%/rules/sendmail_rules.xml +%%PORTNAME%%/rules/smbd_rules.xml +%%PORTNAME%%/rules/spamd_rules.xml +%%PORTNAME%%/rules/squid_rules.xml +%%PORTNAME%%/rules/sshd_rules.xml +%%PORTNAME%%/rules/symantec-av_rules.xml +%%PORTNAME%%/rules/syslog_rules.xml +%%PORTNAME%%/rules/telnetd_rules.xml +%%PORTNAME%%/rules/vpn_concentrator_rules.xml +%%PORTNAME%%/rules/vpopmail_rules.xml +%%PORTNAME%%/rules/vsftpd_rules.xml +%%PORTNAME%%/rules/web_rules.xml +%%PORTNAME%%/rules/zeus_rules.xml +@dirrmtry %%PORTNAME%%/var/run +@dirrmtry %%PORTNAME%%/var +@dirrmtry %%PORTNAME%%/tmp +@dirrmtry %%PORTNAME%%/stats +@dirrmtry %%PORTNAME%%/rules +@dirrmtry %%PORTNAME%%/queue/syscheck +@dirrmtry %%PORTNAME%%/queue/rootcheck +@dirrmtry %%PORTNAME%%/queue/rids +@dirrmtry %%PORTNAME%%/queue/ossec +@dirrmtry %%PORTNAME%%/queue/fts +@dirrmtry %%PORTNAME%%/queue/alerts +@dirrmtry %%PORTNAME%%/queue/agent-info +@dirrmtry %%PORTNAME%%/queue +@dirrmtry %%PORTNAME%%/logs/firewall +@dirrmtry %%PORTNAME%%/logs/archives +@dirrmtry %%PORTNAME%%/logs/alerts +@dirrmtry %%PORTNAME%%/logs +@dirrmtry %%PORTNAME%%/etc/shared +@dirrmtry %%PORTNAME%%/etc +@dirrmtry %%PORTNAME%%/bin +@dirrmtry %%PORTNAME%%/active-response/bin +@dirrmtry %%PORTNAME%%/active-response +@dirrmtry %%PORTNAME%% diff --git a/security/ossec-hids-server/pkg-plist.client b/security/ossec-hids-server/pkg-plist.client deleted file mode 100644 index 2217d89cccde..000000000000 --- a/security/ossec-hids-server/pkg-plist.client +++ /dev/null @@ -1,34 +0,0 @@ -ossec-hids/active-response/bin/disable-account.sh -ossec-hids/active-response/bin/firewall-drop.sh -ossec-hids/active-response/bin/firewalls/ipfw.sh -ossec-hids/active-response/bin/firewalls/ipfw_mac.sh -ossec-hids/active-response/bin/firewalls/pf.sh -ossec-hids/active-response/bin/host-deny.sh -ossec-hids/active-response/bin/route-null.sh -ossec-hids/bin/manage_agents -ossec-hids/bin/ossec-agentd -ossec-hids/bin/ossec-control -ossec-hids/bin/ossec-execd -ossec-hids/bin/ossec-logcollector -ossec-hids/bin/ossec-syscheckd -ossec-hids/etc/internal_options.conf -ossec-hids/etc/shared/rootkit_trojans.txt -ossec-hids/etc/shared/rootkit_files.txt -ossec-hids/etc/ossec.conf -ossec-hids/active-response/bin/firewalls -ossec-hids/logs/ossec.log -@dirrm ossec-hids/active-response/bin/firewalls -@dirrm ossec-hids/active-response/bin -@dirrm ossec-hids/active-response -@dirrm ossec-hids/etc/shared -@dirrm ossec-hids/etc/ -@dirrm ossec-hids/var/run -@dirrm ossec-hids/var -@dirrm ossec-hids/queue/syscheck -@dirrm ossec-hids/queue/rids -@dirrm ossec-hids/queue/ossec -@dirrm ossec-hids/queue/alerts -@dirrm ossec-hids/queue -@dirrm ossec-hids/logs -@dirrm ossec-hids/bin -@dirrm ossec-hids
\ No newline at end of file |