unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: swedebugia <swedebugia@riseup.net>
To: Brett Gilio <brettg@posteo.net>
Cc: guix-devel@gnu.org
Subject: Re: Packaging ufw
Date: Sat, 10 Nov 2018 21:42:38 +0100	[thread overview]
Message-ID: <bab3a3bb-102c-3caa-778e-b6acd0b827b3@riseup.net> (raw)
In-Reply-To: <87ftw8aj0f.fsf@posteo.net>

[-- Attachment #1: Type: text/plain, Size: 1371 bytes --]

Hi

On 2018-11-10 19:24, Brett Gilio wrote:
> swedebugia writes:
>
>> On 2018-11-10 17:01, swedebugia wrote:
>>> Hi
>>>
>>> I like this firewall, has anybody started packaging it?
>>>
>>> If not I'm going to try.
>>>
>> Where should it be? In networking.scm or python.scm?
>>
>> We have no other firewall packages judging from my emacs-guix regex search.
> Since it is not a python library, I think it would make more sense for
> it to be located in the networking module.

Ok.

I need help.

It fails with

starting phase `install'
running "python setup.py" with command "install" and parameters 
("--prefix=/gnu/store/v8kzgqs1jdfg7wzqr9c02719ada6x8bm-ufw-0.35" 
"--single-version-externally-managed" "--root=/" "--root=/")
Found 
'/gnu/store/8assqq8vmmvn09cysg5nm3kf2075hvxd-iptables-1.6.2/sbin/iptables' 
version '1.6.2\n''
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
    or: -c --help [cmd1 cmd2 ...]
    or: -c --help-commands
    or: -c cmd --help

error: option --single-version-externally-managed not recognized

This option comes from the python-build-system.

Replacing the install phase seems necessary. But I don't know how to do 
that and did not find good examples in python.scm.

Logs and patch attached...

(also the tests fail see comment in the patch)

-- 
Cheers
Swedebugia


[-- Attachment #2: 46z1sp5bnh0j8dli9g2ppinkss6km9-ufw-0.35.drv.bz2 --]
[-- Type: application/x-bzip, Size: 5338 bytes --]

[-- Attachment #3: 0001-gnu-Add-ufw.patch --]
[-- Type: text/x-patch, Size: 2592 bytes --]

From fda52be7de905c3f73f301ac1b218fdd026deece Mon Sep 17 00:00:00 2001
From: swedebugia <swedebugia@riseup.net>
Date: Sat, 10 Nov 2018 21:39:04 +0100
Subject: [PATCH] gnu: Add ufw

* gnu/packages/networking.scm: New variable.
---
 gnu/packages/networking.scm | 43 +++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 5504742fa..b630676db 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -2262,3 +2262,46 @@ allow all other machines, without direct access to that network, to be relayed
 through the machine the Dante server is running on.  The external network will
 never see any machines other than the one Dante is running on.")
     (license (license:non-copyleft "file://LICENSE"))))
+
+(define-public ufw
+  ;; Select the branch named "release/0.35":
+  (let* ((commit "fd93d37a782d4f736201df508fb86e72641874d8"))
+    (package
+    (name "ufw")
+    (version "0.35")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://git.launchpad.net/ufw")
+                    (commit commit)))
+              (sha256
+               (base32
+                "10r2ga1w5vmg8m4z5yim01cd0g8cs6ws2h65vaj6ilg8yp8d90f9"))
+              (file-name (git-file-name name version))))
+    (build-system python-build-system)
+    (inputs `(("iptables" ,iptables)))
+    (arguments
+     ;; FIXME: All tests fail with: ModuleNotFoundError: No module named
+     ;; 'ufw'
+     '(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'fix-iptables-path
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "setup.py"
+               (("iptables_exe = ''")
+                (string-append "iptables_exe = '"
+                               (assoc-ref inputs "iptables")
+                               "/sbin/iptables'")))
+             (substitute* "setup.py"
+               (("iptables_dir = ''")
+                (string-append "iptables_dir = '"
+                               (assoc-ref inputs "iptables")
+                               "/sbin/'"))))))))
+    (home-page "https://launchpad.net/ufw")
+    (synopsis "Uncomplicated firewall")
+    (description "Uncomplicated Firewall (UFW) is a program for managing a
+netfilter firewall designed to be easy to use.  It uses a command-line
+interface consisting of a small number of simple commands, and uses iptables
+for configuration.")
+    (license license:gpl3))))
-- 
2.18.0


  reply	other threads:[~2018-11-10 20:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-10 16:01 Packaging ufw swedebugia
2018-11-10 18:19 ` swedebugia
2018-11-10 18:24   ` Brett Gilio
2018-11-10 20:42     ` swedebugia [this message]
2018-11-10 21:25       ` Danny Milosavljevic
2018-11-10 18:30   ` Pierre Neidhardt
  -- strict thread matches above, loose matches on Subject: below --
2018-11-11  1:30 Jeremiah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bab3a3bb-102c-3caa-778e-b6acd0b827b3@riseup.net \
    --to=swedebugia@riseup.net \
    --cc=brettg@posteo.net \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).