~jugmac00/launchpad:fix-typo-in-cannot

Last commit made on 2022-04-25
Get this branch:
git clone -b fix-typo-in-cannot https://git.launchpad.net/~jugmac00/launchpad
Only Jürgen Gmach can upload to this branch. If you are Jürgen Gmach please log in for upload directions.

Branch merges

Branch information

Name:
fix-typo-in-cannot
Repository:
lp:~jugmac00/launchpad

Recent commits

4585251... by Jürgen Gmach

Fix typos

e41addd... by Colin Watson

Avoid importing private urllib.request names

Merged from https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/420297

07dd4b1... by Colin Watson

Simplify symlink checks in rocketfuel-setup

Merged from https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/420298

5a29d1e... by Colin Watson

Add and export OCIRecipeBuild.getFileUrls

Merged from https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/420299

6969f83... by Colin Watson

Fix git authorization for CI builds in private distributions

Merged from https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/420296

ac96779... by Colin Watson

Add and export OCIRecipeBuild.getFileUrls

This aligns with snap builds, and it's useful for processing the results
of OCI recipe builds outside Launchpad.

LP: #1969449

da8d7e7... by Colin Watson

Simplify symlink checks in rocketfuel-setup

`shellcheck` complains of two places in `rocketfuel-setup`:

    SC2012 (info): Use find instead of ls to better handle
    non-alphanumeric filenames.

I don't think its proposed solution is best in this case, but it has a
point about the problem: parsing the output of `ls -l` is pretty clunky.
We know exactly what we expect these two symlinks to point to, so test
them directly using `readlink` instead.

201819a... by Colin Watson

Avoid importing private urllib.request names

`urllib.request` defines an `__all__` list that doesn't include
`parse_http_list` or `parse_keqv_list`, so we get import pedant warnings
once we start importing these directly from `urllib.request` rather than
via `six`. Use the equivalent (and slightly simpler to use)
`requests.utils.parse_dict_header` instead.

5d9b8fc... by Colin Watson

Fix git authorization for CI builds in private distributions

CI builds in private distributions fail with `fatal: repository
'https://git.launchpad.net/...' not found`. This is because they
authenticate using the special `+launchpad-services` user and a
macaroon, and in that mode methods of `GitAPI` run with an anonymous
principal and are expected to use `removeSecurityProxy` rather than
doing normal security checks (see the comment near the top of
`run_with_login`).

The lookup infrastructure in `lp.code.model.gitlookup` mostly doesn't do
much in the way of permission checks, normally relying on the returned
repository's security adapter to check access grants. However, there
are some exceptions: if the repository is in a source package or an OCI
project inside a private pillar, then the pillar is security-proxied
during traversal and so it implicitly performs permission checks.

Allow passing `check_permissions=False` to the lookup infrastructure to
suppress these checks, and pass this when performing a lookup as
`+launchpad-services`. This is safe because it's only possible to use
that user in conjunction with a macaroon issued for a specific
repository.

1445a28... by Colin Watson

Avoid urllib.parse.splitvalue

Merged from https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/420260