diff mbox

[2/2] gnu: encfs: Update to 1.9.

Message ID 1473556426-19703-2-git-send-email-me@tobias.gr
State New
Headers show

Commit Message

Tobias Geerinckx-Rice Sept. 11, 2016, 1:13 a.m. UTC
* gnu/packages/crypto.scm (encfs): Update to 1.9.
[source]: Remove bundled TinyXML2 in a snippet.
[build-system]: Switch to cmake-build-system.
[arguments]: Remove autotools-related phases and configure-flags.
Don't use bundled TinyXML2.
[native-inputs]: Remove autoconf, automake, libtool, and pkg-config.
Add expect.
[inputs]: Remove boost and rlog, while adding attr and tinyxml2.
[license]: Add expat licence for new easylogging++.h file.
---
 gnu/packages/crypto.scm | 41 ++++++++++++++++++++++-------------------
 1 file changed, 22 insertions(+), 19 deletions(-)

Comments

Ludovic Courtès Sept. 12, 2016, 1:42 p.m. UTC | #1
Tobias Geerinckx-Rice <me@tobias.gr> skribis:

> * gnu/packages/crypto.scm (encfs): Update to 1.9.
> [source]: Remove bundled TinyXML2 in a snippet.
> [build-system]: Switch to cmake-build-system.
> [arguments]: Remove autotools-related phases and configure-flags.
> Don't use bundled TinyXML2.
> [native-inputs]: Remove autoconf, automake, libtool, and pkg-config.
> Add expect.
> [inputs]: Remove boost and rlog, while adding attr and tinyxml2.
> [license]: Add expat licence for new easylogging++.h file.

[...]

> +       (snippet '(for-each delete-file-recursively
> +                           (find-files "internal" "tinyxml2")))))

Note that the 2nd argument to ‘find-files’ is a regexp.  Is this really
intended?

Otherwise LGTM, thanks!

Ludo’.
Tobias Geerinckx-Rice Sept. 12, 2016, 1:54 p.m. UTC | #2
Ludo',

On 12/09/16 15:42, Ludovic Courtès wrote:
>> +       (snippet '(for-each delete-file-recursively
>> +                           (find-files "internal" "tinyxml2")))))
> 
> Note that the 2nd argument to ‘find-files’ is a regexp.  Is this really
> intended?

It is. The directory to be deleted is actually named "tinyxml2-3.0.0"
(or so), with future version bumps too easy to miss.

This seemed like the clea{n,r}est syntax, but then I'm already familiar
with find-files. I could change it to "^tinyxml2" for no other reason
than to scream ‘I'm a regex’ if you think that's needed.

> Otherwise LGTM, thanks!

Thank you!

Kind regards,

T G-R
Ludovic Courtès Sept. 13, 2016, 12:11 p.m. UTC | #3
Tobias Geerinckx-Rice <me@tobias.gr> skribis:

> On 12/09/16 15:42, Ludovic Courtès wrote:
>>> +       (snippet '(for-each delete-file-recursively
>>> +                           (find-files "internal" "tinyxml2")))))
>> 
>> Note that the 2nd argument to ‘find-files’ is a regexp.  Is this really
>> intended?
>
> It is. The directory to be deleted is actually named "tinyxml2-3.0.0"
> (or so), with future version bumps too easy to miss.

OK, makes sense.

