Skip to contentSkip to conversation

fix pinentry (branch yem/autobuild)

PATCH New Yann E. MORIN 2 participants 4 messages Dec 14, 2014 – Dec 21, 2014

lore
Share & tools
lore
#0 lore raw

cover fix pinentry (branch yem/autobuild)

Hello All!

These two patches fix the pinentry package:
- fix incorrect include paths in generated files;
- fix build without Qt accessibility.

The first fix will (hopefully) close all our pinentry autobuild failures, while the second is a preventive change backported from upstream.

Regards,
Yann E. MORIN.

The following changes since commit f31fed710212bc4b48fc920fed6f2f56afcdeec3:

pckage/ncurses: fix pkg-config files for ncursesw (2014-12-14 23:28:40 +0100)

are available in the git repository at:

git://git.busybox.net/~ymorin/git/buildroot yem/autobuild

for you to fetch changes up to b1b44568a4bb46632d5c05cd28b84f3026575957:

package/pinentry: allow building without Qt accessibility (2014-12-14 23:32:54 +0100)

----------------------------------------------------------------
Yann E. MORIN (2):
package/pinentry: fix include paths package/pinentry: allow building without Qt accessibility

 package/pinentry/0001-fix-include-paths.patch   |  42 ++++++++++
 package/pinentry/0002-qt-no-accessibility.patch | 102 ++++++++++++++++++++++++
 2 files changed, 144 insertions(+)
 create mode 100644 package/pinentry/0001-fix-include-paths.patch
 create mode 100644 package/pinentry/0002-qt-no-accessibility.patch
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH 1/2 package/pinentry: fix include paths

The pinentry tarball contains generated .moc files that contains incorrect include paths: they are probably specific to the machine of the user who generated the tarball.

Fix those paths.

Fixes numerous autobuild failures:

    http://autobuild.buildroot.org/results/96c/96c68e9a6c528e15016cb10f0f73e52f58815bec/
    http://autobuild.buildroot.org/results/50e/50ecb6b347ab4970c701b1aed7b42518fef9a52c/
    http://autobuild.buildroot.org/results/fcb/fcbe8b971ef37c0e7c458bc32295a89be9872b61/
    ...
Cc Vicente Olivert Riera <[email protected]>

---
Problem already reported upstream:

    http://bugs.g10code.com/gnupg/issue1784
---
 package/pinentry/0001-fix-include-paths.patch | 42 +++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 package/pinentry/0001-fix-include-paths.patch
package/pinentry/0001-fix-include-paths.patch new file +42 -0
new file mode 100644
index 0000000..c18a613
@@ -0,0 +1,42 @@
+qt4: fix include paths
+
+Fix include paths in generated .moc files.
+
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+
+diff -durN pinentry-0.9.0.orig/qt4/pinentryconfirm.moc pinentry-0.9.0/qt4/pinentryconfirm.moc
+--- pinentry-0.9.0.orig/qt4/pinentryconfirm.moc	2014-09-18 10:35:48.000000000 +0200
++++ pinentry-0.9.0/qt4/pinentryconfirm.moc	2014-12-14 23:09:52.086048672 +0100
+@@ -6,7 +6,7 @@
+ ** WARNING! All changes made in this file will be lost!
+ *****************************************************************************/
+ 
+-#include "../../../s/pinentry/qt4/pinentryconfirm.h"
++#include "qt4/pinentryconfirm.h"
+ #if !defined(Q_MOC_OUTPUT_REVISION)
+ #error "The header file 'pinentryconfirm.h' doesn't include <QObject>."
+ #elif Q_MOC_OUTPUT_REVISION != 63
+diff -durN pinentry-0.9.0.orig/qt4/pinentrydialog.moc pinentry-0.9.0/qt4/pinentrydialog.moc
+--- pinentry-0.9.0.orig/qt4/pinentrydialog.moc	2014-09-18 10:35:48.000000000 +0200
++++ pinentry-0.9.0/qt4/pinentrydialog.moc	2014-12-14 23:09:36.357871032 +0100
+@@ -6,7 +6,7 @@
+ ** WARNING! All changes made in this file will be lost!
+ *****************************************************************************/
+ 
+-#include "../../../s/pinentry/qt4/pinentrydialog.h"
++#include "qt4/pinentrydialog.h"
+ #if !defined(Q_MOC_OUTPUT_REVISION)
+ #error "The header file 'pinentrydialog.h' doesn't include <QObject>."
+ #elif Q_MOC_OUTPUT_REVISION != 63
+diff -durN pinentry-0.9.0.orig/qt4/qsecurelineedit.moc pinentry-0.9.0/qt4/qsecurelineedit.moc
+--- pinentry-0.9.0.orig/qt4/qsecurelineedit.moc	2014-09-18 10:35:48.000000000 +0200
++++ pinentry-0.9.0/qt4/qsecurelineedit.moc	2014-12-14 23:09:18.693671498 +0100
+@@ -6,7 +6,7 @@
+ ** WARNING! All changes made in this file will be lost!
+ *****************************************************************************/
+ 
+-#include "../../../s/pinentry/qt4/qsecurelineedit.h"
++#include "qt4/qsecurelineedit.h"
+ #if !defined(Q_MOC_OUTPUT_REVISION)
+ #error "The header file 'qsecurelineedit.h' doesn't include <QObject>."
+ #elif Q_MOC_OUTPUT_REVISION != 63
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/2 package/pinentry: allow building without Qt accessibility

