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

Is there a way to install a specific version? #3097

Closed
OnTheLink opened this issue Sep 11, 2019 · 16 comments
Closed

Is there a way to install a specific version? #3097

OnTheLink opened this issue Sep 11, 2019 · 16 comments

Comments

@OnTheLink
Copy link

I want to install version 3.6.2 of QGIS even when a newer package is available for download on flathub, is there any way to do this?

@TingPing
Copy link
Member

TingPing commented Sep 11, 2019

Its not friendly but yes; First find the commit you want:

> flatpak remote-info --log flathub org.qgis.qgis
QGIS Desktop - A Free and Open Source Geographic Information System

        ID: org.qgis.qgis
       Ref: app/org.qgis.qgis/x86_64/stable
      Arch: x86_64
    Branch: stable
   Version: 3.6.2
   License: GPL-2.0+
Collection: org.flathub.Stable
  Download: 381.3 MB
 Installed: 1.2 GB
   Runtime: org.kde.Platform/x86_64/5.12

       Sdk: org.kde.Sdk/x86_64/5.12
    Commit: f800f16369746b5e82ccf1da7ed2ae6da225c3528081efbf16d5606ce46442d3
    Parent: f3e180bb9ddc0cc9fc304e899b7c71405d10db81a8200f3d34dfb6288fec15b9
   Subject: Include python future module (80f93cec)
      Date: 2019-04-26 00:14:37 +0000
   History: 

    Commit: f3e180bb9ddc0cc9fc304e899b7c71405d10db81a8200f3d34dfb6288fec15b9
   Subject: Update to QGIS 3.6.2 (f1cbbf22)
      Date: 2019-04-23 04:38:57 +0000

    Commit: 24d453472a05d12fdf473d1dd0f7b6510c4eec322dae83af7387172990b2d90d
   Subject: Fix build on flathub (48b0b7fa)
      Date: 2019-03-30 04:24:30 +0000

    Commit: bd8025a0950240575fada49d52b05c3aeffb5863ff047c6b78a9ed13ac4e59a5
   Subject: Added netcdf and hdf5 support (cdf2875c)
      Date: 2019-02-14 06:01:56 +0000

    Commit: 249b547613eaaff9d3d8b651d1ffebc499532bfc041868b537d3d231776bf530
   Subject: Update to qgis 3.4.2 (9ee661f8)
      Date: 2018-11-29 04:28:13 +0000

    Commit: 9f7b5a691c48adeb991276439786a6119f91261b27a27091692565aaa3cde8e0
   Subject: Fix typo (1ce68a18)
      Date: 2018-11-07 08:18:18 +0000

    Commit: 1856a7d4a0430638c1249708994b204fb5329fc01bca709597f58c219120086b
   Subject: Include -DWITH_3D=TRUE as suggested (3a2d3a83)
      Date: 2018-09-26 15:47:23 +0000

    Commit: 42ae7e501cb771eed7c7aee8cb06c4b3f956494d325fae379215b248216c2549
   Subject: Allow QGIS to access the network (92e56b48)
      Date: 2018-09-26 14:30:53 +0000

Then switch to that commit:

> flatpak update --commit=f3e180bb9ddc0cc9fc304e899b7c71405d10db81a8200f3d34dfb6288fec15b9 org.qgis.qgis

@mwleeds
Copy link
Collaborator

mwleeds commented Sep 12, 2019

I guess we have this documented here but not on docs.flatpak.org

@aiamuzz
Copy link

aiamuzz commented Sep 12, 2019

oh ... cool ... can i downgrade to a particular commit ?

I am trying to ... but i get the following error ...

flatpak update --commit=30315fcd1d34daf70a7247dad186a0f7c269a7e28e022bec7b5d1856638ce5f2 org.qbittorrent.qBittorrent

Looking for updates…
error: org.qbittorrent.qBittorrent not installed

when qBittorrent is very much installed and running ...

@mwleeds
Copy link
Collaborator

mwleeds commented Sep 12, 2019

It should work. Open a separate bug report?

@aiamuzz
Copy link

aiamuzz commented Sep 13, 2019

It should work. Open a separate bug report?

@mwleeds ... i am using flatpak 1.2.4 from stretch backports ... is the above downgrading / installing a particular version/commit part of this version ? If Yes then i'll surely open a new bug issue ...

@TingPing
Copy link
Member

Well the command clearly exists in your version, you are just saying it didn't find an existing install for some reason. It would certainly be good to test the current verison.

@Mek101
Copy link

Mek101 commented Aug 31, 2021

Fails with

Error: Can't update to a specific commit without root permissions
Updates complete.
error: There were one or more errors

On flatpak 1.11.2

@smcv
Copy link
Collaborator

smcv commented Aug 31, 2021

Can't update to a specific commit without root permissions

What the message says. If an app is installed system-wide (for all users of a multi-user system), then only root can downgrade it. Otherwise, if Alice and Bob share a computer, Alice could downgrade an app that Bob uses to an older version that has a known security vulnerability, and use that vulnerability to attack Bob.

@MarcelRobitaille
Copy link

Why is it necessary to install the app before downgrading it? In other words, why does --commit exist for update but not install?

@TingPing
Copy link
Member

TingPing commented Mar 27, 2023

@MarcelRobitaille At a glance I don't think its a technical limitation. I believe it was just done because the feature mostly exists for emergency rollbacks and for development (bisecting changes). End users in real usage won't directly install old versions. The commits on flathub for example only last a short period of time often.

@MarcelRobitaille
Copy link

@TingPing I agree that that is true most of the time, but there are perfectly valid reasons for normal end-users to downgrade and even to install an old version directly without first installing the latest version:

  1. I installed kicad 7.0 from the distro repositories and I want to install kicad 6.0
  2. I know from my desktop that kicad 7.0 has problems with simulations so I want to directly install kicad 6.0 on my laptop without installing the kicad 7.0 flatpak first

And regardless of whether end-users should be installing old software, flatpak supports this feature via upgrade. It would be nice if --commit were also available for install.

@smcv
Copy link
Collaborator

smcv commented Mar 28, 2023

It would be nice if --commit were also available for install

I'd consider a pull request adding that.

One obvious caveat is that if you use that on a multi-user system, then you need to be prepared for the other users of the system to flatpak update the app away from your chosen commit - otherwise the attack in #3097 (comment) would still exist, but with extra steps.

@RokeJulianLockhart
Copy link

RokeJulianLockhart commented Sep 3, 2023

#3097 (comment)

@MarcelRobitaille, is that available yet?

@vitaliis
Copy link

Facing a problem with installing a latest version of some application. In my case it is net.codeindustry.MasterPDFEditor, which does not have a referenced version/package available. Install fails with 404.

And as a workaround wanted to use install --commit= option to install any other version. But it does not seem to be available.

I tried modifying cached entries in /var/lib/flatpak/repo/tmp/... to point to correct version and to a correct URL. But it did not have any effect.

There is no workaround for installing a specific release version at the moment.

@5p4r74cu5
Copy link

Can this be reopened please? It is technically not available (install --commit=), so the current method is a workaround.

@slw1jw
Copy link

slw1jw commented Jul 27, 2024

I just used your instructions to roll OBS Studio back because of the Advanced Scene Switcher issue with 30.2 and they were easy to follow and everything worked great. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests