Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f5aed4dd5e3d
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4335a9279e68
Choose a head ref

Commits on Sep 21, 2018

  1. azcopy: init at 10.0.1

    colemickens committed Sep 21, 2018

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    97f3a2e View commit details

Commits on Sep 24, 2018

  1. bitcoin: don't build tests that aren't used, don't build benchmarks

    (cherry picked from commit d51c0a87b2ebf756015784839ec9c13950c45323)
    dtzWill committed Sep 24, 2018
    Copy the full SHA
    8b184ec View commit details
  2. bitcoin: parallel build, please! :)

    (cherry picked from commit dba5534b06c7dffe97ce644b0a5790aca8527a2e)
    dtzWill committed Sep 24, 2018
    Copy the full SHA
    b322a8b View commit details
  3. go: Remove pkg/obj directory from the build outputs.

    This appears to be causing the go package to be roughly 900MB in size.
    c00w committed Sep 24, 2018
    Copy the full SHA
    cdeb26e View commit details
  4. clightning: 0.6.0 -> 0.6.1

    Update to the latest release.
    
    Highlights for c-lightning users
    --------------------------------
    
      - Less stuck payments: Liveness ping test before locking up funds with peers.
      - Better routing: now considers size of channels.
      - Fewer spurious closes: fee estimate improvements, and new feerates command
      - Several annoying bugs fixed.
    
    Highlights for the network
    --------------------------
    
      - Gossipd now less spammy with channel_update.
      - option_data_loss_protect to protect peers against being out-of-date.
      - Payment errors now refer to the correct channel.
    
    Internal Improvements
    ---------------------
    
      - Simplified client flow; after init message exchange by connectd, each is
        isolated in its own daemon.
      - JSON parameter handling vastly simplfied.
      - Python testing framework now uses proper fixtures, and split into separate
        files.
      - Many other cleanups and clarifications.
      - We keepachangelog.com!
    
    Signed-off-by: William Casarin <jb55@jb55.com>
    jb55 committed Sep 24, 2018
    Copy the full SHA
    2aa0b85 View commit details

Commits on Sep 25, 2018

  1. Copy the full SHA
    6793313 View commit details
  2. adwaita-qt: init at 1.0

    worldofpeace committed Sep 25, 2018
    Copy the full SHA
    94d079b View commit details
  3. musl: whitespace, NFC

    dtzWill committed Sep 25, 2018
    Copy the full SHA
    ed53472 View commit details
  4. Copy the full SHA
    5c21759 View commit details
  5. Copy the full SHA
    dcd5e45 View commit details
  6. musl: pick stacksize-related improvements, increase default size

    Also supports setting default thread stack size via linker,
    making it possible to fix programs without modifying source.
    dtzWill committed Sep 25, 2018
    Copy the full SHA
    f38218a View commit details
  7. musl: reduce stacksize patch series to just the bump

    The others rely on some of the recent restructuring+cleanup in musl,
    which hopefully reaches us soon :).
    
    For now just bump the default sizes.
    dtzWill committed Sep 25, 2018
    Copy the full SHA
    d3a0aa2 View commit details
  8. gcc7: more options for musl

    dtzWill committed Sep 25, 2018
    Copy the full SHA
    3ec0d14 View commit details
  9. gcc: fix libgomp to not use initial-exec

    Only apply w/musl since while it's wrong everywhere it apparently
    hasn't broken things entirely w/glibc so keep things as they were.
    
    Patch regenerated from original so that it applies
    which isn't saying much since it's simple :).
    
    Source:
    
    https://patchwork.ozlabs.org/patch/154298/
    
    IRC chat on #musl with Rich and others endorses this,
    at least at the conceptual level of no shared library
    should be using initial-exec TLS.
    
    Fixes various uses of libgomp that previously crashed (before 1.1.20)
    or encounter errors (post-1.1.20), such as pythonPackages.cython .
    dtzWill committed Sep 25, 2018
    Copy the full SHA
    e845be1 View commit details
  10. Copy the full SHA
    fecd326 View commit details
  11. Copy the full SHA
    8a0a34f View commit details
  12. Merge pull request #47309 from dtzWill/fix/libgomp-gcc-musl

    gcc*: fix libgomp (OpenMP) to work w/musl, don't build DSO using initial-exec
    dtzWill authored Sep 25, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    93b30a8 View commit details
  13. Merge pull request #47308 from dtzWill/update/musl-upstream-fixes

    musl: pick upstream fixes and improvements
    dtzWill authored Sep 25, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f02c8e2 View commit details
  14. Copy the full SHA
    8d83441 View commit details
  15. Merge pull request #47286 from jb55/clightning-bump

    clightning: 0.6.0 -> 0.6.1
    srhb authored Sep 25, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a27863c View commit details
  16. Copy the full SHA
    12051db View commit details
  17. vagrant: Clean up Gemfile

    aneeshusa committed Sep 25, 2018
    Copy the full SHA
    fae4aa9 View commit details
  18. Merge pull request #47258 from dtzWill/fix/bitcoin-long-compile

    bitcoin: don't build things not used, enable parallel building
    dtzWill authored Sep 25, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c82ac80 View commit details
  19. Merge pull request #47310 from aneeshusa/clean-up-vagrant-Gemfile

    vagrant: Clean up Gemfile
    Mic92 authored Sep 25, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    39f20a6 View commit details
  20. Merge pull request #47305 from worldofpeace/qgnome

    Add adwaita-qt & qgnomeplatform
    jtojnar authored Sep 25, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    aba011f View commit details
  21. Merge pull request #46924 from colemickens/azcopy

    azcopy: init at 10.0.1
    srhb authored Sep 25, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0260747 View commit details
  22. Merge pull request #47260 from c00w/master

    go: Remove pkg/obj directory from the build outputs.
    Mic92 authored Sep 25, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4335a92 View commit details
9 changes: 8 additions & 1 deletion pkgs/applications/altcoins/bitcoin.nix
Original file line number Diff line number Diff line change
@@ -20,7 +20,12 @@ stdenv.mkDerivation rec{
++ optionals stdenv.isLinux [ utillinux ]
++ optionals withGui [ qtbase qttools qrencode ];

configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ]
configureFlags = [ "--with-boost-libdir=${boost.out}/lib"
"--disable-bench"
] ++ optionals (!doCheck) [
"--disable-tests"
"--disable-gui-tests"
]
++ optionals withGui [ "--with-gui=qt5"
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
];
@@ -29,6 +34,8 @@ stdenv.mkDerivation rec{
# find or load the Qt platform plugin "minimal""
doCheck = false;

enableParallelBuilding = true;

meta = {
description = "Peer-to-peer electronic cash system";
longDescription= ''
4 changes: 2 additions & 2 deletions pkgs/applications/altcoins/clightning.nix
Original file line number Diff line number Diff line change
@@ -4,14 +4,14 @@
with stdenv.lib;
stdenv.mkDerivation rec {
name = "clightning-${version}";
version = "0.6";
version = "0.6.1";

src = fetchFromGitHub {
fetchSubmodules = true;
owner = "ElementsProject";
repo = "lightning";
rev = "v${version}";
sha256 = "1xbi8c7kn21wj255fxnb9s0sqnzbn3wsz4p96z084k8mw1nc71vn";
sha256 = "0qx30i1c97ic4ii8bm0sk9dh76nfg4ihl9381gxjj14i4jr1q8y4";
};

enableParallelBuilding = true;
8 changes: 7 additions & 1 deletion pkgs/development/compilers/gcc/5/default.nix
Original file line number Diff line number Diff line change
@@ -60,6 +60,7 @@ let version = "5.5.0";
++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
++ optional noSysDirs ../no-sys-dirs.patch
++ optional langFortran ../gfortran-driving.patch
++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch
++ optional stdenv.hostPlatform.isMusl (fetchpatch {
url = https://raw.githubusercontent.com/richfelker/musl-cross-make/e84b1bd1fc12a3def33111ca6df522cd6e5ec361/patches/gcc-5.3.0/0001-musl.diff;
sha256 = "0pppbf8myi2kjhm3z3479ihn1cm60kycfv60gj8yy1bs0pl1qcfm";
@@ -331,7 +332,12 @@ stdenv.mkDerivation ({
# On Illumos/Solaris GNU as is preferred
"--with-gnu-as" "--without-gnu-ld"
]
++ optional (targetPlatform == hostPlatform && targetPlatform.libc == "musl") "--disable-libsanitizer"
++ optionals (targetPlatform == hostPlatform && targetPlatform.libc == "musl") [
"--disable-libsanitizer"
"--disable-symvers"
"libat_cv_have_ifunc=no"
"--disable-gnu-indirect-function"
]
;

targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
8 changes: 7 additions & 1 deletion pkgs/development/compilers/gcc/6/default.nix
Original file line number Diff line number Diff line change
@@ -61,6 +61,7 @@ let version = "6.4.0";
++ optional langFortran ../gfortran-driving.patch
++ [ ../struct-ucontext.patch ../struct-sigaltstack.patch ] # glibc-2.26
++ optional langJava [ ../struct-ucontext-libjava.patch ] # glibc-2.26
++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch
;

javaEcj = fetchurl {
@@ -336,7 +337,12 @@ stdenv.mkDerivation ({
# On Illumos/Solaris GNU as is preferred
"--with-gnu-as" "--without-gnu-ld"
]
++ optional (targetPlatform == hostPlatform && targetPlatform.libc == "musl") "--disable-libsanitizer"
++ optionals (targetPlatform == hostPlatform && targetPlatform.libc == "musl") [
"--disable-libsanitizer"
"--disable-symvers"
"libat_cv_have_ifunc=no"
"--disable-gnu-indirect-function"
]
;

targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
10 changes: 8 additions & 2 deletions pkgs/development/compilers/gcc/7/default.nix
Original file line number Diff line number Diff line change
@@ -56,7 +56,8 @@ let version = "7.3.0";
sha256 = "0mrvxsdwip2p3l17dscpc1x8vhdsciqw1z5q9i6p5g9yg1cqnmgs";
})
++ optional langFortran ../gfortran-driving.patch
++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch;
++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch
++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch;

/* Cross-gcc settings (build == host != target) */
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
@@ -292,7 +293,12 @@ stdenv.mkDerivation ({
# On Illumos/Solaris GNU as is preferred
"--with-gnu-as" "--without-gnu-ld"
]
++ optional (targetPlatform == hostPlatform && targetPlatform.libc == "musl") "--disable-libsanitizer"
++ optionals (targetPlatform == hostPlatform && targetPlatform.libc == "musl") [
"--disable-libsanitizer"
"--disable-symvers"
"libat_cv_have_ifunc=no"
"--disable-gnu-indirect-function"
]
++ optional (targetPlatform.isAarch64) "--enable-fix-cortex-a53-843419"
;

10 changes: 8 additions & 2 deletions pkgs/development/compilers/gcc/8/default.nix
Original file line number Diff line number Diff line change
@@ -51,7 +51,8 @@ let version = "8.2.0";
sha256 = ""; # TODO: uncomment and check hash when available.
}) */
++ optional langFortran ../gfortran-driving.patch
++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch;
++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch
++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch;

/* Cross-gcc settings (build == host != target) */
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
@@ -284,7 +285,12 @@ stdenv.mkDerivation ({
# On Illumos/Solaris GNU as is preferred
"--with-gnu-as" "--without-gnu-ld"
]
++ optional (targetPlatform == hostPlatform && targetPlatform.libc == "musl") "--disable-libsanitizer"
++ optionals (targetPlatform == hostPlatform && targetPlatform.libc == "musl") [
"--disable-libsanitizer"
"--disable-symvers"
"libat_cv_have_ifunc=no"
"--disable-gnu-indirect-function"
]
;

targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
From 01c433f4788441c0963005b9d3fad5b2865e6651 Mon Sep 17 00:00:00 2001
From: Will Dietz <w@wdtz.org>
Date: Mon, 24 Sep 2018 19:57:50 -0500
Subject: [PATCH] libgomp/configure.tgt: don't force initial-exec tls-model

---
libgomp/configure.tgt | 17 -----------------
1 file changed, 17 deletions(-)

diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt
index 74d95a570c7..b608c55f0c1 100644
--- a/libgomp/configure.tgt
+++ b/libgomp/configure.tgt
@@ -10,23 +10,6 @@
# XCFLAGS Add extra compile flags to use.
# XLDFLAGS Add extra link flags to use.

-# Optimize TLS usage by avoiding the overhead of dynamic allocation.
-if test $gcc_cv_have_tls = yes ; then
- case "${target}" in
-
- *-*-k*bsd*-gnu*)
- ;;
-
- *-*-linux* | *-*-gnu*)
- XCFLAGS="${XCFLAGS} -ftls-model=initial-exec"
- ;;
-
- *-*-rtems*)
- XCFLAGS="${XCFLAGS} -ftls-model=local-exec"
- ;;
- esac
-fi
-
# Since we require POSIX threads, assume a POSIX system by default.
config_path="posix"

--
2.19.0

1 change: 1 addition & 0 deletions pkgs/development/compilers/go/1.11.nix
Original file line number Diff line number Diff line change
@@ -178,6 +178,7 @@ stdenv.mkDerivation rec {

preFixup = ''
rm -r $out/share/go/pkg/bootstrap
rm -r $out/share/go/pkg/obj
ln -s $out/share/go/bin $out/bin
'';

37 changes: 37 additions & 0 deletions pkgs/development/libraries/qgnomeplatform/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{ stdenv, fetchFromGitHub, pkgconfig, gtk3, qtbase, qmake }:

stdenv.mkDerivation rec {
name = "qgnomeplatform-${version}";
version = "0.4";

src = fetchFromGitHub {
owner = "FedoraQt";
repo = "QGnomePlatform";
rev = version;
sha256 = "1403300d435g7ngcxsgnllhryk63nrhl1ahx16b28wkxnh2vi9ly";
};

nativeBuildInputs = [
pkgconfig
qmake
];

buildInputs = [
gtk3
qtbase
];

postPatch = ''
# Fix plugin dir
substituteInPlace qgnomeplatform.pro \
--replace "\$\$[QT_INSTALL_PLUGINS]" "$out/$qtPluginPrefix"
'';

meta = with stdenv.lib; {
description = "QPlatformTheme for a better Qt application inclusion in GNOME";
homepage = https://github.com/FedoraQt/QGnomePlatform;
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ worldofpeace ];
platforms = platforms.linux;
};
}
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ let
TARGET = "ATHLON";
DYNAMIC_ARCH = "1";
CC = "gcc";
USE_OPENMP = if stdenv.hostPlatform.isMusl then "0" else "1";
USE_OPENMP = "1";
};
};
in
23 changes: 23 additions & 0 deletions pkgs/development/tools/azcopy/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{ stdenv, fetchFromGitHub, buildGoPackage }:

buildGoPackage rec {
name = "azure-storage-azcopy-${version}";
version = "10.0.1-pre";
revision = "10.0.1";
goPackagePath = "github.com/Azure/azure-storage-azcopy";

goDeps= ./deps.nix;

src = fetchFromGitHub {
owner = "Azure";
repo = "azure-storage-azcopy";
rev = revision;
sha256 = "0v1qli01nnx81186q1d2556w457qkbwypq6yy89ns52pqg941arp";
};

meta = with stdenv.lib; {
maintainers = with maintainers; [ colemickens ];
license = licenses.mit;
description = "The new Azure Storage data transfer utility - AzCopy v10";
};
}
129 changes: 129 additions & 0 deletions pkgs/development/tools/azcopy/deps.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkgs/development/tools/vagrant/Gemfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
source "https://rubygems.org"
gem 'vagrant', git: "https://github.com/hashicorp/vagrant.git", tag: "v2.0.4"
gem 'vagrant'
38 changes: 38 additions & 0 deletions pkgs/misc/themes/adwaita-qt/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{ stdenv, fetchFromGitHub, pkgconfig, cmake, ninja, qtbase }:

stdenv.mkDerivation rec {
pname = "adwaita-qt";
version = "1.0";

name = "${pname}-${version}";

src = fetchFromGitHub {
owner = "FedoraQt";
repo = pname;
rev = version;
sha256 = "0xn8bianmdj15k11mnw52by9vxkmvpqr2s304kl3dbjj1l7v4cd7";
};

nativeBuildInputs = [
cmake
ninja
];

buildInputs = [
qtbase
];

postPatch = ''
# Fix plugin dir
substituteInPlace style/CMakeLists.txt \
--replace "DESTINATION \"\''${QT_PLUGINS_DIR}/styles" "DESTINATION \"$qtPluginPrefix/styles"
'';

meta = with stdenv.lib; {
description = "A style to bend Qt applications to look like they belong into GNOME Shell";
homepage = https://github.com/FedoraQt/adwaita-qt;
license = licenses.gpl2Plus;
maintainers = with maintainers; [ worldofpeace ];
platforms = platforms.linux;
};
}
7 changes: 7 additions & 0 deletions pkgs/misc/uboot/default.nix
Original file line number Diff line number Diff line change
@@ -158,6 +158,13 @@ in rec {
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
};

ubootOrangePiZeroPlus2H5 = buildUBoot rec {
defconfig = "orangepi_zero_plus2_defconfig";
extraMeta.platforms = ["aarch64-linux"];
BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
filesToInstall = ["u-boot-sunxi-with-spl.bin"];
};

ubootPcduino3Nano = buildUBoot rec {
defconfig = "Linksprite_pcDuino3_Nano_defconfig";
extraMeta.platforms = ["armv7l-linux"];
13 changes: 10 additions & 3 deletions pkgs/os-specific/linux/musl/default.nix
Original file line number Diff line number Diff line change
@@ -64,9 +64,16 @@ stdenv.mkDerivation rec {
# Use execveat to impl fexecve when avail (useful for containers)
./fexecve-execveat.patch
# improve behavior in few cases
./0001-in-pthread_mutex_trylock-EBUSY-out-more-directly-whe.patch
./0002-in-pthread_mutex_timedlock-avoid-repeatedly-reading-.patch
./0003-fix-namespace-violation-for-c11-mutex-functions.patch
./0001-in-pthread_mutex_trylock-EBUSY-out-more-directly-whe.patch
./0002-in-pthread_mutex_timedlock-avoid-repeatedly-reading-.patch
./0003-fix-namespace-violation-for-c11-mutex-functions.patch
# Fix getaddrinfo usage encountered sometimes in containers
./fix-getaddrinfo-regression-with-AI_ADDRCONFIG.patch
# name_to_handle_at
./name-to-handle-at.patch
./max-handle-sz-for-name-to-handle-at.patch
# stacksize bump (upstream)
./stacksize-bump.patch
];
preConfigure = ''
configureFlagsArray+=("--syslibdir=$out/lib")
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
From f381c118b2d4f7d914481d3cdc830ce41369b002 Mon Sep 17 00:00:00 2001
From: Rich Felker <dalias@aerifal.cx>
Date: Wed, 19 Sep 2018 18:03:22 -0400
Subject: [PATCH] fix getaddrinfo regression with AI_ADDRCONFIG on some
configurations

despite not being documented to do so in the standard or Linux
documentation, attempts to udp connect to 127.0.0.1 or ::1 generate
EADDRNOTAVAIL when the loopback device is not configured and there is
no default route for IPv6. this caused getaddrinfo with AI_ADDRCONFIG
to fail with EAI_SYSTEM and EADDRNOTAVAIL on some no-IPv6
configurations, rather than the intended behavior of detecting IPv6 as
unsuppported and producing IPv4-only results.

previously, only EAFNOSUPPORT was treated as unavailability of the
address family being probed. instead, treat all errors related to
inability to get an address or route as conclusive that the family
being probed is unsupported, and only fail with EAI_SYSTEM on other
errors.

further improvements may be desirable, such as reporting EAI_AGAIN
instead of EAI_SYSTEM for errors which are expected to be transient,
but this patch should suffice to fix the serious regression.
---
src/network/getaddrinfo.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/network/getaddrinfo.c b/src/network/getaddrinfo.c
index ba26847a..e33bfa28 100644
--- a/src/network/getaddrinfo.c
+++ b/src/network/getaddrinfo.c
@@ -76,7 +76,16 @@ int getaddrinfo(const char *restrict host, const char *restrict serv, const stru
close(s);
if (!r) continue;
}
- if (errno != EAFNOSUPPORT) return EAI_SYSTEM;
+ switch (errno) {
+ case EADDRNOTAVAIL:
+ case EAFNOSUPPORT:
+ case EHOSTUNREACH:
+ case ENETDOWN:
+ case ENETUNREACH:
+ break;
+ default:
+ return EAI_SYSTEM;
+ }
if (family == tf[i]) return EAI_NONAME;
family = tf[1-i];
}
--
2.19.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 7d7f44253f2d8cfd0a7adf9f918d88aa24d4e012 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 13 Sep 2018 07:00:05 -0700
Subject: [PATCH] define MAX_HANDLE_SZ for use with name_to_handle_at

MAX_HANDLE_SZ is described in name_to_handle_at() to contain maximum
expected size for a file handle
---
include/fcntl.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/include/fcntl.h b/include/fcntl.h
index 99b21759..4d91338b 100644
--- a/include/fcntl.h
+++ b/include/fcntl.h
@@ -166,6 +166,7 @@ struct f_owner_ex {
};
#define FALLOC_FL_KEEP_SIZE 1
#define FALLOC_FL_PUNCH_HOLE 2
+#define MAX_HANDLE_SZ 128
#define SYNC_FILE_RANGE_WAIT_BEFORE 1
#define SYNC_FILE_RANGE_WRITE 2
#define SYNC_FILE_RANGE_WAIT_AFTER 4
--
2.19.0

71 changes: 71 additions & 0 deletions pkgs/os-specific/linux/musl/name-to-handle-at.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
From 3e14bbcd1979376b188bfabb816ff828608fb5d7 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 12 Sep 2018 18:02:11 -0700
Subject: [PATCH] wireup linux/name_to_handle_at and name_to_handle_at syscalls

---
include/fcntl.h | 7 +++++++
src/linux/name_to_handle_at.c | 10 ++++++++++
src/linux/open_by_handle_at.c | 8 ++++++++
3 files changed, 25 insertions(+)
create mode 100644 src/linux/name_to_handle_at.c
create mode 100644 src/linux/open_by_handle_at.c

diff --git a/include/fcntl.h b/include/fcntl.h
index 6d8edcd1..99b21759 100644
--- a/include/fcntl.h
+++ b/include/fcntl.h
@@ -155,6 +155,11 @@ int lockf(int, int, off_t);
#define F_OWNER_PID 1
#define F_OWNER_PGRP 2
#define F_OWNER_GID 2
+struct file_handle {
+ unsigned handle_bytes;
+ int handle_type;
+ unsigned char f_handle[];
+};
struct f_owner_ex {
int type;
pid_t pid;
@@ -170,6 +175,8 @@ struct f_owner_ex {
#define SPLICE_F_GIFT 8
int fallocate(int, int, off_t, off_t);
#define fallocate64 fallocate
+int name_to_handle_at(int, const char *, struct file_handle *, int *, int);
+int open_by_handle_at(int, struct file_handle *, int);
ssize_t readahead(int, off_t, size_t);
int sync_file_range(int, off_t, off_t, unsigned);
ssize_t vmsplice(int, const struct iovec *, size_t, unsigned);
diff --git a/src/linux/name_to_handle_at.c b/src/linux/name_to_handle_at.c
new file mode 100644
index 00000000..cd4075bd
--- /dev/null
+++ b/src/linux/name_to_handle_at.c
@@ -0,0 +1,10 @@
+#define _GNU_SOURCE
+#include <fcntl.h>
+#include "syscall.h"
+
+int name_to_handle_at(int dirfd, const char *pathname,
+ struct file_handle *handle, int *mount_id, int flags)
+{
+ return syscall(SYS_name_to_handle_at, dirfd,
+ pathname, handle, mount_id, flags);
+}
diff --git a/src/linux/open_by_handle_at.c b/src/linux/open_by_handle_at.c
new file mode 100644
index 00000000..1c9b6a2b
--- /dev/null
+++ b/src/linux/open_by_handle_at.c
@@ -0,0 +1,8 @@
+#define _GNU_SOURCE
+#include <fcntl.h>
+#include "syscall.h"
+
+int open_by_handle_at(int mount_fd, struct file_handle *handle, int flags)
+{
+ return syscall(SYS_open_by_handle_at, mount_fd, handle, flags);
+}
--
2.19.0

36 changes: 36 additions & 0 deletions pkgs/os-specific/linux/musl/stacksize-bump.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
From c0058ab465e950c2c3302d2b62e21cc0b494224b Mon Sep 17 00:00:00 2001
From: Rich Felker <dalias@aerifal.cx>
Date: Tue, 18 Sep 2018 23:11:49 -0400
Subject: [PATCH 3/4] increase default thread stack/guard size

stack size default is increased from 80k to 128k. this coincides with
Linux's hard-coded default stack for the main thread (128k is
initially committed; growth beyond that up to ulimit is contingent on
additional allocation succeeding) and GNU ld's default PT_GNU_STACK
size for FDPIC, at least on sh.

guard size default is increased from 4k to 8k to reduce the risk of
guard page jumping on overflow, since use of just over 4k of stack is
common (PATH_MAX buffers, etc.).
---
src/internal/pthread_impl.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/internal/pthread_impl.h b/src/internal/pthread_impl.h
index e73a251f..d491f975 100644
--- a/src/internal/pthread_impl.h
+++ b/src/internal/pthread_impl.h
@@ -185,8 +185,8 @@ hidden void __inhibit_ptc(void);
extern hidden unsigned __default_stacksize;
extern hidden unsigned __default_guardsize;

-#define DEFAULT_STACK_SIZE 81920
-#define DEFAULT_GUARD_SIZE 4096
+#define DEFAULT_STACK_SIZE 131072
+#define DEFAULT_GUARD_SIZE 8192

#define DEFAULT_STACK_MAX (8<<20)
#define DEFAULT_GUARD_MAX (1<<20)
--
2.19.0

7 changes: 7 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -597,6 +597,8 @@ with pkgs;

azure-cli = nodePackages.azure-cli;

azure-storage-azcopy = callPackage ../development/tools/azcopy { };

azure-vhd-utils = callPackage ../tools/misc/azure-vhd-utils { };

awless = callPackage ../tools/virtualization/awless { };
@@ -11960,6 +11962,8 @@ with pkgs;

qrupdate = callPackage ../development/libraries/qrupdate { };

qgnomeplatform = libsForQt5.callPackage ../development/libraries/qgnomeplatform { };

resolv_wrapper = callPackage ../development/libraries/resolv_wrapper { };

rhino = callPackage ../development/libraries/java/rhino {
@@ -14755,6 +14759,7 @@ with pkgs;
ubootNovena
ubootOdroidXU3
ubootOrangePiPc
ubootOrangePiZeroPlus2H5
ubootPcduino3Nano
ubootPine64
ubootQemuAarch64
@@ -20585,6 +20590,8 @@ with pkgs;

latte-dock = libsForQt5.callPackage ../applications/misc/latte-dock { };

adwaita-qt = libsForQt5.callPackage ../misc/themes/adwaita-qt { };

orion = callPackage ../misc/themes/orion {};

elementary-gtk-theme = callPackage ../misc/themes/elementary { };