1 |
jokey 07/10/22 22:29:07 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: base-1.3.8.ebuild |
5 |
Log: |
6 |
Import from php overlay |
7 |
(Portage version: 2.1.3.15) |
8 |
|
9 |
Revision Changes Path |
10 |
1.13 net-analyzer/base/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/base/ChangeLog?rev=1.13&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/base/ChangeLog?rev=1.13&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/base/ChangeLog?r1=1.12&r2=1.13 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/net-analyzer/base/ChangeLog,v |
19 |
retrieving revision 1.12 |
20 |
retrieving revision 1.13 |
21 |
diff -u -r1.12 -r1.13 |
22 |
--- ChangeLog 6 Sep 2007 16:15:42 -0000 1.12 |
23 |
+++ ChangeLog 22 Oct 2007 22:29:07 -0000 1.13 |
24 |
@@ -1,6 +1,18 @@ |
25 |
# ChangeLog for net-analyzer/base |
26 |
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/base/ChangeLog,v 1.12 2007/09/06 16:15:42 jokey Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/base/ChangeLog,v 1.13 2007/10/22 22:29:07 jokey Exp $ |
29 |
+ |
30 |
+*base-1.3.8 (22 Oct 2007) |
31 |
+ |
32 |
+ 22 Oct 2007; Markus Ullmann <jokey@g.o> +base-1.3.8.ebuild: |
33 |
+ Import from php overlay |
34 |
+ |
35 |
+ 09 Oct 2007; Jakub Moc <jakub@g.o> +base-1.3.8.ebuild: |
36 |
+ Version bump, require PHP5 as PHP4 is going to be masked. Fix adodb path |
37 |
+ (see Bug 194166) and jpgraph dependency accordingly. Make pkg_setup check |
38 |
+ all PHP use flags at once, remove reference to non-existant USE=apache, |
39 |
+ remove implicit system dependencies. Remove bogus media-libs/gd dependency. |
40 |
+ Fix truncated elog instructions. |
41 |
|
42 |
06 Sep 2007; Markus Ullmann <jokey@g.o> -base-1.2.7-r2.ebuild: |
43 |
Cleanup |
44 |
|
45 |
|
46 |
|
47 |
1.1 net-analyzer/base/base-1.3.8.ebuild |
48 |
|
49 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/base/base-1.3.8.ebuild?rev=1.1&view=markup |
50 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/base/base-1.3.8.ebuild?rev=1.1&content-type=text/plain |
51 |
|
52 |
Index: base-1.3.8.ebuild |
53 |
=================================================================== |
54 |
# Copyright 1999-2007 Gentoo Foundation |
55 |
# Distributed under the terms of the GNU General Public License v2 |
56 |
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/base/base-1.3.8.ebuild,v 1.1 2007/10/22 22:29:07 jokey Exp $ |
57 |
|
58 |
inherit webapp versionator eutils depend.apache depend.php |
59 |
|
60 |
CONF_DIR="/etc/${PN}" |
61 |
CONF_OLD="base_conf.php.dist" |
62 |
CONF_NEW="base_conf.php" |
63 |
MIDDLEMAN="base_path.php" |
64 |
DBTYPES="mssql mysql oracle postgres" |
65 |
|
66 |
DESCRIPTION="A web-based front-end to the Snort IDS." |
67 |
HOMEPAGE="http://base.secureideas.net" |
68 |
SRC_URI="mirror://sourceforge/secureideas/${P}.tar.gz |
69 |
signatures? ( http://www.snort.org/pub-bin/downloads.cgi/Download/vrt_pr/snortrules-pr-2.4.tar.gz )" |
70 |
|
71 |
LICENSE="GPL-2" |
72 |
KEYWORDS="~amd64 ~ppc ~x86" |
73 |
# SLOT is intentionally omitted because this package uses webapp-config |
74 |
IUSE="gd signatures ${DBTYPES}" |
75 |
|
76 |
# BASE *should* work with any php-driven web server, so only require Apache |
77 |
# when the user has an apache use-flag set. |
78 |
want_apache |
79 |
|
80 |
DEPEND=">=sys-libs/zlib-1.2.1-r3" |
81 |
RDEPEND="${DEPEND} |
82 |
dev-php/adodb |
83 |
gd? ( >=dev-php5/jpgraph-2.0_beta |
84 |
>=dev-php/PEAR-PEAR-1.3.6-r1 |
85 |
>=dev-php/PEAR-Image_Color-1.0.2 |
86 |
>=dev-php/PEAR-Log-1.9.3 |
87 |
>=dev-php/PEAR-Numbers_Roman-0.2.0 |
88 |
>=dev-php/PEAR-Numbers_Words-0.14.0 |
89 |
>=dev-php/PEAR-Image_Canvas-0.2.4 |
90 |
>=dev-php/PEAR-Image_Graph-0.7.1 )" |
91 |
# A local database isn't necessary, so only require one when the user |
92 |
# has use-flags set for one of the supported DBs. |
93 |
# Snort can also be installed on a remote system, so don't require it. |
94 |
|
95 |
# Require PHP. |
96 |
need_php5 |
97 |
|
98 |
pkg_setup() { |
99 |
webapp_pkg_setup |
100 |
|
101 |
# Set the group ownership for /etc/base/base_conf.php so it can be read by |
102 |
# the user's web server. |
103 |
if use apache2 ; then |
104 |
HTTPD_GROUP="apache" |
105 |
else |
106 |
# Set a safe default group. |
107 |
HTTPD_GROUP="root" |
108 |
fi |
109 |
|
110 |
# Check and setup selected DB type |
111 |
dbtypecnt=0 |
112 |
for db in ${DBTYPES}; do |
113 |
if use ${db}; then |
114 |
if [ ${dbtypecnt} -eq 0 ]; then |
115 |
BASE_DBTYPE=${db} |
116 |
let dbtypecnt++ |
117 |
elif [ ${dbtypecnt} -ge 1 ]; then |
118 |
ewarn "You set multiple database types in your USE flags." |
119 |
ewarn "You will have to setup DBtype configuration manually." |
120 |
fi |
121 |
fi |
122 |
done |
123 |
|
124 |
if [ ${dbtypecnt} -eq 0 ]; then |
125 |
ewarn "No database type selected in your USE flags." |
126 |
ewarn "You will have to setup DBtype manually." |
127 |
fi |
128 |
|
129 |
# Make sure php was built with the necessary USE flags. |
130 |
local flags=session |
131 |
for f in mssql mysql postgres ; do |
132 |
use ${f} && flags="${flags} ${f}" |
133 |
done |
134 |
|
135 |
if use oracle && ! built_with_use virtual/php oci8-instant-client ; then |
136 |
ewarn "PHP with oci8-instant-client support not found!" |
137 |
ewarn "It is your responsibility to ensure that PHP will work" |
138 |
ewarn "with commercial Oracle implementation." |
139 |
fi |
140 |
|
141 |
if ! PHPCHECKNODIE="yes" require_php_with_use ${flags} || \ |
142 |
( use gd && ! PHPCHECKNODIE="yes" require_php_with_any_use gd gd-external ) ; then |
143 |
eerror "Re-emerge ${PHP_PKG} with ${flags} USE flags enabled" |
144 |
use gd && eerror "as well as with either gd or gd-external USE flag enabled." |
145 |
die "Re-emerge ${PHP_PKG} with the above USE flags." |
146 |
fi |
147 |
} |
148 |
|
149 |
src_unpack() { |
150 |
unpack ${A} |
151 |
cd "${S}" |
152 |
|
153 |
# Help the user configure /etc/base/base_conf.php so BASE works out of the |
154 |
# box in most environments. The user will still be warned to edit the |
155 |
# file manually at the pkg_postinst() stage. |
156 |
sed -i -e 's:$BASE_urlpath.*:$BASE_urlpath = "/base";:g' \ |
157 |
${CONF_OLD} |
158 |
|
159 |
sed -i -e 's:$DBlib_path.*:$DBlib_path = "/usr/share/php5/adodb";:g' \ |
160 |
${CONF_OLD} |
161 |
|
162 |
if [[ "${BASE_DBTYPE}" == "postgres" ]]; then |
163 |
sed -i -e 's:$DBtype.*:$DBtype = "postgres";:g' \ |
164 |
${CONF_OLD} |
165 |
fi |
166 |
if [[ "${BASE_DBTYPE}" == "mssql" ]]; then |
167 |
sed -i -e 's:$DBtype.*:$DBtype = "mssql";:g' \ |
168 |
${CONF_OLD} |
169 |
fi |
170 |
if [[ "${BASE_DBTYPE}" == "oracle" ]]; then |
171 |
sed -i -e 's:$DBtype.*:$DBtype = "oci8";:g' \ |
172 |
${CONF_OLD} |
173 |
fi |
174 |
|
175 |
# Install the configuration files in the usual /etc/${PN} location so that |
176 |
# etc-update functions properly (it also improves security somewhat, since |
177 |
# the config file contains plain-text passwords and should not be located |
178 |
# inside the web-root). This requires changing the BASE source a tad to |
179 |
# recognize the new location for base_conf.php. |
180 |
for PHP in *.php */*.php; do |
181 |
sed -i -e "s:${CONF_NEW}:${MIDDLEMAN}:g" \ |
182 |
${CONF_OLD} "${PHP}" |
183 |
done |
184 |
|
185 |
# Create the file ${MIDDLEMAN} to determine the web-root and to change |
186 |
# the location of "include" to /etc/base/base_conf.php. |
187 |
echo "<?php" > ${MIDDLEMAN} |
188 |
echo ' $BASE_path = dirname(__FILE__);' >> ${MIDDLEMAN} |
189 |
echo " include(\"${CONF_DIR}/${CONF_NEW}\");" >> ${MIDDLEMAN} |
190 |
echo "?>" >> ${MIDDLEMAN} |
191 |
|
192 |
# Delete the $BASE_path variable from the config file because we |
193 |
# now handle it with ${MIDDLEMAN} created above. |
194 |
sed -i -e 's:$BASE_path =.*::g' ${CONF_OLD} |
195 |
|
196 |
# Modify the HTML headers so search engines don't index BASE. |
197 |
sed -i -e \ |
198 |
's:<HEAD>:<HEAD>\n <META name="robots" content="noindex,nofollow">:g' \ |
199 |
index.php |
200 |
sed -i -e \ |
201 |
's:<HEAD>:<HEAD>\n <META name="robots" content="noindex,nofollow">:g' \ |
202 |
base_main.php |
203 |
} |
204 |
|
205 |
src_install() { |
206 |
webapp_src_preinst |
207 |
|
208 |
# Install the docs once in the standard /usr/share/doc/${PF}/DOCDESTREE |
209 |
# location instead of installing them in every virtual host directory. |
210 |
cd docs |
211 |
dodoc * |
212 |
if use signatures ; then |
213 |
cd "${WORKDIR}" |
214 |
insinto ${MY_HTDOCSDIR}/signatures |
215 |
doins doc/signatures/* |
216 |
fi |
217 |
cd "${S}" |
218 |
rm -rf docs |
219 |
|
220 |
# Install the config files in the normal location (/etc/${PN}). |
221 |
insinto ${CONF_DIR} || die "Unable to insinto ${CONF_DIR}" |
222 |
doins ${CONF_OLD} || die "Unable to doins ${CONF_OLD}" |
223 |
newins ${CONF_OLD} ${CONF_NEW} || die "Unable to create ${CONF_NEW}" |
224 |
|
225 |
# Install BASE for webapp-config |
226 |
insinto ${MY_HTDOCSDIR} || die "Unable to insinto ${MY_HTDOCSDIR}" |
227 |
doins -r * |
228 |
|
229 |
webapp_src_install |
230 |
} |
231 |
|
232 |
pkg_postinst() { |
233 |
webapp_pkg_postinst |
234 |
|
235 |
# Set the proper permissions on /etc/base/base_conf.php |
236 |
chmod 640 ${CONF_DIR}/${CONF_NEW} || FPERMS="FALSE" |
237 |
chown root:${HTTPD_GROUP} ${CONF_DIR}/${CONF_NEW} || FOWNERS="FALSE" |
238 |
|
239 |
# Notify the user of any problems at the very end. |
240 |
if [ "${HTTPD_GROUP}" == "root" ]; then |
241 |
ewarn "" |
242 |
ewarn "It looks like you are not using Apache" |
243 |
ewarn "as your web server. For BASE to work properly, you will" |
244 |
ewarn "need to change the ownership of ${CONF_DIR}/${CONF_NEW} to" |
245 |
ewarn "root:[www user] To use Apache, add \"apache2\" to" |
246 |
ewarn "your USE flags and re-emerge BASE." |
247 |
fi |
248 |
if [ "${FPERMS}" == "FALSE" ]; then |
249 |
ewarn "" |
250 |
ewarn "Unable to change the permissions on ${CONF_DIR}/${CONF_NEW}". |
251 |
ewarn "Please change them manually by issuing:" |
252 |
ewarn "chmod 640 ${CONF_DIR}/${CONF_NEW}" |
253 |
fi |
254 |
if [ "${FOWNERS}" == "FALSE" ]; then |
255 |
ewarn "" |
256 |
ewarn "Unable to change the group ownership of the file:" |
257 |
ewarn "${CONF_DIR}/${CONF_NEW}" |
258 |
ewarn "Please change this manually by issuing:" |
259 |
ewarn "chown root:${HTTPD_GROUP} ${CONF_DIR}/${CONF_NEW}" |
260 |
fi |
261 |
|
262 |
elog "" |
263 |
elog "You should edit \"${CONF_DIR}/${CONF_NEW}\" before using BASE." |
264 |
elog "" |
265 |
elog "To setup your initial database, direct your web browser to the" |
266 |
elog "location you installed BASE/base_db_setup.php" |
267 |
elog "You can find instructions in /usr/share/doc/${PF}/README" |
268 |
elog "There is a guide at http://gentoo-wiki.com/HOWTO_Apache2_with_BASE" |
269 |
elog "" |
270 |
} |
271 |
|
272 |
|
273 |
|
274 |
-- |
275 |
gentoo-commits@g.o mailing list |