canonical / ubuntu-package-buildinfo

Tool to retrieve Ubuntu package build info
Other
1 stars 1 forks source link

Missing buildinfo files #4

Open jeffinbiju1 opened 8 months ago

jeffinbiju1 commented 8 months ago

Description

We were trying to obtain buildinfo files for packages present in jammy VM image. The tool did not work for a lot of packages.

What I Did

git clone https://github.com/canonical/ubuntu-package-buildinfo.git
python3 ~/ubuntu-package-buildinfo/ubuntu_package_buildinfo/cli.py --series jammy --package-name "libzstd" --package-version "1.4.8+dfsg-3build1"

Error:

**********ERROR:    No binaries found for libzstd amd64 version 1.4.8+dfsg-3build1 in jammyin any archive pocket.

There were several other packages in the jammy VM image for which the tool did not work. The list of packages in the jammy VM image for which the toll worked and did not work is attached below.

Buildinfos_Jammy.pdf

Can you please investigate why it doesn't work for certain packages?

philroche commented 8 months ago

libzstd is a source package name.

As of release 0.0.3 querying by source package name feature has been added. Please try the latest version.

What VM image are you referring to? http://cloud-images.ubuntu.com/releases/jammy/ ?

How are you generating that list in the PDF?

We recommend using dpkg-query --show to list the binary packages installed on a system or using a tool like https://snapcraft.io/ubuntu-package-manifest.

djcampello commented 8 months ago

A failing example with release 0.0.3:

+ python3 ubuntu-package-buildinfo/ubuntu_package_buildinfo/cli.py --series jammy --package-name automat --package-version 20.2.0-1
**********WARNING:  No binaries found for automat amd64 version 20.2.0-1 in jammy in any archive pocket.

https://launchpad.net/ubuntu/+source/automat/20.2.0-1

philroche commented 8 months ago

ack. I can replicate with automat

This was a copy from an earlier Ubuntu release (Groovy) https://launchpad.net/ubuntu/+source/automat/20.2.0-1 with full publishing history @ https://launchpad.net/ubuntu/+source/automat/20.2.0-1/+publishinghistory

I'll investigate how we can find the build information for a source package copied like this.

A python3-automat binary package query does work, though.

ubuntu-package-buildinfo --series jammy --package-name python3-automat --package-version 20.2.0-1
philroche commented 8 months ago

version 0.0.4 now pushed with a fix for the case you found with a package copied from previous release.

Can you provide a full list of source_package_name version mapping you are querying and how you are compiling this list and I can add it as a test?

djcampello commented 8 months ago

We get the list from a VM image by:

dpkg-query --showformat \
                '${Binary:Package}=${Version} ${Source:Package}_${Source:Version}#${Version}#_${Architecture}\n' --show | \
                sed 's/#\([^\+]*\(\+[^b]\)*\)*\(\+b.*\)*#/\3/g'

Script now fails with these:

grub-gfxpayload-lists_0.7
run-one_1.17-0ubuntu1

Also, the following does not seem to be available in Launchpad:

grub2-unsigned_2.06-2ubuntu14.4
linux-meta-gcp-6.5_6.5.0.1013.13~22.04.1
slang2_2.3.2-5build4

Sorry I have not been able to run this with the full list of packages just yet and there might be other failures I have not identified yet.

philroche commented 8 months ago

Thank you for adding these details.

I will address them below after having added some more debug output:

grub-gfxpayload-lists_0.7

No buildinfo found for grub-gfxpayload-lists amd64 version 0.7 in jammy. See https://api.launchpad.net/devel/ubuntu/+source/grub-gfxpayload-lists/0.7/+build/7115438 for more details.

run-one_1.17-0ubuntu1

No buildinfo found for run-one amd64 version 1.17-0ubuntu1 in jammy. See https://api.launchpad.net/devel/ubuntu/+source/run-one/1.17-0ubuntu1/+build/5464697 for more details.

This is because run-one and grub-gfxpayload-lists were actually built in 2014 and 2015 and unfortunately our current buildinfo files only go back as far as 2017 but there are plans to rebuild.

grub2-unsigned

grub2-unsigned_2.06-2ubuntu14.4

The build_link for these is being returned as tag:launchpad.net:2008:redacted which I suspect this for security reasons. I will query why.

linux-meta-gcp

linux-meta-gcp-6.5_6.5.0.1013.13~22.04.1

This does work for me

❯ ubuntu-package-buildinfo --series jammy --package-name linux-meta-gcp-6.5 --package-version 6.5.0.1013.13~22.04.1 --source-package
INFO:   Found binary package from source package linux-meta-gcp-6.5 amd64 version 6.5.0.1013.13~22.04.1 in jammy.
INFO:   changes written to linux-meta-gcp-6.5_6.5.0.1013.13~22.04.1_amd64.changes
INFO:   buildinfo written to linux-meta-gcp-6.5_6.5.0.1013.13~22.04.1_amd64.buildinfo
INFO:   buildlog written to linux-meta-gcp-6.5_6.5.0.1013.13~22.04.1_amd64.buildlog
INFO:   Hash of linux-meta-gcp-6.5_6.5.0.1013.13~22.04.1_amd64.buildinfo matches hash in changes file.

