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

Improve Package Downloads on Ubuntu and Debian #3539

Closed
ehfd opened this issue May 13, 2022 · 12 comments
Closed

Improve Package Downloads on Ubuntu and Debian #3539

ehfd opened this issue May 13, 2022 · 12 comments
Labels
enhancement New feature or request

Comments

@ehfd
Copy link

ehfd commented May 13, 2022

Is your feature request related to a problem? Please describe.
The download directions on the Downloads Wiki are very confusing as it is not compatible across a wide range of releases, and key management is a huge nuisance.
Instead of using the .list file format, the .sources file format provides a very convenient method to add the Xpra repository.
Idea brought from https://wiki.winehq.org/Ubuntu and https://wiki.winehq.org/Debian.
Dependencies: sudo apt-get install apt-transport-https ca-certificates wget

Describe the solution you'd like
This line is sufficient for importing the key to all distros:
sudo wget -O "/usr/share/keyrings/xpra.asc" https://xpra.org/gpg.asc

xpra.sources are to be saved in /etc/apt/sources.list.d/xpra.sources and xpra-beta.sources are to be saved in /etc/apt/sources.list.d/xpra-beta.sources in all cases.

The command to do this would be (except bookworm which does not have VERSION_CODENAME in /etc/os-release, will be added when the distro is actually released, just set export DISTRO=bookworm):
export DISTRO=$(grep VERSION_CODENAME= /etc/os-release | cut -d= -f2)
sudo wget -O "/etc/apt/sources.list.d/xpra.sources" https://xpra.org/repos/${DISTRO}/xpra.sources
sudo wget -O "/etc/apt/sources.list.d/xpra-beta.sources" https://xpra.org/repos/${DISTRO}/xpra-beta.sources

https://xpra.org/repos/bionic/xpra.sources

Types: deb
URIs: https://xpra.org
Suites: bionic
Components: main
Signed-By: /usr/share/keyrings/xpra.asc

https://xpra.org/repos/bionic/xpra-beta.sources

Types: deb
URIs: https://xpra.org/beta
Suites: bionic
Components: main
Signed-By: /usr/share/keyrings/xpra.asc

https://xpra.org/repos/focal/xpra.sources

Types: deb
URIs: https://xpra.org
Suites: focal
Components: main
Signed-By: /usr/share/keyrings/xpra.asc

https://xpra.org/repos/focal/xpra-beta.sources

Types: deb
URIs: https://xpra.org/beta
Suites: focal
Components: main
Signed-By: /usr/share/keyrings/xpra.asc

NOTE: There is an issue with impish and jammy where xpra-html5 and xpra are not installed correctly. There is an exact same issue with the existing .list method, and this is because the Packages file is empty as of 2022-05-13, so not an issue with this .source method. There is no "GPG key not found" error, so my .source method is perfectly valid. However, it is best to test for minor issues which may arise after Packages is restored. FIXED AND CONFIRMED WORKING.

https://xpra.org/repos/impish/xpra.sources

Types: deb
URIs: https://xpra.org
Suites: impish
Components: main
Signed-By: /usr/share/keyrings/xpra.asc

https://xpra.org/repos/impish/xpra-beta.sources

Types: deb
URIs: https://xpra.org/beta
Suites: impish
Components: main
Signed-By: /usr/share/keyrings/xpra.asc

https://xpra.org/repos/jammy/xpra.sources

Types: deb
URIs: https://xpra.org
Suites: jammy
Components: main
Signed-By: /usr/share/keyrings/xpra.asc

https://xpra.org/repos/jammy/xpra-beta.sources

Types: deb
URIs: https://xpra.org/beta
Suites: jammy
Components: main
Signed-By: /usr/share/keyrings/xpra.asc

https://xpra.org/repos/stretch/xpra.sources

Types: deb
URIs: https://xpra.org
Suites: stretch
Components: main
Signed-By: /usr/share/keyrings/xpra.asc

https://xpra.org/repos/stretch/xpra-beta.sources

Types: deb
URIs: https://xpra.org/beta
Suites: stretch
Components: main
Signed-By: /usr/share/keyrings/xpra.asc

https://xpra.org/repos/buster/xpra.sources

