Remove already applied patches
[openstack-build/neutron-build.git] / rpm / SPECS / openstack-neutron.spec
index 1b6d990f43a3610d330d7d228852b10b913fc139..82f8097582849f5c2c6951f8af1d8be07b390ad4 100644 (file)
@@ -1,11 +1,11 @@
 #
 #
-# This is 2013.1.2 release
+# This is 2013.2 release
 #
 %global release_name havana
 
 Name:          openstack-neutron
 Version:       2013.2
 #
 %global release_name havana
 
 Name:          openstack-neutron
 Version:       2013.2
-Release:       0.4.b3%{?dist}
+Release:       11%{?dist}
 Provides:      openstack-quantum = %{version}-%{release}
 Obsoletes:     openstack-quantum < 2013.2-0.3.b3
 
 Provides:      openstack-quantum = %{version}-%{release}
 Obsoletes:     openstack-quantum < 2013.2-0.3.b3
 
@@ -15,8 +15,7 @@ Group:                Applications/System
 License:       ASL 2.0
 URL:           http://launchpad.net/neutron/
 
 License:       ASL 2.0
 URL:           http://launchpad.net/neutron/
 
-#Source0:      http://launchpad.net/neutron/%{release_name}/%{version}/+download/neutron-%{version}.tar.gz
-Source0:       http://launchpad.net/neutron/%{release_name}/%{release_name}-2/+download/neutron-%{version}.b3.tar.gz
+Source0:       http://launchpad.net/neutron/%{release_name}/%{version}/+download/neutron-%{version}.tar.gz
 Source1:       neutron.logrotate
 Source2:       neutron-sudoers
 Source4:       neutron-server-setup
 Source1:       neutron.logrotate
 Source2:       neutron-sudoers
 Source4:       neutron-server-setup
@@ -46,11 +45,17 @@ Source19:   neutron-lbaas-agent.init
 Source29:      neutron-lbaas-agent.upstart
 Source30:      neutron-mlnx-agent.init
 Source40:      neutron-mlnx-agent.upstart
 Source29:      neutron-lbaas-agent.upstart
 Source30:      neutron-mlnx-agent.init
 Source40:      neutron-mlnx-agent.upstart
+Source31:      neutron-vpn-agent.init
+Source41:      neutron-vpn-agent.upstart
+Source32:      neutron-metering-agent.init
+Source42:      neutron-metering-agent.upstart
 
 
+Source90:      neutron-dist.conf
 #
 #
-# patches_base=2013.2.b3
+# patches_base=2013.2+1
 #
 Patch0001: 0001-use-parallel-installed-versions-in-RHEL6.patch
 #
 Patch0001: 0001-use-parallel-installed-versions-in-RHEL6.patch
+Patch0002: MIRA001-Send-DHCP-notifications-regardless-of-agent-status.patch
 
 BuildArch:     noarch
 
 
 BuildArch:     noarch
 
@@ -60,14 +65,16 @@ BuildRequires:      python-setuptools
 # as setup.py build imports neutron.openstack.common.setup
 # which will then check for these
 BuildRequires: python-sqlalchemy0.7
 # as setup.py build imports neutron.openstack.common.setup
 # which will then check for these
 BuildRequires: python-sqlalchemy0.7
-BuildRequires: python-webob1.0
+BuildRequires: python-webob1.2
 BuildRequires: python-paste-deploy1.5
 BuildRequires: python-routes1.12
 BuildRequires: python-paste-deploy1.5
 BuildRequires: python-routes1.12
+BuildRequires:  python-jinja2-26
 BuildRequires: dos2unix
 BuildRequires: python-pbr
 BuildRequires: python-d2to1
 
 
 BuildRequires: dos2unix
 BuildRequires: python-pbr
 BuildRequires: python-d2to1
 
 
+Requires:      dnsmasq-utils
 Requires:      python-neutron = %{version}-%{release}
 Requires:      openstack-utils
 Requires:      python-keystone
 Requires:      python-neutron = %{version}-%{release}
 Requires:      openstack-utils
 Requires:      python-keystone
@@ -85,17 +92,17 @@ Requires:   dnsmasq
 
 
 %description
 
 
 %description
-Quantum is a virtual network service for Openstack. Just like
+Neutron is a virtual network service for Openstack. Just like
 OpenStack Nova provides an API to dynamically request and configure
 OpenStack Nova provides an API to dynamically request and configure
-virtual servers, Quantum provides an API to dynamically request and
+virtual servers, Neutron provides an API to dynamically request and
 configure virtual networks. These networks connect "interfaces" from
 other OpenStack services (e.g., virtual NICs from Nova VMs). The
 configure virtual networks. These networks connect "interfaces" from
 other OpenStack services (e.g., virtual NICs from Nova VMs). The
-Quantum API supports extensions to provide advanced network
+Neutron API supports extensions to provide advanced network
 capabilities (e.g., QoS, ACLs, network monitoring, etc.)
 
 
 %package -n python-neutron
 capabilities (e.g., QoS, ACLs, network monitoring, etc.)
 
 
 %package -n python-neutron
