#!/usr/bin/bash

set -ex

# https://github.com/cracklib/cracklib/commit/32eb94395da5aa0128c47f7e300bd26bdce46e13
sed -i 's/register//g' lib/rules.c

# https://github.com/cracklib/cracklib/commit/bdb3aee4ca28c9e2346404ae6539ced0ae5de1db
/usr/bin/patch --no-backup-if-mismatch -p2 -b --suffix .clang2 --fuzz=0 < /usr/lib/rpm/clang/cracklib-0001-rules-Correct-parameter-types-to-Debug-calls.patch

