Merge branch 'staging-23.05' into staging-next-23.05

This commit is contained in:
Vladimír Čunát
2023-06-17 15:53:19 +02:00
20 changed files with 217 additions and 61 deletions

View File

@@ -64,11 +64,9 @@ stdenv.mkDerivation rec {
substituteInPlace Makerules --replace "(shell pkg-config" "(shell $PKG_CONFIG"
'';
# Use shared libraries to decrease size
buildFlags = [ "shared" ];
makeFlags = [
"prefix=$(out)"
"shared=yes"
"USE_SYSTEM_LIBS=yes"
"PKG_CONFIG=${buildPackages.pkg-config}/bin/${buildPackages.pkg-config.targetPrefix}pkg-config"
] ++ lib.optionals (!enableX11) [ "HAVE_X11=no" ]

View File

@@ -1,20 +1,20 @@
{ lib, stdenv, fetchFromGitHub, jdk, maven, javaPackages }:
{ lib, stdenv, fetchFromGitHub, jdk11, maven, javaPackages }:
let
version = "0.9.6";
version = "0.10.1";
src = fetchFromGitHub {
owner = "gephi";
repo = "gephi";
rev = "v${version}";
sha256 = "sha256-3+tOwcE7TUeexJCugFsx9SgsKeb7ApNqbMEIi9QaKPE=";
hash = "sha256-ZNSEaiD32zFfF2ISKa1CmcT9Nq6r5i2rNHooQAcVbn4=";
};
# perform fake build to make a fixed-output derivation out of the files downloaded from maven central (120MB)
deps = stdenv.mkDerivation {
name = "gephi-${version}-deps";
inherit src;
buildInputs = [ jdk maven ];
buildInputs = [ jdk11 maven ];
buildPhase = ''
while mvn package -Dmaven.repo.local=$out/.m2 -Dmaven.wagon.rto=5000; [ $? = 1 ]; do
echo "timeout, restart maven to continue downloading"
@@ -24,7 +24,7 @@ let
installPhase = ''find $out/.m2 -type f -regex '.+\(\.lastUpdated\|resolver-status\.properties\|_remote\.repositories\)' -delete'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "sha256-kIPsZN0alRAgiMbckQnMWKOKtCZ37D/6MgT17VYcr+s=";
outputHash = "sha256-OdW4M5nGEkYkmHpRLM4cBQtk4SJII2uqM8TXb6y4eXk=";
};
in
stdenv.mkDerivation {
@@ -33,7 +33,7 @@ stdenv.mkDerivation {
inherit src;
buildInputs = [ jdk maven ];
buildInputs = [ jdk11 maven ];
buildPhase = ''
# 'maven.repo.local' must be writable so copy it out of nix store
@@ -49,10 +49,10 @@ stdenv.mkDerivation {
# use self-compiled JOGL to avoid patchelf'ing .so inside jars
rm $out/gephi/modules/ext/org.gephi.visualization/org-jogamp-{jogl,gluegen}/*.jar
cp ${javaPackages.jogl_2_3_2}/share/java/jogl*.jar $out/gephi/modules/ext/org.gephi.visualization/org-jogamp-jogl/
cp ${javaPackages.jogl_2_3_2}/share/java/glue*.jar $out/gephi/modules/ext/org.gephi.visualization/org-jogamp-gluegen/
cp ${javaPackages.jogl_2_4_0}/share/java/jogl*.jar $out/gephi/modules/ext/org.gephi.visualization/org-jogamp-jogl/
cp ${javaPackages.jogl_2_4_0}/share/java/glue*.jar $out/gephi/modules/ext/org.gephi.visualization/org-jogamp-gluegen/
echo "jdkhome=${jdk}" >> $out/etc/gephi.conf
printf "\n\njdkhome=${jdk11}\n" >> $out/etc/gephi.conf
'';
meta = with lib; {

View File

@@ -30,7 +30,7 @@ let
]));
extraCertificatesBundle = writeText "cacert-extra-certificates-bundle.crt" (lib.concatStringsSep "\n\n" extraCertificateStrings);
srcVersion = "3.89.1";
srcVersion = "3.90";
version = if nssOverride != null then nssOverride.version else srcVersion;
meta = with lib; {
homepage = "https://curl.haxx.se/docs/caextract.html";
@@ -45,7 +45,7 @@ let
src = if nssOverride != null then nssOverride.src else fetchurl {
url = "mirror://mozilla/security/nss/releases/NSS_${lib.replaceStrings ["."] ["_"] version}_RTM/src/nss-${version}.tar.gz";
hash = "sha256-OtrtuecMPF9AYDv2CgHjNhkKbb4Bkp05XxawH+hKAVY=";
hash = "sha256-ms1lNMQdjq0Z/Kb8s//+0vnwnEN8PXn+5qTuZoqqk7Y=";
};
dontBuild = true;

View File

@@ -53,11 +53,7 @@ let majorVersion = "10";
patches = [
# Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80431
(fetchurl {
name = "fix-bug-80431.patch";
url = "https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=de31f5445b12fd9ab9969dc536d821fe6f0edad0";
sha256 = "0sd52c898msqg7m316zp0ryyj7l326cjcn2y19dcxqp15r74qj0g";
})
../fix-bug-80431.patch
../11/fix-struct-redefinition-on-glibc-2.36.patch
../install-info-files-serially.patch
] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch

View File

@@ -57,11 +57,7 @@ let majorVersion = "11";
patches = [
# Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80431
(fetchurl {
name = "fix-bug-80431.patch";
url = "https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=de31f5445b12fd9ab9969dc536d821fe6f0edad0";
sha256 = "0sd52c898msqg7m316zp0ryyj7l326cjcn2y19dcxqp15r74qj0g";
})
../fix-bug-80431.patch
./fix-struct-redefinition-on-glibc-2.36.patch
../install-info-files-serially.patch
] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch

View File

@@ -67,11 +67,7 @@ let majorVersion = "6";
../use-source-date-epoch.patch ./0001-Fix-build-for-glibc-2.31.patch
# Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80431
(fetchurl {
name = "fix-bug-80431.patch";
url = "https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=de31f5445b12fd9ab9969dc536d821fe6f0edad0";
sha256 = "0sd52c898msqg7m316zp0ryyj7l326cjcn2y19dcxqp15r74qj0g";
})
../fix-bug-80431.patch
../install-info-files-serially.patch
] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
++ optional noSysDirs ../no-sys-dirs.patch

View File

@@ -58,11 +58,7 @@ let majorVersion = "7";
./0001-Fix-build-for-glibc-2.31.patch
# Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80431
(fetchurl {
name = "fix-bug-80431.patch";
url = "https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=de31f5445b12fd9ab9969dc536d821fe6f0edad0";
sha256 = "0sd52c898msqg7m316zp0ryyj7l326cjcn2y19dcxqp15r74qj0g";
})
../fix-bug-80431.patch
../9/fix-struct-redefinition-on-glibc-2.36.patch
../install-info-files-serially.patch

View File

@@ -48,11 +48,7 @@ let majorVersion = "8";
patches = [
# Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80431
(fetchurl {
name = "fix-bug-80431.patch";
url = "https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=de31f5445b12fd9ab9969dc536d821fe6f0edad0";
sha256 = "0sd52c898msqg7m316zp0ryyj7l326cjcn2y19dcxqp15r74qj0g";
})
../fix-bug-80431.patch
../9/fix-struct-redefinition-on-glibc-2.36.patch
../install-info-files-serially.patch
] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch

View File

@@ -58,11 +58,7 @@ let majorVersion = "9";
patches = [
./fix-struct-redefinition-on-glibc-2.36.patch
# Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80431
(fetchurl {
name = "fix-bug-80431.patch";
url = "https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=de31f5445b12fd9ab9969dc536d821fe6f0edad0";
sha256 = "0sd52c898msqg7m316zp0ryyj7l326cjcn2y19dcxqp15r74qj0g";
})
../fix-bug-80431.patch
../install-info-files-serially.patch
] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
++ optional targetPlatform.isNetBSD ../libstdc++-netbsd-ctypes.patch

View File

@@ -0,0 +1,92 @@
From de31f5445b12fd9ab9969dc536d821fe6f0edad0 Mon Sep 17 00:00:00 2001
From: Patrick Palka <ppalka@redhat.com>
Date: Mon, 21 Jun 2021 07:54:26 -0400
Subject: [PATCH] c++: conversion to base of vbase in NSDMI [PR80431]
The delayed processing of conversions to a virtual base in an NSDMI
assumes the target base type is a (possibly indirect) virtual base of
the current class, but the target base type could also be a base of a
virtual base, as in the testcase below. Since such a base isn't a part
of CLASSTYPE_VBASECLASSES, we end up miscompiling the testcase due to
the call to build_base_path (with binfo=NULL_TREE) silently returning
error_mark_node. Fix this by using convert_to_base to build the
conversion instead.
PR c++/80431
gcc/cp/ChangeLog:
* tree.c (bot_replace): Use convert_to_base to build the
conversion to the (morally) virtual base.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/nsdmi-virtual1a.C: New test.
---
gcc/cp/tree.c | 14 ++++------
gcc/testsuite/g++.dg/cpp0x/nsdmi-virtual1a.C | 28 ++++++++++++++++++++
2 files changed, 33 insertions(+), 9 deletions(-)
create mode 100644 gcc/testsuite/g++.dg/cpp0x/nsdmi-virtual1a.C
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index fec5afaa2be..297da2b1550 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -3242,15 +3242,11 @@ bot_replace (tree* t, int* /*walk_subtrees*/, void* data_)
else if (TREE_CODE (*t) == CONVERT_EXPR
&& CONVERT_EXPR_VBASE_PATH (*t))
{
- /* In an NSDMI build_base_path defers building conversions to virtual
- bases, and we handle it here. */
- tree basetype = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (*t)));
- vec<tree, va_gc> *vbases = CLASSTYPE_VBASECLASSES (current_class_type);
- int i; tree binfo;
- FOR_EACH_VEC_SAFE_ELT (vbases, i, binfo)
- if (BINFO_TYPE (binfo) == basetype)
- break;
- *t = build_base_path (PLUS_EXPR, TREE_OPERAND (*t, 0), binfo, true,
+ /* In an NSDMI build_base_path defers building conversions to morally
+ virtual bases, and we handle it here. */
+ tree basetype = TREE_TYPE (*t);
+ *t = convert_to_base (TREE_OPERAND (*t, 0), basetype,
+ /*check_access=*/false, /*nonnull=*/true,
tf_warning_or_error);
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-virtual1a.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-virtual1a.C
new file mode 100644
index 00000000000..dc847cc16e5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-virtual1a.C
@@ -0,0 +1,28 @@
+// PR c++/80431
+// { dg-do run { target c++11 } }
+
+// A variant of nsdmi-virtual1.C where A is only a morally virtual base of B.
+
+struct A
+{
+ A(): i(42) { }
+ int i;
+ int f() { return i; }
+};
+
+struct D : A { int pad; };
+
+struct B : virtual D
+{
+ int j = i + f();
+ int k = A::i + A::f();
+};
+
+struct C: B { int pad; };
+
+int main()
+{
+ C c;
+ if (c.j != 84 || c.k != 84)
+ __builtin_abort();
+}
--
2.31.1

View File

@@ -46,11 +46,11 @@ let
in
stdenv.mkDerivation rec {
pname = "go";
version = "1.20.4";
version = "1.20.5";
src = fetchurl {
url = "https://go.dev/dl/go${version}.src.tar.gz";
hash = "sha256-nzSs4Sh2S3o6SyOLgFhWzBshhDBN+eVpCCWwcQ9CAtY=";
hash = "sha256-mhXBM7os+v55ZS9IFbYufPwmf2jfG5RUxqsqPKi5aog=";
};
strictDeps = true;

View File

@@ -121,20 +121,20 @@
sourceVersion = {
major = "3";
minor = "10";
patch = "11";
patch = "12";
suffix = "";
};
hash = "sha256-PDvDBIMDchyQSgPrgya2Mekh8RzDvimIRWpC8RXa8Ew=";
hash = "sha256-r7dL8ZEw56R9EDEsj154TyTgUnmB6raOIFRs+4ZYMLg=";
};
python311 = {
sourceVersion = {
major = "3";
minor = "11";
patch = "3";
patch = "4";
suffix = "";
};
hash = "sha256-il25nJYafs8nx1lWGJyWAslodR8R2+riuQDb/xwIW14=";
hash = "sha256-Lw5AnfKrV6qfxMvd+5dq9E5OVb9vYZ7ua8XCKXJkp/Y=";
};
};

View File

@@ -1,6 +1,81 @@
{ lib, stdenv, fetchgit, ant, jdk8, git, xorg, udev, libGL, libGLU }:
{ coreutils, lib, stdenv, fetchgit, ant, jdk8, jdk11, git, xorg, udev, libGL, libGLU, mesa, xmlstarlet }:
{
jogl_2_4_0 =
let
version = "2.4.0";
gluegen-src = fetchgit {
url = "git://jogamp.org/srv/scm/gluegen.git";
rev = "v${version}";
hash = "sha256-qQzq7v2vMFeia6gXaNHS3AbOp9HhDRgISp7P++CKErA=";
fetchSubmodules = true;
};
jogl-src = fetchgit {
url = "git://jogamp.org/srv/scm/jogl.git";
rev = "v${version}";
hash = "sha256-PHDq7uFEQfJ2P0eXPUi0DGFR1ob/n5a68otgzpFnfzQ=";
fetchSubmodules = true;
};
in
stdenv.mkDerivation {
pname = "jogl";
inherit version;
srcs = [ gluegen-src jogl-src ];
sourceRoot = ".";
unpackCmd = "cp -r $curSrc \${curSrc##*-}";
nativeBuildInputs = [ ant jdk11 git xmlstarlet ];
buildInputs = [ udev xorg.libX11 xorg.libXrandr xorg.libXcursor xorg.libXi xorg.libXt xorg.libXxf86vm xorg.libXrender mesa ];
# Workaround build failure on -fno-common toolchains:
# ld: ../obj/Bindingtest1p1Impl_JNI.o:(.bss+0x8): multiple definition of
# `unsigned_size_t_1'; ../obj/TK_Surface_JNI.o:(.bss+0x8): first defined here
NIX_CFLAGS_COMPILE = "-fcommon"; # copied from 2.3.2, is this still needed?
buildPhase = ''
( cd gluegen/make
substituteInPlace ../src/java/com/jogamp/common/util/IOUtil.java --replace '#!/bin/true' '#!${coreutils}/bin/true'
# set timestamp of files in jar to a fixed point in time
xmlstarlet ed --inplace \
--append //jar --type attr -n modificationtime --value 1980-01-01T00:00Z \
build.xml gluegen-cpptasks-base.xml
ant -Dtarget.sourcelevel=8 -Dtarget.targetlevel=8 -Dtarget.rt.jar='null.jar' )
( cd jogl/make
# force way to do disfunctional "ant -Dsetup.addNativeBroadcom=false" and disable dependency on raspberrypi drivers
# if arm/aarch64 support will be added, this block might be commented out on those platforms
# on x86 compiling with default "setup.addNativeBroadcom=true" leads to unsatisfied import "vc_dispmanx_resource_delete" in libnewt.so
xmlstarlet ed --inplace --delete '//*[@if="setup.addNativeBroadcom"]' build-newt.xml
# set timestamp of files in jar to a fixed point in time
xmlstarlet ed --inplace \
--append //jar --type attr -n modificationtime --value 1980-01-01T00:00Z \
build.xml build-nativewindow.xml build-jogl.xml
ant -Dtarget.sourcelevel=8 -Dtarget.targetlevel=8 -Dtarget.rt.jar='null.jar' )
'';
installPhase = ''
mkdir -p $out/share/java
cp -v $NIX_BUILD_TOP/gluegen/build/gluegen-rt{,-natives-linux-amd64}.jar $out/share/java/
cp -v $NIX_BUILD_TOP/jogl/build/jar/jogl-all{,-natives-linux-amd64}.jar $out/share/java/
cp -v $NIX_BUILD_TOP/jogl/build/nativewindow/nativewindow{,-awt,-natives-linux-amd64,-os-drm,-os-x11}.jar $out/share/java/
'';
meta = with lib; {
description = "Java libraries for 3D Graphics, Multimedia and Processing";
homepage = "https://jogamp.org/";
license = licenses.bsd3;
platforms = [ "x86_64-linux" ];
};
};
jogl_2_3_2 =
let
version = "2.3.2";

View File

@@ -13,7 +13,7 @@
stdenv.mkDerivation rec {
pname = "libwacom";
version = "2.6.0";
version = "2.7.0";
outputs = [ "out" "dev" ];
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
owner = "linuxwacom";
repo = "libwacom";
rev = "libwacom-${version}";
sha256 = "sha256-9zqW6zPrFcxv/yAAtFgdVavKVMXeDBoMP3E/XriUcT0=";
sha256 = "sha256-NNfhZMshM5U/EfJHuNgkDe5NEkEGKtJ56vSpXyGf/xw=";
};
postPatch = ''

View File

@@ -7,8 +7,8 @@ let
libwacom-surface = fetchFromGitHub {
owner = "linux-surface";
repo = "libwacom-surface";
rev = "v2.6.0-1";
hash = "sha256-4UOO9LMyCJd4LkqU0uva/0Xc44fIVdIQi27tJOtNEFk=";
rev = "v2.7.0-1";
hash = "sha256-LgJ8YFQQN05kyd6kxBakIIiGgZ9icW27xKK3Dz6TwLs=";
};
in libwacom.overrideAttrs (old: {
pname = "libwacom-surface";

View File

@@ -28,6 +28,13 @@ stdenv.mkDerivation rec {
extraPrefix = "OpenEXR/IlmImf/";
sha256 = "1wa2jn6sa0n3phaqvklnlbgk1bz60y756ad4jk4d757pzpnannsy";
})
(fetchpatch {
name = "CVE-2021-3933.patch";
url = "https://github.com/AcademySoftwareFoundation/openexr/commit/5db6f7aee79e3e75e8c3780b18b28699614dd08e.patch";
stripLen = 4;
extraPrefix = "OpenEXR/IlmImf/";
sha256 = "sha256-DrpldpNgN5pWKzIuuPIrynGX3EpP8YhJlu+lLfNFGxQ=";
})
];
cmakeFlags = lib.optional stdenv.hostPlatform.isStatic "-DCMAKE_SKIP_RPATH=ON";

View File

@@ -2,7 +2,7 @@
, bash
, buildPythonPackage
, fetchPypi
, pythonOlder
, stdenv
}:
buildPythonPackage rec {
@@ -26,6 +26,13 @@ buildPythonPackage rec {
"invoke"
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
mkdir -p $out/share/{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions}
$out/bin/inv --print-completion-script=zsh >$out/share/zsh/site-functions/_inv
$out/bin/inv --print-completion-script=bash >$out/share/bash-completion/completions/inv.bash
$out/bin/inv --print-completion-script=fish >$out/share/fish/vendor_completions.d/inv.fish
'';
meta = with lib; {
description = "Pythonic task execution";
homepage = "https://www.pyinvoke.org/";

View File

@@ -892,11 +892,11 @@ self: with self; {
# THIS IS A GENERATED FILE. DO NOT EDIT!
libX11 = callPackage ({ stdenv, pkg-config, fetchurl, xorgproto, libpthreadstubs, libxcb, xtrans }: stdenv.mkDerivation {
pname = "libX11";
version = "1.8.4";
version = "1.8.6";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://xorg/individual/lib/libX11-1.8.4.tar.xz";
sha256 = "067mgmsqck78b7pf5h25irz3zvcnzqbgbz7s7k70967smsjqg8n9";
url = "mirror://xorg/individual/lib/libX11-1.8.6.tar.xz";
sha256 = "1jawl8zp1h7hdmxx1sc6kmxkki187d9yixr2l03ai6wqqry5nlsr";
};
hardeningDisable = [ "bindnow" "relro" ];
strictDeps = true;

View File

@@ -174,7 +174,7 @@ mirror://xorg/individual/lib/libICE-1.0.10.tar.bz2
mirror://xorg/individual/lib/libpciaccess-0.16.tar.bz2
mirror://xorg/individual/lib/libSM-1.2.3.tar.bz2
mirror://xorg/individual/lib/libWindowsWM-1.0.1.tar.bz2
mirror://xorg/individual/lib/libX11-1.8.4.tar.xz
mirror://xorg/individual/lib/libX11-1.8.6.tar.xz
mirror://xorg/individual/lib/libXau-1.0.9.tar.bz2
mirror://xorg/individual/lib/libXaw-1.0.14.tar.bz2
mirror://xorg/individual/lib/libxcb-1.14.tar.xz

View File

@@ -271,7 +271,8 @@ in {
junit_4_12;
inherit (callPackage ../development/java-modules/jogl { })
jogl_2_3_2;
jogl_2_3_2
jogl_2_4_0;
inherit (callPackage ../development/java-modules/log4j { inherit fetchMaven; })
log4j_1_2_12;