Bug 244404 - x11/xdm: stray #endif in installed Xresources.sample
Summary: x11/xdm: stray #endif in installed Xresources.sample
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-25 18:05 UTC by Jimmy Olgeni
Modified: 2020-02-26 20:57 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (x11)
zeising: merge-quarterly?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jimmy Olgeni freebsd_committer freebsd_triage 2020-02-25 18:05:12 UTC
Using xdm 1.1.12, I get an error in xdm.log when starting a session:


xdm info (pid 3008): Starting X server on :0
/usr/local/etc/X11/xdm/Xresources:67:2: error: #endif without #if
#endif /* XPM */


The original source file has:

#ifdef XPM
XHASHif PLANES >= 8
xlogin*logoFileName: BITMAPDIR/XDM_PIXMAP
XHASHelse
xlogin*logoFileName: BITMAPDIR/XDM_BWPIXMAP
XHASHendif
xlogin*useShape: true
xlogin*logoPadding: 10
#endif /* XPM */

and the "#ifdef XPM" is not present in the installed file, only the extra #endif.
Comment 1 commit-hook freebsd_committer freebsd_triage 2020-02-25 20:46:43 UTC
A commit references this bug:

Author: zeising
Date: Tue Feb 25 20:45:41 UTC 2020
New revision: 527102
URL: https://svnweb.freebsd.org/changeset/ports/527102

Log:
  x11/xdm: Fix generation of etc/X11/xdm/Xresources

  By some stupidity of autotools, spacing for a sed regexp used to generate
  Xresources gets broken, and the sed command doen't match as it should.  This
  results in an Xresources file with an extra '#endif /* XPM */', which breaks
  the file.
  Patch Makefile.in to fix the regexp and have Xresources generated properly.

  PR:		244404
  Reported by:	olgeni
  MFH:		2020Q1

Changes:
  head/x11/xdm/Makefile
  head/x11/xdm/files/patch-config_Makefile.in
Comment 2 Niclas Zeising freebsd_committer freebsd_triage 2020-02-25 20:48:34 UTC
Thanks for the report!
This was some stupidity in autotools I've never seen before.
Waiting for an MFH.
Comment 3 Jimmy Olgeni freebsd_committer freebsd_triage 2020-02-26 09:11:26 UTC
(In reply to Niclas Zeising from comment #2)

Thank you! \o/
Comment 4 commit-hook freebsd_committer freebsd_triage 2020-02-26 20:54:21 UTC
A commit references this bug:

Author: zeising
Date: Wed Feb 26 20:53:40 UTC 2020
New revision: 527210
URL: https://svnweb.freebsd.org/changeset/ports/527210

Log:
  MFH: r527102

  x11/xdm: Fix generation of etc/X11/xdm/Xresources

  By some stupidity of autotools, spacing for a sed regexp used to generate
  Xresources gets broken, and the sed command doen't match as it should.  This
  results in an Xresources file with an extra '#endif /* XPM */', which breaks
  the file.
  Patch Makefile.in to fix the regexp and have Xresources generated properly.

  PR:		244404
  Reported by:	olgeni

  Approved by:	ports-secteam (joenum)

Changes:
_U  branches/2020Q1/
  branches/2020Q1/x11/xdm/Makefile
  branches/2020Q1/x11/xdm/files/patch-config_Makefile.in
Comment 5 Niclas Zeising freebsd_committer freebsd_triage 2020-02-26 20:57:30 UTC
Merged to the quarterly branch as well, closing.
Once again, thanks for the report!