Ticket #42857: patch-base-Portfile.diff
File patch-base-Portfile.diff, 3.7 KB (added by jul_bsd@…, 11 years ago) |
---|
-
Portfile
old new 3 3 PortSystem 1.0 4 4 5 5 name base 6 version 1. 3.96 version 1.4.5 7 7 categories security 8 8 maintainers markd 9 9 description Basic Analysis and Security Engine - Snort web frontend … … 11 11 project. It provides a web front-end to query and analyze \ 12 12 the alerts from SNORT. 13 13 platforms darwin 14 homepage http:// secureideas.sourceforge.net/14 homepage http://base.professionallyevil.com/ 15 15 master_sites sourceforge:secureideas 16 checksums md5 66e50f45c6bbf6b0cb2913b8c67f50d6 16 checksums rmd160 e66552039a806d09db40f1e7f363b2cd68cde064 \ 17 sha256 23910f5277ceb43398442074e444182941bf7f6da85efd84ecdd0cf62c4b8935 17 18 depends_run port:gd2 \ 18 port:adodb 19 port:adodb \ 20 port:pear-Mail port:pear-Mail_Mime port:pear-Image_Graph \ 21 port:pear-Image_Canvas port:pear-Image_Color port:pear-Numbers_Roman 22 23 ## http://sourceforge.net/p/secureideas/patches/27/ 24 ## +mysql support through mysqli extension 25 patchfiles patch-base.diff 19 26 20 27 use_configure no 21 28 build {} 22 29 23 30 set basedir ${prefix}/share/${name} 31 #set basedir ${prefix}/www/${name} 24 32 set docsdir ${prefix}/share/doc/${name} 25 33 26 34 destroot { 27 35 xinstall -m 755 -d ${destroot}${basedir} 28 xinstall -m 755 -d ${destroot}${docsdir} 29 system "cd ${worksrcpath} && cp -R . ${destroot}${basedir}" 30 system "cd ${worksrcpath}/docs/ && cp -R . ${destroot}${docsdir}" 36 foreach file [glob -directory ${worksrcpath}/ *] { 37 copy ${file} ${destroot}${basedir}/ 38 } 39 40 reinplace "s|\$DBlib_path = '';|\$DBlib_path = '${prefix}/adodb5';|g" ${destroot}${basedir}/base_conf.php.dist 31 41 } 32 42 33 43 post-activate { 34 ui_msg "\n 35 Make sure to customize ${prefix}/share/base/base_conf.php.dist 36 \n" 44 ## Not sure if needed. If the file exists, wizard says you need to delete it 45 if ![file exists ${basedir}/base_conf.php ] { 46 copy ${basedir}/base_conf.php.dist ${basedir}/base_conf.php 47 } 37 48 } 49 50 notes " 51 **** To complete the ${name} installation **** 52 53 1) Install PHP and Database (not covered). 54 Database can be MySQL, PgSQL, MsSQL or Oracle 55 If you go for PHP 5.5 and FPM for example, you will need additionaly 56 $ sudo port install php55-fpm php55-pear 57 Edit your php.ini to include pear path 58 include_path = \".:/opt/local/lib/php\" 59 60 2) prepare database for ${name}. Example with Mysql 61 62 Create a snort MySQL user and snort database. 63 mysql5 -u root -p (login with root password set above when prompted) 64 mysql> GRANT ALL ON snort.* to snort@localhost; 65 mysql> SET PASSWORD FOR snort@localhost = PASSWORD('<my-snortdb-pwd>'); 66 mysql> flush privileges; 67 mysql> create database snort; 68 mysql> exit; 69 70 4) Edit ${basedir}/base_conf.php to match your config 71 OR 72 Call the wizard: 73 http://localhost/base/ 74 In this case, temporary 75 # chown #web_user# ${basedir} 76 And check your php install is at most warning log level in your php.ini 77 Remember after install to 78 # chown root ${basedir} 79 80 BUGS: lot of \"Strict Standards: Declaration \". wizard works but usage not sure. 81 Software is unmaintained for a long time, so check alternatives. 82 ex: 83 Strict Standards: Declaration of MultipleElementCriteria::SanitizeElement() should be compatible with BaseCriteria::SanitizeElement() in /opt/local/share/base/includes/base_state_citems.inc.php on line 292 84 " 85 86 livecheck.type regex 87 livecheck.url ${homepage} 88 livecheck.regex "Current Version: (\\d+(?:\\.\\d+)*)"