slang2

slang2_2.3.2-5build4

This does work for me

❯ ubuntu-package-buildinfo --series jammy --package-name slang2 --package-version 2.3.2-5build4
INFO:   Found binary package from source package slang2 amd64 version 2.3.2-5build4 in jammy.
INFO:   changes written to slang2_2.3.2-5build4_amd64.changes
INFO:   buildinfo written to slang2_2.3.2-5build4_amd64.buildinfo
INFO:   buildlog written to slang2_2.3.2-5build4_amd64.buildlog
INFO:   Hash of slang2_2.3.2-5build4_amd64.buildinfo matches hash in changes file.
philroche commented 8 months ago

Public bug https://bugs.launchpad.net/launchpad/+bug/2052796 created to track unembargoing of the build details for grub2-unsigned version 2.06-2ubuntu14.4

djcampello commented 7 months ago

Public bug https://bugs.launchpad.net/launchpad/+bug/2052796 created to track unembargoing of the build details for grub2-unsigned version 2.06-2ubuntu14.4

I realized that this affects both amd64 and arm64 builds. Any updates on this one?

Also, maybe expected but here is a list of focal packages that are failing too:

devio_1.2-1.2
gdbm_1.18.1-5
grub2-unsigned_2.06-2ubuntu14.4 (EMBARGOED response)
grub-gfxpayload-lists_0.7
libaio_0.3.112-5
libatasmart_0.19-5
libbsd_0.10.0-1
libcanberra_0.30-7ubuntu1
libeatmydata_105-7
libestr_0.1.10-2.1
libfastjson_0.99.8-2
libidn2_2.2.0-2
libmnl_1.0.4-2
libnetfilter-conntrack_1.0.7-2
libnfnetlink_1.0.1-3build1
libogg_1.3.4-0ubuntu1
libsigsegv_2.12-2
libsodium_1.0.18-1
libunistring_0.9.10-2
liburcu_0.11.1-2
libxau_1:1.0.9-0ubuntu1
libxdmcp_1:1.1.3-0ubuntu1
libxext_2:1.3.4-0ubuntu1
libxmu_2:1.1.3-0ubuntu1
linux-atm_1:2.5.1-4
mpfr4_4.0.2-1
netkit-ftp_0.17-34.1
npth_1.6-1
open-isns_0.97-3
readline5_5.2+dfsg-3build3
run-one_1.17-0ubuntu1
slang2_2.3.2-4
AndrewCloke commented 7 months ago

Hi Daniel, just to note that we are going to be even more resource-constrained that usual in the build up to the Ubuntu 24.04 LTS release.

So, apologies in advance if we are slow to respond, but I'm afraid you're going to have to bear with us until we have 24.04 out of the door.

Many thanks for your understanding, Andy.

djcampello commented 7 months ago

The tool seems to be failing querying by source package in some instances. Could you help debug the issue:

$ python3 ubuntu-package-buildinfo/ubuntu_package_buildinfo/cli.py --series focal --package-name gpm --package-version 1.20.7-5 --package-architecture arm64 --source-package
**********WARNING:      No binary builds found for source package gpm arm64 version 1.20.7-5 in focal.
**********ERROR:        No binary builds found for gpm arm64 version 1.20.7-5 in focal.

while

$ python3 ubuntu-package-buildinfo/ubuntu_package_buildinfo/cli.py --series focal --package-name gpm --package-version 1.20.7-5 --package-architecture arm64
INFO:   Found binary package gpm arm64 version 1.20.7-5 in focal.
INFO:   changes written to gpm_1.20.7-5_arm64.changes
INFO:   buildinfo written to gpm_1.20.7-5_arm64.buildinfo
INFO:   buildlog written to gpm_1.20.7-5_arm64.buildlog
INFO:   Hash of gpm_1.20.7-5_arm64.buildinfo matches hash in changes file.
philroche commented 7 months ago

--source-package does not fallback to binary lookup currently.

Perhaps --source-package should be to indicate that fallback to source-package lookup should be made if binary package of that same name is not found.

djcampello commented 7 months ago

For the example above gpm is a source package. Should it have matched?

Error says: No binary builds found for source package gpm arm64 version 1.20.7-5 in focal. but when querying by binary package the response returns such binary build as referenced by the buildinfo/buildlog files

philroche commented 7 months ago

For the example above gpm is a source package. Should it have matched?

Ah. See https://launchpad.net/ubuntu/+source/gpm/1.20.7-5 - it appears was never a source package build for source package gpm in focal apart from a riscv build. I need to investigate why this is.

philroche commented 7 months ago

Public bug https://bugs.launchpad.net/launchpad/+bug/2052796 created to track unembargoing of the build details for grub2-unsigned version 2.06-2ubuntu14.4

I realized that this affects both amd64 and arm64 builds. Any updates on this one?

I have escalated this internally now