-Summary:       Quantum Python libraries
+Summary:       Neutron Python libraries
 Group:         Applications/System
 
 Provides:      python-quantum = %{version}-%{release}
 Group:         Applications/System
 
 Provides:      python-quantum = %{version}-%{release}
@@ -105,31 +112,34 @@ Requires: MySQL-python
 Requires:      python-alembic
 Requires:      python-amqplib
 Requires:      python-anyjson
 Requires:      python-alembic
 Requires:      python-amqplib
 Requires:      python-anyjson
+Requires:      python-babel
 Requires:      python-eventlet
 Requires:      python-greenlet
 Requires:      python-httplib2
 Requires:      python-iso8601
 Requires:      python-eventlet
 Requires:      python-greenlet
 Requires:      python-httplib2
 Requires:      python-iso8601
+Requires:      python-jinja2-26
+Requires:      python-keystoneclient
 Requires:      python-kombu
 Requires:      python-lxml
 Requires:      python-paste-deploy1.5
 Requires:      python-routes1.12
 Requires:      python-sqlalchemy0.7
 Requires:      python-kombu
 Requires:      python-lxml
 Requires:      python-paste-deploy1.5
 Requires:      python-routes1.12
 Requires:      python-sqlalchemy0.7
-Requires:      python-webob1.0
+Requires:      python-webob1.2
 Requires:      python-netaddr
 Requires:      python-netaddr
-Requires:      python-oslo-config
+Requires:      python-oslo-config >= 1:1.2.0
 Requires:      python-qpid
 Requires:      python-neutronclient
 Requires:      sudo
 
 %description -n python-neutron
 Requires:      python-qpid
 Requires:      python-neutronclient
 Requires:      sudo
 
 %description -n python-neutron
-Quantum provides an API to dynamically request and configure virtual
+Neutron provides an API to dynamically request and configure virtual
 networks.
 
 This package contains the neutron Python library.
 
 
 %package -n openstack-neutron-bigswitch
 networks.
 
 This package contains the neutron Python library.
 
 
 %package -n openstack-neutron-bigswitch
-Summary:       Quantum Big Switch plugin
+Summary:       Neutron Big Switch plugin
 Group:         Applications/System
 
 Provides:      openstack-quantum-bigswitch = %{version}-%{release}
 Group:         Applications/System
 
 Provides:      openstack-quantum-bigswitch = %{version}-%{release}
@@ -139,7 +149,7 @@ Requires:   openstack-neutron = %{version}-%{release}
 
 
 %description -n openstack-neutron-bigswitch
 
 
 %description -n openstack-neutron-bigswitch
-Quantum provides an API to dynamically request and configure virtual
+Neutron provides an API to dynamically request and configure virtual
 networks.
 
 This package contains the neutron plugin that implements virtual
 networks.
 
 This package contains the neutron plugin that implements virtual
@@ -148,7 +158,7 @@ Networks Controller.
 
 
 %package -n openstack-neutron-brocade
 
 
 %package -n openstack-neutron-brocade
-Summary:       Quantum Brocade plugin
+Summary:       Neutron Brocade plugin
 Group:         Applications/System
 
 Provides:      openstack-quantum-brocade = %{version}-%{release}
 Group:         Applications/System
 
 Provides:      openstack-quantum-brocade = %{version}-%{release}
@@ -158,7 +168,7 @@ Requires:   openstack-neutron = %{version}-%{release}
 
 
 %description -n openstack-neutron-brocade
 
 
 %description -n openstack-neutron-brocade
-Quantum provides an API to dynamically request and configure virtual
+Neutron provides an API to dynamically request and configure virtual
 networks.
 
 This package contains the neutron plugin that implements virtual
 networks.
 
 This package contains the neutron plugin that implements virtual
@@ -166,7 +176,7 @@ networks using Brocade VCS switches running NOS.
 
 
 %package -n openstack-neutron-cisco
 
 
 %package -n openstack-neutron-cisco
-Summary:       Quantum Cisco plugin
+Summary:       Neutron Cisco plugin
 Group:         Applications/System
 
 Provides:      openstack-quantum-cisco = %{version}-%{release}
 Group:         Applications/System
 
 Provides:      openstack-quantum-cisco = %{version}-%{release}
@@ -177,7 +187,7 @@ Requires:   python-configobj
 
 
 %description -n openstack-neutron-cisco
 
 
 %description -n openstack-neutron-cisco
-Quantum provides an API to dynamically request and configure virtual
+Neutron provides an API to dynamically request and configure virtual
 networks.
 
 This package contains the neutron plugin that implements virtual
 networks.
 
 This package contains the neutron plugin that implements virtual
@@ -185,7 +195,7 @@ networks using Cisco UCS and Nexus.
 
 
 %package -n openstack-neutron-hyperv
 
 
 %package -n openstack-neutron-hyperv
-Summary:       Quantum Hyper-V plugin
+Summary:       Neutron Hyper-V plugin
 Group:         Applications/System
 
 Provides:      openstack-quantum-hyperv = %{version}-%{release}
 Group:         Applications/System
 
 Provides:      openstack-quantum-hyperv = %{version}-%{release}
