Repository: aptly-dev/aptly

Issue #328: Aptly cannot update http://nginx.org/packages/ubuntu trusty nginx
Created: 2015-12-17T08:32:00Z
aptly version: 0.9.5
Pulling from http://nginx.org/packages/ubuntu trusty nginx:
Updating mirror nginx-repo...
Downloading http://nginx.org/packages/ubuntu/dists/trusty/InRelease...
Downloading http://nginx.org/packages/ubuntu/dists/trusty/Release...
Downloading http://nginx.org/packages/ubuntu/dists/trusty/Release.gpg...
ERROR: unable to update: malformed stanza syntax
Perhaps this is related to the fact that nginx uses an unarmored Release.gpg file:
http://nginx.org/packages/ubuntu/dists/trusty/Release.gpg

Duplicate issue #1203: Cannot update mirror of manticore search - aptly cannot parse Packages
Created: 2023-07-25T09:34:56Z
I'm trying to  mirror deb repository for manticore search. aptly mirror create works well but aptly mirror update ends with parsing error. Repository itself is working (I can install manticore directly from their repository on debian and ubuntu). Example  bellow is for bookworm but exactly same error happens when try to mirror bullseye,  jammy or focal repo.
Detailed Description
root@apt-mirror:~# aptly mirror create -with-sources=false -with-udebs=false -architectures=amd64 manticoresearch_bookworm http://repo.manticoresearch.com/repository/manticoresearch_bookworm/ bookworm main
Downloading http://repo.manticoresearch.com/repository/manticoresearch_bookworm/dists/bookworm/InRelease...
Success downloading http://repo.manticoresearch.com/repository/manticoresearch_bookworm/dists/bookworm/InRelease
gpgv: can't allocate lock for '/root/.gnupg/trustedkeys.gpg'
gpgv: Signature made Wed Apr 12 11:58:04 2023 UTC
gpgv:                using RSA key 4D0B7E7D0A886301B7E2F7D014D612DB3D2730E2
gpgv: Good signature from "Manticore Search support@manticoresearch.com"
Mirror [manticoresearch_bookworm]: http://repo.manticoresearch.com/repository/manticoresearch_bookworm/ bookworm successfully added.
You can run 'aptly mirror update manticoresearch_bookworm' to download repository contents.
root@apt-mirror:~# aptly mirror update manticoresearch_bookworm
Downloading http://repo.manticoresearch.com/repository/manticoresearch_bookworm/dists/bookworm/InRelease...
Success downloading http://repo.manticoresearch.com/repository/manticoresearch_bookworm/dists/bookworm/InRelease
gpgv: can't allocate lock for '/root/.gnupg/trustedkeys.gpg'
gpgv: Signature made Wed Apr 12 11:58:04 2023 UTC
gpgv:                using RSA key 4D0B7E7D0A886301B7E2F7D014D612DB3D2730E2
gpgv: Good signature from "Manticore Search support@manticoresearch.com"
Downloading & parsing package files...
Downloading http://repo.manticoresearch.com/repository/manticoresearch_bookworm/dists/bookworm/main/binary-amd64/Packages...
Success downloading http://repo.manticoresearch.com/repository/manticoresearch_bookworm/dists/bookworm/main/binary-amd64/Packages
ERROR: unable to update: malformed stanza syntax
root@apt-mirror:~# aptly version
aptly version: '1.5.0+18+ge90ac676'

Closing comment (2023-07-28T14:10:26Z): This is somewhat related to #328 - The Packages file at http://repo.manticoresearch.com/repository/manticoresearch_bookworm/dists/bookworm/main/binary-amd64/Packages uses multi-line descriptions, and the lines are not indented properly.
We have:
[...]
Description: Manticore Search - database for search
Lightweight SQL-first database designed for search applications that suits both big and small data collections. This package includes the tool 'index_converter' necessary for converting indexes created before version 3.0.
[...]

This should be:
[...]
Description: Manticore Search - database for search
 Lightweight SQL-first database designed for search applications that suits both big and small data collections. This package includes the tool 'index_converter' necessary for converting indexes created before version 3.0.
[...]

Notice the additional space at the start of the second line. As is, the parser can't see that the line starting with Lightweight is not supposed to be another field, looks for : and a valid key structure in front of it, and fails.
I don't know about manticore, but you could try to ask them to conform to the file format as specified by Debian, especially DEB822 .
See: Debian Policy Manual 5.6.13. Description