1 |
xmw 12/06/02 18:04:48 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: nut-2.6.3.ebuild |
5 |
Log: |
6 |
Version bump (bug 406099, thanks Matthew Stapleton and Guillaume Castagnino). Include ubuntus CVE-2012-2944.patch to fix bug 419377. |
7 |
|
8 |
(Portage version: 2.1.10.63/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.98 sys-power/nut/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-power/nut/ChangeLog?rev=1.98&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-power/nut/ChangeLog?rev=1.98&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-power/nut/ChangeLog?r1=1.97&r2=1.98 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sys-power/nut/ChangeLog,v |
20 |
retrieving revision 1.97 |
21 |
retrieving revision 1.98 |
22 |
diff -u -r1.97 -r1.98 |
23 |
--- ChangeLog 24 May 2012 05:46:03 -0000 1.97 |
24 |
+++ ChangeLog 2 Jun 2012 18:04:48 -0000 1.98 |
25 |
@@ -1,6 +1,13 @@ |
26 |
# ChangeLog for sys-power/nut |
27 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/ChangeLog,v 1.97 2012/05/24 05:46:03 vapier Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/ChangeLog,v 1.98 2012/06/02 18:04:48 xmw Exp $ |
30 |
+ |
31 |
+*nut-2.6.3 (02 Jun 2012) |
32 |
+ |
33 |
+ 02 Jun 2012; Michael Weber <xmw@g.o> +nut-2.6.3.ebuild, |
34 |
+ +files/nut-2.6.3-CVE-2012-2944.patch: |
35 |
+ Version bump (bug 406099, thanks Matthew Stapleton and Guillaume Castagnino). |
36 |
+ Include ubuntus CVE-2012-2944.patch to fix bug 419377. |
37 |
|
38 |
24 May 2012; Mike Frysinger <vapier@g.o> nut-2.6.0-r1.ebuild, |
39 |
nut-2.6.2.ebuild: |
40 |
|
41 |
|
42 |
|
43 |
1.1 sys-power/nut/nut-2.6.3.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-power/nut/nut-2.6.3.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-power/nut/nut-2.6.3.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: nut-2.6.3.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2012 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/nut-2.6.3.ebuild,v 1.1 2012/06/02 18:04:48 xmw Exp $ |
53 |
|
54 |
EAPI=2 |
55 |
inherit autotools bash-completion eutils fixheadtails multilib user |
56 |
|
57 |
MY_P=${P/_/-} |
58 |
|
59 |
DESCRIPTION="Network-UPS Tools" |
60 |
HOMEPAGE="http://www.networkupstools.org/" |
61 |
# Nut mirrors are presently broken |
62 |
SRC_URI="http://random.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz |
63 |
http://www.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz" |
64 |
|
65 |
LICENSE="GPL-2" |
66 |
SLOT="0" |
67 |
KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" |
68 |
IUSE="avahi cgi snmp usb ssl tcpd xml" |
69 |
|
70 |
RDEPEND="avahi? ( net-dns/avahi ) |
71 |
cgi? ( >=media-libs/gd-2[png] ) |
72 |
snmp? ( net-analyzer/net-snmp ) |
73 |
usb? ( virtual/libusb:0 ) |
74 |
ssl? ( >=dev-libs/openssl-1 ) |
75 |
tcpd? ( sys-apps/tcp-wrappers ) |
76 |
xml? ( >=net-libs/neon-0.25.0 ) |
77 |
>=sys-fs/udev-114" |
78 |
DEPEND="$RDEPEND |
79 |
>=sys-apps/sed-4 |
80 |
virtual/pkgconfig" |
81 |
|
82 |
S=${WORKDIR}/${MY_P} |
83 |
|
84 |
# public files should be 644 root:root |
85 |
NUT_PUBLIC_FILES="/etc/nut/{ups,upssched}.conf" |
86 |
# private files should be 640 root:nut - readable by nut, writeable by root, |
87 |
NUT_PRIVATE_FILES="/etc/nut/{upsd.conf,upsd.users,upsmon.conf}" |
88 |
# public files should be 644 root:root, only installed if USE=cgi |
89 |
NUT_CGI_FILES="/etc/nut/{{hosts,upsset}.conf,upsstats{,-single}.html}" |
90 |
|
91 |
pkg_setup() { |
92 |
enewgroup nut 84 |
93 |
enewuser nut 84 -1 /var/lib/nut nut,uucp |
94 |
# As of udev-104, NUT must be in uucp and NOT in tty. |
95 |
gpasswd -d nut tty 2>/dev/null |
96 |
gpasswd -a nut uucp 2>/dev/null |
97 |
# in some cases on old systems it wasn't in the nut group either! |
98 |
gpasswd -a nut nut 2>/dev/null |
99 |
warningmsg ewarn |
100 |
} |
101 |
|
102 |
src_prepare() { |
103 |
ht_fix_file configure.in |
104 |
|
105 |
epatch "${FILESDIR}"/${PN}-2.4.1-no-libdummy.patch |
106 |
epatch "${FILESDIR}"/${PN}-2.6.2-lowspeed-buffer-size.patch |
107 |
epatch "${FILESDIR}"/${PN}-2.6.3-CVE-2012-2944.patch |
108 |
|
109 |
sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \ |
110 |
-i configure.in || die |
111 |
|
112 |
sed -e "s:52.nut-usbups.rules:70-nut-usbups.rules:" \ |
113 |
-i scripts/udev/Makefile.am || die |
114 |
|
115 |
rm -f ltmain.sh m4/lt* m4/libtool.m4 |
116 |
|
117 |
sed -i \ |
118 |
-e 's:@LIBSSL_LDFLAGS@:@LIBSSL_LIBS@:' \ |
119 |
lib/libupsclient{.pc,-config}.in || die #361685 |
120 |
|
121 |
eautoreconf |
122 |
} |
123 |
|
124 |
src_configure() { |
125 |
local myconf |
126 |
|
127 |
if [ -n "${NUT_DRIVERS}" ]; then |
128 |
myconf="${myconf} --with-drivers=${NUT_DRIVERS// /,}" |
129 |
fi |
130 |
|
131 |
use cgi && myconf="${myconf} --with-cgipath=/usr/share/nut/cgi" |
132 |
|
133 |
# TODO: USE flag for sys-power/powerman |
134 |
econf \ |
135 |
--sysconfdir=/etc/nut \ |
136 |
--datarootdir=/usr/share/nut \ |
137 |
--datadir=/usr/share/nut \ |
138 |
--disable-static \ |
139 |
--with-dev \ |
140 |
$(use_with usb) \ |
141 |
--without-hal \ |
142 |
$(use_with snmp) \ |
143 |
$(use_with xml neon) \ |
144 |
--without-powerman \ |
145 |
$(use_with ssl) \ |
146 |
$(use_with tcpd wrap) \ |
147 |
$(use_with cgi) \ |
148 |
$(use_with avahi) \ |
149 |
--with-statepath=/var/lib/nut \ |
150 |
--with-drvpath=/$(get_libdir)/nut \ |
151 |
--with-htmlpath=/usr/share/nut/html \ |
152 |
--with-user=nut \ |
153 |
--with-group=nut \ |
154 |
--with-logfacility=LOG_DAEMON \ |
155 |
${myconf} |
156 |
} |
157 |
|
158 |
src_install() { |
159 |
emake DESTDIR="${D}" install || die |
160 |
|
161 |
find "${D}" -name '*.la' -exec rm -f {} + |
162 |
|
163 |
dodir /sbin |
164 |
dosym /$(get_libdir)/nut/upsdrvctl /sbin/upsdrvctl |
165 |
# This needs to exist for the scripts |
166 |
dosym /$(get_libdir)/nut/upsdrvctl /usr/sbin/upsdrvctl |
167 |
|
168 |
if use cgi; then |
169 |
elog "CGI monitoring scripts are installed in /usr/share/nut/cgi." |
170 |
elog "copy them to your web server's ScriptPath to activate (this is a" |
171 |
elog "change from the old location)." |
172 |
elog "If you use lighttpd, see lighttpd_nut.conf in the documentation." |
173 |
fi |
174 |
|
175 |
# this must be done after all of the install phases |
176 |
for i in "${D}"/etc/nut/*.sample ; do |
177 |
mv "${i}" "${i/.sample/}" |
178 |
done |
179 |
|
180 |
dodoc AUTHORS ChangeLog docs/*.txt MAINTAINERS NEWS README TODO UPGRADING || die |
181 |
|
182 |
newdoc lib/README README.lib || die |
183 |
newdoc "${FILESDIR}"/lighttpd_nut.conf-2.2.0 lighttpd_nut.conf || die |
184 |
|
185 |
docinto cables |
186 |
dodoc docs/cables/* || die |
187 |
|
188 |
newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsd upsd || die |
189 |
newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv || die |
190 |
newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsmon upsmon || die |
191 |
newinitd "${FILESDIR}"/nut.powerfail.initd nut.powerfail || die |
192 |
|
193 |
keepdir /var/lib/nut |
194 |
|
195 |
einfo "Setting up permissions on files and directories" |
196 |
fperms 0700 /var/lib/nut |
197 |
fowners nut:nut /var/lib/nut |
198 |
|
199 |
# Do not remove eval here, because the variables contain shell expansions. |
200 |
eval fperms 0640 ${NUT_PRIVATE_FILES} |
201 |
eval fowners root:nut ${NUT_PRIVATE_FILES} |
202 |
|
203 |
# Do not remove eval here, because the variables contain shell expansions. |
204 |
eval fperms 0644 ${NUT_PUBLIC_FILES} |
205 |
eval fowners root:root ${NUT_PUBLIC_FILES} |
206 |
|
207 |
# Do not remove eval here, because the variables contain shell expansions. |
208 |
if use cgi; then |
209 |
eval fperms 0644 ${NUT_CGI_FILES} |
210 |
eval fowners root:root ${NUT_CGI_FILES} |
211 |
fi |
212 |
|
213 |
# this is installed for 2.4 and fbsd guys |
214 |
if ! has_version sys-fs/udev; then |
215 |
einfo "Installing non-udev hotplug support" |
216 |
insinto /etc/hotplug/usb |
217 |
insopts -m 755 |
218 |
doins scripts/hotplug/nut-usbups.hotplug |
219 |
fi |
220 |
|
221 |
dobashcompletion "${S}"/scripts/misc/nut.bash_completion |
222 |
} |
223 |
|
224 |
pkg_postinst() { |
225 |
# this is to ensure that everybody that installed old versions still has |
226 |
# correct permissions |
227 |
|
228 |
chown nut:nut "${ROOT}"/var/lib/nut 2>/dev/null |
229 |
chmod 0700 "${ROOT}"/var/lib/nut 2>/dev/null |
230 |
|
231 |
# Do not remove eval here, because the variables contain shell expansions. |
232 |
eval chown root:nut "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null |
233 |
eval chmod 0640 "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null |
234 |
|
235 |
# Do not remove eval here, because the variables contain shell expansions. |
236 |
eval chown root:root "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null |
237 |
eval chmod 0644 "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null |
238 |
|
239 |
# Do not remove eval here, because the variables contain shell expansions. |
240 |
if use cgi; then |
241 |
eval chown root:root "${ROOT}"${NUT_CGI_FILES} 2>/dev/null |
242 |
eval chmod 0644 "${ROOT}"${NUT_CGI_FILES} 2>/dev/null |
243 |
fi |
244 |
|
245 |
warningmsg elog |
246 |
} |
247 |
|
248 |
warningmsg() { |
249 |
msgfunc="$1" |
250 |
[ -z "$msgfunc" ] && die "msgfunc not specified in call to warningmsg!" |
251 |
${msgfunc} "Please note that NUT now runs under the 'nut' user." |
252 |
${msgfunc} "NUT is in the uucp group for access to RS-232 UPS." |
253 |
${msgfunc} "However if you use a USB UPS you may need to look at the udev or" |
254 |
${msgfunc} "hotplug rules that are installed, and alter them suitably." |
255 |
${msgfunc} '' |
256 |
${msgfunc} "You are strongly advised to read the UPGRADING file provided by upstream." |
257 |
${msgfunc} '' |
258 |
${msgfunc} "Please note that upsdrv is NOT automatically started by upsd anymore." |
259 |
${msgfunc} "If you have multiple UPS units, you can use their NUT names to" |
260 |
${msgfunc} "have a service per UPS:" |
261 |
${msgfunc} "ln -s /etc/init.d/upsdrv /etc/init.d/upsdrv.\$UPSNAME" |
262 |
${msgfunc} '' |
263 |
${msgfunc} 'If you want apcupsd to power off your UPS when it' |
264 |
${msgfunc} 'shuts down your system in a power failure, you must' |
265 |
${msgfunc} 'add nut.powerfail to your shutdown runlevel:' |
266 |
${msgfunc} '' |
267 |
${msgfunc} 'rc-update add nut.powerfail shutdown' |
268 |
${msgfunc} '' |
269 |
|
270 |
} |