Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 444798 - app-arch/dpkg should create a /etc/dpkg/origins directory and appropriate files
Summary: app-arch/dpkg should create a /etc/dpkg/origins directory and appropriate files
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Debian-related package maintainers [DISBANDED]
URL:
Whiteboard:
Keywords: PATCH
Depends on: 448704
Blocks:
  Show dependency tree
 
Reported: 2012-11-26 14:57 UTC by Matthew Schultz
Modified: 2013-04-26 15:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
origins.gentoo (origins.gentoo,80 bytes, text/plain)
2012-11-26 14:59 UTC, Matthew Schultz
Details
dpkg-ebuild.patch (dpkg-ebuild.patch,537 bytes, patch)
2012-11-26 15:04 UTC, Matthew Schultz
Details | Diff
origins.debian (debian,82 bytes, text/plain)
2012-11-26 17:15 UTC, Matthew Schultz
Details
origins.ubuntu (ubuntu,114 bytes, text/plain)
2012-11-26 17:15 UTC, Matthew Schultz
Details
dpkg-ebuild.patch (dpkg-ebuild.patch,571 bytes, patch)
2012-11-26 17:22 UTC, Matthew Schultz
Details | Diff
dpkg-ebuild.patch (dpkg-ebuild.patch,534 bytes, patch)
2012-11-27 17:34 UTC, Matthew Schultz
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Schultz 2012-11-26 14:57:41 UTC
app-arch/dpkg should create an origins file.  dpkg-vendor --vendor "gentoo"  will complain if that file isn't created:

dpkg-vendor: error: vendor default doesn't exist in /etc/dpkg/origins/
internal error: dpkg-vendor failed (status: 2).

Since dpkg doesn't come with this file, then it should be a gentoo specific file that is added when installing.

Reproducible: Always
Comment 1 Matthew Schultz 2012-11-26 14:59:09 UTC
Created attachment 330626 [details]
origins.gentoo

gentoo dpkg origins file
Comment 2 Matthew Schultz 2012-11-26 15:01:21 UTC
Better example:

dpkg-vendor --vendor "gentoo" --query Vendor
Comment 3 Matthew Schultz 2012-11-26 15:04:11 UTC
Created attachment 330628 [details, diff]
dpkg-ebuild.patch
Comment 4 Matthew Schultz 2012-11-26 15:11:27 UTC
Sorry my example was wrong again. Try again:

dpkg-vendor --query Vendor

This reads the /etc/dpkg/origins/default file which is a symlink to another file.
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2012-11-26 15:39:34 UTC
Comment on attachment 330628 [details, diff]
dpkg-ebuild.patch

+insinto /etc/dpkg/origins
+newins ${FILESDIR}/origins.gentoo gentoo
Comment 6 Matthew Schultz 2012-11-26 17:15:19 UTC
Created attachment 330648 [details]
origins.debian

