unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#30971] Add package definition for fpm2
@ 2018-03-28 14:09 Ton
  2018-03-28 20:03 ` Marius Bakke
  0 siblings, 1 reply; 4+ messages in thread
From: Ton @ 2018-03-28 14:09 UTC (permalink / raw)
  To: 30971


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

Here is the package definition for figaros password manager, or fpm2. It is a
simple password manager. Development has seized and the package should be
considered dead. I had use for it personally and thought I'd share it. There
is a warning in the description.

Built and tested on GuixSD Linux merlin 4.15.8-gnu #1 SMP 1 x86_64 GNU/Linux.

It passes guix lint without errors.

It builds 5 times deterministicly.

Guix size says "total: 486.5 MiB"

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-Add-package-definition-screen-message.patch --]
[-- Type: text/x-patch, Size: 3336 bytes --]

From d2efd598855759ce8377569b9e8279a5f774a22a Mon Sep 17 00:00:00 2001
From: Tonton <tonton@riseup.net>
Date: Wed, 28 Mar 2018 16:08:52 +0200
Subject: [PATCH] Add package definition screen message

Built and tested on GuixSD Linux merlin 4.15.8-gnu #1 SMP 1 x86_64 GNU/Linux.

It passes guix lint without errors.

It builds 5 times deterministicly.

Guix size says "total: 486.5 MiB"
---
 gnu/packages/fpm2.scm | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)
 create mode 100644 gnu/packages/fpm2.scm

diff --git a/gnu/packages/fpm2.scm b/gnu/packages/fpm2.scm
new file mode 100644
index 000000000..a9a35e01a
--- /dev/null
+++ b/gnu/packages/fpm2.scm
@@ -0,0 +1,64 @@
+(define-module (fpm2)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages gtk)
+  #:use-module (gnu packages gnupg)
+  #:use-module (gnu packages xml)
+  #:use-module (gnu packages glib))
+
+(define-public fpm2
+  (package
+    (name "fpm2")
+    (version "0.79")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://als.regnet.cz/fpm2/download/fpm2-"
+                                  version ".tar.bz2"))
+              (sha256
+               (base32
+                "19sdy1lygfhkg5nxi2w9a4d9kwvw24nxp0ix0p0lz91qpvk9qpnm"))))
+    (build-system gnu-build-system)
+    (inputs `(("gtk2" ,gtk+-2)
+              ("gnupg" ,gnupg)
+              ("libxml2" ,libxml2)))
+    (native-inputs `(("pkgconfig" ,pkg-config)
+                     ("intltool" ,intltool)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before
+             'configure 'pre-configure
+           (lambda _
+               (let* ((poinc (open-output-file "po/POTFILES.in")))
+                 (begin
+                   (newline poinc)
+                   (display "data/fpm2.desktop.in" poinc)
+                   (newline poinc)
+                   (display "data/fpm2.desktop.in.in" poinc)
+                   (newline poinc)
+                   (display "fpm2.glade" poinc)
+                   (newline poinc)
+                   (display "src/callbacks.c" poinc)
+                   (newline poinc)
+                   (display "src/fpm.c" poinc)
+                   (newline poinc)
+                   (display "src/fpm_file.c" poinc)
+                   (newline poinc)
+                   (display "src/interface.c" poinc)
+                   (newline poinc)
+                   (display "src/support.c" poinc)
+                   (newline poinc)
+                   (display "fpm2.glade" poinc)
+                   (newline poinc)
+                   (close-port poinc))))))))
+    (synopsis "Manages, generates and stores passwords encrypted")
+    (description "FPM2 is GTK2 port from Figaro's Password Manager
+originally developed by John Conneely, with some new enhancements.
+
+Upstream development seems to have stopped.  It is therefore recommended
+to use a different password manager.  ")
+    (home-page "https://als.regnet.cz/fpm2/")
+    (license license:gpl2)))
-- 
2.16.3


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

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

* [bug#30971] Add package definition for fpm2
  2018-03-28 14:09 [bug#30971] Add package definition for fpm2 Ton
@ 2018-03-28 20:03 ` Marius Bakke
  2018-03-29 10:13   ` Ton
  0 siblings, 1 reply; 4+ messages in thread
From: Marius Bakke @ 2018-03-28 20:03 UTC (permalink / raw)
  To: Ton, 30971

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

Ton <tonton@riseup.net> writes:

> Here is the package definition for figaros password manager, or fpm2. It is a
> simple password manager. Development has seized and the package should be
> considered dead. I had use for it personally and thought I'd share it. There
> is a warning in the description.

Thanks!  I'm a bit vary about adding obsolete software to Guix.  Any
opinions from other contributors?  If no one responds, I'll assume it's
okay.

[...]

> From d2efd598855759ce8377569b9e8279a5f774a22a Mon Sep 17 00:00:00 2001
> From: Tonton <tonton@riseup.net>
> Date: Wed, 28 Mar 2018 16:08:52 +0200
> Subject: [PATCH] Add package definition screen message
>
> Built and tested on GuixSD Linux merlin 4.15.8-gnu #1 SMP 1 x86_64 GNU/Linux.
>
> It passes guix lint without errors.
>
> It builds 5 times deterministicly.
>
> Guix size says "total: 486.5 MiB"

Again, see "git log" for the usual conventions.

> ---
>  gnu/packages/fpm2.scm | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 64 insertions(+)
>  create mode 100644 gnu/packages/fpm2.scm

I think this can go to 'password-utils.scm' along with other password
managers.

[...]

> +(define-public fpm2
> +  (package
> +    (name "fpm2")
> +    (version "0.79")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "https://als.regnet.cz/fpm2/download/fpm2-"
> +                                  version ".tar.bz2"))
> +              (sha256
> +               (base32
> +                "19sdy1lygfhkg5nxi2w9a4d9kwvw24nxp0ix0p0lz91qpvk9qpnm"))))
> +    (build-system gnu-build-system)
> +    (inputs `(("gtk2" ,gtk+-2)
> +              ("gnupg" ,gnupg)
> +              ("libxml2" ,libxml2)))
> +    (native-inputs `(("pkgconfig" ,pkg-config)
> +                     ("intltool" ,intltool)))
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (add-before
> +             'configure 'pre-configure
> +           (lambda _
> +               (let* ((poinc (open-output-file "po/POTFILES.in")))
> +                 (begin
> +                   (newline poinc)
> +                   (display "data/fpm2.desktop.in" poinc)
> +                   (newline poinc)
> +                   (display "data/fpm2.desktop.in.in" poinc)
> +                   (newline poinc)
> +                   (display "fpm2.glade" poinc)
> +                   (newline poinc)
> +                   (display "src/callbacks.c" poinc)
> +                   (newline poinc)
> +                   (display "src/fpm.c" poinc)
> +                   (newline poinc)
> +                   (display "src/fpm_file.c" poinc)
> +                   (newline poinc)
> +                   (display "src/interface.c" poinc)
> +                   (newline poinc)
> +                   (display "src/support.c" poinc)
> +                   (newline poinc)
> +                   (display "fpm2.glade" poinc)
> +                   (newline poinc)
> +                   (close-port poinc))))))))

I admit I don't understand what's going on here.  AFAICT this overwrites
POTFILES.in with custom text.  Can you add a comment about why this is
necessary?  Also, I think it's clearer to write it like this:

(call-with-output-file "po/POTFILES.in"
  (lambda (port)
    (format port "data/fpm2.desktop.in
data/fpm2.desktop.in.in
[...]")))

> +    (synopsis "Manages, generates and stores passwords encrypted")

Please use infinitive verbs in synopses, i.e. avoid the present tense:
"Manage, generate and store passwords encrypted".

Apart from this LGTM.  Can you send an updated patch?

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

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

* [bug#30971] Add package definition for fpm2
  2018-03-28 20:03 ` Marius Bakke
@ 2018-03-29 10:13   ` Ton
  2018-03-29 16:44     ` bug#30971: " Marius Bakke
  0 siblings, 1 reply; 4+ messages in thread
From: Ton @ 2018-03-29 10:13 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 30971


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

Here is new patch changed as requested for fpm2.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-packages-password-utils.scm-fpm2-New-variable.patch --]
[-- Type: text/x-patch, Size: 3127 bytes --]

