Skip to content

cmd/self-update: add --stable flag #5076

Closed

Description

@ivandeex

What is your current rclone version (output from rclone version)?

This request blocks on the selfupdate command (#548) due after 1.55.0

It is based on the thread https://forum.rclone.org/t/previously-working-rclone-backup-now-giving-error-unknown-command-rcat-for-rclone/22507/21

What problem are you are trying to solve?

Many Debian repositories and Ubuntu PPAs provide two distribution flavors: main and stable (they usually have the relevant word in the URL).
main installs the project provided binary with latest features.
stable provides a pre-latest rolling release which usually includes stability patches back-ported from the top

How do you think rclone should be changed to solve that?

I propose to add a flag which could be named --stable (we should choose a proper name!) that will mean a similar thing.

For example, if we ran the command right now,
self-update without flags will install v1.54 from https://download.rclone.org
self-update --beta will install the latest beta from https://beta.rclone.org
self-update --stable would install v1.53.4 (this is a new behavior)

Normally self-update will get the number from https://download.rclone.org/version.txt which reflects latest release tag from the master git branch.

The new feature will need a change on the CI/CD pipeline side.
I propose new stable-version.txt which should contain latest release from the pre-latest v1.x-stable branch.
What a "pre-latest release" means will be decided by CI/CD, the self-update will just follow it without any fragile version heuristics.

As @ncw noted in his forum comment cited below, the term --stable does not align with the rclone CI/CD process:

Right now the current v1.54-stable version has commits which haven't made it into v1.54.1 as that hasn't been released yet. That has a version number v1.54.1-beta.5153.da9dd543e.v1.54-stable right now. But it doesn't have any release tags on it at the moment.
When it does get a release tag the main version would become 1.54.1 - at least that is the way it works at the moment.
You can find these in https://beta.rclone.org/branch/v1.54-stable/ - there is no version.txt file in there at the moment, but there could be with a little bit of work.
I would argue that https://downloads.rclone.org/version.txt is always the stable version but only sometimes the main version - is that distinction important?
I think that if --stable meant install the latest beta from the stable branch that would be useful.

I think that 1.54.1 can be released only after 1.55 sees the daylight.
UPDATE 2021-03-10 This statement is wrong.

Maybe we could use an alternative flag name, --backports instead of --stable.
In that case:
self-update without flags will install v1.55 from https://download.rclone.org
self-update --backports would install v1.54.1
I'm not sure. This needs a review by gurus.

Another @ncw comment from the same thread states:

It would be nice if self-update could list what versions were available, install from branches and install a specific version number. So many features!

I think that requests should be focused, so version listing is out of scope for this request.

Activity

  1. darthShadow commented on Feb 28, 2021

    @darthShadow
    Member

    I am not in favour of the idea of supporting two versions, considering the limited dev time we have available. Perhaps we can table it for now and reconsider it in the future once the issues & PRs are under control and we have a good release cadence?

    My vote would be to just keep two versions: beta & stable with no flags given implying stable.

    In addition to the above, we could also consider providing users with the option to install a specific version instead, by specifying the full version string like 1.55.0-beta.5240.9cc8ff4dd for beta & 1.53.4 (support for specifying the patch version too) for stable?

    So, it may behave something like this:

    Command Result
    rclone self-update Installs v1.54.0
    rclone self-update --stable Installs v1.54.0
    rclone self-update --stable --version 1.53 Installs v1.53.4
    rclone self-update --stable --version 1.53.0 Installs v1.53.0
    rclone self-update --stable --version 1.53.4 Installs v1.53.4
    rclone self-update --beta Installs v1.55.0-beta.5240.9cc8ff4dd
    rclone self-update --beta --version 1.54.0-beta.5137.8b41dfa50 Installs v1.54.0-beta.5137.8b41dfa50

    With this, should we also add permanent archiving of the older releases too? Perhaps via something like Backblaze proxied via CloudFlare?

  2. ivandeex commented on Mar 3, 2021

    @ivandeex
    MemberAuthor

    I am not in favor of the idea of supporting two versions, considering the limited developer time we have available.

    I agree with you and discard the --backoports flag idea.
    Your other ideas (default --stable flag and --version flag) will be implemented by PR #5080

  3. linked a pull request that will close this issuecmd: rclone selfupdate #5080on Mar 3, 2021
  4. added this to the v1.55 milestone on Mar 3, 2021
  5. self-assigned this
    on Mar 4, 2021
  6. added a commit that references this issue on Mar 11, 2021
    6fa7434
  7. darthShadow commented on Mar 12, 2021

    @darthShadow
    Member

    @ncw Any thoughts on the permanent archive idea? Should I create a new issue for that?

  8. added a commit that references this issue on Jul 20, 2026
    5a8c36d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions