Bug 253091 - x11-wm/icewm icehelp has incorrect hard-coded paths
Summary: x11-wm/icewm icehelp has incorrect hard-coded paths
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: Alexey Dokuchaev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-30 10:11 UTC by Duane
Modified: 2021-02-08 04:27 UTC (History)
2 users (show)

See Also:
portmaster: maintainer-feedback+


Attachments
svn diff to remap help-browser to correct location of html files on FreeBSD (1.29 KB, patch)
2021-02-04 00:41 UTC, Chris Hutchinson
portmaster: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Duane 2021-01-30 10:11:59 UTC
The `icehelp` utility distributed with this has hard coded paths for the html help files which are incorrect on FreeBSD.  For example, the path `/usr/local/share/doc/icewm.html` should be `/usr/local/share/doc/icewm/icewm.html`.
Comment 1 Chris Hutchinson 2021-01-30 10:22:50 UTC
(In reply to Duane from comment #0)
Thanks for the heads-up. I should be able to fix
that this weekend.

Thanks again!
Comment 2 Duane 2021-01-31 22:02:11 UTC
I just noticed something extra, if you're able to squeeze it in.

There is no global configuration path that isn't overwritten by the install.  In the man pages you can see on all the preference files that the last two paths are the same.  Would it be possible somehow to make one of these paths different so that I can have global configuration that overwrites the default.  I am configuring in a multi-user environment.
Comment 3 Chris Hutchinson 2021-02-02 19:13:05 UTC
(In reply to Duane from comment #0)
I'm unable to reproduce what I understand
is the problem you describe. icewm.html is
placed in the docs/icewm directory.
eg;

# make -DBATCH check-plist

====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for items in pkg-plist which are not in STAGEDIR
===> No pkg-plist issues found (check-plist)

# ls work/stage/usr/local/share/doc/icewm/

ChangeLog
NEWS
README
TODO
icehelp.1.html
icesh.1.html
icesound.1.html
icewm-env.5.html
icewm-focus_mode.5.html
icewm-keys.5.html
icewm-menu-fdo.1.html
icewm-menu-xrandr.1.html
icewm-menu.5.html
icewm-preferences.5.html
icewm-prefoverride.5.html
icewm-programs.5.html
icewm-session.1.html
icewm-set-gnomewm.1.html
icewm-shutdown.5.html
icewm-startup.5.html
icewm-theme.5.html
icewm-toolbar.5.html
icewm-winoptions.5.html
icewm.1.html
icewm.html
icewmbg.1.html
icewmhint.1.html

Have I somehow misunderstood your report?

--Chris
Comment 4 Chris Hutchinson 2021-02-02 19:16:48 UTC
(In reply to Duane from comment #2)
> I just noticed something extra, if you're able to squeeze it in.
> 
> There is no global configuration path that isn't overwritten
> by the install.  In the man pages you can see on all the
> preference files that the last two paths are the same.
> Would it be possible somehow to make one of these paths
> different so that I can have global configuration that
> overwrites the default. I am configuring in a multi-user
> environment.

That doesn't seem unreasonable.
Can you open that up in a separate pr please?

--Chris
Comment 5 Duane 2021-02-03 07:38:14 UTC
(In reply to Chris Hutchinson from comment #3)

The files are in those locations, but the location that `icehelp` looks for the file is hardcoded as a different location (i.e. without the last `icewm` directory part).

Compare

```
$ strings `which icehelp` | grep doc
/usr/local/share/doc/icewm.1.html
/usr/local/share/doc/icesound.1.html
/usr/local/share/doc/icewmbg.1.html
/usr/local/share/doc/icewm.html
It can display a HTML document from file, or browse a website.
```

with

```
$pkg list icewm | grep doc
/usr/local/share/doc/icewm/ChangeLog
/usr/local/share/doc/icewm/NEWS
/usr/local/share/doc/icewm/README
/usr/local/share/doc/icewm/TODO
/usr/local/share/doc/icewm/icehelp.1.html
/usr/local/share/doc/icewm/icesh.1.html
/usr/local/share/doc/icewm/icesound.1.html
/usr/local/share/doc/icewm/icewm-env.5.html
/usr/local/share/doc/icewm/icewm-focus_mode.5.html
/usr/local/share/doc/icewm/icewm-keys.5.html
/usr/local/share/doc/icewm/icewm-menu-fdo.1.html
/usr/local/share/doc/icewm/icewm-menu-xrandr.1.html
/usr/local/share/doc/icewm/icewm-menu.5.html
/usr/local/share/doc/icewm/icewm-preferences.5.html
/usr/local/share/doc/icewm/icewm-prefoverride.5.html
/usr/local/share/doc/icewm/icewm-programs.5.html
/usr/local/share/doc/icewm/icewm-session.1.html
/usr/local/share/doc/icewm/icewm-set-gnomewm.1.html
/usr/local/share/doc/icewm/icewm-shutdown.5.html
/usr/local/share/doc/icewm/icewm-startup.5.html
/usr/local/share/doc/icewm/icewm-theme.5.html
/usr/local/share/doc/icewm/icewm-toolbar.5.html
/usr/local/share/doc/icewm/icewm-winoptions.5.html
/usr/local/share/doc/icewm/icewm.1.html
/usr/local/share/doc/icewm/icewm.html
/usr/local/share/doc/icewm/icewmbg.1.html
/usr/local/share/doc/icewm/icewmhint.1.html
```
Comment 6 Chris Hutchinson 2021-02-03 07:49:08 UTC
(In reply to Duane from comment #5)
Ahh. OK. Now I understand what you meant.
I sort it out over the next couple days,
and submit a patch.

Thanks!

--Chris
Comment 7 Chris Hutchinson 2021-02-04 00:41:06 UTC
Created attachment 222146 [details]
svn diff to remap help-browser to correct location of html files on FreeBSD

The attached svn diff remaps the icewm internal
help browser to the correct location of the html
files on a FreeBSD install.

Changes:
adds files/patch-src_icehelp.cc
PORTREVISION=	1

That's it!

--Chris
Comment 8 Duane 2021-02-04 07:01:17 UTC
(In reply to Chris Hutchinson from comment #7)

Thanks!
Comment 9 Alexey Dokuchaev freebsd_committer freebsd_triage 2021-02-08 03:31:11 UTC
Actually, patching the source code should not be needed, it looks more like --with-docdir option, which is passed to the configure script, should be revised.  I'll handle it.
Comment 10 commit-hook freebsd_committer freebsd_triage 2021-02-08 04:25:39 UTC
A commit references this bug:

Author: danfe
Date: Mon Feb  8 04:25:03 UTC 2021
New revision: 564677
URL: https://svnweb.freebsd.org/changeset/ports/564677

Log:
  Don't try to needlessly (or, as with --with-docdir, even bogusly) override
  various directories and trust the default values from the configure script.

  As a result, icehelp(1) now displays internal HTML help as expected, while
  previously it could not find the files and showed empty window.

  PR:	253091

Changes:
  head/x11-wm/icewm/Makefile
Comment 11 Alexey Dokuchaev freebsd_committer freebsd_triage 2021-02-08 04:27:52 UTC
Should be fixed with ports r564677, thanks for reporting.