From ade1f796cb93e804983d956efc3356bdc1cf532f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 24 May 2021 10:23:41 +0200 Subject: [PATCH 1/8] python3Packages.cssutils: 2.2.0 -> 2.3.0 https://github.com/jaraco/cssutils/blob/v2.3.0/CHANGES.rst --- .../python-modules/cssutils/default.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/cssutils/default.nix b/pkgs/development/python-modules/cssutils/default.nix index 8bfe8ea2948d..9d1aec862508 100644 --- a/pkgs/development/python-modules/cssutils/default.nix +++ b/pkgs/development/python-modules/cssutils/default.nix @@ -5,19 +5,21 @@ , setuptools-scm , toml , importlib-metadata +, cssselect +, lxml , mock , pytestCheckHook }: buildPythonPackage rec { pname = "cssutils"; - version = "2.2.0"; + version = "2.3.0"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "5bef59f6b59bdccbea8e36cb292d2be1b6be1b485fc4a9f5886616f19eb31aaf"; + sha256 = "sha256-stOxYEfKroLlxZADaTW6+htiHPRcLziIWvS+SDjw/QA="; }; nativeBuildInputs = [ @@ -30,6 +32,8 @@ buildPythonPackage rec { ]; checkInputs = [ + cssselect + lxml mock pytestCheckHook ]; @@ -38,6 +42,12 @@ buildPythonPackage rec { # access network "test_parseUrl" "encutils" + "website.logging" + ] ++ lib.optionals (pythonOlder "3.9") [ + # AttributeError: module 'importlib.resources' has no attribute 'files' + "test_parseFile" + "test_parseString" + "test_combine" ]; pythonImportsCheck = [ "cssutils" ]; From e8c8b3a760ff95ac09a7d5b1f4db872f5d4de20e Mon Sep 17 00:00:00 2001 From: astsmtl Date: Sat, 29 May 2021 04:50:19 +0300 Subject: [PATCH 2/8] rymcast: init at 1.0.6 (#123830) Co-authored-by: Sandro --- pkgs/applications/audio/rymcast/default.nix | 32 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/applications/audio/rymcast/default.nix diff --git a/pkgs/applications/audio/rymcast/default.nix b/pkgs/applications/audio/rymcast/default.nix new file mode 100644 index 000000000000..9f63dbe7bc27 --- /dev/null +++ b/pkgs/applications/audio/rymcast/default.nix @@ -0,0 +1,32 @@ +{ lib, stdenv, fetchzip, autoPatchelfHook, makeWrapper +, alsaLib, curl, gtk3, webkitgtk, zenity }: + +stdenv.mkDerivation rec { + pname = "rymcast"; + version = "1.0.6"; + + src = fetchzip { + url = "https://www.inphonik.com/files/rymcast/rymcast-${version}-linux-x64.tar.gz"; + hash = "sha256:0vjjhfrwdibjjgz3awbg30qxkjrzc4cya1f4pigwjh3r0vvrq0ga"; + stripRoot = false; + }; + + nativeBuildInputs = [ autoPatchelfHook makeWrapper ]; + + buildInputs = [ alsaLib curl gtk3 stdenv.cc.cc.lib webkitgtk zenity ]; + + installPhase = '' + mkdir -p "$out/bin" + cp RYMCast "$out/bin/" + wrapProgram "$out/bin/RYMCast" \ + --set PATH "${lib.makeBinPath [ zenity ]}" + ''; + + meta = with lib; { + description = "Player for Mega Drive/Genesis VGM files"; + homepage = "https://www.inphonik.com/products/rymcast-genesis-vgm-player/"; + license = licenses.unfree; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ astsmtl ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b99aa8983411..25530977afde 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26279,6 +26279,10 @@ in runc = callPackage ../applications/virtualization/runc {}; + rymcast = callPackage ../applications/audio/rymcast { + inherit (gnome) zenity; + }; + uade123 = callPackage ../applications/audio/uade123 {}; udevil = callPackage ../applications/misc/udevil {}; From 25bca77c48ddb0bacdb46e7398d948a348d06119 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 29 May 2021 03:50:36 +0200 Subject: [PATCH 3/8] chaos: init at 0.1.9 (#124306) Co-authored-by: Sandro --- pkgs/tools/networking/chaos/default.nix | 29 +++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 pkgs/tools/networking/chaos/default.nix diff --git a/pkgs/tools/networking/chaos/default.nix b/pkgs/tools/networking/chaos/default.nix new file mode 100644 index 000000000000..dc46032dcde6 --- /dev/null +++ b/pkgs/tools/networking/chaos/default.nix @@ -0,0 +1,29 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "chaos"; + version = "0.1.9"; + + src = fetchFromGitHub { + owner = "projectdiscovery"; + repo = "chaos-client"; + rev = "v${version}"; + sha256 = "13lblrckf65y7kd3lw4s12bi05rv4iv25sr5xbp63l9ly5sbzaz6"; + }; + + vendorSha256 = "1mc60jkf7xmf3zsb2fihsgg3jkb2mfvsw84aby2kqcf14hdsk2gl"; + + subPackages = [ + "cmd/chaos/" + ]; + + meta = with lib; { + description = "Tool to communicate with Chaos DNS API"; + homepage = "https://github.com/projectdiscovery/chaos-client"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 25530977afde..c9f41901f7a1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1213,6 +1213,8 @@ in chamber = callPackage ../tools/admin/chamber { }; + chaos = callPackage ../tools/networking/chaos { }; + charm = callPackage ../applications/misc/charm { }; chars = callPackage ../tools/text/chars { From 1cbd7ffb5668a5c518fb4069e2f2d85a2ebec784 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 28 May 2021 22:54:57 +0200 Subject: [PATCH 4/8] python3Packages.SQLAlchemy: 1.4.15 -> 1.4.16 https://github.com/sqlalchemy/sqlalchemy/releases/tag/rel_1_4_16 --- pkgs/development/python-modules/sqlalchemy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/sqlalchemy/default.nix b/pkgs/development/python-modules/sqlalchemy/default.nix index 0e03b17963ee..ec427003fc47 100644 --- a/pkgs/development/python-modules/sqlalchemy/default.nix +++ b/pkgs/development/python-modules/sqlalchemy/default.nix @@ -14,11 +14,11 @@ buildPythonPackage rec { pname = "SQLAlchemy"; - version = "1.4.15"; + version = "1.4.16"; src = fetchPypi { inherit pname version; - sha256 = "1rj9h3mcxrgh5q8qvz7m39diyil27l5mldr49mgz6xfibk3h1w8g"; + sha256 = "15yl9frbxsq90hq5b8znqy34fg5kqdw1jjw933kz709rbpxw4lzd"; }; propagatedBuildInputs = [ From 77673388f5435bee11ceb455529b2940d111979b Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 28 May 2021 23:01:22 +0200 Subject: [PATCH 5/8] python3Packages.SQLAlchemy: don't run tests in parallel Test failures on hydra look suspiciously like they stem from xdist. gw0 ok / gw1 ok / gw2 ok / gw3 ok / gw4 ok / gw5 ok / gw6 ok / gw7 ok / gw8 ok / gw9 ok / gw10 ok / gw11 ok / gw12 ok / gw13 ok / gw14 ok / gw15 ok / gw16 ok / gw17 ok / gw18 ok / gw19 C / gw20 C / gw21 C / gw22 C / gw23 C / gw24 C / gw25 C / gw26 C / gw27 C / gw28 C / gw29 C / gw30 C / gw31 C / gw32 C / gw33 C / gw34 C / gw35 C / gw36 C / gw37 C / gw38 C / gw39 C / gw40 C / gw41 C / gw42 C / gw43 C / gw44 C / gw45 C / gw46 C / gw47 CINTERNALERROR> def worker_internal_error(self, node, formatted_error): INTERNALERROR> """ INTERNALERROR> pytest_internalerror() was called on the worker. INTERNALERROR> INTERNALERROR> pytest_internalerror() arguments are an excinfo and an excrepr, which can't INTERNALERROR> be serialized, so we go with a poor man's solution of raising an exception INTERNALERROR> here ourselves using the formatted message. INTERNALERROR> """ INTERNALERROR> self._active_nodes.remove(node) INTERNALERROR> try: INTERNALERROR> > assert False, formatted_error INTERNALERROR> E AssertionError: Traceback (most recent call last): INTERNALERROR> E File "/nix/store/4v6lhz8sq9jwl3af8abs6cgpbh9lignr-python3.8-pytest-6.2.3/lib/python3.8/site-packages/_pytest/main.py", line 267, in wrap_session INTERNALERROR> E config.hook.pytest_sessionstart(session=session) INTERNALERROR> E File "/nix/store/r4lwmmknxwx3gq2bv73yf0rkli9d902d-python3.8-pluggy-0.13.1/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in __call__ INTERNALERROR> E return self._hookexec(self, self.get_hookimpls(), kwargs) INTERNALERROR> E File "/nix/store/r4lwmmknxwx3gq2bv73yf0rkli9d902d-python3.8-pluggy-0.13.1/lib/python3.8/site-packages/pluggy/manager.py", line 93, in _hookexec INTERNALERROR> E return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> E File "/nix/store/r4lwmmknxwx3gq2bv73yf0rkli9d902d-python3.8-pluggy-0.13.1/lib/python3.8/site-packages/pluggy/manager.py", line 84, in INTERNALERROR> E self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall( INTERNALERROR> E File "/nix/store/r4lwmmknxwx3gq2bv73yf0rkli9d902d-python3.8-pluggy-0.13.1/lib/python3.8/site-packages/pluggy/callers.py", line 208, in _multicall INTERNALERROR> E return outcome.get_result() INTERNALERROR> E File "/nix/store/r4lwmmknxwx3gq2bv73yf0rkli9d902d-python3.8-pluggy-0.13.1/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result INTERNALERROR> E raise ex[1].with_traceback(ex[2]) INTERNALERROR> E File "/nix/store/r4lwmmknxwx3gq2bv73yf0rkli9d902d-python3.8-pluggy-0.13.1/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall INTERNALERROR> E res = hook_impl.function(*args) INTERNALERROR> E File "/build/SQLAlchemy-1.4.15/test/../lib/sqlalchemy/testing/plugin/pytestplugin.py", line 135, in pytest_sessionstart INTERNALERROR> E asyncio._assume_async(plugin_base.post_begin) INTERNALERROR> E File "/nix/store/03hwa29jf7794x48983j44g0qvancijw-python3.8-SQLAlchemy-1.4.15/lib/python3.8/site-packages/sqlalchemy/testing/asyncio.py", line 50, in _assume_async INTERNALERROR> E return _util_async_run(fn, *args, **kwargs) INTERNALERROR> E File "/nix/store/03hwa29jf7794x48983j44g0qvancijw-python3.8-SQLAlchemy-1.4.15/lib/python3.8/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 167, in _util_async_run INTERNALERROR> E loop = asyncio.get_event_loop() INTERNALERROR> E File "/nix/store/4s0h5aawbap3xhldxhcijvl26751qrjr-python3-3.8.9/lib/python3.8/asyncio/events.py", line 639, in get_event_loop INTERNALERROR> E raise RuntimeError('There is no current event loop in thread %r.' INTERNALERROR> E RuntimeError: There is no current event loop in thread 'Dummy-1'. INTERNALERROR> E assert False INTERNALERROR> INTERNALERROR> /nix/store/ws9fk09ssyzhy93i8janlh274nay3190-python3.8-pytest-xdist-2.2.1/lib/python3.8/site-packages/xdist/dsession.py:187: AssertionError [gw18] node down: Not properly terminated replacing crashed worker gw18 [gw48] linux Python 3.8.9 cwd: /build/SQLAlchemy-1.4.15 gw0 ok / gw1 ok / gw2 ok / gw3 ok / gw4 ok / gw5 ok / gw6 ok / gw7 ok / gw8 ok / gw9 ok / gw10 ok / gw11 ok / gw12 ok / gw13 ok / gw14 ok / gw15 ok / gw16 ok / gw17 ok / gw48 C / gw19 C / gw20 C / gw21 C / gw22 C / gw23 C / gw24 C / gw25 C / gw26 C / gw27 C / gw28 C / gw29 C / gw30 C / gw31 C / gw32 C / gw33 C / gw34 C / gw35 C / gw36 C / gw37 C / gw38 C / gw39 C / gw40 C / gw41 C / gw42 C / gw43 C / gw44 C / gw45 C / gw46 C / gw47 CINTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/nix/store/4v6lhz8sq9jwl3af8abs6cgpbh9lignr-python3.8-pytest-6.2.3/lib/python3.8/site-packages/_pytest/main.py", line 269, in wrap_session INTERNALERROR> session.exitstatus = doit(config, session) or 0 INTERNALERROR> File "/nix/store/4v6lhz8sq9jwl3af8abs6cgpbh9lignr-python3.8-pytest-6.2.3/lib/python3.8/site-packages/_pytest/main.py", line 323, in _main INTERNALERROR> config.hook.pytest_runtestloop(session=session) INTERNALERROR> File "/nix/store/r4lwmmknxwx3gq2bv73yf0rkli9d902d-python3.8-pluggy-0.13.1/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in __call__ INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) INTERNALERROR> File "/nix/store/r4lwmmknxwx3gq2bv73yf0rkli9d902d-python3.8-pluggy-0.13.1/lib/python3.8/site-packages/pluggy/manager.py", line 93, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "/nix/store/r4lwmmknxwx3gq2bv73yf0rkli9d902d-python3.8-pluggy-0.13.1/lib/python3.8/site-packages/pluggy/manager.py", line 84, in INTERNALERROR> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall( INTERNALERROR> File "/nix/store/r4lwmmknxwx3gq2bv73yf0rkli9d902d-python3.8-pluggy-0.13.1/lib/python3.8/site-packages/pluggy/callers.py", line 208, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "/nix/store/r4lwmmknxwx3gq2bv73yf0rkli9d902d-python3.8-pluggy-0.13.1/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/nix/store/r4lwmmknxwx3gq2bv73yf0rkli9d902d-python3.8-pluggy-0.13.1/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "/nix/store/ws9fk09ssyzhy93i8janlh274nay3190-python3.8-pytest-xdist-2.2.1/lib/python3.8/site-packages/xdist/dsession.py", line 112, in pytest_runtestloop INTERNALERROR> self.loop_once() INTERNALERROR> File "/nix/store/ws9fk09ssyzhy93i8janlh274nay3190-python3.8-pytest-xdist-2.2.1/lib/python3.8/site-packages/xdist/dsession.py", line 135, in loop_once INTERNALERROR> call(**kwargs) INTERNALERROR> File "/nix/store/ws9fk09ssyzhy93i8janlh274nay3190-python3.8-pytest-xdist-2.2.1/lib/python3.8/site-packages/xdist/dsession.py", line 224, in worker_errordown INTERNALERROR> self._active_nodes.remove(node) INTERNALERROR> KeyError: --- pkgs/development/python-modules/sqlalchemy/default.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkgs/development/python-modules/sqlalchemy/default.nix b/pkgs/development/python-modules/sqlalchemy/default.nix index ec427003fc47..5eb1a19c8917 100644 --- a/pkgs/development/python-modules/sqlalchemy/default.nix +++ b/pkgs/development/python-modules/sqlalchemy/default.nix @@ -29,14 +29,9 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook - pytest_xdist mock ] ++ lib.optional (!isPy3k) pysqlite; - pytestFlagsArray = [ - "-n auto" - ]; - postInstall = '' sed -e 's:--max-worker-restart=5::g' -i setup.cfg ''; From 014cc9ce0abeb4a78e16e482bef64cd39f7897fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 27 May 2021 21:40:32 +0200 Subject: [PATCH 6/8] samba: 4.13.7 -> 4.14.4 fixes https://www.samba.org/samba/security/CVE-2021-20254.html --- ...l-Standardize-use-of-st_-acm-time-ns.patch | 569 ------------------ pkgs/servers/samba/4.x.nix | 6 +- 2 files changed, 2 insertions(+), 573 deletions(-) delete mode 100644 pkgs/servers/samba/0001-lib-util-Standardize-use-of-st_-acm-time-ns.patch diff --git a/pkgs/servers/samba/0001-lib-util-Standardize-use-of-st_-acm-time-ns.patch b/pkgs/servers/samba/0001-lib-util-Standardize-use-of-st_-acm-time-ns.patch deleted file mode 100644 index 6de704cba285..000000000000 --- a/pkgs/servers/samba/0001-lib-util-Standardize-use-of-st_-acm-time-ns.patch +++ /dev/null @@ -1,569 +0,0 @@ -From 55a5b9c8254126d0acef8702526c92a31200a07c Mon Sep 17 00:00:00 2001 -From: Matthew DeVore -Date: Tue, 4 Aug 2020 17:49:42 -0700 -Subject: [PATCH] lib/util: Standardize use of st_[acm]time ns - -Commit 810397f89a10, and possibly others, broke the build for macOS and -other environments which don't have st_[acm]tim fields on 'struct stat'. - -Multiple places in the codebase used the config.h values to determine -how to access the nanosecond or microsecond values of the stat -timestamps, so rather than add more, centralize them all into -lib/util/time.c. - -Also allow pvfs_fileinfo.c to read nanosecond-granularity timestamps on -platforms where it didn't before, since its #if branches were not -complete. - -Signed-off-by: Matthew DeVore -Reviewed-by: Jeremy Allison -Reviewed-by: Volker Lendecke - -Autobuild-User(master): Volker Lendecke -Autobuild-Date(master): Sat Aug 15 08:51:09 UTC 2020 on sn-devel-184 ---- - lib/replace/wscript | 2 - - lib/util/time.c | 230 ++++++++++++++++++++ - lib/util/time.h | 18 ++ - source3/lib/system.c | 121 +--------- - source3/libsmb/libsmb_stat.c | 24 +- - source4/ntvfs/posix/pvfs_fileinfo.c | 11 +- - source4/torture/libsmbclient/libsmbclient.c | 7 +- - 7 files changed, 277 insertions(+), 136 deletions(-) - -diff --git a/lib/replace/wscript b/lib/replace/wscript -index 64f305d6df0..85bc11d2f01 100644 ---- a/lib/replace/wscript -+++ b/lib/replace/wscript -@@ -746,8 +746,6 @@ def configure(conf): - - conf.CHECK_CODE('mkdir("foo",0777)', define='HAVE_MKDIR_MODE', headers='sys/stat.h') - -- conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_mtim.tv_nsec', define='HAVE_STAT_TV_NSEC', -- headers='sys/stat.h') - # we need the st_rdev test under two names - conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_rdev', - define='HAVE_STRUCT_STAT_ST_RDEV', -diff --git a/lib/util/time.c b/lib/util/time.c -index 0fac5e2e397..b5c1d700b23 100644 ---- a/lib/util/time.c -+++ b/lib/util/time.c -@@ -26,6 +26,10 @@ - #include "byteorder.h" - #include "time_basic.h" - #include "lib/util/time.h" /* Avoid /usr/include/time.h */ -+#include -+#ifndef NO_CONFIG_H -+#include "config.h" -+#endif - - /** - * @file -@@ -1232,3 +1236,229 @@ struct timespec time_t_to_full_timespec(time_t t) - } - return (struct timespec){.tv_sec = t}; - } -+ -+#if !defined(HAVE_STAT_HIRES_TIMESTAMPS) -+ -+/* Old system - no ns timestamp. */ -+time_t get_atimensec(const struct stat *st) -+{ -+ return 0; -+} -+ -+time_t get_mtimensec(const struct stat *st) -+{ -+ return 0; -+} -+ -+time_t get_ctimensec(const struct stat *st) -+{ -+ return 0; -+} -+ -+/* Set does nothing with no ns timestamp. */ -+void set_atimensec(struct stat *st, time_t ns) -+{ -+ return; -+} -+ -+void set_mtimensec(struct stat *st, time_t ns) -+{ -+ return; -+} -+ -+void set_ctimensec(struct stat *st, time_t ns) -+{ -+ return; -+} -+ -+#elif HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC -+ -+time_t get_atimensec(const struct stat *st) -+{ -+ return st->st_atimespec.tv_nsec; -+} -+ -+time_t get_mtimensec(const struct stat *st) -+{ -+ return st->st_mtimespec.tv_nsec; -+} -+ -+time_t get_ctimensec(const struct stat *st) -+{ -+ return st->st_ctimespec.tv_nsec; -+} -+ -+void set_atimensec(struct stat *st, time_t ns) -+{ -+ st->st_atimespec.tv_nsec = ns; -+} -+ -+void set_mtimensec(struct stat *st, time_t ns) -+{ -+ st->st_mtimespec.tv_nsec = ns; -+} -+ -+void set_ctimensec(struct stat *st, time_t ns) -+{ -+ st->st_ctimespec.tv_nsec = ns; -+} -+ -+#elif HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC -+ -+time_t get_atimensec(const struct stat *st) -+{ -+ return st->st_atim.tv_nsec; -+} -+ -+time_t get_mtimensec(const struct stat *st) -+{ -+ return st->st_mtim.tv_nsec; -+} -+ -+time_t get_ctimensec(const struct stat *st) -+{ -+ return st->st_ctim.tv_nsec; -+} -+ -+void set_atimensec(struct stat *st, time_t ns) -+{ -+ st->st_atim.tv_nsec = ns; -+} -+ -+void set_mtimensec(struct stat *st, time_t ns) -+{ -+ st->st_mtim.tv_nsec = ns; -+} -+void set_ctimensec(struct stat *st, time_t ns) -+{ -+ st->st_ctim.tv_nsec = ns; -+} -+ -+#elif HAVE_STRUCT_STAT_ST_MTIMENSEC -+ -+time_t get_atimensec(const struct stat *st) -+{ -+ return st->st_atimensec; -+} -+ -+time_t get_mtimensec(const struct stat *st) -+{ -+ return st->st_mtimensec; -+} -+ -+time_t get_ctimensec(const struct stat *st) -+{ -+ return st->st_ctimensec; -+} -+ -+void set_atimensec(struct stat *st, time_t ns) -+{ -+ st->st_atimensec = ns; -+} -+ -+void set_mtimensec(struct stat *st, time_t ns) -+{ -+ st->st_mtimensec = ns; -+} -+ -+void set_ctimensec(struct stat *st, time_t ns) -+{ -+ st->st_ctimensec = ns; -+} -+ -+#elif HAVE_STRUCT_STAT_ST_MTIME_N -+ -+time_t get_atimensec(const struct stat *st) -+{ -+ return st->st_atime_n; -+} -+ -+time_t get_mtimensec(const struct stat *st) -+{ -+ return st->st_mtime_n; -+} -+ -+time_t get_ctimensec(const struct stat *st) -+{ -+ return st->st_ctime_n; -+} -+ -+void set_atimensec(struct stat *st, time_t ns) -+{ -+ st->st_atime_n = ns; -+} -+ -+void set_mtimensec(struct stat *st, time_t ns) -+{ -+ st->st_mtime_n = ns; -+} -+ -+void set_ctimensec(struct stat *st, time_t ns) -+{ -+ st->st_ctime_n = ns; -+} -+ -+#elif HAVE_STRUCT_STAT_ST_UMTIME -+ -+/* Only usec timestamps available. Convert to/from nsec. */ -+ -+time_t get_atimensec(const struct stat *st) -+{ -+ return st->st_uatime * 1000; -+} -+ -+time_t get_mtimensec(const struct stat *st) -+{ -+ return st->st_umtime * 1000; -+} -+ -+time_t get_ctimensec(const struct stat *st) -+{ -+ return st->st_uctime * 1000; -+} -+ -+void set_atimensec(struct stat *st, time_t ns) -+{ -+ st->st_uatime = ns / 1000; -+} -+ -+void set_mtimensec(struct stat *st, time_t ns) -+{ -+ st->st_umtime = ns / 1000; -+} -+ -+void set_ctimensec(struct stat *st, time_t ns) -+{ -+ st->st_uctime = ns / 1000; -+} -+ -+#else -+#error CONFIGURE_ERROR_IN_DETECTING_TIMESPEC_IN_STAT -+#endif -+ -+struct timespec get_atimespec(const struct stat *pst) -+{ -+ struct timespec ret; -+ -+ ret.tv_sec = pst->st_atime; -+ ret.tv_nsec = get_atimensec(pst); -+ return ret; -+} -+ -+struct timespec get_mtimespec(const struct stat *pst) -+{ -+ struct timespec ret; -+ -+ ret.tv_sec = pst->st_mtime; -+ ret.tv_nsec = get_mtimensec(pst); -+ return ret; -+} -+ -+struct timespec get_ctimespec(const struct stat *pst) -+{ -+ struct timespec ret; -+ -+ ret.tv_sec = pst->st_mtime; -+ ret.tv_nsec = get_ctimensec(pst); -+ return ret; -+} -diff --git a/lib/util/time.h b/lib/util/time.h -index 4a90b40d5ce..04945b5f25f 100644 ---- a/lib/util/time.h -+++ b/lib/util/time.h -@@ -375,4 +375,22 @@ time_t full_timespec_to_time_t(const struct timespec *ts); - time_t nt_time_to_full_time_t(NTTIME nt); - struct timespec time_t_to_full_timespec(time_t t); - -+/* -+ * Functions to get and set the number of nanoseconds for times in a stat field. -+ * If the stat has timestamp granularity less than nanosecond, then the set_* -+ * operations will be lossy. -+ */ -+struct stat; -+time_t get_atimensec(const struct stat *); -+time_t get_mtimensec(const struct stat *); -+time_t get_ctimensec(const struct stat *); -+void set_atimensec(struct stat *, time_t); -+void set_mtimensec(struct stat *, time_t); -+void set_ctimensec(struct stat *, time_t); -+ -+/* These are convenience wrappers for the above getters. */ -+struct timespec get_atimespec(const struct stat *); -+struct timespec get_mtimespec(const struct stat *); -+struct timespec get_ctimespec(const struct stat *); -+ - #endif /* _SAMBA_TIME_H_ */ -diff --git a/source3/lib/system.c b/source3/lib/system.c -index f1265e0c43f..7c8cd19d11f 100644 ---- a/source3/lib/system.c -+++ b/source3/lib/system.c -@@ -25,7 +25,8 @@ - #include "system/capability.h" - #include "system/passwd.h" - #include "system/filesys.h" --#include "../lib/util/setid.h" -+#include "lib/util/setid.h" -+#include "lib/util/time.h" - - #ifdef HAVE_SYS_SYSCTL_H - #include -@@ -122,124 +123,6 @@ int sys_fcntl_int(int fd, int cmd, int arg) - return ret; - } - --/**************************************************************************** -- Get/Set all the possible time fields from a stat struct as a timespec. --****************************************************************************/ -- --static struct timespec get_atimespec(const struct stat *pst) --{ --#if !defined(HAVE_STAT_HIRES_TIMESTAMPS) -- struct timespec ret; -- -- /* Old system - no ns timestamp. */ -- ret.tv_sec = pst->st_atime; -- ret.tv_nsec = 0; -- return ret; --#else --#if defined(HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC) -- struct timespec ret; -- ret.tv_sec = pst->st_atim.tv_sec; -- ret.tv_nsec = pst->st_atim.tv_nsec; -- return ret; --#elif defined(HAVE_STRUCT_STAT_ST_MTIMENSEC) -- struct timespec ret; -- ret.tv_sec = pst->st_atime; -- ret.tv_nsec = pst->st_atimensec; -- return ret; --#elif defined(HAVE_STRUCT_STAT_ST_MTIME_N) -- struct timespec ret; -- ret.tv_sec = pst->st_atime; -- ret.tv_nsec = pst->st_atime_n; -- return ret; --#elif defined(HAVE_STRUCT_STAT_ST_UMTIME) -- struct timespec ret; -- ret.tv_sec = pst->st_atime; -- ret.tv_nsec = pst->st_uatime * 1000; -- return ret; --#elif defined(HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC) -- return pst->st_atimespec; --#else --#error CONFIGURE_ERROR_IN_DETECTING_TIMESPEC_IN_STAT --#endif --#endif --} -- --static struct timespec get_mtimespec(const struct stat *pst) --{ --#if !defined(HAVE_STAT_HIRES_TIMESTAMPS) -- struct timespec ret; -- -- /* Old system - no ns timestamp. */ -- ret.tv_sec = pst->st_mtime; -- ret.tv_nsec = 0; -- return ret; --#else --#if defined(HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC) -- struct timespec ret; -- ret.tv_sec = pst->st_mtim.tv_sec; -- ret.tv_nsec = pst->st_mtim.tv_nsec; -- return ret; --#elif defined(HAVE_STRUCT_STAT_ST_MTIMENSEC) -- struct timespec ret; -- ret.tv_sec = pst->st_mtime; -- ret.tv_nsec = pst->st_mtimensec; -- return ret; --#elif defined(HAVE_STRUCT_STAT_ST_MTIME_N) -- struct timespec ret; -- ret.tv_sec = pst->st_mtime; -- ret.tv_nsec = pst->st_mtime_n; -- return ret; --#elif defined(HAVE_STRUCT_STAT_ST_UMTIME) -- struct timespec ret; -- ret.tv_sec = pst->st_mtime; -- ret.tv_nsec = pst->st_umtime * 1000; -- return ret; --#elif defined(HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC) -- return pst->st_mtimespec; --#else --#error CONFIGURE_ERROR_IN_DETECTING_TIMESPEC_IN_STAT --#endif --#endif --} -- --static struct timespec get_ctimespec(const struct stat *pst) --{ --#if !defined(HAVE_STAT_HIRES_TIMESTAMPS) -- struct timespec ret; -- -- /* Old system - no ns timestamp. */ -- ret.tv_sec = pst->st_ctime; -- ret.tv_nsec = 0; -- return ret; --#else --#if defined(HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC) -- struct timespec ret; -- ret.tv_sec = pst->st_ctim.tv_sec; -- ret.tv_nsec = pst->st_ctim.tv_nsec; -- return ret; --#elif defined(HAVE_STRUCT_STAT_ST_MTIMENSEC) -- struct timespec ret; -- ret.tv_sec = pst->st_ctime; -- ret.tv_nsec = pst->st_ctimensec; -- return ret; --#elif defined(HAVE_STRUCT_STAT_ST_MTIME_N) -- struct timespec ret; -- ret.tv_sec = pst->st_ctime; -- ret.tv_nsec = pst->st_ctime_n; -- return ret; --#elif defined(HAVE_STRUCT_STAT_ST_UMTIME) -- struct timespec ret; -- ret.tv_sec = pst->st_ctime; -- ret.tv_nsec = pst->st_uctime * 1000; -- return ret; --#elif defined(HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC) -- return pst->st_ctimespec; --#else --#error CONFIGURE_ERROR_IN_DETECTING_TIMESPEC_IN_STAT --#endif --#endif --} -- - /**************************************************************************** - Return the best approximation to a 'create time' under UNIX from a stat - structure. -diff --git a/source3/libsmb/libsmb_stat.c b/source3/libsmb/libsmb_stat.c -index 790934bd565..b01aeb51ac1 100644 ---- a/source3/libsmb/libsmb_stat.c -+++ b/source3/libsmb/libsmb_stat.c -@@ -27,6 +27,7 @@ - #include "libsmbclient.h" - #include "libsmb_internal.h" - #include "../libcli/smb/smbXcli_base.h" -+#include "lib/util/time.h" - - /* - * Generate an inode number from file name for those things that need it -@@ -102,18 +103,29 @@ void setup_stat(struct stat *st, - } - - st->st_dev = dev; -- st->st_atim = access_time_ts; -- st->st_ctim = change_time_ts; -- st->st_mtim = write_time_ts; -+ -+ st->st_atime = access_time_ts.tv_sec; -+ set_atimensec(st, access_time_ts.tv_nsec); -+ -+ st->st_ctime = change_time_ts.tv_sec; -+ set_ctimensec(st, change_time_ts.tv_nsec); -+ -+ st->st_mtime = write_time_ts.tv_sec; -+ set_mtimensec(st, write_time_ts.tv_nsec); - } - - void setup_stat_from_stat_ex(const struct stat_ex *stex, - const char *fname, - struct stat *st) - { -- st->st_atim = stex->st_ex_atime; -- st->st_ctim = stex->st_ex_ctime; -- st->st_mtim = stex->st_ex_mtime; -+ st->st_atime = stex->st_ex_atime.tv_sec; -+ set_atimensec(st, stex->st_ex_atime.tv_nsec); -+ -+ st->st_ctime = stex->st_ex_ctime.tv_sec; -+ set_ctimensec(st, stex->st_ex_ctime.tv_nsec); -+ -+ st->st_mtime = stex->st_ex_mtime.tv_sec; -+ set_mtimensec(st, stex->st_ex_mtime.tv_nsec); - - st->st_mode = stex->st_ex_mode; - st->st_size = stex->st_ex_size; -diff --git a/source4/ntvfs/posix/pvfs_fileinfo.c b/source4/ntvfs/posix/pvfs_fileinfo.c -index d2e2aeea265..977ea4fa3d5 100644 ---- a/source4/ntvfs/posix/pvfs_fileinfo.c -+++ b/source4/ntvfs/posix/pvfs_fileinfo.c -@@ -21,6 +21,7 @@ - - #include "includes.h" - #include "vfs_posix.h" -+#include "lib/util/time.h" - - /**************************************************************************** - Change a unix mode to a dos mode. -@@ -72,12 +73,10 @@ NTSTATUS pvfs_fill_dos_info(struct pvfs_state *pvfs, struct pvfs_filename *name, - unix_to_nt_time(&name->dos.access_time, name->st.st_atime); - unix_to_nt_time(&name->dos.write_time, name->st.st_mtime); - unix_to_nt_time(&name->dos.change_time, name->st.st_ctime); --#ifdef HAVE_STAT_TV_NSEC -- name->dos.create_time += name->st.st_ctim.tv_nsec / 100; -- name->dos.access_time += name->st.st_atim.tv_nsec / 100; -- name->dos.write_time += name->st.st_mtim.tv_nsec / 100; -- name->dos.change_time += name->st.st_ctim.tv_nsec / 100; --#endif -+ name->dos.create_time += get_ctimensec(&name->st) / 100; -+ name->dos.access_time += get_atimensec(&name->st) / 100; -+ name->dos.write_time += get_mtimensec(&name->st) / 100; -+ name->dos.change_time += get_ctimensec(&name->st) / 100; - name->dos.attrib = dos_mode_from_stat(pvfs, &name->st); - name->dos.alloc_size = pvfs_round_alloc_size(pvfs, name->st.st_size); - name->dos.nlink = name->st.st_nlink; -diff --git a/source4/torture/libsmbclient/libsmbclient.c b/source4/torture/libsmbclient/libsmbclient.c -index 3f3992593f9..4fbd759487b 100644 ---- a/source4/torture/libsmbclient/libsmbclient.c -+++ b/source4/torture/libsmbclient/libsmbclient.c -@@ -27,6 +27,7 @@ - #include "lib/param/loadparm.h" - #include "lib/param/param_global.h" - #include "dynconfig.h" -+#include "lib/util/time.h" - - /* test string to compare with when debug_callback is called */ - #define TEST_STRING "smbc_setLogCallback test" -@@ -1231,8 +1232,8 @@ static bool torture_libsmbclient_utimes(struct torture_context *tctx) - ret = smbc_fstat(fhandle, &st); - torture_assert_int_not_equal(tctx, ret, -1, "smbc_fstat failed"); - -- tbuf[0] = convert_timespec_to_timeval(st.st_atim); -- tbuf[1] = convert_timespec_to_timeval(st.st_mtim); -+ tbuf[0] = convert_timespec_to_timeval(get_atimespec(&st)); -+ tbuf[1] = convert_timespec_to_timeval(get_mtimespec(&st)); - - tbuf[1] = timeval_add(&tbuf[1], 0, 100000); /* 100 msec */ - -@@ -1244,7 +1245,7 @@ static bool torture_libsmbclient_utimes(struct torture_context *tctx) - - torture_assert_int_equal( - tctx, -- st.st_mtim.tv_nsec / 1000, -+ get_mtimensec(&st) / 1000, - tbuf[1].tv_usec, - "smbc_utimes did not update msec"); - --- -2.29.2 - diff --git a/pkgs/servers/samba/4.x.nix b/pkgs/servers/samba/4.x.nix index c540fb20d448..7beaeb20943d 100644 --- a/pkgs/servers/samba/4.x.nix +++ b/pkgs/servers/samba/4.x.nix @@ -44,11 +44,11 @@ with lib; stdenv.mkDerivation rec { pname = "samba"; - version = "4.13.7"; + version = "4.14.4"; src = fetchurl { url = "mirror://samba/pub/samba/stable/${pname}-${version}.tar.gz"; - sha256 = "1ajvr5hzl9kmrf77hb9c71zvnm8j0xgy40nqfjz4f407cw470zaf"; + sha256 = "1fc9ix91hb1f35j69sk7rsi9pky2p0vsmw47s973bx801cm0kbw9"; }; outputs = [ "out" "dev" "man" ]; @@ -58,8 +58,6 @@ stdenv.mkDerivation rec { ./patch-source3__libads__kerberos_keytab.c.patch ./4.x-no-persistent-install-dynconfig.patch ./4.x-fix-makeflags-parsing.patch - # Backport, should be removed for version 4.14 - ./0001-lib-util-Standardize-use-of-st_-acm-time-ns.patch ]; nativeBuildInputs = [ From fe8fe5edaa3620215dfac2ef8152f0d46c812c33 Mon Sep 17 00:00:00 2001 From: Sage Raflik Date: Fri, 28 May 2021 11:22:47 -0500 Subject: [PATCH 7/8] dwm: restored config patch interface --- pkgs/top-level/all-packages.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c9f41901f7a1..cd6d3879d3f4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23150,7 +23150,11 @@ in dwl = callPackage ../applications/window-managers/dwl { }; - dwm = callPackage ../applications/window-managers/dwm { }; + dwm = callPackage ../applications/window-managers/dwm { + # dwm is configured entirely through source modification. Allow users to + # specify patches through nixpkgs.config.dwm.patches + patches = config.dwm.patches or []; + }; dwmblocks = callPackage ../applications/misc/dwmblocks { }; From 4d90a6bcc4ff4b19cd35d45fbda29b5259ec4cc6 Mon Sep 17 00:00:00 2001 From: Sage Raflik Date: Fri, 28 May 2021 13:06:29 -0500 Subject: [PATCH 8/8] dwm: added neonfuz as maintainer --- pkgs/applications/window-managers/dwm/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/window-managers/dwm/default.nix b/pkgs/applications/window-managers/dwm/default.nix index 2c3ed2e47e88..088581b67013 100644 --- a/pkgs/applications/window-managers/dwm/default.nix +++ b/pkgs/applications/window-managers/dwm/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { tags. ''; license = licenses.mit; - maintainers = with maintainers; [ viric ]; + maintainers = with maintainers; [ viric neonfuz ]; platforms = platforms.all; }; }