corrected permissions and path-settings in *d.ini-files.
This commit is contained in:
		| @@ -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.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 | 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 | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| --- setup.py.orig 2011-06-23 10:21:23.000000000 +0200 | --- /root/setup.py.org	2011-07-19 13:18:36.274866779 +0200 | ||||||
| +++ setup.py 2011-07-05 23:23:26.000000000 +0200 | +++ shinken-0.6.5/setup.py	2011-07-19 13:26:14.922605481 +0200 | ||||||
| @@ -174,9 +174,9 @@ | @@ -174,9 +174,9 @@ | ||||||
|              buf = f.read() |              buf = f.read() | ||||||
|              f.close |              f.close | ||||||
| @@ -13,7 +13,7 @@ | |||||||
|              # write out the new file |              # write out the new file | ||||||
|              f = open(outfile, "w") |              f = open(outfile, "w") | ||||||
|              f.write(buf) |              f.write(buf) | ||||||
| @@ -192,21 +192,21 @@ | @@ -192,21 +192,19 @@ | ||||||
|          for name in daemon_ini_files: |          for name in daemon_ini_files: | ||||||
|              inname = os.path.join('etc', name) |              inname = os.path.join('etc', name) | ||||||
|              outname = os.path.join(self.build_dir, name) |              outname = os.path.join(self.build_dir, name) | ||||||
| @@ -30,15 +30,15 @@ | |||||||
|               |               | ||||||
|              # but we have to force the user/group & workdir values still: |              # but we have to force the user/group & workdir values still: | ||||||
|              append_file_with(inname, outname, """ |              append_file_with(inname, outname, """ | ||||||
|  user=%s | -user=%s | ||||||
|  group=%s | -group=%s | ||||||
|  workdir=%s |  workdir=%s | ||||||
| -""" % ( self.owner, self.group, self.var_path, )) | -""" % ( 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 |          # And now the resource.cfg path with the value of libexec path | ||||||
|          # Replace the libexec path by the one in the parameter file |          # 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) |              log.info('updating path in %s', outname) | ||||||
|              update_file_with_string(inname, outname, |              update_file_with_string(inname, outname, | ||||||
|                                      "/usr/local/shinken/libexec", |                                      "/usr/local/shinken/libexec", | ||||||
| @@ -47,7 +47,7 @@ | |||||||
|   |   | ||||||
|          # And update the nagios.cfg file for all /usr/local/shinken/var |          # And update the nagios.cfg file for all /usr/local/shinken/var | ||||||
|          # value with good one |          # 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)  |                  ## nagios.cfg & shinken-specific use now relative paths (relative to the "VAR" one)  | ||||||
|                  update_file_with_string(inname, outname, |                  update_file_with_string(inname, outname, | ||||||
|                                      "/usr/local/shinken/var", |                                      "/usr/local/shinken/var", | ||||||
| @@ -56,7 +56,7 @@ | |||||||
|               |               | ||||||
|              ## but we HAVE to set the shinken_user & shinken_group to thoses requested : |              ## but we HAVE to set the shinken_user & shinken_group to thoses requested : | ||||||
|              append_file_with(inname, outname, """ |              append_file_with(inname, outname, """ | ||||||
| @@ -416,7 +416,7 @@ | @@ -416,7 +414,7 @@ | ||||||
|          }, |          }, | ||||||
|         |         | ||||||
|          name = "Shinken", |          name = "Shinken", | ||||||
| @@ -65,7 +65,7 @@ | |||||||
|          packages = find_packages(), |          packages = find_packages(), | ||||||
|          package_data = {'':['*.py','modules/*.py','modules/*/*.py']}, |          package_data = {'':['*.py','modules/*.py','modules/*/*.py']}, | ||||||
|          description = "Shinken is a monitoring tool compatible with Nagios configuration and plugins", |          description = "Shinken is a monitoring tool compatible with Nagios configuration and plugins", | ||||||
| @@ -484,29 +484,6 @@ | @@ -484,29 +482,6 @@ | ||||||
|                  glob('etc/certs/[!_]*.pem') |                  glob('etc/certs/[!_]*.pem') | ||||||
|              ), |              ), | ||||||
|               |               | ||||||
| @@ -95,4 +95,3 @@ | |||||||
|              ( |              ( | ||||||
|                  default_paths['libexec'], ['libexec/check.sh'] |                  default_paths['libexec'], ['libexec/check.sh'] | ||||||
|              ), |              ), | ||||||
|  |  | ||||||
|   | |||||||
| @@ -5,8 +5,6 @@ | |||||||
|  |  | ||||||
| MODULE=${SVCNAME#*.} | MODULE=${SVCNAME#*.} | ||||||
| _MODULE=$(echo $MODULE | awk '{print toupper($0)}') | _MODULE=$(echo $MODULE | awk '{print toupper($0)}') | ||||||
| SHINKEN=/usr/bin/shinken |  | ||||||
| PIDPATH=/var/run/shinken |  | ||||||
| PIDFILE=${PIDPATH}/${MODULE} | PIDFILE=${PIDPATH}/${MODULE} | ||||||
|  |  | ||||||
| LANG=en_US.UTF8 | LANG=en_US.UTF8 | ||||||
| @@ -18,14 +16,10 @@ SHINKENM="/usr/bin/shinken-${MODULE}" | |||||||
| if [ $MODULE = "arbiter" ]; then | if [ $MODULE = "arbiter" ]; then | ||||||
| 	CONFIGFILE="${SHINKENCFG} --config ${SHINKENSPECIFICCFG}" | 	CONFIGFILE="${SHINKENCFG} --config ${SHINKENSPECIFICCFG}" | ||||||
| fi | fi | ||||||
| NEED="net" | PIDFILE=$(grep '^pidfile=' ${CONFIGFILE} | awk -F= '{ print $2 }') | ||||||
|  |  | ||||||
| depend() { | depend() { | ||||||
| 	if [ $SVCNAME = "shinken" ]; then | 	need net | ||||||
| 		NEED="$NEED shinken.arbiter shinken.broker shinken.scheduler" |  | ||||||
| 		ebegin "show $NEED" |  | ||||||
| 	fi |  | ||||||
| 	need $NEED |  | ||||||
| } | } | ||||||
|  |  | ||||||
| start() { | start() { | ||||||
| @@ -34,7 +28,7 @@ start() { | |||||||
| 		return 0 | 		return 0 | ||||||
| 	fi | 	fi | ||||||
| 	ebegin "starting shinken ${MODULE}" | 	ebegin "starting shinken ${MODULE}" | ||||||
| 	start-stop-daemon --start --exec ${SHINKENM} --pidfile "${PIDFILE}" \ |  	start-stop-daemon --start --exec ${SHINKENM} --pidfile ${PIDFILE} \ | ||||||
| 	   -- --config ${CONFIGFILE} --daemon | 	   -- --config ${CONFIGFILE} --daemon | ||||||
| 	eend $? | 	eend $? | ||||||
| } | } | ||||||
|   | |||||||
| @@ -4,7 +4,6 @@ | |||||||
|  |  | ||||||
| EAPI=3 | EAPI=3 | ||||||
| PYTHON_DEPEND="2:2.6" | PYTHON_DEPEND="2:2.6" | ||||||
| SUPPORT_PYTHON_ABIS="1" |  | ||||||
| RESTRICT_PYTHON_ABIS="3.* *-jython" | RESTRICT_PYTHON_ABIS="3.* *-jython" | ||||||
|  |  | ||||||
| inherit distutils eutils python | inherit distutils eutils python | ||||||
| @@ -34,7 +33,6 @@ src_unpack() { | |||||||
| 	unpack ${A} | 	unpack ${A} | ||||||
| 	cd ${S} | 	cd ${S} | ||||||
| 	epatch "${FILESDIR}/${P}.patch" | 	epatch "${FILESDIR}/${P}.patch" | ||||||
| 	rm bin/*.py |  | ||||||
| } | } | ||||||
|  |  | ||||||
| pkg_setup() { | pkg_setup() { | ||||||
| @@ -44,19 +42,33 @@ pkg_setup() { | |||||||
| } | } | ||||||
|  |  | ||||||
| src_prepare() { | src_prepare() { | ||||||
| #	python_convert_shebangs -r 2 .  | 	# remove unneded doubletts | ||||||
| 	distutils_src_prepare | 	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() { | src_install() { | ||||||
| 	distutils_src_install | 	distutils_src_install | ||||||
| 	# remove windows-specific configs | 	# remove windows-specific configs | ||||||
| 	rm ${D}/etc/${PN}/*-windows.ini | 	rm ${D}/etc/${PN}/*-windows.ini | ||||||
|  | 	rm -rf ${D}$(python_get_sitedir)/skonf | ||||||
|  |  | ||||||
| 	keepdir /var/lib/${PN} | 	keepdir /var/lib/${PN} | ||||||
| 	fowners shinken:shinken "/var/lib/${PN}" | 	fowners shinken:shinken "/var/lib/${PN}" | ||||||
| 	fperms 750 "/var/lib/${PN}" | 	fperms 750 "/var/lib/${PN}" | ||||||
| 	keepdir "/var/run/${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" | 	insinto "/usr/lib/nagios/plugins" | ||||||
| 	doins libexec/*.sh libexec/*.py | 	doins libexec/*.sh libexec/*.py | ||||||
| 	dobin bin/nagios | 	dobin bin/nagios | ||||||
| @@ -73,11 +85,3 @@ src_install() { | |||||||
| 	done | 	done | ||||||
| } | } | ||||||
|  |  | ||||||
| pkg_postinst() { |  | ||||||
| 	distutils_pkg_postinst |  | ||||||
| } |  | ||||||
|  |  | ||||||
| pkg_postrm() { |  | ||||||
| 	distutils_pkg_postrm |  | ||||||
| } |  | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user