Gentoo Archives: gentoo-commits

From: "Patrick Lauer (patrick)" <patrick@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-forensics/samhain: ChangeLog samhain-2.6.2.ebuild
Date: Fri, 26 Feb 2010 20:49:26
Message-Id: E1Nl77f-0007zv-0c@stork.gentoo.org
1 patrick 10/02/26 20:49:19
2
3 Modified: ChangeLog
4 Added: samhain-2.6.2.ebuild
5 Log:
6 Bump
7 (Portage version: 2.2_rc63/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.15 app-forensics/samhain/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-forensics/samhain/ChangeLog?rev=1.15&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-forensics/samhain/ChangeLog?rev=1.15&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-forensics/samhain/ChangeLog?r1=1.14&r2=1.15
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/app-forensics/samhain/ChangeLog,v
19 retrieving revision 1.14
20 retrieving revision 1.15
21 diff -u -r1.14 -r1.15
22 --- ChangeLog 8 Nov 2009 12:11:22 -0000 1.14
23 +++ ChangeLog 26 Feb 2010 20:49:18 -0000 1.15
24 @@ -1,6 +1,11 @@
25 # ChangeLog for app-forensics/samhain
26 -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/app-forensics/samhain/ChangeLog,v 1.14 2009/11/08 12:11:22 patrick Exp $
28 +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
29 +# $Header: /var/cvsroot/gentoo-x86/app-forensics/samhain/ChangeLog,v 1.15 2010/02/26 20:49:18 patrick Exp $
30 +
31 +*samhain-2.6.2 (26 Feb 2010)
32 +
33 + 26 Feb 2010; Patrick Lauer <patrick@g.o> +samhain-2.6.2.ebuild:
34 + Bump
35
36 *samhain-2.6.0 (08 Nov 2009)
37
38
39
40
41 1.1 app-forensics/samhain/samhain-2.6.2.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-forensics/samhain/samhain-2.6.2.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-forensics/samhain/samhain-2.6.2.ebuild?rev=1.1&content-type=text/plain
45
46 Index: samhain-2.6.2.ebuild
47 ===================================================================
48 # Copyright 1999-2010 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/app-forensics/samhain/samhain-2.6.2.ebuild,v 1.1 2010/02/26 20:49:18 patrick Exp $
51
52 KEYWORDS="~amd64 ~x86"
53 DESCRIPTION="Advanced file integrity and intrusion detection tool."
54 HOMEPAGE="http://la-samhna.de/samhain/"
55 SRC_URI="http://la-samhna.de/archive/samhain_signed-${PV}.tar.gz"
56 LICENSE="GPL-2"
57 SLOT="0"
58 IUSE="crypt debug login-watch mounts-check mysql netclient netserver postgres prelude static suidcheck userfiles xml"
59
60 RESTRICT="strip"
61
62 DEPEND="crypt? ( >=app-crypt/gnupg-1.2 )
63 mysql? ( virtual/mysql )
64 postgres? ( >=virtual/postgresql-server-7.2 )
65 prelude? ( >=dev-libs/libprelude-0.8.10 )
66 >=sys-apps/sed-4
67 app-arch/tar
68 app-arch/gzip"
69
70 # Samhain stealth mode options
71 #
72 # If you would like to enable stealth mode, please set and uncomment the
73 # following options or pass them as enviroment variables when emerging
74 # the package (like INSTALL_NAME="asd" emerge samhain).
75 # If you set the variables here, don't forget to redigest the ebuild by
76 # issuing 'ebuild samhain-<thisversion>.ebuild digest', also remember that with
77 # your next emerge sync, the changes to the ebuild will be lost!
78 #
79 # Read the Samhain manual for additional information.
80 #
81 # STEALTH should be set to either 'full' or 'micro' (mandatory)
82 #STEALTH=""
83 #
84 # XOR_VALUE should be a whole number from 128 to 255 (mandatory)
85 #XOR_VALUE=""
86 #
87 # INSTALL_NAME can be set to change the name of the Samhain binaries
88 # to the name you specify (optional)
89 #INSTALL_NAME=""
90
91 if [[ "${STEALTH}" == "full" ]] ; then
92 RDEPEND="media-gfx/imagemagick"
93 fi
94
95 pkg_setup() {
96 if use static ; then
97 if use postgres || use prelude ; then
98 ewarn "At the moment it isn't possible to build a static Samhain with"
99 ewarn "Prelude and/or PostgreSQL support on Gentoo, the compilation"
100 ewarn "fails during the linking process."
101 echo
102 ewarn "This will be looked at and fixed in the future, in the meantime,"
103 ewarn "patches to fix this are always welcome and appreciated! ;)"
104 ewarn "(Open a bug on bugs.gentoo.org for them or send them to"
105 ewarn "the maintainer directly, thanks!)"
106 die "Please turn the 'postgres' and/or 'prelude' USE flags off when building with 'static'"
107 fi
108 fi
109
110 if use mysql && use postgres ; then
111 ewarn "You cannot compile both database backends into Samhain at once,"
112 ewarn "you need to choose between MySQL or PostgreSQL and disable the"
113 ewarn "one you don't want to use."
114 die "Please choose between 'mysql' or 'postgres' USE flags"
115 fi
116 }
117
118 src_unpack() {
119 unpack ${A}
120 tar -xzf "samhain-${PV}.tar.gz"
121 }
122
123 src_compile() {
124 local myconf
125
126 if use crypt ; then
127 myconf="${myconf} --with-gpg=/usr/bin/gpg --with-checksum=no"
128
129 if [[ -n "${KEY_FPR}" ]] ; then
130 einfo "Setting built-in key fingerprint to ${KEY_FPR}"
131 FPR=`echo ${KEY_FPR} | sed "s/ //g"`
132 myconf="${myconf} --with-fp=${FPR}"
133 fi
134 fi
135
136 if [[ -n "${STEALTH}" ]] ; then
137 [[ -z "${XOR_VALUE}" ]] && die "Variable XOR_VALUE must be set for stealth mode"
138 echo
139 einfo "Enabling stealth mode '${STEALTH}', setting XOR_VALUE to ${XOR_VALUE}"
140
141 if [[ "${STEALTH}" == "full" ]] ; then
142 myconf="${myconf} --enable-stealth=${XOR_VALUE}"
143 sed -e "s:STEGIN=@stegin_prg@:STEGIN=:g" -i samhain-install.sh.in
144 elif [[ "${STEALTH}" == "micro" ]] ; then
145 myconf="${myconf} --enable-micro-stealth=${XOR_VALUE}"
146 else
147 die "STEALTH must be set to either 'full' or 'micro'"
148 fi
149
150 if [[ -n "${INSTALL_NAME}" ]] ; then
151 echo
152 einfo "Setting alternative samhain name to ${INSTALL_NAME}"
153 echo
154 myconf="${myconf} --enable-install-name=${INSTALL_NAME}"
155 fi
156 fi
157
158 use mysql && myconf="${myconf} --with-database=mysql --enable-xml-log"
159 use postgres && myconf="${myconf} --with-database=postgresql --enable-xml-log"
160 use prelude && myconf="${myconf} --with-prelude --with-libprelude-prefix=/usr"
161 use xml && myconf="${myconf} --enable-xml-log"
162 use static && myconf="${myconf} --enable-static"
163 use debug && myconf="${myconf} --enable-debug"
164
165 use netclient && myconf="${myconf} --enable-network=client"
166 use netserver && myconf="${myconf} --enable-network=server"
167
168 use login-watch && myconf="${myconf} --enable-login-watch"
169 use mounts-check && myconf="${myconf} --enable-mounts-check"
170 use suidcheck && myconf="${myconf} --enable-suidcheck"
171 use userfiles && myconf="${myconf} --enable-userfiles"
172
173 myconf="${myconf} --localstatedir=/var"
174
175 econf ${myconf} || die "configure failed"
176 make || die "compile failed"
177 }
178
179 src_install() {
180 make DESTDIR="${D}" install || die "make install failed"
181
182 rm -Rf "${D}/var/log"
183 rm -Rf "${D}/var/run"
184 rm -Rf "${D}/var/state"
185
186 if [[ -n "${STEALTH}" ]] ; then
187 rm -Rf "${D}/usr/share"
188 else
189 dodoc docs/BUGS docs/MANUAL* docs/README* docs/TODO docs/*.txt
190 dohtml docs/*.html
191 docinto scripts
192 dodoc scripts/*
193 insinto /etc
194 insopts -m0600
195 newins samhainrc.linux samhainrc
196 newinitd init/samhain.startGentoo samhain
197 keepdir "/var/lib/samhain"
198 fi
199
200 if use netserver ; then
201 keepdir "/var/lib/yule"
202 chown daemon:daemon "${D}/var/lib/yule"
203 keepdir "/var/log/yule"
204 chown daemon:daemon "${D}/var/log/yule"
205 fi
206 }
207
208 pkg_postinst() {
209 if [[ -n "${STEALTH}" ]] ; then
210 elog
211 elog "Manual pages, documentation, and init script were NOT installed in order to"
212 elog "obscure Samhain's presence. You should also remove samhain's installation"
213 elog "traces from ${ROOT}/var/cache/edb/world and ${ROOT}/var/db/pkg."
214 fi
215
216 if [[ "${STEALTH}" == "full" ]] ; then
217 elog
218 elog "In stealth mode, the configuration file must be steganographically hidden"
219 elog "in a postscript image file. The sample config has been created this way by"
220 elog "the installation process. Use the samhain_stealth utility to modify or"
221 elog "create your own configuration file."
222 fi
223
224 if [[ -z "${KEY_FPR}" ]] ; then
225 elog
226 ewarn "GnuPG support has been enabled, but fingerprint verification will be"
227 ewarn "ignored. To enable fingerprint verification (strongly recommended),"
228 ewarn "you must re-emerge this package with the KEY_FPR variable set to"
229 ewarn "your default signing key fingerprint."
230 ewarn "Please read the Samhain manual for more details."
231 elog
232 elog "Enabling GnuPG support in Samhain requires that you sign your configuration"
233 elog "and and database files. Please run the following commands as root:"
234 elog
235 elog " gpg -a --clearsign --not-dash-escaped ${ROOT}/etc/samhainrc"
236 elog " mv ${ROOT}/etc/samhainrc.asc ${ROOT}/etc/samhainrc"
237 elog " chmod 600 ${ROOT}/etc/samhainrc"
238 elog
239 elog "Run the same commands on ${ROOT}/var/lib/samhain/samhain_file after initialization."
240 fi
241
242 elog
243 elog "Be sure to check your settings in ${ROOT}/etc/samhainrc. When ready, run:"
244 elog " samhain -t init"
245 elog "to initialize Samhain."
246
247 elog
248 elog "Samhain stealth-mode options are also available. Please view the comments"
249 elog "in the Samhain ebuild for further configuration instructions."
250
251 elog
252 ewarn "Please be sure to read the Samhain manual to understand and correctly"
253 ewarn "configure the Samhain utility."
254 ewarn "HTML version available for viewing at http://la-samhna.de/samhain/manual/ ."
255 }