diff options
author | Robert Irelan <rirelan@gmail.com> | 2019-02-05 20:44:48 -0800 |
---|---|---|
committer | Robert Irelan <rirelan@gmail.com> | 2019-02-05 23:05:23 -0800 |
commit | eab69d998bf728551b525c00c4f771018da00f1f (patch) | |
tree | f6f566df4d83d0c3dc5112b873cbbe2e34659a63 /nixos/modules/services/web-apps/tt-rss.nix | |
parent | 85ff56cdde104a09b7de6e92fa0d50e836b64688 (diff) | |
download | nixpkgs-eab69d998bf728551b525c00c4f771018da00f1f.tar nixpkgs-eab69d998bf728551b525c00c4f771018da00f1f.tar.gz nixpkgs-eab69d998bf728551b525c00c4f771018da00f1f.tar.bz2 nixpkgs-eab69d998bf728551b525c00c4f771018da00f1f.tar.lz nixpkgs-eab69d998bf728551b525c00c4f771018da00f1f.tar.xz nixpkgs-eab69d998bf728551b525c00c4f771018da00f1f.tar.zst nixpkgs-eab69d998bf728551b525c00c4f771018da00f1f.zip |
Remove option config.services.tt-rss.checkForUpdates (forced to false)
Force this option to false. Leaving this as true (currently the default) is dangerous. If the TT-RSS installation upgrades itself to a newer version requiring a schema update, the installation will break the next time the TT-RSS systemd service is restarted. Ideally, the installation itself should be immutable (see https://github.com/NixOS/nixpkgs/issues/55300).
Diffstat (limited to 'nixos/modules/services/web-apps/tt-rss.nix')
-rw-r--r-- | nixos/modules/services/web-apps/tt-rss.nix | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/nixos/modules/services/web-apps/tt-rss.nix b/nixos/modules/services/web-apps/tt-rss.nix index 90b35d19ea1..6070182a092 100644 --- a/nixos/modules/services/web-apps/tt-rss.nix +++ b/nixos/modules/services/web-apps/tt-rss.nix @@ -46,7 +46,17 @@ let define('SINGLE_USER_MODE', ${boolToString cfg.singleUserMode}); define('SIMPLE_UPDATE_MODE', ${boolToString cfg.simpleUpdateMode}); - define('CHECK_FOR_UPDATES', ${boolToString cfg.checkForUpdates}); + + // Never check for updates - the running version of the code should be + // controlled entirely by the version of TT-RSS active in the current Nix + // profile. If TT-RSS updates itself to a version requiring a database + // schema upgrade, and then the SystemD tt-rss.service is restarted, the + // old code copied from the Nix store will overwrite the updated version, + // causing the code to detect the need for a schema "upgrade" (since the + // schema version in the database is different than in the code), but the + // update schema operation in TT-RSS will do nothing because the schema + // version in the database is newer than that in the code. + define('CHECK_FOR_UPDATES', false); define('FORCE_ARTICLE_PURGE', ${toString cfg.forceArticlePurge}); define('SESSION_COOKIE_LIFETIME', ${toString cfg.sessionCookieLifetime}); @@ -399,14 +409,6 @@ let ''; }; - checkForUpdates = mkOption { - type = types.bool; - default = true; - description = '' - Check for updates automatically if running Git version - ''; - }; - enableGZipOutput = mkOption { type = types.bool; default = true; @@ -474,6 +476,14 @@ let }; }; + imports = [ + (mkRemovedOptionModule ["services" "tt-rss" "checkForUpdates"] '' + This option was removed because setting this to true will cause TT-RSS + to be unable to start if an automatic update of the code in + services.tt-rss.root leads to a database schema upgrade that is not + supported by the code active in the Nix store. + '') + ]; ###### implementation |