kind: distutils
depends:
- erlang.bst
- unmaintained/django.bst
- unmaintained/xstatic.bst
- openstack-clients.bst
- unmaintained/test-tools.bst
- python-tools.bst
- unmaintained/openstack-services/paste.bst
- unmaintained/openstack-services/routes.bst
- unmaintained/openstack-services/httplib2.bst
- unmaintained/openstack-services/jsonrpclib.bst
- unmaintained/openstack-services/keystonemiddleware.bst
- unmaintained/openstack-services/sqlalchemy.bst
- unmaintained/openstack-services/alembic.bst
- unmaintained/openstack-services/retrying.bst
- unmaintained/openstack-services/oslo-db.bst
- unmaintained/openstack-services/oslo-messaging.bst
- unmaintained/openstack-services/oslo-rootwrap.bst
- unmaintained/openstack-services/oslo-concurrency.bst
- unmaintained/openstack-services/oslo-context.bst
- unmaintained/openstack-services/oslo-log.bst
- unmaintained/openstack-services/oslo-middleware.bst
sources:
- kind: git
  url: upstream:openstack/neutron
  track: 2015.1.0
  ref: 7260e0e3fc2ea479e80e0962624aca7fd38a1f60
variables:
  python: python
config:
  install-commands:
    (>):
    - |
      # Move the configuration files to a proper location
      mkdir "%{install-root}"/etc
      mv "%{install-root}/%{prefix}"/etc/neutron "%{install-root}"/etc

      # Remove unused start/stop script
      rm "%{install-root}/%{prefix}"/etc/init.d/neutron-server

      # Remove configuration files which will be added by Ansible
      rm "%{install-root}"/etc/neutron/neutron.conf
      rm "%{install-root}"/etc/neutron/metadata_agent.ini
      rm "%{install-root}"/etc/neutron/plugins/ml2/ml2_conf.ini
      rm "%{install-root}"/etc/neutron/dhcp_agent.ini
      rm "%{install-root}"/etc/neutron/l3_agent.ini

      # Add neutron to sudoers controlling which commands is running as a
      # root using the openstack rootwrap.
      mkdir -p "%{install-root}"/etc/sudoers.d
      install -D -m 0440 /proc/self/fd/0 <<'EOF' "%{install-root}"/etc/sudoers.d/neutron-rootwrap
      Defaults:neutron !requiretty

      neutron ALL=(root) NOPASSWD: /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf *
      EOF
