Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 621024 - x11-wm/ctwm-4.0.1 version bump
Summary: x11-wm/ctwm-4.0.1 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-06 13:22 UTC by Manfred Knick
Modified: 2017-07-19 09:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
'/var/tmp/portage/x11-wm/ctwm-4.0.1/temp/build.log' (build.log,1.29 KB, text/x-log)
2017-06-06 16:16 UTC, Manfred Knick
Details
!dirty! /usr/local/portage/local-overlay/x11-wm/ctwm/ctwm-4.0.1.ebuild (ctwm-4.0.1.ebuild,1.53 KB, text/plain)
2017-06-06 19:24 UTC, Manfred Knick
Details
/etc/portage/patches/x11-wm/ctwm-4.0.1/4.0.1-0001-parse_m4.c-Naur.patch (4.0.1-0001-parse_m4.c-Naur.patch,438 bytes, patch)
2017-06-08 17:07 UTC, Manfred Knick
Details | Diff
ctwm-4.0.1-0001-parse_m4.patch ; comments removed (ctwm-4.0.1-0001-parse_m4.patch,438 bytes, patch)
2017-06-08 17:30 UTC, Manfred Knick
Details | Diff
ctwm-4.0.1-0001-parse_m4.patch ; comments removed (ctwm-4.0.1-0001-parse_m4.patch,391 bytes, patch)
2017-06-08 17:38 UTC, Manfred Knick
Details | Diff
/etc/portage/patches/x11-wm/ctwm-4.0.1/ctwm-4.0.1-0001-parse_m4.c__MK__MF__MK.patch (ctwm-4.0.1-0001-parse_m4.c__MK__MF__MK.patch,600 bytes, patch)
2017-06-13 14:14 UTC, Manfred Knick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Manfred Knick 2017-06-06 13:22:03 UTC
Current Release

Current release: 4.0.1

    ctwm-4.0.1.tar.xz (641k).

