[CentOS-devel] Using lookaside_upload in combination with the "flat" dist-git layout

Fri Feb 25 12:53:00 UTC 2022
Daan De Meyer <daan.j.demeyer at gmail.com>

Hi,

Recently there was an announcement that the "flat" layout can now be
used by SIGs that want to pull in changes from the Fedora RPM repos
directly. I'm trying to switch the hyperscale branches for the systemd
RPM to use the "flat" layout but I'm running into issues trying to
upload the systemd tarball to the CentOS lookaside cache.

I've successfully used the lookaside_upload script from
centos-git-common to upload tarballs for use with the rpmbuild
metadata layout before, but I'm struggling to get it to work with the
"flat" layout. The main issue comes from the fact that in the "flat"
layout, the sources file is used which contains a SHA512 hash that's
used to find the corresponding tarball in the centos lookaside cache.
However, the lookaside_upload script tries to upload tarballs to the
lookaside cache using the sha1sum of the tarball as the identifier.
This leads to CBS not finding the tarball when trying to do a build.

I tried modifying the lookaside_upload script to use sha512sum instead
of sha1sum but when doing this, I get a 500 HTTP internal error from
the lookaside cache (https://paste.centos.org/view/5e7ef15c).

Any other way to upload a tarball under the SHA512 identifier to the
lookaside cache?

Cheers,

Daan De Meyer