#!/bin/bash

set -eo pipefail

chown -R {{ rpm_user }} {{ rpm_root_dir }}
chmod 770 {{ rpm_root_dir }}
setfacl -b -k -R {{ rpm_root_dir }}
setfacl -m g:{{ rpm_build_group }}:rX {{ rpm_root_dir }}
setfacl -R -m g:{{ rpm_build_group }}:rwX,d:g:{{ rpm_build_group }}:rwX {{ rpm_root_dir }}/uploads {{ rpm_root_dir }}/builds {{ rpm_root_dir }}/repo
