Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples/nginx fails with "aptly unable to parse command" #12

Closed
jpds opened this issue Aug 7, 2021 · 1 comment
Closed

examples/nginx fails with "aptly unable to parse command" #12

jpds opened this issue Aug 7, 2021 · 1 comment

Comments

@jpds
Copy link

jpds commented Aug 7, 2021

With the latest released version of aptly installed (1.4.0), updating the lockfile for the nginx example fails with:

$ ninja update-lockfile-Packages.lock
[1/1] update_lockfile(create_mirrors=_build/apt/lockfile/create_mirrors-0410e03, keyring_arg=-keyring=.....=mirror-0,mirror-1,mirror-2, packages=nginx-core, architecture=amd64, out=update-lockfile-Packages.lock)
FAILED: update-lockfile-Packages.lock 
set -ex; export tmpdir="_build/tmp/update_lockfile/$(systemd-escape update-lockfile-Packages.lock)"; rm -rf $tmpdir; mkdir -p $tmpdir; export HOME=$tmpdir; _build/apt/lockfile/create_mirrors-0410e03; aptly lockfile create -mirrors "mirror-0,mirror-1,mirror-2" -architectures=amd64 -keyring=../../apt2ostree/keyrings/ubuntu/bionic/ubuntu-keyring-2012-cdimage.gpg -keyring=../../apt2ostree/keyrings/ubuntu/bionic/ubuntu-keyring-2012-archive.gpg -keyring=../../apt2ostree/keyrings/ubuntu/bionic/ubuntu-keyring-2018-archive.gpg -gpg-provider=internal nginx-core >Packages.lock~; if cmp Packages.lock~ Packages.lock; then rm Packages.lock~; else mv Packages.lock~ Packages.lock; fi; rm -rf "$tmpdir";
+ systemd-escape update-lockfile-Packages.lock
+ export tmpdir=_build/tmp/update_lockfile/update\x2dlockfile\x2dPackages.lock
+ rm -rf _build/tmp/update_lockfile/update\x2dlockfile\x2dPackages.lock
+ mkdir -p _build/tmp/update_lockfile/update\x2dlockfile\x2dPackages.lock
+ export HOME=_build/tmp/update_lockfile/update\x2dlockfile\x2dPackages.lock
+ _build/apt/lockfile/create_mirrors-0410e03
+ aptly mirror create -architectures=amd64 -keyring=../../apt2ostree/keyrings/ubuntu/bionic/ubuntu-keyring-2012-cdimage.gpg -keyring=../../apt2ostree/keyrings/ubuntu/bionic/ubuntu-keyring-2012-archive.gpg -keyring=../../apt2ostree/keyrings/ubuntu/bionic/ubuntu-keyring-2018-archive.gpg -gpg-provider=internal mirror-0 http://archive.ubuntu.com/ubuntu bionic main restricted universe multiverse
Config file not found, creating default config at _build/tmp/update_lockfile/update\x2dlockfile\x2dPackages.lock/.aptly.conf

Downloading http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease...
openpgp: Signature made Fri, 27 Apr 2018 00:38:40 BST using RSA key ID 3B4FE6ACC0B21F32
openpgp: Good signature from "Ubuntu Archive Automatic Signing Key (2012) <[email protected]>"

Mirror [mirror-0]: http://archive.ubuntu.com/ubuntu/ bionic successfully added.
You can run 'aptly mirror update mirror-0' to download repository contents.
+ aptly mirror create -architectures=amd64 -keyring=../../apt2ostree/keyrings/ubuntu/bionic/ubuntu-keyring-2012-cdimage.gpg -keyring=../../apt2ostree/keyrings/ubuntu/bionic/ubuntu-keyring-2012-archive.gpg -keyring=../../apt2ostree/keyrings/ubuntu/bionic/ubuntu-keyring-2018-archive.gpg -gpg-provider=internal mirror-1 http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe multiverse
Downloading http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease...
openpgp: Signature made Sat, 07 Aug 2021 22:06:19 BST using RSA key ID 3B4FE6ACC0B21F32
openpgp: Good signature from "Ubuntu Archive Automatic Signing Key (2012) <[email protected]>"

Mirror [mirror-1]: http://archive.ubuntu.com/ubuntu/ bionic-updates successfully added.
You can run 'aptly mirror update mirror-1' to download repository contents.
+ aptly mirror create -architectures=amd64 -keyring=../../apt2ostree/keyrings/ubuntu/bionic/ubuntu-keyring-2012-cdimage.gpg -keyring=../../apt2ostree/keyrings/ubuntu/bionic/ubuntu-keyring-2012-archive.gpg -keyring=../../apt2ostree/keyrings/ubuntu/bionic/ubuntu-keyring-2018-archive.gpg -gpg-provider=internal mirror-2 http://archive.ubuntu.com/ubuntu bionic-security main restricted universe multiverse
Downloading http://archive.ubuntu.com/ubuntu/dists/bionic-security/InRelease...
openpgp: Signature made Sat, 07 Aug 2021 22:05:19 BST using RSA key ID 3B4FE6ACC0B21F32
openpgp: Good signature from "Ubuntu Archive Automatic Signing Key (2012) <[email protected]>"

