all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kei Kebreau <kkebreau@posteo.net>
To: Pierre Neidhardt <ambrevar@gmail.com>
Cc: 31733@debbugs.gnu.org
Subject: [bug#31733] [PATCH] gnu: encfs: Update to 1.9.5.
Date: Sat, 16 Jun 2018 16:35:19 -0400	[thread overview]
Message-ID: <87a7ru31x4.fsf@posteo.net> (raw)
In-Reply-To: <874li2hh2c.fsf@gmail.com> (Pierre Neidhardt's message of "Sat, 16 Jun 2018 17:44:27 +0200")


[-- Attachment #1.1: Type: text/plain, Size: 2491 bytes --]

Pierre Neidhardt <ambrevar@gmail.com> writes:

> Kei Kebreau <kkebreau@posteo.net> writes:
>
>>> - googletest: this one does not have an option in CMakeList.txt to be
>>>   used externally.  So either we report upstream or we patch the
>>>   CMakeList.txt.
>>>
>>
>> I see that while CMakeLists.txt doesn't have an external option to
>> control this, it *does* look for googletest in the vendor
>> directory. Perhaps we can add our own googletest as a native input and
>> remove the bundled googletest and CMakeLists.txt's references to it in a
>> snippet?
>
> I have no experience at all with googletest.  Do you know how, when and
> why to use it?
> If so, could you help me with this process?  Thanks!

I don't have experience with it either, but I did find an interesting
way around the issue in the Guix code. (Usually if I have an issue
packaging something, I try "grepping" around the existing code to see if
someone has already solved a similar problem.) I've attached a patch
(based on yours) that covers the method:

[...]
        (snippet '(begin
                    (for-each delete-file-recursively
-                             (find-files "internal" "^tinyxml2-[0-9]"
-                                         #:directories? #t))
+                             '("vendor/github.com/leethomason/tinyxml2"
+                               "vendor/github.com/google/googletest"))
                    #t))))

Here I just remove the tinyxml2 and googletest directories as discussed.

[...]
        ;; Test dependencies.
        ("expect" ,expect)
+       ("googletest-source" ,(package-source googletest))
        ("perl" ,perl)))
     (inputs
      `(("attr" ,attr)

As seen in the definition for gnucash, the idea is to extract *our*
googletest source code in place of the bundled version. This seems to be
the easiest way to deal with replacing googletest in this case rather
than completely removing it.

[...]
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'unpack-googletest
+           (lambda* (#:key inputs #:allow-other-keys)
+             (mkdir-p "vendor/github.com/google/googletest")
+             (invoke "tar" "xvf" (assoc-ref inputs "googletest-source")
+                     "-C" "vendor/github.com/google/googletest"
+                     "--strip-components=1")))

This phase does the extracting bit.

As for the Easylogging++ and google/benchmark replacements, we'd have to
start by packaging them.

Did this help at all?


[-- Attachment #1.2: 0001-gnu-encfs-Update-to-1.9.5.patch --]
[-- Type: text/plain, Size: 3060 bytes --]

From 52ce45f9ee4961207b14e7b3a2835a1db78501fd Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <ambrevar@gmail.com>
Date: Wed, 6 Jun 2018 11:47:30 +0200
Subject: [PATCH] gnu: encfs: Update to 1.9.5.

* gnu/packages/crypto.scm (encfs): Update to 1.9.5.

Signed-off-by: Kei Kebreau <kkebreau@posteo.net>
---
 gnu/packages/crypto.scm | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index 105760afa..338db04f5 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -32,6 +32,7 @@
   #:use-module (gnu packages attr)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages boost)
+  #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cryptsetup)
   #:use-module (gnu packages databases)
@@ -217,7 +218,7 @@ communication.")
 (define-public encfs
   (package
     (name "encfs")
-    (version "1.9.1")
+    (version "1.9.5")
     (source
      (origin
        (method url-fetch)
@@ -226,13 +227,13 @@ communication.")
                        version "/encfs-" version ".tar.gz"))
        (sha256
         (base32
-         "1906254dg5hwljh0h4gyrw09ms3b57dlhjfzhfzffv50yzpkl837"))
+         "0qzxavvv20577bxvly8s7d3y7bqasqclc2mllp0ddfncjm9z02a7"))
        (modules '((guix build utils)))
        ;; Remove bundled dependencies in favour of proper inputs.
        (snippet '(begin
                    (for-each delete-file-recursively
-                             (find-files "internal" "^tinyxml2-[0-9]"
-                                         #:directories? #t))
+                             '("vendor/github.com/leethomason/tinyxml2"
+                               "vendor/github.com/google/googletest"))
                    #t))))
     (build-system cmake-build-system)
     (native-inputs
@@ -240,6 +241,7 @@ communication.")
 
        ;; Test dependencies.
        ("expect" ,expect)
+       ("googletest-source" ,(package-source googletest))
        ("perl" ,perl)))
     (inputs
      `(("attr" ,attr)
@@ -247,7 +249,18 @@ communication.")
        ("openssl" ,openssl)
        ("tinyxml2" ,tinyxml2)))
     (arguments
-     `(#:configure-flags (list "-DUSE_INTERNAL_TINYXML=OFF")))
+     `(#:configure-flags (list "-DUSE_INTERNAL_TINYXML=OFF")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'unpack-googletest
+           (lambda* (#:key inputs #:allow-other-keys)
+             (mkdir-p "vendor/github.com/google/googletest")
+             (invoke "tar" "xvf" (assoc-ref inputs "googletest-source")
+                     "-C" "vendor/github.com/google/googletest"
+                     "--strip-components=1")))
+         (add-before 'check 'make-unittests
+           (lambda _
+             (invoke "make" "unittests"))))))
     (home-page "https://vgough.github.io/encfs")
     (synopsis "Encrypted virtual file system")
     (description
-- 
2.17.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2018-06-16 20:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-06  9:47 [bug#31733] [PATCH] gnu: encfs: Update to 1.9.5 Pierre Neidhardt
2018-06-14 14:53 ` Kei Kebreau
2018-06-14 15:04   ` Kei Kebreau
2018-06-16 14:04     ` Pierre Neidhardt
2018-06-16 15:23       ` Kei Kebreau
2018-06-16 15:44         ` Pierre Neidhardt
2018-06-16 20:35           ` Kei Kebreau [this message]
2018-06-17 17:11             ` Pierre Neidhardt
2018-06-18  2:01               ` bug#31733: " Kei Kebreau

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

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

  git send-email \
    --in-reply-to=87a7ru31x4.fsf@posteo.net \
    --to=kkebreau@posteo.net \
    --cc=31733@debbugs.gnu.org \
    --cc=ambrevar@gmail.com \
    /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 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.