Debtransform and distribution-specific adjustments
Hi, I'm using the "Alternative method of creating Debian packages", as described at https://en.opensuse.org/openSUSE:Build_Service_Debian_builds#An_Alternative_... (i.e. debtransform). I now have a package which needs slightly different build dependencies for different Ubuntu/Debian versions. How can I specify those? Additionally, I'd be quite interested in a way to reduce the duplication of the build dependencies, which currently are listed twice, once in the *.dsc file, and once in the debian.control file. Is there a way of doing so? Thank you! Philipp
Hi Philipp, from what I recall, in a debian environment, the .dsc file is normally always "generated" from the debian/control file, and so is the special CONTROL file embedded in the binary .deb. The .dsc certainly needs dependency info, including build-deps, but the control is still needed to properly generate the final .deb package using debian tools. So I am not sure they can be consolidated. OBS uses a .dsc alone much like it were a rpm .spec that can be hand edited, and this is a great convenience. I can build a .dsc without having any debian tools on a non-debian platform (alpine linux, for example), and feed that into obs to get debian package builds. I now actually have my own scripts that generate a obs valid .dsc (which is really a subset of debian) from the control file for me, and use transform to support having a single .tar.gz that can also have a .spec for rpm builds, rather than having to have an .orig.tar.gz or needing dpkg-sourcepackage and it's quirky directory layout expectations. While the .dsc files can be renamed for different distributions in obs, I think you can also do the same with the debian.tar.gz using transform in your renamed dsc's. I instead just use "|" rules for dependencies when I have to build for different debian releases where dependencies are named differently, so that I can always have a single control file, rules, and debian.tar.gz for all the debian based distributions I am targetting. On 2/24/21 7:07 AM, Philipp Wagner wrote:
Hi,
I'm using the "Alternative method of creating Debian packages", as described at https://en.opensuse.org/openSUSE:Build_Service_Debian_builds#An_Alternative_... (i.e. debtransform).
I now have a package which needs slightly different build dependencies for different Ubuntu/Debian versions. How can I specify those?
Additionally, I'd be quite interested in a way to reduce the duplication of the build dependencies, which currently are listed twice, once in the *.dsc file, and once in the debian.control file. Is there a way of doing so?
Thank you!
Philipp
Hello, * On Wed, Feb 24, 2021 at 10:29:53AM -0500 David Sugar wrote:
from what I recall, in a debian environment, the .dsc file is normally always "generated" from the debian/control file,
correct.
OBS uses a .dsc alone much like it were a rpm .spec that can be hand edited, and this is a great convenience. I can build a .dsc without having any debian tools on a non-debian platform (alpine linux, for example), and feed that into obs to get debian package builds.
It might be a convenience for people who do not have a debian platform, but for sure, only for them. For users on a Debian platform, it is a PITA to perform this double-housekeeping. What contents does the .dsc have that OBS needs from it, and not from debian/control? To be honest, I do not see anything. What I am doing: Whenever I do any significant change to the control file, I run the build on a Debian, extract the resulting .dsc and put it into obs. Straight-forward, isn't it?
I now actually have my own scripts that generate a obs valid .dsc (which is really a subset of debian) from the control file for me,
I have thought about it myself, too, but I was not sure what I really need for this. If this is really possible, then debian/control must contain all necessary information, mustn't it? So, why does OBS need the .dsc in the first place? BTW, can you share your script(s)? ;) Regards Spiro. -- Spiro R. Trikaliotis https://spiro.trikaliotis.net/
On Wednesday 2021-02-24 16:40, Spiro Trikaliotis wrote:
OBS uses a .dsc alone much like it were a rpm .spec that can be hand edited, and this is a great convenience. I can build a .dsc without having any debian tools on a non-debian platform (alpine linux, for example), and feed that into obs to get debian package builds.
It might be a convenience for people who do not have a debian platform, but for sure, only for them.
For users on a Debian platform, it is a PITA to perform this double-housekeeping.
...and someone has yet to propose to fix this in Debian.
What contents does the .dsc have that OBS needs from it, and not from debian/control? To be honest, I do not see anything.
The .dsc is used for sources and for Build-Depends.
What I am doing: Whenever I do any significant change to the control file, I run the build on a Debian, extract the resulting .dsc and put it into obs.
Straight-forward, isn't it?
"stuff the control file's metadata into a .deb only to extract it again (with a new extension)" is the antithesis to straight-forwardness.
If this is really possible, then debian/control must contain all necessary information, mustn't it? So, why does OBS need the .dsc in the first place?
The control file traditionally doesn't list the source tarballs, does it?
On Wed, Feb 24, 2021 at 1:13 PM Jan Engelhardt <jengelh@inai.de> wrote:
On Wednesday 2021-02-24 16:40, Spiro Trikaliotis wrote:
OBS uses a .dsc alone much like it were a rpm .spec that can be hand edited, and this is a great convenience. I can build a .dsc without having any debian tools on a non-debian platform (alpine linux, for example), and feed that into obs to get debian package builds.
It might be a convenience for people who do not have a debian platform, but for sure, only for them.
For users on a Debian platform, it is a PITA to perform this double-housekeeping.
...and someone has yet to propose to fix this in Debian.
I'm honestly a bit surprised that we don't have the path of using RPM spec files to build Debian packages documented on that wiki page. That's been possible for more than seven years...
What contents does the .dsc have that OBS needs from it, and not from debian/control? To be honest, I do not see anything.
The .dsc is used for sources and for Build-Depends.
What I am doing: Whenever I do any significant change to the control file, I run the build on a Debian, extract the resulting .dsc and put it into obs.
Straight-forward, isn't it?
"stuff the control file's metadata into a .deb only to extract it again (with a new extension)" is the antithesis to straight-forwardness.
If this is really possible, then debian/control must contain all necessary information, mustn't it? So, why does OBS need the .dsc in the first place?
The control file traditionally doesn't list the source tarballs, does it?
It does not. The dsc file is the list of inputs as a whole, both build dependencies and all the files that are used for the package build. That's why it's called the "Debian Source Control" (DSC) file. -- 真実はいつも一つ!/ Always, there's only one truth!
Hi, On 24.02.21 18:18, Neal Gompa wrote:
I'm honestly a bit surprised that we don't have the path of using RPM spec files to build Debian packages documented on that wiki page. That's been possible for more than seven years...
That's something I'm reading about for the first time (and I've read a fair amount of documentation pieces on various sites). Do you have a pointer how that works? (If I can figure it out I'll add it to the wiki.) On the wider discussion: I'm aware that by uploading a Debian source package I can get distribution-specific behavior -- but that's exactly what I'm trying to avoid. I don't mind how exactly, but I'd like to keep my editing limited to text files checked into the OBS project, and not generate intermediate files (e.g. Debian source packages) that are then checked in. Philipp
participants (5)
-
David Sugar
-
Jan Engelhardt
-
Neal Gompa
-
Philipp Wagner
-
Spiro Trikaliotis