@@ -195,7 +205,7 @@ Requires:   openstack-neutron = %{version}-%{release}
 
 
 %description -n openstack-neutron-hyperv
 
 
 %description -n openstack-neutron-hyperv
-Quantum provides an API to dynamically request and configure virtual
+Neutron provides an API to dynamically request and configure virtual
 networks.
 
 This package contains the neutron plugin that implements virtual
 networks.
 
 This package contains the neutron plugin that implements virtual
@@ -203,7 +213,7 @@ networks using Microsoft Hyper-V.
 
 
 %package -n openstack-neutron-linuxbridge
 
 
 %package -n openstack-neutron-linuxbridge
-Summary:       Quantum linuxbridge plugin
+Summary:       Neutron linuxbridge plugin
 Group:         Applications/System
 
 Provides:      openstack-quantum-linuxbridge = %{version}-%{release}
 Group:         Applications/System
 
 Provides:      openstack-quantum-linuxbridge = %{version}-%{release}
@@ -215,7 +225,7 @@ Requires:   python-pyudev
 
 
 %description -n openstack-neutron-linuxbridge
 
 
 %description -n openstack-neutron-linuxbridge
-Quantum provides an API to dynamically request and configure virtual
+Neutron provides an API to dynamically request and configure virtual
 networks.
 
 This package contains the neutron plugin that implements virtual
 networks.
 
 This package contains the neutron plugin that implements virtual
@@ -223,7 +233,7 @@ networks as VLANs using Linux bridging.
 
 
 %package -n openstack-neutron-midonet
 
 
 %package -n openstack-neutron-midonet
-Summary:       Quantum MidoNet plugin
+Summary:       Neutron MidoNet plugin
 Group:         Applications/System
 
 Provides:      openstack-quantum-midonet = %{version}-%{release}
 Group:         Applications/System
 
 Provides:      openstack-quantum-midonet = %{version}-%{release}
@@ -233,7 +243,7 @@ Requires:   openstack-neutron = %{version}-%{release}
 
 
 %description -n openstack-neutron-midonet
 
 
 %description -n openstack-neutron-midonet
-Quantum provides an API to dynamically request and configure virtual
+Neutron provides an API to dynamically request and configure virtual
 networks.
 
 This package contains the neutron plugin that implements virtual
 networks.
 
 This package contains the neutron plugin that implements virtual
@@ -241,7 +251,7 @@ networks using MidoNet from Midokura.
 
 
 %package -n openstack-neutron-ml2
 
 
 %package -n openstack-neutron-ml2
-Summary:       Quantum ML2 plugin
+Summary:       Neutron ML2 plugin
 Group:         Applications/System
 
 Provides:      openstack-quantum-ml2 = %{version}-%{release}
 Group:         Applications/System
 
 Provides:      openstack-quantum-ml2 = %{version}-%{release}
@@ -251,7 +261,7 @@ Requires:   openstack-neutron = %{version}-%{release}
 
 
 %description -n openstack-neutron-ml2
 
 
 %description -n openstack-neutron-ml2
-Quantum provides an API to dynamically request and configure virtual
+Neutron provides an API to dynamically request and configure virtual
 networks.
 
 This package contains a neutron plugin that allows the use of drivers
 networks.
 
 This package contains a neutron plugin that allows the use of drivers
@@ -260,7 +270,7 @@ for accessing those types.
 
 
 %package -n openstack-neutron-mellanox
 
 
 %package -n openstack-neutron-mellanox
-Summary:       Quantum Mellanox plugin
+Summary:       Neutron Mellanox plugin
 Group:         Applications/System
 
 Provides:      openstack-quantum-mellanox = %{version}-%{release}
 Group:         Applications/System
 
 Provides:      openstack-quantum-mellanox = %{version}-%{release}
@@ -270,12 +280,12 @@ Requires: openstack-neutron = %{version}-%{release}
 
 
 %description -n openstack-neutron-mellanox
 
 
 %description -n openstack-neutron-mellanox
-This plugin implements Quantum v2 APIs with support for Mellanox embedded
+This plugin implements Neutron v2 APIs with support for Mellanox embedded
 switch functionality as part of the VPI (Ethernet/InfiniBand) HCA.
 
 
 %package -n openstack-neutron-nicira
 switch functionality as part of the VPI (Ethernet/InfiniBand) HCA.
 
 
 %package -n openstack-neutron-nicira
-Summary:       Quantum Nicira plugin
+Summary:       Neutron Nicira plugin
 Group:         Applications/System
 
 Provides:      openstack-quantum-nicira = %{version}-%{release}
 Group:         Applications/System
 
 Provides:      openstack-quantum-nicira = %{version}-%{release}
@@ -285,7 +295,7 @@ Requires:   openstack-neutron = %{version}-%{release}
 
 
 %description -n openstack-neutron-nicira
 
 
 %description -n openstack-neutron-nicira
-Quantum provides an API to dynamically request and configure virtual
+Neutron provides an API to dynamically request and configure virtual
 networks.
 
 This package contains the neutron plugin that implements virtual
 networks.
 
 This package contains the neutron plugin that implements virtual
