X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=rhel%2Fopenvswitch.spec.in;h=b86f5db26df06aa0ce64f1a43d134c64bc4ac7d9;hb=0d3f215202191016792b9c7c37d6a6b7e2d57234;hp=2cf9535a5ce83c1d84066dd30a4bd45ab428c916;hpb=6c88547dd0f75a29e6d1c0cd3c76d9678fa4752f;p=cascardo%2Fovs.git diff --git a/rhel/openvswitch.spec.in b/rhel/openvswitch.spec.in index 2cf9535a5..b86f5db26 100644 --- a/rhel/openvswitch.spec.in +++ b/rhel/openvswitch.spec.in @@ -1,24 +1,31 @@ # Spec file for Open vSwitch on Red Hat Enterprise Linux. -# Copyright (C) 2009, 2010, 2011 Nicira Networks, Inc. +# Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Nicira, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, # without warranty of any kind. +# +# If tests have to be skipped while building, specify the '--without check' +# option. For example: +# rpmbuild -bb --without check rhel/openvswitch.spec Name: openvswitch Summary: Open vSwitch daemon/database/utilities Group: System Environment/Daemons URL: http://www.openvswitch.org/ -Vendor: Nicira Networks, Inc. +Vendor: Nicira, Inc. Version: @VERSION@ License: ASL 2.0 Release: 1 Source: openvswitch-%{version}.tar.gz Buildroot: /tmp/openvswitch-rpm -Requires: openvswitch-kmod, logrotate, python +Requires: logrotate, python >= 2.7, python-six +BuildRequires: openssl-devel + +%bcond_without check %description Open vSwitch provides standard network bridging functions and @@ -29,35 +36,53 @@ traffic. %setup -q %build -./configure --prefix=/usr --sysconfdir=/etc --localstatedir=%{_localstatedir} --enable-ssl %{?build_number} +./configure --prefix=/usr --sysconfdir=/etc --localstatedir=%{_localstatedir} --enable-ssl make %{_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT -install -d -m 755 $RPM_BUILD_ROOT/etc -install -d -m 755 $RPM_BUILD_ROOT/etc/init.d -install -m 755 rhel/etc_init.d_openvswitch \ - $RPM_BUILD_ROOT/etc/init.d/openvswitch -install -d -m 755 $RPM_BUILD_ROOT/etc/sysconfig -install -d -m 755 $RPM_BUILD_ROOT/etc/logrotate.d -install -m 755 rhel/etc_logrotate.d_openvswitch \ - $RPM_BUILD_ROOT/etc/logrotate.d/openvswitch -install -d -m 755 $RPM_BUILD_ROOT/usr/share/openvswitch/scripts -install -m 755 rhel/usr_share_openvswitch_scripts_sysconfig.template \ - $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/sysconfig.template -install python/compat/uuid.py $RPM_BUILD_ROOT/usr/share/openvswitch/python -install python/compat/argparse.py $RPM_BUILD_ROOT/usr/share/openvswitch/python + +rhel_cp() { + base=$1 + mode=$2 + dst=$RPM_BUILD_ROOT/$(echo $base | sed 's,_,/,g') + install -D -m $mode rhel/$base $dst +} +rhel_cp etc_init.d_openvswitch 0755 +rhel_cp etc_logrotate.d_openvswitch 0644 +rhel_cp etc_sysconfig_network-scripts_ifup-ovs 0755 +rhel_cp etc_sysconfig_network-scripts_ifdown-ovs 0755 +rhel_cp usr_share_openvswitch_scripts_sysconfig.template 0644 # Get rid of stuff we don't want to make RPM happy. rm \ - $RPM_BUILD_ROOT/usr/bin/ovs-controller \ - $RPM_BUILD_ROOT/usr/share/man/man8/ovs-controller.8 \ + $RPM_BUILD_ROOT/usr/bin/ovs-testcontroller \ + $RPM_BUILD_ROOT/usr/share/man/man8/ovs-testcontroller.8 \ + $RPM_BUILD_ROOT/usr/bin/ovs-test \ + $RPM_BUILD_ROOT/usr/bin/ovs-l3ping \ + $RPM_BUILD_ROOT/usr/share/man/man8/ovs-test.8 \ + $RPM_BUILD_ROOT/usr/share/man/man8/ovs-l3ping.8 \ $RPM_BUILD_ROOT/usr/sbin/ovs-vlan-bug-workaround \ - $RPM_BUILD_ROOT/usr/share/man/man8/ovs-vlan-bug-workaround.8 + $RPM_BUILD_ROOT/usr/share/man/man8/ovs-vlan-bug-workaround.8 \ + $RPM_BUILD_ROOT/usr/bin/ovn-* \ + $RPM_BUILD_ROOT/usr/share/man/man?/ovn-* \ + $RPM_BUILD_ROOT/usr/share/openvswitch/ovn-* \ + $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/ovn-* +(cd "$RPM_BUILD_ROOT" && rm -rf usr/lib) +(cd "$RPM_BUILD_ROOT" && rm -rf usr/include) install -d -m 755 $RPM_BUILD_ROOT/var/lib/openvswitch +%check +%if %{with check} + if make check TESTSUITEFLAGS='%{_smp_mflags}' RECHECK=yes; then :; + else + cat tests/testsuite.log + exit 1 + fi +%endif + %clean rm -rf $RPM_BUILD_ROOT @@ -98,14 +123,19 @@ exit 0 %files %defattr(-,root,root) +%dir /etc/openvswitch +/etc/bash_completion.d/ovs-appctl-bashcomp.bash +/etc/bash_completion.d/ovs-vsctl-bashcomp.bash /etc/init.d/openvswitch -/etc/logrotate.d/openvswitch -/etc/openvswitch/bugtool-plugins/* +%config(noreplace) /etc/logrotate.d/openvswitch +/etc/sysconfig/network-scripts/ifup-ovs +/etc/sysconfig/network-scripts/ifdown-ovs /usr/bin/ovs-appctl -/usr/bin/ovs-benchmark /usr/bin/ovs-dpctl +/usr/bin/ovs-dpctl-top +/usr/bin/ovs-docker /usr/bin/ovs-ofctl -/usr/bin/ovs-parse-leaks +/usr/bin/ovs-parse-backtrace /usr/bin/ovs-pcap /usr/bin/ovs-pki /usr/bin/ovs-tcpundump @@ -113,33 +143,41 @@ exit 0 /usr/bin/ovs-vsctl /usr/bin/ovsdb-client /usr/bin/ovsdb-tool -/usr/sbin/ovs-brcompatd +/usr/bin/vtep-ctl /usr/sbin/ovs-bugtool /usr/sbin/ovs-vswitchd /usr/sbin/ovsdb-server -/usr/share/man/man1/ovs-benchmark.1.gz /usr/share/man/man1/ovs-pcap.1.gz /usr/share/man/man1/ovs-tcpundump.1.gz /usr/share/man/man1/ovsdb-client.1.gz /usr/share/man/man1/ovsdb-server.1.gz /usr/share/man/man1/ovsdb-tool.1.gz /usr/share/man/man5/ovs-vswitchd.conf.db.5.gz +/usr/share/man/man5/vtep.5.gz /usr/share/man/man8/ovs-appctl.8.gz -/usr/share/man/man8/ovs-brcompatd.8.gz /usr/share/man/man8/ovs-bugtool.8.gz /usr/share/man/man8/ovs-ctl.8.gz /usr/share/man/man8/ovs-dpctl.8.gz +/usr/share/man/man8/ovs-dpctl-top.8.gz /usr/share/man/man8/ovs-ofctl.8.gz -/usr/share/man/man8/ovs-parse-leaks.8.gz +/usr/share/man/man8/ovs-parse-backtrace.8.gz /usr/share/man/man8/ovs-pki.8.gz /usr/share/man/man8/ovs-vlan-test.8.gz /usr/share/man/man8/ovs-vsctl.8.gz /usr/share/man/man8/ovs-vswitchd.8.gz +/usr/share/man/man8/vtep-ctl.8.gz +/usr/share/openvswitch/bugtool-plugins/ /usr/share/openvswitch/python/ /usr/share/openvswitch/scripts/ovs-bugtool-* +/usr/share/openvswitch/scripts/ovs-check-dead-ifs /usr/share/openvswitch/scripts/ovs-ctl -/usr/share/openvswitch/scripts/ovs-lib.sh +/usr/share/openvswitch/scripts/ovs-lib /usr/share/openvswitch/scripts/ovs-save +/usr/share/openvswitch/scripts/ovs-vtep /usr/share/openvswitch/scripts/sysconfig.template /usr/share/openvswitch/vswitch.ovsschema +/usr/share/openvswitch/vtep.ovsschema +%doc COPYING DESIGN.md INSTALL.SSL.md NOTICE README.md WHY-OVS.md FAQ.md NEWS +%doc INSTALL.DPDK.md rhel/README.RHEL README-native-tunneling.md /var/lib/openvswitch +/var/log/openvswitch