]>
Commit | Line | Data |
---|---|---|
6139ec4c | 1 | # TODO |
bd0af1d5 ER |
2 | # - package or remove: |
3 | # %{_datadir}/snmp/snmp_perl.pl | |
831f13c1 ER |
4 | # - make noarch -n mibs-net-snmp package (need separate .spec then) |
5 | # - FHS: #define NETSNMP_AGENTX_SOCKET "/var/agentx/master" | |
94a3f7ae | 6 | # - php-snmp (and likely other bindings) use only %{_libdir}/libnetsnmp.so.*, move other libs back to main (daemon) package? |
419af13d ER |
7 | # /usr/lib64/python2.4/site-packages/netsnmp_python-1.0a1-py2.4.egg-info/PKG-INFO |
8 | # /usr/lib64/python2.4/site-packages/netsnmp_python-1.0a1-py2.4.egg-info/SOURCES.txt | |
9 | # /usr/lib64/python2.4/site-packages/netsnmp_python-1.0a1-py2.4.egg-info/dependency_links.txt | |
10 | # /usr/lib64/python2.4/site-packages/netsnmp_python-1.0a1-py2.4.egg-info/top_level.txt | |
11 | # /usr/share/snmp/snmp_perl.pl | |
6139ec4c | 12 | # |
13 | # Conditional build: | |
14 | %bcond_without autodeps # don't BR packages only for deps resolving | |
15 | %bcond_without rpm # don't include RPM support | |
16 | %bcond_without kerberos5 # don't include kerberos support | |
17 | %bcond_without lm_sensors # don't include sensors support | |
18 | %bcond_without perl # don't include Perl modules and utils | |
19 | %bcond_without python # don't include Python modules | |
1807fdee | 20 | %bcond_without static_libs # don't build static library |
831f13c1 ER |
21 | |
22 | %ifnarch %{ix86} %{x8664} | |
23 | %undefine with_lm_sensors | |
24 | %endif | |
25 | ||
6139ec4c | 26 | %include /usr/lib/rpm/macros.perl |
27 | Summary: A collection of SNMP protocol tools | |
28 | Summary(es.UTF-8): Agente SNMP de la UCD | |
29 | Summary(pl.UTF-8): Kolekcja narzędzi do obsługi protokołu SNMP | |
30 | Summary(pt_BR.UTF-8): Agente SNMP da UCD | |
31 | Summary(ru.UTF-8): Набор утилит для протокола SNMP от UC-Davis | |
32 | Summary(uk.UTF-8): Набір утиліт для протоколу SNMP від UC-Davis | |
33 | Name: net-snmp | |
419af13d | 34 | Version: 5.4.4 |
d3bddfd5 | 35 | Release: 4 |
6139ec4c | 36 | License: BSD-like |
37 | Group: Networking/Daemons | |
edb8ffd9 | 38 | Source0: http://downloads.sourceforge.net/net-snmp/%{name}-%{version}.tar.gz |
419af13d | 39 | # Source0-md5: 95aa054f3c99a1ce242807d7eaf98619 |
6139ec4c | 40 | Source1: %{name}d.init |
41 | Source2: %{name}d.conf | |
42 | Source3: %{name}d.sysconfig | |
43 | Source4: %{name}trapd.init | |
44 | Source5: %{name}trapd.conf | |
45 | Source6: %{name}trapd.sysconfig | |
46 | Source7: ucd-ipchains.tar.gz | |
47 | # Source7-md5: 29949f1008f1a04d6efefd5b3ea607da | |
d3bddfd5 | 48 | Source9: snmpd.logrotate |
6139ec4c | 49 | Patch0: %{name}-acfix.patch |
6139ec4c | 50 | Patch2: %{name}-config-noflags.patch |
51 | Patch3: %{name}-manpage.patch | |
52 | Patch4: %{name}-link.patch | |
53 | Patch5: %{name}-llinterfaces.patch | |
54 | Patch6: %{name}-kernel_headers.patch | |
55 | Patch7: %{name}-rpmpath.patch | |
56 | Patch8: %{name}-snmpksm.patch | |
57 | Patch9: %{name}-python.patch | |
58 | Patch10: %{name}-lvalue.patch | |
ab44d410 | 59 | Patch11: %{name}-defaultconfig.patch |
fa2e0322 | 60 | Patch12: %{name}-use-rpm-hrmib.patch |
f0bff576 | 61 | Patch13: %{name}-snmpnetstat-getbulk.patch |
f0bff576 | 62 | Patch16: %{name}-netlink.patch |
77131bc8 | 63 | Patch19: %{name}-loadave-writable.patch |
edb8ffd9 | 64 | Patch20: %{name}-logging.patch |
6139ec4c | 65 | URL: http://www.net-snmp.org/ |
66 | BuildRequires: autoconf >= 2.61-3 | |
67 | BuildRequires: automake | |
68 | BuildRequires: elfutils-devel | |
917dbec5 | 69 | %{?with_kerberos5:BuildRequires: heimdal-devel} |
5712d213 | 70 | BuildRequires: libnl-devel >= 0.5.0 |
6139ec4c | 71 | BuildRequires: libtool >= 1.4 |
72 | BuildRequires: libwrap-devel | |
73 | %{?with_lm_sensors:BuildRequires: lm_sensors-devel} | |
74 | BuildRequires: openssl-devel >= 0.9.7d | |
75 | %{?with_autodeps:BuildRequires: perl-Term-ReadKey} | |
76 | BuildRequires: perl-devel >= 1:5.8.0 | |
77 | %if %{with python} | |
917dbec5 | 78 | BuildRequires: python-devel |
77131bc8 | 79 | BuildRequires: python-modules |
6139ec4c | 80 | BuildRequires: python-setuptools |
77131bc8 | 81 | BuildRequires: rpm-pythonprov |
6139ec4c | 82 | %endif |
83 | %if %{with rpm} | |
c90fcf09 | 84 | BuildRequires: rpm |
6139ec4c | 85 | BuildRequires: rpm-perlprov >= 3.0.3-16 |
86 | %endif | |
6139ec4c | 87 | BuildRequires: rpmbuild(macros) >= 1.268 |
88 | Requires(post,preun): /sbin/chkconfig | |
89 | Requires: %{name}-libs = %{version}-%{release} | |
90 | Requires: /usr/bin/setsid | |
831f13c1 | 91 | Requires: mibs-%{name} = %{version}-%{release} |
6139ec4c | 92 | Requires: rc-scripts >= 0.2.0 |
93 | Provides: snmpd | |
94 | Obsoletes: cmu-snmp | |
95 | Obsoletes: snmpd | |
96 | Obsoletes: ucd-snmp | |
4f7bc2fc | 97 | Conflicts: rpm < 4.4.9-43.11 |
6139ec4c | 98 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
99 | ||
7753e26c ER |
100 | # linking libraries is ugly in this package |
101 | %define no_install_post_check_so 1 | |
102 | ||
6139ec4c | 103 | %define logfile /var/log/snmpd.log |
6139ec4c | 104 | |
105 | %description | |
106 | SNMP (Simple Network Management Protocol) is a protocol used for | |
107 | network management (hence the name). The net-snmp project includes | |
108 | various SNMP tools: an extensible agent, an SNMP library, tools for | |
109 | requesting or setting information from SNMP agents, tools for | |
110 | generating and handling SNMP traps, a version of the netstat command | |
111 | which uses SNMP, and a Tk/Perl mib browser. This package contains the | |
112 | snmpd daemon, documentation, etc. | |
113 | ||
114 | %description -l es.UTF-8 | |
115 | Este paquete se deriva de la implementación del Protocolo Simple de | |
116 | Gestión de Redes versión 2 (SNMPv2) de la Universidad Carnegie Mellon. | |
117 | Útil para administrar redes y hacer contabilidad. | |
118 | ||
119 | %description -l pl.UTF-8 | |
120 | SNMP (Simple Network Management Protocol) jest protokołem używanym do | |
121 | zarządzania sieciami. Pakiet zawiera narzędzia: rozbudowywalnego | |
122 | agenta, bibliotekę SNMP, narzędzia do odpytywania oraz ustawiania | |
123 | informacji poprzez agentów SNMP, narzędzia do generowania i obsługi | |
124 | pułapek SNMP, wersję komendy netstat używającą SNMP, przeglądarkę mib | |
125 | w Tk/Perl, demona, dokumentację itp. | |
126 | ||
127 | %description -l pt_BR.UTF-8 | |
128 | Este pacote é derivado da implementação do Protocolo Simples de | |
129 | Gerenciamento de Redes versão 2 (SNMPv2) da Universidade Carnegie | |
130 | Mellon. Útil para gerenciar redes e fazer contabilidade. | |
131 | ||
132 | %description -l ru.UTF-8 | |
133 | SNMP (Simple Network Management Protocol) - это протокол, используемый | |
134 | для управления сетью (отсюда и название). Проект net-snmp включает | |
135 | разнообразные SNMP-утилиты: расширяемый агент, библиотека SNMP, | |
136 | утилиты для запроса или установки информации от SNMP-агентов, утилиты | |
137 | для генерации и обработки SNMP-трапов, версия команды netstat, | |
138 | использующей SNMP, и mib-браузер на Tk/Perl. Этот пакет содержит | |
139 | демоны snmpd и snmptrapd, документацию и т.д. | |
140 | ||
141 | %description -l uk.UTF-8 | |
142 | SNMP (Simple Network Management Protocol) - це протокол, який | |
143 | використовують для керування мережею (звідси і назва). Проект net-snmp | |
144 | містить різноманітні SNMP-утиліти: розширюваний агент, бібліотека | |
145 | SNMP, утиліти для запросу та встановлення інформації від NMP-агентів, | |
146 | утиліти для генерації та обробки SNMP-трапів, версія команди netstat, | |
147 | яка використовує SNMP, та mib-браузер на Tk/Perl. Цей пакет містить | |
148 | демони snmpd та snmptrapd, документацію і т.і. | |
149 | ||
150 | %package libs | |
151 | Summary: NET SNMP libraries | |
152 | Summary(pl.UTF-8): Biblioteki SNMP | |
153 | Group: Libraries | |
831f13c1 | 154 | Suggests: mibs-%{name} |
6139ec4c | 155 | Obsoletes: net-snmp-compat-libs |
156 | Obsoletes: ucd-snmp-libs | |
157 | ||
158 | %description libs | |
159 | NET SNMP libraries. | |
160 | ||
161 | %description libs -l pl.UTF-8 | |
162 | Biblioteki SNMP. | |
163 | ||
164 | %package devel | |
165 | Summary: The development environment for the net-snmp project | |
166 | Summary(es.UTF-8): Archivos de inclusión y bibliotecas para desarrollo en el SNMP de la UCD | |
167 | Summary(pl.UTF-8): Pliki dla programistów używających bibliotek net-snmp | |
168 | Summary(pt_BR.UTF-8): Arquivos de inclusão e bibliotecas para desenvolvimento no SNMP da UCD | |
169 | Summary(ru.UTF-8): Среда разработки для проекта UCD-SNMP | |
170 | Summary(uk.UTF-8): Середовище розробки для проекту UCD-SNMP | |
171 | Group: Development/Libraries | |
172 | Requires: %{name}-libs = %{version}-%{release} | |
173 | Requires: elfutils-devel | |
7b49308b | 174 | %{?with_kerberos5:Requires: heimdal-devel} |
6139ec4c | 175 | Requires: libwrap-devel |
176 | %{?with_lm_sensors:Requires: lm_sensors-devel} | |
177 | Requires: openssl-devel >= 0.9.7c | |
6139ec4c | 178 | Obsoletes: ucd-snmp-devel |
179 | ||
180 | %description devel | |
181 | The ucd-snmp-devel package contains the development libraries and | |
182 | header files for use with the net-snmp project's network management | |
183 | tools. | |
184 | ||
185 | %description devel -l es.UTF-8 | |
186 | Estas son las bibliotecas y archivos de inclusión para desarrollo con | |
187 | el SNMP de la UCD. Con este paquete es posible la creación de | |
188 | programas para uso en la gestión de redes. | |
189 | ||
190 | %description devel -l pl.UTF-8 | |
191 | Pakiet zawiera pliki nagłówkowe i biblioteki potrzebne do rozwoju | |
192 | aplikacji używających protokołu SNMP. | |
193 | ||
194 | %description devel -l pt_BR.UTF-8 | |
195 | Estas são as bibliotecas e arquivos de inclusão para desenvolvimento | |
196 | com o SNMP da UCD. Com este pacote é possível a criação de programas | |
197 | para uso no gerenciamento de redes. | |
198 | ||
199 | %description devel -l ru.UTF-8 | |
200 | Пакет ucd-snmp-devel содержит библиотеки разработчика и хедера для | |
201 | использования с утилитами управления сетью проекта net-snmp. | |
202 | ||
203 | %description devel -l uk.UTF-8 | |
204 | Пакет ucd-snmp-devel містить бібліотеки програміста та хедери для | |
205 | використання з утилітами керування мережею проекту net-snmp. | |
206 | ||
207 | %package static | |
208 | Summary: Static net-snmp libraries | |
209 | Summary(pl.UTF-8): Statyczne biblioteki net-snmp | |
210 | Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com ucd-snmp | |
211 | Summary(ru.UTF-8): Статические библиотеки для проекта net-snmp | |
212 | Summary(uk.UTF-8): Статичні бібліотеки для проекту net-snmp | |
213 | Group: Development/Libraries | |
214 | Requires: %{name}-devel = %{version}-%{release} | |
215 | Obsoletes: ucd-snmp-static | |
216 | ||
217 | %description static | |
218 | Static net-snmp libraries. | |
219 | ||
220 | %description static -l pl.UTF-8 | |
221 | Statyczne biblioteki net-snmp. | |
222 | ||
223 | %description static -l pt_BR.UTF-8 | |
224 | Bibliotecas estáticas para desenvolvimento com net-snmp. | |
225 | ||
226 | %package compat-devel | |
227 | Summary: The development environment for the UCD-SNMP project | |
228 | Summary(es.UTF-8): Archivos de inclusión y bibliotecas para desarrollo en el SNMP de la UCD | |
229 | Summary(pl.UTF-8): Pliki dla programistów używających bibliotek UCD-SNMP | |
230 | Summary(pt_BR.UTF-8): Arquivos de inclusão e bibliotecas para desenvolvimento no SNMP da UCD | |
231 | Summary(ru.UTF-8): Среда разработки для проекта UCD-SNMP | |
232 | Summary(uk.UTF-8): Середовище розробки для проекту UCD-SNMP | |
233 | Group: Development/Libraries | |
234 | Requires: %{name}-libs = %{version}-%{release} | |
235 | Requires: openssl-devel >= 0.9.7d | |
236 | Obsoletes: cmu-snmp-devel | |
237 | Obsoletes: ucd-snmp-devel | |
238 | ||
239 | %description compat-devel | |
240 | The ucd-snmp-devel package contains the development libraries and | |
241 | header files for use with the UCD-SNMP project's network management | |
242 | tools. | |
243 | ||
244 | %description compat-devel -l es.UTF-8 | |
245 | Estas son las bibliotecas y archivos de inclusión para desarrollo con | |
246 | el SNMP de la UCD. Con este paquete es posible la creación de | |
247 | programas para uso en la gestión de redes. | |
248 | ||
249 | %description compat-devel -l pl.UTF-8 | |
250 | Pakiet zawiera pliki nagłówkowe i biblioteki potrzebne do rozwoju | |
251 | aplikacji używających protokołu SNMP. | |
252 | ||
253 | %description compat-devel -l pt_BR.UTF-8 | |
254 | Estas são as bibliotecas e arquivos de inclusão para desenvolvimento | |
255 | com o SNMP da UCD. Com este pacote é possível a criação de programas | |
256 | para uso no gerenciamento de redes. | |
257 | ||
258 | %description compat-devel -l ru.UTF-8 | |
259 | Пакет ucd-snmp-devel содержит библиотеки разработчика и хедера для | |
260 | использования с утилитами управления сетью проекта UCD-SNMP. | |
261 | ||
262 | %description compat-devel -l uk.UTF-8 | |
263 | Пакет ucd-snmp-devel містить бібліотеки програміста та хедери для | |
264 | використання з утилітами керування мережею проекту UCD-SNMP. | |
265 | ||
266 | %package compat-static | |
267 | Summary: Static UCD-SNMP libraries | |
268 | Summary(pl.UTF-8): Statyczne biblioteki UCD-SNMP | |
269 | Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com ucd-snmp | |
270 | Summary(ru.UTF-8): Статические библиотеки для проекта UCD-SNMP | |
271 | Summary(uk.UTF-8): Статичні бібліотеки для проекту UCD-SNMP | |
272 | Group: Development/Libraries | |
273 | Requires: %{name}-compat-devel = %{version}-%{release} | |
274 | Obsoletes: ucd-snmp-static | |
275 | ||
276 | %description compat-static | |
277 | Static UCD-SNMP libraries. | |
278 | ||
279 | %description compat-static -l pl.UTF-8 | |
280 | Statyczne biblioteki UCD-SNMP. | |
281 | ||
282 | %description compat-static -l pt_BR.UTF-8 | |
283 | Bibliotecas estáticas para desenvolvimento com ucd-snmp. | |
284 | ||
831f13c1 ER |
285 | %package -n mibs-net-snmp |
286 | Summary: Net-SNMP provided MIBs | |
6139ec4c | 287 | Summary(pl.UTF-8): Baza danych MIB |
288 | Group: Applications/System | |
831f13c1 ER |
289 | Requires: mibs-dirs |
290 | Obsoletes: net-snmp-mibs | |
6139ec4c | 291 | Conflicts: ucd-snmp-libs |
292 | ||
831f13c1 ER |
293 | %description -n mibs-net-snmp |
294 | Net-SNMP provided MIBs (Management Information Base). | |
6139ec4c | 295 | |
831f13c1 | 296 | %description -n mibs-net-snmp -l pl.UTF-8 |
6139ec4c | 297 | Baza danych MIB. |
298 | ||
299 | %package snmptrapd | |
300 | Summary: SNMP trap daemon | |
301 | Summary(pl.UTF-8): Demon obsługujący pułapki SNMP | |
302 | Group: Applications/System | |
303 | Requires(post,preun): /sbin/chkconfig | |
304 | Requires: %{name} = %{version}-%{release} | |
305 | Requires: rc-scripts >= 0.2.0 | |
306 | Obsoletes: cmu-snmp-utils | |
307 | Obsoletes: ucd-snmp-snmptrapd | |
308 | ||
309 | %description snmptrapd | |
310 | The ucd-snmp-snmptrapd package contains snmp trap daemon. | |
311 | ||
312 | %description snmptrapd -l pl.UTF-8 | |
313 | Pakiet zawiera demon obsługujący pułapki SNMP. | |
314 | ||
315 | %package utils | |
316 | Summary: Network management utilities using SNMP, from the NET-SNMP project | |
317 | Summary(es.UTF-8): Utilitarios del SNMP de la UCD | |
318 | Summary(pl.UTF-8): Narzędzia używające protokołu SNMP | |
319 | Summary(pt_BR.UTF-8): Utilitários do SNMP da UCD | |
320 | Summary(ru.UTF-8): Утилиты управления сетью по SNMP из проекта NET-SNMP | |
321 | Summary(uk.UTF-8): Утиліти керування мережею по SNMP з проекту NET-SNMP | |
322 | Group: Applications/System | |
323 | Requires: %{name}-libs = %{version}-%{release} | |
831f13c1 | 324 | Suggests: mibs-%{name} = %{version}-%{release} |
6139ec4c | 325 | Obsoletes: cmu-snmp-utils |
326 | Obsoletes: ucd-snmp-utils | |
327 | ||
328 | %description utils | |
329 | This package contains various utilities for managing your network | |
330 | using the SNMP protocol. | |
331 | ||
332 | %description utils -l es.UTF-8 | |
333 | Varios utilitarios para uso con el SNMP de la UCD. Contiene | |
334 | utilitarios como: snmpwalk, snmptest y otros. | |
335 | ||
336 | %description utils -l pl.UTF-8 | |
337 | Różnego rodzaju narzędzia do zarządzania siecią przy użyciu protokołu | |
338 | SNMP. | |
339 | ||
340 | %description utils -l pt_BR.UTF-8 | |
341 | Vários utilitários para uso com o SNMP da UCD. Contém utilitários | |
342 | como: snmpwalk, snmptest e outros. | |
343 | ||
344 | %description utils -l ru.UTF-8 | |
345 | Пакет ucd-snmp-utils содержит разнообразные утилиты для использования | |
346 | в проекте управления сетью net-snmp. | |
347 | ||
348 | %description utils -l uk.UTF-8 | |
349 | Пакет ucd-snmp-utils містить різноманітні утиліти для використання в | |
350 | проекті керування мережею net-snmp. | |
351 | ||
352 | %package -n perl-SNMP | |
353 | Summary: SNMP and NetSNMP::* Perl modules | |
354 | Summary(pl.UTF-8): Moduły Perla SNMP oraz NetSNMP::* | |
355 | Group: Development/Languages/Perl | |
356 | Requires: %{name}-libs = %{version}-%{release} | |
357 | Conflicts: ucd-snmp-utils-perl | |
358 | ||
359 | %description -n perl-SNMP | |
360 | SNMP and NetSNMP::* Perl modules - Perl interface to net-snmp. | |
361 | ||
362 | %description -n perl-SNMP -l pl.UTF-8 | |
363 | Moduły Perla SNMP oraz NetSNMP::* - perlowy interfejs do net-snmp. | |
364 | ||
365 | %package utils-perl | |
366 | Summary: Perl utilities for network management using SNMP | |
367 | Summary(pl.UTF-8): Perlowe narzędzia używające protokołu SNMP | |
368 | Group: Applications/System | |
369 | Requires: perl-SNMP = %{version}-%{release} | |
370 | Obsoletes: cmu-snmp-utils | |
371 | Obsoletes: ucd-snmp-utils-perl | |
372 | ||
373 | %description utils-perl | |
374 | This package contains various Perl utilities for managing your network | |
375 | using the SNMP protocol. | |
376 | ||
377 | %description utils-perl -l pl.UTF-8 | |
378 | Perlowe narzędzia do zarządzania siecią przy użyciu protokołu SNMP. | |
379 | ||
380 | %package snmpconf | |
381 | Summary: snmpconf - creating and modifying SNMP configuration files | |
382 | Summary(pl.UTF-8): snmpconf - tworzenie i modyfikowanie plików konfiguracyjnych SNMP | |
383 | Group: Applications/System | |
384 | Requires: %{name} = %{version}-%{release} | |
385 | Requires: perl-SNMP = %{version}-%{release} | |
386 | ||
387 | %description snmpconf | |
388 | snmpconf is a simple Perl script that walks you through setting up a | |
389 | configuration file step by step. It should be fairly straight forward | |
390 | to use. | |
391 | ||
392 | %description snmpconf -l pl.UTF-8 | |
393 | snmpconf to prosty skrypt Perla pozwalający na tworzenie pliku | |
394 | konfiguracyjnego krok po kroku. Powinien być w miarę prosty w użyciu. | |
395 | ||
396 | %package tkmib | |
397 | Summary: MIB browser in Tk | |
398 | Summary(pl.UTF-8): Przeglądarka MIB-ów w Tk | |
399 | Group: Applications/System | |
400 | Requires: perl-SNMP = %{version}-%{release} | |
401 | Requires: perl-Tk | |
402 | ||
403 | %description tkmib | |
404 | MIB browser in Tk. | |
405 | ||
406 | %description tkmib -l pl.UTF-8 | |
407 | Przeglądarka MIB-ów w Tk. | |
408 | ||
409 | %package -n python-netsnmp | |
410 | Summary: Python netsnmp extension module | |
411 | Summary(pl.UTF-8): Moduł rozszerzenia netsnmp dla Pythona | |
412 | Group: Libraries/Python | |
413 | Requires: %{name}-libs = %{version}-%{release} | |
414 | ||
415 | %description -n python-netsnmp | |
416 | The 'netsnmp' Python extension module provides a full featured, | |
417 | tri-lingual SNMP (SNMPv3, SNMPv2c, SNMPv1) client API. | |
418 | ||
419 | %description -n python-netsnmp -l pl.UTF-8 | |
420 | Moduł rozszerzenia netsnmp dla Pythona udostępnia pełne API klienckie | |
421 | SNMP dla trzech wersji tego protokołu (SNMPv3, SNMPv2c, SNMPv1). | |
422 | ||
423 | %prep | |
424 | %setup -q -a7 | |
425 | %patch0 -p1 | |
6139ec4c | 426 | %patch2 -p1 |
427 | %patch3 -p1 | |
428 | %patch4 -p1 | |
429 | %patch5 -p1 | |
430 | %patch6 -p1 | |
431 | %patch7 -p1 | |
432 | %patch8 -p1 | |
433 | %patch9 -p1 | |
434 | %patch10 -p1 | |
ab44d410 | 435 | %patch11 -p1 |
fa2e0322 | 436 | %patch12 -p1 |
436e1826 | 437 | %patch13 -p1 |
f0bff576 | 438 | %patch16 -p1 |
80a15a4d | 439 | %patch19 -p1 |
edb8ffd9 | 440 | %patch20 -p1 |
6139ec4c | 441 | |
442 | %build | |
443 | %{__libtoolize} | |
444 | %{__aclocal} | |
445 | %{__autoconf} | |
446 | %{__autoheader} | |
fa2e0322 | 447 | cp -f /usr/share/automake/config.sub . |
831f13c1 ER |
448 | |
449 | MIBS="\ | |
450 | host agentx smux \ | |
451 | mibII/mta_sendmail \ | |
452 | disman/event disman/schedule \ | |
453 | ucd-snmp/diskio \ | |
454 | target \ | |
455 | misc/ipfwacc \ | |
456 | " | |
457 | ||
458 | %if %{with lm_sensors} | |
459 | MIBS="$MIBS ucd-snmp/lmSensors" | |
460 | %endif | |
461 | ||
6139ec4c | 462 | %configure \ |
463 | --disable-debugging \ | |
464 | --enable-as-needed \ | |
1807fdee | 465 | %{!?with_static_libs:--disable-static} \ |
6139ec4c | 466 | --with-cflags="%{rpmcflags} -I/usr/include/et" \ |
467 | --with-ldflags="%{rpmldflags}" \ | |
468 | --with-defaults \ | |
469 | --with-default-snmp-version=3 \ | |
470 | %{?with_kerberos5:--with-krb5=%{_prefix}} \ | |
471 | %{!?with_kerberos5:--without-krb5} \ | |
472 | --with-openssl=%{_prefix} \ | |
473 | --with-libwrap=%{_prefix} \ | |
474 | --with-logfile="%{logfile}" \ | |
475 | --with-zlib=%{_prefix} \ | |
476 | --with-bzip2=%{_prefix} \ | |
c90fcf09 ER |
477 | --with%{!?with_perl:out}-perl-modules \ |
478 | --with%{!?with_python:out}-python-modules \ | |
5d123737 | 479 | --enable-local-smux \ |
831f13c1 ER |
480 | --with-mibdirs='$HOME/.snmp/mibs:/usr/share/mibs:%{_datadir}/snmp/mibs' \ |
481 | --with-mib-modules="$MIBS" \ | |
6139ec4c | 482 | %{?with_kerberos5:--with-security-modules="ksm"} \ |
483 | --with-sys-contact="root@localhost" \ | |
484 | --with-sys-location="Unknown" \ | |
5d123737 | 485 | --with-transports="UDP UDPIPv6 TCP TCPIPv6 Unix Callback" \ |
6139ec4c | 486 | --with-persistent-directory="/var/lib/net-snmp" \ |
487 | --enable-ucd-snmp-compatibility \ | |
488 | --enable-ipv6 \ | |
489 | --with%{!?with_rpm:out}-rpm | |
490 | ||
419af13d ER |
491 | %{__make} -j1 \ |
492 | PYMAKE='CFLAGS="%{rpmcflags} -DPy_ssize_t=int" python setup.py' | |
6139ec4c | 493 | |
494 | cd perl | |
495 | ||
496 | %{__perl} Makefile.PL \ | |
497 | -NET-SNMP-IN-SOURCE=true \ | |
498 | INSTALLDIRS=vendor \ | |
499 | OPTIMIZE="%{rpmcflags}" \ | |
500 | </dev/null | |
501 | ||
502 | # avoid rpaths generated by MakeMaker | |
503 | perl -pi -e 's@LD_RUN_PATH="\$\(LD_RUN_PATH\)" @@' */Makefile */*/Makefile | |
504 | ||
505 | %{__make} \ | |
506 | LDFLAGS="%{rpmldflags}" | |
507 | ||
508 | %install | |
509 | rm -rf $RPM_BUILD_ROOT | |
d3bddfd5 | 510 | install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,logrotate.d,sysconfig,snmp},/var/log,/var/lib/net-snmp,%{_libdir}/snmp/dlmod} |
6139ec4c | 511 | |
77131bc8 | 512 | %{__make} -j1 install \ |
831f13c1 | 513 | mibdir=%{_datadir}/mibs \ |
6139ec4c | 514 | DESTDIR=$RPM_BUILD_ROOT |
515 | ||
516 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.conf | |
517 | :> $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.local.conf | |
518 | :> $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmp.conf | |
519 | :> $RPM_BUILD_ROOT%{logfile} | |
520 | ||
521 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/snmpd | |
522 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.conf | |
523 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/snmpd | |
524 | ||
525 | install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/snmptrapd | |
526 | install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmptrapd.conf | |
527 | install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/snmptrapd | |
528 | ||
d3bddfd5 ER |
529 | cp -p %{SOURCE9} $RPM_BUILD_ROOT/etc/logrotate.d/snmpd |
530 | ||
6139ec4c | 531 | cd perl |
77131bc8 | 532 | %{__make} -j1 install \ |
6139ec4c | 533 | DESTDIR=$RPM_BUILD_ROOT |
534 | ||
535 | install -d $RPM_BUILD_ROOT%{_examplesdir}/perl-SNMP-%{version} | |
536 | install SNMP/examples/*.pl $RPM_BUILD_ROOT%{_examplesdir}/perl-SNMP-%{version} | |
537 | cd .. | |
538 | ||
539 | # IP-Filter (non-Linux) | |
540 | rm -f $RPM_BUILD_ROOT%{_bindir}/ipf-mod.pl | |
541 | ||
542 | rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod | |
543 | rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/Bundle/Makefile.subs.pl | |
544 | rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Bundle/NetSNMP/.packlist | |
545 | ||
c459e35c | 546 | %if %{with static_libs} |
10765a43 ER |
547 | # hack: convert DynaLoader.a inside .a file to .o, as strip(1) would otherwise say invalid argument |
548 | for a in $RPM_BUILD_ROOT%{_libdir}/libnet*.a; do | |
549 | rm -f *.o *.a | |
550 | ar x $a DynaLoader.a | |
551 | if [ -f DynaLoader.a ]; then | |
552 | ar x DynaLoader.a | |
553 | ar cr $a DynaLoader.o | |
554 | ar d $a DynaLoader.a | |
555 | # remove second file too | |
556 | ar d $a DynaLoader.a | |
557 | fi | |
558 | done | |
c90fcf09 ER |
559 | %else |
560 | rm -f $RPM_BUILD_ROOT%{_libdir}/libsnmp.a | |
c459e35c | 561 | %endif |
10765a43 | 562 | |
7753e26c | 563 | %if %{with python} |
fa2e0322 ER |
564 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/netsnmp/tests |
565 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/netsnmp/*.py | |
7753e26c | 566 | %endif |
fa2e0322 | 567 | |
6139ec4c | 568 | %clean |
569 | rm -rf $RPM_BUILD_ROOT | |
570 | ||
571 | %post | |
572 | touch %{logfile} | |
573 | chmod 640 %{logfile} | |
574 | /sbin/chkconfig --add snmpd | |
575 | %service snmpd restart "snmpd daemon" | |
576 | ||
577 | %preun | |
578 | if [ "$1" = "0" ]; then | |
579 | %service snmpd stop | |
580 | /sbin/chkconfig --del snmpd | |
581 | fi | |
582 | ||
583 | %post libs -p /sbin/ldconfig | |
584 | %postun libs -p /sbin/ldconfig | |
585 | ||
586 | %triggerpostun -- ucd-snmp | |
587 | /sbin/chkconfig --add snmpd | |
588 | ||
589 | %post snmptrapd | |
590 | touch %{logfile} | |
591 | chmod 640 %{logfile} | |
592 | /sbin/chkconfig --add snmptrapd | |
593 | %service snmptrapd restart "snmp trap daemon" | |
594 | ||
595 | %preun snmptrapd | |
596 | if [ "$1" = "0" ]; then | |
597 | %service snmptrapd stop | |
598 | /sbin/chkconfig --del snmptrapd | |
599 | fi | |
600 | ||
601 | %triggerpostun snmptrapd -- ucd-snmp-snmptrapd | |
602 | /sbin/chkconfig --add snmptrapd | |
603 | ||
604 | %files | |
605 | %defattr(644,root,root,755) | |
606 | %doc README local | |
607 | %doc ChangeLog EXAMPLE.conf.def EXAMPLE.conf | |
608 | %doc FAQ NEWS PORTING README.snmpv3 TODO AGENT.txt | |
609 | ||
610 | %attr(754,root,root) /etc/rc.d/init.d/snmpd | |
611 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/snmpd | |
d3bddfd5 | 612 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/snmpd |
6139ec4c | 613 | |
614 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.conf | |
615 | %attr(640,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.local.conf | |
616 | ||
617 | %attr(755,root,root) %{_sbindir}/snmpd | |
618 | ||
6a5c93bb ER |
619 | %dir %{_libdir}/snmp |
620 | %dir %{_libdir}/snmp/dlmod | |
621 | ||
6139ec4c | 622 | %{_mandir}/man5/snmpd.conf.5* |
623 | %{_mandir}/man5/snmpd.examples.5* | |
624 | %{_mandir}/man5/snmpd.internal.5* | |
625 | %{_mandir}/man5/variables.5* | |
626 | %{_mandir}/man8/snmpd.8* | |
627 | ||
77131bc8 ER |
628 | %dir %attr(700,root,root) /var/lib/net-snmp |
629 | ||
6139ec4c | 630 | %attr(640,root,root) %ghost %{logfile} |
631 | ||
632 | %files libs | |
633 | %defattr(644,root,root,755) | |
634 | %dir %{_sysconfdir}/snmp | |
94a3f7ae | 635 | %dir %{_datadir}/snmp |
c90fcf09 ER |
636 | %attr(755,root,root) %{_libdir}/libnetsnmp.so.*.* |
637 | %attr(755,root,root) %{_libdir}/libnetsnmpagent.so.*.* | |
638 | %attr(755,root,root) %{_libdir}/libnetsnmphelpers.so.*.* | |
639 | %attr(755,root,root) %{_libdir}/libnetsnmpmibs.so.*.* | |
640 | %attr(755,root,root) %{_libdir}/libnetsnmptrapd.so.*.* | |
641 | %attr(755,root,root) %ghost %{_libdir}/libnetsnmp.so.15 | |
642 | %attr(755,root,root) %ghost %{_libdir}/libnetsnmpagent.so.15 | |
643 | %attr(755,root,root) %ghost %{_libdir}/libnetsnmphelpers.so.15 | |
644 | %attr(755,root,root) %ghost %{_libdir}/libnetsnmpmibs.so.15 | |
645 | %attr(755,root,root) %ghost %{_libdir}/libnetsnmptrapd.so.15 | |
6139ec4c | 646 | |
647 | %files devel | |
648 | %defattr(644,root,root,755) | |
649 | %attr(755,root,root) %{_bindir}/mib2c | |
650 | %attr(755,root,root) %{_bindir}/mib2c-update | |
651 | %attr(755,root,root) %{_bindir}/net-snmp-config | |
c90fcf09 ER |
652 | %attr(755,root,root) %{_libdir}/libnetsnmp.so |
653 | %attr(755,root,root) %{_libdir}/libnetsnmpagent.so | |
654 | %attr(755,root,root) %{_libdir}/libnetsnmphelpers.so | |
655 | %attr(755,root,root) %{_libdir}/libnetsnmpmibs.so | |
656 | %attr(755,root,root) %{_libdir}/libnetsnmptrapd.so | |
657 | %{_libdir}/libnetsnmp.la | |
658 | %{_libdir}/libnetsnmpagent.la | |
659 | %{_libdir}/libnetsnmphelpers.la | |
660 | %{_libdir}/libnetsnmpmibs.la | |
661 | %{_libdir}/libnetsnmptrapd.la | |
6139ec4c | 662 | %{_includedir}/net-snmp |
663 | %{_datadir}/snmp/mib2c* | |
664 | %{_mandir}/man1/mib2c.1* | |
665 | %{_mandir}/man1/mib2c-update.1* | |
666 | %{_mandir}/man1/net-snmp-config.1* | |
667 | %{_mandir}/man3/[!NS]* | |
668 | %{_mandir}/man5/mib2c.conf.5* | |
669 | ||
1807fdee | 670 | %if %{with static_libs} |
6139ec4c | 671 | %files static |
672 | %defattr(644,root,root,755) | |
673 | %{_libdir}/libnet*.a | |
1807fdee | 674 | %endif |
6139ec4c | 675 | |
676 | %files compat-devel | |
677 | %defattr(644,root,root,755) | |
678 | %attr(755,root,root) %{_libdir}/libsnmp.so | |
679 | %{_libdir}/libsnmp.la | |
680 | %{_includedir}/ucd-snmp | |
681 | ||
1807fdee | 682 | %if %{with static_libs} |
6139ec4c | 683 | %files compat-static |
684 | %defattr(644,root,root,755) | |
685 | %{_libdir}/libsnmp.a | |
1807fdee | 686 | %endif |
6139ec4c | 687 | |
831f13c1 | 688 | %files -n mibs-net-snmp |
6139ec4c | 689 | %defattr(644,root,root,755) |
831f13c1 | 690 | %{_datadir}/mibs/*.txt |
6139ec4c | 691 | |
692 | %files snmptrapd | |
693 | %defattr(644,root,root,755) | |
694 | %attr(755,root,root) %{_sbindir}/snmptrapd | |
695 | %attr(754,root,root) /etc/rc.d/init.d/snmptrapd | |
696 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/snmptrapd | |
697 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmptrapd.conf | |
698 | %if %{with perl} | |
699 | %attr(755,root,root) %{_datadir}/snmp/snmp_perl_trapd.pl | |
700 | %endif | |
701 | %{_mandir}/man5/snmptrapd.conf.5* | |
702 | %{_mandir}/man8/snmptrapd.8* | |
703 | ||
704 | %files utils | |
705 | %defattr(644,root,root,755) | |
706 | %attr(755,root,root) %{_bindir}/encode_keychange | |
707 | %attr(755,root,root) %{_bindir}/snmpbulkget | |
708 | %attr(755,root,root) %{_bindir}/snmpbulkwalk | |
709 | %attr(755,root,root) %{_bindir}/snmpdelta | |
710 | %attr(755,root,root) %{_bindir}/snmpdf | |
711 | %attr(755,root,root) %{_bindir}/snmpget | |
712 | %attr(755,root,root) %{_bindir}/snmpgetnext | |
713 | %attr(755,root,root) %{_bindir}/snmpinform | |
714 | %attr(755,root,root) %{_bindir}/snmpnetstat | |
715 | %attr(755,root,root) %{_bindir}/snmpset | |
716 | %attr(755,root,root) %{_bindir}/snmpstatus | |
717 | %attr(755,root,root) %{_bindir}/snmptable | |
718 | %attr(755,root,root) %{_bindir}/snmptest | |
719 | %attr(755,root,root) %{_bindir}/snmptranslate | |
720 | %attr(755,root,root) %{_bindir}/snmptrap | |
721 | %attr(755,root,root) %{_bindir}/snmpusm | |
722 | %attr(755,root,root) %{_bindir}/snmpvacm | |
723 | %attr(755,root,root) %{_bindir}/snmpwalk | |
724 | %{_mandir}/man1/encode_keychange.1* | |
725 | %{_mandir}/man1/snmpbulkget.1* | |
726 | %{_mandir}/man1/snmpbulkwalk.1* | |
727 | %{_mandir}/man1/snmpcmd.1* | |
728 | %{_mandir}/man1/snmpdelta.1* | |
729 | %{_mandir}/man1/snmpdf.1* | |
730 | %{_mandir}/man1/snmpget.1* | |
731 | %{_mandir}/man1/snmpgetnext.1* | |
732 | %{_mandir}/man1/snmpinform.1* | |
733 | %{_mandir}/man1/snmpnetstat.1* | |
734 | %{_mandir}/man1/snmpset.1* | |
735 | %{_mandir}/man1/snmpstatus.1* | |
736 | %{_mandir}/man1/snmptable.1* | |
737 | %{_mandir}/man1/snmptest.1* | |
738 | %{_mandir}/man1/snmptranslate.1* | |
739 | %{_mandir}/man1/snmptrap.1* | |
740 | %{_mandir}/man1/snmpusm.1* | |
741 | %{_mandir}/man1/snmpvacm.1* | |
742 | %{_mandir}/man1/snmpwalk.1* | |
743 | %{_mandir}/man5/snmp.conf.5* | |
744 | %{_mandir}/man5/snmp_config.5* | |
745 | ||
746 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmp.conf | |
747 | ||
748 | %if %{with perl} | |
749 | %files -n perl-SNMP | |
750 | %defattr(644,root,root,755) | |
751 | %doc perl/SNMP/{BUG,README,TODO} perl/SNMP/examples | |
752 | %{perl_vendorarch}/SNMP.pm | |
753 | %{perl_vendorarch}/NetSNMP | |
754 | %dir %{perl_vendorarch}/auto/SNMP | |
755 | %{perl_vendorarch}/auto/SNMP/autosplit.ix | |
756 | %{perl_vendorarch}/auto/SNMP/SNMP.bs | |
757 | %attr(755,root,root) %{perl_vendorarch}/auto/SNMP/SNMP.so | |
758 | %dir %{perl_vendorarch}/auto/NetSNMP | |
759 | %dir %{perl_vendorarch}/auto/NetSNMP/* | |
760 | %{perl_vendorarch}/auto/NetSNMP/*/autosplit.ix | |
761 | %{perl_vendorarch}/auto/NetSNMP/*/*.bs | |
762 | %attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/*/*.so | |
763 | %dir %{perl_vendorarch}/auto/NetSNMP/agent/default_store | |
764 | %{perl_vendorarch}/auto/NetSNMP/agent/default_store/autosplit.ix | |
765 | %{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.bs | |
766 | %attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.so | |
767 | %{_mandir}/man3/NetSNMP::*.3* | |
768 | %{_mandir}/man3/SNMP.3* | |
769 | %{_examplesdir}/perl-SNMP-%{version} | |
770 | ||
771 | %files utils-perl | |
772 | %defattr(644,root,root,755) | |
773 | %attr(755,root,root) %{_bindir}/fixproc | |
774 | %attr(755,root,root) %{_bindir}/snmpcheck | |
775 | %attr(755,root,root) %{_bindir}/traptoemail | |
776 | %{_mandir}/man1/fixproc.1* | |
777 | %{_mandir}/man1/traptoemail.1* | |
778 | %endif | |
779 | ||
780 | %files snmpconf | |
781 | %defattr(644,root,root,755) | |
782 | %attr(755,root,root) %{_bindir}/snmpconf | |
783 | %{_mandir}/man1/snmpconf.1* | |
784 | %{_datadir}/snmp/snmpconf-data | |
785 | ||
786 | %if %{with perl} | |
787 | %files tkmib | |
788 | %defattr(644,root,root,755) | |
789 | %attr(755,root,root) %{_bindir}/tkmib | |
790 | %{_mandir}/man1/tkmib.1* | |
791 | %endif | |
792 | ||
793 | %if %{with python} | |
794 | %files -n python-netsnmp | |
795 | %defattr(644,root,root,755) | |
796 | %dir %{py_sitedir}/netsnmp | |
797 | %attr(755,root,root) %{py_sitedir}/netsnmp/*.so | |
798 | %{py_sitedir}/netsnmp/*.py[co] | |
6139ec4c | 799 | %endif |