Skip to content

Fix keyring installation instructions - #35

Merged
Airblader merged 1 commit into
i3:masterfrom
sur5r:master
Jul 25, 2017
Merged

Fix keyring installation instructions#35
Airblader merged 1 commit into
i3:masterfrom
sur5r:master

Conversation

@sur5r

@sur5r sur5r commented Jul 24, 2017

Copy link
Copy Markdown
Contributor

'apt install' does not accept .deb files. Use 'dpkg -i' instead.

'apt install' does not accept .deb files. Use 'dpkg -i' instead.
@Airblader
Airblader merged commit de1d38f into i3:master Jul 25, 2017
@Airblader

Copy link
Copy Markdown
Member

Thanks!

@stapelberg

Copy link
Copy Markdown
Member

With which version of apt did you test this? It definitely accepts .deb files (and resolves dependencies, which is nice), but that’s a somewhat recent feature.

@sur5r

sur5r commented Sep 4, 2017

Copy link
Copy Markdown
Contributor Author

Whatever was in testing on that date, so 1.5~beta1 according to p.q.d.o.

I know i tried several times and it did not work. It was also not mentioned in the manpage that it's supposed to work.

But keep in mind these instructions are also used by people still running apt 1.0.1 (until April 2019) and apt 1.2.{15|24} until (April 2021).

EDIT: I will check my IRC logs for that day, I remember someone else had that problem. Wouldn't have noticed it otherwise.

@sur5r

sur5r commented Sep 4, 2017

Copy link
Copy Markdown
Contributor Author

Unfortunately it is unclear which distribution the user was on. Log excerpt:

<xxx> Hey folks, I'm trying to install the latest i3 using its apt repo,
      but it looks like the signing  key can't be retrieved. Known issue?`
      Suspicious? Or am I just missing something?
      `GPG error: http://debian.sur5r.net trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E3CA1A89941C42E6`
<xxx> Hmm.. actually, it looks like the `apt install ./keyring.deb` with the
      keyring downloaded from sur5r.net doesn't work, so maybe that's the cause.
      Just get a bunch of `E: Release 'keyring.deb' for 'i3-wm' was not found

Also:

<@sur5r> waitasec.. apt install foo.deb... is that really supposed to sowrk?
<@sur5r> *work
<@sur5r> at least on buster it does not work

@stapelberg

Copy link
Copy Markdown
Member

Are you sure you used apt install ./keyring.deb, not apt install keyring.deb? I just double-checked on Debian buster:

$ docker run -t -i debian:buster 
Unable to find image 'debian:buster' locally
buster: Pulling from library/debian
92a0fac866ce: Pull complete 
Digest: sha256:a8c8a4d6a6a6ef445f4d99f41c5f4a5b20c13230a14788ed2d043a4277d96032
Status: Downloaded newer image for debian:buster
root@8fd737acc092:/# /usr/lib/apt/apt-helper download-file http://dl.bintray.com/i3/i3-autobuild/pool/main/i/i3-autobuild-keyring/i3-autobuild-keyring_2016.10.01_all.deb keyring.deb SHA256:460e8c7f67a6ae7c3996cc8a5915548fe2fee9637b1653353ec62b954978d844
Get:1 http://dl.bintray.com/i3/i3-autobuild/pool/main/i/i3-autobuild-keyring/i3-autobuild-keyring_2016.10.01_all.deb [6558 B]
Fetched 6558 B in 0s (20.1 kB/s)      
W: Download is performed unsandboxed as root as file 'keyring.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

root@8fd737acc092:/# apt update
Get:1 http://security.debian.org buster/updates InRelease [25.5 kB]
Get:2 http://deb.debian.org/debian buster InRelease [135 kB]                   
Get:3 http://deb.debian.org/debian buster-updates InRelease [46.0 kB]   
Get:4 http://deb.debian.org/debian buster/main amd64 Packages [9650 kB]
Fetched 9856 kB in 1s (8766 kB/s)  
Reading package lists... Done
Building dependency tree       
Reading state information... Done
41 packages can be upgraded. Run 'apt list --upgradable' to see them.

root@8fd737acc092:/# apt install ./keyring.deb
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'i3-autobuild-keyring' instead of './keyring.deb'
The following additional packages will be installed:
  dirmngr gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gpgv
  libassuan0 libksba8 libldap-2.4-2 libldap-common libnpth0 libreadline7 libsasl2-2 libsasl2-modules
  libsasl2-modules-db libsqlite3-0 libssl1.1 pinentry-curses readline-common
Suggested packages:
  dbus-user-session libpam-systemd pinentry-gnome3 tor parcimonie xloadimage scdaemon
  libsasl2-modules-gssapi-mit | libsasl2-modules-gssapi-heimdal libsasl2-modules-ldap
  libsasl2-modules-otp libsasl2-modules-sql pinentry-doc readline-doc
The following NEW packages will be installed:
  dirmngr gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm
  i3-autobuild-keyring libassuan0 libksba8 libldap-2.4-2 libldap-common libnpth0 libreadline7
  libsasl2-2 libsasl2-modules libsasl2-modules-db libsqlite3-0 libssl1.1 pinentry-curses
  readline-common
The following packages will be upgraded:
  gpgv
1 upgraded, 24 newly installed, 0 to remove and 40 not upgraded.
Need to get 9580 kB/9587 kB of archives.
After this operation, 19.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] ^C

root@8fd737acc092:/# apt install keyring.deb
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package keyring.deb
E: Couldn't find any package by glob 'keyring.deb'
E: Couldn't find any package by regex 'keyring.deb'

I tested a bunch of Ubuntu and Debian versions:

version apt version apt install ./keyring.deb works?
ubuntu:trusty 1.0.1ubuntu2 no
ubuntu:utopic 1.0.9.2ubuntu2 no
ubuntu:vivid 1.0.9.7ubuntu4 no
ubuntu:wily 1.0.10.2ubuntu1 no
ubuntu:xenial 1.2.24 yes
ubuntu:yakkety 1.3.5 yes
ubuntu:zesty 1.4 yes
ubuntu:artful 1.5~beta1 yes
debian:wheezy none no
debian:jessie 1.0.9.8.4 no
debian:stretch 1.4.7 yes
debian:buster 1.5~beta1 yes

Given that we target xenial and sid, I suggest we restore the apt install ./keyring.deb line for these repositories, and keep dpkg -i for sur5r’s repository until 2019-05.

Does that sound reasonable?

@sur5r

sur5r commented Sep 7, 2017

Copy link
Copy Markdown
Contributor Author

Yes, it does.

But on a different note: someone™ should file a bug against apt's manpage. That behaviour is completely undocumented. It's neither mentioned it takes .debs nor that it needs a path instead of a filename.

@stapelberg

Copy link
Copy Markdown
Member

stapelberg added a commit that referenced this pull request Sep 9, 2017
This was changed in commit 90560bd, but
actually works with apt ≥ 1.2.24 (xenial) on Ubuntu and apt ≥ 1.4.7 (stretch) on
Debian, as we later discovered.

related to #35
stapelberg added a commit that referenced this pull request Jan 11, 2023
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

Successfully merging this pull request may close these issues.

3 participants