@@ -293,7 +303,7 @@ networks using Nicira NVP.
 
 
 %package -n openstack-neutron-openvswitch
 
 
 %package -n openstack-neutron-openvswitch
-Summary:       Quantum openvswitch plugin
+Summary:       Neutron openvswitch plugin
 Group:         Applications/System
 
 Provides:      openstack-quantum-openvswitch = %{version}-%{release}
 Group:         Applications/System
 
 Provides:      openstack-quantum-openvswitch = %{version}-%{release}
@@ -304,7 +314,7 @@ Requires:   openvswitch
 
 
 %description -n openstack-neutron-openvswitch
 
 
 %description -n openstack-neutron-openvswitch
-Quantum provides an API to dynamically request and configure virtual
+Neutron provides an API to dynamically request and configure virtual
 networks.
 
 This package contains the neutron plugin that implements virtual
 networks.
 
 This package contains the neutron plugin that implements virtual
@@ -312,7 +322,7 @@ networks using Open vSwitch.
 
 
 %package -n openstack-neutron-plumgrid
 
 
 %package -n openstack-neutron-plumgrid
-Summary:       Quantum PLUMgrid plugin
+Summary:       Neutron PLUMgrid plugin
 Group:         Applications/System
 
 Provides:      openstack-quantum-plumgrid = %{version}-%{release}
 Group:         Applications/System
 
 Provides:      openstack-quantum-plumgrid = %{version}-%{release}
@@ -322,7 +332,7 @@ Requires:   openstack-neutron = %{version}-%{release}
 
 
 %description -n openstack-neutron-plumgrid
 
 
 %description -n openstack-neutron-plumgrid
-Quantum provides an API to dynamically request and configure virtual
+Neutron provides an API to dynamically request and configure virtual
 networks.
 
 This package contains the neutron plugin that implements virtual
 networks.
 
 This package contains the neutron plugin that implements virtual
@@ -330,7 +340,7 @@ networks using the PLUMgrid platform.
 
 
 %package -n openstack-neutron-ryu
 
 
 %package -n openstack-neutron-ryu
-Summary:       Quantum Ryu plugin
+Summary:       Neutron Ryu plugin
 Group:         Applications/System
 
 Provides:      openstack-quantum-ryu = %{version}-%{release}
 Group:         Applications/System
 
 Provides:      openstack-quantum-ryu = %{version}-%{release}
@@ -340,7 +350,7 @@ Requires:   openstack-neutron = %{version}-%{release}
 
 
 %description -n openstack-neutron-ryu
 
 
 %description -n openstack-neutron-ryu
-Quantum provides an API to dynamically request and configure virtual
+Neutron provides an API to dynamically request and configure virtual
 networks.
 
 This package contains the neutron plugin that implements virtual
 networks.
 
 This package contains the neutron plugin that implements virtual
@@ -348,7 +358,7 @@ networks using the Ryu Network Operating System.
 
 
 %package -n openstack-neutron-nec
 
 
 %package -n openstack-neutron-nec
-Summary:       Quantum NEC plugin
+Summary:       Neutron NEC plugin
 Group:         Applications/System
 
 Provides:      openstack-quantum-nec = %{version}-%{release}
 Group:         Applications/System
 
 Provides:      openstack-quantum-nec = %{version}-%{release}
@@ -358,7 +368,7 @@ Requires:   openstack-neutron = %{version}-%{release}
 
 
 %description -n openstack-neutron-nec
 
 
 %description -n openstack-neutron-nec
-Quantum provides an API to dynamically request and configure virtual
+Neutron provides an API to dynamically request and configure virtual
 networks.
 
 This package contains the neutron plugin that implements virtual
 networks.
 
 This package contains the neutron plugin that implements virtual
@@ -366,7 +376,7 @@ networks using the NEC OpenFlow controller.
 
 
 %package -n openstack-neutron-metaplugin
 
 
 %package -n openstack-neutron-metaplugin
-Summary:       Quantum meta plugin
+Summary:       Neutron meta plugin
 Group:         Applications/System
 
 Provides:      openstack-quantum-metaplugin = %{version}-%{release}
 Group:         Applications/System
 
 Provides:      openstack-quantum-metaplugin = %{version}-%{release}
@@ -376,20 +386,20 @@ Requires: openstack-neutron = %{version}-%{release}
 
 
 %description -n openstack-neutron-metaplugin
 
 
 %description -n openstack-neutron-metaplugin
-Quantum provides an API to dynamically request and configure virtual
+Neutron provides an API to dynamically request and configure virtual
 networks.
 
 This package contains the neutron plugin that implements virtual
 networks using multiple other neutron plugins.
 
 
 networks.
 
 This package contains the neutron plugin that implements virtual
 networks using multiple other neutron plugins.
 
 
-%package -n openstack-neutron-meetering-agent
+%package -n openstack-neutron-metering-agent
 Summary:       Neutron bandwidth metering agent
 Group:         Applications/System
 
 Requires:      openstack-neutron = %{version}-%{release}
 
 Summary:       Neutron bandwidth metering agent
 Group:         Applications/System
 
 Requires:      openstack-neutron = %{version}-%{release}
 
