Commit Graph

262 Commits

Author SHA1 Message Date
Aaron Andersen
144ac73fcb samba: replace systemd dependency with systemdLibs (#551585) 2026-08-16 13:30:08 +00:00
Aaron Andersen
312c732c5e samba: replace systemd dependency with systemdLibs 2026-08-11 15:31:35 -04:00
Bart Oostveen
bc93deee13 samba: 4.23.8 -> 4.23.10
Changelog: https://www.samba.org/samba/history/samba-4.23.9.html, https://www.samba.org/samba/history/samba-4.23.10.html
Fixes: CVE-2026-6949, CVE-2026-58216, CVE-2026-58218, CVE-2026-58221, CVE-2026-58222, CVE-2026-58224
See also: https://www.openwall.com/lists/oss-security/2026/07/29/2
2026-07-29 15:16:17 +02:00
Doron Behar
bbc698fde7 sambaFull: fix samba-tool missing cryptography module (#522031) 2026-06-02 21:31:29 +00:00
zi3m5f
a59124a4b0 sambaFull: fix samba-tool missing cryptography module
samba-tool depends on cryptography python module so add it to pythonPath
if enableDomainController and also check with versionSambaTool test.
2026-06-02 21:48:29 +02:00
Martin Weinelt
125ed23f31 samba: 4.23.5 -> 4.23.8
https://www.samba.org/samba/history/samba-4.23.6.html
https://www.samba.org/samba/history/samba-4.23.7.html
https://www.samba.org/samba/history/samba-4.23.8.html

Fixes:
CVE-2026-1933, CVE-2026-2340, CVE-2026-3012, CVE-2026-3238,
CVE-2026-4408, CVE-2026-4480
2026-05-27 14:32:31 +02:00
Vladimír Čunát
0a26ec6754 samba: fix build on Darwin with newer clang (#508837) 2026-05-18 06:56:46 +00:00
Tom Fitzhenry
25d772c2f3 samba: 4.22.7 -> 4.23.5
Patch 'build-find-pre-built-heimdal-build-tools-in-case-of-.patch' no longer applied. I found that LibreELEC maintainers had posted on https://bugzilla.samba.org/show_bug.cgi?id=14164, and that they had an updated patch, so let's just fetch that.

Why do we need `--with-systemd`? Samba 4.23 has a build script regression that no longer auto-detects systemd libraries. I intend to raise this with Samba's bugzilla, but in short:

* Samba 4.23 upgraded its bundled waf from 2.0.26 (used in 4.22.x) to 2.1.6.
* waf 2.1.6 switched the CLI option parser from `optparse` to `argparse`, in which case the default boolean was previously `None`, but is now `False`.
* In `lib/util/wscript`, the systemd options are registered like `opt.add_option('--with-systemd',    action='store_true',  dest='enable_systemd')`.
* In `lib/util/wscript_configure`, the libsystemd checks are guarded by `options.enable_sytemd != False`, and thus is no longer true when unspecified.
2026-04-17 23:08:19 +00:00
Ben Siraphob
65c3884736 samba: fix build on Darwin with newer clang
The discard_const macro casts through uintptr_t, which newer clang
rejects as non-constant in static initializers. Use a direct void*
cast instead via substituteInPlace.
2026-04-10 20:55:38 -07:00
Stefan Frijters
5f99649cae samba: fix nmbd crash by disabling strictflexarrays1 hardening 2026-03-30 00:47:04 +02:00
Stefan Frijters
01ecadd9c5 samba: move env variable(s) into env for structuredAttrs 2026-02-09 22:44:41 +01:00
Fabián Heredia Montiel
a0149768d3 samba: 4.22.6 -> 4.22.7 (#483116) 2026-01-30 15:25:52 +00:00
Doron Behar
19cbbeae0f samba: avoid shebang patching by using correct pythonWrap
As explained in #480392, the shebangs need fixing not because of samba's
build system, but because our `wrapPythonPrograms` is buggy.
2026-01-25 15:02:13 +02:00
Doron Behar
9291bd92f6 samba: set strictDeps
It doesn't fix the cross compilation issues related to the surrounding
commits, but it is a good idea to set it anyway. Also, `libtasn1` needs
to be added nativeBuildInputs for `asn1Parser` to be detected properly
and for `bin/dumpmscat` script to be added.
2026-01-25 15:00:43 +02:00
Catalin
295e34d00f samba: 4.22.6 -> 4.22.7 2026-01-23 18:54:29 +02:00
Doron Behar
4d577acbc2 samba: use substitutionInPlace instead of sed in fixup
substituteInPlace is more reliable as sed won't print any warning or
error when it does nothing.
2026-01-17 21:58:32 +02:00
Doron Behar
b78fd11bc6 samba.tests.cross: make it fail due to disallowed references 2026-01-17 21:58:32 +02:00
Doron Behar
3dae8fdd0a samba: consistently use isCross using lib.systems.equal 2026-01-17 21:58:31 +02:00
Ihar Hrachyshka
567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00
Robert Schütz
f9ec89db4f samba: 4.22.5 -> 4.22.6
Changelog: https://www.samba.org/samba/history/samba-4.22.6.html
2025-12-06 11:50:50 -08:00
Martin Weinelt
63f870eaa2 samba: 4.22.3 -> 4.22.5
https://www.samba.org/samba/history/samba-4.22.3.html
https://www.samba.org/samba/history/samba-4.22.4.html
https://www.samba.org/samba/history/samba-4.22.5.html

Fixes: CVE-2025-9640, CVE-2025-10230
2025-10-16 00:21:04 +02:00
Martin Weinelt
9ef8e5d463 samba: 4.20.8 -> 4.22.3
https://www.samba.org/samba/history/samba-4.21.0.html
https://www.samba.org/samba/history/samba-4.21.1.html
https://www.samba.org/samba/history/samba-4.21.2.html
https://www.samba.org/samba/history/samba-4.21.3.html
https://www.samba.org/samba/history/samba-4.21.4.html
https://www.samba.org/samba/history/samba-4.21.5.html

https://www.samba.org/samba/history/samba-4.22.0.html
https://www.samba.org/samba/history/samba-4.22.1.html
https://www.samba.org/samba/history/samba-4.22.2.html
https://www.samba.org/samba/history/samba-4.22.3.html

Fixes: CVE-2025-0620
2025-08-16 02:21:06 +02:00
Wolfgang Walther
5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Alex James
b415ac4a9e samba: readd liburing to buildInputs on Linux
ce5ebeb90c ("samba4: fixup build on linux") removed liburing from
buildInputs on Linux to work around a compilation error [1]. A fix for
the compilation error was included in liburing 2.11 [2]. Readd the
liburing dependency to restore support for vfs_io_uring.

[1]: https://hydra.nixos.org/build/298833701/nixlog/3/tail
[2]: 1b99ce4856
2025-07-08 00:19:28 -05:00
nixpkgs-ci[bot]
c9ad1567d4 Merge master into staging-next 2025-06-05 12:07:29 +00:00
Tim Van Baak
b05348651d samba: 4.20.4 -> 4.20.8 2025-06-04 12:58:37 -07:00
Vladimír Čunát
ce5ebeb90c samba4: fixup build on linux
https://hydra.nixos.org/build/298833701/nixlog/3/tail

What I tried:
 - updating to 0.20.8 doesn't solve the issue
   (we could still do that easily, e.g. on staging;
    I just didn't feel like trashing successful binaries for aarch64-darwin)
 - upgrading to 0.22.1 brings others (2 patches not applying and more problems...)
2025-06-02 19:33:29 +02:00
Audrey Dutcher
c01d0f67b3 samba: fix cross build for FreeBSD
1) Fix dependencies for stuff that is not needed or impossible to
   build on FreeBSD
2) Add various un-emulatable-cross pieces initially developed for tdb
3) Fix many issues related to samba not actually wanting to compile
   cross between different OSes.
2025-05-28 14:29:07 -07:00
Silvan Mosberger
667d42c00d treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev 57b193d8dd
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:27:17 +01:00
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Ophestra Umiker
cdc2e32ea4 samba: fix broken tarball URLs
Samba and cifs-utils source tarballs have been silently moved to
https://download.samba.org/ without redirects.
2024-11-30 02:48:32 +09:00
Nick Cao
53b69fd41c samba: add pkgsCross.aarch64-multiplatform.samba to passthru.tests 2024-11-22 17:58:25 -05:00
Nick Cao
d04595402d samba: set correct pythondir 2024-11-22 11:08:31 -05:00
Nick Cao
f9f571f5d1 samba: resurrect cross compilation patch 2024-11-22 11:08:31 -05:00
Reno Dakota
2a44ea3ed4 samba: fix darwin
the cups headers are part of the sdk but the library is not, which
causes configure to detect cups but the build fails with a link error.
explicitly enable / disable cups based on `enablePrinting` flag.
2024-10-26 08:31:13 +02:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
Sergei Trofimovich
97ad266c07 samba: 4.20.1 -> 4.20.4
Changes:
- https://www.samba.org/samba/history/samba-4.20.2.html
- https://www.samba.org/samba/history/samba-4.20.3.html
- https://www.samba.org/samba/history/samba-4.20.4.html
2024-08-14 09:15:16 +01:00
Peder Bergebakken Sundt
d4b7361c84 Merge pull request #311458 from TomaSajt/servers-toplevel-with
Remove usage of top-level `with lib;` from `pkgs/servers`
2024-08-08 22:50:56 +02:00
adisbladis
e0816431a2 treewide: Pass self when overriding Python
Otherwise references to the Python interpreter inside the set are wrong, as demonstrated by:
``` nix
with import <nixpkgs> { };
let
  python' = python3.override {
    packageOverrides = final: prev: { requests = prev.requests.overridePythonAttrs(old: { version = "1337";  }); };
  };
in python'.pkgs.python.pkgs.requests
```
which returns the _non_ overriden requests.

And the same with `self`:
```
with import <nixpkgs> { };
let
  python' = python3.override {
    self = python';
    packageOverrides = final: prev: { requests = prev.requests.overridePythonAttrs(old: { version = "1337";  }); };
  };
in python'.pkgs.python.pkgs.requests
```
which returns the overriden requests.

This can manifest itself as file collisions when constructing environments or as subtly incorrect dependency graphs.
2024-08-03 12:18:56 +12:00
éclairevoyant
0926bdbf98 treewide: fix uses of finalAttrs.pname in source urls 2024-07-12 20:23:39 -04:00
TomaSajt
afb6c6e279 samba: remove top-level with lib; 2024-06-30 12:52:20 +02:00
Alyssa Ross
3df6bb2c85 Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
	pkgs/applications/blockchains/polkadot/default.nix
2024-06-09 22:47:12 +01:00
Alexis Hildebrandt
f8c4a98e8e treewide: Remove the definite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"([Tt]he)? ' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Tt]he (.)/\1\U\2/'
2024-06-09 23:08:46 +02:00
Alyssa Ross
67641d0589 wafHook: don't add cross compilation flags
These flags are not part of waf, they're custom flags that are not
widely implemented.  More packages are broken because of these flags
being added than actually recognise them.

Of the packages in Nixpkgs that directly depend on wafHook that we can
attempt to cross compile (i.e. all their dependencies cross compile),
5 already successfully cross compile and recognise these flags, 2
already successfully cross compile because they have been opted out of
these flags, 3 don't cross compile successfully for reasons unrelated
to these flags, and for the remaining 7, the only thing stopping them
cross compiling successfully is that they are being passed these flags
that they don't recognise.

All of the five successfully cross-compiling packages that do
recognise these flags are samba projects: ldb, talloc, tdb, tevent,
and samba4.  So this isn't a general waf convention, just a samba one.
It therefore doesn't make sense to set these flags by default.  They
should just be included in the expressions for each samba project,
like all the other quirks common to samba build systems.

This change fixes cross compilation of the following packages:

  blockhash ganv ndn-cxx mda_lv2 pflask raul saldl
2024-05-15 16:47:16 +02:00
Sergei Trofimovich
7a6de57fbf samba: 4.20.0 -> 4.20.1
Changes: https://www.samba.org/samba/history/samba-4.20.1.html
2024-05-08 22:19:29 +01:00
Mario Rodas
d1b9eb7e07 Merge pull request #302070 from anthonyroussel/samba-add-pkg-config-testers
samba,ldb: add meta.pkgConfigModules, passthru.tests.{pkg-config,version}
2024-04-19 19:48:14 -05:00
Arnout Engelen
c531d97bf8 samba: work around reproducible-builds issue
Upstream issue https://bugzilla.samba.org/show_bug.cgi?id=15632

Fixes #303436
2024-04-13 13:22:34 +02:00
Anthony Roussel
e3466f56e1 samba: add meta.pkgConfigModules, passthru.tests.{pkg-config,version} 2024-04-06 13:25:56 +02:00
qubitnano
697246c92c samba: 4.19.5 -> 4.20.0 2024-03-29 22:05:17 -04:00
R. Ryantm
7dec18dad1 samba: 4.19.4 -> 4.19.5 2024-02-19 20:25:18 +00:00