Bug 255548 - x11-wm/icewm: bsd-daemon.xpm not a valid xpm file
Summary: x11-wm/icewm: bsd-daemon.xpm not a valid xpm file
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: Fernando Apesteguía
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-02 15:01 UTC by wolfgang
Modified: 2021-05-05 08:27 UTC (History)
2 users (show)

See Also:
portmaster: maintainer-feedback+


Attachments
x11-wm/icewm: fixes corrupted header in bsd-daemon.xpm (305 bytes, patch)
2021-05-03 17:38 UTC, Chris Hutchinson
portmaster: maintainer-approval+
Details | Diff
x1-wm/icewm: fixes beastified xpm header && pets portlint (1.23 KB, patch)
2021-05-03 21:04 UTC, Chris Hutchinson
portmaster: maintainer-approval+
Details | Diff
x11-wm/icewm: fix beastie xpm && pet portlint (1.26 KB, patch)
2021-05-03 21:27 UTC, Chris Hutchinson
portmaster: maintainer-approval+
Details | Diff
x11-wm/icewm: fixes bsd-daemon.xpm && pets portlint -- FINAL (1.23 KB, patch)
2021-05-03 21:59 UTC, Chris Hutchinson
portmaster: maintainer-approval+
Details | Diff
x11-wm/icewm: fixes bsd-daemon.xpm && pets portlint (1.26 KB, patch)
2021-05-03 22:11 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 wolfgang 2021-05-02 15:01:57 UTC
The file bsd-daemon.xpm that the port installs as start.xpm if the BEASTIE option is selected is broken since the update to Version 2.2.1
Reason is line 1 of the file, which is now no longer a valid XPM header due to the addition of the author attribution.
I suggest to revert the change to bsd-daemon.png and to add the attribution to pkg-descr instead again.
Comment 1 wolfgang 2021-05-02 15:51:47 UTC
This should of course read "revert the change to bsd-daemon.xpm".
Comment 2 Chris Hutchinson 2021-05-03 05:25:23 UTC
Thanks for the report!
I'll have a look tomorrow morning and provide
a proper fix along with a diff(1) to update this port.

Thanks again!

--Chris
Comment 3 Chris Hutchinson 2021-05-03 17:38:36 UTC
Created attachment 224636 [details]
x11-wm/icewm: fixes corrupted header in bsd-daemon.xpm

This patch (diff (1)) removes a comma that resulted in
corrupt header in the files/bsd-daemon.xpm icon.

Changes
files/bsd-daemon.xpm

That's it.

Thanks!

--Chris
Comment 4 wolfgang 2021-05-03 19:12:16 UTC
Unfortunately that patch is not sufficient. icewm still does not load the image after the patch, also the "file" command does not recognize the file as "X pixmap image"
Comment 5 Chris Hutchinson 2021-05-03 19:39:46 UTC
(In reply to wolfgang from comment #4)
> also the "file" command does not recognize the file
> as "X pixmap image"
How did you use file(1)?

root@portsdev:/usr/ports/x11-wm/icewm/files # file bsd-daemon.xpm
bsd-daemon.xpm: ASCII text

The bsd-daemon.xpm is valid per the xpm spec in every way.

Perhaps you didn't use file(1) correctly?
-h, --no-dereference
  option causes symlinks not to be followed (on systems that
  support symbolic links).  This is the default if the
  environment variable POSIXLY_CORRECT is not defined.

HTH and thanks for the report! :-)

--Chris
Comment 6 Chris Hutchinson 2021-05-03 21:04:17 UTC
Created attachment 224644 [details]
x1-wm/icewm: fixes beastified xpm header && pets portlint

OK I'm dogfooding it this time.
I performed a deinstall. Followed by a fresh install
after my changes. The bsd-daemon.xpm IS identified
correctly by every image viewer available in the ports
tree. But NOT by the underlying icewm image decoder.
So until I get a bit more time to discover *where*
in the supporting icewm libs the decoding is wrong;
Simply strip all but the XPM in the comment tag.

While here; pet portlint.

Changes in this version of the patch/diff(1):

Makefile
files/bsd-daemon.xpm

That's it, and Thank you! :-)

--Chris
Comment 7 Chris Hutchinson 2021-05-03 21:15:08 UTC
@wolfgang
Do you still have the output from the error produced
by icewm immediately after closing the session?
I could really use those lines. As I lost mine out
of my buffer.

Thanks!

