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

Add environment variable to select storage provider #741

Merged
merged 8 commits into from
Sep 27, 2024

Conversation

bermeitinger-b
Copy link
Collaborator

Supersedes #738

@flathubbot
Copy link
Contributor

Started test build 149984

@flathubbot
Copy link
Contributor

Build 149984 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/133075/org.signal.Signal.flatpakref

@bermeitinger-b bermeitinger-b merged commit 0b347f5 into master Sep 27, 2024
1 check passed
@bermeitinger-b bermeitinger-b deleted the minosimo-storage_env_variable branch September 27, 2024 09:54
bermeitinger-b added a commit that referenced this pull request Sep 27, 2024
* Add environment variable to select storage provider

* Simplify password store env variable

* Add password store description to readme

* Validate the password store and print an info when using basic

Signed-off-by: Bernhard Bermeitinger <[email protected]>

* Show warning about (lack of) encryption

* Reword the notification

Signed-off-by: Bernhard Bermeitinger <[email protected]>

---------

Signed-off-by: Bernhard Bermeitinger <[email protected]>
Co-authored-by: Simon <[email protected]>
Co-authored-by: bbhtt <[email protected]>
@minosimo
Copy link
Contributor

The warning currently shows on every other launch.

@minosimo
Copy link
Contributor

Do we agree it would be better to show the warning only on new installs? Checking if config.json exists should be sufficient.

bermeitinger-b added a commit that referenced this pull request Sep 27, 2024
* signal-desktop: Migrate from `signal.desktop` (#739)

Ideally, upstream will also migrate to `org.signal.Signal.desktop`.
This fixes task manager icons on KDE Plasma 6.1.5.

AppStream gained `<provides><id>…` per a recommendation from
<https://blogs.gnome.org/hughsie/2019/04/23/remember-the-extra-metadata-if-you-change-a-desktop-id/>.

* Add environment variable to select storage provider (#741)

* Add environment variable to select storage provider

* Simplify password store env variable

* Add password store description to readme

* Validate the password store and print an info when using basic

Signed-off-by: Bernhard Bermeitinger <[email protected]>

* Show warning about (lack of) encryption

* Reword the notification

Signed-off-by: Bernhard Bermeitinger <[email protected]>

---------

Signed-off-by: Bernhard Bermeitinger <[email protected]>
Co-authored-by: Simon <[email protected]>
Co-authored-by: bbhtt <[email protected]>

---------

Signed-off-by: Bernhard Bermeitinger <[email protected]>
Co-authored-by: bb010g <[email protected]>
Co-authored-by: Simon <[email protected]>
Co-authored-by: bbhtt <[email protected]>
signal-desktop.sh Show resolved Hide resolved
esac

if [[ "${SIGNAL_PASSWORD_STORE}" == "basic" ]]; then
if [[ -f "${XDG_CACHE_HOME}"/warning-shown ]]; then
Copy link
Contributor

@bbhtt bbhtt Sep 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition won't work, this will always be true if you stay on basic. After the first time as the file exists this removes it on the next launch and on the next one even if you are on basic and have seen the warning it will show up again. It becomes a cyclic thing.

Copy link
Contributor

@bbhtt bbhtt Sep 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also have to take the rm part out of the first if password store == basic condition.

If someone switches from basic to encrypted and back to basic again the warning should be shown.

rm is piped to true so it doesn't matter if the file previously didn't exist.

@minosimo
Copy link
Contributor

Can we please revert the breaking change while we work on a proper fix?

@bbhtt
Copy link
Contributor

bbhtt commented Sep 27, 2024

This should effectively revert it, what do you want now?

The only issue is that the warning is shown on every other launch instead of once.

@minosimo
Copy link
Contributor

This MR is not ready, I'm simply suggesting reverting #729 immediately as a temporary fix. I don't see a downside in doing so.

@bbhtt
Copy link
Contributor

bbhtt commented Sep 27, 2024

There is no reason to revert #729 now. The environment variable already achieves what the revert would do.

The issue about showing the warning only once needs to be fixed.

@bermeitinger-b
Copy link
Collaborator Author

Could you look at #744 and let's continue the discussion there.

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.

4 participants