In reply to Yann E. MORIN

Backport a patch applied upstream to allow building without Qt accessibility.

Cc Vicente Olivert Riera <[email protected]>
---
 package/pinentry/0002-qt-no-accessibility.patch | 102 ++++++++++++++++++++++++
 1 file changed, 102 insertions(+)
 create mode 100644 package/pinentry/0002-qt-no-accessibility.patch
package/pinentry/0002-qt-no-accessibility.patch new file +102 -0
new file mode 100644
index 0000000..2f9e508
@@ -0,0 +1,102 @@
+commit 484465338ea6f5f12eb1341ca0ef84aa79224ed4
+Author: Vicente Olivert Riera <[email protected]>
+Date:   Mon Dec 8 16:42:42 2014 +0000
+
+    pinentry-qt4: make the accessibility part optional
+    
+    Check if the Qt libraries have support for QT Accessibility before using
+    it. Otherwise it will raise error like these one:
+    
+    main.cpp: In function 'int qt_cmd_handler(pinentry_t)':
+    main.cpp:220:51: error: 'class QAbstractButton' has no member named
+    'setAccessibleDescription'
+    
+    Signed-off-by: Vicente Olivert Riera <[email protected]>
+
+Backported from upstream.
+
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+
+diff --git a/qt4/main.cpp b/qt4/main.cpp
+index 106999e..b2a69f2 100644
+--- a/qt4/main.cpp
++++ b/qt4/main.cpp
+@@ -217,8 +217,9 @@ qt_cmd_handler (pinentry_t pe)
+       for ( size_t i = 0 ; i < sizeof buttonLabels / sizeof *buttonLabels ; ++i )
+         if ( (buttons & buttonLabels[i].button) && !buttonLabels[i].label.isEmpty() ) {
+             box.button( buttonLabels[i].button )->setText( buttonLabels[i].label );
++#ifndef QT_NO_ACCESSIBILITY
+             box.button( buttonLabels[i].button )->setAccessibleDescription ( buttonLabels[i].label );
+-
++#endif
+         }
+ 
+       box.setIconPixmap( icon() );
+diff --git a/qt4/pinentryconfirm.cpp b/qt4/pinentryconfirm.cpp
+index dfbd19f..6b3d545 100644
+--- a/qt4/pinentryconfirm.cpp
++++ b/qt4/pinentryconfirm.cpp
+@@ -30,8 +30,10 @@ PinentryConfirm::PinentryConfirm(Icon icon, int timeout, const QString &title,
+ 	connect(_timer, SIGNAL(timeout()), this, SLOT(slotTimeout()));
+ 	_timer->start(timeout*1000);
+     }
++#ifndef QT_NO_ACCESSIBILITY
+     setAccessibleDescription (desc);
+     setAccessibleName (title);
++#endif
+     raiseWindow (this);
+ }
+ 
+diff --git a/qt4/pinentrydialog.cpp b/qt4/pinentrydialog.cpp
+index 3a6dacc..456f022 100644
+--- a/qt4/pinentrydialog.cpp
++++ b/qt4/pinentrydialog.cpp
+@@ -217,7 +217,9 @@ void PinEntryDialog::setDescription( const QString& txt )
+ {
+   _desc->setVisible( !txt.isEmpty() );
+   _desc->setText( txt );
++#ifndef QT_NO_ACCESSIBILITY
+   _desc->setAccessibleDescription ( txt );
++#endif
+   _icon->setPixmap( icon() );
+   setError( QString::null );
+ }
+@@ -231,7 +233,9 @@ void PinEntryDialog::setError( const QString& txt )
+ {
+   if( !txt.isNull() )_icon->setPixmap( icon( QStyle::SP_MessageBoxCritical ) );
+   _error->setText( txt );
++#ifndef QT_NO_ACCESSIBILITY
+   _error->setAccessibleDescription ( txt );
++#endif
+   _error->setVisible( !txt.isEmpty() );
+ }
+ 
+@@ -264,14 +268,18 @@ QString PinEntryDialog::prompt() const
+ void PinEntryDialog::setOkText( const QString& txt )
+ {
+   _ok->setText( txt );
++#ifndef QT_NO_ACCESSIBILITY
+   _ok->setAccessibleDescription ( txt );
++#endif
+   _ok->setVisible( !txt.isEmpty() );
+ }
+ 
+ void PinEntryDialog::setCancelText( const QString& txt )
+ {
+   _cancel->setText( txt );
++#ifndef QT_NO_ACCESSIBILITY
+   _cancel->setAccessibleDescription ( txt );
++#endif
+   _cancel->setVisible( !txt.isEmpty() );
+ }
+ 
+@@ -279,7 +287,9 @@ void PinEntryDialog::setQualityBar( const QString& txt )
+ {
+   if (_have_quality_bar) {
+     _quality_bar_label->setText( txt );
++#ifndef QT_NO_ACCESSIBILITY
+     _quality_bar_label->setAccessibleDescription ( txt );
++#endif
+   }
+ }
+ 
Signature · 1 line
1.9.1
#3 lore raw

cover fix pinentry (branch yem/autobuild)

In reply to Yann E. MORIN

Dear Yann E. MORIN,

Quoted 3 lines · Yann E. MORIN

Yann E. MORIN (2):
package/pinentry: fix include paths package/pinentry: allow building without Qt accessibility

Both patches applied, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com