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