Mirror [mirror-2]: http://archive.ubuntu.com/ubuntu/ bionic-security successfully added.
You can run 'aptly mirror update mirror-2' to download repository contents.
+ aptly lockfile create -mirrors mirror-0,mirror-1,mirror-2 -architectures=amd64 -keyring=../../apt2ostree/keyrings/ubuntu/bionic/ubuntu-keyring-2012-cdimage.gpg -keyring=../../apt2ostree/keyrings/ubuntu/bionic/ubuntu-keyring-2012-archive.gpg -keyring=../../apt2ostree/keyrings/ubuntu/bionic/ubuntu-keyring-2018-archive.gpg -gpg-provider=internal nginx-core
aptly - Debian repository management tool

Commands:

    api         start API server/issue requests
    config      manage aptly configuration
    db          manage aptly's internal database and package pool
    graph       render graph of relationships
    mirror      manage mirrors of remote repositories
    package     operations on packages
    publish     manage published repositories
    repo        manage local package repositories
    serve       HTTP serve published repositories
    snapshot    manage snapshots of repositories
    task        manage aptly tasks
    version     display version

Use "aptly help <command>" for more information about a command.


Options:
  -architectures="": list of architectures to consider during (comma-separated), default to all available
  -config="": location of configuration file (default locations are /etc/aptly.conf, ~/.aptly.conf)
  -db-open-attempts=10: number of attempts to open DB if it's locked by other instance
  -dep-follow-all-variants: when processing dependencies, follow a & b if dependency is 'a|b'
  -dep-follow-recommends: when processing dependencies, follow Recommends
  -dep-follow-source: when processing dependencies, follow from binary to Source packages
  -dep-follow-suggests: when processing dependencies, follow Suggests
  -dep-verbose-resolve: when processing dependencies, print detailed logs
  -gpg-provider="": PGP implementation ("gpg", "gpg1", "gpg2" for external gpg or "internal" for Go internal implementation)
ERROR: unable to parse command
ninja: build stopped: subcommand failed.

Note that this happened whilst I had edited the configure.py to point at bionic instead of xenial, if I leave it at xenial, I get:

$ ninja update-lockfile-Packages.lock
[1/1] update_lockfile(create_mirrors=_build/apt/lockfile/create_mirrors-def8c1c, keyring_arg=-keyring=.....=mirror-0,mirror-1,mirror-2, packages=nginx-core, architecture=amd64, out=update-lockfile-Packages.lock)
FAILED: update-lockfile-Packages.lock 
set -ex; export tmpdir="_build/tmp/update_lockfile/$(systemd-escape update-lockfile-Packages.lock)"; rm -rf $tmpdir; mkdir -p $tmpdir; export HOME=$tmpdir; _build/apt/lockfile/create_mirrors-def8c1c; aptly lockfile create -mirrors "mirror-0,mirror-1,mirror-2" -architectures=amd64 -keyring=../../apt2ostree/keyrings/ubuntu/xenial/ubuntu-keyring.gpg -gpg-provider=internal nginx-core >Packages.lock~; if cmp Packages.lock~ Packages.lock; then rm Packages.lock~; else mv Packages.lock~ Packages.lock; fi; rm -rf "$tmpdir";
+ systemd-escape update-lockfile-Packages.lock
+ export tmpdir=_build/tmp/update_lockfile/update\x2dlockfile\x2dPackages.lock
+ rm -rf _build/tmp/update_lockfile/update\x2dlockfile\x2dPackages.lock
+ mkdir -p _build/tmp/update_lockfile/update\x2dlockfile\x2dPackages.lock
+ export HOME=_build/tmp/update_lockfile/update\x2dlockfile\x2dPackages.lock
+ _build/apt/lockfile/create_mirrors-def8c1c
+ aptly mirror create -architectures=amd64 -keyring=../../apt2ostree/keyrings/ubuntu/xenial/ubuntu-keyring.gpg -gpg-provider=internal mirror-0 https://old-releases.ubuntu.com/ubuntu xenial main restricted universe multiverse
Config file not found, creating default config at _build/tmp/update_lockfile/update\x2dlockfile\x2dPackages.lock/.aptly.conf

Downloading https://old-releases.ubuntu.com/ubuntu/dists/xenial/InRelease...
Downloading https://old-releases.ubuntu.com/ubuntu/dists/xenial/Release...
ERROR: unable to fetch mirror: HTTP code 404 while fetching https://old-releases.ubuntu.com/ubuntu/dists/xenial/Release
ninja: build stopped: subcommand failed.
@wmanley
Copy link
Contributor

wmanley commented Aug 8, 2021

You need a patched aptly. See https://github.com/stb-tester/apt2ostree#dependencies and #1

@wmanley wmanley closed this as completed Aug 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants