Bug 205039 - sysutils/pesign: unbreak on pre-10.2 systems
Summary: sysutils/pesign: unbreak on pre-10.2 systems
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: Edward Tomasz Napierala
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-12-05 16:22 UTC by Jan Beich
Modified: 2015-12-06 19:07 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (trasz)
jbeich: merge-quarterly+


Attachments
use poll(2) and copy strchrnul(3) from 10.x (2.55 KB, patch)
2015-12-05 16:22 UTC, Jan Beich
no flags Details | Diff
use poll(2) and copy strchrnul(3) from 10.x, v1.1 (3.97 KB, patch)
2015-12-05 18:57 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2015-12-05 16:22:12 UTC
Created attachment 163870 [details]
use poll(2) and copy strchrnul(3) from 10.x

Looking at how ppoll(2) is implemented it seems the following is true

  ppoll(,, NULL, NULL) == poll(,, INFTIM)

Our manpage is a bit vague but the one on Linux has

  If the sigmask argument is specified as NULL, then no signal mask
  manipulation is performed (and thus ppoll() differs from poll() only
  in the precision of the timeout argument).

  If timeout_ts is specified as NULL, then ppoll() can block
  indefinitely.

But FreeBSD 9.x also needs another fix

  client.c: In function 'get_token_pin':
  client.c:244:3: error: implicit declaration of function 'strchrnul' [-Werror=implicit-function-declaration]
     char *c = strchrnul(pin, '\n');
     ^
  client.c:244:13: error: initialization makes pointer from integer without a cast [-Werror]
     char *c = strchrnul(pin, '\n');
	       ^
  client.c:262:13: error: initialization makes pointer from integer without a cast [-Werror]
     char *c = strchrnul(pin, '\n');
	       ^
  cc1: all warnings being treated as errors

poudriere bulk -t build logs:
- 9.3R i386: http://sprunge.us/MaEO
- 9.3R amd64: http://sprunge.us/cTYG
- 10.1R i386: http://sprunge.us/fjGN
- 10.2R amd64: http://sprunge.us/ZfFK
- 11.0C i386: http://sprunge.us/JcIb

Would you like the patch land in /branches/2015Q4 as well?
Comment 1 Jan Beich freebsd_committer freebsd_triage 2015-12-05 16:50:27 UTC
DragonFly also lacks ppoll(2) but may implement it soon. DPorts last build was blocked on devel/efivar which I (hopefully) fixed in ports r403070.
Comment 2 Jan Beich freebsd_committer freebsd_triage 2015-12-05 18:57:27 UTC
Created attachment 163875 [details]
use poll(2) and copy strchrnul(3) from 10.x, v1.1

Oops, forgot to add static keyword and version of strchrnul.c it was copied from.
Comment 3 Edward Tomasz Napierala freebsd_committer freebsd_triage 2015-12-06 09:24:44 UTC
Looks good to me.  Would you commit it?  Thanks!
Comment 4 commit-hook freebsd_committer freebsd_triage 2015-12-06 12:42:00 UTC
A commit references this bug:

Author: jbeich
Date: Sun Dec  6 12:40:59 UTC 2015
New revision: 403110
URL: https://svnweb.freebsd.org/changeset/ports/403110

Log:
  sysutils/pesign: unbreak on pre-10.2 systems

  - No reason to use ppoll(2), so switch to poll(2)
  - Include missing strchrnul(3) for 9.x

  No PORTREVISION bump because 10.2+ behavior doesn't change.

  PR:		205039
  Approved by:	trasz (maintainer)
  MFH:		2015Q4

Changes:
  head/sysutils/pesign/Makefile
  head/sysutils/pesign/files/extra-patch-src_client.c
  head/sysutils/pesign/files/patch-src-daemon.c
Comment 5 commit-hook freebsd_committer freebsd_triage 2015-12-06 19:04:33 UTC
A commit references this bug:

Author: jbeich
Date: Sun Dec  6 19:03:35 UTC 2015
New revision: 403152
URL: https://svnweb.freebsd.org/changeset/ports/403152

Log:
  MFH: r403110

  sysutils/pesign: unbreak on pre-10.2 systems

  - No reason to use ppoll(2), so switch to poll(2)
  - Include missing strchrnul(3) for 9.x

  No PORTREVISION bump because 10.2+ behavior doesn't change.

  PR:		205039
  Approved by:	trasz (maintainer)
  Approved by:	ports-secteam (delphij)

Changes:
_U  branches/2015Q4/
  branches/2015Q4/sysutils/pesign/Makefile
  branches/2015Q4/sysutils/pesign/files/extra-patch-src_client.c
  branches/2015Q4/sysutils/pesign/files/patch-src-daemon.c