* [PATCH] gnu: Add tcp-wrappers.
@ 2016-09-04 13:20 John Darrington
2016-09-07 9:15 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: John Darrington @ 2016-09-04 13:20 UTC (permalink / raw)
To: guix-devel; +Cc: John Darrington
* gnu/packages/networking.scm (tcp-wrappers): New variable.
* gnu/packages/messaging.scm (ngircd) [inputs]: Add tcp-wrappers.
---
gnu/packages/messaging.scm | 6 ++--
gnu/packages/networking.scm | 79 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 83 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index fa4515c..b557b2f 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -44,6 +44,7 @@
#:use-module (gnu packages xorg)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages libcanberra)
+ #:use-module (gnu packages networking)
#:use-module (gnu packages libidn)
#:use-module (gnu packages lua)
#:use-module (gnu packages xml)
@@ -208,8 +209,9 @@ dictionaries. HexChat can be extended with multiple addons.")
(native-inputs `(("procps" ,procps)
("expect" ,expect)
("inetutils" ,inetutils)))
- ;; XXX Add libident, libwrap.
+ ;; XXX Add libident.
(inputs `(("zlib" ,zlib)
+ ("libwrap" ,tcp-wrappers)
("gnutls" ,gnutls)
,@(if (string-suffix? "-linux"
(or (%current-target-system)
@@ -218,7 +220,7 @@ dictionaries. HexChat can be extended with multiple addons.")
'())))
(arguments
`(#:configure-flags
- '("--with-gnutls" "--with-iconv" "--enable-ipv6"
+ '("--with-gnutls" "--with-iconv" "--enable-ipv6" "--with-tcp-wrappers"
,@(if (string-suffix? "-linux"
(or (%current-target-system)
(%current-system)))
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 07f0b9d..9a562ba 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -135,6 +135,85 @@ establish a relatively secure environment (su and chroot) for running client
or server shell scripts with network connections.")
(license license:gpl2)))
+
+(define-public tcp-wrappers
+ (package
+ (name "tcp-wrappers")
+ (version "7.6")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0p9ilj4v96q32klavx0phw9va21fjp8vpk11nbh6v2ppxnnxfhwm"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure) ; there is no configure script
+ (delete 'check) ; there are no tests
+ (replace 'build
+ (lambda _
+ (chmod "." #o755)
+ ;; Upstream doesn't generate a shared library. So we have to do it.
+ (setenv "CC" "gcc -fno-builtin -fPIC")
+ (substitute* "Makefile"
+ (("^(all[^\n]*)" line) (string-append line " libwrap.so\n
+libwrap.so: $(LIB_OBJ)\n
+\tgcc -shared $^ -o $@\n")))
+ ;; Deal with some gcc breakage.
+ (substitute* "percent_m.c"
+ (("extern char .sys_errlist.*;") ""))
+ (substitute* "scaffold.c"
+ (("extern char .malloc.*;") ""))
+ ;; This, believe it or not, is the recommended way to build!
+ (zero? (system* "make" "REAL_DAEMON_DIR=/etc" "linux"))))
+ ;; There is no make install stage, so we have to do it ourselves.
+ (replace 'install
+ (lambda _
+ (let ((out (assoc-ref %outputs "out"))
+ (man-pages `("hosts_access.3"
+ "hosts_access.5"
+ "hosts_options.5"
+ "tcpd.8"
+ "tcpdchk.8"
+ "tcpdmatch.8"))
+ (libs `("libwrap.a"
+ "libwrap.so"))
+ (headers `("tcpd.h"))
+ (bins `("safe_finger"
+ "tcpd"
+ "tcpdchk"
+ "tcpdmatch"
+ "try-from")))
+ (map (lambda (x)
+ (install-file x (string-append
+ (assoc-ref %outputs "out")
+ "/include"))) headers)
+ (map (lambda (x)
+ (install-file x (string-append
+ (assoc-ref %outputs "out")
+ "/share/man/man"
+ (string-take-right x 1)))) man-pages)
+ (map (lambda (x)
+ (install-file x (string-append
+ (assoc-ref %outputs "out")
+ "/lib/"))) libs)
+ (map (lambda (x)
+ (install-file x (string-append
+ (assoc-ref %outputs "out")
+ "/bin/"))) bins)))))))
+ (home-page "http://www.porcupine.org")
+ (synopsis "Monitor and filter incoming requests for network services")
+ (description "With this package you can monitor and filter incoming requests for
+network services. It includes a library which may be used by daemons to
+transparently check connection attempts against an access control list.")
+ (license (license:non-copyleft "file://DISCLAIMER"
+ "See the file DISCLAIMER in the distribution."))))
+
+
(define-public zeromq
(package
(name "zeromq")
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] gnu: Add tcp-wrappers.
2016-09-04 13:20 [PATCH] gnu: Add tcp-wrappers John Darrington
@ 2016-09-07 9:15 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2016-09-07 9:15 UTC (permalink / raw)
To: John Darrington; +Cc: guix-devel
John Darrington <jmd@gnu.org> skribis:
> * gnu/packages/networking.scm (tcp-wrappers): New variable.
> * gnu/packages/messaging.scm (ngircd) [inputs]: Add tcp-wrappers.
Could you commit the second part separately?
> + (map (lambda (x)
> + (install-file x (string-append
> + (assoc-ref %outputs "out")
> + "/include"))) headers)
> + (map (lambda (x)
> + (install-file x (string-append
> + (assoc-ref %outputs "out")
> + "/share/man/man"
> + (string-take-right x 1)))) man-pages)
> + (map (lambda (x)
> + (install-file x (string-append
> + (assoc-ref %outputs "out")
> + "/lib/"))) libs)
> + (map (lambda (x)
> + (install-file x (string-append
> + (assoc-ref %outputs "out")
> + "/bin/"))) bins)))))))
Please use the ‘out’ variable defined above, use ‘for-each’, and fix the
indentation:
(for-each (lambda (file)
(install-file file (string-append out "/bin")))
bins)
> + (home-page "http://www.porcupine.org")
> + (synopsis "Monitor and filter incoming requests for network services")
> + (description "With this package you can monitor and filter incoming requests for
> +network services. It includes a library which may be used by daemons to
> +transparently check connection attempts against an access control list.")
> + (license (license:non-copyleft "file://DISCLAIMER"
^
Alignment. :-)
OK with these changes, thank you!
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-07 9:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-04 13:20 [PATCH] gnu: Add tcp-wrappers John Darrington
2016-09-07 9:15 ` Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.