Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Source package: orig vs debian

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
fred barclay
Posts: 124
Joined: 2015-01-24 03:10

Source package: orig vs debian

#1 Post by fred barclay »

G'day guys! On source tarballs downloadable from the Debian website, what is the difference between the package.orig.tar.gz and package.debian.tar.gz ?
For example, for boinc-manager from Testing, the source downloads are:
[boinc_7.6.31+dfsg-1.dsc]
[boinc_7.6.31+dfsg.orig.tar.gz]
[boinc_7.6.31+dfsg-1.debian.tar.xz]

Besides the different packaging formats (.dsc, .tar.gz, .tar.xz), surely there is a difference between the three options, right?
Thanks for your help!
Fred

User avatar
edbarx
Posts: 5401
Joined: 2007-07-18 06:19
Location: 35° 50 N, 14 º 35 E
Been thanked: 2 times

Re: Source package: orig vs debian

#2 Post by edbarx »

You can easily find out by extracting the contents of both archive types to two different directories. The orig archive contains the upstream source package while the debian archive contains the debian directory and its contents. The latter is what makes a source package a Debian package.
Debian == { > 30, 000 packages }; Debian != systemd
The worst infection of all, is a false sense of security!
It is hard to get away from CLI tools.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Source package: orig vs debian

#3 Post by stevepusser »

MX Linux packager and developer

fred barclay
Posts: 124
Joined: 2015-01-24 03:10

Re: Source package: orig vs debian

#4 Post by fred barclay »

Thanks mates!
Steve--that link looks very useful. :) Looks like I've got some reading to do...

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Source package: orig vs debian

#5 Post by stevepusser »

Well, it's pretty simple: the orig file is the unchanged original source tarball from upstream, just renamed. So if I were to download a source tarball for the GIMP 2.8.16 called "gimp-2.8.16.tar.xz", to get the package build system to accept it, I'd have to rename it "gimp_2.8.16.orig.tar.xz". Then for a build, the packager has to extract the source code and add a "debian" folder to it, which contains various files that provide the package information, configuration, and build and packaging instructions. This is saved as the debian tarball during the build. You'll see a .dsc file also, which just contains signatures (hashes) for the source and finished packages, plus the packager's digital signature.

So for the openSUSE build service, I make whatever changes I need to in the debian folder, then generate just the source packages with

Code: Select all

debuild -S -uc -us
(that means I don't digitally sign them, OBS doesn't need that)

then upload those three files to OBS, and it takes over from there.

I'm fairly sure you can just directly upload those three source files from upstream Debian into OBS to see if they can backport without any changes needed, as in the boinc-manager source you mentioned.
MX Linux packager and developer

fred barclay
Posts: 124
Joined: 2015-01-24 03:10

Re: Source package: orig vs debian

#6 Post by fred barclay »

Sorry this is late--I've been rather busy recently--life has decided to get hectic all of a sudden! :lol:

stevepusser: re OBS: is that what you use for your palemoon debs? (Thank you very much, btw! I can't use your repo just yet due to horrible download speeds, but I'm keeping an eye on it). I've got a few packages that I'll probably need to set up a repo for eventually. How did you set up the one for palemoon? Do you have to be "in" with the openSUSE project, or is it open to the public?

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Source package: orig vs debian

#7 Post by stevepusser »

Yes, the Pale Moon repo I've set up is on the OBS; it's free and easy to set up one or more accounts for anyone, but there are a few things to watch out for. I've started to write a guide for the Debian user:

OpenSUSE Build Service Guide

Things to watch out for:

All the packages you add to a project end up in the same repository, which makes it handy if your project requires updated dependencies or build-depends. Building those in your repo makes them available to other packages there or to users that add the repo.

Non-alphanumeric characters in the versioning: OBS replaces these with whitespaces, which causes a FTBFS (failure to build from source). For example, "foo-1.2.3-1~bpo80+1" would have to be changed to something like "foo-1.2.3-1bpo80.1" for a successful build.

It really doesn't matter what release you put on the first stanza of the changelog, OBS will automatically put the correct version in the Release file that apt downloads. If you're only building for Debian, you might put "stable". The origin/release that apt sees for these packages will be "download.opensuse.org".

Code: Select all

Example:  foo (1.2.3-0) stable; urgency=medium
If only building for one version of Ubuntu, just use that release, or leave it at "stable" if you are building for both Debian and Ubuntu from the same source.

Code: Select all

Example: foo (1.2.3-0) trusty; urgency=medium
OBS will automatically generate a download page for each package in the repository, but the package name at the end of the URL has to exactly match the name of the package in the repo. Let's say you want a backport of the GIMP, and give your project the title "GIMP". Then when it's built and you click the download link, it's empty, because the actual package name is "gimp". The solution is to either title the project as "gimp", or change the URL from having "GIMP" at the end to "gimp". If you're building multiple programs in one repository, you only have to tell the users to add the repository one time, as well as just add the one key.

Additional build-depends or dependencies: quite often a backport will require newer versions of a build dependency or a dependency. This should be built first in the project as the first packages; then the later packages will use them from the OBS repo to fulfill those build-deps as specified in the debian/control file. If you are building for Debian 7 and 8, and only need those newer build-deps in Debian 7, the Debian 8 build can be disabled for those packages; you don't want the package to draw your dependency from OBS when it's already in the standard Debian 8 repo.

Each home project that you have on OBS will generate a repo; all packages that you add to the home project will go into that repo. So if you have multiple packages, just give your users instructions to add the repository for one of those packages, and the rest will be available to them. This will avoid duplicate source URLs in their sources.

Separate repositories can be added via subprojects.

Generating Source Packages

You should have devscripts installed to provide "debuild". It is also good to be able to build the packages yourself locally to work out any problems beforehand. Anyway, download the source packages you need: 1. Usually for outside sourced programs, you need the .orig.tar.xx tarball, either the .debian.tar.xx tarball or the .diff.gz file, and the .dsc file. Put these all into a folder with no spaces in its PATH in somewhere in your home directory, open a terminal in that folder, and run

Code: Select all

dpkg-source -x <name_of_.dsc_file>
Usually tab-complete in the terminal will fill in the name of that file for you. (Note that if no changes are needed in the debian folder, these source packages can be directly uploaded to OBS without the need for generating new, changed source files as follows).

Then enter the newly extracted source folder, and edit the changelog and control files in /debian as necessary to get it to build on your target release and to make sure the versioning won't cause a FTBFS in OBS. (see above) This is where building the package on yoour own machine can help to work out any changes necessary.

Once any changes are complete, go back out of the /debian folder to the root of the extracted source folder, open a terminal, and run

Code: Select all

debuild -S -uc -us
to generate new source files. These can be uploaded to OBS once you create a new package, via the "add file" button.

Your target repositories are set up when you create a home project, but they can be individually disabled for each package as you wish.
MX Linux packager and developer

fred barclay
Posts: 124
Joined: 2015-01-24 03:10

Re: Source package: orig vs debian

#8 Post by fred barclay »

Thanks steve! :)

Post Reply