Landscape mirror with flat repository

I’m running into issues while trying to create a mirror for Ubuntu packages for R which is a flat repository. It has no dist diretory and so forth.

Based on this answer by @mdscunningham I’m using this command:

landscape-api create-series \
--pockets release \
--components main \
--architectures amd64 \
--gpg-key mirror-key \
--mirror-gpg-key cran-r \
--mirror-uri https://cloud.r-project.org/bin/linux/ubuntu/jammy-cran40 \
--mirror-series / \
jammy-cran40 cran-r

The series is created, but when I sync it, the activity is failing with the following error message:

b"/usr/bin/unlzma: (stdin): Compressed data is corrupt
'/usr/bin/unlzma' < ./lists/update-jammy-cran40_%2F_Packages.lzma > ./lists/update-jammy-cran40_%2F_Packages exited with errorcode 1!
Error reading from ./lists/update-jammy-cran40_%2F_Packages.lzma: Trailing garbage after compressed data!
There have been errors!
"

I was able to mirror the Kubernetes repository which is also flat. Somehow getting this error only when trying to mirror R.

My update Landscape Server version running on Ubuntu 24.04.2 LTS

Evidently reading the message now the Packages.lzma file seems to be corrupted, and I’m getting the same error message locally.

I’ve reached out to the R team seeking for help to confirm this.

After some digging I tried using xz but got the same error:

xz -d Packages.lzma

The original Landscape error message says the following at the end:

… Trailing garbage after compressed data!

I searched a bit more and found discussions around the trailing of data in .lzma files.

This command, which uses the option --single-stream, succeeds in decompressing the file:

xz -d --single-stream Packages.lzma

I don’t know what’s going on with this Package manifest, if this behavior should be supported by Landscape or there really shouldn’t be any trailing data added by CRAN.

Also I was not able to configure Landscape to use a different file other than the Packages.lzma, as there are other compressed options which I’m not able to use.

image

I’ve submitted bug 2108909 so that Landscape will be able to somehow handle these scenarios.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.