--Chris
Comment 8 Chris Hutchinson 2021-05-03 21:27:39 UTC
Created attachment 224648 [details]
x11-wm/icewm: fix beastie xpm && pet portlint

OK everything is the same as the last version.
EXCEPT I was able to kill 2 birds with one stone on
the original problem.

Changes
Mahefile (pet portlint)
files/bsd-daemon.xpm

I was able to keep the author attribution in the
file SO LONG AS it was followed by XPM.

See attached patch / diff(1) for finer details.

That's all I'm going to do here. As everything has
been addressed and fixed.

Thanks for the adventure! :-)

--Chris
Comment 9 wolfgang 2021-05-03 21:41:05 UTC
Sorry, still doesn't work for me. I patched /usr/local/share/icewm/taskbar/bsd-daemon.xpm as in your newest patch and copied it to start.xpm in the same directory. On getting icewm to reload the files, it emits this message on console:

IceWM: Warnung: Bild nicht lesbar: /usr/local/share/icewm/taskbar/start.xpm

and it falls back to using linux.xpm from the same directory instead. If I call "file" for these two files, it shows this:

bsd-daemon.xpm: ASCII text
linux.xpm:      X pixmap image, ASCII text
Comment 10 Chris Hutchinson 2021-05-03 21:52:45 UTC
(In reply to wolfgang from comment #9)
> IceWM: Warnung: Bild nicht lesbar: /usr/local/share/icewm/taskbar/start.xpm
BIZARRE
That's what I got BEFORE my latest patch. Well, it was
IceWM: Warning: Image Not Readable: /usr/local/share/icewm/taskbar/start.xpm
But AFTER hanging XPM after the attribution. I got the "beastie" icon.

Hmm... OK I'll post the previous patch, replacing this one.

Thanks for the feedback Wolfgang! :-)

--Chris
Comment 11 Chris Hutchinson 2021-05-03 21:59:13 UTC
Created attachment 224650 [details]
x11-wm/icewm: fixes bsd-daemon.xpm && pets portlint -- FINAL

OK This patch won't miss. While I'm still a bit
puzzled by the differences in outcome between
Wolfgang & my experiences. Best to "play it safe".
This patch strips the attribution from bsd-daemon.xpm
and pets portlint.

Changes
Makefile (pet portlint)
files/bsd-daemon.xpm (as noted above)

I dogfooded this. Unless I hear otherwise.
Please commit. :-)

Thanks!

--Chris
Comment 12 wolfgang 2021-05-03 22:01:17 UTC
Sorry, I just checked and I actually made a mistake in patching the file, mea culpa. If I perform the patch correctly having the XPM at the end of the attribution, icewm does indeed read and display the file correctly. Sorry for misleading you here.
However, "file" still doesn't recognize it as a "X pixmap image"
Comment 13 Chris Hutchinson 2021-05-03 22:05:37 UTC
> Sorry, I just checked and I actually made a mistake in patching the file, mea culpa.
You owe me a pint! ;-)

OK I still have the previous patch. Thank you VERY much for
being honest about it. REALLY sets my mind at ease. :-)

Thanks Wolfgang! :-)

--Chris
Comment 14 Chris Hutchinson 2021-05-03 22:11:58 UTC
Created attachment 224651 [details]
x11-wm/icewm: fixes bsd-daemon.xpm && pets portlint

Fixes header of the files/bsd-daemon.xpm file
makes portlint happy

Changes
Makefile (pet portlint)
files/bsd-daemon.xpm (fix header)

Works as tested by myself && Wolfgang (reporter)

I'm done here. :-)

Please commit.

--Chris
Comment 15 commit-hook freebsd_committer 2021-05-05 08:27:11 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=cf6ea18e37b0d4ab91f1d4da5509a2f166758899

commit cf6ea18e37b0d4ab91f1d4da5509a2f166758899
Author:     Fernando Apesteguía <fernape@FreeBSD.org>
AuthorDate: 2021-05-04 06:21:52 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2021-05-05 08:22:36 +0000

    x11-wm/icewm: Fix bsd-daemon.xpm

    There was a problem with the initial comment in the xpm file that
    prevented the image to be loaded properly.

    PR:     255548
    Reported by:    wolfgang@lyxys.ka.sub.org
    Approved by:    portmaster@bsdforge.com (maintainer)

 x11-wm/icewm/Makefile             | 5 +++--
 x11-wm/icewm/files/bsd-daemon.xpm | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
Comment 16 Fernando Apesteguía freebsd_committer 2021-05-05 08:27:36 UTC
Committed,

Thanks!