smallstep / docs-old

DO NOT USE. See: https://github.com/smallstep/docs
11 stars 4 forks source link

Step CLI is no longer available in Alpine testing repository #104

Closed alex-xage closed 3 years ago

alex-xage commented 3 years ago

Subject of the issue

The Step CLI package is no longer available in Alpine's testing repository. Following the instructions in the step CLI docs results in this error ERROR: step-cli-0.16.0-r0: package mentioned in index not found (try 'apk update'), see screenshot:

Screen Shot 2021-07-13 at 2 50 51 PM

Your environment

Steps to reproduce

# launch alpine in interactive terminal with shell
docker run -it alpine:latest sh

# add testing repo to repositories
echo "https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories

# attempt to install step-cli
apk --no-cache --update add step-cli

Alternatively you can go to Alpine's testing repository here: https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/

Then verify that step-cli is not present (the step-certificates package is still available)

Expected behaviour

Below command should succeed

# attempt to install step-cli
apk --no-cache --update add step-cli

Package should be present when viewing Alpine's testing repository here: https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/

Actual behaviour

Below command fails

$> docker run -it alpine:latest sh
/ # echo "https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
/ # apk --no-cache --update add step-cli
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
(1/1) Installing step-cli (0.16.0-r0)
ERROR: step-cli-0.16.0-r0: package mentioned in index not found (try 'apk update')
1 error; 6 MiB in 14 packages
/ # apk update
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
v3.14.0-114-g8a8c96a0ea [https://dl-cdn.alpinelinux.org/alpine/v3.14/main]
v3.14.0-116-g82ef5eb5d5 [https://dl-cdn.alpinelinux.org/alpine/v3.14/community]
v3.14.0-1986-g4590f4adfa [https://dl-cdn.alpinelinux.org/alpine/edge/testing]
OK: 19218 distinct packages available
/ # apk add step-cli
(1/1) Installing step-cli (0.16.0-r0)
ERROR: step-cli-0.16.0-r0: package mentioned in index not found (try 'apk update')
1 error; 6 MiB in 14 packages
/ #

Additional context

Add any other context about the problem here.

alex-xage commented 3 years ago

Apparently it got moved from edge/testing to edge/community, see: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/23077/diffs https://pkgs.alpinelinux.org/package/edge/community/x86_64/step-cli

So this issue only requires an update in documentation on step CLI's side here: https://smallstep.com/docs/step-cli/installation#alpine-linux

Using https://dl-cdn.alpinelinux.org/alpine/edge/community instead of https://dl-cdn.alpinelinux.org/alpine/edge/testing works:

$> docker run -it alpine:latest sh
/ # echo "https://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
/ # apk --no-cache --update add step-cli
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
(1/1) Installing step-cli (0.16.0-r0)
Executing busybox-1.33.1-r2.trigger
OK: 34 MiB in 15 packages
/ #
dopey commented 3 years ago

Thanks @alex-xage!

dopey commented 3 years ago

Note: while the docs themselves are public, they won't actually get deployed until our website is next deployed.

alex-xage commented 3 years ago

Thanks for quick response @dopey, I believe lines 69 and 72 also need to be updated as they reference the old testing repo: https://github.com/smallstep/docs/blob/913f9ea700d7942cb2f1bbb5c2e3c1eb8768a605/step-cli/installation.mdx#L69-L72

dopey commented 3 years ago

@alex-xage good catch. Weird that step-ca is still in the testing repository 🤷‍♂️

dermotbradley commented 3 years ago

@alex-xage @dopey

Hi, Alpine package maintainer for step-cli and step-certificates here.

Yes I moved step-cli from "testing" to "community" repo 2 days ago. This means that from the next Alpine release onwards (3.15 in Nov/Dec/Jan timeframe) step-cli will be part of official releases (the "testing" repo is only intended for the Edge development version of Alpine).

step-certificates has not yet been moved from "testing" to "community" as I am working on init.d scripts and other related changes so that the package will be usable as an ACME server out-of-the-box. Once those additions are ready then I'll move it to "community".

dopey commented 3 years ago

@dermotbradley Wow! 🤩

Thanks so much for your help! Let me know if there's anything we can do to help.