Package building on ppa failed for permissions.

Asked by VinsS on 2020-05-29

I upgrade the package of python3-exiv2 on my ppa.

The same builds success for bionic, cosmic, disco and olders distributions.
But since eoan the builds are failed for "Permission denied"

The build log in focal:
https://launchpadlibrarian.net/481948104/buildlog_ubuntu-focal-amd64.py3exiv2_0.7.2-0ubuntu8_BUILDING.txt.gz

When building the package a build.sh is created.
------------ build.sh ---------------------------------------------------------
#!/bin/sh

if [ "$1" = "-i" ]; then
    echo "install libexiv2python.so to /usr/lib/python3/dist-packages"
    cp build/libexiv2python.so /usr/lib/python3/dist-packages/libexiv2python.so
    test -d /usr/lib/python3/dist-packages/pyexiv2 || mkdir -p /usr/lib/python3/dist-packages/pyexiv2
    cp src/pyexiv2/__init__.py /usr/lib/python3/dist-packages/pyexiv2/__init__.py
    cp src/pyexiv2/exif.py /usr/lib/python3/dist-packages/pyexiv2/exif.py
    cp src/pyexiv2/iptc.py /usr/lib/python3/dist-packages/pyexiv2/iptc.py
    cp src/pyexiv2/metadata.py /usr/lib/python3/dist-packages/pyexiv2/metadata.py
    cp src/pyexiv2/preview.py /usr/lib/python3/dist-packages/pyexiv2/preview.py
    cp src/pyexiv2/utils.py /usr/lib/python3/dist-packages/pyexiv2/utils.py
    cp src/pyexiv2/xmp.py /usr/lib/python3/dist-packages/pyexiv2/xmp.py

else
    g++ -o build/exiv2wrapper.os -c -fPIC -I/usr/include/python3.8 src/exiv2wrapper.cpp
    g++ -o build/exiv2wrapper_python.os -c -fPIC -I/usr/include/python3.8 src/exiv2wrapper_python.cpp
    g++ -o build/libexiv2python.so -shared build/exiv2wrapper.os build/exiv2wrapper_python.os -lboost_python3_py38 -lexiv2

fi
------------------------------------------------------------------------------

And the rules file in debian/
------------ rules -----------------------------------------------------------
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

PYVERSIONS=$(shell py3versions -v -r)

override_dh_auto_configure:

override_dh_auto_build:
 set -e; \
 python3 configure.py ; \
 /bin/sh build.sh

override_dh_auto_clean:
 rm -rf build

override_dh_auto_install:
 set -e; \
 /bin/sh build.sh -i

override_dh_installchangelogs:
 dh_installchangelogs NEWS

override_dh_compress:
 dh_compress -X.txt -X.js -X.ico

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp:
 dh build-arch --with python3
 touch $@

clean:
 dh $@ --with python3

install: build
 dh $@ --with python3

# Build architecture-independent files here.
binary-indep: build install
 dh $@ --with python3

# Build architecture-dependent files here.
binary-arch: build install
 dh $@ --with python3

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
------------------------------------------------------------------------------

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
2020-05-30
Last query:
2020-05-30
Last reply:
2020-05-29

This question was reopened

Best Manfred Hampl (m-hampl) said : #1

The builders are not allowed creating files outside their build area, e.g. in /usr/lib/python3/...

In your PPA in other distributions, where building succeeds, the following lines are commented out in debian/rules:

...
override_dh_auto_install:
# set -e; \
# /bin/sh build.sh -i
...

VinsS (vincent-vandevyvre) said : #2

Yes, they were commented but that's not the solution, the package is empty.

But you remind me I have two different configure.py files. One for build a .deb on my machine and one for the ppa wich define the path 'debian/python3-exiv2' to copy all files. And I've used the bad configure.py file.

Thanks for your help.
Vincent

VinsS (vincent-vandevyvre) said : #3

Thanks Manfred Hampl, that solved my question.

Manfred Hampl (m-hampl) said : #4

Maybe you can solve the problem by creating a debian/py3exiv2.install file