From 8b1d659c6bda61723b373a4ea74a76c35c2af552 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 31 Oct 2023 19:47:30 +0000 Subject: [PATCH] ksmbd-tools: 3.4.9 -> 3.5.0 --- ...kip-installing-example-configuration.patch | 38 +++++++++++++++++++ .../os-specific/linux/ksmbd-tools/default.nix | 19 +++++----- 2 files changed, 48 insertions(+), 9 deletions(-) create mode 100644 pkgs/os-specific/linux/ksmbd-tools/0001-skip-installing-example-configuration.patch diff --git a/pkgs/os-specific/linux/ksmbd-tools/0001-skip-installing-example-configuration.patch b/pkgs/os-specific/linux/ksmbd-tools/0001-skip-installing-example-configuration.patch new file mode 100644 index 000000000000..2b4b35774d19 --- /dev/null +++ b/pkgs/os-specific/linux/ksmbd-tools/0001-skip-installing-example-configuration.patch @@ -0,0 +1,38 @@ +From 592de67191a3969fcccef6293740c7142793d461 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= +Date: Wed, 1 Nov 2023 21:54:05 +0100 +Subject: [PATCH] skip installing example configuration +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This requires root if prefix dir is pointed to /etc, +which we cannot do in nix builds. + +Signed-off-by: Jörg Thalheim +--- + meson.build | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/meson.build b/meson.build +index 5f5935f..8373013 100644 +--- a/meson.build ++++ b/meson.build +@@ -114,10 +114,10 @@ else + runstatedir = rundir + endif + +-install_data( +- sources: 'ksmbd.conf.example', +- install_dir: get_option('sysconfdir') / 'ksmbd', +-) ++#install_data( ++# sources: 'ksmbd.conf.example', ++# install_dir: get_option('sysconfdir') / 'ksmbd', ++#) + + systemdsystemunitdir = get_option('systemdsystemunitdir') + if systemdsystemunitdir == '' +-- +2.42.0 + diff --git a/pkgs/os-specific/linux/ksmbd-tools/default.nix b/pkgs/os-specific/linux/ksmbd-tools/default.nix index 6813e773a959..4098f6c22258 100644 --- a/pkgs/os-specific/linux/ksmbd-tools/default.nix +++ b/pkgs/os-specific/linux/ksmbd-tools/default.nix @@ -1,8 +1,8 @@ { lib , stdenv , fetchFromGitHub -, autoconf -, automake +, meson +, ninja , glib , libkrb5 , libnl @@ -13,22 +13,23 @@ stdenv.mkDerivation rec { pname = "ksmbd-tools"; - version = "3.4.9"; + version = "3.5.0"; src = fetchFromGitHub { owner = "cifsd-team"; repo = pname; rev = version; - sha256 = "sha256-GZccOlp9zZMqtv3+u8JnKFfIe8sjwbZBLkDk8lt3CGk="; + sha256 = "sha256-8mjfKCazigHnuN7Egf11ZuD+nQx7ZTesn0a4LsVvV/M="; }; buildInputs = [ glib libnl ] ++ lib.optional withKerberos libkrb5; - nativeBuildInputs = [ autoconf automake libtool pkg-config ]; - - preConfigure = "./autogen.sh"; - - configureFlags = lib.optional withKerberos "--enable-krb5"; + nativeBuildInputs = [ meson ninja libtool pkg-config ]; + patches = [ ./0001-skip-installing-example-configuration.patch ]; + mesonFlags = [ + "-Drundir=/run" + "--sysconfdir /etc" + ]; meta = with lib; { description = "Userspace utilities for the ksmbd kernel SMB server";