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