Push a .changes file to track the commit and directory used, which
should end up showing up in the RPM changelog.
Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
Use git diff --max-depth to track changed files on the SPECS/* directory
level, and trigger updates using one $AFTER_COMMIT per package instead
of imprecisely asking OBS to just re-run services on file modifications.
This should fix the problem of triggering the same package (e.g. linux)
way too many times.
Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
This script is not a security barrier, so command injection really isn't
a concern, but this is still a pedantic but nontheless valid correctness
fix.
Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
Make f-string usage compatible with Python < 3.12, where quotes are
restricted to be compatible with plain string syntax.
Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
Remove call to strip() while reading spec from stdin to avoid incorrect
detection of spec_noeol and patch generation at start or end of file.
Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
I really do mean just "change". Apparently some servers don't like the
original one because of some keyword matches. I'm not sure which ones,
but hopefully this shorter one is less likely to trip one of those
checks.
Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
Old-ish versions of RPM fail fatally with an error with stuff like two
different Name keys, which we use sometimes for bootstrap. Add %if\w*,
%else, %endif to GOOD to handle these.
However, we do want to enable as many lines as possible. Therefore,
replace "%if*" with "%if 1" so that stuff like "%if %{with bootstrap}"
gets included.
Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
This is not yet available in Ubuntu 24.04, sadly. Add an option
--unsafe-optional-enosys to allow running without enosys.
Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
Add a script for automatically updating #!RemoteAsset lines. This
contains some atrocious RPM spec hacks, so hopefully it works.
Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>