[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: suse open build service - debian builds


On Monday, December 9th, 2024 at 23:13, T Lee Davidson <t.lee.davidson@xxxxxxxxx> wrote:

> On 12/9/24 13:21, gbWilly wrote:
> [snip]
> 
> > On Monday, December 9th, 2024 at 16:29, T Lee Davidson t.lee.davidson@xxxxxxxxx wrote:
> > 
> > > I don't understand why you are doing Native builds.
> > > 
> > > On 12/9/24 10:07, gbWilly wrote:
> > > 
> > > > 1. For packages that ship |debian/| subdirectory IN upstream source (known as native packages).= native
> > > 
> > > The Gambas source tarball does not contain (ship) a 'debian' directory. So, we would not be doing native builds.
> > 
> > Because dpkg-source -b builds above source tarball with debian directory (= recipe) included
> 
> 
> I don't know why you are responding with "Because" as I did not ask a "why" question. So, I am unable to comprehend the point
> you are trying to make with that response.

Here is the why question "I don't understand why you are doing Native builds"


> > - first indicated that osb wanted to build source from a quilt recipe using dpkg-source -b, that failed (so I suggested
> 
> native build as that will not fail this)
> 
> I also do not understand, "first indicated". It appears to be part of a sentence without a subject.

OK, sorry Lee. I wrongly supposed you read my previous mail on these problems that occurred, and where deeply into understanding the topic.
That is where I mainly refer to in my answer trying to explain what is going on and what is going wrong to you (and Benoit as well).

 
> Regardless, https://openbuildservice.org/help/manuals/obs-user-guide/cha-obs-build-process#id-1.2.10.4.3.5 states the OBS uses
> `dpkg-buildpackage`. So, why would it matter what `dpkg-source` does?

Yes, I know. And as I stated somewhere in this or other mail, I use dpkg-buildpackage as well.

There are more tools, like pbuild (uses dpkg-buildpackage to do the job but adds a clean build environent) or git-buildpackage (a.k.a. gbp that adds git retrieval of archives and such and then eventually uses dpkg-buildpackage to do the packaging)

dpkg-source (part of dpkg family like dpkg-buildpackage and others) is used like this (for native and quilt alike to make the binaries) (warning: explanation follows):
---
- Extract gambas source
- Copy your recipe into unpacked root(= debian folder) (recipe) in there.
- Make sure that first line of changelog in recipe  contains the version (3.19.90<whateveraddition> and for what distro version you package (like bookworm,bullseye, focal, jammy, noble etc.)
- dpkg-source -b /path/to/unpacked/source/with/recipe will create:
gambas3-3.19.90<whateveraddition>.tar.xz
gambas3-3.19.90<whateveraddition>.dsc

If I now open VM: 
- install the dependencies for gambas3
- unpack gambas3-3.19.90<whateveraddition>.tar.xz. (made by dpkg-source -b)
- cd to root of unpacked above source+recipe archive
- initiate dpkg-buildpackage -us -uc binaries and source packages will be build
- initiate dpkg-buildpackage -b -us -uc only binaries will be build
- the -b deactivates dpkg-source -b (the source archive builder)

One more thing:
If on a source archive with recipe I do
dpkg-source -b /path/to/source
- if native format recipe -> no problem
- if quilt format recipe -> error
----

So, dpkg-source -b does matter as last build failed on exactly that.
Here is an excerp of build log of about 1 hour ago:
----

[  145s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  145s]    dh_clean
[  145s]  dpkg-source -b .
[  145s] dpkg-source: error: can't build with source format '3.0 (quilt)': no upstream tarball found at ../gambas3_1.2.3.orig.tar.{bz2,gz,lzma,xz}
[  145s] dpkg-buildpackage: error: dpkg-source -b . subprocess returned exit status 25
----
You now understand why dpkg-source matters?


> > > So, why aren't we doing Quilt builds?
> > 
> > Benoit is trying to do quilt builds and thus now only needs debian archive of the recipe and a .dsc.
> 
> 
> Okay. So, Benoît IS doing Quilt builds.
> 
> 
> [snip]
> 
> > I think so because, Paolo didn't build with a source package added, as quilt builds apparently pick their code from upstream (being our gitlab the way I constructed the recipe)
> 
> 
> The source package format (Quilt or Native) has nothing to do with from where the build tool picks the source code. It is the
> build tool itself that has a preference. `gbp buildpackage` would fetch the upstream source via git. `dpkg-buildpackage` builds
> from one or more pre-fetched tarball(s).


I'm noy saying I'm an expert, but I have been packaging almost on a daily base last few weeks, to get a working 3-star michelin recipe.
I am doing the creation of recipes, creating the source archives with recipes, running a bunch of different distro's in vm to do actual packaging (by hand in cli), study the output, the build logs, do resarch on encountered problems online, do lintian checks and next all different distro returned binaries to make a repository (one for all distros) and test if they install on all different distro vm's again.
Yesterday I have successfully made binaries on debian11, debian12, ubuntu20.04 and ubuntu22.04 and today for ubuntu24.04
I made a repository and successfully installed and run gambas3.19.90 on ubuntu 20.04, 22.04 and 24.04.
Tomorrow I will install the debian11 and 12 variants, and then there is a working and tested recipe to compare to what gambas-package-tool creates.

My biggest reward is that a lot of the debian packaging finally starts to make a lot of sense.
debian packaging can be a bitch, and wrapped in a layer like an osb builder it gives that extra hurdle to take (as Benoit is finding out atm).

I'm mainly trying to explain how errors can be solved and that native probably will be easier to get the job done and more appropriate as originator of the source.
But if Benoit prefers quilt, then my answer to him is to provide the 3rd required file being pristine tarball of source (no recipe in there), instead of only the debian.tar.gz and .dsc. and see what happens.

I hope I have created some enlightenment on the subject for all involved or interested.
And Lee, sorry if I somehow misunderstood you.

gbWilly




Follow-Ups:
Re: suse open build service - debian buildsgbWilly <gbWilly@xxxxxxxxxxxxxx>
Re: suse open build service - debian buildsT Lee Davidson <t.lee.davidson@xxxxxxxxx>
References:
suse open build service - debian buildsgbWilly <gbWilly@xxxxxxxxxxxxxx>
Re: suse open build service - debian buildsgbWilly <gbWilly@xxxxxxxxxxxxxx>
Re: suse open build service - debian buildsT Lee Davidson <t.lee.davidson@xxxxxxxxx>
Re: suse open build service - debian buildsgbWilly <gbWilly@xxxxxxxxxxxxxx>
Re: suse open build service - debian buildsT Lee Davidson <t.lee.davidson@xxxxxxxxx>