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