A critical part of openSUSE's use of quilt is the setup
command, especially supporting starting from a .spec file.
You can see it mentioned at https://en.opensuse.org/openSUSE:Fixing_bugs and https://en.opensuse.org/openSUSE:Build_Service_Tutorial#Using_quilt
In the unpacked source area, patches
becomes a symlink to ..
, but the .pc/
folder is the same as usual.
It would be nice if this is re-implemented using python from the ground up, not using rpm cmdline tools like quilt
does.
setup
has two modes, slow and fast, but the differences don't seem to be especially relevant for a Python rewrite. It looks like we would use the slow approach if not using rpmbuild.
The guts of the spec reading is done with, where fuzz factor is a setup
command line option
rpmbuild --eval "%define _sourcedir $abs_sourcedir" \
--eval "%define _specdir $specdir" \
--eval "%define _builddir $tmpdir/build" \
--eval "%define __patch $tmpdir/bin/patch" \
--eval "%define __tar $tmpdir/bin/tar" \
--eval "%define __unzip $tmpdir/bin/unzip" \
--eval "%define __7zip $tmpdir/bin/7z" \
--eval "$DEFINE_FUZZ" \
--nodeps \
-bp "$specdir/$specfile"
My guess is that we can do most of the setup
without rpmbuild
if we can parse the spec fairly reliably.
The library most used for .spec reading seems to be https://github.com/bkircher/python-rpm-spec .
IMO that would be preferred, even if setup
is not quite complete, or as accurate/fast/etc .