Browse code

Add ipset.

Change-Id: I6a799b94685ed4e07472556e1922f12da5e4f668
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/1251
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: suezzelur <anishs@vmware.com>

xiaolin-vmware authored on 2016/08/04 03:35:38
Showing 3 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,75 @@
0
+Summary:    administration tool for IP sets 
1
+Name:       ipset
2
+Version:    6.29
3
+Release:    1%{?dist}
4
+License:    GPLv2
5
+URL:        http://ipset.netfilter.org/
6
+Group:      System Environment/tools
7
+Vendor:     VMware, Inc.
8
+Distribution: Photon
9
+Source0:     ipset.netfilter.org/%{name}-%{version}.tar.bz2
10
+%define sha1 ipset=fa11b387716544c798bc9549cedbd8dbee471605
11
+BuildRequires:    libmnl-devel
12
+Requires:         libmnl
13
+%description
14
+IP sets are a framework inside the Linux kernel, which can be administered by the ipset utility. Depending on the type, an IP set may store IP addresses, networks, (TCP/UDP) port numbers, MAC addresses, interface names or combinations of them in a way, which ensures lightning speed when matching an entry against a set.
15
+
16
+If you want to
17
+
18
+store multiple IP addresses or port numbers and match against the collection by iptables at one swoop;
19
+dynamically update iptables rules against IP addresses or ports without performance penalty;
20
+express complex IP address and ports based rulesets with one single iptables rule and benefit from the speed of IP sets
21
+then ipset may be the proper tool for you.
22
+
23
+%package devel
24
+Summary:    Development files for the ipset library
25
+Group:      Development/Libraries
26
+Requires:   ipset
27
+
28
+%description devel
29
+Libraries and header files for ipset.
30
+
31
+%prep
32
+%setup -q
33
+
34
+%build
35
+./configure \
36
+    --prefix=%{_prefix} \
37
+    --bindir=%{_bindir} \
38
+    --libdir=%{_libdir} \
39
+    --enable-static=no \
40
+    --with-kmod=no
41
+make %{?_smp_mflags}
42
+
43
+%install
44
+make install DESTDIR=%{buildroot}
45
+find %{buildroot} -name '*.la' -delete
46
+
47
+#%check
48
+#make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
49
+
50
+
51
+%post
52
+/sbin/ldconfig
53
+
54
+%postun
55
+/sbin/ldconfig
56
+
57
+%clean
58
+rm -rf %{buildroot}/*
59
+
60
+%files
61
+%defattr(-,root,root)
62
+%{_sbindir}/*
63
+%{_libdir}/libipset.so.*
64
+%{_mandir}/*
65
+
66
+%files devel
67
+%defattr(-,root,root)
68
+%{_includedir}/*
69
+%{_libdir}/libipset.so
70
+%{_libdir}/pkgconfig/libipset.pc
71
+
72
+%changelog
73
+*   Wed Aug 3 2016 Xiaolin Li <xiaolinl@vmware.com> 6.29-1
74
+-   Initial build.  First version
0 75
new file mode 100644
... ...
@@ -0,0 +1,62 @@
0
+Summary:    A minimalistic user-space library oriented to Netlink developers.
1
+Name:       libmnl
2
+Version:    1.0.4
3
+Release:    1%{?dist}
4
+License:    LGPLv2.1+
5
+URL:        http://netfilter.org/projects/libmnl
6
+Group:      System Environment/libraries
7
+Vendor:     VMware, Inc.
8
+Distribution: Photon
9
+Source0:     http://netfilter.org/projects/libmnl/files/%{name}-%{version}.tar.bz2
10
+%define sha1 libmnl=2db40dea612e88c62fd321906be40ab5f8f1685a
11
+%description
12
+libmnl is a minimalistic user-space library oriented to Netlink developers. There are a lot of common tasks in parsing, validating, constructing of both the Netlink header and TLVs that are repetitive and easy to get wrong. This library aims to provide simple helpers that allows you to re-use code and to avoid re-inventing the wheel.
13
+
14
+%package devel
15
+Summary:        Development files for %{name}
16
+Group:          Development/Libraries
17
+Requires:       libmnl >= 1.0.4
18
+%description devel
19
+Libraries and header files for libnml library.
20
+
21
+%prep
22
+%setup -q
23
+
24
+%build
25
+./configure \
26
+    --prefix=%{_prefix} \
27
+    --bindir=%{_bindir} \
28
+    --libdir=%{_libdir} \
29
+    --enable-static=no
30
+make %{?_smp_mflags}
31
+
32
+%install
33
+make install DESTDIR=%{buildroot}
34
+find %{buildroot} -name '*.la' -delete
35
+
36
+#%check
37
+#make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
38
+
39
+
40
+%post
41
+/sbin/ldconfig
42
+
43
+%postun
44
+/sbin/ldconfig
45
+
46
+%clean
47
+rm -rf %{buildroot}/*
48
+
49
+%files
50
+%defattr(-,root,root)
51
+%{_libdir}/libmnl.so.*
52
+
53
+%files devel
54
+%defattr(-,root,root)
55
+%{_includedir}/*
56
+%{_libdir}/libmnl.so
57
+%{_libdir}/pkgconfig/libmnl.pc
58
+
59
+%changelog
60
+*   Wed Aug 3 2016 Xiaolin Li <xiaolinl@vmware.com> 1.0.4-1
61
+-   Initial build.	First version
... ...
@@ -72,7 +72,7 @@
72 72
         "procmail",
73 73
         "dmidecode",
74 74
         "iperf",
75
-	"distrib-compat",
75
+        "distrib-compat",
76 76
         "crash",
77 77
         "systemtap",
78 78
         "ktap",
... ...
@@ -88,7 +88,7 @@
88 88
         "rubygem-rbvmomi",
89 89
         "compat-gdbm",
90 90
         "tiptop",
91
-	"irqbalance",
91
+        "irqbalance",
92 92
         "lttng-tools",
93 93
         "userspace-rcu",
94 94
         "dstat",
... ...
@@ -97,32 +97,32 @@
97 97
         "pth",
98 98
         "gnupg",
99 99
         "libksba",
100
-	"linux-tools",
100
+        "linux-tools",
101 101
         "nicstat",
102 102
         "lldpad",
103 103
         "mingetty",
104 104
         "msr-tools",
105
-	"zip",
105
+        "zip",
106 106
         "consul",
107 107
         "consul-template",
108 108
         "nomad",
109 109
         "vault",
110 110
         "ntpstat",
111 111
         "linux-oprofile",
112
-	"netcat",
112
+        "netcat",
113 113
         "cgroup-utils",
114 114
         "sysstat",
115
-	"blktrace",
116
-	"ethtool",
117
-	"ltrace",
118
-	"net-snmp",
119
-	"pcstat",
115
+        "blktrace",
116
+        "ethtool",
117
+        "ltrace",
118
+        "net-snmp",
119
+        "pcstat",
120 120
         "libseccomp",
121
-	"sysdig",
122
-	"falco",
121
+        "sysdig",
122
+        "falco",
123 123
         "zsh",
124
-	"iotop",
125
-	"libgd",
124
+        "iotop",
125
+        "libgd",
126 126
         "rsync",
127 127
         "paramiko",
128 128
         "ecdsa",
... ...
@@ -143,10 +143,12 @@
143 143
         "nginx",
144 144
         "kaigen-gothic-cjk",
145 145
         "dialog",
146
-	"libwebp",
147
-	"libtiff",
148
-	"libpng",
149
-	"libjpeg-turbo",
150
-	"nasm"
146
+        "libwebp",
147
+        "libtiff",
148
+        "libpng",
149
+        "libjpeg-turbo",
150
+        "nasm",
151
+        "libmnl",
152
+        "ipset"
151 153
             ]
152 154
 }