summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2007-05-11 09:46:13 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2007-05-11 09:46:13 +0000
commit920d84e7b331e3ed74a311137cf2b0d610c2c3f7 (patch)
tree86e5d8beaff2e0e00514aa8789cb25b1464b410f /sys-power
parentAdd a patch to bring the 1.12 branch up to date with our svn which backports (diff)
downloadhistorical-920d84e7b331e3ed74a311137cf2b0d610c2c3f7.tar.gz
historical-920d84e7b331e3ed74a311137cf2b0d610c2c3f7.tar.bz2
historical-920d84e7b331e3ed74a311137cf2b0d610c2c3f7.zip
Bug #177767, nut now needs to be in the uucp group instead of the tty group due to changes in udev.
Package-Manager: portage-2.1.2.5
Diffstat (limited to 'sys-power')
-rw-r--r--sys-power/nut/ChangeLog8
-rw-r--r--sys-power/nut/Manifest25
-rw-r--r--sys-power/nut/files/digest-nut-2.0.5-r23
-rw-r--r--sys-power/nut/nut-2.0.5-r2.ebuild192
4 files changed, 213 insertions, 15 deletions
diff --git a/sys-power/nut/ChangeLog b/sys-power/nut/ChangeLog
index 342ccd5c812e..bb548eabf69c 100644
--- a/sys-power/nut/ChangeLog
+++ b/sys-power/nut/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-power/nut
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/ChangeLog,v 1.37 2007/04/28 17:27:04 tove Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/ChangeLog,v 1.38 2007/05/11 09:46:13 robbat2 Exp $
+
+*nut-2.0.5-r2 (11 May 2007)
+
+ 11 May 2007; Robin H. Johnson <robbat2@gentoo.org> +nut-2.0.5-r2.ebuild:
+ Bug #177767, nut now needs to be in the uucp group instead of the tty group
+ due to changes in udev.
28 Apr 2007; Torsten Veller <tove@gentoo.org> nut-2.0.0.ebuild,
nut-2.0.0-r1.ebuild, nut-2.0.1_pre4.ebuild, nut-2.0.3.ebuild,
diff --git a/sys-power/nut/Manifest b/sys-power/nut/Manifest
index acdfc198f56c..14fe2b849850 100644
--- a/sys-power/nut/Manifest
+++ b/sys-power/nut/Manifest
@@ -1,6 +1,3 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
AUX lighttpd_nut.conf 961 RMD160 636b45860713453dc88d7ed0392862735e329099 SHA1 1cde03638637f3b2e302ae939605f2f2b7f464fd SHA256 5604058313d3cfeba426c69a756944bc7cc3ddb3813db68582e69dff1a00f7cb
MD5 cb4007ab506c4c49dcf12a7a5516fff9 files/lighttpd_nut.conf 961
RMD160 636b45860713453dc88d7ed0392862735e329099 files/lighttpd_nut.conf 961
@@ -74,14 +71,18 @@ EBUILD nut-2.0.5-r1.ebuild 5058 RMD160 5c4d5594564f0c7499dd73874f54215e593c99ef
MD5 65ed72e38cb9cf832489668319eebe50 nut-2.0.5-r1.ebuild 5058
RMD160 5c4d5594564f0c7499dd73874f54215e593c99ef nut-2.0.5-r1.ebuild 5058
SHA256 8ac7876ae907fe50d77a2fada47017497a794719856ba178713afae467badd6e nut-2.0.5-r1.ebuild 5058
+EBUILD nut-2.0.5-r2.ebuild 5248 RMD160 8a02302130d18898ff56a1af9ba844994b12d501 SHA1 4e792bed491b1be443705ee44b8bbbbe8740d3b4 SHA256 e60236e1cf4f49578454e53a9ab29557bd461e9ea1daa7e7f83bd063c2c959d8
+MD5 ad1a8d06206d89e9bb6cfd3b2e4be51c nut-2.0.5-r2.ebuild 5248
+RMD160 8a02302130d18898ff56a1af9ba844994b12d501 nut-2.0.5-r2.ebuild 5248
+SHA256 e60236e1cf4f49578454e53a9ab29557bd461e9ea1daa7e7f83bd063c2c959d8 nut-2.0.5-r2.ebuild 5248
EBUILD nut-2.0.5.ebuild 4984 RMD160 faa56f58106e6024881155ca9f3d41072d3b4cc9 SHA1 4a189d673c0d4ccae991d6b0d039661efe764320 SHA256 6e953f6068a4d57be77a791eb5c7d188fbbab60d8993fd35a476c8e15b380f59
MD5 cc92e6192a34db3fb3561646f5477a6b nut-2.0.5.ebuild 4984
RMD160 faa56f58106e6024881155ca9f3d41072d3b4cc9 nut-2.0.5.ebuild 4984
SHA256 6e953f6068a4d57be77a791eb5c7d188fbbab60d8993fd35a476c8e15b380f59 nut-2.0.5.ebuild 4984
-MISC ChangeLog 12351 RMD160 5dd1048d53e9ffbd2272dd4e4f5d455a62eb12b5 SHA1 f8973005afadb5c80449b5f24bc00edf3b030476 SHA256 c881ba97afa9b501c375387f381095ec0bcfa62038523382322a079715221644
-MD5 14ecc5811c0ea2ec8f4938d467a8bf51 ChangeLog 12351
-RMD160 5dd1048d53e9ffbd2272dd4e4f5d455a62eb12b5 ChangeLog 12351
-SHA256 c881ba97afa9b501c375387f381095ec0bcfa62038523382322a079715221644 ChangeLog 12351
+MISC ChangeLog 12563 RMD160 88008ffbc65d242bea1b08ab79a64d60118f04d7 SHA1 ccc3adb99cb334583f8f2e856382964a75a88731 SHA256 c99babb3c4672f550b6f1d2aead4d5f4dd627127da6361ec8f72048f8090c40e
+MD5 c69cfaea9f7c6740488dfa4b7c6ce24d ChangeLog 12563
+RMD160 88008ffbc65d242bea1b08ab79a64d60118f04d7 ChangeLog 12563
+SHA256 c99babb3c4672f550b6f1d2aead4d5f4dd627127da6361ec8f72048f8090c40e ChangeLog 12563
MISC metadata.xml 219 RMD160 7737543ce33cd412792e332121aa1c6ed452adfc SHA1 6c360930b80d6f4168ba1a486a25ad176505ea63 SHA256 8b2ef93d0d6f03a1ad115651dc46a7752e7775a62a32a7046c3294e50b14725b
MD5 a961228140ef319b2ddba54d99b6e401 metadata.xml 219
RMD160 7737543ce33cd412792e332121aa1c6ed452adfc metadata.xml 219
@@ -113,10 +114,6 @@ SHA256 edfec92b45e8c6d3dff87771a2a0535666d38fdba5c150a00b518ee9f4fcdff3 files/di
MD5 270b9f0a8aca065d2bff7c6ed52c096d files/digest-nut-2.0.5-r1 229
RMD160 af5257a0dbc5ad3ba25177d900e971613d1d676e files/digest-nut-2.0.5-r1 229
SHA256 edfec92b45e8c6d3dff87771a2a0535666d38fdba5c150a00b518ee9f4fcdff3 files/digest-nut-2.0.5-r1 229
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.3 (GNU/Linux)
-
-iD8DBQFGM4PxV3J2n04EauwRAtZaAKDChi/H3jcmYOB+G8YoF96va1EniwCgyycb
-XVSEOSvbLB2h1vu5sZBto/E=
-=ENVY
------END PGP SIGNATURE-----
+MD5 270b9f0a8aca065d2bff7c6ed52c096d files/digest-nut-2.0.5-r2 229
+RMD160 af5257a0dbc5ad3ba25177d900e971613d1d676e files/digest-nut-2.0.5-r2 229
+SHA256 edfec92b45e8c6d3dff87771a2a0535666d38fdba5c150a00b518ee9f4fcdff3 files/digest-nut-2.0.5-r2 229
diff --git a/sys-power/nut/files/digest-nut-2.0.5-r2 b/sys-power/nut/files/digest-nut-2.0.5-r2
new file mode 100644
index 000000000000..782b3150a09e
--- /dev/null
+++ b/sys-power/nut/files/digest-nut-2.0.5-r2
@@ -0,0 +1,3 @@
+MD5 b08fde86191154bbcfda860f95a5dca2 nut-2.0.5.tar.gz 809006
+RMD160 e5f90a73932e038d3dfee8cb32faf097d99a7e0b nut-2.0.5.tar.gz 809006
+SHA256 5e1bfecfca528104db7025050c81258ee20620df7497ab5988ad461d951c8203 nut-2.0.5.tar.gz 809006
diff --git a/sys-power/nut/nut-2.0.5-r2.ebuild b/sys-power/nut/nut-2.0.5-r2.ebuild
new file mode 100644
index 000000000000..b116bb32270a
--- /dev/null
+++ b/sys-power/nut/nut-2.0.5-r2.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/nut-2.0.5-r2.ebuild,v 1.1 2007/05/11 09:46:13 robbat2 Exp $
+
+inherit eutils fixheadtails
+
+MY_P="${P/_/-}"
+
+DESCRIPTION="Network-UPS Tools"
+HOMEPAGE="http://www.networkupstools.org/"
+# Nut mirrors are presently broken
+#SRC_URI="mirror://nut/source/${PV%.*}/${MY_P}.tar.gz"
+SRC_URI="http://www.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz"
+
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="cgi snmp usb ssl"
+
+RDEPEND="cgi? ( >=media-libs/gd-2 )
+ snmp? ( net-analyzer/net-snmp )
+ usb? ( >=dev-libs/libusb-0.1.12 )
+ ssl? ( dev-libs/openssl )
+ !<sys-fs/udev-104"
+DEPEND="$RDEPEND
+ >=sys-apps/sed-4
+ >=sys-devel/autoconf-2.58"
+
+# public files should be 644 root:root
+NUT_PUBLIC_FILES="/etc/nut/{{hosts,upsset,ups,upssched}.conf,upsstats{,-single}.html}"
+# private files should be 640 root:nut - readable by nut, writeable by root,
+NUT_PRIVATE_FILES="/etc/nut/{upsd.conf,upsd.users,upsmon.conf}"
+
+pkg_setup() {
+ enewgroup nut 84
+ enewuser nut 84 -1 /var/state/nut nut,uucp
+ # As of udev-104, NUT must be in uucp and NOT in tty.
+ gpasswd -d nut tty
+ gpasswd -a nut uucp
+ # in some cases on old systems it wasn't in the nut group either!
+ gpasswd -a nut nut
+ warningmsg ewarn
+}
+
+src_unpack() {
+ unpack ${A}
+
+ EPATCH_OPTS="-p1 -d ${S}" epatch ${FILESDIR}/upsstats-upsset-link-2.0.5.patch
+ EPATCH_OPTS="-p1 -d ${S}" epatch ${FILESDIR}/nut-2.0.5-bcmxcp-3phase.patch
+
+ cd "${S}"
+
+ sed -e "s/install: install-dirs/install: install-dirs install-conf/" \
+ -i Makefile.in || die "sed failed"
+
+ ht_fix_file configure.in
+
+ sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \
+ -i configure.in || die "sed failed"
+
+ ebegin "Recreating configure"
+ WANT_AUTOCONF=2.5 autoconf || die "autoconf failed"
+ eend $?
+}
+
+src_compile() {
+ local myconf
+
+ if [ -n "${NUT_DRIVERS}" ]; then
+ myconf="${myconf} --with-drivers=${NUT_DRIVERS// /,}"
+ fi
+
+ econf \
+ --with-user=nut \
+ --with-group=nut \
+ --with-drvpath=/lib/nut \
+ --sysconfdir=/etc/nut \
+ --with-logfacility=LOG_DAEMON \
+ --with-statepath=/var/lib/nut \
+ $(use_with ssl) \
+ $(use_with cgi) \
+ $(use_with cgi cgipath /usr/share/nut) \
+ ${myconf} || die "econf failed"
+
+ emake || die "compile problem"
+
+ if use snmp; then
+ emake snmp || die "snmp compile problem"
+ fi
+
+ if use usb; then
+ emake usb || die "usb compile problem"
+ fi
+
+ if use cgi; then
+ emake cgi || die "cgi compile problem"
+ fi
+}
+
+src_install() {
+ make DESTDIR="${D}" install install-lib || die "make install failed"
+
+ dodir /sbin
+ dosym /lib/nut/upsdrvctl /sbin/upsdrvctl
+ # This needs to exist for the scripts
+ dosym /lib/nut/upsdrvctl /usr/sbin/upsdrvctl
+
+ if use snmp; then
+ make DESTDIR="${D}" install-snmp || die "make install-snmp failed"
+ fi
+
+ if use usb; then
+ make DESTDIR="${D}" install-usb || die "make install-usb failed"
+ fi
+
+ if use cgi; then
+ make DESTDIR="${D}" install-cgi || die "make install-cgi failed"
+ make DESTDIR="${D}" install-cgi-conf || die "make install-cgi-conf failed"
+ einfo "CGI monitoring scripts are installed in /usr/share/nut."
+ einfo "copy them to your web server's ScriptPath to activate."
+ einfo "If you use lighttpd, see lighttpd_nut.conf in the documentation."
+ fi
+
+ # this must be done after all of the install phases
+ for i in "${D}"/etc/nut/*.sample ; do
+ mv "${i}" "${i/.sample/}"
+ done
+
+
+ dodoc ChangeLog CREDITS INSTALL MAINTAINERS NEWS README UPGRADING \
+ docs/{FAQ,*.txt}
+
+ newdoc lib/README README.lib
+
+ dodoc ${FILESDIR}/lighttpd_nut.conf
+
+ docinto cables
+ dodoc docs/cables/*
+
+
+ newinitd "${FILESDIR}/upsd.rc6" upsd
+ newinitd "${FILESDIR}/upsdrv.rc6-r1" upsdrv
+ newinitd "${FILESDIR}/upsmon.rc6" upsmon
+
+ # This sets up permissions for nut to access a UPS
+ insinto /etc/udev/rules.d/
+ newins scripts/hotplug-ng/nut-usbups.rules 70-nut-usbups.rules
+
+ keepdir /var/lib/nut
+
+ fperms 0700 /var/lib/nut
+ fowners nut:nut /var/lib/nut
+
+ eval fperms 0640 ${NUT_PRIVATE_FILES}
+ eval fowners root:nut ${NUT_PRIVATE_FILES}
+
+ eval fperms 0644 ${NUT_PUBLIC_FILES}
+ eval fowners root:root ${NUT_PUBLIC_FILES}
+
+ # this is installed for 2.4 and fbsd guys
+ if ! has_version sys-fs/udev; then
+ insinto /etc/hotplug/usb
+ insopts -m 755
+ doins scripts/hotplug-ng/nut-usbups.hotplug
+ fi
+}
+
+pkg_postinst() {
+ # this is to ensure that everybody that installed old versions still has
+ # correct permissions
+ chown nut:nut ${ROOT}/var/lib/nut 2>/dev/null
+ chmod 0700 ${ROOT}/var/lib/nut 2>/dev/null
+
+ eval chown root:nut ${ROOT}${NUT_PRIVATE_FILES} 2>/dev/null
+ eval chmod 0640 ${ROOT}${NUT_PRIVATE_FILES} 2>/dev/null
+
+ eval chown root:root ${ROOT}${NUT_PUBLIC_FILES} 2>/dev/null
+ eval chmod 0644 ${ROOT}${NUT_PUBLIC_FILES} 2>/dev/null
+
+ warningmsg elog
+}
+
+warningmsg() {
+ msgfunc="$1"
+ [ -z "$msgfunc" ] && die "msgfunc not specified in call to warningmsg!"
+ ${msgfunc} "Please note that NUT now runs under the 'nut' user."
+ ${msgfunc} "NUT is in the uucp group for access to RS-232 UPS."
+ ${msgfunc} "However if you use a USB UPS you may need to look at the udev or"
+ ${msgfunc} "hotplug rules that are installed, and alter them suitably."
+}