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

BAD signature #117

Closed
chuoke opened this issue Dec 13, 2020 · 22 comments
Closed

BAD signature #117

chuoke opened this issue Dec 13, 2020 · 22 comments

Comments

@chuoke
Copy link

chuoke commented Dec 13, 2020

FROM alpine:3.12

RUN apk update \
    && apk upgrade \
    && apk add --no-cache openssl bash curl ca-certificates

RUN echo "https://dl.bintray.com/php-alpine/v3.12/php-7.4" >> /etc/apk/repositories

RUN apk --no-cache add \
    php \
    php-fpm \
    php-opcache \
    php-tokenizer \
    ....

Some packages install error, which shows a Bad signature, such as:

#9 5.094 ERROR: php7-7.4.13-r1: BAD signature

What's the meaning of this error?

@tobias-trozowski
Copy link
Contributor

tobias-trozowski commented Dec 13, 2020

Getting the same issue with php8 and alpine 3.11

wget -qO /etc/apk/keys/php-alpine.rsa.pub https://dl.bintray.com/php-alpine/key/php-alpine.rsa.pub \
    && echo "https://dl.bintray.com/php-alpine/v3.11/php-8.0" >> /etc/apk/repositories  \
    && apk --update --no-cache add \
        php8 \
        php-pcntl
❯ docker run --rm -it alpine:3.11 sh
/ # wget -qO /etc/apk/keys/php-alpine.rsa.pub https://dl.bintray.com/php-alpine/key/php-alpine.rsa.pub \
>     && echo "https://dl.bintray.com/php-alpine/v3.11/php-8.0" >> /etc/apk/repositories  \
>     && apk --update --no-cache add \
>         php8 \
>         php-pcntl
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
fetch https://dl.bintray.com/php-alpine/v3.11/php-8.0/x86_64/APKINDEX.tar.gz
(1/10) Installing php8-common (8.0.0-r1)
(2/10) Installing php8-pcntl (8.0.0-r1)
ERROR: php8-pcntl-8.0.0-r1: BAD signature
(3/10) Installing argon2-libs (20190702-r1)
(4/10) Installing ncurses-terminfo-base (6.1_p20200118-r4)
(5/10) Installing ncurses-libs (6.1_p20200118-r4)
(6/10) Installing libedit (20191211.3.1-r0)
(7/10) Installing pcre2 (10.34-r1)
(8/10) Installing xz-libs (5.2.4-r0)
(9/10) Installing libxml2 (2.9.10-r4)
(10/10) Installing php8 (8.0.0-r1)
Executing busybox-1.31.1-r9.trigger
1 error; 30 MiB in 23 packages

Using this with alpine 3.12 everything seems alright

❯ docker run --rm -it alpine:3.12 sh
/ # wget -qO /etc/apk/keys/php-alpine.rsa.pub https://dl.bintray.com/php-alpine/key/php-alpine.rsa.pub \
>     && echo "https://dl.bintray.com/php-alpine/v3.12/php-8.0" >> /etc/apk/repositories  \
>     && apk --update --no-cache add \
>         php8 \
>         php-pcntl
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
fetch https://dl.bintray.com/php-alpine/v3.12/php-8.0/x86_64/APKINDEX.tar.gz
(1/10) Installing php8-common (8.0.0-r1)
(2/10) Installing php8-pcntl (8.0.0-r1)
(3/10) Installing argon2-libs (20190702-r1)
(4/10) Installing ncurses-terminfo-base (6.2_p20200523-r0)
(5/10) Installing ncurses-libs (6.2_p20200523-r0)
(6/10) Installing libedit (20191231.3.1-r0)
(7/10) Installing pcre2 (10.35-r0)
(8/10) Installing xz-libs (5.2.5-r0)
(9/10) Installing libxml2 (2.9.10-r5)
(10/10) Installing php8 (8.0.0-r1)
Executing busybox-1.31.1-r19.trigger
OK: 31 MiB in 24 packages

@Jeroen-G
Copy link

PHP 7.4 with alpine 3.10 - 3.12 keeps failing though.

@bobbybouwmann
Copy link

