| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 |
|
| 37 | (define-module (gnu packages samba)
|
| 38 | #:use-module (guix gexp)
|
| 39 | #:use-module (guix packages)
|
| 40 | #:use-module (guix download)
|
| 41 | #:use-module (guix git-download)
|
| 42 | #:use-module (guix build-system gnu)
|
| 43 | #:use-module (guix build-system cmake)
|
| 44 | #:use-module (guix build-system copy)
|
| 45 | #:use-module ((guix licenses) #:prefix license:)
|
| 46 | #:use-module (guix utils)
|
| 47 | #:use-module (gnu packages)
|
| 48 | #:use-module (gnu packages acl)
|
| 49 | #:use-module (gnu packages admin)
|
| 50 | #:use-module (gnu packages autotools)
|
| 51 | #:use-module (gnu packages backup)
|
| 52 | #:use-module (gnu packages base)
|
| 53 | #:use-module (gnu packages bison)
|
| 54 | #:use-module (gnu packages check)
|
| 55 | #:use-module (gnu packages crypto)
|
| 56 | #:use-module (gnu packages cups)
|
| 57 | #:use-module (gnu packages compiler-tools)
|
| 58 | #:use-module (gnu packages databases)
|
| 59 | #:use-module (gnu packages dns)
|
| 60 | #:use-module (gnu packages docbook)
|
| 61 | #:use-module (gnu packages documentation)
|
| 62 | #:use-module (gnu packages glib)
|
| 63 | #:use-module (gnu packages gnome)
|
| 64 | #:use-module (gnu packages gnupg)
|
| 65 | #:use-module (gnu packages kerberos)
|
| 66 | #:use-module (gnu packages linux)
|
| 67 | #:use-module (gnu packages onc-rpc)
|
| 68 | #:use-module (gnu packages openldap)
|
| 69 | #:use-module (gnu packages perl)
|
| 70 | #:use-module (gnu packages pkg-config)
|
| 71 | #:use-module (gnu packages popt)
|
| 72 | #:use-module (gnu packages python)
|
| 73 | #:use-module (gnu packages python-crypto)
|
| 74 | #:use-module (gnu packages python-xyz)
|
| 75 | #:use-module (gnu packages readline)
|
| 76 | #:use-module (gnu packages ruby)
|
| 77 | #:use-module (gnu packages time)
|
| 78 | #:use-module (gnu packages tls)
|
| 79 | #:use-module (gnu packages web)
|
| 80 | #:use-module (gnu packages xml)
|
| 81 | #:use-module (srfi srfi-1))
|
| 82 |
|
| 83 | (define-public cifs-utils
|
| 84 | (package
|
| 85 | (name "cifs-utils")
|
| 86 | (version "7.7")
|
| 87 | (source
|
| 88 | (origin
|
| 89 | (method url-fetch)
|
| 90 | (uri (string-append "https://download.samba.org/pub/linux-cifs/"
|
| 91 | "cifs-utils/cifs-utils-" version ".tar.bz2"))
|
| 92 | (sha256 (base32
|
| 93 | "01k65yyyfl00h8kbc418px614m7g35g2w7nnyjx3zmyxlndax2ig"))))
|
| 94 | (build-system gnu-build-system)
|
| 95 | (native-inputs
|
| 96 | (list autoconf automake pkg-config
|
| 97 | |
| 98 | python-docutils)) |
| 99 | (inputs
|
| 100 | (list keyutils libcap-ng linux-pam mit-krb5 samba talloc))
|
| 101 | (arguments
|
| 102 | (list #:configure-flags #~(list "--enable-man")
|
| 103 | #:phases
|
| 104 | #~(modify-phases %standard-phases
|
| 105 | (add-before 'bootstrap 'trigger-bootstrap
|
| 106 | |
| 107 | |
| 108 | (lambda _
|
| 109 | (delete-file "configure")))
|
| 110 | (add-before 'configure 'set-root-sbin
|
| 111 | |
| 112 | (lambda _
|
| 113 | (setenv "ROOTSBINDIR" (string-append #$output "/sbin")))))))
|
| 114 | (synopsis "User-space utilities for Linux CIFS (Samba) mounts")
|
| 115 | (description "@code{cifs-utils} is a set of user-space utilities for
|
| 116 | mounting and managing @acronym{CIFS, Common Internet File System} shares using
|
| 117 | the Linux kernel CIFS client.")
|
| 118 | (home-page "https://wiki.samba.org/index.php/LinuxCIFS_utils")
|
| 119 | |
| 120 | (license license:gpl3+)))
|
| 121 |
|
| 122 | (define-public iniparser
|
| 123 | (package
|
| 124 | (name "iniparser")
|
| 125 | (version "4.2.6")
|
| 126 | (source (origin
|
| 127 | (method git-fetch)
|
| 128 | (uri (git-reference
|
| 129 | (url "https://gitlab.com/iniparser/iniparser")
|
| 130 | (commit (string-append "v" version))))
|
| 131 | (file-name (git-file-name name version))
|
| 132 | (sha256
|
| 133 | (base32
|
| 134 | "1gi2kxp55095bq2qrdfy0hxiwzpc47413ydj15xvg9nbw3s14pfg"))
|
| 135 | (patches (search-patches "iniparser-remove-fetchcontent-usage.patch"))))
|
| 136 | (build-system cmake-build-system)
|
| 137 | (arguments
|
| 138 | (list #:phases
|
| 139 | #~(modify-phases %standard-phases
|
| 140 | (add-after 'unpack 'patch-runner
|
| 141 | (lambda _
|
| 142 | (substitute* "test/CMakeLists.txt"
|
| 143 | (("@UNITY-GENERATE-TEST-RUNNER@")
|
| 144 | (string-append #$(this-package-native-input "unity-test")
|
| 145 | "/share/unity-test/generate_test_runner.rb")))))
|
| 146 | (add-after 'install 'symlink-lib
|
| 147 | (lambda _
|
| 148 | (for-each (lambda (x)
|
| 149 | (symlink x (string-append #$output "/include/" (basename x))))
|
| 150 | (find-files (string-append #$output "/include/iniparser")
|
| 151 | ".*\\.h")))))))
|
| 152 | (native-inputs (list pkg-config doxygen ruby unity-test))
|
| 153 | (home-page "https://gitlab.com/iniparser/iniparser")
|
| 154 | (synopsis "Simple @file{.ini} configuration file parsing library")
|
| 155 | (description
|
| 156 | "The iniParser C library reads and writes Windows-style @file{.ini}
|
| 157 | configuration files. These are simple text files with a basic structure
|
| 158 | composed of sections, properties, and values. While not expressive, they
|
| 159 | are easy to read, write, and modify.
|
| 160 |
|
| 161 | The library is small, thread safe, and written in portable ANSI C with no
|
| 162 | external dependencies.")
|
| 163 | (license license:expat)))
|
| 164 |
|
| 165 | (define-public nss-wrapper
|
| 166 | (package
|
| 167 | (name "nss-wrapper")
|
| 168 | (version "1.1.16")
|
| 169 | (source
|
| 170 | (origin
|
| 171 | (method git-fetch)
|
| 172 | (uri (git-reference
|
| 173 | (url "https://git.samba.org/nss_wrapper.git/")
|
| 174 | (commit (string-append "nss_wrapper-" version))))
|
| 175 | (file-name (git-file-name name version))
|
| 176 | (sha256
|
| 177 | (base32 "1kwlylml18f65drwrph6w90ilp66c20dywjssxscmwhf2jwwfpya"))))
|
| 178 | (build-system cmake-build-system)
|
| 179 | (arguments
|
| 180 | (list
|
| 181 | |
| 182 | |
| 183 | |
| 184 | |
| 185 | #:tests? #f
|
| 186 | #:configure-flags #~(list "-DUNIT_TESTING=OFF")))
|
| 187 | (native-inputs (list cmocka libxcrypt uid-wrapper))
|
| 188 | (home-page "https://cwrap.org/nss_wrapper.html")
|
| 189 | (synopsis "Wrapper for the user, group and hosts NSS API")
|
| 190 | (description
|
| 191 | "There are projects that need to be able to create, modify, and delete
|
| 192 | Unix users. Others just switch user IDs to interact with the system on behalf
|
| 193 | of another user (e.g. a user space file server). To be able to test
|
| 194 | applications like these, one needs to grant privileges to modify the passwd
|
| 195 | and group files. With this package it is possible to define your own passwd
|
| 196 | and group files to be used the software while it is under test. It also
|
| 197 | allows you to create a hosts file to set up name resolution for the addresses
|
| 198 | you use with @code{socket_wrapper}. It provides the following features:
|
| 199 | @itemize
|
| 200 | @item Provides information for user and group accounts.
|
| 201 | @item Network name resolution using a hosts file.
|
| 202 | @item Loading and testing of NSS modules.
|
| 203 | @end itemize")
|
| 204 | (license license:bsd-3)))
|
| 205 |
|
| 206 | (define-public pam-wrapper
|
| 207 | (package
|
| 208 | (name "pam-wrapper")
|
| 209 | (version "1.1.8")
|
| 210 | (source
|
| 211 | (origin
|
| 212 | (method git-fetch)
|
| 213 | (uri (git-reference
|
| 214 | (url "https://git.samba.org/pam_wrapper.git/")
|
| 215 | (commit (string-append "pam_wrapper-" version))))
|
| 216 | (file-name (git-file-name name version))
|
| 217 | (sha256
|
| 218 | (base32 "1h1n6bgzcvc6zhpi79g76zrl3fypd7q25bc2kdx18x014p9wdr4r"))))
|
| 219 | (build-system cmake-build-system)
|
| 220 | (arguments
|
| 221 | (list
|
| 222 | #:configure-flags
|
| 223 | #~(list "-DUNIT_TESTING=ON"
|
| 224 | (string-append "-DPYTHON_INSTALL_SITEARCH="
|
| 225 | #$output "/lib/python"
|
| 226 | #$(version-major+minor
|
| 227 | (package-version
|
| 228 | (this-package-native-input "python")))
|
| 229 | "/site-packages/pypamtest/"))))
|
| 230 | (native-inputs (list cmocka python))
|
| 231 | (inputs (list linux-pam))
|
| 232 | (home-page "https://cwrap.org/pam_wrapper.html")
|
| 233 | (synopsis "Tool to test PAM applications and PAM modules")
|
| 234 | (description
|
| 235 | "This package provides tools to test your PAM application or module. For
|
| 236 | testing PAM applications, a simple PAM module called @code{pam_matrix} is
|
| 237 | provided. For testing PAM modules, see the @code{pamtest} library. One can
|
| 238 | combine it with the CMocka unit testing framework or use the provided Python
|
| 239 | bindings to write tests for modules in Python.")
|
| 240 | (license license:bsd-3)))
|
| 241 |
|
| 242 | (define-public priv-wrapper
|
| 243 | (package
|
| 244 | (name "priv-wrapper")
|
| 245 | (version "1.0.1")
|
| 246 | (source
|
| 247 | (origin
|
| 248 | (method git-fetch)
|
| 249 | (uri (git-reference
|
| 250 | (url "https://git.samba.org/priv_wrapper.git/")
|
| 251 | (commit (string-append "priv_wrapper-" version))))
|
| 252 | (file-name (git-file-name name version))
|
| 253 | (sha256
|
| 254 | (base32 "04ycb3fckcz3ck1wbg9gh6x63ydkpjyc1v4340l6sdw90w7rlr66"))))
|
| 255 | (build-system cmake-build-system)
|
| 256 | (arguments
|
| 257 | (list
|
| 258 | #:configure-flags #~(list "-DUNIT_TESTING=ON")))
|
| 259 | (native-inputs (list cmocka))
|
| 260 | (home-page "https://cwrap.org/priv_wrapper.html")
|
| 261 | (synopsis "Library to drop privileges")
|
| 262 | (description
|
| 263 | "This package provides a library to disable resource limits and other
|
| 264 | privilege dropping, i.e. disabling @code{chroot}, @code{prctl},
|
| 265 | @code{pledge} and @code{setrlmit} system calls. This package aims to help
|
| 266 | running processes which are dropping privileges or are restricting resources
|
| 267 | in test environments. A disabled call always succeeds (i.e. returns 0) and
|
| 268 | does nothing.")
|
| 269 | (license license:bsd-3)))
|
| 270 |
|
| 271 | (define-public resolv-wrapper
|
| 272 | (package
|
| 273 | (name "resolv-wrapper")
|
| 274 | (version "1.1.8")
|
| 275 | (source
|
| 276 | (origin
|
| 277 | (method git-fetch)
|
| 278 | (uri (git-reference
|
| 279 | (url "https://git.samba.org/resolv_wrapper.git/")
|
| 280 | (commit (string-append "resolv_wrapper-" version))))
|
| 281 | (file-name (git-file-name name version))
|
| 282 | (sha256
|
| 283 | (base32 "18xarq1hmz7n911hjrfvp5fcgsh9kzxa2v28zgv6afx1a2djqcd9"))))
|
| 284 | (build-system cmake-build-system)
|
| 285 | (arguments
|
| 286 | (list
|
| 287 | #:configure-flags #~(list "-DUNIT_TESTING=ON")))
|
| 288 | (native-inputs (list cmocka socket-wrapper))
|
| 289 | (home-page "https://cwrap.org/resolv_wrapper.html")
|
| 290 | (synopsis "Wrapper for DNS name resolving or DNS faking")
|
| 291 | (description
|
| 292 | "This package makes it possible on most UNIX platforms to contact your
|
| 293 | own DNS implementation in your test environment. It requires socket_wrapper to
|
| 294 | be able to contact the server. Alternatively, the wrapper is able to fake DNS
|
| 295 | queries and return valid responses to your application. It provides the
|
| 296 | following features:
|
| 297 | @itemize
|
| 298 | @item Redirects name queries to the nameservers specified in your resolv.conf.
|
| 299 | @item Can fake DNS queries using a simple formatted DNS hosts file.
|
| 300 | @end itemize")
|
| 301 | (license license:bsd-3)))
|
| 302 |
|
| 303 | (define-public samba/pinned
|
| 304 | (hidden-package
|
| 305 | (package
|
| 306 | (name "samba")
|
| 307 | (version "4.24.4")
|
| 308 | (source
|
| 309 | |
| 310 | |
| 311 | (origin
|
| 312 | (method url-fetch)
|
| 313 | (uri (string-append "https://download.samba.org/pub/samba/stable/"
|
| 314 | "samba-" version ".tar.gz"))
|
| 315 | (sha256
|
| 316 | (base32 "1y2z4rl88mfmj5187bmgqxdlda6cxx35k3lqp5m65v318fmm2b6z"))))
|
| 317 | (build-system gnu-build-system)
|
| 318 | (arguments
|
| 319 | (list
|
| 320 | #:make-flags #~(list "TEST_OPTIONS=--quick") |
| 321 | #:phases
|
| 322 | #~(modify-phases %standard-phases
|
| 323 | (add-before 'configure 'setup-docbook-stylesheets
|
| 324 | (lambda* (#:key inputs #:allow-other-keys)
|
| 325 | |
| 326 | |
| 327 | (copy-file "docs-xml/build/catalog.xml.in"
|
| 328 | "docs-xml/build/catalog.xml")
|
| 329 | (substitute* "docs-xml/build/catalog.xml"
|
| 330 | (("/@abs_top_srcdir@")
|
| 331 | (string-append (getcwd) "/docs-xml")))
|
| 332 | |
| 333 | (substitute* "buildtools/wafsamba/wafsamba.py"
|
| 334 | (("XML_CATALOG_FILES=\"\\$\\{SAMBA_CATALOGS\\}" all)
|
| 335 | (string-append all " $XML_CATALOG_FILES")))))
|
| 336 | (replace 'configure
|
| 337 | |
| 338 | (lambda* (#:key inputs #:allow-other-keys)
|
| 339 | (let* ((libdir (string-append #$output "/lib")))
|
| 340 | (invoke "./configure"
|
| 341 | #$@(if (member (%current-system)
|
| 342 | (package-transitive-supported-systems
|
| 343 | python-cryptography))
|
| 344 | '("--enable-selftest")
|
| 345 | '())
|
| 346 | "--enable-fhs"
|
| 347 | (string-append "--prefix=" #$output)
|
| 348 | "--sysconfdir=/etc"
|
| 349 | "--localstatedir=/var"
|
| 350 | |
| 351 | |
| 352 | (string-append "--libdir=" libdir)
|
| 353 | (string-append "--with-privatelibdir=" libdir)
|
| 354 | "--with-system-mitkrb5"
|
| 355 | (string-append "--with-system-mitkdc="
|
| 356 | (search-input-file inputs "sbin/krb5kdc"))
|
| 357 | "--with-experimental-mit-ad-dc"))))
|
| 358 | (add-before 'install 'disable-etc,var-samba-directories-setup
|
| 359 | (lambda _
|
| 360 | (substitute* "dynconfig/wscript"
|
| 361 | (("bld\\.INSTALL_DIR.*") "")))))
|
| 362 | |
| 363 | |
| 364 | #:tests? #f))
|
| 365 | (inputs
|
| 366 | (list acl
|
| 367 | avahi
|
| 368 | bison
|
| 369 | cmocka
|
| 370 | cups
|
| 371 | gamin
|
| 372 | dbus
|
| 373 | flex
|
| 374 | gpgme
|
| 375 | gnutls
|
| 376 | jansson
|
| 377 | libarchive
|
| 378 | libtirpc
|
| 379 | libxcrypt
|
| 380 | linux-pam
|
| 381 | lmdb
|
| 382 | mit-krb5
|
| 383 | openldap
|
| 384 | perl
|
| 385 | python
|
| 386 | popt
|
| 387 | readline
|
| 388 | tdb))
|
| 389 | (propagated-inputs
|
| 390 | |
| 391 | (list ldb talloc tevent))
|
| 392 | (native-inputs
|
| 393 | (append
|
| 394 | (list perl-parse-yapp
|
| 395 | pkg-config)
|
| 396 | |
| 397 | |
| 398 | |
| 399 | (if (member (%current-system)
|
| 400 | (package-transitive-supported-systems
|
| 401 | python-cryptography))
|
| 402 | (list python-cryptography)
|
| 403 | '())
|
| 404 | (list python-dnspython-minimal
|
| 405 | python-iso8601/pinned
|
| 406 | python-markdown
|
| 407 | rpcsvc-proto |
| 408 | python-pyasn1 |
| 409 | |
| 410 | docbook-xml-4.2
|
| 411 | docbook-xsl
|
| 412 | libxslt)))
|
| 413 | (home-page "https://www.samba.org/")
|
| 414 | (synopsis
|
| 415 | "The standard Windows interoperability suite of programs for GNU and Unix")
|
| 416 | (description
|
| 417 | "Since 1992, Samba has provided secure, stable and fast file and print
|
| 418 | services for all clients using the SMB/CIFS protocol, such as all versions of
|
| 419 | DOS and Windows, OS/2, GNU/Linux and many others.
|
| 420 |
|
| 421 | Samba is an important component to seamlessly integrate Linux/Unix Servers and
|
| 422 | Desktops into Active Directory environments using the winbind daemon.")
|
| 423 | (license license:gpl3+))))
|
| 424 |
|
| 425 | (define-public samba
|
| 426 | (package
|
| 427 | (inherit samba/pinned)
|
| 428 | (properties (alist-delete 'hidden? (package-properties samba/pinned)))))
|
| 429 |
|
| 430 | (define-public talloc
|
| 431 | (package
|
| 432 | (name "talloc")
|
| 433 | (version "2.4.4")
|
| 434 | (source (origin
|
| 435 | (method url-fetch)
|
| 436 | (uri (string-append "https://www.samba.org/ftp/talloc/talloc-"
|
| 437 | version ".tar.gz"))
|
| 438 | (sha256
|
| 439 | (base32
|
| 440 | "0ndzgbkyc0v5cfcllw2y974b7yqgg0374kjlhls784wc06a7kr2m"))))
|
| 441 | (build-system gnu-build-system)
|
| 442 | (arguments
|
| 443 | '(#:phases
|
| 444 | (modify-phases %standard-phases
|
| 445 | (add-after 'unpack 'remove-crypt-reference
|
| 446 | |
| 447 | |
| 448 | |
| 449 | (lambda _
|
| 450 | (substitute* "lib/replace/replace.h"
|
| 451 | (("#include <crypt.h>")
|
| 452 | ""))))
|
| 453 | (replace 'configure
|
| 454 | (lambda* (#:key outputs #:allow-other-keys)
|
| 455 | |
| 456 | |
| 457 | (setenv "CONFIG_SHELL" (which "sh"))
|
| 458 | (let ((out (assoc-ref outputs "out")))
|
| 459 | (invoke "./configure"
|
| 460 | (string-append "--prefix=" out))))))))
|
| 461 | (native-inputs
|
| 462 | (list which))
|
| 463 | (inputs
|
| 464 | (list python))
|
| 465 | (home-page "https://talloc.samba.org")
|
| 466 | (synopsis "Hierarchical, reference counted memory pool system")
|
| 467 | (description
|
| 468 | "Talloc is a hierarchical, reference counted memory pool system with
|
| 469 | destructors. It is the core memory allocator used in Samba.")
|
| 470 | (license license:gpl3+))) |
| 471 |
|
| 472 | (define-public talloc/static
|
| 473 | (package
|
| 474 | (inherit talloc)
|
| 475 | (name "talloc-static")
|
| 476 | (synopsis
|
| 477 | "Hierarchical, reference counted memory pool system (static library)")
|
| 478 | (arguments
|
| 479 | (substitute-keyword-arguments arguments
|
| 480 | ((#:phases phases)
|
| 481 | |
| 482 | |
| 483 | |
| 484 | |
| 485 | |
| 486 | |
| 487 | `(modify-phases ,phases
|
| 488 | (replace 'build
|
| 489 | (lambda _
|
| 490 | (invoke "gcc" "-c" "-Ibin/default" "-I" "lib/replace"
|
| 491 | "-I." "-Wall" "-g" "-D__STDC_WANT_LIB_EXT1__=1"
|
| 492 | "talloc.c")
|
| 493 | (invoke "ar" "rc" "libtalloc.a" "talloc.o")))
|
| 494 | (replace 'install
|
| 495 | (lambda* (#:key outputs #:allow-other-keys)
|
| 496 | (let* ((out (assoc-ref outputs "out"))
|
| 497 | (lib (string-append out "/lib"))
|
| 498 | (include (string-append out "/include")))
|
| 499 | (mkdir-p lib)
|
| 500 | (install-file "libtalloc.a" lib)
|
| 501 | (install-file "talloc.h" include)
|
| 502 | #t)))
|
| 503 | (delete 'check))))))) |
| 504 |
|
| 505 | (define-public tevent
|
| 506 | (package
|
| 507 | (name "tevent")
|
| 508 | (version "0.17.1")
|
| 509 | (source (origin
|
| 510 | (method url-fetch)
|
| 511 | (uri (string-append "https://www.samba.org/ftp/tevent/tevent-"
|
| 512 | version ".tar.gz"))
|
| 513 | (sha256
|
| 514 | (base32
|
| 515 | "14mylyqxm0m4bn7rygn4w1ci5drywr2lky11cvh5zqnd6ykxxqhv"))))
|
| 516 | (build-system gnu-build-system)
|
| 517 | (arguments
|
| 518 | '(#:phases
|
| 519 | (modify-phases %standard-phases
|
| 520 | (add-after 'unpack 'remove-crypt-reference
|
| 521 | |
| 522 | |
| 523 | |
| 524 | (lambda _
|
| 525 | (substitute* "lib/replace/replace.h"
|
| 526 | (("#include <crypt.h>")
|
| 527 | ""))))
|
| 528 | (replace 'configure
|
| 529 | |
| 530 | (lambda* (#:key outputs #:allow-other-keys)
|
| 531 | (let ((out (assoc-ref outputs "out")))
|
| 532 | (invoke "./configure"
|
| 533 | (string-append "--prefix=" out)
|
| 534 | "--bundled-libraries=NONE")))))))
|
| 535 | (native-inputs
|
| 536 | (list cmocka pkg-config python which))
|
| 537 | (propagated-inputs
|
| 538 | (list talloc)) |
| 539 | (synopsis "Event system library")
|
| 540 | (home-page "https://tevent.samba.org/")
|
| 541 | (description
|
| 542 | "Tevent is an event system based on the talloc memory management library.
|
| 543 | It is the core event system used in Samba. The low level tevent has support for
|
| 544 | many event types, including timers, signals, and the classic file descriptor events.")
|
| 545 | (license license:lgpl3+)))
|
| 546 |
|
| 547 | (define-public ldb
|
| 548 | (package
|
| 549 | (name "ldb")
|
| 550 | (version "2.9.2")
|
| 551 | (source (origin
|
| 552 | (method url-fetch)
|
| 553 | (uri (string-append "https://www.samba.org/ftp/ldb/ldb-"
|
| 554 | version ".tar.gz"))
|
| 555 | (sha256
|
| 556 | (base32
|
| 557 | "1h6bsswcbpia86b6xzgf785m4biz06qzhhl67lfbp7f70908hmfi"))
|
| 558 | (modules '((guix build utils)))
|
| 559 | (snippet
|
| 560 | '(begin
|
| 561 | (for-each (lambda (file)
|
| 562 | |
| 563 | (unless (or (string-prefix? "third_party/waf" file)
|
| 564 | (string-suffix? "wscript" file))
|
| 565 | (delete-file file)))
|
| 566 | (find-files "third_party"))))))
|
| 567 | (build-system gnu-build-system)
|
| 568 | (arguments
|
| 569 | '( |
| 570 | |
| 571 | #:tests? (assoc-ref %build-inputs "lmdb")
|
| 572 | #:phases
|
| 573 | (modify-phases %standard-phases
|
| 574 | (add-after 'unpack 'remove-crypt-reference
|
| 575 | |
| 576 | |
| 577 | |
| 578 | (lambda _
|
| 579 | (substitute* "lib/replace/replace.h"
|
| 580 | (("#include <crypt.h>")
|
| 581 | ""))))
|
| 582 | (replace 'configure
|
| 583 | |
| 584 | (lambda* (#:key outputs #:allow-other-keys)
|
| 585 | (let ((out (assoc-ref outputs "out")))
|
| 586 | (invoke "./configure"
|
| 587 | (string-append "--prefix=" out)
|
| 588 | (string-append "--with-modulesdir=" out
|
| 589 | "/lib/ldb/modules")
|
| 590 | "--bundled-libraries=NONE")))))))
|
| 591 | (native-inputs
|
| 592 | (list cmocka pkg-config python which))
|
| 593 | (propagated-inputs
|
| 594 | |
| 595 | (list talloc tdb))
|
| 596 | (inputs
|
| 597 | `(,@(if (target-64bit?)
|
| 598 | `(("lmdb" ,lmdb))
|
| 599 | '())
|
| 600 | ("popt" ,popt)
|
| 601 | ("tevent" ,tevent)))
|
| 602 | (synopsis "LDAP-like embedded database")
|
| 603 | (home-page "https://ldb.samba.org/")
|
| 604 | (description
|
| 605 | "Ldb is a LDAP-like embedded database built on top of TDB. What ldb does
|
| 606 | is provide a fast database with an LDAP-like API designed to be used within an
|
| 607 | application. In some ways it can be seen as a intermediate solution between
|
| 608 | key-value pair databases and a real LDAP database.")
|
| 609 | (license license:lgpl3+)))
|
| 610 |
|
| 611 | (define-public ppp
|
| 612 | (package
|
| 613 | (name "ppp")
|
| 614 | (version "2.5.3")
|
| 615 | (source (origin
|
| 616 | (method git-fetch)
|
| 617 | (uri (git-reference
|
| 618 | (url "https://github.com/ppp-project/ppp")
|
| 619 | (commit (string-append "v" version))))
|
| 620 | (file-name (git-file-name name version))
|
| 621 | (sha256
|
| 622 | (base32
|
| 623 | "1jv5myag33qd8pszk3yml4pxap3638cfs3vjshjv66dmmbfb97dd"))))
|
| 624 | (build-system gnu-build-system)
|
| 625 | (arguments
|
| 626 | (list #:tests? #f |
| 627 | #:configure-flags
|
| 628 | #~(list (string-append "CC=" #$(cc-for-target))
|
| 629 | (string-append "--with-openssl="
|
| 630 | (assoc-ref %build-inputs "openssl")))
|
| 631 | #:make-flags #~(list "V=1") |
| 632 | #:phases
|
| 633 | #~(modify-phases %standard-phases
|
| 634 | (add-before 'bootstrap 'no-/bin/sh
|
| 635 | (lambda _ (delete-file "autogen.sh"))))))
|
| 636 | (native-inputs
|
| 637 | (list autoconf automake libtool))
|
| 638 | (inputs
|
| 639 | (list libpcap libxcrypt openssl))
|
| 640 | (synopsis "Implementation of the Point-to-Point Protocol")
|
| 641 | (home-page "https://ppp.samba.org/")
|
| 642 | (description
|
| 643 | "The Point-to-Point Protocol (PPP) provides a standard way to establish
|
| 644 | a network connection over a serial link. At present, this package supports IP
|
| 645 | and IPV6 and the protocols layered above them, such as TCP and UDP.")
|
| 646 | |
| 647 | |
| 648 | |
| 649 | (license (list license:bsd-3
|
| 650 | license:bsd-4
|
| 651 | license:gpl2+
|
| 652 | license:public-domain))))
|
| 653 |
|
| 654 | (define-public socket-wrapper
|
| 655 | (package
|
| 656 | (name "socket-wrapper")
|
| 657 | (version "1.5.2")
|
| 658 | (source
|
| 659 | (origin
|
| 660 | (method git-fetch)
|
| 661 | (uri (git-reference
|
| 662 | (url "https://git.samba.org/socket_wrapper.git/")
|
| 663 | (commit (string-append "socket_wrapper-" version))))
|
| 664 | (file-name (git-file-name name version))
|
| 665 | (sha256
|
| 666 | (base32
|
| 667 | "043pjwvbvhc4ip8sf441asp952qws79rzn4zvfgy2231f08ngjcl"))))
|
| 668 | (build-system cmake-build-system)
|
| 669 | (arguments
|
| 670 | (list
|
| 671 | #:configure-flags #~(list "-DUNIT_TESTING=ON")))
|
| 672 | (native-inputs (list cmocka))
|
| 673 | (home-page "https://cwrap.org/socket_wrapper.html")
|
| 674 | (synopsis "Library passing socket communications through Unix sockets")
|
| 675 | (description
|
| 676 | "This package aims to help client-server software development teams
|
| 677 | achieve full functional test coverage. It makes it possible to run several
|
| 678 | instances of the full software stack on the same machine to functionally
|
| 679 | test complex network configurations locally. It provides the following
|
| 680 | features:
|
| 681 | @itemize
|
| 682 | @item Redirects all network communication to happen over Unix sockets.
|
| 683 | @item Support for IPv4 and IPv6 socket and addressing emulation.
|
| 684 | @item Ability to capture network traffic in pcap format.
|
| 685 | @end itemize")
|
| 686 | (license license:bsd-3)))
|
| 687 |
|
| 688 | (define-public uid-wrapper
|
| 689 | (package
|
| 690 | (name "uid-wrapper")
|
| 691 | (version "1.3.2")
|
| 692 | (source
|
| 693 | (origin
|
| 694 | (method git-fetch)
|
| 695 | (uri (git-reference
|
| 696 | (url "https://git.samba.org/uid_wrapper.git/")
|
| 697 | (commit (string-append "uid_wrapper-" version))))
|
| 698 | (file-name (git-file-name name version))
|
| 699 | (sha256
|
| 700 | (base32 "1921vw95v7wv8c7zf6q5dqvbnkgbhsx37f8a0jswqd0qpp3zvvsy"))))
|
| 701 | (build-system cmake-build-system)
|
| 702 | (arguments
|
| 703 | (list
|
| 704 | #:configure-flags #~(list "-DUNIT_TESTING=ON")))
|
| 705 | (native-inputs (list cmocka))
|
| 706 | (home-page "https://cwrap.org/uid_wrapper.html")
|
| 707 | (synopsis "Testing tool to fake privilege separation")
|
| 708 | (description
|
| 709 | "Some projects, such as a file server, need privilege separation to be
|
| 710 | able to switch to the user who owns the files and do file operations on their
|
| 711 | behalf. This package convincingly lies to the application, letting it believe
|
| 712 | it is operating as root and even switching between UIDs and GIDs as
|
| 713 | needed. You can start any application making it believe it is running as
|
| 714 | root. This package provides the following features :
|
| 715 | @itemize
|
| 716 | @item Allows uid switching as a normal user.
|
| 717 | @item Start any application making it believe it is running as root.
|
| 718 | @item Support for user/group changing in the local thread using the syscalls
|
| 719 | (like glibc).
|
| 720 | @item Intercepts @code{seteuid} and related calls and simulates them in a way
|
| 721 | transparent to the application.
|
| 722 | @end itemize")
|
| 723 | (license license:bsd-3)))
|
| 724 |
|
| 725 | (define-public wsdd
|
| 726 | (package
|
| 727 | (name "wsdd")
|
| 728 | (version "0.9")
|
| 729 | (source
|
| 730 | (origin
|
| 731 | (method git-fetch)
|
| 732 | (uri (git-reference (url "https://github.com/christgau/wsdd")
|
| 733 | (commit (string-append "v" version))))
|
| 734 | (file-name (git-file-name name version))
|
| 735 | (sha256
|
| 736 | (base32 "1hshr56mcx5gb5shl4cwda3l9xqivaml9cgh9x8394bzb71qqzwb"))))
|
| 737 | (build-system gnu-build-system)
|
| 738 | (arguments
|
| 739 | (list
|
| 740 | #:tests? #f |
| 741 | #:phases
|
| 742 | #~(modify-phases %standard-phases
|
| 743 | (delete 'configure) |
| 744 | (delete 'build) |
| 745 | (replace 'install
|
| 746 | (lambda _
|
| 747 | (with-directory-excursion "src"
|
| 748 | (rename-file "wsdd.py" "wsdd")
|
| 749 | (install-file "wsdd" (string-append #$output "/bin")))
|
| 750 | (for-each
|
| 751 | (lambda (file)
|
| 752 | (install-file file
|
| 753 | (string-append #$output "/share/man/man"
|
| 754 | (string-take-right file 1))))
|
| 755 | (find-files "man" "\\.[0-9]$")))))))
|
| 756 | (inputs
|
| 757 | (list python))
|
| 758 | (home-page "https://github.com/christgau/wsdd")
|
| 759 | (synopsis "Web Service Discovery host daemon")
|
| 760 | (description "This daemon allows (Samba) hosts to be found by Web
|
| 761 | Service Discovery Clients. It also implements the client side of the
|
| 762 | discovery protocol which searches for devices implementing
|
| 763 | WSD.")
|
| 764 | (license license:expat)))
|