Change-Id: I43077d0c01e62ba0b54653fb151afd890c1ade45
Reviewed-on: http://photon-jenkins.eng.vmware.com/58
Tested-by: jenkins-photon <wangnan2015@hotmail.com>
Reviewed-by: Sharath George
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
Summary: Open vSwitch daemon/database/utilities |
| 2 | 2 |
Name: openvswitch |
| 3 |
-Version: 2.3.1 |
|
| 3 |
+Version: 2.4.0 |
|
| 4 | 4 |
Release: 1%{?dist}
|
| 5 | 5 |
License: ASL 2.0 and LGPLv2+ |
| 6 | 6 |
URL: http://www.openvswitch.org/ |
| ... | ... |
@@ -8,146 +8,123 @@ Group: System Environment/Daemons |
| 8 | 8 |
Vendor: VMware, Inc. |
| 9 | 9 |
Distribution: Photon |
| 10 | 10 |
|
| 11 |
-Source0: http://openvswitch.org/releases/%{name}-%{version}.tar.gz
|
|
| 12 |
-%define sha1 openvswitch=ef8854781265a7e3ea80b5070db6cac2dff704d5 |
|
| 13 |
-Requires: openssl |
|
| 14 |
-BuildRequires: openssl openssl-devel python2 python2-devel |
|
| 15 |
-BuildRequires: python2 |
|
| 11 |
+Source0: http://openvswitch.org/releases/%{name}-%{version}.tar.gz
|
|
| 12 |
+%define sha1 openvswitch=d091902579cf5101df851d2ec69c75a6bcbd49fc |
|
| 13 |
+ |
|
| 14 |
+BuildRequires: gcc >= 4.0.0 |
|
| 15 |
+BuildRequires: libcap-ng |
|
| 16 |
+BuildRequires: make |
|
| 17 |
+BuildRequires: openssl |
|
| 18 |
+BuildRequires: openssl-devel |
|
| 19 |
+BuildRequires: python2 >= 2.7.0 |
|
| 20 |
+BuildRequires: python2-devel |
|
| 16 | 21 |
BuildRequires: python2-libs |
| 17 | 22 |
BuildRequires: python-setuptools |
| 18 | 23 |
|
| 24 |
+Requires: libcap-ng |
|
| 25 |
+Requires: openssl |
|
| 26 |
+Requires: PyYAML |
|
| 19 | 27 |
Requires: python2 |
| 20 | 28 |
Requires: python2-libs |
| 21 | 29 |
Requires: python-configobj |
| 30 |
+Requires: python-jsonpatch |
|
| 22 | 31 |
Requires: python-prettytable |
| 23 | 32 |
Requires: python-requests |
| 24 |
-Requires: PyYAML |
|
| 25 |
-Requires: python-jsonpatch |
|
| 26 | 33 |
|
| 27 | 34 |
%description |
| 28 | 35 |
Open vSwitch provides standard network bridging functions and |
| 29 | 36 |
support for the OpenFlow protocol for remote per-flow control of |
| 30 | 37 |
traffic. |
| 31 | 38 |
|
| 39 |
+%package devel |
|
| 40 |
+Summary: Header and development files for openvswitch |
|
| 41 |
+Requires: %{name} = %{version}
|
|
| 42 |
+%description devel |
|
| 43 |
+openvswitch-devel package contains header files and libs. |
|
| 44 |
+ |
|
| 45 |
+%package doc |
|
| 46 |
+Summary: Documentation for openvswitch |
|
| 47 |
+Requires: %{name} = %{version}-%{release}
|
|
| 48 |
+%description doc |
|
| 49 |
+It contains the documentation and manpages for openvswitch. |
|
| 50 |
+ |
|
| 32 | 51 |
%prep |
| 33 | 52 |
%setup -q |
| 34 | 53 |
|
| 35 | 54 |
%build |
| 36 |
-./configure --prefix=%{_prefix} \
|
|
| 37 |
- --bindir=%{_bindir} \
|
|
| 38 |
- --libdir=%{_libdir} \
|
|
| 39 |
- --sysconfdir=/etc \ |
|
| 40 |
- --localstatedir=/var \ |
|
| 41 |
- --enable-ssl |
|
| 55 |
+./configure \ |
|
| 56 |
+ CFLAGS="%{optflags}" \
|
|
| 57 |
+ --prefix=%{_prefix} \
|
|
| 58 |
+ --bindir=%{_bindir} \
|
|
| 59 |
+ --libdir=%{_libdir} \
|
|
| 60 |
+ --sysconfdir=/etc \ |
|
| 61 |
+ --localstatedir=/var \ |
|
| 62 |
+ --enable-ssl |
|
| 42 | 63 |
|
| 43 | 64 |
make %{_smp_mflags}
|
| 44 | 65 |
|
| 45 | 66 |
%install |
| 46 | 67 |
make DESTDIR=%{buildroot} install
|
| 68 |
+find %{buildroot}%{_libdir} -name '*.la' -delete
|
|
| 69 |
+ |
|
| 70 |
+mkdir -p %{buildroot}/%{_libdir}/systemd/system
|
|
| 71 |
+cat << EOF >> %{buildroot}/%{_libdir}/systemd/system/openvswitch.service
|
|
| 72 |
+[Unit] |
|
| 73 |
+Description=Open vSwitch |
|
| 74 |
+ |
|
| 75 |
+[Service] |
|
| 76 |
+Type=oneshot |
|
| 77 |
+RemainAfterExit=yes |
|
| 78 |
+ExecStartPre=/usr/bin/mkdir -p /etc/openvswitch |
|
| 79 |
+ExecStartPre=/usr/bin/mkdir -p /var/run/openvswitch |
|
| 80 |
+ExecStartPre=/sbin/modprobe openvswitch |
|
| 81 |
+ExecStartPre=/usr/bin/bash -c "[ -f /etc/openvswitch/conf.db ] || ovsdb-tool create /etc/openvswitch/conf.db /usr/share/openvswitch/vswitch.ovsschema" |
|
| 82 |
+ExecStart=/usr/bin/bash -c "[[ -n \$(pidof ovsdb-server) ]] || ovsdb-server --remote=punix:/var/run/openvswitch/db.sock --remote=db:Open_vSwitch,Open_vSwitch,manager_options --pidfile --detach" |
|
| 83 |
+ExecStart=/usr/bin/ovs-vsctl --no-wait init |
|
| 84 |
+ExecStart=/usr/bin/bash -c "[[ -n \$(pidof ovs-vswitchd) ]] || ovs-vswitchd --pidfile --detach" |
|
| 85 |
+ExecStop=/usr/bin/bash -c "[ -f /var/run/openvswitch/ovs-vswitchd.pid ] && kill \$(cat /var/run/openvswitch/ovs-vswitchd.pid)" |
|
| 86 |
+ExecStop=/usr/bin/bash -c "[ -f /var/run/openvswitch/ovsdb-server.pid ] && kill \$(cat /var/run/openvswitch/ovsdb-server.pid)" |
|
| 87 |
+ExecStopPost=/sbin/modprobe -r openvswitch |
|
| 88 |
+ |
|
| 89 |
+[Install] |
|
| 90 |
+WantedBy=multi-user.target |
|
| 91 |
+EOF |
|
| 47 | 92 |
|
| 48 | 93 |
%check |
| 49 | 94 |
make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
|
| 50 | 95 |
|
| 96 |
+#TODO: Make a systemctl file to start and stop OVS |
|
| 97 |
+ |
|
| 51 | 98 |
%files |
| 52 | 99 |
%defattr(-,root,root) |
| 53 |
-%{_bindir}/*
|
|
| 54 |
-/usr/lib/libofproto.a |
|
| 55 |
-/usr/lib/libofproto.la |
|
| 56 |
-/usr/lib/libopenvswitch.a |
|
| 57 |
-/usr/lib/libopenvswitch.la |
|
| 58 |
-/usr/lib/libovsdb.a |
|
| 59 |
-/usr/lib/libovsdb.la |
|
| 60 |
-/usr/lib/libsflow.a |
|
| 61 |
-/usr/lib/libsflow.la |
|
| 62 |
-/usr/sbin/ovs-bugtool |
|
| 63 |
-/usr/sbin/ovs-vlan-bug-workaround |
|
| 64 |
-/usr/sbin/ovs-vswitchd |
|
| 65 |
-/usr/sbin/ovsdb-server |
|
| 66 |
-/usr/share/man/man1/ovs-benchmark.1.gz |
|
| 67 |
-/usr/share/man/man1/ovs-pcap.1.gz |
|
| 68 |
-/usr/share/man/man1/ovs-tcpundump.1.gz |
|
| 69 |
-/usr/share/man/man1/ovsdb-client.1.gz |
|
| 70 |
-/usr/share/man/man1/ovsdb-server.1.gz |
|
| 71 |
-/usr/share/man/man1/ovsdb-tool.1.gz |
|
| 100 |
+%{_bindir}/ovs-*
|
|
| 101 |
+%{_bindir}/ovsdb-*
|
|
| 102 |
+%{_bindir}/vtep-ctl
|
|
| 103 |
+%{_sbindir}/ovs-*
|
|
| 104 |
+%{_sbindir}/ovsdb-server
|
|
| 105 |
+%{_libdir}/systemd/system/openvswitch.service
|
|
| 106 |
+/etc/bash_completion.d/ovs-*-bashcomp.bash |
|
| 107 |
+/usr/share/openvswitch/*.ovsschema |
|
| 108 |
+/usr/share/openvswitch/bugtool-plugins/* |
|
| 109 |
+/usr/share/openvswitch/python/* |
|
| 110 |
+/usr/share/openvswitch/scripts/ovs-* |
|
| 111 |
+ |
|
| 112 |
+%files devel |
|
| 113 |
+%{_includedir}/openflow/*.h
|
|
| 114 |
+%{_includedir}/openvswitch/*.h
|
|
| 115 |
+%{_libdir}/*.a
|
|
| 116 |
+%{_libdir}/pkgconfig/*.pc
|
|
| 117 |
+ |
|
| 118 |
+%files doc |
|
| 119 |
+/usr/share/man/man1/ovs-*.1.gz |
|
| 120 |
+/usr/share/man/man1/ovsdb-*.1.gz |
|
| 72 | 121 |
/usr/share/man/man5/ovs-vswitchd.conf.db.5.gz |
| 73 | 122 |
/usr/share/man/man5/vtep.5.gz |
| 74 |
-/usr/share/man/man8/ovs-appctl.8.gz |
|
| 75 |
-/usr/share/man/man8/ovs-bugtool.8.gz |
|
| 76 |
-/usr/share/man/man8/ovs-ctl.8.gz |
|
| 77 |
-/usr/share/man/man8/ovs-dpctl-top.8.gz |
|
| 78 |
-/usr/share/man/man8/ovs-dpctl.8.gz |
|
| 79 |
-/usr/share/man/man8/ovs-l3ping.8.gz |
|
| 80 |
-/usr/share/man/man8/ovs-ofctl.8.gz |
|
| 81 |
-/usr/share/man/man8/ovs-parse-backtrace.8.gz |
|
| 82 |
-/usr/share/man/man8/ovs-pki.8.gz |
|
| 83 |
-/usr/share/man/man8/ovs-test.8.gz |
|
| 84 |
-/usr/share/man/man8/ovs-vlan-bug-workaround.8.gz |
|
| 85 |
-/usr/share/man/man8/ovs-vlan-test.8.gz |
|
| 86 |
-/usr/share/man/man8/ovs-vsctl.8.gz |
|
| 87 |
-/usr/share/man/man8/ovs-vswitchd.8.gz |
|
| 123 |
+/usr/share/man/man8/ovs-*.8.gz |
|
| 88 | 124 |
/usr/share/man/man8/vtep-ctl.8.gz |
| 89 |
-/usr/share/openvswitch/bugtool-plugins/kernel-info/openvswitch.xml |
|
| 90 |
-/usr/share/openvswitch/bugtool-plugins/network-status/openvswitch.xml |
|
| 91 |
-/usr/share/openvswitch/bugtool-plugins/system-configuration.xml |
|
| 92 |
-/usr/share/openvswitch/bugtool-plugins/system-configuration/openvswitch.xml |
|
| 93 |
-/usr/share/openvswitch/bugtool-plugins/system-logs/openvswitch.xml |
|
| 94 |
-/usr/share/openvswitch/python/ovs/__init__.py |
|
| 95 |
-/usr/share/openvswitch/python/ovs/daemon.py |
|
| 96 |
-/usr/share/openvswitch/python/ovs/db/__init__.py |
|
| 97 |
-/usr/share/openvswitch/python/ovs/db/data.py |
|
| 98 |
-/usr/share/openvswitch/python/ovs/db/error.py |
|
| 99 |
-/usr/share/openvswitch/python/ovs/db/idl.py |
|
| 100 |
-/usr/share/openvswitch/python/ovs/db/parser.py |
|
| 101 |
-/usr/share/openvswitch/python/ovs/db/schema.py |
|
| 102 |
-/usr/share/openvswitch/python/ovs/db/types.py |
|
| 103 |
-/usr/share/openvswitch/python/ovs/dirs.py |
|
| 104 |
-/usr/share/openvswitch/python/ovs/fatal_signal.py |
|
| 105 |
-/usr/share/openvswitch/python/ovs/json.py |
|
| 106 |
-/usr/share/openvswitch/python/ovs/jsonrpc.py |
|
| 107 |
-/usr/share/openvswitch/python/ovs/ovsuuid.py |
|
| 108 |
-/usr/share/openvswitch/python/ovs/poller.py |
|
| 109 |
-/usr/share/openvswitch/python/ovs/process.py |
|
| 110 |
-/usr/share/openvswitch/python/ovs/reconnect.py |
|
| 111 |
-/usr/share/openvswitch/python/ovs/socket_util.py |
|
| 112 |
-/usr/share/openvswitch/python/ovs/stream.py |
|
| 113 |
-/usr/share/openvswitch/python/ovs/timeval.py |
|
| 114 |
-/usr/share/openvswitch/python/ovs/unixctl/__init__.py |
|
| 115 |
-/usr/share/openvswitch/python/ovs/unixctl/client.py |
|
| 116 |
-/usr/share/openvswitch/python/ovs/unixctl/server.py |
|
| 117 |
-/usr/share/openvswitch/python/ovs/util.py |
|
| 118 |
-/usr/share/openvswitch/python/ovs/version.py |
|
| 119 |
-/usr/share/openvswitch/python/ovs/vlog.py |
|
| 120 |
-/usr/share/openvswitch/python/ovstest/__init__.py |
|
| 121 |
-/usr/share/openvswitch/python/ovstest/args.py |
|
| 122 |
-/usr/share/openvswitch/python/ovstest/rpcserver.py |
|
| 123 |
-/usr/share/openvswitch/python/ovstest/tcp.py |
|
| 124 |
-/usr/share/openvswitch/python/ovstest/tests.py |
|
| 125 |
-/usr/share/openvswitch/python/ovstest/udp.py |
|
| 126 |
-/usr/share/openvswitch/python/ovstest/util.py |
|
| 127 |
-/usr/share/openvswitch/python/ovstest/vswitch.py |
|
| 128 |
-/usr/share/openvswitch/scripts/ovs-bugtool-bfd-show |
|
| 129 |
-/usr/share/openvswitch/scripts/ovs-bugtool-bond-show |
|
| 130 |
-/usr/share/openvswitch/scripts/ovs-bugtool-cfm-show |
|
| 131 |
-/usr/share/openvswitch/scripts/ovs-bugtool-coverage-show |
|
| 132 |
-/usr/share/openvswitch/scripts/ovs-bugtool-daemons-ver |
|
| 133 |
-/usr/share/openvswitch/scripts/ovs-bugtool-lacp-show |
|
| 134 |
-/usr/share/openvswitch/scripts/ovs-bugtool-list-dbs |
|
| 135 |
-/usr/share/openvswitch/scripts/ovs-bugtool-memory-show |
|
| 136 |
-/usr/share/openvswitch/scripts/ovs-bugtool-ovs-appctl-dpif |
|
| 137 |
-/usr/share/openvswitch/scripts/ovs-bugtool-ovs-ofctl-dump-flows |
|
| 138 |
-/usr/share/openvswitch/scripts/ovs-bugtool-ovs-ofctl-show |
|
| 139 |
-/usr/share/openvswitch/scripts/ovs-bugtool-ovsdb-dump |
|
| 140 |
-/usr/share/openvswitch/scripts/ovs-bugtool-tc-class-show |
|
| 141 |
-/usr/share/openvswitch/scripts/ovs-bugtool-vsctl-show |
|
| 142 |
-/usr/share/openvswitch/scripts/ovs-check-dead-ifs |
|
| 143 |
-/usr/share/openvswitch/scripts/ovs-ctl |
|
| 144 |
-/usr/share/openvswitch/scripts/ovs-lib |
|
| 145 |
-/usr/share/openvswitch/scripts/ovs-save |
|
| 146 |
-/usr/share/openvswitch/scripts/ovs-vtep |
|
| 147 |
-/usr/share/openvswitch/vswitch.ovsschema |
|
| 148 |
-/usr/share/openvswitch/vtep.ovsschema |
|
| 149 | 125 |
|
| 150 | 126 |
%changelog |
| 127 |
+* Mon Oct 12 2015 Vinay Kulkarni <kulkarniv@vmware.com> 2.4.0-1 |
|
| 128 |
+- Update to OVS v2.4.0 |
|
| 151 | 129 |
* Fri May 29 2015 Kumar Kaushik <kaushikk@vmware.com> 2.3.1-1 |
| 152 | 130 |
- Initial build. First version |
| 153 |
- |
| ... | ... |
@@ -23,7 +23,7 @@ |
| 23 | 23 |
"libaio","libaio-devel","thin-provisioning-tools","lvm2","lvm2-devel","lvm2-libs","lvm2-python-libs","lzo","lzo-devel","lzo-minilzo","swig", |
| 24 | 24 |
"rpm-devel","pycurl","urlgrabber","yum-metadata-parser","yum", "rocket", "strace", "cracklib-python", |
| 25 | 25 |
"haveged", "haveged-devel", "vim-extra", |
| 26 |
- "postgresql", "openjdk", "apr", "apr-util", "httpd", "openvswitch", "eventlog", "syslog-ng", "syslog-ng-devel", "zookeeper", "fuse", "fleet", |
|
| 26 |
+ "postgresql", "openjdk", "apr", "apr-util", "httpd", "openvswitch", "openvswitch-devel", "openvswitch-doc", "eventlog", "syslog-ng", "syslog-ng-devel", "zookeeper", "fuse", "fleet", |
|
| 27 | 27 |
"nss-altfiles", "apache-maven", "subversion", "mesos", "python3", "python3-libs", "python3-devel", "python3-tools", "fakeroot-ng", "ctags", |
| 28 | 28 |
"libtirpc", "libtirpc-devel", "lsof", "nfs-utils", "cve-check-tool", "flannel", "rpm-build", "dkms", "openssl-perl", "xinetd", "tftp", "tftp-server", |
| 29 | 29 |
"audit","audit-devel","libcap-ng","libcap-ng-devel","tcp_wrappers","tcp_wrappers-devel", "apr-util-devel", "apr-util-ldap", |