Merge staging-next into staging

This commit is contained in:
github-actions[bot] 2022-06-30 00:02:48 +00:00 committed by GitHub
commit 965570c2ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
37 changed files with 980 additions and 59 deletions

View File

@ -9821,6 +9821,17 @@
githubId = 645664;
name = "Philippe Hürlimann";
};
phaer = {
name = "Paul Haerle";
email = "nix@phaer.org";
matrix = "@phaer:matrix.org";
github = "phaer";
githubId = 101753;
keys = [{
fingerprint = "5D69 CF04 B7BC 2BC1 A567 9267 00BC F29B 3208 0700";
}];
};
philandstuff = {
email = "philip.g.potter@gmail.com";
github = "philandstuff";

View File

@ -1057,6 +1057,7 @@
./services/web-apps/gerrit.nix
./services/web-apps/gotify-server.nix
./services/web-apps/grocy.nix
./services/web-apps/healthchecks.nix
./services/web-apps/hedgedoc.nix
./services/web-apps/hledger-web.nix
./services/web-apps/icingaweb2/icingaweb2.nix

View File

@ -45,8 +45,11 @@ in {
after = ["network-online.target"];
path = [ config.nix.package ];
wantedBy = [ "multi-user.target" ];
# don't restart while changing
reloadIfChanged = true;
restartIfChanged = false;
unitConfig.X-StopOnRemoval = false;
environment.USER = "root";
serviceConfig = {
Restart = "on-failure";

View File

@ -0,0 +1,249 @@
{ config, lib, pkgs, buildEnv, ... }:
with lib;
let
defaultUser = "healthchecks";
cfg = config.services.healthchecks;
pkg = cfg.package;
boolToPython = b: if b then "True" else "False";
environment = {
PYTHONPATH = pkg.pythonPath;
STATIC_ROOT = cfg.dataDir + "/static";
DB_NAME = "${cfg.dataDir}/healthchecks.sqlite";
} // cfg.settings;
environmentFile = pkgs.writeText "healthchecks-environment" (lib.generators.toKeyValue { } environment);
healthchecksManageScript = with pkgs; (writeShellScriptBin "healthchecks-manage" ''
if [[ "$USER" != "${cfg.user}" ]]; then
echo "please run as user 'healtchecks'." >/dev/stderr
exit 1
fi
export $(cat ${environmentFile} | xargs);
exec ${pkg}/opt/healthchecks/manage.py "$@"
'');
in
{
options.services.healthchecks = {
enable = mkEnableOption "healthchecks" // {
description = ''
Enable healthchecks.
It is expected to be run behind a HTTP reverse proxy.
'';
};
package = mkOption {
default = pkgs.healthchecks;
defaultText = literalExpression "pkgs.healthchecks";
type = types.package;
description = "healthchecks package to use.";
};
user = mkOption {
default = defaultUser;
type = types.str;
description = ''
User account under which healthchecks runs.
<note><para>
If left as the default value this user will automatically be created
on system activation, otherwise you are responsible for
ensuring the user exists before the healthchecks service starts.
</para></note>
'';
};
group = mkOption {
default = defaultUser;
type = types.str;
description = ''
Group account under which healthchecks runs.
<note><para>
If left as the default value this group will automatically be created
on system activation, otherwise you are responsible for
ensuring the group exists before the healthchecks service starts.
</para></note>
'';
};
listenAddress = mkOption {
type = types.str;
default = "localhost";
description = "Address the server will listen on.";
};
port = mkOption {
type = types.port;
default = 8000;
description = "Port the server will listen on.";
};
dataDir = mkOption {
type = types.str;
default = "/var/lib/healthchecks";
description = ''
The directory used to store all data for healthchecks.
<note><para>
If left as the default value this directory will automatically be created before
the healthchecks server starts, otherwise you are responsible for ensuring the
directory exists with appropriate ownership and permissions.
</para></note>
'';
};
settings = lib.mkOption {
description = ''
Environment variables which are read by healthchecks <literal>(local)_settings.py</literal>.
Settings which are explictly covered in options bewlow, are type-checked and/or transformed
before added to the environment, everything else is passed as a string.
See <link xlink:href="">https://healthchecks.io/docs/self_hosted_configuration/</link>
for a full documentation of settings.
We add two variables to this list inside the packages <literal>local_settings.py.</literal>
- STATIC_ROOT to set a state directory for dynamically generated static files.
- SECRET_KEY_FILE to read SECRET_KEY from a file at runtime and keep it out of /nix/store.
'';
type = types.submodule {
freeformType = types.attrsOf types.str;
options = {
ALLOWED_HOSTS = lib.mkOption {
type = types.listOf types.str;
default = [ "*" ];
description = "The host/domain names that this site can serve.";
apply = lib.concatStringsSep ",";
};
SECRET_KEY_FILE = mkOption {
type = types.path;
description = "Path to a file containing the secret key.";
};
DEBUG = mkOption {
type = types.bool;
default = false;
description = "Enable debug mode.";
apply = boolToPython;
};
REGISTRATION_OPEN = mkOption {
type = types.bool;
default = false;
description = ''
A boolean that controls whether site visitors can create new accounts.
Set it to false if you are setting up a private Healthchecks instance,
but it needs to be publicly accessible (so, for example, your cloud
services can send pings to it).
If you close new user registration, you can still selectively invite
users to your team account.
'';
apply = boolToPython;
};
};
};
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ healthchecksManageScript ];
systemd.targets.healthchecks = {
description = "Target for all Healthchecks services";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" "network-online.target" ];
};
systemd.services =
let
commonConfig = {
WorkingDirectory = cfg.dataDir;
User = cfg.user;
Group = cfg.group;
EnvironmentFile = environmentFile;
StateDirectory = mkIf (cfg.dataDir == "/var/lib/healthchecks") "healthchecks";
StateDirectoryMode = mkIf (cfg.dataDir == "/var/lib/healthchecks") "0750";
};
in
{
healthchecks-migration = {
description = "Healthchecks migrations";
wantedBy = [ "healthchecks.target" ];
serviceConfig = commonConfig // {
Restart = "on-failure";
Type = "oneshot";
ExecStart = ''
${pkg}/opt/healthchecks/manage.py migrate
'';
};
};
healthchecks = {
description = "Healthchecks WSGI Service";
wantedBy = [ "healthchecks.target" ];
after = [ "healthchecks-migration.service" ];
preStart = ''
${pkg}/opt/healthchecks/manage.py collectstatic --no-input
${pkg}/opt/healthchecks/manage.py remove_stale_contenttypes --no-input
${pkg}/opt/healthchecks/manage.py compress
'';
serviceConfig = commonConfig // {
Restart = "always";
ExecStart = ''
${pkgs.python3Packages.gunicorn}/bin/gunicorn hc.wsgi \
--bind ${cfg.listenAddress}:${toString cfg.port} \
--pythonpath ${pkg}/opt/healthchecks
'';
};
};
healthchecks-sendalerts = {
description = "Healthchecks Alert Service";
wantedBy = [ "healthchecks.target" ];
after = [ "healthchecks.service" ];
serviceConfig = commonConfig // {
Restart = "always";
ExecStart = ''
${pkg}/opt/healthchecks/manage.py sendalerts
'';
};
};
healthchecks-sendreports = {
description = "Healthchecks Reporting Service";
wantedBy = [ "healthchecks.target" ];
after = [ "healthchecks.service" ];
serviceConfig = commonConfig // {
Restart = "always";
ExecStart = ''
${pkg}/opt/healthchecks/manage.py sendreports --loop
'';
};
};
};
users.users = optionalAttrs (cfg.user == defaultUser) {
${defaultUser} =
{
description = "healthchecks service owner";
isSystemUser = true;
group = defaultUser;
};
};
users.groups = optionalAttrs (cfg.user == defaultUser) {
${defaultUser} =
{
members = [ defaultUser ];
};
};
};
}

