Bug 225190 - security/pinentry: Update to 1.1.0, add FLTK frontend
Summary: security/pinentry: Update to 1.1.0, add FLTK frontend
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jason E. Hale
URL: https://github.com/gpg/pinentry/blob/...
Keywords: patch
Depends on:
Blocks: 225191
  Show dependency treegraph
 
Reported: 2018-01-15 20:16 UTC by Dmitri Goutnik
Modified: 2018-01-21 00:41 UTC (History)
0 users

See Also:
jhale: maintainer-feedback+


Attachments
pinentry-1.1.0.patch (5.48 KB, patch)
2018-01-15 20:16 UTC, Dmitri Goutnik
no flags Details | Diff
pinentry-1.1.0.patch (5.59 KB, patch)
2018-01-15 23:20 UTC, Dmitri Goutnik
jhale: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitri Goutnik freebsd_committer freebsd_triage 2018-01-15 20:16:14 UTC
Created attachment 189762 [details]
pinentry-1.1.0.patch

* Update to 1.1.0
* Add FLTK frontend
* Remove files/patch-configure (merged upstream)

Changes: https://github.com/gpg/pinentry/blob/master/NEWS

QA:
  poudriere testport: OK (11a, 10i)
Comment 1 Jason E. Hale freebsd_committer freebsd_triage 2018-01-15 21:01:29 UTC
Thanks for the patch!

Could you give me a summary of the patch you added for the fltk front end? Was upstream notified about the problem?
Comment 2 Dmitri Goutnik freebsd_committer freebsd_triage 2018-01-15 21:11:29 UTC
Without the patch, build fails on 10.4-RELEASE/i386:

pinwindow.cxx:49:18: error: redefinition of 'encrypt' as different kind of symbol
static Fl_Pixmap encrypt(encrypt_xpm);
                 ^
/usr/include/unistd.h:452:6: note: previous definition is here
int      encrypt(char *, int);
         ^

I'm not sure if it's a problem with older 10.4's clang or pinentry-fltk or FLTK itself so I haven't submitted this to upstream yet.
Comment 3 Jason E. Hale freebsd_committer freebsd_triage 2018-01-15 22:22:37 UTC
Looks like a namespace conflict. encrypt() was removed from unistd.h in r306651, so that is why it is only a problem on 10.x. Renaming the object locally until 10.x is EOL is probably the right thing to do.
Comment 4 Dmitri Goutnik freebsd_committer freebsd_triage 2018-01-15 23:05:04 UTC
Confusingly, it builds fine on 11.1-RELEASE-p6 where unistd.h is at r304977 and encrypt() is still present. Renaming variable would be a less invasive fix though, I'll update the patch.
Comment 5 Dmitri Goutnik freebsd_committer freebsd_triage 2018-01-15 23:20:31 UTC
Created attachment 189772 [details]
pinentry-1.1.0.patch
Comment 6 Jason E. Hale freebsd_committer freebsd_triage 2018-01-16 00:40:46 UTC
Patch looks good. I'll run a few more tests and commit it soon.

It's interesting because I had to do something similar with an object named "encrypt" in security/gpgme-qt5 a while back: https://svnweb.freebsd.org/ports/head/security/gpgme/files/patch-lang_qt_src_qgpgmeencryptjob.cpp?revision=426284&view=markup

Perhaps it is a clang bug that was introduced in FreeBSD 10.2 when the C++ stack was updated (10.1 worked fine with unmodified code). I never was able to fully track down the root of the problem, though.
Comment 7 commit-hook freebsd_committer freebsd_triage 2018-01-21 00:39:11 UTC
A commit references this bug:

Author: jhale
Date: Sun Jan 21 00:38:29 UTC 2018
New revision: 459560
URL: https://svnweb.freebsd.org/changeset/ports/459560

Log:
  Update security/pinentry* to 1.1.0 [1]

  Add security/pinentry-fltk, fltk frontend [2]

  PR:		225190 [1], 225191 [2]
  Submitted by:	Dmitri Goutnik <dg@syrec.org>

Changes:
  head/security/Makefile
  head/security/pinentry/Makefile
  head/security/pinentry/distinfo
  head/security/pinentry/files/patch-configure
  head/security/pinentry/files/patch-fltk_pinwindow.cxx
  head/security/pinentry-fltk/
  head/security/pinentry-fltk/Makefile
Comment 8 Jason E. Hale freebsd_committer freebsd_triage 2018-01-21 00:41:04 UTC
Committed, thanks!