Bug 198777 - print/cups-base: XDG_OPEN option not functioning as intended
Summary: print/cups-base: XDG_OPEN option not functioning as intended
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Tijl Coosemans
URL:
Keywords:
Depends on: 207746
Blocks:
  Show dependency treegraph
 
Reported: 2015-03-21 16:33 UTC by John Wolfe
Modified: 2016-03-11 14:25 UTC (History)
3 users (show)

See Also:


Attachments
Patch for print/cups-base/Makefile (769 bytes, patch)
2015-03-21 16:33 UTC, John Wolfe
no flags Details | Diff
cups-base.diff (2.27 KB, patch)
2016-02-13 23:14 UTC, Tobias Kortkamp
no flags Details | Diff
cups-base.diff (2.28 KB, patch)
2016-02-13 23:27 UTC, Tobias Kortkamp
no flags Details | Diff
Poudriere testport log FreeBSD 10.2/i386 (215.78 KB, text/x-log)
2016-02-13 23:28 UTC, Tobias Kortkamp
no flags Details
cups-base.diff (1.54 KB, patch)
2016-02-14 15:22 UTC, Tobias Kortkamp
no flags Details | Diff
Poudriere testport log FreeBSD 10.2/i386 with XDG_OPEN (215.84 KB, text/x-log)
2016-02-14 15:23 UTC, Tobias Kortkamp
no flags Details
Poudriere testport log FreeBSD 10.2/i386 without XDG_OPEN (214.49 KB, text/x-log)
2016-02-14 15:23 UTC, Tobias Kortkamp
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Wolfe 2015-03-21 16:33:35 UTC
Created attachment 154635 [details]
Patch for print/cups-base/Makefile

Bug in print/cups-base Makefile. Around the time of CUPS 1.4, the build was changed to use xdg-open command, when available, for the web interface. At that time the default command in desktop/cups.desktop.in was revised to use a variable controlled/set by the configure script. The configure script was revised to check for the existence of the xdg-open binary on the system an set the variable to either htmlview or xdg-open accordingly.

Since this ports source change, the Makefile line to edit the cups/desktop.in prior to beginning the build is non-functional.

.if ${PORT_OPTIONS:MXDG_OPEN}
        @${REINPLACE_CMD} -e 's|htmlview|xdg-open|' ${WRKSRC}/desktop/cups.desktop.in
.endif

The use of xdg-open (devel/xdg-utils) is specified as a run time dependency and will only be built, if not already on the system, AFTER cups-base has been built. It is hit or miss whether xdg-open is actually used as configured. It will never be used when built in a poudriere jail.

A quick patch to the Makefile has been prepared to revise the edit line to replace the configure variable - @CUPS_HTMLVIEW@ - and is attached.

A more proper fix would be to revise xdg-open from a RUN_DEPENDS to a USES dependency.  That of course would require additions to Mk/Uses/
Comment 1 Tobias Kortkamp freebsd_committer freebsd_triage 2016-02-13 23:14:40 UTC
Created attachment 166960 [details]
cups-base.diff

- Add a build dependency on xdg-open so that the configure script can find it
- Make XDG_OPEN a default option for the same reason X11 is one
- Make option description friendlier
- Removes the substitution hack
- Also fixes a plist issue from the option rename ICONS -> X11 from bug #190434

Poudriere testport log coming soon.
Comment 2 Tobias Kortkamp freebsd_committer freebsd_triage 2016-02-13 23:27:10 UTC
Created attachment 166962 [details]
cups-base.diff
Comment 3 Tobias Kortkamp freebsd_committer freebsd_triage 2016-02-13 23:28:04 UTC
Created attachment 166963 [details]
Poudriere testport log FreeBSD 10.2/i386
Comment 4 Tobias Kortkamp freebsd_committer freebsd_triage 2016-02-14 15:22:27 UTC
Created attachment 166983 [details]
cups-base.diff

Update patch to apply after revert of ICONS change.
Comment 5 Tobias Kortkamp freebsd_committer freebsd_triage 2016-02-14 15:23:05 UTC
Created attachment 166984 [details]
Poudriere testport log FreeBSD 10.2/i386 with XDG_OPEN
Comment 6 Tobias Kortkamp freebsd_committer freebsd_triage 2016-02-14 15:23:33 UTC
Created attachment 166985 [details]
Poudriere testport log FreeBSD 10.2/i386 without XDG_OPEN
Comment 7 Tobias Kortkamp freebsd_committer freebsd_triage 2016-02-14 15:25:07 UTC
Remaining issue(?): xdg-open is picked up when its available in the environment even when XDG_OPEN is unset.
Comment 8 Tijl Coosemans freebsd_committer freebsd_triage 2016-03-11 14:25:22 UTC
Fixed in ports r410825.