. . . [ https://www.ctwm.org/download.html ]

. . . [ https://www.ctwm.org/dist/ctwm-4.0.1.tar.xz ]
Comment 1 Manfred Knick 2017-06-06 13:45:12 UTC
Note:

OLD    HOMEPAGE="http://ctwm.free.lp.se/"

is _not_ valid any more:


HOMEPAGE="https://www.ctwm.org/"

SRC_URI="https://www.ctwm.org/dist/${P}.tar.gz"

? Adapt to .xz ?

SRC_URI="https://www.ctwm.org/dist/${P}.tar.xz"
Comment 2 Jonas Stein gentoo-dev 2017-06-06 15:11:12 UTC
Manfred, we do not have a maintainer for this package.

Good news: At least the new URI is used in ctwm-3.8.2:

/usr/portage/x11-wm/ctwm$ grep HOMEP *
ctwm-3.7.ebuild:HOMEPAGE="http://ctwm.free.lp.se/"
ctwm-3.8.2.ebuild:HOMEPAGE="http://ctwm.org/"
ctwm-3.8.2.ebuild:SRC_URI="${HOMEPAGE}dist/${P}.tar.xz"
ctwm-3.8a-r1.ebuild:HOMEPAGE="http://ctwm.free.lp.se/"

Does a simple bump from ctwm-3.8.2 to ctwm-4.0.1 work?
Comment 3 Manfred Knick 2017-06-06 16:16:30 UTC
Created attachment 475396 [details]
'/var/tmp/portage/x11-wm/ctwm-4.0.1/temp/build.log'
Comment 4 Manfred Knick 2017-06-06 16:17:08 UTC
(In reply to Jonas Stein from comment #2)

> Does a simple bump from ctwm-3.8.2 to ctwm-4.0.1 work?

Unfortunately not -
main (first) error @ prepare phase:

. . . "sed: can't read Imakefile: No such file or directory"
Comment 5 Jonas Stein gentoo-dev 2017-06-06 18:35:55 UTC
OK this message comes from
"sed -i Imakefile -e "/^CONFDIR/s@=.*@= /etc/X11/twm@g" || die"

Manfred, you are very interested in building packages, but we can not assist you in a bugtracker. 
Please visit the support channels [1] and we will help you as good as we can.
A good start is #gentoo on IRC.

I think one should
* test, if the sed lines are still required
* bump EAPI
* write SRC_URI="${HOMEPAGE}dist/${P}.tar.xz" without variable
* reduce newlines

[1] https://www.gentoo.org/support/
Comment 6 Manfred Knick 2017-06-06 19:24:02 UTC
Created attachment 475416 [details]
!dirty! /usr/local/portage/local-overlay/x11-wm/ctwm/ctwm-4.0.1.ebuild

Commenting src_prepare() and src_configure() specialites and doc stuff
for a quick test.
Comment 7 Manfred Knick 2017-06-06 19:34:37 UTC
Seems ctwm has moved away from old X11 Imake ...

Downloading .xz + "make" succeeded.

Cleaning out old specialities in prepare and configure,
as well as some doc problems resulted into

. . . successful emerge

as well as

. . . startx /usr/local/bin/ctwm

starting successfully resulting into a display as expected.

The ebuild needs an overhaul, for sure.


(In reply to Jonas Stein from comment #5)

Just my 2 cents into the 'collection box'.
Comment 8 Manfred Knick 2017-06-07 17:08:33 UTC
@ Jeroen Roovers : Thanks a lot, that was quick !

Discovered your
   commit:     b7ddf13cf77f36c29a7be4f2e852ca9f7701916f
this morning, deleted my /usr/local/portage/local-overlay/x11-wm/ctwm
and tested

    x11-wm/ctwm-4.0.1:0 [gentoo]

via copying the system.ctwm to .ctwmrc.

Single Screen only:
   'startx /usr/bin/ctwm -- -layout One'
worked as expected;

but

Four Screens:
   'startx /usr/bin/ctwm -- -layout Four'
started , displayed something graphical on first X11 screen for a millisecond,
threw an error:
   "mkstemp failed in m4_defs: Das Argument ist ungültig"
which would translate to
   "mkstemp failed in m4_defs: argument isinvalid"
and broke:
   "xinit: connection to X server lost"
without further ado or log information.

Using "--keep" option ("-K .ctwm.m4file") only revealed that
being identical to .ctwmrc.

Thus I resorted to

   'startx /usr/bin/ctwm --nom4  -- -layout One'      and
   'startx /usr/bin/ctwm --nom4  -- -layout Four'

respectively.

Confirmation : WORKSFORME without any issues.
Comment 9 Manfred Knick 2017-06-08 17:07:09 UTC
Created attachment 475606 [details, diff]
/etc/portage/patches/x11-wm/ctwm-4.0.1/4.0.1-0001-parse_m4.c-Naur.patch
Comment 10 Manfred Knick 2017-06-08 17:27:53 UTC
/var/tmp/portage/x11-wm/ctwm-4.0.1/work/ctwm-4.0.1/parse_m4.c :

in static char *m4_defs(Display *display, char *host) :

Line 141 :      static char tmp_name[] = "/tmp/ctwmrcXXXXXX";
----------------^^^^^^

Line 148 :              fd = mkstemp(tmp_name);
                        if(fd < 0) {
                                perror("mkstemp failed in m4_defs");
                                exit(377);

man mkstemp instead proposes :

----------------       int mkstemp(char *schablone);
----------------^^^^^^

The patch supplied "removes" the 'static' by commenting.

Afterwards,

   emerge -aC ctwm
   emerge -a  --depclean
   emerge -a  ctwm
   startx /usr/bin/ctwm   -- -layout Four

works as to be expected,

ressorting to "--nom4" is _not_ needed any more.

PROPOSAL :

Include into ./files (to be created) :

   c.f. attached patch below (comments removed) 

Include into ctwm-4.0.1.ebuild :

   PATCHES=(
       "${FILESDIR}/${PN}-4.0.1-0001-parse_m4.patch
   )
Comment 11 Manfred Knick 2017-06-08 17:30:11 UTC
Created attachment 475608 [details, diff]
ctwm-4.0.1-0001-parse_m4.patch ; comments removed
Comment 12 Manfred Knick 2017-06-08 17:38:08 UTC
Created attachment 475610 [details, diff]
ctwm-4.0.1-0001-parse_m4.patch ; comments removed
Comment 13 Manfred Knick 2017-06-08 18:59:50 UTC
POSTSCRIPTUM :

The original

   'startx /usr/bin/ctwm -- -layout One'         worked without "--nom4"

but

   'startx /usr/bin/ctwm --nom4  -- -layout Four'   did not.
Comment 14 Manfred Knick 2017-06-13 14:05:37 UTC
Current maintainer 

    Committer: Matthew Fuller
    Date: 2017-06-13 11:12:48 UTC
    Revision ID: fullermd@over-yonder.net-20170613111248-b0w3imyz1utbehsg

    Patch over a bug in generating the temp file for m4 stuff.

committed explanation and modification into ctwm trunk:

[ http://bazaar.launchpad.net/~ctwm/ctwm/trunk/revision/597 ]

Emerge applying "patch -p1" failed:

--- parse_m4.c	2016-05-03 20:19:31 +0000
+++ parse_m4.c	2017-06-13 10:37:46 +0000

so adding paths in front:

--- ctwm-4.0.1____orig/parse_m4.c       2016-05-03 20:19:31 +0000
+++ ctwm-4.0.1____MaFu/parse_m4.c       2017-06-13 10:37:46 +0000

. . . WORKSFORME.
Comment 15 Manfred Knick 2017-06-13 14:14:12 UTC
Created attachment 476246 [details, diff]
/etc/portage/patches/x11-wm/ctwm-4.0.1/ctwm-4.0.1-0001-parse_m4.c__MK__MF__MK.patch

Applicable until next minor release containing Matthew Fuller's changes.
Comment 16 Manfred Knick 2017-07-18 20:46:53 UTC
@  Pacho :

   Status:  → RESOLVED  ?

After updating the tree,
  I neither see any version upgrade (ctwm: "Current release: 4.0.1" still)
  nor any update in /x11-wm/ctwm,
      e.g. patch being integrated into ebuild and "x11-wm/ctwm/files/..." .

Which update do I miss?

Kind regards
Comment 17 Manfred Knick 2017-07-18 21:02:31 UTC
PROPOSAL :

Create  x11-wm/ctwm-4.0.1-r1 :

     src_prepare() {

     ...

   +   epatch "${FILESDIR}/${P}-0001-parse_m4.c.patch"
   + 
   + # Allow user patches
   +     epatch_user
     }

and add above patch under reduced file-nam into files/
Comment 18 Pacho Ramos gentoo-dev 2017-07-19 07:00:01 UTC
The bug was about bumping to the new version, and it's bumped herE:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec4f687cf8ddf09d497dbbfdd5fae1b8dcc8574f


Open a new bug report for the new issues , thanks
Comment 19 Manfred Knick 2017-07-19 08:00:51 UTC
(In reply to Pacho Ramos from comment #18)

You are right!

I should have realized that after myself with my comment 8:
   . . . bumped 
   . . . "Single Screen"   : works
   . . . "Multiple Screen" : fails

Thanks, Pachos! 
Sure, I will separate the latter.
Comment 20 Manfred Knick 2017-07-19 09:58:01 UTC
REFERENCE:

. . . Bug 625620

. . . x11-wm/ctwm-4.0.1 : 
. . . Multiple separate X11 Screens : 
. . . -r1 version bump

<cite>

     PROPOSAL: Inducing PATCH into -r1 :

     a)  x11-wm/ctwm/ctwm-4.0.1-r1.ebuild
     b)  x11-wm/ctwm/files/ctwm-4.0.1-0001-parse_m4.patch

</cite>