Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1271133 - /usr/share/dpkg/default.mk contains wrong path
Summary: /usr/share/dpkg/default.mk contains wrong path
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dpkg
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Andrew Colin Kissa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-13 08:40 UTC by Jonas Jonsson
Modified: 2015-11-01 02:35 UTC (History)
4 users (show)

Fixed In Version: dpkg-1.17.25-6.fc22 dpkg-1.17.25-6.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-28 16:24:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch against fedora scm repo. (4.78 KB, patch)
2015-10-17 10:57 UTC, Alec Leamas
no flags Details | Diff
Revised patch with white-space junk scrubbed (2.56 KB, patch)
2015-10-17 11:15 UTC, Alec Leamas
no flags Details | Diff

Description Jonas Jonsson 2015-10-13 08:40:35 UTC
Description of problem:
The file /usr/share/dpkg/default.mk from package dpkg and dpkg-dev contains the wrong path for the variable dpkg_datadir.

$ grep ^dpkg_datadir /usr/share/dpkg/default.mk
dpkg_datadir = .

On a Debian 8 system running the same version of dpkg-dev
$ grep ^dpkg_datadir /usr/share/dpkg/default.mk
dpkg_datadir = /usr/share/dpkg

This makes the file unusable since "." isn't a proper path when including from another directory.


Version-Release number of selected component (if applicable):
dpkg-1.17.25-3.fc22.x86_64
dpkg-dev-1.17.25-3.fc22.noarch

How reproducible:
Always

Steps to Reproduce:
1. dnf install dpkg-dev
2. grep ^dpkg_datadir /usr/share/dpkg/default.mk

Actual results:
dpkg_datadir = .

Expected results:
dpkg_datadir = /usr/share/dpkg

Additional info:

Comment 1 Alec Leamas 2015-10-17 10:57:54 UTC
Created attachment 1083903 [details]
Patch against fedora scm repo.

Attaching fix in a patch. This uses Gnu make specific code to locate the directory and should be possible to usptream. An alternative would be to just hardcode the known path.

Comment 2 Alec Leamas 2015-10-17 11:00:22 UTC
I have a copr repo with the fix included - "dnf copr enable leamas/dpkg-addons" to use it. It also contains a provisionary dh_python package.

Comment 3 Alec Leamas 2015-10-17 11:15:07 UTC
Created attachment 1083904 [details]
Revised patch with white-space junk scrubbed

Comment 4 Jonas Jonsson 2015-10-17 11:41:32 UTC
Seeing your patch make me feel that it's not the right way to do this.

git clone git://anonscm.debian.org/dpkg/dpkg.git
cd dpkg
git checkout 1.17.25
autoreconf -i
./configure
make install DESTDIR="$(pwd)/foo" -j4

grep ^dpkg_datadir ./foo/usr/local/share/dpkg/default.mk
dpkg_datadir = /usr/local/share/dpkg

So it works just fine if I build it myself. It seems that there is something wrong with the spec file.

Looking at the Makefile.am in the upstream repository they are doing the substituting at install time. The question is why doesn't this work when building for Fedora?

https://anonscm.debian.org/cgit/dpkg/dpkg.git/tree/scripts/mk/Makefile.am

Comment 5 Jonas Jonsson 2015-10-17 11:44:02 UTC
Oh, and the problem is really this line in the spec file where the .mk files are copied from the source rather that letting "make install" deal with them.

http://pkgs.fedoraproject.org/cgit/dpkg.git/tree/dpkg.spec#n167

Comment 6 Sergio Basto 2015-10-17 11:45:52 UTC
Thanks , yeah ,  I found the bug.  spec misses a make install-data to run a make hook something , I'm not finish yet , but soon I will give you some news ... 


Thanks

Comment 7 Fedora Update System 2015-10-17 14:33:32 UTC
dpkg-1.17.25-6.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-d6271da07d

Comment 8 Fedora Update System 2015-10-17 15:07:53 UTC
dpkg-1.17.25-6.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-fb6c575e25

Comment 9 Sergio Basto 2015-10-17 15:20:38 UTC
(In reply to Jonas Jonsson from comment #5)
> Oh, and the problem is really this line in the spec file where the .mk files
> are copied from the source rather that letting "make install" deal with them.
> 
> http://pkgs.fedoraproject.org/cgit/dpkg.git/tree/dpkg.spec#n167

yeah, my fault, hopefully only happened after update to 1.17.25 which does not affect epel builds .

Thanks

Comment 10 Fedora Update System 2015-10-17 18:20:53 UTC
dpkg-1.17.25-6.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update dpkg'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-d6271da07d

Comment 11 Fedora Update System 2015-10-18 00:52:36 UTC
dpkg-1.17.25-6.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update dpkg'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-fb6c575e25

Comment 12 Fedora Update System 2015-10-28 16:24:12 UTC
dpkg-1.17.25-6.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2015-11-01 02:35:00 UTC
dpkg-1.17.25-6.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.