I have a similar issue with adding certain dependencies to PHP 7.4

$ apk add -U php7-bcmath php7-sodium
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
fetch https://dl.bintray.com/php-alpine/v3.12/php-7.4/x86_64/APKINDEX.tar.gz
(1/3) Installing php7-bcmath (7.4.13-r1)
ERROR: php7-bcmath-7.4.13-r1: BAD signature
(2/3) Installing libsodium (1.0.18-r0)
(3/3) Installing php7-sodium (7.4.13-r1)
ERROR: php7-sodium-7.4.13-r1: BAD signature
2 errors; 705 MiB in 145 packages

Let me know if you need more information or if I can help debug anything!

@Jeroen-G
Copy link

Jeroen-G commented Dec 14, 2020

This might help to reproduce the problem. I took the example Dockerfile from the readme and added the php-bcmath extension as one example of a package with the bad signature error.

FROM alpine:3.12

ADD https://dl.bintray.com/php-alpine/key/php-alpine.rsa.pub /etc/apk/keys/php-alpine.rsa.pub

RUN apk --update-cache add ca-certificates && \
    echo "https://dl.bintray.com/php-alpine/v3.12/php-7.4" >> /etc/apk/repositories

# install php and some extensions
RUN apk add --update-cache \
    php \
    php-bz2 \
    php-json \
    php-bcmath

@Jeroen-G
Copy link

I found that above file errors with 3.10 and 3.12, but not with 3.11

@juliusstoerrle
Copy link

I experience this with 3.12 and 3.11

biggianteye added a commit to graze/docker-php-alpine that referenced this issue Dec 21, 2020
This addresses an upstream problem in alpine 3.12.

codecasts/php-alpine#117

Both versions of alpine contain PHP 7.4.13 and so this change has no
negative impact on this docker image.
biggianteye added a commit to graze/docker-php-alpine that referenced this issue Dec 21, 2020
This addresses an upstream problem in alpine 3.12.

codecasts/php-alpine#117

Both versions of alpine contain PHP 7.4.13 and so this change has no
negative impact on this docker image.
@hernandev
Copy link
Member

shit

@hernandev
Copy link
Member

looks like all uploads failed due Bintray API limits, ensuring that's true now

@hernandev
Copy link
Member

PHP 7.4 fixed.

others will be in a few minutes after new build

@bobbybouwmann
Copy link

@hernandev Awesome! Thanks for looking into this.

@hernandev
Copy link
Member

All files will be stored as artifacts now, after each build so even if bintray fails, we have the packges as zip to fallback :)

the issue was confirmed as bintray api rate limit issue.

@Jeroen-G
Copy link

For whoever still gets the Bad Signature errors, make sure you have alpine on 3.12

@limingxinleo
Copy link
Contributor

When I build php-7.3 in alpine v3.11

BAD signature occurs.

image

@Jeroen-G
Copy link

@limingxinleo as I mentioned in the comment just before yours, try updating to Alpine 3.12

@limingxinleo
Copy link
Contributor

It works.

@eXistenZNL
Copy link

eXistenZNL commented Dec 23, 2020

@hernandev @Jeroen-G any view on when the Alpine 3.11 packages will be updated?
I could switch to Alpine 3.12 but I rather not.

@chuoke
Copy link
Author

chuoke commented Dec 24, 2020

Hi, My issue with 3.12 and 7.4 is seems fixed. I have built successfully. There no error occurred.
That's Great.
Thank you very much.

@hernandev
Copy link
Member

@eXistenZNL 3.11 should be good, gonna check here why did they still erroring

@hernandev
Copy link
Member

same shit, after a bunch of uploads we are hitting upload rate limit on bintray, gonna switch to another place to host files in the future but gonna manually fix things in a bit

@hernandev
Copy link
Member

Please @chuoke @tobias-trozowski @Jeroen-G @bobbybouwmann @juliusstoerrle @limingxinleo @eXistenZNL and others:

#119

Keep track of this issue resolution at the above link.

@eXistenZNL
Copy link

Thanks a ton for your work @hernandev 👍

@hernandev
Copy link
Member

fixed, details on #119

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

8 participants