-%description -n openstack-neutron-meetering-agent
+%description -n openstack-neutron-metering-agent
 Neutron provides an API to measure bandwidth utilization
 
 This package contains the neutron agent responsible for generating bandwidth
 Neutron provides an API to measure bandwidth utilization
 
 This package contains the neutron agent responsible for generating bandwidth
@@ -412,26 +422,33 @@ IPSec.
 %setup -q -n neutron-%{version}
 
 %patch0001 -p1
 %setup -q -n neutron-%{version}
 
 %patch0001 -p1
+#%patch0002 -p1
 
 
-sed -i 's/%{version}/%{version}/' PKG-INFO
-
-find neutron -name \*.py -exec sed -i '/\/usr\/bin\/env python/d' {} \;
-
-# let RPM handle deps
-sed -i '/setup_requires/d; /install_requires/d; /dependency_links/d' setup.py
+find neutron -name \*.py -exec sed -i '/\/usr\/bin\/env python/{d;q}' {} +
 
 chmod 644 neutron/plugins/cisco/README
 
 
 chmod 644 neutron/plugins/cisco/README
 
-# Adjust configuration file content
-sed -i 's/debug = True/debug = False/' etc/neutron.conf
-sed -i 's/\# auth_strategy = keystone/auth_strategy = noauth/' etc/neutron.conf
-
 # Let's handle dependencies ourseleves
 rm -f requirements.txt
 
 %build
 %{__python} setup.py build
 
 # Let's handle dependencies ourseleves
 rm -f requirements.txt
 
 %build
 %{__python} setup.py build
 
+# Loop through values in neutron-dist.conf and make sure that the values
+# are substituted into the neutron.conf as comments. Some of these values
+# will have been uncommented as a way of upstream setting defaults outside
+# of the code. For service_provider and notification-driver, there are
+# commented examples above uncommented settings, so this specifically
+# skips those comments and instead comments out the actual settings and
+# substitutes the correct default values.
+while read name eq value; do
+  test "$name" && test "$value" || continue
+  if [ "$name" = "service_provider" -o "$name" = "notification_driver" ]; then
+    sed -ri "0,/^$name *=/{s!^$name *=.*!# $name = $value!}" etc/neutron.conf
+  else
+    sed -ri "0,/^(#)? *$name *=/{s!^(#)? *$name *=.*!# $name = $value!}" etc/neutron.conf
+  fi
+done < %{SOURCE90}
 
 %install
 %{__python} setup.py install -O1 --skip-build --root %{buildroot}
 
 %install
 %{__python} setup.py install -O1 --skip-build --root %{buildroot}
@@ -454,12 +471,6 @@ install -d -m 755 %{buildroot}%{_sysconfdir}/neutron
 mv %{buildroot}/usr/etc/neutron/* %{buildroot}%{_sysconfdir}/neutron
 chmod 640  %{buildroot}%{_sysconfdir}/neutron/plugins/*/*.ini
 
 mv %{buildroot}/usr/etc/neutron/* %{buildroot}%{_sysconfdir}/neutron
 chmod 640  %{buildroot}%{_sysconfdir}/neutron/plugins/*/*.ini
 
-# Configure agents to use neutron-rootwrap
-sed -i 's/^# root_helper.*/root_helper = sudo neutron-rootwrap \/etc\/neutron\/rootwrap.conf/g' %{buildroot}%{_sysconfdir}/neutron/neutron.conf
-
-# Configure neutron-dhcp-agent state_path
-sed -i 's/state_path = \/opt\/stack\/data/state_path = \/var\/lib\/neutron/' %{buildroot}%{_sysconfdir}/neutron/dhcp_agent.ini
-
 # Install logrotate
 install -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-neutron
 
 # Install logrotate
 install -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-neutron
 
@@ -478,6 +489,8 @@ install -p -D -m 755 %{SOURCE17} %{buildroot}%{_initrddir}/neutron-metadata-agen
 install -p -D -m 755 %{SOURCE18} %{buildroot}%{_initrddir}/neutron-ovs-cleanup
 install -p -D -m 755 %{SOURCE19} %{buildroot}%{_initrddir}/neutron-lbaas-agent
 install -p -D -m 755 %{SOURCE30} %{buildroot}%{_initrddir}/neutron-mlnx-agent
 install -p -D -m 755 %{SOURCE18} %{buildroot}%{_initrddir}/neutron-ovs-cleanup
 install -p -D -m 755 %{SOURCE19} %{buildroot}%{_initrddir}/neutron-lbaas-agent
 install -p -D -m 755 %{SOURCE30} %{buildroot}%{_initrddir}/neutron-mlnx-agent
+install -p -D -m 755 %{SOURCE31} %{buildroot}%{_initrddir}/neutron-vpn-agent
+install -p -D -m 755 %{SOURCE32} %{buildroot}%{_initrddir}/neutron-metering-agent
 
 # Setup directories
 install -d -m 755 %{buildroot}%{_datadir}/neutron
 
 # Setup directories
 install -d -m 755 %{buildroot}%{_datadir}/neutron
