[git-buildpackage] Bad command paths when installing through pip

Quanah Gibson-Mount quanah at symas.com
Thu Apr 29 19:14:48 CEST 2021

--On Thursday, April 29, 2021 6:23 PM +0200 Guido G√ľnther 
<agx at sigxcpu.org> wrote:

> As a general note: The rpm side has not seen lots of development since
> quite some time so while i'm confident that the Debian side works
> reasonably well (since that is in active usage) I can't say that for the
> rpm side (of which I mostly know that tests still pass and that gbp can
> build itself with the RPM version currently in Debian (4.16)) - just in
> case you hit other things that look odd.

Ok, when building out on AlmaLinux 8.3 (Essentially RHEL8.3), I had to make 
some changes to get it to build the RPMs.

My process was:

git clone https://github.com/agx/git-buildpackage.git

cd git-buildpackage
mkdir -p ../rpmbuild/SOURCES
git archive --format=tar.gz -o SOURCES/git-buildpackage_0.9.22.tar.gz 
--prefix=git-buildpackage-0.9.22/ master
cp SOURCES/git-buildpackage_0.9.22.tar.gz ../rpmbuild/SOURCES/

I had to use master because otherwise it would try to call dpkg-changelog 
(which you recently fixed).

Then I had to make the following changes to the spec file:

vi packaging/git-buildpackage.spec

Add as third, fourth, and fifth lines:
%define __python /usr/bin/python3
%define with_docs 0
%define _unpackaged_files_terminate_build 0

:1,$s/with docs/with_docs/


rpmbuild throws an error about unqualified use of python (First change)

I tried to get the man pages to build with no success.  The spec file 
depends on "docbook2x" which doesn't exist in RHEL.  It is instead 

However, this ships "docbook2man" (not docbook2x-man or docbook-to-man), 
which isn't found in the docs/Makefile.  Even changing this so that it 
explicitly uses docbook2man, I had man page generation failures (things 

"X0FE68" is not a function name
"X02032" is not a function name
"X02118" is not a function name

I didn't pursue further at this point, and just disabled document 
generation entirely.

The unpackaged files were things like:

warning: Installed (but unpackaged) file(s) found:

Apparently this bit in the spec file doesn't work as desired:

find %{buildroot} -name __pycache__ | xargs -r rm -r

I tried changing it to rm -rf as well, but no success, so just disabled 

Finally, there was one additional change.  The libxslt-tools package is 
(Open)SuSE specific, so I made the following modification:

+%if 0%{?suse_version}
 BuildRequires:  libxslt-tools

This resulted in three generated RPMs:


Next up, to test using them. ;)



Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:

More information about the git-buildpackage mailing list