some fixes to dradis, initscript should work fine now, thanks etd

This commit is contained in:
jensp 2010-02-26 18:47:37 +00:00
parent 489c03e3aa
commit 0ea4d42470
5 changed files with 72 additions and 1 deletions

View file

@ -1,3 +1,6 @@
AUX dradis 53 RMD160 c980d725180463e509e9dc5737425ea1449b861d SHA1 1489757bb8f799d9293b10ab815e01c1832237b4 SHA256 9aad347cc0dcc5bf3560ae203ab983ce614e257f6426a726f350228522460857
AUX dradis-path-fixes.patch 1038 RMD160 c407bcf8d1692a9595071c35b3b6f89093f1dbf4 SHA1 98443dee07b3e226c8f826f49cd7375bc70cde6d SHA256 cd5a1e767b59b03596686050f67749cc3448e13029493433f12b3b323794931b
AUX dradis.confd 191 RMD160 23b741545da0cfd823121f5452e37ebeb2c0aadb SHA1 00b3c1f465e446fea8faaf485446078da5beebef SHA256 98db4a8326ea5fa705dfafbcf23af2005d80fa7f7c65b7f217de312515fdf023
AUX dradis.initd 635 RMD160 2eb55f27a5bb5d9d50b5f8d4a46f96d349b1a9fe SHA1 791de9d6a23f844d947725743a3effaa3c06630b SHA256 10c68b14b0552b8e316c14c3d113368b89893d19f7fc84b73dd17e5e81bbc4be
DIST dradis-v2.5.0.tar.bz2 4275261 RMD160 89fa28f9114ea599acf65ef6ad63aeefca8440ce SHA1 bb4dbabcd72acc4a0a99f0c597d01e2d4f1ca106 SHA256 419930b6d9a997ba8a49b83d5a481633fed584b754510ce22fb0e8ee09fbb28b
EBUILD dradis-2.5.0.ebuild 894 RMD160 afedc122815472630e687a74494ae220db90907d SHA1 57954c952be48c2e0b54a2b883967d01e72f1c4a SHA256 7a1069bea4bdc343b63fcc9698ae2a09ca923115a5f3f476521c5965d0d5759b
EBUILD dradis-2.5.0.ebuild 1076 RMD160 37315efad30b1149e14da9aef8b14c675ae9d416 SHA1 f29875d5af9e1d6d827257388e17e752221dd7b7 SHA256 7dc6a7d2b9a7f1297b5bf1d8ed3a9001734b8e4d4750849418dc031067e63166

View file

@ -2,6 +2,10 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
inherit eutils
DESCRIPTION="A framework for effective information sharing"
HOMEPAGE="http://dradisframework.org/"
SRC_URI="mirror://sourceforge/$PN/$PN-v$PV.tar.bz2"
@ -19,11 +23,18 @@ RDEPEND="${DEPEND}"
S="${WORKDIR}/${PN}-2.5"
src_prepare() {
cd server
epatch "${FILESDIR}"/dradis-path-fixes.patch
}
src_install() {
insinto /usr/share/$PN
doins -r server/* || die "install failed"
dodoc readme.txt CHANGELOG
dosbin "${FILESDIR}"/$PN
newinitd "${FILESDIR}"/${PN}.initd $PN
newconfd "${FILESDIR}"/${PN}.confd $PN
}
pkg_postinst() {

View file

@ -0,0 +1,22 @@
--- vendor/rails/railties/lib/commands/server.rb (revision 1848)
+++ vendor/rails/railties/lib/commands/server.rb (working copy)
@@ -13,14 +13,17 @@
# Thin not available
end
+cert_file = File.join( File.dirname(__FILE__), '/../../../../../config/ssl/server.crt')
+key_file = File.join( File.dirname(__FILE__), '/../../../../../config/ssl/server.key.insecure')
+
options = {
:Port => 3004,
:Host => "127.0.0.1",
# Options for WEBrick SSL
:SSLEnable => true,
:SSLVerifyClient => OpenSSL::SSL::VERIFY_NONE,
- :SSLCertificate => OpenSSL::X509::Certificate.new(File.open('config/ssl/server.crt').read),
- :SSLPrivateKey => OpenSSL::PKey::RSA.new(File.open('config/ssl/server.key.insecure').read),
+ :SSLCertificate => OpenSSL::X509::Certificate.new(File.open( cert_file ).read),
+ :SSLPrivateKey => OpenSSL::PKey::RSA.new(File.open( key_file ).read),
:SSLCertName => [
[ 'CN', 'dradis.' + WEBrick::Utils::getservername ]
#[ 'O', 'dradis framework [dradis.sourceforge.net]'],

View file

@ -0,0 +1,8 @@
# /etc/conf.d/dradis: config file for /etc/init.d/dradis
# Bind to specified address
# You can set to 0.0.0.0 to accept requests anywhere
DRADIS_ADDRESS="localhost"
# Port
DRADIS_PORT=3000

View file

@ -0,0 +1,27 @@
#!/sbin/runscript
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
depend() {
need net
use mysql
}
start() {
ebegin "Starting dradis"
cd /usr/share/dradis/
start-stop-daemon --start --quiet \
--pidfile /usr/share/dradis/tmp/pids/server.pid \
--exec /usr/bin/ruby /usr/share/dradis/script/server -- \
--daemon --environment=production \
--binding=${DRADIS_ADDRESS} --port=${DRADIS_PORT}
eend $?
}
stop() {
ebegin "Stopping dradis"
cd /usr/share/dradis/
start-stop-daemon --stop --quiet --pidfile /usr/share/dradis/tmp/pids/server.pid
eend $?
}