dpkg should also add some other origins vendors in case that info needs to be queried.
Comment 7 Matthew Schultz 2012-11-26 17:15:34 UTC
Created attachment 330650 [details]
origins.ubuntu
Comment 8 Matthew Schultz 2012-11-26 17:17:03 UTC
(In reply to comment #5)
> Comment on attachment 330628 [details, diff] [details, diff]
> dpkg-ebuild.patch
> 
> +insinto /etc/dpkg/origins
> +newins ${FILESDIR}/origins.gentoo gentoo

The dosym is necessary from my patch to set the default vendor which in this case is gentoo.
Comment 9 Matthew Schultz 2012-11-26 17:22:28 UTC
Created attachment 330652 [details, diff]
dpkg-ebuild.patch

Adds additional origins files.
Comment 10 Jeroen Roovers (RETIRED) gentoo-dev 2012-11-26 19:16:17 UTC
What is this actually needed for?
Comment 11 Matthew Schultz 2012-11-26 19:19:39 UTC
(In reply to comment #10)
> What is this actually needed for?

dpkg-vendor --query Vendor
dpkg-vendor: error: vendor default doesn't exist in /etc/dpkg/origins/

It's needed for the dpkg-vendor program as you can see.  Also other programs will call dpkg-vendor and it will error if there aren't origins files for some vendors.  The default one should be set in the case the vendor flag isn't set.  This is also documented in the dpkg-vendor manpage.
Comment 12 Matthew Schultz 2012-11-26 22:45:11 UTC
(In reply to comment #10)
> What is this actually needed for?

I'm not sure if this is a enhancement.  I really think this is a bug because dpkg-vendor throws an error without these files.
Comment 13 Jeroen Roovers (RETIRED) gentoo-dev 2012-11-27 16:37:55 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > What is this actually needed for?
> 
> dpkg-vendor --query Vendor
> dpkg-vendor: error: vendor default doesn't exist in /etc/dpkg/origins/
> 
> It's needed for the dpkg-vendor program as you can see.  Also other programs
> will call dpkg-vendor and it will error if there aren't origins files for
> some vendors.  The default one should be set in the case the vendor flag
> isn't set.  This is also documented in the dpkg-vendor manpage.

What programs call dpkg-vendor? None of the included executables/scripts do.

I am trying to establish here in what way you want to use dpkg-*, other than to fix what you seem to think is an omission in the way we distribute dpkg. The man page you mention tells you that you can already "work around" the problem using the DEB_VENDOR variable if your third party app (which?) needs it.

Also, deb-origin(5) tells you that "[t]he files in /etc/dpkg/origins can provide information about various vendors who are providing Debian packages." Gentoo Linux is very much not one of those vendors.

So, what do you intend to use this for? Also, what is stopping you from providing these files in your local install to deal with whatever stops you from working around it using DEB_VENDOR?
Comment 14 Matthew Schultz 2012-11-27 17:27:10 UTC
(In reply to comment #13)
> 
> What programs call dpkg-vendor? None of the included executables/scripts do.
> 
I have lintian installed and it calls dpkg-vendor.

> I am trying to establish here in what way you want to use dpkg-*, other than
> to fix what you seem to think is an omission in the way we distribute dpkg.
> The man page you mention tells you that you can already "work around" the
> problem using the DEB_VENDOR variable if your third party app (which?) needs
> it.

Specifying DEB_VENDOR when calling lintian looks for whatever is available in /etc/dpkg/origins.  lintian does not provide the origins information for dpkg-vendor.

> 
> Also, deb-origin(5) tells you that "[t]he files in /etc/dpkg/origins can
> provide information about various vendors who are providing Debian
> packages." Gentoo Linux is very much not one of those vendors.

I am fine with that.  What if the default is set to debian then since it should always be available and it is the source of all debian variants?

> 
> So, what do you intend to use this for? Also, what is stopping you from
> providing these files in your local install to deal with whatever stops you
> from working around it using DEB_VENDOR?

I intend to use this in conjunction with lintian.  Nothing is stopping me from adding these files in a local install which I have already done but only after spending some time figuring out how lintian gets this information.  It could have been easier on me as the user and other users who may not understand the underlying behavior of how this works if these files (at least the debian and ubuntu ones) were already provided.  

Ubuntu provides these origins files in a package called base-files as well as Debian.  Each of these distros has its own version of the package (http://packages.ubuntu.com/raring/base-files and http://packages.debian.org/source/unstable/base-files).  When you install dpkg on these distros, it has a runtime dependency on base-files.  So if dpkg is to be properly installed on Gentoo with all its runtime dependencies, you should either provide these files when installing dpkg or create a new base-files ebuild which installs at least the ubuntu version of base-files which contains both the debian and ubuntu origins files to satisfy all of the runtime dependencies of dpkg.
Comment 15 Matthew Schultz 2012-11-27 17:34:03 UTC
Created attachment 330744 [details, diff]
dpkg-ebuild.patch

Modified ebuild patch to default to debian due to previous comments about Gentoo not being a vendor for debian packages.  This patch is an option of satisfying a missing runtime dependency to the origins files in the debian distro-based base-files packages.
Comment 16 Jeroen Roovers (RETIRED) gentoo-dev 2013-02-20 15:59:49 UTC
Comment on attachment 330648 [details]
origins.debian

dpkg-1.16.9/scripts/t/origins/debian
Comment 17 Jeroen Roovers (RETIRED) gentoo-dev 2013-02-20 16:00:05 UTC
Comment on attachment 330650 [details]
origins.ubuntu

dpkg-1.16.9/scripts/t/origins/ubuntu
Comment 18 Jeroen Roovers (RETIRED) gentoo-dev 2013-02-20 16:07:38 UTC
Let's implement this when a user of those files hits the portage tree. Also, it would probably not be a good idea to set a default (what would it be) as it doesn't seem right to blame some non-Gentoo default for whatever you package up and distribute, so maybe we should install no "debian" or "ubuntu" or indeed "gentoo" file but a "dummy" with dummy values.
Comment 19 Matthew Schultz 2013-02-20 19:39:52 UTC
(In reply to comment #18)
> Let's implement this when a user of those files hits the portage tree. 

Not sure what you mean here.

> Also, it would probably not be a good idea to set a default (what would it be) > as it doesn't seem right to blame some non-Gentoo default for whatever you
> package up and distribute, 

I'm fine with no default.  Currently, when I run lintian, I specify the distro I want it to package for:

DEB_VENDOR="ubuntu" lintian foo.deb

> so maybe we should install no "debian" or
> "ubuntu" or indeed "gentoo" file but a "dummy" with dummy values.

What would a dummy file accomplish?  I need the origin definition files for ubuntu or debian so I have the distro information to target when running lintian.
Comment 20 Matthew Schultz 2013-04-26 13:26:27 UTC
Any status on when this change can be made?  I see dpkg has already been bumped to 1.16.10 without this change.
Comment 21 Jeroen Roovers (RETIRED) gentoo-dev 2013-04-26 14:54:50 UTC
I already explained the problems I see with this. The fix to your problem is to maintain your own /etc.
Comment 22 Matthew Schultz 2013-04-26 15:08:27 UTC
(In reply to comment #21)
> I already explained the problems I see with this. The fix to your problem is
> to maintain your own /etc.

I don't understand.  You mentioned that there shouldn't be a default but why not add the Debian and Ubuntu origin files as part of the package instead of making the user look around to find the proper format for these files?