projects/guix·blob java-team · refs

760 lines · 30.8 KiB

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