However, ‘find-files’ does not include directories in its result, unless
you explicitly ask for it.  So probably it should be:

  (for-each delete-file-recursively
            (find-files "internal" "^tinyxml2"
                        #:directories? #t))

?

Ludo’.
Tobias Geerinckx-Rice Sept. 13, 2016, 6:25 p.m. UTC | #4
Ludo',

On 13/09/16 14:11, Ludovic Courtès wrote:
> However, ‘find-files’ does not include directories in its result, 
> unless you explicitly ask for it.  So probably it should be:
> 
> (for-each delete-file-recursively (find-files "internal" "^tinyxml2" 
> #:directories? #t))

Indeed, thanks. I'll push with the more specific

    (snippet '(for-each delete-file-recursively
                        (find-files "internal" "^tinyxml2-[0-9]"
                                    #:directories? #t)))))

unless anyone raises any objections. Otherwise, find-files returns some
matching subdirectories as well (‘^tinyxml2-.*/.*/tinyxml2-.*’) which
delete-file-recursively still tries to delete after the parent is gone.

Kind regards,

T G-R
Ludovic Courtès Sept. 13, 2016, 9:59 p.m. UTC | #5
Tobias Geerinckx-Rice <me@tobias.gr> skribis:

> Ludo',
>
> On 13/09/16 14:11, Ludovic Courtès wrote:
>> However, ‘find-files’ does not include directories in its result, 
>> unless you explicitly ask for it.  So probably it should be:
>> 
>> (for-each delete-file-recursively (find-files "internal" "^tinyxml2" 
>> #:directories? #t))
>
> Indeed, thanks. I'll push with the more specific
>
>     (snippet '(for-each delete-file-recursively
>                         (find-files "internal" "^tinyxml2-[0-9]"
>                                     #:directories? #t)))))
>
> unless anyone raises any objections. Otherwise, find-files returns some
> matching subdirectories as well (‘^tinyxml2-.*/.*/tinyxml2-.*’) which
> delete-file-recursively still tries to delete after the parent is gone.

Sounds good!

Thanks,
Ludo’.
diff mbox

Patch

diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index 055551f..ea1eba1 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -23,6 +23,7 @@ 
 
 (define-module (gnu packages crypto)
   #:use-module (gnu packages)
+  #:use-module (gnu packages attr)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages gettext)
@@ -34,11 +35,14 @@ 
   #:use-module (gnu packages perl)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages serialization)
+  #:use-module (gnu packages tcl)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages xml)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu))
 
 (define-public libsodium
@@ -185,7 +189,7 @@  communication.")
 (define-public encfs
   (package
     (name "encfs")
-    (version "1.8.1")
+    (version "1.9")
     (source
      (origin
        (method url-fetch)
@@ -194,27 +198,25 @@  communication.")
                        version "/encfs-" version ".tar.gz"))
        (sha256
         (base32
-         "1lfmcsk187qr6ahy8c8959p7jrk9d5rd9kcsx572850ca3zmf0la"))))
-    (build-system gnu-build-system)
+         "1gzlhq2dlwan3hll414wqinj92lb05wd4j370j190dgcalaxplih"))
+       (modules '((guix build utils)))
+       ;; Remove bundled dependencies in favour of proper inputs.
+       (snippet '(for-each delete-file-recursively
+                           (find-files "internal" "tinyxml2")))))
+    (build-system cmake-build-system)
     (arguments
-     `(#:configure-flags '("--with-boost-serialization=boost_wserialization"
-                           "--with-boost-filesystem=boost_filesystem")
-       #:phases (modify-phases %standard-phases
-                  (add-before 'configure 'autoconf
-                    (lambda _
-                      (zero? (system* "autoreconf" "-vfi")))))))
+     `(#:configure-flags (list "-DUSE_INTERNAL_TINYXML=OFF")))
     (native-inputs
-     `(("autoconf" ,autoconf)
-       ("automake" ,automake)
-       ("gettext" ,gnu-gettext)
-       ("libtool" ,libtool)
-       ("perl" ,perl)
-       ("pkg-config" ,pkg-config)))
+     `(("gettext" ,gnu-gettext)
+
+       ;; Test dependencies.
+       ("expect" ,expect)
+       ("perl" ,perl)))
     (inputs
-     `(("boost" ,boost)
+     `(("attr" ,attr)
        ("fuse" ,fuse)
        ("openssl" ,openssl)
-       ("rlog" ,rlog)))
+       ("tinyxml2" ,tinyxml2)))
     (home-page "https://vgough.github.io/encfs")
     (synopsis "Encrypted virtual file system")
     (description
@@ -223,8 +225,9 @@  created under an EncFS mount point is stored as a separate encrypted file on
 the underlying file system.  Like most encrypted file systems, EncFS is meant
 to provide security against off-line attacks, such as a drive falling into
 the wrong hands.")
-    (license (list license:lgpl3+                 ;encfs library
-                   license:gpl3+))))              ;command-line tools
+    (license (list license:expat                  ; internal/easylogging++.h
+                   license:lgpl3+                 ; encfs library
+                   license:gpl3+))))              ; command-line tools
 
 (define-public keyutils
   (package