Gentoo Archives: gentoo-commits

From: Ian Delaney <idella4@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/owfs/files/, sys-fs/owfs/
Date: Fri, 19 Feb 2016 03:11:05
Message-Id: 1455848377.e788d1233936b0c24d52abd74c43fc6a4a6e09cf.idella4@gentoo
1 commit: e788d1233936b0c24d52abd74c43fc6a4a6e09cf
2 Author: Thomas D <whissi <AT> whissi <DOT> de>
3 AuthorDate: Thu Feb 18 21:20:35 2016 +0000
4 Commit: Ian Delaney <idella4 <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 19 02:19:37 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e788d123
7
8 sys-fs/owfs: Bumped to v3.1p1
9
10 Changes:
11
12 * Bumped to upstream v3.1p1 (Closes #572004)
13
14 * Bumped to EAPI=6
15
16 * Added ewarn to tell user that they maybe have to install a custom UDEV
17 rule (Closes #315935)
18
19 * Various runscript fixes
20
21 - Services were misusing "need net" (See #439092)
22
23 - start_pre added to fix problems caused by non-existing pidfile dir
24 (Closes #553418)
25
26 Package-Manager: portage-2.2.27
27
28 sys-fs/owfs/Manifest | 1 +
29 sys-fs/owfs/files/owfs-3.1-vendordir.patch | 26 +++++
30 sys-fs/owfs/files/owfs.initd-r1 | 36 ++++++
31 sys-fs/owfs/files/owftpd.initd-r1 | 36 ++++++
32 sys-fs/owfs/files/owhttpd.initd-r1 | 36 ++++++
33 sys-fs/owfs/files/owserver.initd-r1 | 35 ++++++
34 sys-fs/owfs/metadata.xml | 21 ++--
35 sys-fs/owfs/owfs-3.1_p1.ebuild | 171 +++++++++++++++++++++++++++++
36 8 files changed, 351 insertions(+), 11 deletions(-)
37
38 diff --git a/sys-fs/owfs/Manifest b/sys-fs/owfs/Manifest
39 index c70827c..cb7f4e3 100644
40 --- a/sys-fs/owfs/Manifest
41 +++ b/sys-fs/owfs/Manifest
42 @@ -1 +1,2 @@
43 DIST owfs-2.7p21.tar.gz 1247466 SHA256 070a3368e9400e900618f8a704f487baf3671f6764715b4de04b151c66d3306d SHA512 ec6d372d32ebf59278c2c68d5fbed42664f52bc1702f4ea8e5506457594943413e37801d341102029cb48a9d8c3d6b3d68615a1dd517c93aa0a475a1bb06c4cf WHIRLPOOL 31901ae07a7431a368cdb4fa0a30a1885da29f55187dc601b53f2e9ebf4e11aba73de93d7f6308671ecb3afa8433548b41a2e79a9a0cc4771adee93a5a6a1ddd
44 +DIST owfs-3.1p1.tar.gz 1400962 SHA256 e69421ae534565c1f8530a2447f583401f4d0d4b1cf3cb8cf399a57133ed7f81 SHA512 f5c2694ce1076969cf4a6970a07b2c2edee42cfbc6886c1790d777d650cc0afe42cf3282328f8832d5286a0aa5827c48e3d4657412ba3391db5e26adfa890cf5 WHIRLPOOL 2a3a4ebeb3eebaf0d370a7dcc8a9a5fb95defa3e218039f9203b996e4ac2272c2a16323bb8e43da39df9a389dbd057e49c936f40bdc08de201076fbd8d2fdba4
45
46 diff --git a/sys-fs/owfs/files/owfs-3.1-vendordir.patch b/sys-fs/owfs/files/owfs-3.1-vendordir.patch
47 new file mode 100644
48 index 0000000..2592e8a
49 --- /dev/null
50 +++ b/sys-fs/owfs/files/owfs-3.1-vendordir.patch
51 @@ -0,0 +1,26 @@
52 +diff --git a/module/ownet/perl5/Makefile.am b/module/ownet/perl5/Makefile.am
53 +index 5823f4b..cebe1e6 100644
54 +--- a/module/ownet/perl5/Makefile.am
55 ++++ b/module/ownet/perl5/Makefile.am
56 +@@ -8,7 +8,7 @@ OWNet/Makefile: OWNet/Makefile.PL
57 + if HAVE_DEBIAN
58 + cd OWNet; $(PERL) Makefile.PL INSTALLDIRS=vendor
59 + else
60 +- cd OWNet; $(PERL) Makefile.PL
61 ++ cd OWNet; $(PERL) Makefile.PL INSTALLDIRS=vendor
62 + endif
63 +
64 + install-data-local: OWNet/Makefile
65 +diff --git a/module/swig/perl5/Makefile.am b/module/swig/perl5/Makefile.am
66 +index 8e5f583..49cd252 100644
67 +--- a/module/swig/perl5/Makefile.am
68 ++++ b/module/swig/perl5/Makefile.am
69 +@@ -19,7 +19,7 @@ else
70 + if HAVE_DEBIAN
71 + ( cd OW; $(PERL) Makefile.PL INSTALLDIRS=vendor )
72 + else
73 +- ( cd OW; $(PERL) Makefile.PL )
74 ++ ( cd OW; $(PERL) Makefile.PL INSTALLDIRS=vendor )
75 + if HAVE_FREEBSD
76 + $(PERL) -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//' OW/Makefile
77 +
78
79 diff --git a/sys-fs/owfs/files/owfs.initd-r1 b/sys-fs/owfs/files/owfs.initd-r1
80 new file mode 100644
81 index 0000000..4d7f6d4
82 --- /dev/null
83 +++ b/sys-fs/owfs/files/owfs.initd-r1
84 @@ -0,0 +1,36 @@
85 +#!/sbin/openrc-run
86 +# Copyright 1999-2016 Gentoo Foundation
87 +# Distributed under the terms of the GNU General Public License, v2 or later
88 +# $Id$
89 +
90 +INSTANCE=${SVCNAME#*.}
91 +PROGRAM=${SVCNAME%%.*}
92 +PIDFILE=${PIDFILE:-/run/owfs/${PROGRAM}.pid}
93 +OWUID=${OWUID:-owfs}
94 +OWGID=${OWGID:-owfs}
95 +
96 +depend() {
97 + need owserver
98 + use logger
99 +}
100 +
101 +start_pre() {
102 + checkpath -d -m 0750 -o ${OWUID}:${OWGID} "$(dirname ${PIDFILE})"
103 +}
104 +
105 +start() {
106 + ebegin "Starting ${SVCNAME}"
107 + start-stop-daemon --start --exec /usr/bin/${PROGRAM} \
108 + --pidfile ${PIDFILE} --user ${OWUID}:${OWGID} -- \
109 + --pid-file ${PIDFILE} \
110 + --background --error_print 1 \
111 + ${OWFS_OPTS:--m /var/lib/owfs/mnt --allow_other -s 127.0.0.1:4304}
112 + eend $?
113 +}
114 +
115 +stop() {
116 + ebegin "Stopping ${SVCNAME}"
117 + start-stop-daemon --stop --exec /usr/bin/${PROGRAM} \
118 + --pidfile ${PIDFILE} -u ${OWUID}
119 + eend $?
120 +}
121
122 diff --git a/sys-fs/owfs/files/owftpd.initd-r1 b/sys-fs/owfs/files/owftpd.initd-r1
123 new file mode 100644
124 index 0000000..c79545a
125 --- /dev/null
126 +++ b/sys-fs/owfs/files/owftpd.initd-r1
127 @@ -0,0 +1,36 @@
128 +#!/sbin/openrc-run
129 +# Copyright 1999-2016 Gentoo Foundation
130 +# Distributed under the terms of the GNU General Public License, v2 or later
131 +# $Id$
132 +
133 +INSTANCE=${SVCNAME#*.}
134 +PROGRAM=${SVCNAME%%.*}
135 +PIDFILE=${PIDFILE:-/run/owfs/${PROGRAM}.pid}
136 +OWUID=${OWUID:-owfs}
137 +OWGID=${OWGID:-owfs}
138 +
139 +depend() {
140 + need owserver
141 + use logger
142 +}
143 +
144 +start_pre() {
145 + checkpath -d -m 0750 -o ${OWUID}:${OWGID} "$(dirname ${PIDFILE})"
146 +}
147 +
148 +start() {
149 + ebegin "Starting ${SVCNAME}"
150 + start-stop-daemon --start --exec /usr/bin/${PROGRAM} \
151 + --pidfile ${PIDFILE} --user ${OWUID}:${OWGID} -- \
152 + --pid-file ${PIDFILE} \
153 + --background --error_print 1 \
154 + ${OWFTPD_OPTS:---nozero -p 127.0.0.1:4381 -s 127.0.0.1:4304 --max_clients 5 --timeout_ftp 600}
155 + eend $?
156 +}
157 +
158 +stop() {
159 + ebegin "Stopping ${SVCNAME}"
160 + start-stop-daemon --stop --exec /usr/bin/${PROGRAM} \
161 + --pidfile ${PIDFILE} -u ${OWUID}
162 + eend $?
163 +}
164
165 diff --git a/sys-fs/owfs/files/owhttpd.initd-r1 b/sys-fs/owfs/files/owhttpd.initd-r1
166 new file mode 100644
167 index 0000000..9ea39ff
168 --- /dev/null
169 +++ b/sys-fs/owfs/files/owhttpd.initd-r1
170 @@ -0,0 +1,36 @@
171 +#!/sbin/openrc-run
172 +# Copyright 1999-2016 Gentoo Foundation
173 +# Distributed under the terms of the GNU General Public License, v2 or later
174 +# $Id$
175 +
176 +INSTANCE=${SVCNAME#*.}
177 +PROGRAM=${SVCNAME%%.*}
178 +PIDFILE=${PIDFILE:-/run/owfs/${PROGRAM}.pid}
179 +OWUID=${OWUID:-owfs}
180 +OWGID=${OWGID:-owfs}
181 +
182 +depend() {
183 + need owserver
184 + use logger
185 +}
186 +
187 +start_pre() {
188 + checkpath -d -m 0750 -o ${OWUID}:${OWGID} "$(dirname ${PIDFILE})"
189 +}
190 +
191 +start() {
192 + ebegin "Starting ${SVCNAME}"
193 + start-stop-daemon --start --exec /usr/bin/${PROGRAM} \
194 + --pidfile ${PIDFILE} --user ${OWUID}:${OWGID} -- \
195 + --pid-file ${PIDFILE} \
196 + --background --error_print 1 \
197 + ${OWHTTPD_OPTS:---nozero -p 127.0.0.1:4380 -s 127.0.0.1:4304}
198 + eend $?
199 +}
200 +
201 +stop() {
202 + ebegin "Stopping ${SVCNAME}"
203 + start-stop-daemon --stop --exec /usr/bin/${PROGRAM} \
204 + --pidfile ${PIDFILE} -u ${OWUID}
205 + eend $?
206 +}
207
208 diff --git a/sys-fs/owfs/files/owserver.initd-r1 b/sys-fs/owfs/files/owserver.initd-r1
209 new file mode 100644
210 index 0000000..da47a82
211 --- /dev/null
212 +++ b/sys-fs/owfs/files/owserver.initd-r1
213 @@ -0,0 +1,35 @@
214 +#!/sbin/openrc-run
215 +# Copyright 1999-2016 Gentoo Foundation
216 +# Distributed under the terms of the GNU General Public License, v2 or later
217 +# $Id$
218 +
219 +INSTANCE=${SVCNAME#*.}
220 +PROGRAM=${SVCNAME%%.*}
221 +PIDFILE=${PIDFILE:-/run/owfs/${PROGRAM}.pid}
222 +OWUID=${OWUID:-owfs}
223 +OWGID=${OWGID:-owfs}
224 +
225 +depend() {
226 + use logger
227 +}
228 +
229 +start_pre() {
230 + checkpath -d -m 0750 -o ${OWUID}:${OWGID} "$(dirname ${PIDFILE})"
231 +}
232 +
233 +start() {
234 + ebegin "Starting ${SVCNAME}"
235 + start-stop-daemon --start --exec /usr/bin/${PROGRAM} \
236 + --pidfile ${PIDFILE} --user ${OWUID}:${OWGID} -- \
237 + --pid-file ${PIDFILE} \
238 + --background --error_print 1 \
239 + ${OWSERVER_OPTS:---nozero -p 127.0.0.1:4304 -d /dev/ttyS0}
240 + eend $?
241 +}
242 +
243 +stop() {
244 + ebegin "Stopping ${SVCNAME}"
245 + start-stop-daemon --stop --exec /usr/bin/${PROGRAM} \
246 + --pidfile ${PIDFILE} -u ${OWUID}
247 + eend $?
248 +}
249
250 diff --git a/sys-fs/owfs/metadata.xml b/sys-fs/owfs/metadata.xml
251 index abb9646..1d6d937 100644
252 --- a/sys-fs/owfs/metadata.xml
253 +++ b/sys-fs/owfs/metadata.xml
254 @@ -1,21 +1,20 @@
255 <?xml version="1.0" encoding="UTF-8"?>
256 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
257 <pkgmetadata>
258 - <longdescription>
259 -OWFS (One Wire File System) is an easy way to use the powerful 1-wire system
260 -of Dallas/Maxim. A simple and flexible program to monitor and control the
261 -physical environment. You can write scripts to read temperature, flash
262 -lights, write to an LCD, log and graph, ...
263 -</longdescription>
264 + <longdescription lang="en">
265 + OWFS (One Wire File System) is an easy way to use the powerful 1-wire system
266 + of Dallas/Maxim. A simple and flexible program to monitor and control the
267 + physical environment. You can write scripts to read temperature, flash
268 + lights, write to an LCD, log and graph, ...
269 + </longdescription>
270 + <upstream>
271 + <remote-id type="sourceforge">owfs</remote-id>
272 + </upstream>
273 <use>
274 <flag name="ftpd">Enable building the OWFS FTP server (owftpd)</flag>
275 <flag name="fuse">Enable building the FUSE-based OWFS client (owfs)</flag>
276 <flag name="httpd">Enable building the OWFS web server (owhttpd)</flag>
277 - <flag name="parport">Enable support for the DS1410E parallel port
278 - adapter</flag>
279 + <flag name="parport">Enable support for the DS1410E parallel port adapter</flag>
280 <flag name="server">Enable building the OWFS server (owserver)</flag>
281 </use>
282 - <upstream>
283 - <remote-id type="sourceforge">owfs</remote-id>
284 - </upstream>
285 </pkgmetadata>
286
287 diff --git a/sys-fs/owfs/owfs-3.1_p1.ebuild b/sys-fs/owfs/owfs-3.1_p1.ebuild
288 new file mode 100644
289 index 0000000..e444582
290 --- /dev/null
291 +++ b/sys-fs/owfs/owfs-3.1_p1.ebuild
292 @@ -0,0 +1,171 @@
293 +# Copyright 1999-2016 Gentoo Foundation
294 +# Distributed under the terms of the GNU General Public License v2
295 +# $Id$
296 +
297 +EAPI=6
298 +
299 +PYTHON_COMPAT=( python2_7 )
300 +DISTUTILS_OPTIONAL=1
301 +
302 +inherit autotools distutils-r1 perl-functions user
303 +
304 +MY_P=${P/_/}
305 +
306 +DESCRIPTION="Access 1-Wire devices like a filesystem"
307 +SRC_URI="mirror://sourceforge/owfs/${MY_P}.tar.gz"
308 +HOMEPAGE="http://owfs.org/ https://sourceforge.net/projects/owfs/"
309 +
310 +KEYWORDS="~amd64 ~arm ~x86"
311 +SLOT="0/1"
312 +LICENSE="GPL-2"
313 +
314 +RDEPEND="
315 + fuse? ( sys-fs/fuse )
316 + perl? ( dev-lang/perl:= )
317 + php? ( dev-lang/php:=[cli] )
318 + python? ( ${PYTHON_DEPS} )
319 + tcl? ( dev-lang/tcl:0= )
320 + usb? ( virtual/libusb:0 )
321 + zeroconf? ( net-dns/avahi[mdnsresponder-compat] )"
322 +
323 +DEPEND="${RDEPEND}
324 + perl? ( dev-lang/swig )
325 + php? ( dev-lang/swig )
326 + python? ( dev-lang/swig )"
327 +
328 +IUSE="debug ftpd fuse httpd parport perl php python tcl usb zeroconf"
329 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
330 +
331 +PATCHES=(
332 + "${FILESDIR}"/${PN}-3.1-vendordir.patch
333 +)
334 +
335 +S=${WORKDIR}/${MY_P}
336 +
337 +OWUID=${OWUID:-owfs}
338 +OWGID=${OWGID:-owfs}
339 +
340 +pkg_setup() {
341 + use perl && perl_set_version
342 +
343 + enewgroup ${OWGID} 150
344 + enewuser ${OWUID} 150 -1 -1 ${OWGID}
345 +}
346 +
347 +src_prepare() {
348 + default
349 +
350 + # Support user's CFLAGS and LDFLAGS.
351 + sed -i "s/@CPPFLAGS@/@CPPFLAGS@ ${CFLAGS}/" \
352 + module/swig/perl5/OW/Makefile.linux.in || die
353 + sed -i "s/@LIBS@/@LIBS@ ${LDFLAGS}/" \
354 + module/swig/perl5/OW/Makefile.linux.in || die
355 +
356 + eautoreconf
357 +}
358 +
359 +src_configure() {
360 + # disable owpython since we can build python anyway
361 + # and without it, we don't have to fix the build ;)
362 + local myeconf=(
363 + $(use_enable debug)
364 + $(use_enable fuse owfs)
365 + $(use_enable ftpd owftpd)
366 + $(use_enable httpd owhttpd)
367 + $(use_enable parport)
368 + $(use_enable perl owperl)
369 + $(use_enable php owphp)
370 + --disable-owpython
371 + $(use_enable tcl owtcl)
372 + $(use_enable zeroconf zero)
373 + $(use_enable usb)
374 + )
375 +
376 + if use httpd || use ftpd || use fuse; then
377 + myeconf+=( --enable-owserver )
378 + else
379 + myeconf+=( --disable-owserver )
380 + fi
381 +
382 + econf ${myeconf[@]}
383 +}
384 +
385 +src_compile() {
386 + default
387 +
388 + if use python; then
389 + local CFLAGS="${CFLAGS} -fno-strict-aliasing"
390 +
391 + pushd module/ownet/python > /dev/null || die
392 + distutils-r1_src_compile
393 + popd > /dev/null || die
394 +
395 + pushd module/swig/python > /dev/null || die
396 + emake ow_wrap.c
397 + distutils-r1_src_compile
398 + popd > /dev/null || die
399 + fi
400 +}
401 +
402 +src_test() { :; }
403 +
404 +src_install() {
405 + default
406 +
407 + if use httpd || use ftpd || use fuse; then
408 + newinitd "${FILESDIR}"/owserver.initd-r1 owserver
409 + newconfd "${FILESDIR}"/owserver.confd owserver
410 +
411 + for i in httpd ftpd; do
412 + if use ${i}; then
413 + newinitd "${FILESDIR}"/ow${i}.initd-r1 ow${i}
414 + newconfd "${FILESDIR}"/ow${i}.confd ow${i}
415 + fi
416 + done
417 +
418 + if use fuse; then
419 + dodir /var/lib/owfs
420 + dodir /var/lib/owfs/mnt
421 + newinitd "${FILESDIR}"/owfs.initd-r1 owfs
422 + newconfd "${FILESDIR}"/owfs.confd owfs
423 + fi
424 + fi
425 +
426 + use perl && perl_delete_localpod
427 +
428 + if use python; then
429 + pushd module/ownet/python > /dev/null || die
430 + distutils-r1_src_install
431 + popd > /dev/null || die
432 +
433 + pushd module/swig/python > /dev/null || die
434 + distutils-r1_src_install
435 + popd > /dev/null || die
436 + fi
437 +}
438 +
439 +pkg_postinst() {
440 + if use httpd || use ftpd || use fuse; then
441 + echo
442 + if [[ ${OWUID} != root ]]; then
443 + ewarn
444 + ewarn "In order to allow the OWFS daemon user '${OWUID}' to read"
445 + ewarn "from and/or write to a 1 wire bus controller device, make"
446 + ewarn "sure the user has appropriate permission to access the"
447 + ewarn "corresponding device node/path (e.g. /dev/ttyS0), for example"
448 + ewarn "by adding the user to the group 'uucp' (for serial devices)"
449 + ewarn "or 'usb' (for USB devices accessed via usbfs on /proc/bus/usb),"
450 + ewarn "or install an appropriate UDEV rules (see http://owfs.org/index.php?page=udev-and-usb"
451 + ewarn "for more information)."
452 + ewarn
453 + if use fuse; then
454 + ewarn "In order to allow regular users to read from and/or write to"
455 + ewarn "1 wire bus devices accessible via the owfs FUSE filesystem"
456 + ewarn "client and its filesystem mountpoint, make sure the user is"
457 + ewarn "a member of the group '${OWGID}'."
458 + ewarn
459 + fi
460 + echo
461 + fi
462 + fi
463 +}