aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2009-01-22 18:33:44 +0100
committerTomas Chvatal <scarabeus@gentoo.org>2009-01-22 18:33:44 +0100
commit97133c1160f37512ceade68f10ae7def54f7c203 (patch)
tree77a633a56591fbd25d218060abdff049599f009a /sci-misc
parentUpdate profiles/categories/ and add generate_tarball.sh for boinc (that (diff)
downloadsci-97133c1160f37512ceade68f10ae7def54f7c203.tar.gz
sci-97133c1160f37512ceade68f10ae7def54f7c203.tar.bz2
sci-97133c1160f37512ceade68f10ae7def54f7c203.zip
Update boinc-bin a bit, fixup initscript severly.
(Portage version: 2.2_rc20/git/Linux 2.6.27-gentoo x86_64) (Unsigned Manifest commit)
Diffstat (limited to 'sci-misc')
-rw-r--r--sci-misc/boinc-bin/Manifest10
-rw-r--r--sci-misc/boinc-bin/boinc-bin-6.4.5.ebuild32
-rw-r--r--sci-misc/boinc-bin/boinc-bin-6.5.0.ebuild32
-rw-r--r--sci-misc/boinc-bin/files/boinc.conf2
-rw-r--r--sci-misc/boinc-bin/files/boinc.init69
5 files changed, 76 insertions, 69 deletions
diff --git a/sci-misc/boinc-bin/Manifest b/sci-misc/boinc-bin/Manifest
index e63d3bd14..ccc6d658d 100644
--- a/sci-misc/boinc-bin/Manifest
+++ b/sci-misc/boinc-bin/Manifest
@@ -1,10 +1,10 @@
-AUX boinc.conf 711 RMD160 b6bb25b9d10cbefd3de5d653e701e056e2de4587 SHA1 570929cb4ed50d4fc4408624c4d0d330e208609c SHA256 032f07145ee230f069ffdc93befe90c047fba4314aedfc8024bdb44c06798e9e
-AUX boinc.init 2374 RMD160 34f304516481edc256c75d2404cb3d40d5cd9149 SHA1 3df001527051fab45b052dc62973f2ccb5606dd9 SHA256 f4952e273fee1416cbad8ec49503725df9ce80d59192e3c919e645b1d76b75f8
+AUX boinc.conf 706 RMD160 dc1a8faaabae2441bbaa23c4a07e9a1f9658ae38 SHA1 5239bdb08fb0ad16944ea68e8b54d3940ac3b091 SHA256 feac94f8f6a893f32908031d0df9dac0c7e0c65448b85c819ff0dd487b4b834a
+AUX boinc.init 2604 RMD160 1084e0c3d0cdedd02007e2fec4846d4eb68c9f84 SHA1 b0f9fdd87f6a3d913c5769219856f2c1b1693047 SHA256 75f1a644b7848f477f22308dfc59eb0fde7aa42cf0c43220cbbb6fb00ce389bf
DIST boinc_6.4.5_i686-pc-linux-gnu.sh 4371490 RMD160 cb7687c806f8eb2d2ed974908048be1a057524ec SHA1 32eab0dfd0abcad56d2a4bbbf6a53ac8673a7e8d SHA256 b45884ee6b1f7c1299345f3db06dd368264d0af18d0361d6925eda6688e60778
DIST boinc_6.4.5_x86_64-pc-linux-gnu.sh 4575051 RMD160 992df581e95d847a36f50bf2595862f53fb712ad SHA1 8ba3ae6e62485f61d0bdeae9aa161d2c1c827b79 SHA256 3471710ff8c25f2c1788f18bbdab057c8a762847862058962bb809b7cdf2fd7d
DIST boinc_6.5.0_i686-pc-linux-gnu.sh 4316989 RMD160 6cc83e70f8c4e93aa172fa0c466ac57a40e8a8ca SHA1 0be2d32a894f92f9103f2d2137b3b08c077f1d27 SHA256 baf6aa638d7043f030b7779a73865465476fa7f85ee38b6118371b13522d2aa4
DIST boinc_6.5.0_x86_64-pc-linux-gnu.sh 4508531 RMD160 51105fa10b9bd0902e43059567ebe74ad9f3e457 SHA1 25c17f60c399c45e3f09333f640c9900f6621af6 SHA256 18a0dc70bb561f8dbfd1b79fb8aa5b5352a04d8428db1d4e539a94ebf1fac7f3
-EBUILD boinc-bin-6.4.5.ebuild 3589 RMD160 d1a65bbb30a454f4ec4139e3491f3ef6201a8ff1 SHA1 2b4e87530938a5be6ededb076270ca968dcce2f0 SHA256 663180661db307023c647b85e1837cb315f3395facfd128ca17f35059095b578
-EBUILD boinc-bin-6.5.0.ebuild 3589 RMD160 d1a65bbb30a454f4ec4139e3491f3ef6201a8ff1 SHA1 2b4e87530938a5be6ededb076270ca968dcce2f0 SHA256 663180661db307023c647b85e1837cb315f3395facfd128ca17f35059095b578
-MISC ChangeLog 447 RMD160 900aad404fa8e1b4b35c004101b9c88f4f00d7a1 SHA1 f46c2b2ba4b9a5c97eac1a5d6021e011d144bb9f SHA256 aa6cd5ad442ac76abec472965099cafb1d3be361688854b51cfff7948762082f
+EBUILD boinc-bin-6.4.5.ebuild 3560 RMD160 c715d24690b651255b44cbececc83049def76200 SHA1 ff4d8be5bf0f0e69c1c01f7a2aa402a5307a43d1 SHA256 621150db5d6cc2f36b0734f968b365087833a4c6905f5dc50b87ad136ac0d12b
+EBUILD boinc-bin-6.5.0.ebuild 3560 RMD160 c715d24690b651255b44cbececc83049def76200 SHA1 ff4d8be5bf0f0e69c1c01f7a2aa402a5307a43d1 SHA256 621150db5d6cc2f36b0734f968b365087833a4c6905f5dc50b87ad136ac0d12b
+MISC ChangeLog 626 RMD160 09dd1ff94c710736e2ac3464eb42822f3ad12cd8 SHA1 0124f2145944cf711d35295e88caa5b173a2076d SHA256 c672c430a73d9aa81b7e4b60523cbc330cba0016571cf0bb4655a7a978676154
MISC metadata.xml 250 RMD160 5bf897b41e46e6c42952eebb58c4857207ea43b2 SHA1 09fb670253158d6b85c1dd75da137c02c814cbc4 SHA256 58a285ae4d3dcbc187c68a22ce84ca0b8e23ea78616f5a11cfebf4d928773977
diff --git a/sci-misc/boinc-bin/boinc-bin-6.4.5.ebuild b/sci-misc/boinc-bin/boinc-bin-6.4.5.ebuild
index 163e165a6..3a70b8784 100644
--- a/sci-misc/boinc-bin/boinc-bin-6.4.5.ebuild
+++ b/sci-misc/boinc-bin/boinc-bin-6.4.5.ebuild
@@ -80,19 +80,17 @@ src_install() {
fi
# use correct path in scripts
sed -i \
- -e "s:${S}:/var/lib/${MY_PN}:g" \
- -e "s:./${MY_PN}:/opt/${MY_PN}/${MY_PN}:g" \
- run_client || die "sed run_client failed"
- sed -i \
- -e "s:${S}:/var/lib/${MY_PN}:g" \
+ -e "s:${S}:/opt/${MY_PN}/:g" \
-e "s:./${MY_PN}mgr:/opt/${MY_PN}/${MY_PN}mgr:g" \
run_manager || die "sed run_manager failed"
# install binaries
exeopts -m0755
exeinto /opt/${MY_PN}
- doexe "${S}"/{${MY_PN},${MY_PN}cmd,${MY_PN}mgr,run_client,run_manager}
- fowners 0:${MY_PN} /opt/${MY_PN}/{${MY_PN},${MY_PN}cmd,${MY_PN}mgr,run_client,run_manager}
+ doexe "${S}"/{${MY_PN},${MY_PN}cmd,${MY_PN}mgr,run_manager}
+ fowners 0:${MY_PN} /opt/${MY_PN}/{${MY_PN},${MY_PN}cmd,${MY_PN}mgr,run_manager}
+ # symlink the important ones to the /opt/bin/
+ dosym /opt/${MY_PN}/run_manager /opt/bin/boinc
# locale
mkdir -p "${D}"/opt/${MY_PN}/locale
insopts -m0644
@@ -101,9 +99,6 @@ src_install() {
for LNG in ${LINGUAS}; do
doins -r "${LNG}"
done
- dosym /opt/${MY_PN}/locale /var/lib/${MY_PN}/locale
- cd "${S}"
- dosym /etc/ssl/certs/ca-certificates.crt /var/lib/${MY_PN}/ca-bundle.crt
}
pkg_preinst() {
@@ -114,16 +109,19 @@ pkg_preinst() {
pkg_postinst() {
echo
elog "You are using the binary distributed version."
- elog "The manager can be found at /opt/${MY_PN}/run_manager"
- echo
+ elog "The manager can be found at /opt/bin/${MY_PN}"
+ elog
elog "You need to attach to a project to do anything useful with ${MY_PN}."
elog "You can do this by running /etc/init.d/${MY_PN} attach"
- elog "${MY_PN} The howto for configuration is located at:"
+ elog "The howto for configuration is located at:"
elog "http://${MY_PN}.berkeley.edu/anonymous_platform.php"
- echo
+ elog
# Add warning about the new password for the client, bug 121896.
- elog "If you need to use the graphical client the password is in"
+ elog "If you need to use the graphical client the password is in:"
elog "/var/lib/${MY_PN}/gui_rpc_auth.cfg"
- elog "You should change this to something more memorable (can be blank)."
- echo
+ elog "Where /var/lib/ is default RUNTIMEDIR, that can be changed in:"
+ elog "/etc/conf.d/${MY_PN}"
+ elog "You should change this to something more memorable (can be even blank)."
+ elog
+ elog "Remember to launch init script before using manager. Or changing the password."
}
diff --git a/sci-misc/boinc-bin/boinc-bin-6.5.0.ebuild b/sci-misc/boinc-bin/boinc-bin-6.5.0.ebuild
index 163e165a6..3a70b8784 100644
--- a/sci-misc/boinc-bin/boinc-bin-6.5.0.ebuild
+++ b/sci-misc/boinc-bin/boinc-bin-6.5.0.ebuild
@@ -80,19 +80,17 @@ src_install() {
fi
# use correct path in scripts
sed -i \
- -e "s:${S}:/var/lib/${MY_PN}:g" \
- -e "s:./${MY_PN}:/opt/${MY_PN}/${MY_PN}:g" \
- run_client || die "sed run_client failed"
- sed -i \
- -e "s:${S}:/var/lib/${MY_PN}:g" \
+ -e "s:${S}:/opt/${MY_PN}/:g" \
-e "s:./${MY_PN}mgr:/opt/${MY_PN}/${MY_PN}mgr:g" \
run_manager || die "sed run_manager failed"
# install binaries
exeopts -m0755
exeinto /opt/${MY_PN}
- doexe "${S}"/{${MY_PN},${MY_PN}cmd,${MY_PN}mgr,run_client,run_manager}
- fowners 0:${MY_PN} /opt/${MY_PN}/{${MY_PN},${MY_PN}cmd,${MY_PN}mgr,run_client,run_manager}
+ doexe "${S}"/{${MY_PN},${MY_PN}cmd,${MY_PN}mgr,run_manager}
+ fowners 0:${MY_PN} /opt/${MY_PN}/{${MY_PN},${MY_PN}cmd,${MY_PN}mgr,run_manager}
+ # symlink the important ones to the /opt/bin/
+ dosym /opt/${MY_PN}/run_manager /opt/bin/boinc
# locale
mkdir -p "${D}"/opt/${MY_PN}/locale
insopts -m0644
@@ -101,9 +99,6 @@ src_install() {
for LNG in ${LINGUAS}; do
doins -r "${LNG}"
done
- dosym /opt/${MY_PN}/locale /var/lib/${MY_PN}/locale
- cd "${S}"
- dosym /etc/ssl/certs/ca-certificates.crt /var/lib/${MY_PN}/ca-bundle.crt
}
pkg_preinst() {
@@ -114,16 +109,19 @@ pkg_preinst() {
pkg_postinst() {
echo
elog "You are using the binary distributed version."
- elog "The manager can be found at /opt/${MY_PN}/run_manager"
- echo
+ elog "The manager can be found at /opt/bin/${MY_PN}"
+ elog
elog "You need to attach to a project to do anything useful with ${MY_PN}."
elog "You can do this by running /etc/init.d/${MY_PN} attach"
- elog "${MY_PN} The howto for configuration is located at:"
+ elog "The howto for configuration is located at:"
elog "http://${MY_PN}.berkeley.edu/anonymous_platform.php"
- echo
+ elog
# Add warning about the new password for the client, bug 121896.
- elog "If you need to use the graphical client the password is in"
+ elog "If you need to use the graphical client the password is in:"
elog "/var/lib/${MY_PN}/gui_rpc_auth.cfg"
- elog "You should change this to something more memorable (can be blank)."
- echo
+ elog "Where /var/lib/ is default RUNTIMEDIR, that can be changed in:"
+ elog "/etc/conf.d/${MY_PN}"
+ elog "You should change this to something more memorable (can be even blank)."
+ elog
+ elog "Remember to launch init script before using manager. Or changing the password."
}
diff --git a/sci-misc/boinc-bin/files/boinc.conf b/sci-misc/boinc-bin/files/boinc.conf
index 223b160b4..884189a37 100644
--- a/sci-misc/boinc-bin/files/boinc.conf
+++ b/sci-misc/boinc-bin/files/boinc.conf
@@ -8,7 +8,7 @@ GROUP="boinc"
RUNTIMEDIR="/var/lib/boinc"
# Location of the boinc command line binary
-BOINCBIN="/usr/bin/boinc_client"
+BOINCBIN="/opt/boinc/boinc"
# Logfile (/dev/null for nowhere)
LOGFILE="/var/log/boinc.log"
diff --git a/sci-misc/boinc-bin/files/boinc.init b/sci-misc/boinc-bin/files/boinc.init
index 0c769f955..775a5c478 100644
--- a/sci-misc/boinc-bin/files/boinc.init
+++ b/sci-misc/boinc-bin/files/boinc.init
@@ -3,39 +3,50 @@
opts="${opts} attach"
depend() {
- use dns
- need net
+ # we can use dns and net, but we can also in most cases live without them
+ use dns net
}
-start() {
- ebegin "Starting BOINC"
- if [ ! -d ${RUNTIMEDIR} ]; then
- einfo "Directory ${RUNTIMEDIR} not existing, creating now."
- /bin/mkdir ${RUNTIMEDIR}
- /bin/chown ${USER}:${GROUP} ${RUNTIMEDIR}
- if [ ! -d ${RUNTIMEDIR} ]; then
- eerror "Directory ${RUNTIMEDIR} could not be created!"
+create_work_directory() {
+ if [[ ! -d $RUNTIMEDIR ]]; then
+ einfo "Directory $RUNTIMEDIR not existing, creating now."
+ mkdir $RUNTIMEDIR
+ chown ${USER}:${GROUP} $RUNTIMEDIR
+ if [[ ! -d $RUNTIMEDIR ]]; then
+ eeror "Directory $RUNTIMEDIR could not be created!"
return 1
fi
fi
+}
+
+generate_logs() {
+ if [[ ! -f $LOGFILE ]]; then
+ einfo "No $LOGFILE around. Creating new..."
+ einfo "For good log rotation is great tool app-admin/logrotate"
+ touch ${LOGFILE}
+ chown ${USER}:${GROUP} ${LOGFILE}
+ fi
+}
+
+start() {
+ ebegin "Starting BOINC"
+
+ create_work_directory
cd ${RUNTIMEDIR}
if [ ! -f lockfile ]; then
einfo "File ${RUNTIMEDIR}/lockfile does not exist, assuming first run."
- einfo "You need to setup an account on the BOINC project homepage beforehand! Go to http://boinc.berkeley.edu/ and locate your project."
- einfo "Then either run /etc/init.d/boinc attach or connect with a gui client and attach to a project with that."
+ einfo "You need to setup an account on the BOINC project homepage beforehand!"
+ einfo "Go to http://boinc.berkeley.edu/ and locate your project."
+ einfo "Then either run /etc/init.d/boinc attach or connect with a gui client"
+ einfo "and attach to a project with that."
+ echo
+ ewarn "Note that for attaching to some project you need your network up and running."
+ ewarn "network is needed only for jobs fetching afterwards"
fi
- # if the log file doesn't exist, create it with root privs, then change ownership to boinc
- if [ ! -f ${LOGFILE} ]; then
- touch ${LOGFILE}
- chown ${USER}:${GROUP} ${LOGFILE}
- else
- mv ${LOGFILE} ${LOGFILE}.old
- touch ${LOGFILE}
- chown ${USER}:${GROUP} ${LOGFILE}
- fi
+ generate_logs
if [ ${ALLOW_REMOTE_RPC} = "yes" ]; then
ARGS="${ARGS} -allow_remote_gui_rpc"
@@ -49,14 +60,14 @@ start() {
--exec ${BOINCBIN} --chuid ${USER}:${GROUP} \
--background --stdout ${LOGFILE} --stderr ${LOGFILE} \
--nicelevel ${NICELEVEL} -- ${ARGS}
+ # FIXME: no logs here?
RESULT=$?
if [ "${CPU_SHARE}" -a -d /sys/kernel/uids ]; then
BUID=`id -u ${USER}`
# It might take a moment for start-stop-daemon to chuid
- [ -d /sys/kernel/uids/${BUID} ] || sleep 1
- [ -d /sys/kernel/uids/${BUID} ] || sleep 2
+ [ -d /sys/kernel/uids/${BUID} ] || sleep 5 # 5 was working always here
if [ -w /sys/kernel/uids/${BUID}/cpu_share ]; then
echo ${CPU_SHARE} > /sys/kernel/uids/${BUID}/cpu_share
fi
@@ -72,23 +83,23 @@ attach() {
read key
RC_QUIET_STDOUT="yes" svc_status
- if [ $? == 1 ]; then
+ if [[ $? = 1 ]]; then
svc_start
fi
ebegin "Attaching to project"
# we have to work in runtime directory
- cd ${RUNTIMEDIR}
- # boinc cmd does not return 1 when it fails currently
- boinc_cmd --project_attach ${url} ${key} &> /dev/null
+ cd $RUNTIMEDIR
+ # boinc does not return 1 when it fails currently
+ $BOINCBIN --attach_project $url $key &> /dev/null
eend $?
sleep 10
- tail ${LOGFILE}
+ tail $LOGFILE
}
stop() {
ebegin "Stopping BOINC"
- start-stop-daemon --stop --retry 3 --quiet --exec ${BOINCBIN}
+ start-stop-daemon --stop --retry 3 --quiet --exec $BOINCBIN
eend $?
}