kind: distutils
depends:
- erlang.bst
- unmaintained/django.bst
- unmaintained/xstatic.bst
- openstack-clients.bst
- unmaintained/test-tools.bst
- python-tools.bst
- unmaintained/openstack-services/sqlalchemy.bst
- unmaintained/openstack-services/alembic.bst
- unmaintained/openstack-services/sqlalchemy-migrate.bst
- unmaintained/openstack-services/pysendfile.bst
- unmaintained/openstack-services/websockify.bst
- unmaintained/openstack-services/oslo-concurrency.bst
- unmaintained/openstack-services/oslo-context.bst
- unmaintained/openstack-services/oslo-db.bst
- unmaintained/openstack-services/oslo-rootwrap.bst
- unmaintained/openstack-services/oslo-policy.bst
- unmaintained/openstack-services/pecan.bst
- unmaintained/openstack-services/wsme.bst
- unmaintained/openstack-services/keystonemiddleware.bst
- unmaintained/openstack-services/oslo-messaging.bst
- unmaintained/openstack-services/retrying.bst
- unmaintained/openstack-services/posix-ipc-tarball.bst
sources:
- kind: git
  url: upstream:openstack/ironic
  track: 2015.1.0
  ref: dee609cb7976e9b3cc07c3d342a271c4a347f69f
variables:
  python: python
config:
  install-commands:
    (>):
    - |
      mkdir -p "%{install-root}"/etc/ironic
      install -m 644 etc/ironic/policy.json "%{install-root}"/etc/ironic
      install -m 644 etc/ironic/rootwrap.conf "%{install-root}"/etc/ironic
      mkdir -p "%{install-root}"/etc/ironic/rootwrap.d
      install -m 644 etc/ironic/rootwrap.d/* "%{install-root}"/etc/ironic/rootwrap.d/

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

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