[Scons-users] RPM packaging with SCons
Mats Wichmann
mats at wichmann.us
Sun Feb 20 10:51:39 EST 2022
On 2/20/22 05:47, Werner Reisberger wrote:
> I ran into several problems with the SCons RPM builder as explained in
> previous posts. I couldn't fix this with my basic python knowledge and
> decided to make my own custom solution. With this approach I was able
> to migrate our make based build pipeline for more than a dozen RPM's to
> SCons. For demonstration purposes you can clone and test this from
>
> https://github.com/wrbr/sconstest
>
> Basically I decoupled the highly integrated (but inflexible) RPM builder
> into a tar and a template builder (already provided by SCons) and a
> custom builder which calls the rpmbuild tool. With this solution I am
> much more flexible and can adapt easily to the many RPM features if
> required.
>
> It would be better to have a more user friendly, more abstracted
> solution but I don't see this possibility with the given RPM package
> builder. I also don't think that this builder is anywhere used in
> production.
>
> To fix the problems with the given RPM builder would probably require a
> considerable effort even from a good python developer. It would also
> need someone who can maintain this builder which is immportant for a
> complex package format as RPM is.
SCons includes two rpm things - the packager and the tool. The packager,
called through the Package builder, which attempts to construct a
specfile first, indeed seems a little flimsy, but the tool, which sets
up the Rpm builder, doesn't seem to do much more than your suggestion -
call rpmbuild given a .tar.gz. For reasons not clear to me, there is
no documentation entry for the Rpm builder - nor are there any direct
tests of it. Odd (note: we should do something about that).
Anyway - have you looked at the Rpm builder? Would it work in your
decoupled scenario?
More information about the Scons-users
mailing list