Gentoo Archives: gentoo-commits

From: "Lars Wendler (polynomial-c)" <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-process/atop/files: atop.rc-r1 atopacct.rc atop-2.2-build.patch
Date: Thu, 25 Jun 2015 21:13:55
Message-Id: 20150625211342.99A51A52@oystercatcher.gentoo.org
1 polynomial-c 15/06/25 21:13:42
2
3 Added: atop.rc-r1 atopacct.rc atop-2.2-build.patch
4 Log:
5 Version bump. Added rewritten init script to fix bug #553246
6
7 (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)
8
9 Revision Changes Path
10 1.1 sys-process/atop/files/atop.rc-r1
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/atop/files/atop.rc-r1?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/atop/files/atop.rc-r1?rev=1.1&content-type=text/plain
14
15 Index: atop.rc-r1
16 ===================================================================
17 #!/sbin/runscript
18 # Copyright 1999-2015 Gentoo Foundation
19 # Distributed under the terms of the GNU General Public License v2
20 # $Header: /var/cvsroot/gentoo-x86/sys-process/atop/files/atop.rc-r1,v 1.1 2015/06/25 21:13:42 polynomial-c Exp $
21
22 description="Resource-specific view of processes"
23 pidfile="/var/run/atop.pid"
24 command="/usr/bin/atop"
25
26 start() {
27 ebegin "Starting atop"
28 start-stop-daemon --start --pidfile ${pidfile} \
29 --exec /etc/atop/atop.daily
30 eend $?
31 }
32
33
34
35 1.1 sys-process/atop/files/atopacct.rc
36
37 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/atop/files/atopacct.rc?rev=1.1&view=markup
38 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/atop/files/atopacct.rc?rev=1.1&content-type=text/plain
39
40 Index: atopacct.rc
41 ===================================================================
42 #!/sbin/runscript
43 # Copyright 1999-2015 Gentoo Foundation
44 # Distributed under the terms of the GNU General Public License v2
45 # $Header: /var/cvsroot/gentoo-x86/sys-process/atop/files/atopacct.rc,v 1.1 2015/06/25 21:13:42 polynomial-c Exp $
46
47 description="Resource-specific view of processes"
48 command="/usr/sbin/atopacctd"
49 lockfile="/var/lock/subsys/atopacctd"
50
51 start_pre() {
52 # Check if process accounting already in use via psacct
53 for PACCTFILE in /var/account/pacct /var/log/pacct ; do
54 if [ -f "${PACCTFILE}" ] ; then
55 BEFORSIZE=$(stat -c %s "${PACCTFILE}")
56 AFTERSIZE=$(stat -c %s "${PACCTFILE}")
57
58 # verify if accounting file grows, so is in use
59 if [ ${BEFORSIZE} -lt ${AFTERSIZE} ] ; then
60 ewarn "Process accounting already used by psacct!"
61 return 1
62 fi
63 fi
64 done
65
66 checkpath -d -q ${lockfile%/*} || return 1
67 }
68
69 start() {
70 ebegin "Starting atopacctd"
71 start-stop-daemon --start --exec ${command}
72 touch ${lockfile}
73 eend $?
74 }
75
76 stop() {
77 ebegin "Stopping atopacctd"
78 start-stop-daemon --stop --exec ${command}
79 rm ${lockfile}
80 eend $?
81 }
82
83
84
85
86 1.1 sys-process/atop/files/atop-2.2-build.patch
87
88 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/atop/files/atop-2.2-build.patch?rev=1.1&view=markup
89 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/atop/files/atop-2.2-build.patch?rev=1.1&content-type=text/plain
90
91 Index: atop-2.2-build.patch
92 ===================================================================
93 --- atop-2.2-3/Makefile
94 +++ atop-2.2-3/Makefile
95 @@ -19,7 +19,7 @@
96 PMPATH2 = /usr/lib64/pm-utils/sleep.d
97 PMPATHD = /usr/lib/systemd/system-sleep
98
99 -CFLAGS += -O2 -I. -Wall # -DHTTPSTATS
100 +CFLAGS += -I. -Wall # -DHTTPSTATS
101 OBJMOD0 = version.o
102 OBJMOD1 = various.o deviate.o procdbase.o
103 OBJMOD2 = acctproc.o photoproc.o photosyst.o rawlog.o ifprop.o parseable.o
104 @@ -32,13 +32,13 @@
105 all: atop atopsar atopacctd
106
107 atop: atop.o $(ALLMODS) Makefile
108 - $(CC) atop.o $(ALLMODS) -o atop -lncurses -lz -lm -lrt $(LDFLAGS)
109 + $(CC) $(CFLAGS) $(LDFLAGS) atop.o $(ALLMODS) -o atop $(shell ${PKG_CONFIG} --libs ncurses) -lz -lm -lrt
110
111 atopsar: atop
112 ln -sf atop atopsar
113
114 atopacctd: atopacctd.o netlink.o
115 - $(CC) atopacctd.o netlink.o -o atopacctd $(LDFLAGS)
116 + $(CC) $(CFLAGS) $(LDFLAGS) atopacctd.o netlink.o -o atopacctd
117
118 netlink.o: netlink.c
119 $(CC) -I. -Wall -c netlink.c