diff options
author | Daniel Pielmeier <billie@gentoo.org> | 2010-10-26 21:52:31 +0000 |
---|---|---|
committer | Daniel Pielmeier <billie@gentoo.org> | 2010-10-26 21:52:31 +0000 |
commit | 92b3c92ae9f9b58e08951103bb3314e8a85beabd (patch) | |
tree | 3a5cb7d7dbf8004b18ecdf1bb4a4ab344a83fdd6 /www-misc | |
parent | Add patch to fix build errors with recent versions of ffmpeg (bug #341927 by ... (diff) | |
download | historical-92b3c92ae9f9b58e08951103bb3314e8a85beabd.tar.gz historical-92b3c92ae9f9b58e08951103bb3314e8a85beabd.tar.bz2 historical-92b3c92ae9f9b58e08951103bb3314e8a85beabd.zip |
Revision bump. Fixes bug #342801. Thanks Diego E. 'Flameeyes' Pettenò for reporting. Also fix some long overdue QA issues reported by Christophe LEFEBVRE from the same bug. Init script now uses install instead of ch*. SSL certificates are now removed after package removal.
Package-Manager: portage-2.1.8.3/cvs/Linux i686
Diffstat (limited to 'www-misc')
-rw-r--r-- | www-misc/vdradmin-am/ChangeLog | 11 | ||||
-rw-r--r-- | www-misc/vdradmin-am/Manifest | 4 | ||||
-rw-r--r-- | www-misc/vdradmin-am/files/vdradmin-3.6.7.init | 52 | ||||
-rw-r--r-- | www-misc/vdradmin-am/vdradmin-am-3.6.7-r1.ebuild | 167 |
4 files changed, 232 insertions, 2 deletions
diff --git a/www-misc/vdradmin-am/ChangeLog b/www-misc/vdradmin-am/ChangeLog index e846bae8c1d4..7d4381a90164 100644 --- a/www-misc/vdradmin-am/ChangeLog +++ b/www-misc/vdradmin-am/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for www-misc/vdradmin-am # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-misc/vdradmin-am/ChangeLog,v 1.14 2010/07/18 13:23:01 billie Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-misc/vdradmin-am/ChangeLog,v 1.15 2010/10/26 21:52:31 billie Exp $ + +*vdradmin-am-3.6.7-r1 (26 Oct 2010) + + 26 Oct 2010; Daniel Pielmeier <billie@gentoo.org> + +vdradmin-am-3.6.7-r1.ebuild, +files/vdradmin-3.6.7.init: + Revision bump. Fixes bug #342801. Thanks Diego E. 'Flameeyes' Pettenò for + reporting. Also fix some long overdue QA issues reported by Christophe + LEFEBVRE from the same bug. Init script now uses install instead of ch*. + SSL certificates are now removed after package removal. 18 Jul 2010; Daniel Pielmeier <billie@gentoo.org> -files/confd-2, -vdradmin-am-3.6.4-r1.ebuild, -files/vdradmin-4, diff --git a/www-misc/vdradmin-am/Manifest b/www-misc/vdradmin-am/Manifest index 833dbd024113..ddb089aaf1ae 100644 --- a/www-misc/vdradmin-am/Manifest +++ b/www-misc/vdradmin-am/Manifest @@ -1,7 +1,9 @@ AUX vdradmin-3.6.6.conf 512 RMD160 a293a685c79a3f0fd7eb8c82662d789a3089d2bf SHA1 38ad0d0a7c7c5eefb1b063d2f881720df4462bb8 SHA256 7621749f8bc17b44c036a8f7b592be8fef18e21ce44c4ca2719cf7fb28258df4 AUX vdradmin-3.6.6.init 1959 RMD160 2a4266e43687d785789494dda40503d3744693d3 SHA1 f6e045cf76484c1385dc2bf71999506780f16a60 SHA256 ff747908e4bbd93502b17c5547d5436363d9d799c48eb7257de7897a5e7e9688 AUX vdradmin-3.6.6.logrotate 116 RMD160 bf4e29e03b515306521a9e5c8e20445622ff4ea0 SHA1 99d26a22124c7d3821b4871fc3aa5914b90b97c0 SHA256 2eb705ff7ab186d2a0287d3e91afe7d59be39f896fd9a62d875d8f13db1312af +AUX vdradmin-3.6.7.init 1754 RMD160 3c8dcda67cc5a4c6168636616f2a422b478fd6b2 SHA1 5b7d253980ef0a256d39b2c9a57d72927d9d03aa SHA256 767c0f5c4b0c529d1856f4138bc1be68f5a07f1301cd14fdea87cd23b3da1f3a DIST vdradmin-am-3.6.7.tar.bz2 545850 RMD160 d48dea7caf30716d2dac4132612160d1c35fa596 SHA1 68c380ed038a36968c72fb5462eaebb2f97eb61d SHA256 48fb4edb16f65e7f340bd57b4d205c1718e37f40d22bf3a76515812f3f45b39b +EBUILD vdradmin-am-3.6.7-r1.ebuild 4742 RMD160 abe786b3ad137a65e965ed7776f42e297d0d73ee SHA1 14f863ad173898e1c23cfc3d134b54464dd2eaed SHA256 75836edbd1d7061e7c05d66a0360f75f6f47977b8f45df94c0977f184b320a55 EBUILD vdradmin-am-3.6.7.ebuild 4448 RMD160 6b825213dafb8a42d364acd93dc6f8adc5b680fc SHA1 91974c6b6c932ad3a65016a253121c8d39a4cdad SHA256 574f27152c931e76598e56cbe74f7abbb7f9833b107ed43e3db40a08fdb1d948 -MISC ChangeLog 8907 RMD160 6231619e2a1896d79bd6af7514f49cbe377204f8 SHA1 74da517d584fe75c9d4a319ad3a1be33b98ce9b5 SHA256 9a0f50d49c0a6b4ffcc416fef28e6c507ecb6ec3da7ecbe5ccd799092c39614e +MISC ChangeLog 9340 RMD160 c6a6b9375df438db7e721e8c91be35f2c5b54779 SHA1 9ffdcb22bd309657ea6b491ebbccb641a577d150 SHA256 88cb33c6a5ac2fe2dfac1924d8ddce413b019e35429c6d4e1a23e91110b3963c MISC metadata.xml 748 RMD160 ce0254901737f368bfeb829b70d30c271c25bf14 SHA1 0ba36d4140d383486008e64ac7b9c84ce4c73cc6 SHA256 eb1d48cf2b7dfb0b9810fb1ce3c76fdd25c00fd1e4a93dfdf4b89b04f8024470 diff --git a/www-misc/vdradmin-am/files/vdradmin-3.6.7.init b/www-misc/vdradmin-am/files/vdradmin-3.6.7.init new file mode 100644 index 000000000000..b2ce999eb687 --- /dev/null +++ b/www-misc/vdradmin-am/files/vdradmin-3.6.7.init @@ -0,0 +1,52 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/www-misc/vdradmin-am/files/vdradmin-3.6.7.init,v 1.1 2010/10/26 21:52:31 billie Exp $ + +depend() { + use vdr +} + +start() { + ebegin "Starting vdradmin" + + : ${VDRADMIN_USER:=vdradmin} + + local dir vdradmin_opts + + # Prepare directories + for dir in cache log run; do + [ ! -d /var/${dir}/vdradmin ] && checkpath -d -m 0755 -o ${VDRADMIN_USER}:vdradmin "/var/${dir}/vdradmin" + done + + if [ "${SSL}" = "yes" ]; then vdradmin_opts="${vdradmin_opts} --ssl"; fi + if [ "${IPV6}" = "yes" ]; then vdradmin_opts="${vdradmin_opts} --ipv6"; fi + vdradmin_opts="${vdradmin_opts} --log ${LOGLEVEL:=4}" + + if [ "${LOGGING}" = "syslog" ]; then + sed -i -e "/LOGGING/s-LOGGING.*-LOGGING = 1-" /etc/vdradmin/vdradmind.conf + sed -i -e "/LOGFILE/s-LOGFILE.*-LOGFILE = syslog-" /etc/vdradmin/vdradmind.conf + elif [ "${LOGGING}" = "file" ]; then + sed -i -e "/LOGGING/s-LOGGING.*-LOGGING = 1-" /etc/vdradmin/vdradmind.conf + sed -i -e "/LOGFILE/s-LOGFILE.*-LOGFILE = vdradmind.log-" /etc/vdradmin/vdradmind.conf + else + sed -i -e "/LOGGING/s-LOGGING.*-LOGGING = 0-" /etc/vdradmin/vdradmind.conf + fi + + if [ -n "${RC_UNAME}" ]; then + # running on baselayout-2/openrc + start-stop-daemon --start --background --user "${VDRADMIN_USER}" \ + --pidfile /var/run/vdradmin/vdradmind.pid \ + --exec /usr/bin/perl /usr/bin/vdradmind -- ${vdradmin_opts} + else + start-stop-daemon --start --background --chuid "${VDRADMIN_USER}" \ + --exec /usr/bin/vdradmind -- ${vdradmin_opts} + fi + eend $? +} + +stop() { + ebegin "Stopping vdradmin" + start-stop-daemon --stop --quiet --pidfile /var/run/vdradmin/vdradmind.pid + eend $? +} diff --git a/www-misc/vdradmin-am/vdradmin-am-3.6.7-r1.ebuild b/www-misc/vdradmin-am/vdradmin-am-3.6.7-r1.ebuild new file mode 100644 index 000000000000..e2a1cab4456a --- /dev/null +++ b/www-misc/vdradmin-am/vdradmin-am-3.6.7-r1.ebuild @@ -0,0 +1,167 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-misc/vdradmin-am/vdradmin-am-3.6.7-r1.ebuild,v 1.1 2010/10/26 21:52:31 billie Exp $ + +EAPI=2 + +inherit eutils ssl-cert + +DESCRIPTION="WWW Admin for the Video Disk Recorder" +HOMEPAGE="http://andreas.vdr-developer.org/vdradmin-am/index.html" +SRC_URI="http://andreas.vdr-developer.org/download/${P}.tar.bz2" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ipv6 ssl +vdr" + +DEPEND="dev-lang/perl + dev-perl/Template-Toolkit + dev-perl/libwww-perl + dev-perl/URI + dev-perl/Locale-gettext + virtual/perl-IO-Compress + ipv6? ( dev-perl/IO-Socket-INET6 ) + ssl? ( dev-perl/IO-Socket-SSL ) + vdr? ( media-video/vdr ) + perl-core/libnet + dev-perl/Authen-SASL + dev-perl/Digest-HMAC" +RDEPEND="${DEPEND}" + +ETC_DIR=/etc/vdradmin +CERTS_DIR=/etc/vdradmin/certs +LIB_DIR=/usr/share/vdradmin +CACHE_DIR=/var/cache/vdradmin +VDRADMIN_USER=vdradmin +VDRADMIN_GROUP=vdradmin + +create_ssl_cert() { + # The ssl-cert eclass is not flexible enough so do some steps manually + SSL_ORGANIZATION="${SSL_ORGANIZATION:-vdradmin-am}" + SSL_COMMONNAME="${SSL_COMMONNAME:-`hostname -f`}" + + gen_cnf || return 1 + + gen_key 1 || return 1 + gen_csr 1 || return 1 + gen_crt 1 || return 1 +} + +pkg_setup() { + enewgroup ${VDRADMIN_GROUP} + enewuser ${VDRADMIN_USER} -1 /bin/bash ${CACHE_DIR} ${VDRADMIN_GROUP} + + if ! use vdr; then + elog + elog "You can run ${PN} outside a vdr install. For minimal" + elog "functionality you need access to the epg.data file of your VDR." + fi +} + +src_prepare() { + sed -i vdradmind.pl \ + -e "/COMPILE_DIR/s-/tmp-${CACHE_DIR}-" \ + -e "s-FILES_IN_SYSTEM = 0;-FILES_IN_SYSTEM = 1;-g" || die +} + +src_install() { + newinitd "${FILESDIR}"/vdradmin-${PV}.init vdradmin || die + newconfd "${FILESDIR}"/vdradmin-3.6.6.conf vdradmin || die + + insinto /etc/logrotate.d + newins "${FILESDIR}"/vdradmin-3.6.6.logrotate vdradmin || die + + newbin vdradmind.pl vdradmind || die + + insinto ${LIB_DIR}/template + doins -r "${S}"/template/* || die + + insinto ${LIB_DIR}/lib/Template/Plugin + doins -r "${S}"/lib/Template/Plugin/JavaScript.pm || die + + insinto /usr/share/locale/ + doins -r "${S}"/locale/* || die + + newman vdradmind.pl.1 vdradmind.8 || die + + dodoc CREDITS HISTORY INSTALL README* REQUIREMENTS FAQ ChangeLog || die + docinto contrib + dodoc "${S}"/contrib/* || die + + diropts "-m755 -o ${VDRADMIN_USER} -g ${VDRADMIN_GROUP}" + keepdir ${ETC_DIR} + use ssl && keepdir ${CERTS_DIR} +} + +pkg_preinst() { + if [[ -f "${ROOT}"${ETC_DIR}/vdradmind.conf ]]; then + cp "${ROOT}"${ETC_DIR}/vdradmind.conf "${D}"${ETC_DIR}/vdradmind.conf || die + else + elog + elog "Creating a new config-file." + echo + + install -m 0644 -o ${VDRADMIN_USER} -g ${VDRADMIN_GROUP} /dev/null "${D}"${ETC_DIR}/vdradmind.conf || die + + cat <<-EOF > "${D}"${ETC_DIR}/vdradmind.conf + VDRCONFDIR = "${ROOT%/}"/etc/vdr + VIDEODIR = "${ROOT%/}"/var/vdr/video + EPG_FILENAME = "${ROOT%/}"/var/vdr/video/epg.data + EPGIMAGES = "${ROOT%/}"/var/vdr/video/epgimages + PASSWORD = gentoo-vdr + USERNAME = gentoo-vdr + EOF + # Feed it with newlines + yes "" \ + | "${D}"/usr/bin/vdradmind --cfgdir "${D}"${ETC_DIR} --config \ + |sed -e 's/: /: \n/g' + + [[ ${PIPESTATUS[1]} == "0" ]] || die "Failed to create initial configuration." + + elog + elog "Created default user/password: gentoo-vdr/gentoo-vdr" + elog + elog "You can run \"emerge --config ${PN}\" if the default-values" + elog "do not match your installation or change them in the Setup-Menu" + elog "of the Web-Interface." + fi +} + +pkg_postinst() { + if use ipv6; then + elog + elog "To make use of the ipv6 protocol" + elog "you need to enable it in ${ROOT%/}/etc/conf.d/vdradmin" + fi + + if use ssl; then + elog + elog "To use ssl connection to your vdr" + elog "you need to enable it in ${ROOT%/}/etc/conf.d/vdradmin" + + if [[ ! -f "${ROOT}"${CERTS_DIR}/server-cert.pem || \ + ! -f "${ROOT}"${CERTS_DIR}/server-key.pem ]]; then + create_ssl_cert + local base=$(get_base 1) + install -D -m 0400 -o ${VDRADMIN_USER} -g ${VDRADMIN_GROUP} "${base}".key "${ROOT}"${CERTS_DIR}/server-key.pem || die + install -D -m 0444 -o ${VDRADMIN_USER} -g ${VDRADMIN_GROUP} "${base}".crt "${ROOT}"${CERTS_DIR}/server-cert.pem || die + fi + fi + + elog + elog "To extend ${PN} you can emerge" + elog ">=media-plugins/vdr-epgsearch-0.9.25 to search the EPG," + elog "media-plugins/vdr-streamdev for livetv streaming and/or" + elog "media-video/vdr with USE=\"liemikuutio\" to rename recordings" + elog "on the machine running the VDR you connect to with ${PN}." +} + +pkg_postrm() { + rm -f "${ROOT}"${CERTS_DIR}/server-{cert,key}.pem + rmdir --ignore-fail-on-non-empty "${ROOT}"${CERTS_DIR} +} + +pkg_config() { + "${ROOT}"/usr/bin/vdradmind -c +} |