perfsonar / unibuild

A kit for building repositories of packaged software
Apache License 2.0
1 stars 0 forks source link

build order list artifact and package names #19

Closed laeti-tia closed 2 years ago

laeti-tia commented 2 years ago

While working on the multi-arch builds for Debian I noticed that the build order list generated by #10 contains the list of directories built. This name can differ from the name of the source package contained in those directories.

In order for this list to be useful, I think it would be better if it listed the source packages. In that way, all that is needed as input for the subsequent multi-arch builds is contained within the /unibuild-repo/ directory and there is no need to go back to the original repository source code to match the package directory name with the source package name.

Another way to solve that would be to make sure every directory has the same name as the source package itself. But I'm not sure it is very convenient.

Example in the pscheduler repository: python-pyrsistent is the directory containing the package named pyrsistent.

mfeit-internet2 commented 2 years ago

Thinking aloud:

The right way to go about this is to have the install-products target in the Debian makefile maintain a map of the source files in the repository.

How should that map look?

laeti-tia commented 2 years ago

How should that map look?

I'm not sure I understand your question. But I guess just the name of the source package for each directory being built. And this name is contained in the Source: line of the unibuild-packaging/deb/control file of each directory. There should be a single source package for each directory being built.

Back to the discussion in #2 was the idea to hand over the unibuild products to some other script that will build the multi-arch packages. For the build dependencies to be correctly sorted out we need the order in which the packages have been built, this was the reason to have the build order list being collected in the gather step. But for this list to be useful together with the unibuild products, it needs to be a list of source packages, the repository directories names don't mean anything together with the unibuild-repo content.

As an example, instead of having build-order be:

postgresql-load
jq
python-pyrsistent
python-jsonschema
…

I think we want to have it like:

postgresql-load
jq
pyrsistent
jsonschema
…
mfeit-internet2 commented 2 years ago

That makes sense.

The install-products target add that to a new file in the repo directory called unibuild/debian-package-order that lists the sources from the packages in the order they were built:

$ tree unibuild-repo/
unibuild-repo/
|-- Release
|-- hello-deb_1.0-1.debian.tar.xz
|-- hello-deb_1.0-1.dsc
|-- hello-deb_1.0-1_all.deb
|-- hello-deb_1.0-1_amd64.buildinfo
|-- hello-deb_1.0-1_amd64.changes
|-- hello-deb_1.0.orig.tar.gz
|-- hello_1.0-1.debian.tar.xz
|-- hello_1.0-1.dsc
|-- hello_1.0-1_all.deb
|-- hello_1.0-1_amd64.buildinfo
|-- hello_1.0-1_amd64.changes
|-- hello_1.0.orig.tar.gz
`-- unibuild
    |-- build-order
    `-- debian-package-order

1 directory, 15 files

$ cat unibuild-repo/unibuild/debian-package-order
hello
hello-deb

For this one, the names are identical, but the data comes from the Debian control file.

laeti-tia commented 2 years ago

This list is working fine for the multi-arch builds, thanks!