unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#33980] gnu: Add pwsafe
@ 2019-01-04 22:32 Tim Gesthuizen
  2019-01-09 17:00 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Gesthuizen @ 2019-01-04 22:32 UTC (permalink / raw)
  To: 33980


[-- Attachment #1.1.1: Type: text/plain, Size: 100 bytes --]

Hi,
The attached patch adds pwsafe.
Please tell me if something is wrong with the patch.

Tim.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.2: 0001-gnu-Add-pwsafe.patch --]
[-- Type: text/x-patch; name="0001-gnu-Add-pwsafe.patch", Size: 3589 bytes --]

From b85b078e18a8166231320f05e938f5f0264f5097 Mon Sep 17 00:00:00 2001
From: Tim Gesthuizen <tim.gesthuizen@yahoo.de>
Date: Sat, 29 Dec 2018 23:21:58 +0100
Subject: [PATCH] gnu: Add pwsafe

* gnu/packages/password-utils.scm (pwsafe): New variable
---
 gnu/packages/password-utils.scm | 41 +++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 357ef86d5..31b303a1e 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -21,6 +21,7 @@
 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
+;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -42,6 +43,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix packages)
   #:use-module (gnu packages)
   #:use-module (gnu packages admin)
@@ -52,6 +54,7 @@
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages gnuzilla)
@@ -72,6 +75,7 @@
   #:use-module (gnu packages tls)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages version-control)
