On 04/01/20 6:03 am, Martin Pitt wrote:
> Hello,
> 
> Sunil Mohan Adapa [2020-01-01 19:29 -0800]:
>> Debian build servers are unable to build the latest Debian package of pcp
>> uploaded to repositories: 5.0.2-1 [1]. As a consequence, pcp and it's
>> dependencies cockpit and freedombox are at threat of being removed from 
>> Debian
>> testing on January 10, 2020 [2].
>>
>> This is due to incorrect invocation of dh_python2 which is no longer 
>> available
>> on these build machines.
> 
> Right, as the previous upload (rightfully) dropped the py2 build deps. I 
> attach
> a first debdiff, but it doesn't work yet. The package build fails later on 
> with

The attached patch works for me. I have done (on a buster machine):

dpkg-source -x pcp_5.0.2-1.dsc
cd pcp-5.0.2
patch -p1 < ../pcp_5.0.2-1.1.debdiff
sudo apt install python3-all-dev
dpkg-buildpackage -us -uc

After that I did (for building clean on unstable):
cd ..
cowbuilder build pcp_5.0.2-1.1.dsc

Both these builds on stable and unstable worked without any hiccups.

> 
> | === src ===
> | rm -f Makefile.new Makefile.fix; CFLAGS='-fPIC -fno-strict-aliasing 
> -D_GNU_SOURCE  -Wall -O2 -g -DPCP_VERSION=\"5.0.2\" -I../../../src/include 
> -I../../../src/include/pcp' CXXFLAGS='' LDFLAGS=' -Wall 
> -L../../../src/libpcp/src -L../../../src/libpcp_web/src 
> -L../../../src/libpcp_pmda/src ' QT_SELECT=5 /usr/bin/qmake -o Makefile.new 
> CONFIG+=release && sed -e 's/Makefile.new/Makefile/g' <Makefile.new | 
> /usr/bin/gawk --posix '$1 == "LIBS" { printf $1; for (i=2;i<=NF;i++) { if 
> ($i~/^-L\//) { save=save " " $i; continue } else if (save!="" && $i~/^-l/) { 
> printf " %s",save; save="" } printf " %s",$i } if (save!="") printf " 
> %s",save; print ""; next } { print }' >Makefile.fix && ( if [ -f Makefile ]; 
> then if diff Makefile Makefile.fix >/dev/null; then :; else rm -f Makefile; 
> mv Makefile.fix Makefile; fi; else mv Makefile.fix Makefile; fi ); rm -f 
> Makefile.new Makefile.fix; /usr/bin/make --no-print-directory -f Makefile
> | rm -f Makefile.new Makefile.fix; CFLAGS='-fPIC -fno-strict-aliasing 
> -D_GNU_SOURCE  -Wall -O2 -g -DPCP_VERSION=\"5.0.2\" -I../../../src/include 
> -I../../../src/include/pcp' CXXFLAGS='' LDFLAGS=' -Wall 
> -L../../../src/libpcp/src -L../../../src/libpcp_web/src 
> -L../../../src/libpcp_pmda/src ' QT_SELECT=5 /usr/bin/qmake -o Makefile.new 
> CONFIG+=release && sed -e 's/Makefile.new/Makefile/g' <Makefile.new | 
> /usr/bin/gawk --posix '$1 == "LIBS" { printf $1; for (i=2;i<=NF;i++) { if 
> ($i~/^-L\//) { save=save " " $i; continue } else if (save!="" && $i~/^-l/) { 
> printf " %s",save; save="" } printf " %s",$i } if (save!="") printf " 
> %s",save; print ""; next } { print }' >Makefile.fix && ( if [ -f Makefile ]; 
> then if diff Makefile Makefile.fix >/dev/null; then :; else rm -f Makefile; 
> mv Makefile.fix Makefile; fi; else mv Makefile.fix Makefile; fi ); rm -f 
> Makefile.new Makefile.fix; /usr/bin/make --no-print-directory -f Makefile
> | diff: Makefile: No such file or directory
> | make[5]: Makefile: No such file or directory
> | mv: cannot stat 'Makefile.fix': No such file or directory
> 
> This file doesn't exist anywhere -- apparently src/include/builddefs.install
> builds it, but at this point this is pretty deeply woven into the build 
> system.
> Curiously, resuming the build with "make"  and "dpkg-buildpackage -us -uc -b 
> -nc"
> gets over that, but then in the end it still fails with

I believe the rm commands run during cleanup. I suspect the source is
not conducive to running multiple build/cleanup cycles. The problem
could be pre-existing and does not effect build machines or clean builds
from freshly extracted source. We can treat it as non-critical and leave
it to be dealt later.

> 
> | dpkg-deb: building package 'pcp-import-sar2pcp' in 
> '../pcp-import-sar2pcp_5.0.2-1.1_all.deb'.
> | dpkg-deb: building package 'pcp-import-mrtg2pcp' in 
> '../pcp-import-mrtg2pcp_5.0.2-1.1_all.deb'.
> | dpkg-deb: building package 'pcp-import-iostat2pcp' in 
> '../pcp-import-iostat2pcp_5.0.2-1.1_all.deb'.
> | dpkg-deb: building package 'pcp-doc' in '../pcp-doc_5.0.2-1.1_all.deb'.
> | dpkg-deb: building package 'pcp-import-sheet2pcp' in 
> '../pcp-import-sheet2pcp_5.0.2-1.1_all.deb'.
> | dpkg-deb: building package 'pcp-import-ganglia2pcp' in 
> '../pcp-import-ganglia2pcp_5.0.2-1.1_all.deb'.
> | dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned 
> exit status 2
> 
> without any apparent error message (the dh_builddeb -i itself succeeds).

I ran into similar issue when attempting to build with multiple parallel
tasks with DEB_BUILD_OPTIONS=parallel=8 or with -j8. If you have this
turned on, please try disabling it.

> 
> As pcp and its reverse dependencies are very close to being kicked out of
> testing (in 6 days), I'm interested in doing an NMU. However, with the above
> build system trouble, it may be necessary to fix this upstream first?

Thank you for looking into this :) Hope it will get resolved in time.

-- 
Sunil

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to