Bug 51663 - python3-ldb-dev: file in unusual location
python3-ldb-dev: file in unusual location
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Samba
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0
Assigned To: Florian Best
Arvid Requate
:
Depends on: 49720
Blocks:
  Show dependency treegraph
 
Reported: 2020-07-13 07:46 CEST by Philipp Hahn
Modified: 2021-05-25 16:02 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2020-07-13 07:46:04 CEST
$ dpkg -c amd64/python3-ldb-dev_1.5.7-1A~5.0.0.202005281909_amd64.deb 
drwxr-xr-x root/root         0 2020-05-28 19:09 ./
drwxr-xr-x root/root         0 2020-05-28 19:09 ./${DEB_PY3_INCDIR}/
-rw-r--r-- root/root      2970 2019-10-17 12:02 ./${DEB_PY3_INCDIR}/pyldb.h
…
Comment 1 Philipp Hahn univentionstaff 2020-07-13 07:49:22 CEST
patches/ldb/1.5.7-1/21_python3.patch looks buggy
Comment 2 Florian Best univentionstaff 2020-07-13 08:53:05 CEST
(In reply to Philipp Hahn from comment #1)
> patches/ldb/1.5.7-1/21_python3.patch looks buggy

It was taken from upstream and is still in there as is:
https://salsa.debian.org/samba-team/ldb.git

Is the problem that debian/compat=9 exists? While the upstream packages doesn't have debian/compat and build-depends on debhelper-compat (=12).
Comment 3 Florian Best univentionstaff 2020-07-13 09:27:30 CEST
(In reply to Florian Best from comment #2)
No.
Comment 4 Philipp Hahn univentionstaff 2020-07-13 11:01:37 CEST
(In reply to Florian Best from comment #2)
> (In reply to Philipp Hahn from comment #1)
> > patches/ldb/1.5.7-1/21_python3.patch looks buggy
> 
> It was taken from upstream and is still in there as is:
> https://salsa.debian.org/samba-team/ldb.git
> 
> Is the problem that debian/compat=9 exists? While the upstream packages
> doesn't have debian/compat and build-depends on debhelper-compat (=12).

Each compat level has breaking changes; just updating debian/compat is WRONG! You really should read <https://manpages.debian.org/unstable/debhelper/debhelper.7.en.html#Executable_debhelper_config_files> in this case and check it again every time you do a backport.

In your case "debian/python3-ldb-dev.install" is created by the repo-ng patch mechanism and the newly created file receives no executable permissions, so `dh-exec` is not used.


`dpkg -c /mnt/build-storage/upstream/debian/pool/main/l/ldb/python3-ldb-dev_2.0.8-2_amd64.deb` does not show the issue as there the file is part of the `.debian.tar.gz`, which stored the correct file permissions.
Comment 5 Florian Best univentionstaff 2020-07-13 11:22:01 CEST
This issue was also broken upstream:

commit 371b599c470b71cdb461ba7c77f1a6f8509f48b6
Author: Mathieu Parent <math.parent@gmail.com>
Date:   Sat Aug 24 05:42:56 2019 +0200

    Mark debian/python3-ldb-dev.install executable
    
    Otherwise, ${DEB_PY3_INCDIR} is not expanded

diff --git debian/python3-ldb-dev.install debian/python3-ldb-dev.install
old mode 100644
new mode 100755


Cherry-Picked this so far:
r19099 | Bug #51663: chmod +x debian/python3-ldb-dev.install
Comment 6 Florian Best univentionstaff 2020-07-13 12:58:04 CEST
The permissions need to be set in the patch whichi initially creates the file:

r19100 | Bug #51663: chmod +x debian/python3-ldb-dev.install
Comment 7 Florian Best univentionstaff 2021-05-25 16:02:20 CEST
UCS 5.0 has been released:
 https://docs.software-univention.de/release-notes-5.0-0-en.html
 https://docs.software-univention.de/release-notes-5.0-0-de.html

If this error occurs again, please use "Clone This Bug".