View File

@ -253,9 +253,20 @@ in
'';
};
};
systemd.services.prosody.serviceConfig = mkIf cfg.prosody.enable {
EnvironmentFile = [ "/var/lib/jitsi-meet/secrets-env" ];
SupplementaryGroups = [ "jitsi-meet" ];
systemd.services.prosody = mkIf cfg.prosody.enable {
preStart = let
videobridgeSecret = if cfg.videobridge.passwordFile != null then cfg.videobridge.passwordFile else "/var/lib/jitsi-meet/videobridge-secret";
in ''
${config.services.prosody.package}/bin/prosodyctl register focus auth.${cfg.hostName} "$(cat /var/lib/jitsi-meet/jicofo-user-secret)"
${config.services.prosody.package}/bin/prosodyctl register jvb auth.${cfg.hostName} "$(cat ${videobridgeSecret})"
${config.services.prosody.package}/bin/prosodyctl mod_roster_command subscribe focus.${cfg.hostName} focus@auth.${cfg.hostName}
${config.services.prosody.package}/bin/prosodyctl register jibri auth.${cfg.hostName} "$(cat /var/lib/jitsi-meet/jibri-auth-secret)"
${config.services.prosody.package}/bin/prosodyctl register recorder recorder.${cfg.hostName} "$(cat /var/lib/jitsi-meet/jibri-recorder-secret)"
'';
serviceConfig = {
EnvironmentFile = [ "/var/lib/jitsi-meet/secrets-env" ];
SupplementaryGroups = [ "jitsi-meet" ];
};
};
users.groups.jitsi-meet = {};
@ -266,14 +277,12 @@ in
systemd.services.jitsi-meet-init-secrets = {
wantedBy = [ "multi-user.target" ];
before = [ "jicofo.service" "jitsi-videobridge2.service" ] ++ (optional cfg.prosody.enable "prosody.service");
path = [ config.services.prosody.package ];
serviceConfig = {
Type = "oneshot";
};
script = let
secrets = [ "jicofo-component-secret" "jicofo-user-secret" "jibri-auth-secret" "jibri-recorder-secret" ] ++ (optional (cfg.videobridge.passwordFile == null) "videobridge-secret");
videobridgeSecret = if cfg.videobridge.passwordFile != null then cfg.videobridge.passwordFile else "/var/lib/jitsi-meet/videobridge-secret";
in
''
cd /var/lib/jitsi-meet
@ -291,12 +300,6 @@ in
chmod 640 secrets-env
''
+ optionalString cfg.prosody.enable ''
prosodyctl register focus auth.${cfg.hostName} "$(cat /var/lib/jitsi-meet/jicofo-user-secret)"
prosodyctl register jvb auth.${cfg.hostName} "$(cat ${videobridgeSecret})"
prosodyctl mod_roster_command subscribe focus.${cfg.hostName} focus@auth.${cfg.hostName}
prosodyctl register jibri auth.${cfg.hostName} "$(cat /var/lib/jitsi-meet/jibri-auth-secret)"
prosodyctl register recorder recorder.${cfg.hostName} "$(cat /var/lib/jitsi-meet/jibri-recorder-secret)"
# generate self-signed certificates
if [ ! -f /var/lib/jitsi-meet.crt ]; then
${getBin pkgs.openssl}/bin/openssl req \

View File

@ -203,6 +203,7 @@ in {
haste-server = handleTest ./haste-server.nix {};
haproxy = handleTest ./haproxy.nix {};
hardened = handleTest ./hardened.nix {};
healthchecks = handleTest ./web-apps/healthchecks.nix {};
hbase1 = handleTest ./hbase.nix { package=pkgs.hbase1; };
hbase2 = handleTest ./hbase.nix { package=pkgs.hbase2; };
hbase3 = handleTest ./hbase.nix { package=pkgs.hbase3; };

View File

@ -33,9 +33,6 @@ import ./make-test-python.nix ({ pkgs, ... }: {
server.wait_for_unit("nginx.service")
server.wait_for_unit("prosody.service")
server.wait_until_succeeds(
"journalctl -b -u jitsi-videobridge2 -o cat | grep -q 'Performed a successful health check'"
)
server.wait_until_succeeds(
"journalctl -b -u prosody -o cat | grep -q 'Authenticated as focus@auth.server'"
)

View File

@ -0,0 +1,42 @@
import ../make-test-python.nix ({ lib, pkgs, ... }: {
name = "healthchecks";
meta = with lib.maintainers; {
maintainers = [ phaer ];
};
nodes.machine = { ... }: {
services.healthchecks = {
enable = true;
settings = {
SITE_NAME = "MyUniqueInstance";
COMPRESS_ENABLED = "True";
SECRET_KEY_FILE = pkgs.writeText "secret"
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
};
};
};
testScript = ''
machine.start()
machine.wait_for_unit("healthchecks.target")
machine.wait_until_succeeds("journalctl --since -1m --unit healthchecks --grep Listening")
with subtest("Home screen loads"):
machine.succeed(
"curl -sSfL http://localhost:8000 | grep '<title>Sign In'"
)
with subtest("Setting SITE_NAME via freeform option works"):
machine.succeed(
"curl -sSfL http://localhost:8000 | grep 'MyUniqueInstance</title>'"
)
with subtest("Manage script works"):
# Should fail if not called by healthchecks user
machine.fail("echo 'print(\"foo\")' | healthchecks-manage help")
# "shell" sucommand should succeed, needs python in PATH.
assert "foo\n" == machine.succeed("echo 'print(\"foo\")' | sudo -u healthchecks healthchecks-manage shell")
'';
})

View File

@ -2,13 +2,13 @@
python3Packages.buildPythonApplication rec {
pname = "pyradio";
version = "0.8.9.20";
version = "0.8.9.21";
src = fetchFromGitHub {
owner = "coderholic";
repo = pname;
rev = "refs/tags/${version}";
sha256 = "sha256-wSu6vTvBkH7vC2c+jj6zaRaR1Poarsgxa5i2mN0dnoE=";
sha256 = "sha256-uaQG840R4twPkE3GYLpcF0MHVH5JaLn5CSAd1DrNOvQ=";
};
nativeBuildInputs = [ installShellFiles ];

View File

@ -4,7 +4,6 @@
, cmake
, curl
, dbus
, epoxy
, fetchFromGitHub
, flac
, gtk3
@ -13,6 +12,7 @@
, libarchive
, libdatrie
, libelf
, libepoxy
, libexif
, libogg
, libopus
@ -54,7 +54,6 @@ stdenv.mkDerivation rec {
at-spi2-core
curl
dbus
epoxy
flac
gtk3
jasper
@ -62,6 +61,7 @@ stdenv.mkDerivation rec {
libarchive
libdatrie
libelf
libepoxy
libexif
libogg
libopus

View File

@ -12,7 +12,7 @@ in
pdfstudio = callPackage ./common.nix rec {
pname = program;
year = "2021";
version = "${year}.1.3";
version = "${year}.2.0";
desktopName = "PDF Studio";
longDescription = ''
PDF Studio is an easy to use, full-featured PDF editing software. This is the standard/pro edition, which requires a license. For the free PDF Studio Viewer see the package pdfstudioviewer.
@ -22,21 +22,21 @@ in
];
src = fetchurl {
url = makeurl { inherit pname year version; };
sha256 = "sha256-2az8/slWeLY7l7dCwyTaT18KFfvsO71vJFDZEvbDHGM=";
sha256 = "sha256-wQgVWz2kS+XkrqvCAUishizfDrCwGyVDAAU4Yzj4uYU=";
};
};
pdfstudioviewer = callPackage ./common.nix rec {
pname = program;
year = "2021";
version = "${year}.1.3";
version = "${year}.2.0";
desktopName = "PDF Studio Viewer";
longDescription = ''
PDF Studio Viewer is an easy to use, full-featured PDF editing software. This is the free edition. For the standard/pro edition, see the package pdfstudio.
'';
src = fetchurl {
url = makeurl { inherit pname year version; };
sha256 = "sha256-kd+rQruBL0fudmc30agRO/XV97l/6unqU0GK25yhOzI=";
sha256 = "sha256-RjVfl3wRK4bqNwSZr2R0CNx4urHTL0QLmKdogEnySWU=";
};
};
}.${program}

View File

@ -169,8 +169,8 @@ rec {
mkTerraform = attrs: pluggable (generic attrs);
terraform_1 = mkTerraform {
version = "1.2.3";
sha256 = "sha256-hkPlufjlvmI5tKz1VTY5RztuDKEsgjrLR+f7HRrJmkA=";
version = "1.2.4";
sha256 = "sha256-FpRn0cFO3/CKdFDeAIu02Huez4Jpunpf6QH9KFVn2lQ=";
vendorSha256 = "sha256-1RKnNF3NC0fGiU2VKz43UBGP33QrLxESVuH6IV6kYqA=";
patches = [ ./provider-path-0_15.patch ];
passthru = {

View File

@ -101,7 +101,7 @@ stdenv.mkDerivation rec {
buildPhase = ''
export HOME=$TMPDIR
runHook preBuild
npm run build --no-update-notifier -- --jCmd=$NIX_BUILD_CORES ttf::$pname
npm run build --no-update-notifier -- --jCmd=$NIX_BUILD_CORES ttf::$pname >/dev/null
runHook postBuild
'';

View File

@ -1,17 +1,15 @@
{ lib, stdenv
, fetchgit
, unstableGitUpdater
, fetchzip
, callPackage
}:
stdenv.mkDerivation rec {
pname = "qbe";
version = "unstable-2022-04-11";
version = "1.0";
src = fetchgit {
url = "git://c9x.me/qbe.git";
rev = "2caa26e388b1c904d2f12fb09f84df7e761d8331";
sha256 = "sha256-TNKHKX/PbrNIQJ+Q50KemfcigEBKe7gmJzTjB6ofYL8=";
src = fetchzip {
url = "https://c9x.me/compile/release/qbe-${version}.tar.xz";
sha256 = "sha256-Or6m/y5hb9SlSToBevjhaSbk5Lo5BasbqeJmKd1QpGM=";
};
makeFlags = [ "PREFIX=$(out)" ];
@ -20,7 +18,6 @@ stdenv.mkDerivation rec {
passthru = {
tests.can-run-hello-world = callPackage ./test-can-run-hello-world.nix {};
updateScript = unstableGitUpdater { };
};
meta = with lib; {

View File

@ -549,7 +549,7 @@ in package-set { inherit pkgs lib callPackage; } self // {
src,
name ? if src?name then "${src.name}-sdist.tar.gz" else "source.tar.gz"
}:
pkgs.runCommandNoCCLocal name
pkgs.runCommandLocal name
{
inherit src;
nativeBuildInputs = [ buildHaskellPackages.cabal-install ];

View File

@ -8,12 +8,12 @@
buildPythonPackage rec {
pname = "cartopy";
version = "0.20.2";
version = "0.20.3";
src = fetchPypi {
inherit version;
pname = "Cartopy";
sha256 = "4d08c198ecaa50a6a6b109d0f14c070e813defc046a83ac5d7ab494f85599e35";
sha256 = "sha256-DWD6Li+9d8TR9rH507WIlmFH8HwbF50tNFcKweG0kAY=";
};
postPatch = ''

View File

@ -9,13 +9,13 @@
buildPythonPackage rec {
pname = "cloup";
version = "0.15.0";
version = "0.15.1";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-Mq7391NiKN7xP5ZRsvY7XvnVr+vu/aFcD21obrjKbHE=";
sha256 = "sha256-gAi0gKd9ihEseHAvZGda299Z+tw545HzuovKycTUzYY=";
};
nativeBuildInputs = [

View File

@ -0,0 +1,36 @@
{ lib
, python
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "cron_descriptor";
version = "1.2.24";
src = fetchFromGitHub {
owner = "Salamek";
repo = "cron-descriptor";
rev = version;
sha256 = "sha256-Gf7n8OiFuaN+8MqsXSg9RBPh2gXfPgjJ4xeuinGYKMw=";
};
# remove tests_require, as we don't do linting anyways
postPatch = ''
sed -i "/'pep8\|flake8\|pep8-naming',/d" setup.py
'';
checkPhase = ''
${python.interpreter} setup.py test
'';
pythonImportsCheck = [ "cron_descriptor" ];
meta = with lib; {
description = "Library that converts cron expressions into human readable strings";
homepage = "https://github.com/Salamek/cron-descriptor";
license = licenses.mit;
maintainers = with maintainers; [ phaer ];
};
}

View File

@ -0,0 +1,28 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "cronsim";
version = "2.1";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-nwlSAbD+y0l9jyVSVShzWeC7nC5RZRD/kAhCi3Nd9xY=";
};
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "cronsim" ];
meta = with lib; {
description = "Cron expression parser and evaluator";
homepage = "https://github.com/cuu508/cronsim";
license = licenses.bsd3;
maintainers = with maintainers; [ phaer ];
};
}

View File

@ -19,7 +19,7 @@
buildPythonPackage rec {
pname = "json-schema-for-humans";
version = "0.41.1";
version = "0.41.3";
format = "pyproject";
disabled = pythonOlder "3.6";
@ -28,7 +28,7 @@ buildPythonPackage rec {
owner = "coveooss";
repo = pname;
rev = "v${version}";
hash = "sha256-JQqoQiug4n1o4PbGT/Ry/Qib11KmaTmkhPtZjhwmpc4=";
hash = "sha256-PEialHz5MJxi4PbtHYpx2CY78KgAKclijbF6cPr36vY=";
};
postPatch = ''

View File

@ -2,11 +2,11 @@
buildPythonPackage rec {
pname = "pygtkspellcheck";
version = "4.0.6";
version = "5.0.0";
src = fetchPypi {
inherit pname version;
sha256 = "0pc3xmv1q775hn4kc1kspvpdn4gm7ix3aw6hz9iy3brfcw6ddcl4";
sha256 = "sha256-kfhoOLnKbA9jH4DUtQw0nATjK21pMNxyAOzYDLQkR4U=";
};
nativeBuildInputs = [ gobject-introspection gtk3 ];

View File

@ -0,0 +1,34 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pypng
, pyzbar
}:
buildPythonPackage rec {
pname = "segno";
version = "1.5.2";
src = fetchFromGitHub {
owner = "heuer";
repo = "segno";
rev = version;
sha256 = "sha256-+OEXG5OvrZ5Ft7IO/7zodf+SgiRF+frwjltrBENNnHo=";
};
checkInputs = [
pytestCheckHook
pypng
pyzbar
];
pythonImportsCheck = [ "segno" ];
meta = with lib; {
description = "QR Code and Micro QR Code encoder";
homepage = "https://github.com/heuer/segno/";
license = licenses.bsd3;
maintainers = with maintainers; [ phaer ];
};
}

View File

@ -15,6 +15,16 @@ stdenv.mkDerivation rec {
};
strictDeps = true;
patches =
# This patch fixes a MIPS-specific bug in patchelf; we want Hydra
# to generate a bootstrap-files tarball for MIPS that includes
# this fix. The patches below can be dropped on the next version bump.
lib.optionals stdenv.targetPlatform.isMips [
# https://github.com/NixOS/patchelf/pull/380
./patches/380.patch
];
setupHook = [ ./setup-hook.sh ];
enableParallelBuilding = true;

View File

@ -0,0 +1,90 @@
From 8db45c6a0c1a4dbbd492ac7fb59c1bca9460fe3e Mon Sep 17 00:00:00 2001
From: Adam Joseph <adam@westernsemico.com>
Date: Sat, 18 Jun 2022 21:45:22 -0700
Subject: [PATCH 1/3] elf.h: resynchronize with glibc elf.h
This commit adds two symbols (SHT_MIPS_XHASH and DT_MIPS_XHASH) found
in glibc, and updates the value of DT_MIPS_NUM. These changes were
made to glibc in 23c1c256ae7b0f010d0fcaff60682b620887b164 on
29-Aug-2019.
---
src/elf.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/elf.h b/src/elf.h
index b3e567c3..702f2e60 100644
--- a/src/elf.h
+++ b/src/elf.h
@@ -1400,6 +1400,7 @@ typedef struct
#define SHT_MIPS_EH_REGION 0x70000027
#define SHT_MIPS_XLATE_OLD 0x70000028
#define SHT_MIPS_PDR_EXCEPTION 0x70000029
+#define SHT_MIPS_XHASH 0x7000002b
/* Legal values for sh_flags field of Elf32_Shdr. */
@@ -1647,7 +1648,9 @@ typedef struct
in a PIE as it stores a relative offset from the address of the tag
rather than an absolute address. */
#define DT_MIPS_RLD_MAP_REL 0x70000035
-#define DT_MIPS_NUM 0x36
+/* GNU-style hash table with xlat. */
+#define DT_MIPS_XHASH 0x70000036
+#define DT_MIPS_NUM 0x37
/* Legal values for DT_MIPS_FLAGS Elf32_Dyn entry. */
From 820da7be8d1e1a49c4831dcb3800ed3b9f11e8a6 Mon Sep 17 00:00:00 2001
From: Adam Joseph <adam@westernsemico.com>
Date: Sat, 18 Jun 2022 21:49:14 -0700
Subject: [PATCH 2/3] patchelf.cc: handle DT_MIPS_XHASH and .MIPS.xhash
glibc changed their ABI in commit
23c1c256ae7b0f010d0fcaff60682b620887b164 on 2019-Aug-29, by changing
the structure of the .gnu.hash data on MIPS and moving it to a
different section. We need to adapt to this change by glibc.
Closes #368
---
src/patchelf.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/patchelf.cc b/src/patchelf.cc
index 6882b288..08585139 100644
--- a/src/patchelf.cc
+++ b/src/patchelf.cc
@@ -990,6 +990,10 @@ void ElfFile<ElfFileParamNames>::rewriteHeaders(Elf_Addr phdrAddress)
// some binaries might this section stripped
// in which case we just ignore the value.
if (shdr) dyn->d_un.d_ptr = (*shdr).get().sh_addr;
+ } else if (d_tag == DT_MIPS_XHASH) {
+ // the .MIPS.xhash section was added to the glibc-ABI
+ // in commit 23c1c256ae7b0f010d0fcaff60682b620887b164
+ dyn->d_un.d_ptr = findSectionHeader(".MIPS.xhash").sh_addr;
} else if (d_tag == DT_JMPREL) {
auto shdr = tryFindSectionHeader(".rel.plt");
if (!shdr) shdr = tryFindSectionHeader(".rela.plt");
From 7b155fda3105ceca5643cacbdd4207c4c4c59cf5 Mon Sep 17 00:00:00 2001
From: Adam Joseph <adam@westernsemico.com>
Date: Sat, 18 Jun 2022 22:44:04 -0700
Subject: [PATCH 3/3] formatting: fix incorrect indentation in previous commit
---
src/patchelf.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/patchelf.cc b/src/patchelf.cc
index 08585139..402b2bed 100644
--- a/src/patchelf.cc
+++ b/src/patchelf.cc
@@ -990,7 +990,7 @@ void ElfFile<ElfFileParamNames>::rewriteHeaders(Elf_Addr phdrAddress)
// some binaries might this section stripped
// in which case we just ignore the value.
if (shdr) dyn->d_un.d_ptr = (*shdr).get().sh_addr;
- } else if (d_tag == DT_MIPS_XHASH) {
+ } else if (d_tag == DT_MIPS_XHASH) {
// the .MIPS.xhash section was added to the glibc-ABI
// in commit 23c1c256ae7b0f010d0fcaff60682b620887b164
dyn->d_un.d_ptr = findSectionHeader(".MIPS.xhash").sh_addr;

View File

@ -2,10 +2,10 @@
stdenv.mkDerivation rec {
pname = "jitsi-meet-prosody";
version = "1.0.5675";
version = "1.0.6260";
src = fetchurl {
url = "https://download.jitsi.org/stable/${pname}_${version}-1_all.deb";
sha256 = "FrafgJcNF3xv985JJ+xOWPtJZFeElIAaIXWdcgheru0=";
sha256 = "ZUfyEYAU4YEYXBoM+tEZ6SAhqlNcsmxnKw8WEv0gy7M=";
};
dontBuild = true;

View File

@ -2,10 +2,10 @@
let
pname = "jicofo";
version = "1.0-832";
version = "1.0-900";
src = fetchurl {
url = "https://download.jitsi.org/stable/${pname}_${version}-1_all.deb";
sha256 = "ZSzxD4RCsIkNtB4agBRZkzbJOi6ttzlc4Qw5n0t5syc=";
sha256 = "tAuWhu1DdasOuLIz9/Ox1n1XcFWm5qnTVr6FpdKpwbE=";
};
in
stdenv.mkDerivation {

View File

@ -2,10 +2,10 @@
let
pname = "jitsi-videobridge2";
version = "2.1-595-g3637fda4";
version = "2.2-9-g8cded16e";
src = fetchurl {
url = "https://download.jitsi.org/stable/${pname}_${version}-1_all.deb";
sha256 = "vwn9C8M3wwiIqwxAu1MDe2ra2SCQ2Hssco5J/xUFoKM=";
sha256 = "L9h+qYV/W2wPzycfDGC4AXpTl7wlulyt2KryA+Tb/YU=";
};
in
stdenv.mkDerivation {

View File

@ -0,0 +1,84 @@
{ lib
, writeText
, fetchFromGitHub
, nixosTests
, python3
}:
let
py = python3.override {
packageOverrides = final: prev: {
django = prev.django_4;
fido2 = prev.fido2.overridePythonAttrs (old: rec {
version = "0.9.3";
src = prev.fetchPypi {
pname = "fido2";
inherit version;
sha256 = "sha256-tF6JphCc/Lfxu1E3dqotZAjpXEgi+DolORi5RAg0Zuw=";
};
});
};
};
in
py.pkgs.buildPythonApplication rec {
pname = "healthchecks";
version = "2.2.1";
format = "other";
src = fetchFromGitHub {
owner = "healthchecks";
repo = pname;
rev = "v${version}";
sha256 = "sha256-C+NUvs5ijbj/l8G1sjSXvUJDNSOTVFAStfS5KtYFpUs=";
};
propagatedBuildInputs = with py.pkgs; [
apprise
cffi
cron-descriptor
cronsim
cryptography
django
django_compressor
fido2
minio
psycopg2
py
pyotp
requests
segno
statsd
whitenoise
];
localSettings = writeText "local_settings.py" ''
import os
STATIC_ROOT = os.getenv("STATIC_ROOT")
SECRET_KEY_FILE = os.getenv("SECRET_KEY_FILE")
if SECRET_KEY_FILE:
with open(SECRET_KEY_FILE, "r") as file:
SECRET_KEY = file.readline()
'';
installPhase = ''
mkdir -p $out/opt/healthchecks
cp -r . $out/opt/healthchecks
chmod +x $out/opt/healthchecks/manage.py
cp ${localSettings} $out/opt/healthchecks/hc/local_settings.py
'';
passthru = {
# PYTHONPATH of all dependencies used by the package
pythonPath = py.pkgs.makePythonPath propagatedBuildInputs;
tests = {
inherit (nixosTests) healthchecks;
};
};
meta = with lib; {
homepage = "https://github.com/healthchecks/healthchecks";
description = "A cron monitoring tool written in Python & Django ";
license = licenses.bsd3;
maintainers = with maintainers; [ phaer ];
};
}

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "jitsi-meet";
version = "1.0.6155";
version = "1.0.6260";
src = fetchurl {
url = "https://download.jitsi.org/jitsi-meet/src/jitsi-meet-${version}.tar.bz2";
sha256 = "baCRVYe1z2uH3vSb5KbWs0y4KyQYO3JpTyoGFZIZQqo=";
sha256 = "Y1ELKdFdbnq20yUt4XoXmstJm8uI8EBGIFOvFWf+5Uw=";
};
dontBuild = true;

View File

@ -18,11 +18,11 @@
stdenv.mkDerivation rec {
pname = "btrbk";
version = "0.32.1";
version = "0.32.2";
src = fetchurl {
url = "https://digint.ch/download/btrbk/releases/${pname}-${version}.tar.xz";
sha256 = "flQf1KTybPImDoD+iNe+P+u1rOiYxXjQoltuGPWuX3g=";
sha256 = "f5TDh/kkHbXKNmSlh73WQ+ft76RHfIDb4O+S6hKQID4=";
};
nativeBuildInputs = [ asciidoctor makeWrapper ];

View File

@ -33,7 +33,12 @@ stdenv.mkDerivation rec {
ncurses
];
patchPhase = ''
# fixes build against xfsprogs >= 5.18
# taken from https://lore.kernel.org/linux-xfs/20220203174540.GT8313@magnolia/
# should be included upsteam next release
patches = [ ./remove-dmapapi.patch ];
postPatch = ''
substituteInPlace Makefile \
--replace "cp include/install-sh ." "cp -f include/install-sh ."
'';

View File

@ -0,0 +1,322 @@
diff --git a/doc/xfsdump.html b/doc/xfsdump.html
index d4d157f..2c9324b 100644
--- a/doc/xfsdump.html
+++ b/doc/xfsdump.html
@@ -1092,7 +1092,6 @@ the size of the hash table.
bool_t p_ownerpr - whether to restore directory owner/group attributes
bool_t p_fullpr - whether restoring a full level 0 non-resumed dump
bool_t p_ignoreorphpr - set if positive subtree or interactive
- bool_t p_restoredmpr - restore DMI event settings
</pre>
<p>
The hash table maps the inode number to the tree node. It is a
diff --git a/po/de.po b/po/de.po
index 62face8..bdf47d1 100644
--- a/po/de.po
+++ b/po/de.po
@@ -3972,11 +3972,6 @@ msgstr ""
msgid "no additional media objects needed\n"
msgstr "keine zusätzlichen Mediendateien benötigt\n"
-#: .././restore/content.c:9547
-#, c-format
-msgid "fssetdm_by_handle of %s failed %s\n"
-msgstr "fssetdm_by_handle von %s fehlgeschlagen %s\n"
-
#: .././restore/content.c:9566
#, c-format
msgid "%s quota information written to '%s'\n"
diff --git a/po/pl.po b/po/pl.po
index 3cba8d6..ba25420 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -3455,11 +3455,6 @@ msgstr "nie są potrzebne dodatkowe obiekty nośnika\n"
msgid "path_to_handle of %s failed:%s\n"
msgstr "path_to_handle na %s nie powiodło się: %s\n"
-#: .././restore/content.c:9723
-#, c-format
-msgid "fssetdm_by_handle of %s failed %s\n"
-msgstr "fssetdm_by_handle na %s nie powiodło się: %s\n"
-
#: .././restore/content.c:9742
#, c-format
msgid "%s quota information written to '%s'\n"
diff --git a/restore/content.c b/restore/content.c
index 6b22965..e9b0a07 100644
--- a/restore/content.c
+++ b/restore/content.c
@@ -477,9 +477,6 @@ struct pers {
/* how many pages following the header page are reserved
* for the subtree descriptors
*/
- bool_t restoredmpr;
- /* restore DMAPI event settings
- */
bool_t restoreextattrpr;
/* restore extended attributes
*/
@@ -858,7 +855,6 @@ static void partial_reg(ix_t d_index, xfs_ino_t ino, off64_t fsize,
off64_t offset, off64_t sz);
static bool_t partial_check (xfs_ino_t ino, off64_t fsize);
static bool_t partial_check2 (partial_rest_t *isptr, off64_t fsize);
-static int do_fssetdm_by_handle(char *path, fsdmidata_t *fdmp);
static int quotafilecheck(char *type, char *dstdir, char *quotafile);
/* definition of locally defined global variables ****************************/
@@ -894,7 +890,6 @@ content_init(int argc, char *argv[], size64_t vmsz)
bool_t changepr;/* cmd line overwrite inhibit specification */
bool_t interpr; /* cmd line interactive mode requested */
bool_t ownerpr; /* cmd line chown/chmod requested */
- bool_t restoredmpr; /* cmd line restore dm api attrs specification */
bool_t restoreextattrpr; /* cmd line restore extended attr spec */
bool_t sesscpltpr; /* force completion of prev interrupted session */
ix_t stcnt; /* cmd line number of subtrees requested */
@@ -956,7 +951,6 @@ content_init(int argc, char *argv[], size64_t vmsz)
newerpr = BOOL_FALSE;
changepr = BOOL_FALSE;
ownerpr = BOOL_FALSE;
- restoredmpr = BOOL_FALSE;
restoreextattrpr = BOOL_TRUE;
sesscpltpr = BOOL_FALSE;
stcnt = 0;
@@ -1162,8 +1156,11 @@ content_init(int argc, char *argv[], size64_t vmsz)
tranp->t_noinvupdatepr = BOOL_TRUE;
break;
case GETOPT_SETDM:
- restoredmpr = BOOL_TRUE;
- break;
+ mlog(MLOG_NORMAL | MLOG_ERROR, _(
+ "-%c option no longer supported\n"),
+ GETOPT_SETDM);
+ usage();
+ return BOOL_FALSE;
case GETOPT_ALERTPROG:
if (!optarg || optarg[0] == '-') {
mlog(MLOG_NORMAL | MLOG_ERROR, _(
@@ -1574,12 +1571,6 @@ content_init(int argc, char *argv[], size64_t vmsz)
}
if (persp->a.valpr) {
- if (restoredmpr && persp->a.restoredmpr != restoredmpr) {
- mlog(MLOG_NORMAL | MLOG_ERROR, _(
- "-%c cannot reset flag from previous restore\n"),
- GETOPT_SETDM);
- return BOOL_FALSE;
- }
if (!restoreextattrpr &&
persp->a.restoreextattrpr != restoreextattrpr) {
mlog(MLOG_NORMAL | MLOG_ERROR, _(
@@ -1734,7 +1725,6 @@ content_init(int argc, char *argv[], size64_t vmsz)
persp->a.newerpr = newerpr;
persp->a.newertime = newertime;
}
- persp->a.restoredmpr = restoredmpr;
if (!persp->a.dstdirisxfspr) {
restoreextattrpr = BOOL_FALSE;
}
@@ -2365,7 +2355,6 @@ content_stream_restore(ix_t thrdix)
scrhdrp->cih_inomap_nondircnt,
tranp->t_vmsz,
fullpr,
- persp->a.restoredmpr,
persp->a.dstdirisxfspr,
grhdrp->gh_version,
tranp->t_truncategenpr);
@@ -7549,12 +7538,6 @@ restore_reg(drive_t *drivep,
}
}
- if (persp->a.dstdirisxfspr && persp->a.restoredmpr) {
- HsmBeginRestoreFile(bstatp,
- *fdp,
- &strctxp->sc_hsmflags);
- }
-
return BOOL_TRUE;
}
@@ -7726,26 +7709,6 @@ restore_complete_reg(stream_context_t *strcxtp)
strerror(errno));
}
- if (persp->a.dstdirisxfspr && persp->a.restoredmpr) {
- fsdmidata_t fssetdm;
-
- /* Set the DMAPI Fields. */
- fssetdm.fsd_dmevmask = bstatp->bs_dmevmask;
- fssetdm.fsd_padding = 0;
- fssetdm.fsd_dmstate = bstatp->bs_dmstate;
-
- rval = ioctl(fd, XFS_IOC_FSSETDM, (void *)&fssetdm);
- if (rval) {
- mlog(MLOG_NORMAL | MLOG_WARNING,
- _("attempt to set DMI attributes of %s "
- "failed: %s\n"),
- path,
- strerror(errno));
- }
-
- HsmEndRestoreFile(path, fd, &strcxtp->sc_hsmflags);
- }
-
/* set any extended inode flags that couldn't be set
* prior to restoring the data.
*/
@@ -8064,17 +8027,6 @@ restore_symlink(drive_t *drivep,
strerror(errno));
}
}
-
- if (persp->a.restoredmpr) {
- fsdmidata_t fssetdm;
-
- /* Restore DMAPI fields. */
-
- fssetdm.fsd_dmevmask = bstatp->bs_dmevmask;
- fssetdm.fsd_padding = 0;
- fssetdm.fsd_dmstate = bstatp->bs_dmstate;
- rval = do_fssetdm_by_handle(path, &fssetdm);
- }
}
return BOOL_TRUE;
@@ -8777,7 +8729,7 @@ restore_extattr(drive_t *drivep,
}
assert(nread == (int)(recsz - EXTATTRHDR_SZ));
- if (!persp->a.restoreextattrpr && !persp->a.restoredmpr) {
+ if (!persp->a.restoreextattrpr) {
continue;
}
@@ -8796,19 +8748,6 @@ restore_extattr(drive_t *drivep,
}
} else if (isfilerestored && path[0] != '\0') {
setextattr(path, ahdrp);
-
- if (persp->a.dstdirisxfspr && persp->a.restoredmpr) {
- int flag = 0;
- char *attrname = (char *)&ahdrp[1];
- if (ahdrp->ah_flags & EXTATTRHDR_FLAGS_ROOT)
- flag = ATTR_ROOT;
- else if (ahdrp->ah_flags & EXTATTRHDR_FLAGS_SECURE)
- flag = ATTR_SECURE;
-
- HsmRestoreAttribute(flag,
- attrname,
- &strctxp->sc_hsmflags);
- }
}
}
/* NOTREACHED */
@@ -9709,32 +9648,6 @@ display_needed_objects(purp_t purp,
}
}
-static int
-do_fssetdm_by_handle(
- char *path,
- fsdmidata_t *fdmp)
-{
- void *hanp;
- size_t hlen=0;
- int rc;
-
- if (path_to_handle(path, &hanp, &hlen)) {
- mlog(MLOG_NORMAL | MLOG_WARNING, _(
- "path_to_handle of %s failed:%s\n"),
- path, strerror(errno));
- return -1;
- }
-
- rc = fssetdm_by_handle(hanp, hlen, fdmp);
- free_handle(hanp, hlen);
- if (rc) {
- mlog(MLOG_NORMAL | MLOG_WARNING, _(
- "fssetdm_by_handle of %s failed %s\n"),
- path, strerror(errno));
- }
- return rc;
-}
-
static int
quotafilecheck(char *type, char *dstdir, char *quotafile)
{
diff --git a/restore/tree.c b/restore/tree.c
index 0670318..5429b74 100644
--- a/restore/tree.c
+++ b/restore/tree.c
@@ -108,9 +108,6 @@ struct treePersStorage {
bool_t p_ignoreorphpr;
/* set if positive subtree or interactive
*/
- bool_t p_restoredmpr;
- /* restore DMI event settings
- */
bool_t p_truncategenpr;
/* truncate inode generation number (for compatibility
* with xfsdump format 2 and earlier)
@@ -348,7 +345,6 @@ tree_init(char *hkdir,
size64_t nondircnt,
size64_t vmsz,
bool_t fullpr,
- bool_t restoredmpr,
bool_t dstdirisxfspr,
uint32_t dumpformat,
bool_t truncategenpr)
@@ -508,10 +504,6 @@ tree_init(char *hkdir,
*/
persp->p_fullpr = fullpr;
- /* record if DMI event settings should be restored
- */
- persp->p_restoredmpr = restoredmpr;
-
/* record if truncated generation numbers are required
*/
if (dumpformat < GLOBAL_HDR_VERSION_3) {
@@ -2550,31 +2542,6 @@ setdirattr(dah_t dah, char *path)
}
}
- if (tranp->t_dstdirisxfspr && persp->p_restoredmpr) {
- fsdmidata_t fssetdm;
-
- fssetdm.fsd_dmevmask = dirattr_get_dmevmask(dah);
- fssetdm.fsd_padding = 0; /* not used */
- fssetdm.fsd_dmstate = (uint16_t)dirattr_get_dmstate(dah);
-
- /* restore DMAPI event settings etc.
- */
- rval = ioctl(fd,
- XFS_IOC_FSSETDM,
- (void *)&fssetdm);
- if (rval) {
- mlog(errno == EINVAL
- ?
- (MLOG_NITTY + 1) | MLOG_TREE
- :
- MLOG_NITTY | MLOG_TREE,
- "set DMI attributes"
- " of %s failed: %s\n",
- path,
- strerror(errno));
- }
- }
-
utimbuf.actime = dirattr_get_atime(dah);
utimbuf.modtime = dirattr_get_mtime(dah);
rval = utime(path, &utimbuf);
diff --git a/restore/tree.h b/restore/tree.h
index 4f9ffe8..bf66e3d 100644
--- a/restore/tree.h
+++ b/restore/tree.h
@@ -31,7 +31,6 @@ extern bool_t tree_init(char *hkdir,
size64_t nondircnt,
size64_t vmsz,
bool_t fullpr,
- bool_t restoredmpr,
bool_t dstdirisxfspr,
uint32_t dumpformat,
bool_t truncategenpr);

View File

@ -4,12 +4,12 @@
python3Packages.buildPythonApplication rec {
pname = "graph-cli";
version = "0.1.7";
version = "0.1.18";
src = python3Packages.fetchPypi {
inherit version;
pname = "graph_cli";
sha256 = "sha256-/v9COgAjuunJ06HHl55J0moV1p4uO+N+w2QwE8tgebQ=";
sha256 = "sha256-0mxOc8RJ3GNgSbppLylIViqfYf6zwJ49pltnsyQUpSA=";
};
propagatedBuildInputs = with python3Packages; [

View File

@ -4,14 +4,14 @@
}:
mkDerivation rec {
version = "0.4.4";
version = "0.5.0";
pname = "ckb-next";
src = fetchFromGitHub {
owner = "ckb-next";
repo = "ckb-next";
rev = "v${version}";
sha256 = "1fgvh2hsrm8vqbqq9g45skhyyrhhka4d8ngmyldkldak1fgmrvb7";
sha256 = "sha256-yR1myagAqavAR/7lPdufcrJpPmXW7r4N4pxTMF6NbuE=";
};
buildInputs = [

View File

@ -1,4 +1,4 @@
{ lib, buildGoModule, fetchFromGitHub, fetchpatch, testers, runitor }:
{ lib, buildGoModule, fetchFromGitHub, testers, runitor }:
buildGoModule rec {
pname = "runitor";

View File

@ -7148,6 +7148,8 @@ with pkgs;
buildGoModule = buildGo118Module;
};
healthchecks = callPackage ../servers/web-apps/healthchecks { };
heisenbridge = callPackage ../servers/heisenbridge { };
helio-workstation = callPackage ../applications/audio/helio-workstation { };

View File

@ -1974,8 +1974,12 @@ in {
criticality-score = callPackage ../development/python-modules/criticality-score { };
cron-descriptor = callPackage ../development/python-modules/cron-descriptor { };
croniter = callPackage ../development/python-modules/croniter { };
cronsim = callPackage ../development/python-modules/cronsim { };
crossplane = callPackage ../development/python-modules/crossplane { };
crownstone-cloud = callPackage ../development/python-modules/crownstone-cloud { };
@ -9585,6 +9589,8 @@ in {
segments = callPackage ../development/python-modules/segments { };
segno = callPackage ../development/python-modules/segno { };
segyio = toPythonModule (callPackage ../development/python-modules/segyio {
inherit (pkgs) cmake ninja;
});