Commit ec0f56da authored by Niko Tyni's avatar Niko Tyni

Don't use eatmydata for building blacklisted packages

We add a 'maybe-eatmydata' wrapper that looks at a blacklist
of packages that shouldn't be built with eatmydata.

Closes: #4
parent 7680c36f
......@@ -51,3 +51,4 @@ debomatic_gpg_config: |
Name-Email: perl@packages.debian.og
Expire-Date: 1y
%commit
eatmydata_blacklist: /usr/local/share/maybe-eatmydata/blacklist.txt
......@@ -64,3 +64,15 @@
- template: src=etc/exim4/update-exim4.conf.conf.j2 dest=/etc/exim4/update-exim4.conf.conf
- template: src=home/debomatic/cronjobs/gen-indexes.sh.j2 dest=/home/debomatic/cronjobs/gen-indexes.sh mode=0755
- template: src=home/debomatic/sbuildrc.j2 dest=/home/debomatic/.sbuildrc mode=0644
- template: src=srv/chroots/maybe-eatmydata/maybe-eatmydata.j2 dest=/srv/chroots/{{ item[0] }}-{{ item[1] }}/usr/local/bin/maybe-eatmydata mode=0755
with_nested:
- "{{ debomatic_chroots }}"
- "{{ debomatic_archs }}"
- file: path=/srv/chroots/{{ item[0] }}-{{ item[1] }}{{ eatmydata_blacklist | dirname }} state=directory
with_nested:
- "{{ debomatic_chroots }}"
- "{{ debomatic_archs }}"
- template: src=srv/chroots/maybe-eatmydata/blacklist.txt.j2 dest=/srv/chroots/{{ item[0] }}-{{ item[1] }}{{ eatmydata_blacklist }}
with_nested:
- "{{ debomatic_chroots }}"
- "{{ debomatic_archs }}"
......@@ -6,7 +6,8 @@ union-type=overlay
groups=root,sbuild
root-groups=root,sbuild
profile=debomatic
# command-prefix=eatmydata
# https://salsa.debian.org/perl-team/perl.debian.net/ansible-perl-rebuilds/issues/4
command-prefix=maybe-eatmydata
{% if item[1] == 'i386' %}
personality=linux32
{% endif %}
......
#!/bin/sh
# {{ ansible_managed }}
set -e
BLACKLIST="{{ eatmydata_blacklist }}"
if [ "$1" = "dpkg-buildpackage" ] && \
[ -r "$BLACKLIST" ] && \
[ -r debian/changelog ] && \
which dpkg-parsechangelog >/dev/null 2>&1 && \
grep -v '^#' "$BLACKLIST" | \
grep -q -F -x "$(dpkg-parsechangelog -SSource 2>/dev/null || echo no_such_package)"
then
exec "$@"
else
exec eatmydata "$@"
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment