matiasdelellis / facerecognition

Nextcloud app that implement a basic facial recognition system.
GNU Affero General Public License v3.0
500 stars 45 forks source link

apt gpg key expired 2024-03-20 #731

Closed Edgeberg closed 2 months ago

Edgeberg commented 3 months ago

Hey, Thanks for reporting issues back to Nextcloud Face Recognition. Please, try to complete this report in detail so we can help you easier. :smile:

Make sure you read all the documentation, and the FAQ, and that the issue has not been reported before. :wink:

Expected behaviour

Should be able to connect to the apt repository repo.delellis.com.ar to install php8.1-pdlib

Actual behaviour

Err:10 https://repo.delellis.com.ar focal InRelease
  The following signatures were invalid: EXPKEYSIG 39217939ED3D07DB Matias De lellis <mati86dl@gmail.com>

Steps to reproduce

  1. wget -O- https://repo.delellis.com.ar/repo.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/delellis-archive-keyring.gpg/usr/share/keyrings/delellis-archive-keyring.gpg
  2. sudo apt update

Server configuration

N/A - see Actual behaviour above

Web server error log

Web server error log ``` N/A - see Actual behaviour above ```

Nextcloud log (data/nextcloud.log)

Nextcloud log ``` N/A - see Actual behaviour above ```

Browser log

Browser log ``` N/A - see Actual behaviour above ```
TrueBankai416 commented 2 months ago

im having the same error, this fixed it for temporary solution until the key gets updated. https://github.com/matiasdelellis/facerecognition/issues/701

update.. so doing this it seemed that docker build made it farther but it still ended up failing for the expired keys.

Edgeberg commented 2 months ago

im having the same error, this fixed it for temporary solution until the key gets updated. #701

@TrueBankai416 This didn't work for me on my Ubuntu 20.04 server, unfortunately, but I see this workaround does work on Ubuntu 22.04, because I tried this repository on a desktop 22.04 that I also have.

However, I had already used the "install from source" method on my server, which bypassed package management altogether, so face recognition is working on my Nextcloud with php-8.1, although via a hacky method (I'd prefer packages).

solonovamax commented 2 months ago

my current workaround is to installe faketime and then do

faketime 2024-04-01 apt-fast update

(this is the absolute latest date where the key is valid. do note: this may cause some other repositories, such as the elasticsearch one, to complain.)

matiasdelellis commented 2 months ago

Hi all, Sorry for the delay. You are absolutely right. 😞

Ubuntu focal still relevant?. I didn't update the repo or upload new packages because I was thinking of starting to recommend PECL.

sudo pecl install https://services.delellis.com.ar/data/facerecognition/pdlib-1.1.0.tgz

IndrekHaav commented 2 months ago

Ubuntu focal still relevant?

Nextcloud 28 recommends Ubuntu 22.04, so if that and Debian 12 could be supported, that should cover most people's setups, I think.

matiasdelellis commented 2 months ago

Ok.. We will have to wait a few days, but you're right, I'm going to renew the certificate. 😉

TrueBankai416 commented 2 months ago

Hi all, Sorry for the delay. You are absolutely right. 😞

Ubuntu focal still relevant?. I didn't update the repo or upload new packages because I was thinking of starting to recommend PECL.

sudo pecl install https://services.delellis.com.ar/data/facerecognition/pdlib-1.1.0.tgz

can you let us know when they are updated? how would one use pecl for libdlib?

Pedulla commented 2 months ago

May 6, 2024 W: GPG error: https://repo.delellis.com.ar jammy InRelease: The following signatures were invalid: EXPKEYSIG 39217939ED3D07DB Matias De lellis mati86dl@gmail.com E: The repository 'https://repo.delellis.com.ar jammy InRelease' is not signed.

matiasdelellis commented 2 months ago

Well... DOne,. You should add the public key again, but now it won't expire anymore..

wget -qO - https://repo.delellis.com.ar/repo.gpg.key | sudo apt-key add -

Please try and comment.. Thanks..

TrueBankai416 commented 2 months ago

Well... DOne,. You should add the public key again, but now it won't expire anymore..

wget -qO - https://repo.delellis.com.ar/repo.gpg.key | sudo apt-key add -

Please try and comment.. Thanks..

# Enable the repository for pdlib and install dlib
RUN mkdir -m 0755 -p /etc/apt/keyrings/ \
  && wget -O- https://repo.delellis.com.ar/repo.gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/php-pdlib.gpg > /dev/null \
  && echo "deb [signed-by=/etc/apt/keyrings/php-pdlib.gpg arch=amd64] https://repo.delellis.com.ar bullseye bullseye" | sudo tee /etc/apt/sources.list.d/php-pd>
RUN apt update \
  && apt install -y libdlib-dev

# Install pdlib extension from a downloaded archive
RUN wget https://github.com/goodspb/pdlib/archive/master.zip \
  && mkdir -p /usr/src/php/ext/ \
  && unzip -d /usr/src/php/ext/ master.zip \
  && rm master.zip
RUN docker-php-ext-install pdlib-master
8.813   The following signatures were invalid: EXPKEYSIG 39217939ED3D07DB Matias De lellis <mati86dl@gmail.com>
8.972 Reading package lists...
10.09 W: GPG error: https://repo.delellis.com.ar bullseye InRelease: The following signatures were invalid: EXPKEYSIG 39217939ED3D07DB Matias De lellis <mati86dl@gmail.com>
10.09 E: The repository 'https://repo.delellis.com.ar bullseye InRelease' is not signed.
TrueBankai416 commented 2 months ago

i added wget -qO - https://repo.delellis.com.ar/repo.gpg.key | sudo apt-key add - and it seems to be working now. Updated Snippet

# Enable the repository for pdlib and install dlib
RUN mkdir -m 0755 -p /etc/apt/keyrings/ \
  && wget -qO - https://repo.delellis.com.ar/repo.gpg.key | sudo apt-key add - \
  && wget -O- https://repo.delellis.com.ar/repo.gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/php-pdlib.gpg > /dev/null \
  && echo "deb [signed-by=/etc/apt/keyrings/php-pdlib.gpg arch=amd64] https://repo.delellis.com.ar bullseye bullseye" | sudo tee /etc/apt/sources.list.d/php-pd>
RUN apt update \
  && apt install -y libdlib-dev

# Install pdlib extension from a downloaded archive
RUN wget https://github.com/goodspb/pdlib/archive/master.zip \
  && mkdir -p /usr/src/php/ext/ \
  && unzip -d /usr/src/php/ext/ master.zip \
  && rm master.zip
RUN docker-php-ext-install pdlib-master
IndrekHaav commented 2 months ago

Well... DOne,. You should add the public key again, but now it won't expire anymore..

wget -qO - https://repo.delellis.com.ar/repo.gpg.key | sudo apt-key add -

Please try and comment.. Thanks..

apt-key add is deprecated, the key should be placed in /usr/share/keyrings or /etc/apt/keyrings (depending on how the key is updated) and referenced by the signed-by option.

https://wiki.debian.org/DebianRepository/UseThirdParty#OpenPGP_certificate_distribution

$ curl -fSsl https://repo.delellis.com.ar/repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/pdlib.gpg
$ echo "deb [signed-by=/etc/apt/keyrings/pdlib.gpg] https://repo.delellis.com.ar $(lsb_release -cs) $(lsb_release -cs)" | sudo tee /etc/apt/sources.list.d/pdlib.list

Can confirm this works on Ubuntu 22.04. Won't work on Debian 12 though, because the repo doesn't have a bookworm suite.

Edgeberg commented 2 months ago

Well... DOne,. You should add the public key again, but now it won't expire anymore..

wget -qO - https://repo.delellis.com.ar/repo.gpg.key | sudo apt-key add -

Please try and comment.. Thanks..

Thanks @matiasdelellis - it worked for me also.

And I agree with @IndrekHaav and use gpg --dearmor instead of apt-key. But either way, this issue is resolved now. 👍

SprickW commented 1 month ago

Both ways did NOT work for me and I ended up with

Conflicting values set for option Signed-By regarding source https://repo.delellis.com.ar/ jammy: /usr/share/keyrings/delellis-archive-keyring.gpg != /etc/apt/keyrings/pdlib.gpg

Ubuntu 22.04 LTS Nextcloud Hub 6 (27.1.5)

Deleted the eldest of the files referencing the repo in /etc/apt/sources.list.d and everything seems fine now.