Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/hardened-dev:uclibc commit in: sys-process/at/files/, sys-process/at/
Date: Mon, 25 Feb 2013 02:09:16
Message-Id: 1361758091.22c9068586041053e2fb00ad8ea452d7f9ed1cf2.blueness@gentoo
1 commit: 22c9068586041053e2fb00ad8ea452d7f9ed1cf2
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 25 02:08:11 2013 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 25 02:08:11 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=22c90685
7
8 sys-process/at: fix getloadavg for uclibc
9
10 ---
11 sys-process/at/at-3.1.13-r99.ebuild | 81 ++++++++++++++++++++
12 ...at-3.1.10.2-Makefile.in-parallel-make-fix.patch | 12 +++
13 sys-process/at/files/at-3.1.13-Makefile.patch | 29 +++++++
14 ....1.13-configure.in-fix-PAM-automagick-dep.patch | 22 +++++
15 sys-process/at/files/at-3.1.13-getloadavg.patch | 19 +++++
16 .../at/files/at-3.1.13-parallel-make-fix.patch | 11 +++
17 sys-process/at/files/at-3.1.8-more-deny.patch | 20 +++++
18 sys-process/at/files/at.pamd-3.1.13-r1 | 9 ++
19 sys-process/at/files/atd.confd | 8 ++
20 sys-process/at/files/atd.rc6 | 21 +++++
21 sys-process/at/metadata.xml | 5 +
22 11 files changed, 237 insertions(+), 0 deletions(-)
23
24 diff --git a/sys-process/at/at-3.1.13-r99.ebuild b/sys-process/at/at-3.1.13-r99.ebuild
25 new file mode 100644
26 index 0000000..af42a25
27 --- /dev/null
28 +++ b/sys-process/at/at-3.1.13-r99.ebuild
29 @@ -0,0 +1,81 @@
30 +# Copyright 1999-2013 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +# $Header: /var/cvsroot/gentoo-x86/sys-process/at/at-3.1.13-r1.ebuild,v 1.12 2013/02/18 17:57:48 swift Exp $
33 +
34 +EAPI=4
35 +
36 +inherit autotools eutils flag-o-matic pam
37 +
38 +DESCRIPTION="Queues jobs for later execution"
39 +HOMEPAGE="http://packages.qa.debian.org/a/at.html"
40 +SRC_URI="mirror://debian/pool/main/a/at/${PN}_${PV}.orig.tar.gz"
41 +
42 +LICENSE="GPL-2"
43 +SLOT="0"
44 +KEYWORDS="~amd64 ~arm ~mips ~x86"
45 +IUSE="pam selinux"
46 +
47 +DEPEND="virtual/mta
48 + >=sys-devel/autoconf-2.64
49 + sys-devel/bison
50 + >=sys-devel/flex-2.5.4a
51 + pam? ( virtual/pam )
52 + selinux? ( sec-policy/selinux-at )"
53 +RDEPEND="virtual/mta
54 + virtual/logger
55 + selinux? ( sec-policy/selinux-at )"
56 +
57 +pkg_setup() {
58 + enewgroup at 25
59 + enewuser at 25 -1 /var/spool/at/atjobs at
60 +}
61 +
62 +src_prepare() {
63 + epatch "${FILESDIR}"/${PN}-3.1.8-more-deny.patch
64 + epatch "${FILESDIR}"/${PN}-3.1.13-Makefile.patch
65 + # fix parallel make issues, bug #244884
66 + epatch "${FILESDIR}"/${PN}-3.1.10.2-Makefile.in-parallel-make-fix.patch
67 + epatch "${FILESDIR}"/${P}-configure.in-fix-PAM-automagick-dep.patch
68 + # Fix parallel make issue (bug #408375)
69 + epatch "${FILESDIR}"/${PN}-3.1.13-parallel-make-fix.patch
70 + epatch "${FILESDIR}"/${PN}-3.1.13-getloadavg.patch
71 +
72 + eautoconf
73 +}
74 +
75 +src_configure() {
76 + use pam || my_conf="--without-pam"
77 + econf \
78 + --sysconfdir=/etc/at \
79 + --with-jobdir=/var/spool/at/atjobs \
80 + --with-atspool=/var/spool/at/atspool \
81 + --with-etcdir=/etc/at \
82 + --with-daemon_username=at \
83 + --with-daemon_groupname=at \
84 + ${my_conf}
85 +}
86 +
87 +src_install() {
88 + emake install IROOT="${D}" || die
89 +
90 + newinitd "${FILESDIR}"/atd.rc6 atd
91 + newconfd "${FILESDIR}"/atd.confd atd
92 + newpamd "${FILESDIR}"/at.pamd-3.1.13-r1 atd
93 +
94 + # Preserve existing .SEQ files (bug #386625)
95 + local seq_file="${ROOT}/var/spool/at/atjobs/.SEQ"
96 + if [ -f "${seq_file}" ] ; then
97 + einfo "Preserving existing .SEQ file (bug #386625)."
98 + cp -p "${seq_file}" "${D}"/var/spool/at/atjobs/ || die
99 + fi
100 +}
101 +
102 +pkg_postinst() {
103 + einfo "Forcing correct permissions on /var/spool/at"
104 + chown at:at "${ROOT}/var/spool/at/atjobs"
105 + chmod 1770 "${ROOT}/var/spool/at/atjobs"
106 + chown at:at "${ROOT}/var/spool/at/atjobs/.SEQ"
107 + chmod 0600 "${ROOT}/var/spool/at/atjobs/.SEQ"
108 + chown at:at "${ROOT}/var/spool/at/atspool"
109 + chmod 1770 "${ROOT}/var/spool/at/atspool"
110 +}
111
112 diff --git a/sys-process/at/files/at-3.1.10.2-Makefile.in-parallel-make-fix.patch b/sys-process/at/files/at-3.1.10.2-Makefile.in-parallel-make-fix.patch
113 new file mode 100644
114 index 0000000..8fd82e6
115 --- /dev/null
116 +++ b/sys-process/at/files/at-3.1.10.2-Makefile.in-parallel-make-fix.patch
117 @@ -0,0 +1,12 @@
118 +diff -Naur at-3.1.10.2.orig/Makefile.in at-3.1.10.2/Makefile.in
119 +--- at-3.1.10.2.orig/Makefile.in 2009-01-31 15:38:54.000000000 +0100
120 ++++ at-3.1.10.2/Makefile.in 2009-01-31 15:39:22.000000000 +0100
121 +@@ -78,7 +78,7 @@
122 + y.tab.c y.tab.h: parsetime.y
123 + $(YACC) -d parsetime.y
124 +
125 +-lex.yy.c: parsetime.l
126 ++lex.yy.c: parsetime.l y.tab.h
127 + $(LEX) -i parsetime.l
128 +
129 + atrun: atrun.in
130
131 diff --git a/sys-process/at/files/at-3.1.13-Makefile.patch b/sys-process/at/files/at-3.1.13-Makefile.patch
132 new file mode 100644
133 index 0000000..d9b1acf
134 --- /dev/null
135 +++ b/sys-process/at/files/at-3.1.13-Makefile.patch
136 @@ -0,0 +1,29 @@
137 +# - install into Gentoo/FHS doc dir
138 +# - respect Gentoo LDFLAGS
139 +# - dont allow install to strip binaries
140 +
141 +--- at-3.1.13/Makefile.in
142 ++++ at-3.1.13/Makefile.in
143 +@@ -12,8 +12,11 @@
144 + man1dir = $(mandir)/man1
145 + man5dir = $(mandir)/man5
146 + man8dir = $(mandir)/man8
147 +-docdir = $(prefix)/doc
148 +-atdocdir = $(docdir)/at
149 ++ifndef PF
150 ++PF = at-$(VERSION)
151 ++endif
152 ++docdir = $(prefix)/share/doc
153 ++atdocdir = $(docdir)/$(PF)
154 + etcdir = @ETCDIR@
155 +
156 + DAEMON_USERNAME = @DAEMON_USERNAME@
157 +@@ -35,7 +38,7 @@
158 + -DDAEMON_USERNAME=\"$(DAEMON_USERNAME)\" \
159 + -DDAEMON_GROUPNAME=\"$(DAEMON_GROUPNAME)\" \
160 + -DLFILE=\"$(LFILE)\" -Wall
161 +-LIBS = @LIBS@
162 ++LIBS = @LIBS@ @LDFLAGS@
163 + LIBOBJS = @LIBOBJS@
164 + INSTALL = @INSTALL@
165 + PAMLIB = @PAMLIB@
166
167 diff --git a/sys-process/at/files/at-3.1.13-configure.in-fix-PAM-automagick-dep.patch b/sys-process/at/files/at-3.1.13-configure.in-fix-PAM-automagick-dep.patch
168 new file mode 100644
169 index 0000000..ee24b7f
170 --- /dev/null
171 +++ b/sys-process/at/files/at-3.1.13-configure.in-fix-PAM-automagick-dep.patch
172 @@ -0,0 +1,22 @@
173 +--- at-3.1.13/configure.ac
174 ++++ at-3.1.13/configure.ac
175 +@@ -82,10 +82,15 @@
176 + AC_FUNC_VPRINTF
177 + AC_FUNC_GETLOADAVG
178 + AC_CHECK_FUNCS(getcwd mktime strftime setreuid setresuid sigaction waitpid)
179 +-AC_CHECK_HEADERS(security/pam_appl.h, [
180 +- PAMLIB="-lpam"
181 +- AC_DEFINE(HAVE_PAM, 1, [Define to 1 for PAM support])
182 +-])
183 ++AC_ARG_WITH([pam], AS_HELP_STRING([--without-pam],
184 ++ [Build without PAM support(default: enabled)]))
185 ++
186 ++if test "x$with_pam" != "xno"; then
187 ++ AC_CHECK_HEADERS(security/pam_appl.h, [
188 ++ PAMLIB="-lpam"
189 ++ AC_DEFINE(HAVE_PAM, 1, [Define to 1 for PAM support])
190 ++ ])
191 ++fi
192 +
193 + dnl Checking for programs
194 +
195
196 diff --git a/sys-process/at/files/at-3.1.13-getloadavg.patch b/sys-process/at/files/at-3.1.13-getloadavg.patch
197 new file mode 100644
198 index 0000000..7de085d
199 --- /dev/null
200 +++ b/sys-process/at/files/at-3.1.13-getloadavg.patch
201 @@ -0,0 +1,19 @@
202 +diff --git a/getloadavg.c b/getloadavg.c
203 +index cf5869f..c7e2b27 100644
204 +--- a/getloadavg.c
205 ++++ b/getloadavg.c
206 +@@ -69,8 +69,12 @@ Boston, MA 02110-1301 USA */
207 + #include <config.h>
208 + #endif
209 +
210 +-#include "lisp.h"
211 +-#include "sysfile.h" /* for encapsulated open, close, read, write */
212 ++#include <sys/types.h>
213 ++#include <sys/stat.h>
214 ++#include <fcntl.h>
215 ++
216 ++//#include "lisp.h"
217 ++//#include "sysfile.h" /* for encapsulated open, close, read, write */
218 +
219 + #ifndef HAVE_GETLOADAVG
220 +
221
222 diff --git a/sys-process/at/files/at-3.1.13-parallel-make-fix.patch b/sys-process/at/files/at-3.1.13-parallel-make-fix.patch
223 new file mode 100644
224 index 0000000..dec02e4
225 --- /dev/null
226 +++ b/sys-process/at/files/at-3.1.13-parallel-make-fix.patch
227 @@ -0,0 +1,11 @@
228 +--- at-3.1.13_orig/Makefile.in 2011-06-25 14:43:14.000000000 +0200
229 ++++ at-3.1.13/Makefile.in 2012-03-16 17:23:26.210267660 +0100
230 +@@ -73,7 +73,7 @@
231 + atd: $(RUNOBJECTS)
232 + $(CC) $(CFLAGS) -o atd $(RUNOBJECTS) $(LIBS) $(PAMLIB)
233 +
234 +-y.tab.c y.tab.h: parsetime.y
235 ++%.tab.c %.tab.h: parsetime.y
236 + $(YACC) -d parsetime.y
237 +
238 + lex.yy.c: parsetime.l
239
240 diff --git a/sys-process/at/files/at-3.1.8-more-deny.patch b/sys-process/at/files/at-3.1.8-more-deny.patch
241 new file mode 100644
242 index 0000000..006713b
243 --- /dev/null
244 +++ b/sys-process/at/files/at-3.1.8-more-deny.patch
245 @@ -0,0 +1,20 @@
246 +--- at.deny
247 ++++ at.deny
248 +@@ -10,6 +10,8 @@
249 + lp
250 + mail
251 + man
252 ++mysql
253 ++news
254 + nobody
255 + operator
256 + proxy
257 +@@ -19,6 +21,8 @@
258 + qmailq
259 + qmailr
260 + qmails
261 ++squid
262 + sync
263 + sys
264 ++uucp
265 + www-data
266
267 diff --git a/sys-process/at/files/at.pamd-3.1.13-r1 b/sys-process/at/files/at.pamd-3.1.13-r1
268 new file mode 100644
269 index 0000000..5c529c1
270 --- /dev/null
271 +++ b/sys-process/at/files/at.pamd-3.1.13-r1
272 @@ -0,0 +1,9 @@
273 +#
274 +# The PAM configuration file for the at daemon
275 +#
276 +
277 +auth required pam_env.so
278 +auth include system-services
279 +account include system-services
280 +session include system-services
281 +
282
283 diff --git a/sys-process/at/files/atd.confd b/sys-process/at/files/atd.confd
284 new file mode 100644
285 index 0000000..db42ea5
286 --- /dev/null
287 +++ b/sys-process/at/files/atd.confd
288 @@ -0,0 +1,8 @@
289 +#!/sbin/runscript
290 +# Copyright 1999-2011 Gentoo Foundation
291 +# Distributed under the terms of the GNU General Public License v2
292 +# $Header: /var/cvsroot/gentoo-x86/sys-process/at/files/atd.confd,v 1.1 2011/04/17 22:46:40 jer Exp $
293 +
294 +# Define startup options for atd(8).
295 +# For example: ATD_OPTS="-l 3.0 -b 5"
296 +ATD_OPTS=""
297
298 diff --git a/sys-process/at/files/atd.rc6 b/sys-process/at/files/atd.rc6
299 new file mode 100755
300 index 0000000..8c89ad5
301 --- /dev/null
302 +++ b/sys-process/at/files/atd.rc6
303 @@ -0,0 +1,21 @@
304 +#!/sbin/runscript
305 +# Copyright 1999-2011 Gentoo Foundation
306 +# Distributed under the terms of the GNU General Public License v2
307 +# $Header: /var/cvsroot/gentoo-x86/sys-process/at/files/atd.rc6,v 1.3 2011/09/23 12:04:44 polynomial-c Exp $
308 +
309 +depend() {
310 + need clock logger
311 +}
312 +
313 +start() {
314 + ebegin "Starting atd"
315 + start-stop-daemon --start --quiet --pidfile /var/run/atd.pid \
316 + --exec /usr/sbin/atd -- ${ATD_OPTS}
317 + eend $?
318 +}
319 +
320 +stop() {
321 + ebegin "Shutting down atd"
322 + start-stop-daemon --stop --quiet --pidfile /var/run/atd.pid
323 + eend $?
324 +}
325
326 diff --git a/sys-process/at/metadata.xml b/sys-process/at/metadata.xml
327 new file mode 100644
328 index 0000000..3f399e9
329 --- /dev/null
330 +++ b/sys-process/at/metadata.xml
331 @@ -0,0 +1,5 @@
332 +<?xml version="1.0" encoding="UTF-8"?>
333 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
334 +<pkgmetadata>
335 + <herd>cron</herd>
336 +</pkgmetadata>