+  #:use-module (gnu packages wxwidgets)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages xml)
@@ -168,6 +172,43 @@ algorithms AES or Twofish.")
     (license license:gpl3)
     (properties `((superseded . ,keepassxc)))))
 
+(define-public pwsafe
+  (package
+    (name "pwsafe")
+    (version "3.48.0")
+    (home-page "https://www.pwsafe.org/" )
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/pwsafe/pwsafe.git")
+             (commit version)))
+       (sha256 (base32 "0hxv23yh76liggxbjn4m132z15sklra8ms341xgzl4n5vjx30ihi"))
+       (file-name (string-append name "-" version "-checkout"))))
+    (build-system cmake-build-system)
+    ;; TODO: The help subsystem cannot be initialized
+    ;; TODO: pwsafe tries to download GTest which does not work in the daemon
+    ;; environment and is not functional. Substitute CMakeLists.txt to use
+    ;; native GTest and reenable unit tests.
+    (arguments '(#:configure-flags (list "-DNO_GTEST=YES")))
+    (native-inputs `(("coreutils" ,coreutils)
+                     ("gettext" ,gettext-minimal)
+                     ("perl" ,perl)
+                     ("zip" ,zip)))
+    (inputs `(("curl" ,curl)
+              ("libuuid" ,util-linux)
+              ("libxt" ,libxt)
+              ("libxtst" ,libxtst)
+              ("openssl" ,openssl)
+              ("qrencode" ,qrencode)
+              ("wxwidgets" ,wxwidgets)
+              ("xerces-c" ,xerces-c)))
+    (synopsis "Password safe to store passwords encrypted")
+    (description "A password manager originally designed by Bruce Schneier.
+It offers a simple UI to manage passwords for different services.  There are
+other programs that support the file format on different plattforms.")
+    (license license:artistic2.0)))
+
 (define-public shroud
   (package
     (name "shroud")
-- 
2.20.1


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#33980] gnu: Add pwsafe
  2019-01-04 22:32 [bug#33980] gnu: Add pwsafe Tim Gesthuizen
@ 2019-01-09 17:00 ` Ludovic Courtès
  2019-01-09 21:27   ` Tim Gesthuizen
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2019-01-09 17:00 UTC (permalink / raw)
  To: Tim Gesthuizen; +Cc: 33980

Hi Tim,

Tim Gesthuizen <tim.gesthuizen@yahoo.de> skribis:

> From b85b078e18a8166231320f05e938f5f0264f5097 Mon Sep 17 00:00:00 2001
> From: Tim Gesthuizen <tim.gesthuizen@yahoo.de>
> Date: Sat, 29 Dec 2018 23:21:58 +0100
> Subject: [PATCH] gnu: Add pwsafe
>
> * gnu/packages/password-utils.scm (pwsafe): New variable

Overall LGTM.  Nitpicking:

> +    ;; TODO: The help subsystem cannot be initialized
> +    ;; TODO: pwsafe tries to download GTest which does not work in the daemon
> +    ;; environment and is not functional. Substitute CMakeLists.txt to use
> +    ;; native GTest and reenable unit tests.
> +    (arguments '(#:configure-flags (list "-DNO_GTEST=YES")))

It would be ideal if you could get the tests running.  :-)

> +    (native-inputs `(("coreutils" ,coreutils)

Coreutils is not needed, it’s an implicit input already.

> +    (synopsis "Password safe to store passwords encrypted")
> +    (description "A password manager originally designed by Bruce Schneier.
> +It offers a simple UI to manage passwords for different services.  There are
> +other programs that support the file format on different plattforms.")
                                                               ^^
Typo.

Also please make full sentences.

Could you send an updated patch?

Thank you,
Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#33980] gnu: Add pwsafe
  2019-01-09 17:00 ` Ludovic Courtès
@ 2019-01-09 21:27   ` Tim Gesthuizen
  2019-01-10  9:22     ` bug#33980: " Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Gesthuizen @ 2019-01-09 21:27 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 33980


[-- Attachment #1.1.1: Type: text/plain, Size: 1258 bytes --]

Hi Ludo,

>> +    ;; TODO: The help subsystem cannot be initialized
>> +    ;; TODO: pwsafe tries to download GTest which does not work in the daemon
>> +    ;; environment and is not functional. Substitute CMakeLists.txt to use
>> +    ;; native GTest and reenable unit tests.
>> +    (arguments '(#:configure-flags (list "-DNO_GTEST=YES")))
> 
> It would be ideal if you could get the tests running.  :-)

Done. It's a really ugly hack but they are running.
This uncovered the problem of the help system not initializing because
/usr/bin/file was hardcoded. So enabling unit tests was a good idea (as
always) :)


>> +    (native-inputs `(("coreutils" ,coreutils)
> 
> Coreutils is not needed, it’s an implicit input already.

Removed.

>> +    (synopsis "Password safe to store passwords encrypted")
>> +    (description "A password manager originally designed by Bruce Schneier.
>> +It offers a simple UI to manage passwords for different services.  There are
>> +other programs that support the file format on different plattforms.")
>                                                                ^^
> Typo.
> 
> Also please make full sentences.

Hope I got everything corrrect this time.
Patch is attached.

Tim.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.2: 0001-gnu-Add-pwsafe.patch --]
[-- Type: text/x-patch; name="0001-gnu-Add-pwsafe.patch", Size: 4551 bytes --]

From 5106465e332782896f84b4e3ff3ae03588aeca2a Mon Sep 17 00:00:00 2001
From: Tim Gesthuizen <tim.gesthuizen@yahoo.de>
Date: Sat, 29 Dec 2018 23:21:58 +0100
Subject: [PATCH] gnu: Add pwsafe

* gnu/packages/password-utils.scm (pwsafe): New variable
---
 gnu/packages/password-utils.scm | 56 +++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 357ef86d5..8adea891e 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -21,6 +21,7 @@
 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
+;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -42,6 +43,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix packages)
   #:use-module (gnu packages)
   #:use-module (gnu packages admin)
@@ -51,7 +53,9 @@
   #:use-module (gnu packages compression)
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages file)
   #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages gnuzilla)
@@ -72,6 +76,7 @@
   #:use-module (gnu packages tls)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages version-control)
+  #:use-module (gnu packages wxwidgets)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages xml)
@@ -168,6 +173,57 @@ algorithms AES or Twofish.")
     (license license:gpl3)
     (properties `((superseded . ,keepassxc)))))
 
+(define-public pwsafe
+  (package
+    (name "pwsafe")
+    (version "3.48.0")
+    (home-page "https://www.pwsafe.org/" )
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/pwsafe/pwsafe.git")
+             (commit version)))
+       (sha256 (base32 "0hxv23yh76liggxbjn4m132z15sklra8ms341xgzl4n5vjx30ihi"))
+       (file-name (string-append name "-" version "-checkout"))))
+    (build-system cmake-build-system)
+    (native-inputs `(("gettext" ,gettext-minimal)
+                     ("perl" ,perl)
+                     ("zip" ,zip)))
+    (inputs `(("curl" ,curl)
+              ("file" ,file)
+              ("gtest" ,googletest)
+              ("libuuid" ,util-linux)
+              ("libxt" ,libxt)
+              ("libxtst" ,libxtst)
+              ("openssl" ,openssl)
+              ("qrencode" ,qrencode)
+              ("wxwidgets" ,wxwidgets)
+              ("xerces-c" ,xerces-c)))
+    (arguments '(#:configure-flags (list "-DNO_GTEST=YES")
+                 #:phases (modify-phases %standard-phases
+                            (add-after 'unpack 'add-gtest
+                              (lambda* (#:key inputs #:allow-other-keys)
+                                (chmod "CMakeLists.txt" #o644)
+                                (let ((cmake-port (open-file "CMakeLists.txt"
+                                                             "a")))
+                                  (display "find_package(GTest)
+add_subdirectory(src/test)\n" cmake-port)
+                                  (close cmake-port))))
+                            (add-after 'add-gtest 'patch-executables
+                              (lambda* (#:key inputs #:allow-other-keys)
+                                (chmod "src/test/OSTest.cpp" #o644)
+                                (substitute* "src/os/unix/media.cpp"
+                                            (("/usr/bin/file")
+                                             (string-append (assoc-ref inputs "file")
+                                                            "/bin/file"))))))))
+    (synopsis "Password safe with automatic input and key generation")
+    (description "pwsafe is a password manager originally designed by Bruce
+Schneier.  It offers a simple UI to manage passwords for different services.
+There are other programs that support the file format on different
+platforms.")
+    (license license:artistic2.0)))
+
 (define-public shroud
   (package
     (name "shroud")
-- 
2.20.1


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#33980: gnu: Add pwsafe
  2019-01-09 21:27   ` Tim Gesthuizen
@ 2019-01-10  9:22     ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2019-01-10  9:22 UTC (permalink / raw)
  To: Tim Gesthuizen; +Cc: 33980-done, Gábor Boskovits

Hi Tim,

Tim Gesthuizen <tim.gesthuizen@yahoo.de> skribis:

> From 5106465e332782896f84b4e3ff3ae03588aeca2a Mon Sep 17 00:00:00 2001
> From: Tim Gesthuizen <tim.gesthuizen@yahoo.de>
> Date: Sat, 29 Dec 2018 23:21:58 +0100
> Subject: [PATCH] gnu: Add pwsafe
>
> * gnu/packages/password-utils.scm (pwsafe): New variable

I made phases return #t and applied, thanks!

While building with --rounds=2, I noticed zip files were produced in a
non-deterministic way:

--8<---------------cut here---------------start------------->8---
$ diff -ru /gnu/store/rynl3nnxy1b4l2nclb6s0lsqidzix4q9-pwsafe-3.48.0{,-check}
Binary files /gnu/store/rynl3nnxy1b4l2nclb6s0lsqidzix4q9-pwsafe-3.48.0/share/passwordsafe/help/helpDE.zip and /gnu/store/rynl3nnxy1b4l2nclb6s0lsqidzix4q9-pwsafe-3.48.0-check/share/passwordsafe/help/helpDE.zip differ
Binary files /gnu/store/rynl3nnxy1b4l2nclb6s0lsqidzix4q9-pwsafe-3.48.0/share/passwordsafe/help/helpEN.zip and /gnu/store/rynl3nnxy1b4l2nclb6s0lsqidzix4q9-pwsafe-3.48.0-check/share/passwordsafe/help/helpEN.zip differ
Binary files /gnu/store/rynl3nnxy1b4l2nclb6s0lsqidzix4q9-pwsafe-3.48.0/share/passwordsafe/help/helpES.zip and /gnu/store/rynl3nnxy1b4l2nclb6s0lsqidzix4q9-pwsafe-3.48.0-check/share/passwordsafe/help/helpES.zip differ
Binary files /gnu/store/rynl3nnxy1b4l2nclb6s0lsqidzix4q9-pwsafe-3.48.0/share/passwordsafe/help/helpFR.zip and /gnu/store/rynl3nnxy1b4l2nclb6s0lsqidzix4q9-pwsafe-3.48.0-check/share/passwordsafe/help/helpFR.zip differ
Binary files /gnu/store/rynl3nnxy1b4l2nclb6s0lsqidzix4q9-pwsafe-3.48.0/share/passwordsafe/help/helpPL.zip and /gnu/store/rynl3nnxy1b4l2nclb6s0lsqidzix4q9-pwsafe-3.48.0-check/share/passwordsafe/help/helpPL.zip differ
Binary files /gnu/store/rynl3nnxy1b4l2nclb6s0lsqidzix4q9-pwsafe-3.48.0/share/passwordsafe/help/helpRU.zip and /gnu/store/rynl3nnxy1b4l2nclb6s0lsqidzix4q9-pwsafe-3.48.0-check/share/passwordsafe/help/helpRU.zip differ
Binary files /gnu/store/rynl3nnxy1b4l2nclb6s0lsqidzix4q9-pwsafe-3.48.0/share/passwordsafe/help/helpZH.zip and /gnu/store/rynl3nnxy1b4l2nclb6s0lsqidzix4q9-pwsafe-3.48.0-check/share/passwordsafe/help/helpZH.zip differ
$ diffoscope /gnu/store/rynl3nnxy1b4l2nclb6s0lsqidzix4q9-pwsafe-3.48.0{,-check}/share/passwordsafe/help/
--- /gnu/store/rynl3nnxy1b4l2nclb6s0lsqidzix4q9-pwsafe-3.48.0/share/passwordsafe/help/
+++ /gnu/store/rynl3nnxy1b4l2nclb6s0lsqidzix4q9-pwsafe-3.48.0-check/share/passwordsafe/help/
├── helpDE.zip
│ ├── zipinfo /dev/stdin
│ │ @@ -1,9 +1,9 @@
│ │  Zip file size: 2850677 bytes, number of entries: 216
│ │ -drwxr-xr-x  3.0 unx        0 b- stor 19-Jan-10 08:40 html/
│ │ +drwxr-xr-x  3.0 unx        0 b- stor 19-Jan-10 08:38 html/
│ │  -r--r--r--  3.0 unx     7195 t- defN 80-Jan-01 00:00 html/filters.html
│ │  -r--r--r--  3.0 unx    11035 t- defN 80-Jan-01 00:00 html/run_command.html
│ │  -r--r--r--  3.0 unx    10533 t- defN 80-Jan-01 00:00 html/entering_pwd.html
│ │  -r--r--r--  3.0 unx     7763 t- defN 80-Jan-01 00:00 html/view_menu.html
│ │  -r--r--r--  3.0 unx     3537 t- defN 80-Jan-01 00:00 html/password_history.html
│ │  -r--r--r--  3.0 unx     6363 t- defN 80-Jan-01 00:00 html/file_menu.html
│ │  -r--r--r--  3.0 unx     2910 t- defN 80-Jan-01 00:00 html/about_pws.html
│ │ @@ -30,15 +30,15 @@
│ │  -r--r--r--  3.0 unx    11856 t- defN 80-Jan-01 00:00 html/edit_menu.html
│ │  -r--r--r--  3.0 unx     3745 t- defN 80-Jan-01 00:00 html/password_history_tab.html
│ │  -r--r--r--  3.0 unx     3850 t- defN 80-Jan-01 00:00 html/backup_and_restore.html
│ │  -r--r--r--  3.0 unx     7184 t- defN 80-Jan-01 00:00 html/autotype.html
│ │  -r--r--r--  3.0 unx     2744 t- defN 80-Jan-01 00:00 html/images.html
│ │  -r--r--r--  3.0 unx     5215 t- defN 80-Jan-01 00:00 html/failsafebackups.html
│ │  -r--r--r--  3.0 unx     3155 t- defN 80-Jan-01 00:00 html/wzselectdb.html
│ │ -drwxr-xr-x  3.0 unx        0 b- stor 19-Jan-10 08:40 html/images/
│ │ +drwxr-xr-x  3.0 unx        0 b- stor 19-Jan-10 08:38 html/images/

[...]

│ │  -r--r--r--  3.0 unx     3818 t- defN 80-Jan-01 00:00 html/entering_pwd_date.html
│ │  -r--r--r--  3.0 unx     8113 t- defN 80-Jan-01 00:00 html/manage_menu.html
│ │  -r--r--r--  3.0 unx     1984 t- defN 80-Jan-01 00:00 html/wzfinish.html
│ │ --r--r--r--  3.0 unx     7988 t- defN 19-Jan-10 08:40 pwsafeDE.hhc
│ │ --r--r--r--  3.0 unx      203 t- defN 19-Jan-10 08:40 pwsafeDE.hhk
│ │ --r--r--r--  3.0 unx     1342 t- defN 19-Jan-10 08:40 pwsafe.hhp
│ │ +-r--r--r--  3.0 unx     7988 t- defN 19-Jan-10 08:38 pwsafeDE.hhc
│ │ +-r--r--r--  3.0 unx      203 t- defN 19-Jan-10 08:38 pwsafeDE.hhk
│ │ +-r--r--r--  3.0 unx     1342 t- defN 19-Jan-10 08:38 pwsafe.hhp
--8<---------------cut here---------------end--------------->8---

I suppose this is a case where we should use Gábor’s
‘reset-zip-timestamps’.  It would be great if you could give it a try.

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-01-10  9:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-04 22:32 [bug#33980] gnu: Add pwsafe Tim Gesthuizen
2019-01-09 17:00 ` Ludovic Courtès
2019-01-09 21:27   ` Tim Gesthuizen
2019-01-10  9:22     ` bug#33980: " Ludovic Courtès

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).