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

Guido Günther agx at sigxcpu.org
Fri Apr 30 09:08:41 CEST 2021


Hi,
On Thu, Apr 29, 2021 at 10:14:48AM -0700, Quanah Gibson-Mount wrote:
> 
> 
> --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 SOURCES
> 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

So does s.th. like

%if 0%{?rhel}
%define __python /usr/bin/python3
%define with_docs 0
%define _unpackaged_files_terminate_build 0
%endif

in the conditionlals block of the spec file work too?

> 
> :1,$s/with docs/with_docs/
> 
> Explanations:
> 
> 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
> "docbook2X".
> 
> 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
> like):
> 
> nsgmls:/usr/share/sgml/docbook/xml-dtd-4.5/ent/isoamso.ent:57:29:E: "X0FE68"
> is not a function name
> nsgmls:/usr/share/sgml/docbook/xml-dtd-4.5/ent/isoamso.ent:58:29:E: "X02032"
> is not a function name
> nsgmls:/usr/share/sgml/docbook/xml-dtd-4.5/ent/isoamso.ent:59:29:E: "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:
> 
> /usr/lib/python3.6/site-packages/gbp/__pycache__/__init__.cpython-36.opt-1.pyc
>   /usr/lib/python3.6/site-packages/gbp/__pycache__/__init__.cpython-36.pyc
> 
> /usr/lib/python3.6/site-packages/gbp/__pycache__/command_wrappers.cpython-36.opt-1.pyc
> 
> /usr/lib/python3.6/site-packages/gbp/__pycache__/command_wrappers.cpython-36.pyc
> 
> /usr/lib/python3.6/site-packages/gbp/__pycache__/config.cpython-36.opt-1.pyc
>   /usr/lib/python3.6/site-packages/gbp/__pycache__/config.cpython-36.pyc
>   /usr/lib/python3.6/site-packages/gbp/__pycache__/dch.cpython-36.opt-1.pyc
>   /usr/lib/python3.6/site-packages/gbp/__pycache__/dch.cpython-36.pyc
> 
> /usr/lib/python3.6/site-packages/gbp/__pycache__/errors.cpython-36.opt-1.pyc
> 
> 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
> failure.
> 
> 
> 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
> +%endif
> 
> 
> 
> This resulted in three generated RPMs:
> 
> git-buildpackage-0.9.22-0.noarch.rpm
> git-buildpackage-common-0.9.22-0.noarch.rpm
> git-buildpackage-rpm-0.9.22-0.noarch.rpm
> 
> Next up, to test using them. ;)
> 
> Regards,
> Quanah
> 
> --
> 
> Quanah Gibson-Mount
> Product Architect
> Symas Corporation
> Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
> <http://www.symas.com>
> 


More information about the git-buildpackage mailing list