@@ -503,20 +516,25 @@ install -p -m 644 %{SOURCE27} %{buildroot}%{_datadir}/neutron/
 install -p -m 644 %{SOURCE28} %{buildroot}%{_datadir}/neutron/
 install -p -m 644 %{SOURCE29} %{buildroot}%{_datadir}/neutron/
 install -p -m 644 %{SOURCE40} %{buildroot}%{_datadir}/neutron/
 install -p -m 644 %{SOURCE28} %{buildroot}%{_datadir}/neutron/
 install -p -m 644 %{SOURCE29} %{buildroot}%{_datadir}/neutron/
 install -p -m 644 %{SOURCE40} %{buildroot}%{_datadir}/neutron/
+install -p -m 644 %{SOURCE41} %{buildroot}%{_datadir}/neutron/
+install -p -m 644 %{SOURCE42} %{buildroot}%{_datadir}/neutron/
+
+# Install dist conf
+install -p -D -m 640 %{SOURCE90} %{buildroot}%{_datadir}/neutron/neutron-dist.conf
 
 # Install version info file
 cat > %{buildroot}%{_sysconfdir}/neutron/release <<EOF
 
 # Install version info file
 cat > %{buildroot}%{_sysconfdir}/neutron/release <<EOF
-[Quantum]
+[Neutron]
 vendor = Fedora Project
 vendor = Fedora Project
-product = OpenStack Quantum
+product = OpenStack Neutron
 package = %{release}
 EOF
 
 %pre
 package = %{release}
 EOF
 
 %pre
-getent group neutron >/dev/null || groupadd -o -r neutron --gid 164
+getent group neutron >/dev/null || groupadd -r neutron
 getent passwd neutron >/dev/null || \
 getent passwd neutron >/dev/null || \
-    useradd -o --uid 164 -r -g neutron -d %{_sharedstatedir}/neutron -s /sbin/nologin \
-    -c "OpenStack Quantum Daemons" neutron
+    useradd -r -g neutron -d %{_sharedstatedir}/neutron -s /sbin/nologin \
+    -c "OpenStack Neutron Daemons" neutron
 exit 0
 
 
 exit 0
 
 
@@ -524,6 +542,9 @@ exit 0
 if [ $1 -eq 1 ] ; then
     # Initial installation
     /sbin/chkconfig --add neutron-server
 if [ $1 -eq 1 ] ; then
     # Initial installation
     /sbin/chkconfig --add neutron-server
+    for agent in dhcp l3 metadata lbaas; do
+      /sbin/chkconfig --add neutron-$agent-agent
+    done
 fi
 
 %preun
 fi
 
 %preun
@@ -531,24 +552,60 @@ if [ $1 -eq 0 ] ; then
     # Package removal, not upgrade
     /sbin/service neutron-server stop >/dev/null 2>&1
     /sbin/chkconfig --del neutron-server
     # Package removal, not upgrade
     /sbin/service neutron-server stop >/dev/null 2>&1
     /sbin/chkconfig --del neutron-server
-    /sbin/service neutron-dhcp-agent stop >/dev/null 2>&1
-    /sbin/chkconfig --del neutron-dhcp-agent
-    /sbin/service neutron-l3-agent stop >/dev/null 2>&1
-    /sbin/chkconfig --del neutron-l3-agent
-       /sbin/service neutron-metadata-agent stop >/dev/null 2>&1
-       /sbin/chkconfig --del neutron-metadata-agent
-       /sbin/service neutron-lbaas-agent stop >/dev/null 2>&1
-       /sbin/chkconfig --del neutron-lbaas-agent
+    for agent in dhcp l3 metadata lbaas; do
+      /sbin/service neutron-$agent-agent stop >/dev/null 2>&1
+      /sbin/chkconfig --del neutron-$agent-agent
+    done
 fi
 
 %postun
 if [ $1 -ge 1 ] ; then
     # Package upgrade, not uninstall
     /sbin/service neutron-server condrestart >/dev/null 2>&1 || :
 fi
 
 %postun
 if [ $1 -ge 1 ] ; then
     # Package upgrade, not uninstall
     /sbin/service neutron-server condrestart >/dev/null 2>&1 || :