From 02298195711674089ce5904c3aae71f7f74f1ccd Mon Sep 17 00:00:00 2001
From: Tonton <tonton@riseup.net>
Date: Thu, 29 Mar 2018 12:11:31 +0200
Subject: [PATCH] * gnu/packages/password-utils.scm (fpm2): New variable

Signed-off-by: Tonton <tonton@riseup.net>
---
 gnu/packages/password-utils.scm | 50 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 881039253..54369851b 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
 ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2018 Konrad Hinsen <konrad.hinsen@fastmail.net>
+;;; Copyright © 2018 Thomas Sigurdsen <tonton@riseup.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -67,6 +68,7 @@
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg)
+  #:use-module (gnu packages xml)
   #:use-module (guix build-system python))
 
 (define-public pwgen
@@ -641,3 +643,51 @@ is the community-enhanced, \"jumbo\" version of John the Ripper.")
 to encrypted files on a directory hierarchy.  The information is protected
 by GnuPG's symmetrical encryption.")
     (license license:expat)))
+
+(define-public fpm2
+  (package
+    (name "fpm2")
+    (version "0.79")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://als.regnet.cz/fpm2/download/fpm2-"
+                                  version ".tar.bz2"))
+              (sha256
+               (base32
+                "19sdy1lygfhkg5nxi2w9a4d9kwvw24nxp0ix0p0lz91qpvk9qpnm"))))
+    (build-system gnu-build-system)
+    (inputs `(("gtk2" ,gtk+-2)
+              ("gnupg" ,gnupg)
+              ("libxml2" ,libxml2)))
+    (native-inputs `(("pkg-config" ,pkg-config)
+                     ("intltool" ,intltool)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before
+             'configure 'pre-configure
+           ;; The file po/POTFILES.in ends up missing for some reason in
+           ;; both nix and guix builds. Adding the file with contents
+           ;; found during troubleshooting.
+           (lambda _
+             (let* ((port (open-output-file "po/POTFILES.in")))
+               (begin
+                 (format port "data/fpm2.desktop.in
+data/fpm2.desktop.in.in
+fpm2.glade
+src/callbacks.c
+src/fpm.c
+src/fpm_file.c
+src/interface.c
+src/support.c
+fpm2.glade
+")
+                 (close-port port))))))))
+    (synopsis "Manage, generate and store passwords encrypted")
+    (description "FPM2 is GTK2 port from Figaro's Password Manager
+originally developed by John Conneely, with some new enhancements.
+
+Upstream development seems to have stopped.  It is therefore recommended
+to use a different password manager.  ")
+    (home-page "https://als.regnet.cz/fpm2/")
+    (license license:gpl2)))
-- 
2.16.3


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

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

* bug#30971: Add package definition for fpm2
  2018-03-29 10:13   ` Ton
@ 2018-03-29 16:44     ` Marius Bakke
  0 siblings, 0 replies; 4+ messages in thread
From: Marius Bakke @ 2018-03-29 16:44 UTC (permalink / raw)
  To: Ton; +Cc: 30971-done


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

Ton <tonton@riseup.net> writes:

> Here is new patch changed as requested for fpm2.
> From 02298195711674089ce5904c3aae71f7f74f1ccd Mon Sep 17 00:00:00 2001
> From: Tonton <tonton@riseup.net>
> Date: Thu, 29 Mar 2018 12:11:31 +0200
> Subject: [PATCH] * gnu/packages/password-utils.scm (fpm2): New variable

Thank you!  Applied with the cosmetic changes below.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: fpm2.diff --]
[-- Type: text/x-patch, Size: 1571 bytes --]

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 54369851b..eb2c276b3 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -664,14 +664,13 @@ by GnuPG's symmetrical encryption.")
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (add-before
-             'configure 'pre-configure
+         (add-before 'configure 'pre-configure
            ;; The file po/POTFILES.in ends up missing for some reason in
            ;; both nix and guix builds. Adding the file with contents
            ;; found during troubleshooting.
            (lambda _
-             (let* ((port (open-output-file "po/POTFILES.in")))
-               (begin
+             (call-with-output-file "po/POTFILES.in"
+               (lambda (port)
                  (format port "data/fpm2.desktop.in
 data/fpm2.desktop.in.in
 fpm2.glade
@@ -681,13 +680,13 @@ src/fpm_file.c
 src/interface.c
 src/support.c
 fpm2.glade
-")
-                 (close-port port))))))))
+")))
+             #t)))))
     (synopsis "Manage, generate and store passwords encrypted")
     (description "FPM2 is GTK2 port from Figaro's Password Manager
 originally developed by John Conneely, with some new enhancements.
 
 Upstream development seems to have stopped.  It is therefore recommended
-to use a different password manager.  ")
+to use a different password manager.")
     (home-page "https://als.regnet.cz/fpm2/")
-     (license license:gpl2)))
+     (license license:gpl2+)))

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

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

end of thread, other threads:[~2018-03-29 16:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-28 14:09 [bug#30971] Add package definition for fpm2 Ton
2018-03-28 20:03 ` Marius Bakke
2018-03-29 10:13   ` Ton
2018-03-29 16:44     ` bug#30971: " Marius Bakke

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