Skip to content

Add RUSTIC_HOME and update precedence for platform specific app directories #859

Open

Description

@simonsan

it gives the possibility to set a location of their own to the users.

yeah, users can set a custom location with the environment variable, but "RUSTIC_HOME": "$dir" is defined in manifest, $env:RUSTIC_HOME will be reset to $dir every update.


If you want to make the program more portable. rustic_home should be set in order and fallback to the first existing path:

  1. $env:RUSTIC_HOME
  2. <program_root>\home
  3. $env:USERPROFILE\.config\rustic or $env:USERPROFILE\.rustic
  4. $env:APPDATA\rustic
  5. $env:ProgramData\rustic
    ...

note, this just a example or suggestion, or a feature request for your project.

Originally posted by @HUMORCE in ScoopInstaller/Main#5042 (comment)

Furthermore, we need to make sure, that the next release:

Activity

  1. added
    C-bugCategory: Something isn't working as expected
    A-ciArea: Issues/Pull requests related to CI
    O-windowsOperating system: Windows
    C-upstreamCategory: Issue for a dependency, will be fixed upstream
    A-metaArea: Project wide
    A-packagingArea: related to packaging
    on Aug 30, 2023
  2. tech189 commented on Jan 19, 2024

    @tech189

    Hi, just to let you know, the latest release (0.6.1) doesn't contain any binaries for Windows so the Scoop package is out of date currently.

  3. simonsan commented on Jan 19, 2024

    @simonsan
    ContributorAuthor

    Yes, the last release didn't contain a windows binary (@aawsome), we need to investigate that, fortunately we will have another release soon. Thank you a lot for the heads-up, though!

  4. simonsan commented on Feb 3, 2024

    @simonsan
    ContributorAuthor

    Hi, just to let you know, the latest release (0.6.1) doesn't contain any binaries for Windows so the Scoop package is out of date currently.

    With the new release, packages should be updated, hashes are attached and packages are signed. So we should be able to update our scoop package at this point.

  5. simonsan commented on Feb 4, 2024

    @simonsan
    ContributorAuthor

    Hash for rustic has been updated: ScoopInstaller/Main#5494

    I'm not sure, why it didn't get automatically updated, though. Might need further investigation.

  6. simonsan commented on Feb 4, 2024

    @simonsan
    ContributorAuthor

    Update: The hash has been updated, but because I needed to rebuild the artifacts once again when I discovered the internal hierarchy was breaking self-update, the CD updated the attached artifacts on the release, which didn't get to the scoop CI (hook runs only first time when a release is published).

  7. changed the title [-]packaging: `scoop` manifest and CI needs update[/-] [+]Add `RUSTIC_HOME` and update precedence for platform specific app directories[/+] on Feb 4, 2024
  8. added
    C-enhancementCategory: New feature or request
    A-ui-uxArea: Related to user interfaces and user experience
    and removed
    C-bugCategory: Something isn't working as expected
    A-ciArea: Issues/Pull requests related to CI
    O-windowsOperating system: Windows
    C-upstreamCategory: Issue for a dependency, will be fixed upstream
    A-packagingArea: related to packaging
    on Feb 4, 2024
  9. simonsan commented on Feb 11, 2024

    @simonsan
    ContributorAuthor

    yeah, users can set a custom location with the environment variable, but "RUSTIC_HOME": "$dir" is defined in manifest, $env:RUSTIC_HOME will be reset to $dir every update.

    We need to think that through, as that could become a problem. We may only set RUSTIC_HOME in scoop if it's unset. On the other hand, it could also lead to issues, to not reset it on an update, as people could copy their executable from their scoop directory to use it from another folder. After updating, they would think, they are using the updated version — but they aren't because RUSTIC_HOME still points to their rustic custom folder using their configs. Which could lead to weird bug reports down the line.

    @tech189 Is there a usual way to handle that for scoop manifests?

  10. tech189 commented on Feb 18, 2024

    @tech189

    Installations of apps with Scoop are not meant to be portable as far as I know. Users should know that if they move executables away from their Scoop directory, they will no longer be managed by Scoop and updates/environment variables will no longer work properly.

  11. magrathean-uk commented on Aug 1, 2026

    @magrathean-uk
    Contributor

    I opened a focused draft PR for this shared config-path fix: #1867

    It covers the RUSTIC_HOME/XDG precedence path and the Windows USERPROFILE/.config fallback.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-metaArea: Project wideA-ui-uxArea: Related to user interfaces and user experienceC-enhancementCategory: New feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions