Merge staging-next into staging

This commit is contained in:
github-actions[bot] 2021-04-07 18:14:56 +00:00 committed by GitHub
commit f1e22d45f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 65 additions and 29 deletions

View File

@ -147,6 +147,10 @@ Create a Docker image with many of the store paths being on their own layer to i
: Shell commands to run while building the final layer, without access to most of the layer contents. Changes to this layer are "on top" of all the other layers, so can create additional directories and files. : Shell commands to run while building the final layer, without access to most of the layer contents. Changes to this layer are "on top" of all the other layers, so can create additional directories and files.
`fakeRootCommands` _optional_
: Shell commands to run while creating the archive for the final layer in a fakeroot environment. Unlike `extraCommands`, you can run `chown` to change the owners of the files in the archive, changing fakeroot's state instead of the real filesystem. The latter would require privileges that the build user does not have. Static binaries do not interact with the fakeroot environment. By default all files in the archive will be owned by root.
### Behavior of `contents` in the final image {#dockerTools-buildLayeredImage-arg-contents} ### Behavior of `contents` in the final image {#dockerTools-buildLayeredImage-arg-contents}
Each path directly listed in `contents` will have a symlink in the root of the image. Each path directly listed in `contents` will have a symlink in the root of the image.

View File

@ -156,7 +156,6 @@ in
securityType = mkOption { securityType = mkOption {
type = types.str; type = types.str;
default = "user"; default = "user";
example = "share";
description = "Samba security type"; description = "Samba security type";
}; };

View File

@ -313,5 +313,13 @@ import ./make-test-python.nix ({ pkgs, ... }: {
docker.succeed( docker.succeed(
"docker images --format '{{.Repository}}' | grep -F '${examples.prefixedLayeredImage.imageName}'" "docker images --format '{{.Repository}}' | grep -F '${examples.prefixedLayeredImage.imageName}'"
) )
with subtest("buildLayeredImage supports running chown with fakeRootCommands"):
docker.succeed(
"docker load --input='${examples.layeredImageWithFakeRootCommands}'"
)
docker.succeed(
"docker run --rm ${examples.layeredImageWithFakeRootCommands.imageName} sh -c 'stat -c '%u' /home/jane | grep -E ^1000$'"
)
''; '';
}) })

View File

@ -7,6 +7,7 @@
coreutils, coreutils,
docker, docker,
e2fsprogs, e2fsprogs,
fakeroot,
findutils, findutils,
go, go,
jq, jq,
@ -740,6 +741,9 @@ rec {
created ? "1970-01-01T00:00:01Z", created ? "1970-01-01T00:00:01Z",
# Optional bash script to run on the files prior to fixturizing the layer. # Optional bash script to run on the files prior to fixturizing the layer.
extraCommands ? "", extraCommands ? "",
# Optional bash script to run inside fakeroot environment.
# Could be used for changing ownership of files in customisation layer.
fakeRootCommands ? "",
# We pick 100 to ensure there is plenty of room for extension. I # We pick 100 to ensure there is plenty of room for extension. I
# believe the actual maximum is 128. # believe the actual maximum is 128.
maxLayers ? 100 maxLayers ? 100
@ -765,19 +769,24 @@ rec {
customisationLayer = symlinkJoin { customisationLayer = symlinkJoin {
name = "${baseName}-customisation-layer"; name = "${baseName}-customisation-layer";
paths = contentsList; paths = contentsList;
inherit extraCommands; inherit extraCommands fakeRootCommands;
nativeBuildInputs = [ fakeroot ];
postBuild = '' postBuild = ''
mv $out old_out mv $out old_out
(cd old_out; eval "$extraCommands" ) (cd old_out; eval "$extraCommands" )
mkdir $out mkdir $out
tar \ fakeroot bash -c '
--sort name \ source $stdenv/setup
--owner 0 --group 0 --mtime "@$SOURCE_DATE_EPOCH" \ cd old_out
--hard-dereference \ eval "$fakeRootCommands"
-C old_out \ tar \
-cf $out/layer.tar . --sort name \
--numeric-owner --mtime "@$SOURCE_DATE_EPOCH" \
--hard-dereference \
-cf $out/layer.tar .
'
sha256sum $out/layer.tar \ sha256sum $out/layer.tar \
| cut -f 1 -d ' ' \ | cut -f 1 -d ' ' \

View File

@ -484,4 +484,17 @@ rec {
tag = "latest"; tag = "latest";
config.Cmd = [ "${pkgs.hello}/bin/hello" ]; config.Cmd = [ "${pkgs.hello}/bin/hello" ];
}; };
# layered image with files owned by a user other than root
layeredImageWithFakeRootCommands = pkgs.dockerTools.buildLayeredImage {
name = "layered-image-with-fake-root-commands";
tag = "latest";
contents = [
pkgs.pkgsStatic.busybox
];
fakeRootCommands = ''
mkdir -p ./home/jane
chown 1000 ./home/jane
'';
};
} }

View File

@ -33,11 +33,11 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "bokeh"; pname = "bokeh";
version = "2.3.0"; version = "2.2.3"; # update together with panel which is not straightforward
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "dd417708f90702190222b1068a645acae99e66d4b58d7a336d545aeaa04e9b40"; sha256 = "c4a3f97afe5f525019dd58ee8c4e3d43f53fe1b1ac264ccaae9b02c07b2abc17";
}; };
patches = [ patches = [

View File

@ -2,11 +2,11 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "PyChromecast"; pname = "PyChromecast";
version = "9.1.1"; version = "9.1.2";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "sha256-q52h0u9CSx/HVfZDb1RaVgVuxt4kB16T82nqyOuCGDc="; sha256 = "sha256-kHZWzqRtOdDpPsgVl5V470+29lX9i/TojmQh/NeCToU=";
}; };
disabled = !isPy3k; disabled = !isPy3k;

View File

@ -7,15 +7,16 @@
, mock , mock
, graphviz , graphviz
, pycodestyle , pycodestyle
, fontconfig
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "transitions"; pname = "transitions";
version = "0.8.7"; version = "0.8.8";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "8c60ec0828cd037820726283cad5d4d77a5e31514e058b51250420e9873e9bc7"; sha256 = "sha256-56hrMaFhp2Ez8Ymzrp2tJ1WoDqTB4O7hgFZI0CH7Z30=";
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [
@ -30,10 +31,9 @@ buildPythonPackage rec {
pycodestyle pycodestyle
]; ];
disabledTests = [ preCheck = ''
# Fontconfig error: Cannot load default config file export FONTCONFIG_FILE=${fontconfig.out}/etc/fonts/fonts.conf
"test_diagram" '';
];
meta = with lib; { meta = with lib; {
homepage = "https://github.com/pytransitions/transitions"; homepage = "https://github.com/pytransitions/transitions";

View File

@ -24,7 +24,7 @@ python3.pkgs.buildPythonApplication rec {
# Add pkg-config file so that Meson projects can find this. # Add pkg-config file so that Meson projects can find this.
# https://gitlab.gnome.org/ebassi/gi-docgen/merge_requests/26 # https://gitlab.gnome.org/ebassi/gi-docgen/merge_requests/26
(fetchpatch { (fetchpatch {
url = "https://gitlab.gnome.org/ebassi/gi-docgen/commit/d65ed2e4827c4129d26e3c1df9a48054b4e72c50.patch"; url = "https://gitlab.gnome.org/jtojnar/gi-docgen/commit/d65ed2e4827c4129d26e3c1df9a48054b4e72c50.patch";
sha256 = "BEefcHiAd/HTW5zo39J2WtfQjGXUkNFB6MDJj8/Ge80="; sha256 = "BEefcHiAd/HTW5zo39J2WtfQjGXUkNFB6MDJj8/Ge80=";
}) })

View File

@ -2,13 +2,13 @@
buildGoModule rec { buildGoModule rec {
pname = "ginkgo"; pname = "ginkgo";
version = "1.16.0"; version = "1.16.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "onsi"; owner = "onsi";
repo = "ginkgo"; repo = "ginkgo";
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-phVpOKgMhebkVQlMDO/9IrETe72hXTgyGJtlKipKgv0="; sha256 = "sha256-nlNft9jOp8V8ks32LOb4wUTkRrXJ5K49gbHuRmCKz/0=";
}; };
vendorSha256 = "sha256-tS8YCGVOsfQp02vY6brmE3pxi70GG9DYcp1JDkcVG9Y="; vendorSha256 = "sha256-tS8YCGVOsfQp02vY6brmE3pxi70GG9DYcp1JDkcVG9Y=";
doCheck = false; doCheck = false;

View File

@ -8,6 +8,6 @@ let
in in
buildNodejs { buildNodejs {
inherit enableNpm; inherit enableNpm;
version = "15.13.0"; version = "15.14.0";
sha256 = "1wd859bxd8j97xl98k61g0vwcmy83wvjj04fgway38aapk9abp4h"; sha256 = "0vm6jdazqjd1plqsgngzvjrafv2d3mdahk6il4ray02gx97dq8l1";
} }

View File

@ -197,6 +197,7 @@ in with py.pkgs; buildPythonApplication rec {
"caldav" "caldav"
"calendar" "calendar"
"camera" "camera"
"cast"
"climate" "climate"
"cloud" "cloud"
"command_line" "command_line"

View File

@ -3,6 +3,8 @@ let
package = (import ./node.nix { inherit pkgs system; }).package; package = (import ./node.nix { inherit pkgs system; }).package;
in in
package.override rec { package.override rec {
# don't upgrade! Newer versions cause stack overflows and fail trunk-combined
# see https://github.com/NixOS/nixpkgs/pull/118400
version = "1.16.2"; version = "1.16.2";
reconstructLock = true; reconstructLock = true;

View File

@ -1,10 +1,10 @@
{ lib, stdenv, file, fetchurl, makeWrapper, { lib, stdenv, file, fetchurl, makeWrapper,
autoPatchelfHook, jsoncpp, libpulseaudio }: autoPatchelfHook, jsoncpp, libpulseaudio }:
let let
versionMajor = "7.2"; versionMajor = "7.4";
versionMinor = "3"; versionMinor = "1";
versionBuild_x86_64 = "8"; versionBuild_x86_64 = "1";
versionBuild_i686 = "8"; versionBuild_i686 = "1";
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "nomachine-client"; pname = "nomachine-client";
@ -14,12 +14,12 @@ in
if stdenv.hostPlatform.system == "x86_64-linux" then if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl { fetchurl {
url = "https://download.nomachine.com/download/${versionMajor}/Linux/nomachine_${version}_${versionBuild_x86_64}_x86_64.tar.gz"; url = "https://download.nomachine.com/download/${versionMajor}/Linux/nomachine_${version}_${versionBuild_x86_64}_x86_64.tar.gz";
sha256 = "1x60vmngq4927qvy6ljmyvwlz5lapilld3495w3y3jdllwd3dxp4"; sha256 = "1qir9ii0h5ali87mjzjl72dm1ky626d7y59jfpglakqxzqhjamdz";
} }
else if stdenv.hostPlatform.system == "i686-linux" then else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl { fetchurl {
url = "https://download.nomachine.com/download/${versionMajor}/Linux/nomachine_${version}_${versionBuild_i686}_i686.tar.gz"; url = "https://download.nomachine.com/download/${versionMajor}/Linux/nomachine_${version}_${versionBuild_i686}_i686.tar.gz";
sha256 = "0dx921g6w3gk0x4p771qqxbbi16vl11hmdzzwhfczrq90pgzrhks"; sha256 = "1gxiysc09k3jz1pkkyfqgw2fygcnmrnskk6b9vn4fjnvsab4py60";
} }
else else
throw "NoMachine client is not supported on ${stdenv.hostPlatform.system}"; throw "NoMachine client is not supported on ${stdenv.hostPlatform.system}";