From b65f5d48a6592b2a1a50b352436bc876b1d84ff0 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Tue, 6 Jul 2021 16:57:30 +0200 Subject: [PATCH 1/8] gitea: 1.14.3 -> 1.14.4 ChangeLog: https://github.com/go-gitea/gitea/releases/tag/v1.14.4 (cherry picked from commit 1e7417a55285407c8d57f79c78477c2d16ea4b95) --- pkgs/applications/version-management/gitea/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/gitea/default.nix b/pkgs/applications/version-management/gitea/default.nix index 96f3af51620..258e81acedf 100644 --- a/pkgs/applications/version-management/gitea/default.nix +++ b/pkgs/applications/version-management/gitea/default.nix @@ -16,12 +16,12 @@ with lib; buildGoPackage rec { pname = "gitea"; - version = "1.14.3"; + version = "1.14.4"; # not fetching directly from the git repo, because that lacks several vendor files for the web UI src = fetchurl { url = "https://github.com/go-gitea/gitea/releases/download/v${version}/gitea-src-${version}.tar.gz"; - sha256 = "sha256-ieQxqZO84sYBcCzWYn40tRGLgSs2PpLlcNkI4vFq+wE="; + sha256 = "sha256-sl/Vml8QmwZEAd2PIYWQcP7s6NYeomGJQGKhRiddtoo="; }; unpackPhase = '' From 44c232bbeb22bfd8a4188952c8dc98f1b8d43cb7 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 4 Jun 2021 17:28:20 +0200 Subject: [PATCH 2/8] nixos/postgresqlBackup: Use PATH for readability (cherry picked from commit c586e42763e0f093d16b4b655759cb340171ad42) --- nixos/modules/services/backup/postgresql-backup.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/nixos/modules/services/backup/postgresql-backup.nix b/nixos/modules/services/backup/postgresql-backup.nix index 9da2d522a68..8857335a6e5 100644 --- a/nixos/modules/services/backup/postgresql-backup.nix +++ b/nixos/modules/services/backup/postgresql-backup.nix @@ -14,15 +14,17 @@ let requires = [ "postgresql.service" ]; + path = [ pkgs.coreutils pkgs.gzip config.services.postgresql.package ]; + script = '' umask 0077 # ensure backup is only readable by postgres user if [ -e ${cfg.location}/${db}.sql.gz ]; then - ${pkgs.coreutils}/bin/mv ${cfg.location}/${db}.sql.gz ${cfg.location}/${db}.prev.sql.gz + mv ${cfg.location}/${db}.sql.gz ${cfg.location}/${db}.prev.sql.gz fi ${dumpCmd} | \ - ${pkgs.gzip}/bin/gzip -c > ${cfg.location}/${db}.sql.gz + gzip -c > ${cfg.location}/${db}.sql.gz ''; serviceConfig = { @@ -113,12 +115,12 @@ in { }) (mkIf (cfg.enable && cfg.backupAll) { systemd.services.postgresqlBackup = - postgresqlBackupService "all" "${config.services.postgresql.package}/bin/pg_dumpall"; + postgresqlBackupService "all" "pg_dumpall"; }) (mkIf (cfg.enable && !cfg.backupAll) { systemd.services = listToAttrs (map (db: let - cmd = "${config.services.postgresql.package}/bin/pg_dump ${cfg.pgdumpOptions} ${db}"; + cmd = "pg_dump ${cfg.pgdumpOptions} ${db}"; in { name = "postgresqlBackup-${db}"; value = postgresqlBackupService db cmd; From 809cc5bf28c21fbc4947614fd13ece86730a3233 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 4 Jun 2021 17:34:26 +0200 Subject: [PATCH 3/8] nixos/postgresqlBackup: Only replace backup when successful Previously, a failed backup would always overwrite ${db}.sql.gz, because the bash `>` redirect truncates the file; even if the backup was going to fail. On the next run, the ${db}.prev.sql.gz backup would be overwritten by the bad ${db}.sql.gz. Now, if the backup fails, the ${db}.in-progress.sql.gz is in an unknown state, but ${db}.sql.gz will not be written. On the next run, ${db}.prev.sql.gz (our only good backup) will not be overwritten because ${db}.sql.gz does not exist. (cherry picked from commit 81c8189a841728a813bcde8604b80427fcf33522) --- .../services/backup/postgresql-backup.nix | 6 ++++- nixos/tests/postgresql.nix | 22 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/backup/postgresql-backup.nix b/nixos/modules/services/backup/postgresql-backup.nix index 8857335a6e5..f658eb756f7 100644 --- a/nixos/modules/services/backup/postgresql-backup.nix +++ b/nixos/modules/services/backup/postgresql-backup.nix @@ -17,6 +17,8 @@ let path = [ pkgs.coreutils pkgs.gzip config.services.postgresql.package ]; script = '' + set -e -o pipefail + umask 0077 # ensure backup is only readable by postgres user if [ -e ${cfg.location}/${db}.sql.gz ]; then @@ -24,7 +26,9 @@ let fi ${dumpCmd} | \ - gzip -c > ${cfg.location}/${db}.sql.gz + gzip -c > ${cfg.location}/${db}.in-progress.sql.gz + + mv ${cfg.location}/${db}.in-progress.sql.gz ${cfg.location}/${db}.sql.gz ''; serviceConfig = { diff --git a/nixos/tests/postgresql.nix b/nixos/tests/postgresql.nix index 091e64294ac..0369a070719 100644 --- a/nixos/tests/postgresql.nix +++ b/nixos/tests/postgresql.nix @@ -73,8 +73,30 @@ let machine.succeed( "systemctl start ${backupService}.service", "zcat /var/backup/postgresql/${backupName}.sql.gz | grep 'ok'", + "ls -hal /var/backup/postgresql/ >/dev/console", "stat -c '%a' /var/backup/postgresql/${backupName}.sql.gz | grep 600", ) + with subtest("Backup service fails gracefully"): + # Sabotage the backup process + machine.succeed("rm /run/postgresql/.s.PGSQL.5432") + machine.fail( + "systemctl start ${backupService}.service", + ) + machine.succeed( + "ls -hal /var/backup/postgresql/ >/dev/console", + "zcat /var/backup/postgresql/${backupName}.prev.sql.gz | grep 'ok'", + "stat /var/backup/postgresql/${backupName}.in-progress.sql.gz", + ) + # In a previous version, the second run would overwrite prev.sql.gz, + # so we test a second run as well. + machine.fail( + "systemctl start ${backupService}.service", + ) + machine.succeed( + "stat /var/backup/postgresql/${backupName}.in-progress.sql.gz", + "zcat /var/backup/postgresql/${backupName}.prev.sql.gz | grep 'ok'", + ) + with subtest("Initdb works"): machine.succeed("sudo -u postgres initdb -D /tmp/testpostgres2") From b97454a2e5c9a3245831cb87d0aa80ff24e71a21 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Wed, 7 Jul 2021 04:20:00 +0000 Subject: [PATCH 4/8] ruby: update RVM patchsets (cherry picked from commit 6d4b46a56d98c2d8601dedecf1542dda3df51774) --- pkgs/development/interpreters/ruby/rvm-patchsets.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/ruby/rvm-patchsets.nix b/pkgs/development/interpreters/ruby/rvm-patchsets.nix index 3c2113d608c..88b75a5aa06 100644 --- a/pkgs/development/interpreters/ruby/rvm-patchsets.nix +++ b/pkgs/development/interpreters/ruby/rvm-patchsets.nix @@ -3,6 +3,6 @@ fetchFromGitHub { owner = "skaes"; repo = "rvm-patchsets"; - rev = "28c6469ce841ff3033c376e78a7043009a3bdc5c"; - sha256 = "0kh08hahrwif61sq0qlvgyqiymxi8c8h2dw4s3ln4aq696k4gba9"; + rev = "0251817e2b9d5f73370bbbb12fdf7f7089bd1ac3"; + sha256 = "1biiq5xzzdfb4hr1sgmx14i2nr05xa9w21pc7dl8c5n4f2ilg8ss"; } From 94496bd7da85875d5b7f7529b470354a09452768 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Wed, 7 Jul 2021 04:20:00 +0000 Subject: [PATCH 5/8] ruby_2_6: 2.6.7 -> 2.6.8 https://www.ruby-lang.org/en/news/2021/07/07/ruby-2-6-8-released/ (cherry picked from commit 2d420c15598e5eb65e9a1b8419d5ba00778e30da) --- pkgs/development/interpreters/ruby/default.nix | 6 +++--- pkgs/development/interpreters/ruby/patchsets.nix | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix index 9179866fe9e..e010c1eb09d 100644 --- a/pkgs/development/interpreters/ruby/default.nix +++ b/pkgs/development/interpreters/ruby/default.nix @@ -253,10 +253,10 @@ let in { ruby_2_6 = generic { - version = rubyVersion "2" "6" "7" ""; + version = rubyVersion "2" "6" "8" ""; sha256 = { - src = "17m9qxalwhk95dw1qhgxbvr3kkcxs3h86yirfg5mwj35gy5pw8p4"; - git = "08gvknanwdfsaj3lmcv1bdqjf9lldphzi7gmlv3cfa8ligx2vbap"; + src = "0vfam28ifl6h2wxi6p70j0hm3f1pvsp432hf75m5j25wfy2vf1qq"; + git = "0rc3n6sk8632r0libpv8jwslc7852hgk64rvbdrspc9razjwx21c"; }; }; diff --git a/pkgs/development/interpreters/ruby/patchsets.nix b/pkgs/development/interpreters/ruby/patchsets.nix index 964e0a4e28a..0575cb626b6 100644 --- a/pkgs/development/interpreters/ruby/patchsets.nix +++ b/pkgs/development/interpreters/ruby/patchsets.nix @@ -1,7 +1,7 @@ { patchSet, useRailsExpress, ops, patchLevel, fetchpatch }: { - "2.6.7" = ops useRailsExpress [ + "2.6.8" = ops useRailsExpress [ "${patchSet}/patches/ruby/2.6/head/railsexpress/01-fix-broken-tests-caused-by-ad.patch" "${patchSet}/patches/ruby/2.6/head/railsexpress/02-improve-gc-stats.patch" "${patchSet}/patches/ruby/2.6/head/railsexpress/03-more-detailed-stacktrace.patch" From 3e4c3a12d8cd9001a81013b42d9190cf954c4db3 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Wed, 7 Jul 2021 04:20:00 +0000 Subject: [PATCH 6/8] ruby_2_7: 2.7.3 -> 2.7.4 https://www.ruby-lang.org/en/news/2021/07/07/ruby-2-7-4-released/ (cherry picked from commit 5f9f17cc11caa07e4a9faa68d308d86e16d0f930) --- pkgs/development/interpreters/ruby/default.nix | 6 +++--- pkgs/development/interpreters/ruby/patchsets.nix | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix index e010c1eb09d..d37aedd6f51 100644 --- a/pkgs/development/interpreters/ruby/default.nix +++ b/pkgs/development/interpreters/ruby/default.nix @@ -261,10 +261,10 @@ in { }; ruby_2_7 = generic { - version = rubyVersion "2" "7" "3" ""; + version = rubyVersion "2" "7" "4" ""; sha256 = { - src = "0f2kwn98n9h9hy1fd547s7d0a7ga8jjm4nh294bwiwnq65gaj9c9"; - git = "0vxg9w4dgpw2ig5snxmkahvzdp2yh71w8qm49g35d5hqdsql7yrx"; + src = "0nxwkxh7snmjqf787qsp4i33mxd1rbf9yzyfiky5k230i680jhrh"; + git = "1prsrqwkla4k5japlm54k0j700j4824rg8z8kpswr9r3swrmrf5p"; }; }; diff --git a/pkgs/development/interpreters/ruby/patchsets.nix b/pkgs/development/interpreters/ruby/patchsets.nix index 0575cb626b6..7128c88dee1 100644 --- a/pkgs/development/interpreters/ruby/patchsets.nix +++ b/pkgs/development/interpreters/ruby/patchsets.nix @@ -6,7 +6,7 @@ "${patchSet}/patches/ruby/2.6/head/railsexpress/02-improve-gc-stats.patch" "${patchSet}/patches/ruby/2.6/head/railsexpress/03-more-detailed-stacktrace.patch" ]; - "2.7.3" = ops useRailsExpress [ + "2.7.4" = ops useRailsExpress [ "${patchSet}/patches/ruby/2.7/head/railsexpress/01-fix-broken-tests-caused-by-ad.patch" "${patchSet}/patches/ruby/2.7/head/railsexpress/02-improve-gc-stats.patch" "${patchSet}/patches/ruby/2.7/head/railsexpress/03-more-detailed-stacktrace.patch" From 752d341f68000123500e5fc75e56dbe4cd844c2d Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Wed, 7 Jul 2021 04:20:00 +0000 Subject: [PATCH 7/8] ruby_3_0: 3.0.1 -> 3.0.2 https://www.ruby-lang.org/en/news/2021/07/07/ruby-3-0-2-released/ (cherry picked from commit afd61a60693e1ad936b8e90bf3f88d438fcafd79) --- pkgs/development/interpreters/ruby/default.nix | 6 +++--- pkgs/development/interpreters/ruby/patchsets.nix | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix index d37aedd6f51..ba132acf722 100644 --- a/pkgs/development/interpreters/ruby/default.nix +++ b/pkgs/development/interpreters/ruby/default.nix @@ -269,10 +269,10 @@ in { }; ruby_3_0 = generic { - version = rubyVersion "3" "0" "1" ""; + version = rubyVersion "3" "0" "2" ""; sha256 = { - src = "09vpnxxcxc46qv40xbxr9xkdpbgb0imdy25l2vpsxxlr47djb61n"; - git = "0vricyhnnczcbsgvz65pdhi9yx1i34zarbjlc5y5mcmj01y9r7ar"; + src = "1wg6yyzc6arzikcy48igqbxfcdc79bmfpiyfi9m9j1lzmphdx1ah"; + git = "1kbkxqichi11vli080jgyvjf2xgnlbl9l2f2n1hv4s8b31gjib3r"; }; }; } diff --git a/pkgs/development/interpreters/ruby/patchsets.nix b/pkgs/development/interpreters/ruby/patchsets.nix index 7128c88dee1..5c2992bb859 100644 --- a/pkgs/development/interpreters/ruby/patchsets.nix +++ b/pkgs/development/interpreters/ruby/patchsets.nix @@ -11,7 +11,7 @@ "${patchSet}/patches/ruby/2.7/head/railsexpress/02-improve-gc-stats.patch" "${patchSet}/patches/ruby/2.7/head/railsexpress/03-more-detailed-stacktrace.patch" ]; - "3.0.1" = ops useRailsExpress [ + "3.0.2" = ops useRailsExpress [ "${patchSet}/patches/ruby/3.0/head/railsexpress/01-improve-gc-stats.patch" "${patchSet}/patches/ruby/3.0/head/railsexpress/02-malloc-trim.patch" ]; From b7853679fcf4cd807078ddab8d43ef8501e341d6 Mon Sep 17 00:00:00 2001 From: Lara Date: Wed, 7 Jul 2021 21:10:53 +0000 Subject: [PATCH 8/8] nixos/doc: Fix synopsis for nixos-rebuild(8) (cherry picked from commit 22a78740241d8c35bf8c43c4731bc5b84386b5ea) --- nixos/doc/manual/man-nixos-rebuild.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/nixos/doc/manual/man-nixos-rebuild.xml b/nixos/doc/manual/man-nixos-rebuild.xml index d0ff81c1dbb..b49ec698049 100644 --- a/nixos/doc/manual/man-nixos-rebuild.xml +++ b/nixos/doc/manual/man-nixos-rebuild.xml @@ -104,7 +104,23 @@ name + + + + host + + + + host + + + + + + + +