diff --git a/net-analyzer/shinken/Manifest b/net-analyzer/shinken/Manifest index 8af87ad..af0b8d9 100644 --- a/net-analyzer/shinken/Manifest +++ b/net-analyzer/shinken/Manifest @@ -1,5 +1,5 @@ -AUX shinken-0.6.5.patch 4010 RMD160 8745a2ee5b4518b057435b5b9fd4ebe178fdbfa4 SHA1 c127e342efc8f6275dee554b74e119c6c639611f SHA256 d362348cdf3d0f1c4cb4eb47b858f3cf3590c3310767e3c11931324298196721 +AUX shinken-0.6.5.patch 4004 RMD160 5e96245063b4ecf078387ea5e544e660b69589e5 SHA1 7a74294471276b24b8717252bb71a0eeb99ed16f SHA256 f76cf0a99d8787f80ba498acbd5aeb6651a588fc5f75c4d765d572400f3ea053 AUX shinken.confd 2041 RMD160 618a2fa8ba16c052445d23f136a6ac7b685e89bb SHA1 22c2eb50379cb604055bef76cdfc443d7514436a SHA256 512d72af135fb74678f0ad42c5cd8d5125de3c77c2adcba7317c3fed316db6f3 -AUX shinken.initd 1032 RMD160 5b54862ad20a0a99f4f06cf25f0b192220d9f949 SHA1 1e49b43e1041da45535b577882036341f8d4b39f SHA256 0c60299d88218ec8f7c6937c93fa84fc6f72cb498d0b85ead80fcf9bfc793579 +AUX shinken.initd 1195 RMD160 55cbf11743613b5d0fbdf6096e0d2fb7cb556c3c SHA1 813d3a5c7318d1cd347733957ca198c13a6aa99f SHA256 22f0d6e3d49cc9795e1c8a612fb7b23999d90e945dab391bdc8af230b56558d5 DIST shinken-0.6.5.tar.gz 5155015 RMD160 73d3646d092aa0d92474b31257b8c73c252dbc19 SHA1 62ee08fb290570484cb50979ed75791cd83a6a18 SHA256 ff08fb8a9ec669732316d3b2bd4423572efc2123482cbb8128b71c08aad64deb -EBUILD shinken-0.6.5.ebuild 1805 RMD160 d1d49126a5d0f4476d66cf464ae5c176848855a0 SHA1 459755dfc403a38569eee1dade32b865cf4145c3 SHA256 7f9175614018fe7a5018a8c12f21a689417dc38f5c0b33212835bdd19f4a94d8 +EBUILD shinken-0.6.5.ebuild 2241 RMD160 da0b87126ac63840dcd3c29b62cd3f74291d49f4 SHA1 cb1b94518f77262534826469315b6c3b05941d8c SHA256 5aaaaad1d02189d62dac3ce2b93cbdb229920b84018fb755a86d376b07285a6b diff --git a/net-analyzer/shinken/files/shinken-0.6.5.patch b/net-analyzer/shinken/files/shinken-0.6.5.patch index 174ba8f..4000a35 100644 --- a/net-analyzer/shinken/files/shinken-0.6.5.patch +++ b/net-analyzer/shinken/files/shinken-0.6.5.patch @@ -1,5 +1,5 @@ ---- setup.py.orig 2011-06-23 10:21:23.000000000 +0200 -+++ setup.py 2011-07-05 23:23:26.000000000 +0200 +--- /root/setup.py.org 2011-07-19 13:18:36.274866779 +0200 ++++ shinken-0.6.5/setup.py 2011-07-19 13:26:14.922605481 +0200 @@ -174,9 +174,9 @@ buf = f.read() f.close @@ -13,7 +13,7 @@ # write out the new file f = open(outfile, "w") f.write(buf) -@@ -192,21 +192,21 @@ +@@ -192,21 +192,19 @@ for name in daemon_ini_files: inname = os.path.join('etc', name) outname = os.path.join(self.build_dir, name) @@ -30,15 +30,15 @@ # but we have to force the user/group & workdir values still: append_file_with(inname, outname, """ - user=%s - group=%s +-user=%s +-group=%s workdir=%s -""" % ( self.owner, self.group, self.var_path, )) -+""" % ( self.owner, self.group, "/var/lib/shinken", )) ++""" % ( "/var/lib/shinken", )) # And now the resource.cfg path with the value of libexec path # Replace the libexec path by the one in the parameter file -@@ -216,7 +216,7 @@ +@@ -216,7 +214,7 @@ log.info('updating path in %s', outname) update_file_with_string(inname, outname, "/usr/local/shinken/libexec", @@ -47,7 +47,7 @@ # And update the nagios.cfg file for all /usr/local/shinken/var # value with good one -@@ -230,7 +230,7 @@ +@@ -230,7 +228,7 @@ ## nagios.cfg & shinken-specific use now relative paths (relative to the "VAR" one) update_file_with_string(inname, outname, "/usr/local/shinken/var", @@ -56,7 +56,7 @@ ## but we HAVE to set the shinken_user & shinken_group to thoses requested : append_file_with(inname, outname, """ -@@ -416,7 +416,7 @@ +@@ -416,7 +414,7 @@ }, name = "Shinken", @@ -65,7 +65,7 @@ packages = find_packages(), package_data = {'':['*.py','modules/*.py','modules/*/*.py']}, description = "Shinken is a monitoring tool compatible with Nagios configuration and plugins", -@@ -484,29 +484,6 @@ +@@ -484,29 +482,6 @@ glob('etc/certs/[!_]*.pem') ), @@ -95,4 +95,3 @@ ( default_paths['libexec'], ['libexec/check.sh'] ), - diff --git a/net-analyzer/shinken/files/shinken.initd b/net-analyzer/shinken/files/shinken.initd index 2d42b12..04122d6 100644 --- a/net-analyzer/shinken/files/shinken.initd +++ b/net-analyzer/shinken/files/shinken.initd @@ -5,8 +5,6 @@ MODULE=${SVCNAME#*.} _MODULE=$(echo $MODULE | awk '{print toupper($0)}') -SHINKEN=/usr/bin/shinken -PIDPATH=/var/run/shinken PIDFILE=${PIDPATH}/${MODULE} LANG=en_US.UTF8 @@ -18,14 +16,10 @@ SHINKENM="/usr/bin/shinken-${MODULE}" if [ $MODULE = "arbiter" ]; then CONFIGFILE="${SHINKENCFG} --config ${SHINKENSPECIFICCFG}" fi -NEED="net" +PIDFILE=$(grep '^pidfile=' ${CONFIGFILE} | awk -F= '{ print $2 }') depend() { - if [ $SVCNAME = "shinken" ]; then - NEED="$NEED shinken.arbiter shinken.broker shinken.scheduler" - ebegin "show $NEED" - fi - need $NEED + need net } start() { @@ -34,7 +28,7 @@ start() { return 0 fi ebegin "starting shinken ${MODULE}" - start-stop-daemon --start --exec ${SHINKENM} --pidfile "${PIDFILE}" \ + start-stop-daemon --start --exec ${SHINKENM} --pidfile ${PIDFILE} \ -- --config ${CONFIGFILE} --daemon eend $? } diff --git a/net-analyzer/shinken/shinken-0.6.5.ebuild b/net-analyzer/shinken/shinken-0.6.5.ebuild index 993fa78..fe18d71 100644 --- a/net-analyzer/shinken/shinken-0.6.5.ebuild +++ b/net-analyzer/shinken/shinken-0.6.5.ebuild @@ -4,7 +4,6 @@ EAPI=3 PYTHON_DEPEND="2:2.6" -SUPPORT_PYTHON_ABIS="1" RESTRICT_PYTHON_ABIS="3.* *-jython" inherit distutils eutils python @@ -34,7 +33,6 @@ src_unpack() { unpack ${A} cd ${S} epatch "${FILESDIR}/${P}.patch" - rm bin/*.py } pkg_setup() { @@ -44,19 +42,33 @@ pkg_setup() { } src_prepare() { -# python_convert_shebangs -r 2 . - distutils_src_prepare + # remove unneded doubletts + rm bin/*.py + # fixing path + sed -i \ + -e "s:^\(# \?\)\?local_log=\(%(workdir)s/\)\?\(.\+\):local_log=/var/log/${PN}/\3:" \ + -e "s:^\(# \?\)\?workdir=\(.\+\):local_log=/var/lib/${PN}:" \ + -e "s:^\(# \?\)\?pidfile=\(%(workdir)s/\)\?\(.\+\):pidfile=/var/run/${PN}/\3:" \ + -e "s:^\(# \?\)\?user=\([^ ]\+\)\(.\+\)\?:user=\2:" \ + -e "s:^\(# \?\)\?group=\([^ ]\+\)\(.\+\)\?:group=\2:" \ + etc/*d.ini || die } src_install() { distutils_src_install # remove windows-specific configs rm ${D}/etc/${PN}/*-windows.ini + rm -rf ${D}$(python_get_sitedir)/skonf keepdir /var/lib/${PN} fowners shinken:shinken "/var/lib/${PN}" fperms 750 "/var/lib/${PN}" keepdir "/var/run/${PN}" + fowners shinken:shinken "/var/run/${PN}" + keepdir "/var/log/${PN}" + fowners shinken:shinken "/var/log/${PN}" + fperms 750 "/var/log/${PN}" + insinto "/usr/lib/nagios/plugins" doins libexec/*.sh libexec/*.py dobin bin/nagios @@ -73,11 +85,3 @@ src_install() { done } -pkg_postinst() { - distutils_pkg_postinst -} - -pkg_postrm() { - distutils_pkg_postrm -} -