From 46c99b575ab45c79e195bc9e9ed75759e814aad1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Sat, 13 Jun 2020 15:55:53 +0200 Subject: [PATCH] Upgrade Wallabag --- .../immae/history/_data/categories.yml | 3 + ... 2020-06-06-new-moteur-de-commentaires.md} | 0 ...orique.md => 2020-06-07-new-historique.md} | 0 .../history/_posts/2020-06-13-maj-wallabag.md | 10 ++++ modules/private/websites/immae/production.nix | 2 +- .../private/websites/tools/tools/default.nix | 8 ++- pkgs/webapps/wallabag/default.nix | 4 +- pkgs/webapps/wallabag/ldap.patch | 58 ++++--------------- 8 files changed, 34 insertions(+), 51 deletions(-) rename modules/private/websites/immae/history/_posts/{2020-06-06-Moteur-de-commentaires.md => 2020-06-06-new-moteur-de-commentaires.md} (100%) rename modules/private/websites/immae/history/_posts/{2020-06-07-historique.md => 2020-06-07-new-historique.md} (100%) create mode 100644 modules/private/websites/immae/history/_posts/2020-06-13-maj-wallabag.md diff --git a/modules/private/websites/immae/history/_data/categories.yml b/modules/private/websites/immae/history/_data/categories.yml index 56ea22f..5c8637f 100644 --- a/modules/private/websites/immae/history/_data/categories.yml +++ b/modules/private/websites/immae/history/_data/categories.yml @@ -2,6 +2,9 @@ - name: Nouveautés color: green +- name: Mises à jour + color: green + - name: Pannes color: red diff --git a/modules/private/websites/immae/history/_posts/2020-06-06-Moteur-de-commentaires.md b/modules/private/websites/immae/history/_posts/2020-06-06-new-moteur-de-commentaires.md similarity index 100% rename from modules/private/websites/immae/history/_posts/2020-06-06-Moteur-de-commentaires.md rename to modules/private/websites/immae/history/_posts/2020-06-06-new-moteur-de-commentaires.md diff --git a/modules/private/websites/immae/history/_posts/2020-06-07-historique.md b/modules/private/websites/immae/history/_posts/2020-06-07-new-historique.md similarity index 100% rename from modules/private/websites/immae/history/_posts/2020-06-07-historique.md rename to modules/private/websites/immae/history/_posts/2020-06-07-new-historique.md diff --git a/modules/private/websites/immae/history/_posts/2020-06-13-maj-wallabag.md b/modules/private/websites/immae/history/_posts/2020-06-13-maj-wallabag.md new file mode 100644 index 0000000..da95010 --- /dev/null +++ b/modules/private/websites/immae/history/_posts/2020-06-13-maj-wallabag.md @@ -0,0 +1,10 @@ +--- +title: "Mise à jour de Wallabag à 2.3.8" +category: Mises à jour +tags: [Wallabag] +date: 2020-06-13 +--- +Wallabag n’était plus en mesure d’ajouter de nouveaux articles depuis +une mise à jour (de php probablement : cf [cette issue sur +github](https://github.com/wallabag/wallabag/issues/3926)). La dernière +version de Wallabag corrige ce problème. diff --git a/modules/private/websites/immae/production.nix b/modules/private/websites/immae/production.nix index ae4abe0..046246d 100644 --- a/modules/private/websites/immae/production.nix +++ b/modules/private/websites/immae/production.nix @@ -22,10 +22,10 @@ in { extraConfig = [ '' Use Stats www.immae.eu + Header always set Strict-Transport-Security "max-age=31536000" Header always set Referrer-Policy "strict-origin-when-cross-origin" - Header always set Strict-Transport-Security "max-age=31536000" RequestHeader set X-Forwarded-Proto "https" RewriteRule ^(.*)$ https://mastodon.immae.eu%{REQUEST_URI} [QSA,L] diff --git a/modules/private/websites/tools/tools/default.nix b/modules/private/websites/tools/tools/default.nix index bffcf84..cdfc7eb 100644 --- a/modules/private/websites/tools/tools/default.nix +++ b/modules/private/websites/tools/tools/default.nix @@ -15,7 +15,11 @@ let env = config.myEnv.tools.kanboard; }; wallabag = pkgs.callPackage ./wallabag.nix { - wallabag = pkgs.webapps.wallabag.override { composerEnv = pkgs.composerEnv.override { php = pkgs.php72; }; }; + wallabag = pkgs.webapps.wallabag.override { + composerEnv = pkgs.composerEnv.override { + php = pkgs.php73.withExtensions(e: pkgs.php73.enabledExtensions ++ [e.tidy]); + }; + }; env = config.myEnv.tools.wallabag; }; yourls = pkgs.callPackage ./yourls.nix { @@ -330,7 +334,7 @@ in { user = "wwwrun"; group = "wwwrun"; settings = wallabag.phpFpm.pool; - phpPackage = pkgs.php72; + phpPackage = pkgs.php73.withExtensions(e: pkgs.php73.enabledExtensions ++ [e.tidy]); }; yourls = { user = "wwwrun"; diff --git a/pkgs/webapps/wallabag/default.nix b/pkgs/webapps/wallabag/default.nix index a437a31..bd420d4 100644 --- a/pkgs/webapps/wallabag/default.nix +++ b/pkgs/webapps/wallabag/default.nix @@ -29,11 +29,11 @@ composerEnv.buildPackage rec { doRemoveVendor = false; # Beware when upgrading, I probably messed up with the migrations table # (due to a psql bug in wallabag) - version = "2.3.6"; + version = "2.3.8"; name = "wallabag-${version}"; src = fetchurl { url = "https://static.wallabag.org/releases/wallabag-release-${version}.tar.gz"; - sha256 = "0m0dy3r94ks5pfxyb9vbgrsm0vrwdl3jd5wqwg4f5vd107lq90q1"; + sha256 = "1sr62hfk2f2rl5by48dg8yd1gchngjnc850as17wr3w287p1kwsq"; }; unpackPhase = '' unpackFile "$src" diff --git a/pkgs/webapps/wallabag/ldap.patch b/pkgs/webapps/wallabag/ldap.patch index 9caf7da..e04dae1 100644 --- a/pkgs/webapps/wallabag/ldap.patch +++ b/pkgs/webapps/wallabag/ldap.patch @@ -134,15 +134,15 @@ index 02afc9ea..48fbb553 100644 pattern: ^/ form_login: diff --git a/composer.json b/composer.json -index 68cfad05..32a3d1a4 100644 +index 0483da1d..e3e47bdc 100644 --- a/composer.json +++ b/composer.json -@@ -85,7 +85,11 @@ - "friendsofsymfony/jsrouting-bundle": "^1.6.3", +@@ -87,7 +87,11 @@ "bdunogier/guzzle-site-authenticator": "^1.0.0", "defuse/php-encryption": "^2.1", -- "html2text/html2text": "^4.1" -+ "html2text/html2text": "^4.1", + "html2text/html2text": "^4.1", +- "sulu/symfony-intl-fix": "^1.0" ++ "sulu/symfony-intl-fix": "^1.0", + "fr3d/ldap-bundle": "^3.0" + }, + "suggest": { @@ -151,21 +151,12 @@ index 68cfad05..32a3d1a4 100644 "require-dev": { "doctrine/doctrine-fixtures-bundle": "~2.2", diff --git a/composer.lock b/composer.lock -index 251ee081..37795e0b 100644 +index b3b0a4c6..8c8a87ee 100644 --- a/composer.lock +++ b/composer.lock -@@ -4,7 +4,7 @@ - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], -- "content-hash": "d2a0bd8408dccdeb7a7455996519829b", -+ "content-hash": "4699d166d03a8e5f70d802d0bc3e6a20", - "packages": [ - { - "name": "bdunogier/guzzle-site-authenticator", @@ -1346,6 +1346,65 @@ ], - "time": "2018-12-14T19:44:53+00:00" + "time": "2019-05-09T11:53:40+00:00" }, + { + "name": "fr3d/ldap-bundle", @@ -229,7 +220,7 @@ index 251ee081..37795e0b 100644 { "name": "friendsofsymfony/jsrouting-bundle", "version": "1.6.3", -@@ -7027,6 +7086,59 @@ +@@ -7069,6 +7128,59 @@ "zf2" ], "time": "2018-04-25T15:33:34+00:00" @@ -289,36 +280,11 @@ index 251ee081..37795e0b 100644 } ], "packages-dev": [ -@@ -7561,12 +7673,12 @@ - "source": { - "type": "git", - "url": "https://github.com/symfony/phpunit-bridge.git", -- "reference": "5dab0d4b2ac99ab22b447b615fdfdc10ec4af3d5" -+ "reference": "d61ec438634e0f234c6bda1c6ee97016bbb0e7a1" - }, - "dist": { - "type": "zip", -- "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/5dab0d4b2ac99ab22b447b615fdfdc10ec4af3d5", -- "reference": "5dab0d4b2ac99ab22b447b615fdfdc10ec4af3d5", -+ "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/d61ec438634e0f234c6bda1c6ee97016bbb0e7a1", -+ "reference": "d61ec438634e0f234c6bda1c6ee97016bbb0e7a1", - "shasum": "" - }, - "require": { -@@ -7619,7 +7731,7 @@ - ], - "description": "Symfony PHPUnit Bridge", - "homepage": "https://symfony.com", -- "time": "2019-01-01T13:45:19+00:00" -+ "time": "2019-01-16T13:27:11+00:00" - }, - { - "name": "symfony/polyfill-php72", diff --git a/scripts/install.sh b/scripts/install.sh -index 8b7ea03f..3a4a33ab 100755 +index affa715f..45254212 100755 --- a/scripts/install.sh +++ b/scripts/install.sh -@@ -26,5 +26,8 @@ ENV=$1 +@@ -37,5 +37,8 @@ fi TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) git checkout $TAG @@ -328,10 +294,10 @@ index 8b7ea03f..3a4a33ab 100755 SYMFONY_ENV=$ENV $COMPOSER_COMMAND install --no-dev -o --prefer-dist php bin/console wallabag:install --env=$ENV diff --git a/scripts/update.sh b/scripts/update.sh -index c62d104a..6259a431 100755 +index 3ef10439..eeee28d6 100755 --- a/scripts/update.sh +++ b/scripts/update.sh -@@ -32,6 +32,9 @@ git fetch origin +@@ -42,6 +42,9 @@ git fetch origin git fetch --tags TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) git checkout $TAG --force -- 2.41.0