Types: deb
URIs: https://xpra.org
Suites: buster
Components: main
Signed-By: /usr/share/keyrings/xpra.asc

https://xpra.org/repos/buster/xpra-beta.sources

Types: deb
URIs: https://xpra.org/beta
Suites: buster
Components: main
Signed-By: /usr/share/keyrings/xpra.asc

https://xpra.org/repos/bullseye/xpra.sources

Types: deb
URIs: https://xpra.org
Suites: bullseye
Components: main
Signed-By: /usr/share/keyrings/xpra.asc

https://xpra.org/repos/bullseye/xpra-beta.sources

Types: deb
URIs: https://xpra.org/beta
Suites: bullseye
Components: main
Signed-By: /usr/share/keyrings/xpra.asc

NOTE: There is an issue with bookworm where xpra-html5 and xpra are not installed correctly. There is an exact same issue with the existing .list method, and this is because the dependency is set to libavif13 (not available in bookworm) instead of libavif14, so not an issue with this .source method. There is no "GPG key not found" error, so my .source method is perfectly valid. However, it is best to test for minor issues which may arise after this is fixed.

https://xpra.org/repos/bookworm/xpra.sources

Types: deb
URIs: https://xpra.org
Suites: bookworm
Components: main
Signed-By: /usr/share/keyrings/xpra.asc

https://xpra.org/repos/bookworm/xpra-beta.sources

Types: deb
URIs: https://xpra.org/beta
Suites: bookworm
Components: main
Signed-By: /usr/share/keyrings/xpra.asc

Using each of the Docker base images ubuntu:{bionic,focal,impish,jammy} and debian:{stretch,buster,bullseye,bookworm}, confirmed to correctly work right to installing xpra and xpra-html5 from the Xpra.org repository except for impish and jammy (which will work since it worked in bullseye) where the Packages file was empty in the repository and bookworm where the package dependency collided.

@ehfd ehfd added the enhancement New feature or request label May 13, 2022
@totaam
Copy link
Collaborator

totaam commented May 13, 2022

The download directions on the Downloads Wiki are very confusing as it is not compatible across a wide range of releases, and key management is a huge nuisance.

Agreed. Debian has made the GPG key change unnecessarily complicated.
They should have ignored the SHA1 signatures rather than ignoring the whole key.

This line is sufficient for importing the key to all distros:

It should not be. We have two distinct GPG keys, thanks to the mess in #3446, #3485

The command to do this would be ...

That's one ugly command line, I would split it to make it fit on screen.

except bookworm which does not have...

Yet another special case 😞

There is an exact same issue with the existing .list method, and this is because the Packages file is empty

Oh, that's happened again when I pushed the html5 builds...
Why can't Ubuntu and Debian get their tools synchronized better than this? (rhetorical question)

dpkg-deb: error: archive 'dists/jammy/main/binary-amd64/xserver-xorg-video-dummy_0.4.0-2_amd64.deb' uses unknown compression for member 'control.tar.zst', giving up

Ubuntu still doesn't support zst control files in its "latest / greatest" distro and that breaks the repository.
I've nuked those packages from the repository cache.

NOTE: There is an issue with bookworm where xpra-html5 and xpra are not installed correctly.
... libavif14 ...

That's invalid. See #3531 : use the beta repo for beta distros.
We do NOT rebuild packages whenever Debian breaks the ABI.

TLDR: Debian packaging always ends up costing me far too much time and effort for what it does.

@ehfd
Copy link
Author

ehfd commented May 13, 2022

It should not be. We have two distinct GPG keys, thanks to the mess in #3446, #3485

