Page MenuHome GnuPG

Please allow building pinentry against fltk 1.4
Open, NormalPublic

Description

Hello,

pinentry's configure script only allows building against fltk 1.3. Could you also allow v 1.4? I patched configure and did a quick testbuild without finding any new warnings in buildlog.

FLTK's upgrading docs https://www.fltk.org/doc-1.4/migration_1_4.html do not look scary either, it should not break unlss it has special code for X11 support (which I did not find in fltk/* at a quick glance).
cu Andreas

Details

Version
1.3.2

Event Timeline

gniibe triaged this task as Normal priority.
gniibe mentioned this in Unknown Object (Maniphest Task).Mon, Sep 15, 7:10 AM

@ametzler1 Thank you for your report.
I modified a bit (not using && between two test but using -a for a single test command), and pushed the change:
rP121494245f49: build: Allow build with fltk 1.4.

Thanks for fixing this.

In T7807#205495, @gniibe wrote:

I modified a bit (not using && between two test but using -a for a single test command),

test -a is not a POSIX construct, I intentionally avoided it.

test -a is not a POSIX construct, I intentionally avoided it.

I didn't know the issue of -a. I learn a bit. Thank you.

POSIX test command:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html
GNU coreutils for test command:
https://www.gnu.org/software/coreutils/manual/html_node/Connectives-for-test.html

My understanding is that:
(1) For portable shell script, it is recommended to avoid use of -a
(2) Single use of -a could be considered as POSIX conformant.
(2-1) Because of (potential) issues with use of -a, XSI extensions doesn't allow use of -a (and/or -o) with parens.
(2-2) It is still OK to use -a in a test expression when it's a single use.

The wording in test is a bit difficult to parse, though:

The XSI extensions specifying the -a and -o binary primaries and the '(' and ')' operators have been marked obsolescent. (Many expressions using them are ambiguously defined by the grammar depending on the specific expressions being evaluated.) Scripts using these expressions should be converted to the forms given below. Even though many implementations will continue to support these obsolescent forms, scripts should be extremely careful when dealing with user-supplied input that could be confused with these and other primaries and operators...

Well, I care about.... if we need to fix all occurrences of -a or not.

In the particular file of pinentry/configure.ac and m4 files under pinentry/m4, we have the single use of -a;
m4/curses.m4, m4/gpg-error.m4 and m4/libassuan.m4.

gniibe mentioned this in Unknown Object (Maniphest Task).Mon, Sep 22, 8:36 AM

Some data points:
The latest version of the standard (issue 8) has "The -a and -o binary primaries and the '(' and ')' operators have been removed." instead of "obsoleted" https://pubs.opengroup.org/onlinepubs/9799919799/utilities/test.html

The autoconf manual also suggests avoiding -a/-o https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.72/html_node/Limitations-of-Builtins.html#index-test

@ametzler1 Thank you.

Then, I will proceed to:
(1) Fix to no-use of -a for pinentry
(2) Do same for other m4 scripts and other shell scripts in GnuPG and its friends.

Interesting. That means to replace hundreds of scripts in an average organization :-(.

gniibe mentioned this in Unknown Object (Maniphest Task).Mon, Sep 29, 7:04 AM