-    /sbin/service neutron-dhcp-agent condrestart >/dev/null 2>&1 || :
-    /sbin/service neutron-l3-agent condrestart >/dev/null 2>&1 || :
-    /sbin/service neutron-metadata-agent condrestart >/dev/null 2>&1 || :
-    /sbin/service neutron-lbaas-agent condrestart >/dev/null 2>&1 || :
+    for agent in dhcp l3 metadata lbaas; do
+      /sbin/service neutron-$agent-agent condrestart >/dev/null 2>&1 || :
+    done
+fi
+
+%pretrans
+if rpm --quiet -q openstack-quantum; then
+    mkdir -p  %{_localstatedir}/lib/rpm-state/
+
+    # Create a script for restoring init script enabling that we can also
+    # use as a flag to detect quantum -> grizzly upgrades in %posttrans
+    chkconfig --type sysv --list|grep ^quantum| \
+      sed -re 's/[0-6]:off//g
+               s/([0-6]):on\s*/\1/g
+               s/quantum/neutron/g
+               s/^([a-z0-9-]+)\s+([0-6]+)/chkconfig --levels \2 \1 on/' > %{_localstatedir}/lib/rpm-state/UPGRADE_FROM_QUANTUM
+fi
+
+%posttrans
+# Handle migration from quantum -> neutron
+if [ -e %{_localstatedir}/lib/rpm-state/UPGRADE_FROM_QUANTUM ];then
+    # Migrate existing config files
+    for i in `find /etc/quantum -name *.rpmsave`;do
+        new=${i//quantum/neutron}
+        new=${new/%.rpmsave/}
+        sed -e '/^sql_connection/ b
+                /^admin_user/ b
+                s/quantum/neutron/g
+                s/Quantum/Neutron/g' $i > $new
+    done
+
+    # Re-create plugin.ini if it existed.
+    if [ -h %{_sysconfdir}/quantum/plugin.ini ];then
+        plugin_ini=$(readlink %{_sysconfdir}/quantum/plugin.ini)
+        ln -s ${plugin_ini//quantum/neutron} %{_sysconfdir}/neutron/plugin.ini
+    fi
+
+    # Stamp the existing db as grizzly to avoid neutron-server breaking db migration
+    neutron-db-manage --config-file %{_sysconfdir}/neutron/neutron.conf --config-file %{_sysconfdir}/neutron/plugin.ini stamp grizzly || :
+
+    # Restore the enablement of the various neutron services
+    source %{_localstatedir}/lib/rpm-state/UPGRADE_FROM_QUANTUM
+
+    rm -f %{_localstatedir}/lib/rpm-state/UPGRADE_FROM_QUANTUM
 fi
 
 
 fi
 
 
@@ -612,6 +669,12 @@ if [ $1 -ge 1 ] ; then
 fi
 
 
 fi
 
 
+%post -n openstack-neutron-nec
+if [ $1 -eq 1 ] ; then
+    # Initial installation
+    /sbin/chkconfig --add neutron-nec-agent
+fi
+
 %preun -n openstack-neutron-nec
 if [ $1 -eq 0 ] ; then
     # Package removal, not upgrade
 %preun -n openstack-neutron-nec
 if [ $1 -eq 0 ] ; then
     # Package removal, not upgrade
@@ -648,6 +711,45 @@ if [ $1 -ge 1 ] ; then
 fi
 
 
 fi
 
 
+%post -n openstack-neutron-vpn-agent
+if [ $1 -eq 1 ] ; then
+    # Initial installation
+    /sbin/chkconfig --add neutron-vpn-agent
+fi
+
+%preun -n openstack-neutron-vpn-agent
+if [ $1 -eq 0 ] ; then
+    # Package removal, not upgrade
+    /sbin/service neutron-vpn-agent stop >/dev/null 2>&1
+    /sbin/chkconfig --del neutron-vpn-agent
+fi
+
+%postun -n openstack-neutron-vpn-agent
+if [ $1 -ge 1 ] ; then
+    # Package upgrade, not uninstall
+    /sbin/service neutron-vpn-agent condrestart >/dev/null 2>&1 || :
+fi
+
+
+%post -n openstack-neutron-metering-agent
+if [ $1 -eq 1 ] ; then
+    # Initial installation
+    /sbin/chkconfig --add neutron-metering-agent
+fi
+
+%preun -n openstack-neutron-metering-agent
+if [ $1 -eq 0 ] ; then
+    # Package removal, not upgrade
+    /sbin/service neutron-metering-agent stop >/dev/null 2>&1
+    /sbin/chkconfig --del neutron-metering-agent
+fi
+
+%postun -n openstack-neutron-metering-agent
+if [ $1 -ge 1 ] ; then
+    # Package upgrade, not uninstall
+    /sbin/service neutron-metering-agent condrestart >/dev/null 2>&1 || :
+fi
+
 %files
 %doc LICENSE
 %doc README.rst
 %files
 %doc LICENSE
 %doc README.rst
@@ -695,8 +797,10 @@ fi
 %{_datadir}/neutron/neutron-lbaas-agent.upstart
 %dir %{_sysconfdir}/neutron
 %{_sysconfdir}/neutron/release
 %{_datadir}/neutron/neutron-lbaas-agent.upstart
 %dir %{_sysconfdir}/neutron
 %{_sysconfdir}/neutron/release
+%attr(-, root, neutron) %{_datadir}/neutron/neutron-dist.conf
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/api-paste.ini
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/dhcp_agent.ini
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/api-paste.ini
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/dhcp_agent.ini
+%config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/fwaas_driver.ini
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/l3_agent.ini
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/metadata_agent.ini
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/lbaas_agent.ini
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/l3_agent.ini
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/metadata_agent.ini
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/lbaas_agent.ini
@@ -710,6 +814,7 @@ fi
 %dir %attr(0755, neutron, neutron) %{_localstatedir}/log/neutron
 %dir %attr(0755, neutron, neutron) %{_localstatedir}/run/neutron
 %dir %{_datarootdir}/neutron/rootwrap
 %dir %attr(0755, neutron, neutron) %{_localstatedir}/log/neutron
 %dir %attr(0755, neutron, neutron) %{_localstatedir}/run/neutron
 %dir %{_datarootdir}/neutron/rootwrap
+%{_datarootdir}/neutron/rootwrap/debug.filters
 %{_datarootdir}/neutron/rootwrap/dhcp.filters
 %{_datarootdir}/neutron/rootwrap/iptables-firewall.filters
 %{_datarootdir}/neutron/rootwrap/l3.filters
 %{_datarootdir}/neutron/rootwrap/dhcp.filters
 %{_datarootdir}/neutron/rootwrap/iptables-firewall.filters
 %{_datarootdir}/neutron/rootwrap/l3.filters
@@ -881,19 +986,71 @@ fi
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/plugins/metaplugin/*.ini
 
 
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/plugins/metaplugin/*.ini
 
 
-%files -n openstack-neutron-meetering-agent
+%files -n openstack-neutron-metering-agent
 %doc LICENSE
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/metering_agent.ini
 %doc LICENSE
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/metering_agent.ini
+%{_initrddir}/neutron-metering-agent
+%{_datadir}/neutron/neutron-metering-agent.upstart
 %{_bindir}/neutron-metering-agent
 
 
 %files -n openstack-neutron-vpn-agent
 %doc LICENSE
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/vpn_agent.ini
 %{_bindir}/neutron-metering-agent
 
 
 %files -n openstack-neutron-vpn-agent
 %doc LICENSE
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/vpn_agent.ini
+%{_initrddir}/neutron-vpn-agent
+%{_datadir}/neutron/neutron-vpn-agent.upstart
 %{_bindir}/neutron-vpn-agent
 %{_bindir}/neutron-vpn-agent
+%{_datarootdir}/neutron/rootwrap/vpnaas.filters
 
 
 %changelog
 
 
 %changelog
+* Wed Dec 04 2013 Terry Wilson <twilson@redhat.com> - 2013.2-11
+- Add missing debug and vpnaas rootwrap filters, bz#1034207
+
+* Mon Dec 02 2013 Terry Wilson <twilson@redhat.com> - 2013.2-10
+- Replace quantum references in neutron-dist.conf
+
+* Tue Nov 19 2013 Pádraig Brady <pbrady@redhat.com> - 2013.2-9
+- Fix dependency on parallel installed python-jinja2-26
+
+* Tue Nov 19 2013 Pádraig Brady <pbrady@redhat.com> - 2013.2-8
+- Depend on python-webob1.2 rather than deprecated python-webob1.0
+
+* Wed Nov 13 2013 Terry Wilson <twilson@redhat.com> - 2013.2-7
+- Add dnsmasq-utils dependency to openstack-neutron
+
+* Wed Nov 13 2013 Pádraig Brady <pbrady@redhat.com> - 2013.2-6
+- Fix jinja2 import in openstack-neutron-vpn-agent
+
+* Thu Nov 07 2013 Terry Wilson <twilson@redhat.com> - 2013.2-5
+- Update deps for python-{babel,keystoneclient,oslo-config}
+
+* Wed Oct 30 2013 Terry Wilson <twilson@redaht.com> - 2013.2-4
+- Better support for upgrading from grizzly to havana
+
+* Thu Oct 24 2013 Terry Wilson <twilson@redhat.com> - 2013.2-3
+- Fix previous neutron-ovs-cleanup fix
+
+* Thu Oct 24 2013 Terry Wilson <twilson@redhat.com> - 2013.2-2
+- Ensure that neutron-ovs-cleanup completes before exiting (rhbz#1010941)
+
+* Fri Oct 18 2013 Pádraig Brady <pbrady@redhat.com> - 2013.2-1
+- Update to havana GA
+
+* Thu Oct 10 2013 Terry Wilson <twilson@redhat.com> - 2013.2-0.12.rc1
+- Update to havana rc1
+
+* Wed Oct  2 2013 Terry Wilson <twilson@redhat.com> - 2013.2-0.11.b3
+- Add python-jinja2 requires to VPN agent
+- Ad missing services for VPN and metering agent
+
+* Thu Sep 26 2013 Terry Wilson <twilson@redhat.com> - 2013.2-0.10.b3
+- Add support for neutron-dist.conf
+
+* Tue Sep 17 2013 Pádraig Brady <pbrady@redhat.com> - 2013.2-0.9.b3
+- Fix typo in openstack-neutron-meetering-agent package name
+- Register all agent services with chkconfig during installation
+
 * Mon Sep 09 2013 Terry Wilson <twilson@rehdat.com> - 2013.2-0.4.b3
 - Update to havana milestone 3 release
 
 * Mon Sep 09 2013 Terry Wilson <twilson@rehdat.com> - 2013.2-0.4.b3
 - Update to havana milestone 3 release