Well, it works well? The two unarmored keys aren't needed and just the armored key used for RPM does work.
If I saw that Get:2 https://xpra.org/beta impish/main amd64 xpra amd64 4.4-r31267-1 [3182 kB] (Get:2 https://xpra.org impish/main amd64 xpra amd64 4.3.3-r0-1 [3035 kB]) and Get:22 https://xpra.org/beta impish/main amd64 xpra-html5 all 5.0-r1276-1 [2411 kB] (Get:24 https://xpra.org impish/main amd64 xpra-html5 all 5.0-r1276-1 [2411 kB]) are the sources of download for apt-get install xpra xpra-html5, it means it works, doesn't it?
The key for Wine (https://dl.winehq.org/wine-builds/winehq.key) is also armored.

I also confirm that impish and jammy work with the same armored .asc key for the above configuration after Packages got fixed.

That's invalid. See #3531 : use the beta repo for beta distros.
We do NOT rebuild packages whenever Debian breaks the ABI.

That is outside the scope of whether the .sources method works or not, since all the errors I see are equally seen in the current .list method. Probably got broken again after whatever you did to fix it. I used beta.

@ehfd
Copy link
Author

ehfd commented May 13, 2022

That's one ugly command line, I would split it to make it fit on screen.

Made the edit.

Yet another special case 😞

Don't worry, you know that bookworm is not yet actually released. When it's released, it will have VERSION_CODENAME.

@ehfd
Copy link
Author

ehfd commented May 20, 2022

Example for Docker users:

# Install Xpra
RUN curl -fsSL -o /usr/share/keyrings/xpra.asc "https://xpra.org/gpg.asc" && \
    echo -e "Types: deb\nURIs: https://xpra.org\nSuites: $(grep VERSION_CODENAME= /etc/os-release | cut -d= -f2)\nComponents: main\nSigned-By: /usr/share/keyrings/xpra.asc" > /etc/apt/sources.list.d/xpra.sources && \
    echo -e "Types: deb\nURIs: https://xpra.org/beta\nSuites: $(grep VERSION_CODENAME= /etc/os-release | cut -d= -f2)\nComponents: main\nSigned-By: /usr/share/keyrings/xpra.asc" > /etc/apt/sources.list.d/xpra-beta.sources && \
    apt-get update && apt-get install --no-install-recommends -y \
        cups-filters \
        cups-common \
        cups-pdf \
        python3-cups \
        python3-pip \
        xpra && \
    pip3 install pycuda && \
    cd / && rm -rf /tmp/* && \
    rm -rf /var/lib/apt/lists/*

@Slebi
Copy link

Slebi commented May 24, 2022

If I try to update xpra on Ubuntu Impish I receive the follwoing error:

host:/etc/apt/sources.list.d$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 21.10
Release:	21.10
Codename:	impish

host:/etc/apt/sources.list.d$ sudo wget   https://xpra.org/repos/impish/xpra-beta.list
...

host:/etc/apt/sources.list.d$ sudo apt update
...
N: Skipping acquire of configured file 'main/binary-arm64/Packages' as repository 'https://xpra.org impish InRelease' doesn't support architecture 'arm64'

Is this a problem of my system or a general problem? On another system with Ubuntu bionic and the corresponding xpra repo I was able to update to the newest version. Thanks for the help!

@totaam
Copy link
Collaborator

totaam commented May 24, 2022

@Slebi There are no arm64 builds for impish, please upgrade to jammy which does have arm64 packages now - I've added it to the default build targets in Xpra-org/repo-build-scripts@8f92344.

@ehfd
Copy link
Author

ehfd commented Oct 21, 2022

@totaam Note that this alternative .source method works right now without any modifications.

And it only uses one key!

@totaam
Copy link
Collaborator

totaam commented Oct 21, 2022

@ehfd will definitely be looking at this for the new release cycle.

@ehfd
Copy link
Author

ehfd commented Oct 21, 2022

It's how WineHQ instructs us to install Ubuntu/Debian packages, so I think it's pretty good.

@totaam
Copy link
Collaborator

totaam commented Jan 31, 2023

@ehfd I have updated the Download wiki page to point to new xpra.sources files uploaded to git in the commit above.
Does this look right to you?
Thanks!

@ehfd
Copy link
Author

ehfd commented Feb 12, 2023

One typo in Debian: import the key key

Otherwise, looks good to me.
Close at your convenience.

@totaam totaam closed this as completed Feb 12, 2023
@totaam
Copy link
Collaborator

totaam commented Mar 14, 2023

For the record, the step-by-step instructions from the download instructions were wrong.
Saving the .sources files with a .list extension, which caused a is not valid syntax for apt error.
Fixed in https://github.com/Xpra-org/xpra/wiki/Download/_compare/1eb9876300f1bb6d14683deb14c140341fa3f09e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants