]> git.pld-linux.org Git - packages/net-snmp.git/blob - net-snmp.spec
- build agent/mibgroup first (to fix compile desynch which was not caused by parallel...
[packages/net-snmp.git] / net-snmp.spec
1 #
2 # Conditional build:
3 %bcond_without  autodeps        # don't BR packages only for deps resolving
4 #
5 %include        /usr/lib/rpm/macros.perl
6 Summary:        A collection of SNMP protocol tools
7 Summary(es):    Agente SNMP de la UCD
8 Summary(pl):    Kolekcja narzêdzi do obs³ugi protoko³u SNMP
9 Summary(pt_BR): Agente SNMP da UCD
10 Summary(ru):    îÁÂÏÒ ÕÔÉÌÉÔ ÄÌÑ ÐÒÏÔÏËÏÌÁ SNMP ÏÔ UC-Davis
11 Summary(uk):    îÁ¦ҠÕÔÉ̦ԠÄÌÑ ÐÒÏÔÏËÏÌÕ SNMP ×¦Ä UC-Davis
12 Name:           net-snmp
13 Version:        5.2.1.2
14 Release:        2
15 License:        BSD-like
16 Group:          Networking/Daemons
17 Source0:        http://dl.sourceforge.net/net-snmp/%{name}-%{version}.tar.gz
18 # Source0-md5:  34159770a7fe418d99fdd416a75358b1
19 Source1:        %{name}d.init
20 Source2:        %{name}d.conf
21 Source3:        %{name}d.sysconfig
22 Source4:        %{name}trapd.init
23 Source5:        %{name}trapd.conf
24 Source6:        %{name}trapd.sysconfig
25 Source7:        ftp://ucd-snmp.ucdavis.edu/contrib/ucd-ipchains.tar.gz
26 # Source7-md5:  29949f1008f1a04d6efefd5b3ea607da
27 Source8:        http://juniper.net/techpubs/software/junos/junos73/juniper-mibs-7.3R1.6.tgz
28 # Source8-md5:  380f8475a7f71e093b1dc98e4976c106
29 Patch0:         %{name}-acinclude.patch
30 Patch1:         %{name}-acfix.patch
31 Patch2:         %{name}-rpm-implicit-libs.patch
32 Patch3:         %{name}-config-noflags.patch
33 Patch4:         %{name}-dlopen-fix.patch
34 Patch5:         %{name}-manpage.patch
35 Patch6:         %{name}-link.patch
36 Patch7:         %{name}-llinterfaces.patch
37 Patch8:         %{name}-usr_local_bin_perl.patch
38 Patch9:         %{name}-kernel_headers.patch
39 Patch10:        %{name}-syntax.patch
40 Patch11:        %{name}-fix-insecure-fixproc.patch
41 URL:            http://www.net-snmp.org/
42 BuildRequires:  autoconf >= 2.57-3
43 BuildRequires:  automake
44 BuildRequires:  elfutils-devel
45 BuildRequires:  libtool >= 1.4
46 BuildRequires:  libwrap-devel
47 BuildRequires:  openssl-devel >= 0.9.7d
48 %{?with_autodeps:BuildRequires: perl-Term-ReadKey}
49 BuildRequires:  perl-devel >= 1:5.8.0
50 BuildRequires:  rpm-devel >= 4.0
51 BuildRequires:  rpm-perlprov >= 3.0.3-16
52 BuildRequires:  rpmbuild(macros) >= 1.176
53 PreReq:         rc-scripts >= 0.2.0
54 PreReq:         %{name}-libs = %{version}-%{release}
55 Requires(post,preun):   /sbin/chkconfig
56 Requires:       /usr/bin/setsid
57 Provides:       snmpd
58 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59 Obsoletes:      cmu-snmp
60 Obsoletes:      snmpd
61 Obsoletes:      ucd-snmp
62
63 %define         logfile         /var/log/snmpd.log
64
65 %description
66 SNMP (Simple Network Management Protocol) is a protocol used for
67 network management (hence the name). The net-snmp project includes
68 various SNMP tools: an extensible agent, an SNMP library, tools for
69 requesting or setting information from SNMP agents, tools for
70 generating and handling SNMP traps, a version of the netstat command
71 which uses SNMP, and a Tk/Perl mib browser. This package contains the
72 snmpd daemon, documentation, etc.
73
74 %description -l es
75 Este paquete se deriva de la implementación del Protocolo Simple de
76 Gestión de Redes versión 2 (SNMPv2) de la Universidad Carnegie Mellon.
77 Útil para administrar redes y hacer contabilidad.
78
79 %description -l pl
80 SNMP (Simple Network Management Protocol) jest protoko³em u¿ywanym do
81 zarz±dzania sieciami. Pakiet zawiera narzêdzia: rozbudowywalnego
82 agenta, bibliotekê SNMP, narzêdzia do odpytywania oraz ustawiania
83 informacji poprzez agentów SNMP, narzêdzia do generowania i obs³ugi
84 pu³apek SNMP, wersjê komendy netstat u¿ywaj±c± SNMP, przegl±darkê mib
85 w Tk/Perl, demona, dokumentacjê itp.
86
87 %description -l pt_BR
88 Este pacote é derivado da implementação do Protocolo Simples de
89 Gerenciamento de Redes versão 2 (SNMPv2) da Universidade Carnegie
90 Mellon. Útil para gerenciar redes e fazer contabilidade.
91
92 %description -l ru
93 SNMP (Simple Network Management Protocol) - ÜÔÏ ÐÒÏÔÏËÏÌ, ÉÓÐÏÌØÚÕÅÍÙÊ
94 ÄÌÑ ÕÐÒÁ×ÌÅÎÉÑ ÓÅÔØÀ (ÏÔÓÀÄÁ É ÎÁÚ×ÁÎÉÅ). ðÒÏÅËÔ net-snmp ×ËÌÀÞÁÅÔ
95 ÒÁÚÎÏÏÂÒÁÚÎÙÅ SNMP-ÕÔÉÌÉÔÙ: ÒÁÓÛÉÒÑÅÍÙÊ ÁÇÅÎÔ, ÂÉÂÌÉÏÔÅËÁ SNMP,
96 ÕÔÉÌÉÔÙ ÄÌÑ ÚÁÐÒÏÓÁ ÉÌÉ ÕÓÔÁÎÏ×ËÉ ÉÎÆÏÒÍÁÃÉÉ ÏÔ SNMP-ÁÇÅÎÔÏ×, ÕÔÉÌÉÔÙ
97 ÄÌÑ ÇÅÎÅÒÁÃÉÉ É ÏÂÒÁÂÏÔËÉ SNMP-ÔÒÁÐÏ×, ×ÅÒÓÉÑ ËÏÍÁÎÄÙ netstat,
98 ÉÓÐÏÌØÚÕÀÝÅÊ SNMP, É mib-ÂÒÁÕÚÅÒ ÎÁ Tk/Perl. üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ
99 ÄÅÍÏÎÙ snmpd É snmptrapd, ÄÏËÕÍÅÎÔÁÃÉÀ É Ô.Ä.
100
101 %description -l uk
102 SNMP (Simple Network Management Protocol) - ÃÅ ÐÒÏÔÏËÏÌ, ÑËÉÊ
103 ×ÉËÏÒÉÓÔÏ×ÕÀÔØ ÄÌÑ ËÅÒÕ×ÁÎÎÑ ÍÅÒÅÖÅÀ (ÚצÄÓÉ ¦ ÎÁÚ×Á). ðÒÏÅËÔ net-snmp
104 ͦÓÔÉÔØ Ò¦ÚÎÏÍÁΦÔΦ SNMP-ÕÔÉ̦ÔÉ: ÒÏÚÛÉÒÀ×ÁÎÉÊ ÁÇÅÎÔ, Â¦Â̦ÏÔÅËÁ
105 SNMP, ÕÔÉ̦ÔÉ ÄÌÑ ÚÁÐÒÏÓÕ ÔÁ ×ÓÔÁÎÏ×ÌÅÎÎÑ ¦ÎÆÏÒÍÁ槠צĠNMP-ÁÇÅÎÔ¦×,
106 ÕÔÉ̦ÔÉ ÄÌÑ ÇÅÎÅÒÁ槠ÔÁ ÏÂÒÏÂËÉ SNMP-ÔÒÁЦ×, ×ÅÒӦѠËÏÍÁÎÄÉ netstat,
107 ÑËÁ ×ÉËÏÒÉÓÔÏ×Õ¤ SNMP, ÔÁ mib-ÂÒÁÕÚÅÒ ÎÁ Tk/Perl. ãÅÊ ÐÁËÅԠͦÓÔÉÔØ
108 ÄÅÍÏÎÉ snmpd ÔÁ snmptrapd, ÄÏËÕÍÅÎÔÁæÀ ¦ Ô.¦.
109
110 %package libs
111 Summary:        NET SNMP libraries
112 Summary(pl):    Biblioteki SNMP
113 Group:          Libraries
114 Requires:       %{name}-mibs = %{version}-%{release}
115 Obsoletes:      net-snmp-compat-libs
116 Obsoletes:      ucd-snmp-libs
117
118 %description libs
119 NET SNMP libraries.
120
121 %description libs -l pl
122 Biblioteki SNMP.
123
124 %package devel
125 Summary:        The development environment for the net-snmp project
126 Summary(es):    Archivos de inclusión y bibliotecas para desarrollo en el SNMP de la UCD
127 Summary(pl):    Pliki dla programistów u¿ywaj±cych bibliotek net-snmp
128 Summary(pt_BR): Arquivos de inclusão e bibliotecas para desenvolvimento no SNMP da UCD
129 Summary(ru):    óÒÅÄÁ ÒÁÚÒÁÂÏÔËÉ ÄÌÑ ÐÒÏÅËÔÁ UCD-SNMP
130 Summary(uk):    óÅÒÅÄÏ×ÉÝÅ ÒÏÚÒÏÂËÉ ÄÌÑ ÐÒÏÅËÔÕ UCD-SNMP
131 Group:          Development/Libraries
132 Requires:       %{name}-libs = %{version}-%{release}
133 Requires:       elfutils-devel
134 Requires:       openssl-devel >= 0.9.7c
135 Obsoletes:      ucd-snmp-devel
136
137 %description devel
138 The ucd-snmp-devel package contains the development libraries and
139 header files for use with the net-snmp project's network management
140 tools.
141
142 %description devel -l es
143 Estas son las bibliotecas y archivos de inclusión para desarrollo con
144 el SNMP de la UCD. Con este paquete es posible la creación de
145 programas para uso en la gestión de redes.
146
147 %description devel -l pl
148 Pakiet zawiera pliki nag³ówkowe i biblioteki potrzebne do rozwoju
149 aplikacji u¿ywaj±cych protoko³u SNMP.
150
151 %description devel -l pt_BR
152 Estas são as bibliotecas e arquivos de inclusão para desenvolvimento
153 com o SNMP da UCD. Com este pacote é possível a criação de programas
154 para uso no gerenciamento de redes.
155
156 %description devel -l ru
157 ðÁËÅÔ ucd-snmp-devel ÓÏÄÅÒÖÉÔ ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ É ÈÅÄÅÒÁ ÄÌÑ
158 ÉÓÐÏÌØÚÏ×ÁÎÉÑ Ó ÕÔÉÌÉÔÁÍÉ ÕÐÒÁ×ÌÅÎÉÑ ÓÅÔØÀ ÐÒÏÅËÔÁ net-snmp.
159
160 %description devel -l uk
161 ðÁËÅÔ ucd-snmp-devel Í¦ÓÔÉÔؠ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ ÔÁ ÈÅÄÅÒÉ ÄÌÑ
162 ×ÉËÏÒÉÓÔÁÎÎÑ Ú ÕÔÉ̦ÔÁÍÉ ËÅÒÕ×ÁÎÎÑ ÍÅÒÅÖÅÀ ÐÒÏÅËÔÕ net-snmp.
163
164 %package static
165 Summary:        Static net-snmp libraries
166 Summary(pl):    Statyczne biblioteki net-snmp
167 Summary(pt_BR): Bibliotecas estáticas para desenvolvimento com ucd-snmp
168 Summary(ru):    óÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ÄÌÑ ÐÒÏÅËÔÁ net-snmp
169 Summary(uk):    óÔÁÔÉÞΦ Â¦Â̦ÏÔÅËÉ ÄÌÑ ÐÒÏÅËÔÕ net-snmp
170 Group:          Development/Libraries
171 Requires:       %{name}-devel = %{version}-%{release}
172 Obsoletes:      ucd-snmp-static
173
174 %description static
175 Static net-snmp libraries.
176
177 %description static -l pl
178 Statyczne biblioteki net-snmp.
179
180 %description static -l pt_BR
181 Bibliotecas estáticas para desenvolvimento com net-snmp.
182
183 %package compat-devel
184 Summary:        The development environment for the UCD-SNMP project
185 Summary(es):    Archivos de inclusión y bibliotecas para desarrollo en el SNMP de la UCD
186 Summary(pl):    Pliki dla programistów u¿ywaj±cych bibliotek UCD-SNMP
187 Summary(pt_BR): Arquivos de inclusão e bibliotecas para desenvolvimento no SNMP da UCD
188 Summary(ru):    óÒÅÄÁ ÒÁÚÒÁÂÏÔËÉ ÄÌÑ ÐÒÏÅËÔÁ UCD-SNMP
189 Summary(uk):    óÅÒÅÄÏ×ÉÝÅ ÒÏÚÒÏÂËÉ ÄÌÑ ÐÒÏÅËÔÕ UCD-SNMP
190 Group:          Development/Libraries
191 Requires:       %{name}-libs = %{version}-%{release}
192 Requires:       openssl-devel >= 0.9.7d
193 Obsoletes:      cmu-snmp-devel
194 Obsoletes:      ucd-snmp-devel
195
196 %description compat-devel
197 The ucd-snmp-devel package contains the development libraries and
198 header files for use with the UCD-SNMP project's network management
199 tools.
200
201 %description compat-devel -l es
202 Estas son las bibliotecas y archivos de inclusión para desarrollo con
203 el SNMP de la UCD. Con este paquete es posible la creación de
204 programas para uso en la gestión de redes.
205
206 %description compat-devel -l pl
207 Pakiet zawiera pliki nag³ówkowe i biblioteki potrzebne do rozwoju
208 aplikacji u¿ywaj±cych protoko³u SNMP.
209
210 %description compat-devel -l pt_BR
211 Estas são as bibliotecas e arquivos de inclusão para desenvolvimento
212 com o SNMP da UCD. Com este pacote é possível a criação de programas
213 para uso no gerenciamento de redes.
214
215 %description compat-devel -l ru
216 ðÁËÅÔ ucd-snmp-devel ÓÏÄÅÒÖÉÔ ÂÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ É ÈÅÄÅÒÁ ÄÌÑ
217 ÉÓÐÏÌØÚÏ×ÁÎÉÑ Ó ÕÔÉÌÉÔÁÍÉ ÕÐÒÁ×ÌÅÎÉÑ ÓÅÔØÀ ÐÒÏÅËÔÁ UCD-SNMP.
218
219 %description compat-devel -l uk
220 ðÁËÅÔ ucd-snmp-devel Í¦ÓÔÉÔؠ¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ ÔÁ ÈÅÄÅÒÉ ÄÌÑ
221 ×ÉËÏÒÉÓÔÁÎÎÑ Ú ÕÔÉ̦ÔÁÍÉ ËÅÒÕ×ÁÎÎÑ ÍÅÒÅÖÅÀ ÐÒÏÅËÔÕ UCD-SNMP.
222
223 %package compat-static
224 Summary:        Static UCD-SNMP libraries
225 Summary(pl):    Statyczne biblioteki UCD-SNMP
226 Summary(pt_BR): Bibliotecas estáticas para desenvolvimento com ucd-snmp
227 Summary(ru):    óÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ÄÌÑ ÐÒÏÅËÔÁ UCD-SNMP
228 Summary(uk):    óÔÁÔÉÞΦ Â¦Â̦ÏÔÅËÉ ÄÌÑ ÐÒÏÅËÔÕ UCD-SNMP
229 Group:          Development/Libraries
230 Requires:       %{name}-compat-devel = %{version}-%{release}
231 Obsoletes:      ucd-snmp-static
232
233 %description compat-static
234 Static UCD-SNMP libraries.
235
236 %description compat-static -l pl
237 Statyczne biblioteki UCD-SNMP.
238
239 %description compat-static -l pt_BR
240 Bibliotecas estáticas para desenvolvimento com ucd-snmp.
241
242 %package mibs
243 Summary:        MIB database
244 Summary(pl):    Baza danych MIB
245 Group:          Applications/System
246 Conflicts:      ucd-snmp-libs
247
248 %description mibs
249 MIB database.
250
251 %description mibs -l pl
252 Baza danych MIB.
253
254 %package snmptrapd
255 Summary:        SNMP trap daemon
256 Summary(pl):    Demon obs³uguj±cy pu³apki SNMP
257 Group:          Applications/System
258 PreReq:         %{name} = %{version}-%{release}
259 PreReq:         rc-scripts >= 0.2.0
260 Requires(post,preun):   /sbin/chkconfig
261 Obsoletes:      cmu-snmp-utils
262 Obsoletes:      ucd-snmp-snmptrapd
263
264 %description snmptrapd
265 The ucd-snmp-snmptrapd package contains snmp trap daemon.
266
267 %description snmptrapd -l pl
268 Pakiet zawiera demon obs³uguj±cy pu³apki SNMP.
269
270 %package utils
271 Summary:        Network management utilities using SNMP, from the NET-SNMP project
272 Summary(es):    Utilitarios del SNMP de la UCD
273 Summary(pl):    Narzêdzia u¿ywaj±ce protoko³u SNMP
274 Summary(pt_BR): Utilitários do SNMP da UCD
275 Summary(ru):    õÔÉÌÉÔÙ ÕÐÒÁ×ÌÅÎÉÑ ÓÅÔØÀ ÐÏ SNMP ÉÚ ÐÒÏÅËÔÁ NET-SNMP
276 Summary(uk):    õÔÉ̦ÔÉ ËÅÒÕ×ÁÎÎÑ ÍÅÒÅÖÅÀ ÐÏ SNMP Ú ÐÒÏÅËÔÕ NET-SNMP
277 Group:          Applications/System
278 Requires:       %{name}-libs = %{version}-%{release}
279 Obsoletes:      cmu-snmp-utils
280 Obsoletes:      ucd-snmp-utils
281
282 %description utils
283 This package contains various utilities for managing your network
284 using the SNMP protocol.
285
286 %description utils -l es
287 Varios utilitarios para uso con el SNMP de la UCD. Contiene
288 utilitarios como: snmpwalk, snmptest y otros.
289
290 %description utils -l pl
291 Ró¿nego rodzaju narzêdzia do zarz±dzania sieci± przy u¿yciu protoko³u
292 SNMP.
293
294 %description utils -l pt_BR
295 Vários utilitários para uso com o SNMP da UCD. Contém utilitários
296 como: snmpwalk, snmptest e outros.
297
298 %description utils -l ru
299 ðÁËÅÔ ucd-snmp-utils ÓÏÄÅÒÖÉÔ ÒÁÚÎÏÏÂÒÁÚÎÙÅ ÕÔÉÌÉÔÙ ÄÌÑ ÉÓÐÏÌØÚÏ×ÁÎÉÑ
300 × ÐÒÏÅËÔÅ ÕÐÒÁ×ÌÅÎÉÑ ÓÅÔØÀ net-snmp.
301
302 %description utils -l uk
303 ðÁËÅÔ ucd-snmp-utils Í¦ÓÔÉÔØ Ò¦ÚÎÏÍÁΦÔΦ ÕÔÉ̦ÔÉ ÄÌÑ ×ÉËÏÒÉÓÔÁÎÎÑ ×
304 ÐÒÏÅËÔ¦ ËÅÒÕ×ÁÎÎÑ ÍÅÒÅÖÅÀ net-snmp.
305
306 %package -n perl-SNMP
307 Summary:        SNMP and NetSNMP::* Perl modules
308 Summary(pl):    Modu³y Perla SNMP oraz NetSNMP::*
309 Group:          Development/Languages/Perl
310 Requires:       %{name}-libs = %{version}-%{release}
311 Conflicts:      ucd-snmp-utils-perl
312
313 %description -n perl-SNMP
314 SNMP and NetSNMP::* Perl modules - Perl interface to net-snmp.
315
316 %description -n perl-SNMP -l pl
317 Modu³y Perla SNMP oraz NetSNMP::* - perlowy interfejs do net-snmp.
318
319 %package utils-perl
320 Summary:        Perl utilities for network management using SNMP
321 Summary(pl):    Perlowe narzêdzia u¿ywaj±ce protoko³u SNMP
322 Group:          Applications/System
323 Requires:       perl-SNMP = %{version}-%{release}
324 Obsoletes:      cmu-snmp-utils
325 Obsoletes:      ucd-snmp-utils-perl
326
327 %description utils-perl
328 This package contains various Perl utilities for managing your network
329 using the SNMP protocol.
330
331 %description utils-perl -l pl
332 Perlowe narzêdzia do zarz±dzania sieci± przy u¿yciu protoko³u SNMP.
333
334 %package snmpconf
335 Summary:        snmpconf - creating and modifying SNMP configuration files
336 Summary(pl):    snmpconf - tworzenie i modyfikowanie plików konfiguracyjnych SNMP
337 Group:          Applications/System
338 Requires:       %{name} = %{version}-%{release}
339 Requires:       perl-SNMP = %{version}-%{release}
340
341 %description snmpconf
342 snmpconf is a simple Perl script that walks you through setting up a
343 configuration file step by step. It should be fairly straight forward
344 to use.
345
346 %description snmpconf -l pl
347 snmpconf to prosty skrypt Perla pozwalaj±cy na tworzenie pliku
348 konfiguracyjnego krok po kroku. Powinien byæ w miarê prosty w u¿yciu.
349
350 %package tkmib
351 Summary:        MIB browser in Tk
352 Summary(pl):    Przegl±darka MIB-ów w Tk
353 Group:          Applications/System
354 Requires:       perl-SNMP = %{version}-%{release}
355 Requires:       perl-Tk
356
357 %description tkmib
358 MIB browser in Tk.
359
360 %description tkmib -l pl
361 Przegl±darka MIB-ów w Tk.
362
363 %prep
364 %setup -q -a7 -a8
365 %patch0 -p1
366 %patch1 -p1
367 %patch2 -p1
368 %patch3 -p1
369 %patch4 -p1
370 %patch5 -p1
371 %patch6 -p1
372 %patch7 -p1
373 %patch8 -p1
374 %patch9 -p1
375 %patch10 -p1
376 %patch11 -p0
377
378 %build
379 %{__libtoolize}
380 %{__aclocal}
381 %{__autoheader}
382 %{__autoconf}
383 %configure \
384         --with-logfile="%{logfile}" \
385         --with-cflags="%{rpmcflags} -I%{_includedir}/rpm" \
386         --with-ldflags="%{rpmldflags}" \
387         --with-transports="UDP UDPIPv6 TCP TCPIPv6 Unix Callback " \
388         --with-sys-location="Unknown" \
389         --with-mib-modules="host disman/event-mib smux mibII/mta_sendmail \
390                 agentx target misc/ipfwacc tunnel" \
391         --with-libwrap \
392         --with-openssl \
393         --disable-debugging \
394         --with-persistent-directory="/var/lib/net-snmp" \
395         --enable-ipv6 \
396         --with-sys-contact="root@localhost" \
397         --enable-ucd-snmp-compatibility \
398         --with-defaults \
399         --with-default-snmp-version=3 \
400         --enable-shared
401
402 #       --enable-reentrant is broken - snmpd deadlocks on send (tries to lock the same mutex twice):
403 #   #4  0xb760f54e in siglongjmp () from /lib/tls/libpthread.so.0
404 #   #5  0xb7e5e0cf in snmp_res_lock (groupID=0, resourceID=1) at mt_support.c:103
405 #   #6  0xb7e45698 in snmp_sess_pointer (session=0x80ff868) at snmp_api.c:6975
406 #   #7  0xb7e41aca in snmp_async_send (session=0x80ff868, pdu=0x8141848, callback=0, cb_data=0x0)
407 #       at snmp_api.c:4564
408 #   #8  0xb7e41a6d in snmp_send (session=0x80ff868, pdu=0x8141848) at snmp_api.c:4551
409 #   #9  0xb7ebf6fd in netsnmp_wrap_up_request (asp=0x812d828, status=0) at snmp_agent.c:1627
410 #   #10 0xb7ec12e3 in netsnmp_handle_request (asp=0x812d828, status=0) at snmp_agent.c:2996
411 #   #11 0xb7ebfa65 in handle_snmp_packet (op=1, session=0x80ff868, reqid=628270607, pdu=0x81419b8,
412 #       magic=0x0) at snmp_agent.c:1792
413 #   #12 0xb7e42b1c in _sess_process_packet (sessp=0x812c970, sp=0x80ff868, isp=0x812c698,
414 #       transport=0x8142028, opaque=0x812c1a0, olength=16,
415 #       packetptr=0x8145cb8 "0f\002\001\0030\021\002\004c [Ç\002\003", length=104) at snmp_api.c:5208
416 #   #13 0xb7e434e6 in _sess_read (sessp=0x812c970, fdset=0xbfffe0e0) at snmp_api.c:5606
417 #   #14 0xb7e43535 in snmp_sess_read (sessp=0x812c970, fdset=0xbfffe0e0) at snmp_api.c:5625
418 #   #15 0xb7e42c44 in snmp_read (fdset=0xbfffe0e0) at snmp_api.c:5260
419 #   #16 0x0804bbe5 in receive () at snmpd.c:1149
420 #   #17 0x0804b53d in main (argc=5, argv=0xbffff344) at snmpd.c:993
421 # [res mutex with groupID=0, resourceID=1 already locked in snmp_read() at snmp_api.c:5258]
422
423 # build this subdir first. it's causing STRANGE compile failures # otherwise (for me at least). glen
424 %{__make} -C agent/mibgroup
425 %{__make}
426
427 TDIR="`pwd`"
428 cd perl
429 sed -e "s@-L/usr/lib@-L${TDIR}/snmplib/.libs -L${TDIR}/agent/.libs -L${TDIR}/agent/helpers/.libs@" \
430         ../net-snmp-config > net-snmp-config
431 chmod +x net-snmp-config
432
433 PATH=`pwd`:$PATH \
434 %{__perl} Makefile.PL \
435         INSTALLDIRS=vendor \
436         OPTIMIZE="%{rpmcflags} -I`pwd`/../include" \
437         </dev/null
438 # avoid rpaths generated by MakeMaker
439 perl -pi -e 's@LD_RUN_PATH="\$\(LD_RUN_PATH\)" @@' */Makefile */*/Makefile
440
441 %{__make} \
442         LDFLAGS="%{rpmldflags}"
443
444 %install
445 rm -rf $RPM_BUILD_ROOT
446 install -d $RPM_BUILD_ROOT{/etc/{snmp,rc.d/init.d,sysconfig},/var/log}
447
448 %{__make} install \
449         INSTALL_PREFIX=$RPM_BUILD_ROOT
450
451 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.conf
452 :> $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.local.conf
453 :> $RPM_BUILD_ROOT%{logfile}
454
455 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/snmpd
456 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.conf
457 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/snmpd
458
459 install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/snmptrapd
460 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmptrapd.conf
461 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/snmptrapd
462
463 #install agent/mibgroup/ipfwchains/IPFWCHAINS-MIB.txt \
464 #       $RPM_BUILD_ROOT%{_datadir}/snmp/mibs
465
466 cd perl
467 %{__make} install \
468         DESTDIR=$RPM_BUILD_ROOT
469
470 install -d $RPM_BUILD_ROOT%{_examplesdir}/perl-SNMP-%{version}
471 install SNMP/examples/*.pl $RPM_BUILD_ROOT%{_examplesdir}/perl-SNMP-%{version}
472 cd ..
473
474 # IP-Filter (non-Linux)
475 rm -f $RPM_BUILD_ROOT%{_bindir}/ipf-mod.pl
476
477 # Juniper MIBs:
478 install JuniperMibs/*.txt $RPM_BUILD_ROOT%{_datadir}/snmp/mibs
479
480 # Standard MIBs (Required by Juniper MIBs)
481 install StandardMibs/*.txt $RPM_BUILD_ROOT%{_datadir}/snmp/mibs
482
483 %clean
484 rm -rf $RPM_BUILD_ROOT
485
486 %post
487 /sbin/chkconfig --add snmpd
488 if [ -f /var/lock/subsys/snmpd ]; then
489         /etc/rc.d/init.d/snmpd restart >&2
490 else
491         %banner %{name} -e <<EOF
492 Run \"/etc/rc.d/init.d/snmpd start\" to start snmpd daemon.
493 EOF
494 #" vim
495 fi
496 touch %{logfile}
497 chmod 640 %{logfile}
498
499 %preun
500 if [ "$1" = "0" ]; then
501         if [ -f /var/lock/subsys/snmpd ]; then
502                 /etc/rc.d/init.d/snmpd stop >&2
503         fi
504         /sbin/chkconfig --del snmpd
505 fi
506
507 %post   libs -p /sbin/ldconfig
508 %postun libs -p /sbin/ldconfig
509
510 %post snmptrapd
511 /sbin/chkconfig --add snmptrapd
512 if [ -f /var/lock/subsys/snmptrapd ]; then
513         /etc/rc.d/init.d/snmptrapd restart >&2
514 else
515         %banner %{name}-snmptrapd -e <<EOF
516 Run \"/etc/rc.d/init.d/snmptrapd start\" to start snmp trap daemon.
517 EOF
518 #" vim
519 fi
520 touch %{logfile}
521 chmod 640 %{logfile}
522
523 %preun snmptrapd
524 if [ "$1" = "0" ]; then
525         if [ -f /var/lock/subsys/snmptrapd ]; then
526                 /etc/rc.d/init.d/snmptrapd stop >&2
527         fi
528         /sbin/chkconfig --del snmptrapd
529 fi
530
531 %files
532 %defattr(644,root,root,755)
533 %doc README local
534 %doc ChangeLog EXAMPLE.conf.def EXAMPLE.conf
535 %doc FAQ NEWS PORTING README.snmpv3 TODO AGENT.txt
536
537 %attr(754,root,root) /etc/rc.d/init.d/snmpd
538 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/snmpd
539
540 %dir %{_sysconfdir}/snmp
541 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.conf
542 %attr(640,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.local.conf
543
544 %attr(755,root,root) %{_sbindir}/snmpd
545
546 %{_mandir}/man5/snmpd.conf.5*
547 %{_mandir}/man5/variables.5*
548 %{_mandir}/man8/snmpd.8*
549
550 %attr(640,root,root) %ghost %{logfile}
551
552 %files libs
553 %defattr(644,root,root,755)
554 %attr(755,root,root) %{_libdir}/libnet*.so.*.*
555
556 %files devel
557 %defattr(644,root,root,755)
558 %attr(755,root,root) %{_bindir}/mib2c
559 %attr(755,root,root) %{_bindir}/mib2c-update
560 %attr(755,root,root) %{_bindir}/net-snmp-config
561 %attr(755,root,root) %{_libdir}/libnet*[a-z].so
562 %{_libdir}/libnet*.la
563 %{_includedir}/net-snmp
564 %{_datadir}/snmp/mib2c*
565 %{_mandir}/man1/mib2c.1*
566 %{_mandir}/man3/[!NS]*
567 %{_mandir}/man5/mib2c.conf.5*
568
569 %files static
570 %defattr(644,root,root,755)
571 %{_libdir}/libnet*.a
572
573 %files compat-devel
574 %defattr(644,root,root,755)
575 %attr(755,root,root) %{_libdir}/libsnmp.so
576 %{_libdir}/libsnmp.la
577 %{_includedir}/ucd-snmp
578
579 %files compat-static
580 %defattr(644,root,root,755)
581 %{_libdir}/libsnmp.a
582
583 %files mibs
584 %defattr(644,root,root,755)
585 %dir %{_datadir}/snmp
586 %{_datadir}/snmp/mibs
587
588 %files snmptrapd
589 %defattr(644,root,root,755)
590 %attr(755,root,root) %{_sbindir}/snmptrapd
591 %attr(754,root,root) /etc/rc.d/init.d/snmptrapd
592 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/snmptrapd
593 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmptrapd.conf
594 %attr(755,root,root) %{_datadir}/snmp/snmp_perl_trapd.pl
595 %{_mandir}/man5/snmptrapd.conf.5*
596 %{_mandir}/man8/snmptrapd.8*
597
598 %files utils
599 %defattr(644,root,root,755)
600 %attr(755,root,root) %{_bindir}/encode_keychange
601 %attr(755,root,root) %{_bindir}/snmpbulkget
602 %attr(755,root,root) %{_bindir}/snmpbulkwalk
603 %attr(755,root,root) %{_bindir}/snmpdelta
604 %attr(755,root,root) %{_bindir}/snmpdf
605 %attr(755,root,root) %{_bindir}/snmpget
606 %attr(755,root,root) %{_bindir}/snmpgetnext
607 %attr(755,root,root) %{_bindir}/snmpinform
608 %attr(755,root,root) %{_bindir}/snmpnetstat
609 %attr(755,root,root) %{_bindir}/snmpset
610 %attr(755,root,root) %{_bindir}/snmpstatus
611 %attr(755,root,root) %{_bindir}/snmptable
612 %attr(755,root,root) %{_bindir}/snmptest
613 %attr(755,root,root) %{_bindir}/snmptranslate
614 %attr(755,root,root) %{_bindir}/snmptrap
615 %attr(755,root,root) %{_bindir}/snmpusm
616 %attr(755,root,root) %{_bindir}/snmpvacm
617 %attr(755,root,root) %{_bindir}/snmpwalk
618
619 %{_mandir}/man1/snmpbulkget.1*
620 %{_mandir}/man1/snmpbulkwalk.1*
621 %{_mandir}/man1/snmpcmd.1*
622 %{_mandir}/man1/snmpdelta.1*
623 %{_mandir}/man1/snmpdf.1*
624 %{_mandir}/man1/snmpget.1*
625 %{_mandir}/man1/snmpgetnext.1*
626 %{_mandir}/man1/snmpinform.1*
627 %{_mandir}/man1/snmpnetstat.1*
628 %{_mandir}/man1/snmpset.1*
629 %{_mandir}/man1/snmpstatus.1*
630 %{_mandir}/man1/snmptable.1*
631 %{_mandir}/man1/snmptest.1*
632 %{_mandir}/man1/snmptranslate.1*
633 %{_mandir}/man1/snmptrap.1*
634 %{_mandir}/man1/snmpusm.1*
635 %{_mandir}/man1/snmpvacm.1*
636 %{_mandir}/man1/snmpwalk.1*
637 %{_mandir}/man5/snmp.conf.5*
638 %{_mandir}/man5/snmp_config.5*
639
640 %files -n perl-SNMP
641 %defattr(644,root,root,755)
642 %doc perl/SNMP/{BUG,README,TODO} perl/SNMP/examples
643 %{perl_vendorarch}/SNMP.pm
644 %{perl_vendorarch}/NetSNMP
645 %dir %{perl_vendorarch}/auto/SNMP
646 %{perl_vendorarch}/auto/SNMP/autosplit.ix
647 %{perl_vendorarch}/auto/SNMP/SNMP.bs
648 %attr(755,root,root) %{perl_vendorarch}/auto/SNMP/SNMP.so
649 %dir %{perl_vendorarch}/auto/NetSNMP
650 %dir %{perl_vendorarch}/auto/NetSNMP/*
651 %{perl_vendorarch}/auto/NetSNMP/*/autosplit.ix
652 %{perl_vendorarch}/auto/NetSNMP/*/*.bs
653 %attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/*/*.so
654 %dir %{perl_vendorarch}/auto/NetSNMP/agent/default_store
655 %{perl_vendorarch}/auto/NetSNMP/agent/default_store/autosplit.ix
656 %{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.bs
657 %attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.so
658 %{_mandir}/man3/NetSNMP::*.3*
659 %{_mandir}/man3/SNMP.3*
660 %{_examplesdir}/perl-SNMP-%{version}
661
662 %files utils-perl
663 %defattr(644,root,root,755)
664 %attr(755,root,root) %{_bindir}/fixproc
665 %attr(755,root,root) %{_bindir}/snmpcheck
666 %attr(755,root,root) %{_bindir}/traptoemail
667
668 %files snmpconf
669 %defattr(644,root,root,755)
670 %attr(755,root,root) %{_bindir}/snmpconf
671 %{_mandir}/man1/snmpconf.1*
672 %{_datadir}/snmp/snmpconf-data
673
674 %files tkmib
675 %defattr(644,root,root,755)
676 %attr(755,root,root) %{_bindir}/tkmib
This page took 0.083328 seconds and 4 git commands to generate.