Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

Cant build dwm with some patches

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
14 posts • Page 1 of 1
Author
Message
InvisibleRasta
Apprentice
Apprentice
User avatar
Posts: 197
Joined: Wed Mar 30, 2011 10:41 pm

Cant build dwm with some patches

  • Quote

Post by InvisibleRasta » Sat May 16, 2020 10:17 pm

Hello guys, I am trying to build dwm with some patches and i am getting errors. I am not sure why as i have built dwm with this patches before on another distro.
I placed the patches in /etc/portage/patches/x11-wm/dwm
Had to rename them from .diff to .patch as the wiki describes

Code: Select all

dwm-6.2-taggrid.patch                   dwm-cyclelayouts-20180524-6.2.patch  dwm-rotatestack-20161021-ab9571b.patch
dwm-activetagindicatorbar-6.2.patch     dwm-fancybar-6.2.patch               dwm-statuspadding-20150524-c8e9479.patch
dwm-alpha-20180613-b69c870.patch        dwm-gridmode-5.8.2.patch
dwm-attachaside-20180126-db22360.patch  dwm-restartsig-20180523-6.2.patch  

Code: Select all

[ebuild  N    ] x11-wm/dwm-6.2

Would you like to merge these packages? [Yes/No]
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) x11-wm/dwm-6.2::gentoo
>>> Failed to emerge x11-wm/dwm-6.2, Log file:
>>>  '/var/tmp/portage/x11-wm/dwm-6.2/temp/build.log'
 * Package:    x11-wm/dwm-6.2
 * Repository: gentoo
 * Maintainer: desktop-misc@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
 * Applying dwm-6.2-taggrid.patch ...
 [ ok ]
 * Applying dwm-activetagindicatorbar-6.2.patch ...
patching file dwm.c
Hunk #1 succeeded at 734 with fuzz 1 (offset 15 lines).
 [ ok ]
 * Applying dwm-alpha-20180613-b69c870.patch ...
 [ ok ]
 * Applying dwm-attachaside-20180126-db22360.patch ...
 [ ok ]
 * Applying dwm-cyclelayouts-20180524-6.2.patch ...
 [ ok ]
 * Applying dwm-fancybar-6.2.patch ...
 [ ok ]
 * Applying dwm-gridmode-5.8.2.patch ...
 [ ok ]
 * Applying dwm-restartsig-20180523-6.2.patch ...
patching file config.def.h
Hunk #1 FAILED at 94.
1 out of 1 hunk FAILED -- saving rejects to file config.def.h.rej
patching file dwm.1
Hunk #1 succeeded at 148 (offset 6 lines).
Hunk #2 succeeded at 164 (offset 6 lines).
patching file dwm.c
Hunk #1 succeeded at 212 with fuzz 2 (offset 7 lines).
Hunk #2 succeeded at 271 (offset 9 lines).
Hunk #3 succeeded at 1389 (offset 138 lines).
Hunk #4 succeeded at 1678 (offset 138 lines).
Hunk #5 succeeded at 1858 (offset 214 lines).
Hunk #6 succeeded at 2418 with fuzz 1 (offset 258 lines).
 [ !! ]
 * ERROR: x11-wm/dwm-6.2::gentoo failed (prepare phase):
 *   patch -p1  failed with /etc/portage/patches/x11-wm/dwm/dwm-restartsig-20180523-6.2.patch
 *
 * Call stack:
 *               ebuild.sh, line  125:  Called src_prepare
 *             environment, line 1259:  Called default
 *      phase-functions.sh, line  855:  Called default_src_prepare
 *      phase-functions.sh, line  920:  Called __eapi6_src_prepare
 *             environment, line  192:  Called eapply_user
 *             environment, line  488:  Called eapply '/etc/portage/patches/x11-wm/dwm/dwm-restartsig-20180523-6.2.patch'
 *             environment, line  458:  Called _eapply_patch '/etc/portage/patches/x11-wm/dwm/dwm-restartsig-20180523-6.2.patch'
 *             environment, line  396:  Called __helpers_die 'patch -p1  failed with /etc/portage/patches/x11-wm/dwm/dwm-restartsig-20180523-6.2.patch'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *   		die "$@"
 *
 * If you need support, post the output of `emerge --info '=x11-wm/dwm-6.2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=x11-wm/dwm-6.2::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/x11-wm/dwm-6.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-wm/dwm-6.2/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-wm/dwm-6.2/work/dwm-6.2'
 * S: '/var/tmp/portage/x11-wm/dwm-6.2/work/dwm-6.2'

 * Messages for package x11-wm/dwm-6.2:

 * ERROR: x11-wm/dwm-6.2::gentoo failed (prepare phase):
 *   patch -p1  failed with /etc/portage/patches/x11-wm/dwm/dwm-restartsig-20180523-6.2.patch
 *
 * Call stack:
 *               ebuild.sh, line  125:  Called src_prepare
 *             environment, line 1259:  Called default
 *      phase-functions.sh, line  855:  Called default_src_prepare
 *      phase-functions.sh, line  920:  Called __eapi6_src_prepare
 *             environment, line  192:  Called eapply_user
 *             environment, line  488:  Called eapply '/etc/portage/patches/x11-wm/dwm/dwm-restartsig-20180523-6.2.patch'
 *             environment, line  458:  Called _eapply_patch '/etc/portage/patches/x11-wm/dwm/dwm-restartsig-20180523-6.2.patch'
 *             environment, line  396:  Called __helpers_die 'patch -p1  failed with /etc/portage/patches/x11-wm/dwm/dwm-restartsig-20180523-6.2.patch'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *   		die "$@"
 *
 * If you need support, post the output of `emerge --info '=x11-wm/dwm-6.2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=x11-wm/dwm-6.2::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/x11-wm/dwm-6.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-wm/dwm-6.2/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-wm/dwm-6.2/work/dwm-6.2'
 * S: '/var/tmp/portage/x11-wm/dwm-6.2/work/dwm-6.2'                            
Top
CaptainBlood
Advocate
Advocate
User avatar
Posts: 4237
Joined: Sun Jan 24, 2010 9:38 am

  • Quote

Post by CaptainBlood » Sun May 17, 2020 12:51 am

What about testing it as a single patch?
Thks 4 ur attention, interest & support.
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2110
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

Re: Cant build dwm with some patches

  • Quote

Post by GDH-gentoo » Sun May 17, 2020 1:00 am

InvisibleRasta wrote:Had to rename them from .diff to .patch as the wiki describes
This is not necessary. Patches can have names that end with .diff as well.
InvisibleRasta wrote:

Code: Select all

dwm-6.2-taggrid.patch                   dwm-cyclelayouts-20180524-6.2.patch  dwm-rotatestack-20161021-ab9571b.patch
dwm-activetagindicatorbar-6.2.patch     dwm-fancybar-6.2.patch               dwm-statuspadding-20150524-c8e9479.patch
dwm-alpha-20180613-b69c870.patch        dwm-gridmode-5.8.2.patch
dwm-attachaside-20180126-db22360.patch  dwm-restartsig-20180523-6.2.patch  
That's quite a few patches. Unfortunately, patches listed in upstream's website are diffs with respect to upstream's unmodified sources. When you apply a bunch of them, some may interfere with some of the others.
InvisibleRasta wrote:

Code: Select all

 * Applying dwm-6.2-taggrid.patch ...
 [ ok ]
...
 * Applying dwm-restartsig-20180523-6.2.patch ...
patching file config.def.h
Hunk #1 FAILED at 94.
1 out of 1 hunk FAILED -- saving rejects to file config.def.h.rej
And that's what is happening here. dwm-6.2-taggrid.patch is applied first, and modifies config.def.h in a way that makes dwm-restartsig-20180523-6.2.patch not apply cleanly. If you want both patches, you'll have to modify part of the latter:

Code: Select all

--- a/config.def.h
+++ b/config.def.h
@@ -110,6 +110,7 @@
        TAGKEYS(                        XK_8,                      7)
        TAGKEYS(                        XK_9,                      8)
        { MODKEY|ShiftMask,             XK_q,      quit,           {0} },
+       { MODKEY|ControlMask|ShiftMask, XK_q,      quit,           {1} }, 
 
     { MODKEY|ControlMask,           XK_Up,     switchtag,      { .ui = SWITCHTAG_UP     | SWITCHTAG_VIEW } },
     { MODKEY|ControlMask,           XK_Down,   switchtag,      { .ui = SWITCHTAG_DOWN   | SWITCHTAG_VIEW } },
diff --git a/dwm.1 b/dwm.1
index 13b3729..36a331c 100644
Note that the forum can mess up whitespace characters: the first three lines have space followed by a TAB, the fourth one has a plus sign followed by a TAB, the fifth one has a single space, and the rest have all spaces before the '{'.
Last edited by GDH-gentoo on Sun May 17, 2020 3:49 pm, edited 1 time in total.
Top
InvisibleRasta
Apprentice
Apprentice
User avatar
Posts: 197
Joined: Wed Mar 30, 2011 10:41 pm

  • Quote

Post by InvisibleRasta » Sun May 17, 2020 1:07 am

Is there a way to actually tell emerge to run patches in a certain order?
I asked about this error in the gentoo irc channel earlier and the replies i got i didnt really understand.
Grknight or someone with a similar name told me i had to do something in regards to the savedconfig File that is generated by portage when you emerge dwm. I dont know exactly what he wanted me to do but he was saying something about modifying the patches. I dont know, his answer was too advanced for me to understand.
Top
InvisibleRasta
Apprentice
Apprentice
User avatar
Posts: 197
Joined: Wed Mar 30, 2011 10:41 pm

Re: Cant build dwm with some patches

  • Quote

Post by InvisibleRasta » Sun May 17, 2020 1:43 am

GDH-gentoo wrote:
InvisibleRasta wrote:Had to rename them from .diff to .patch as the wiki describes
This is not necessary. Patches can have names that end with .diff as well.
InvisibleRasta wrote:

Code: Select all

dwm-6.2-taggrid.patch                   dwm-cyclelayouts-20180524-6.2.patch  dwm-rotatestack-20161021-ab9571b.patch
dwm-activetagindicatorbar-6.2.patch     dwm-fancybar-6.2.patch               dwm-statuspadding-20150524-c8e9479.patch
dwm-alpha-20180613-b69c870.patch        dwm-gridmode-5.8.2.patch
dwm-attachaside-20180126-db22360.patch  dwm-restartsig-20180523-6.2.patch  
That's quite a few patches. Unfortunately, patches listed in upstream's website are diffs with respect to upstream's unmodified sources. When you apply a bunch of them, some may interfere with some of the others.
InvisibleRasta wrote:

Code: Select all

 * Applying dwm-6.2-taggrid.patch ...
 [ ok ]
...
 * Applying dwm-restartsig-20180523-6.2.patch ...
patching file config.def.h
Hunk #1 FAILED at 94.
1 out of 1 hunk FAILED -- saving rejects to file config.def.h.rej
And that's what is happening here. dwm-6.2-taggrid.patch is applied first, and modifies config.def.h in a way that makes dwm-restartsig-20180523-6.2.patch not apply cleanly. If you want both patches, you'll have to modify part of the latter:

Code: Select all

--- a/config.def.h
+++ b/config.def.h
@@ -110,6 +110,7 @@
        TAGKEYS(                        XK_8,                      7)
        TAGKEYS(                        XK_9,                      8)
        { MODKEY|ShiftMask,             XK_q,      quit,           {0} },
+       { MODKEY|ControlMask|ShiftMask, XK_q,      quit,           {1} }, 
 
     { MODKEY|ControlMask,           XK_Up,     switchtag,      { .ui = SWITCHTAG_UP     | SWITCHTAG_VIEW } },
     { MODKEY|ControlMask,           XK_Down,   switchtag,      { .ui = SWITCHTAG_DOWN   | SWITCHTAG_VIEW } },
Note that the forum can mess up whitespace characters: the first three lines have space followed by a TAB, the fourth one has a plus sign followed by a TAB, the fifth one has a single space, and the rest have all spaces before the '{'.

i cant find that in the two patches i have... where does that have to go? i tried to append that to both of the files in separate attempts and it failed both times
Top
CaptainBlood
Advocate
Advocate
User avatar
Posts: 4237
Joined: Sun Jan 24, 2010 9:38 am

  • Quote

Post by CaptainBlood » Sun May 17, 2020 2:12 am

I can see it cleary:

Code: Select all

From 2991f37f0aaf44b9f9b11e7893ff0af8eb88f649 Mon Sep 17 00:00:00 2001
From: Christopher Drelich <cd@cdrakka.com>
Date: Wed, 23 May 2018 22:50:38 -0400
Subject: [PATCH] Modifies quit to handle restarts and adds SIGHUP and SIGTERM
 handlers.

Modified quit() to restart if it receives arg .i = 1
MOD+CTRL+SHIFT+Q was added to confid.def.h to do just that.

Signal handlers were handled for SIGHUP and SIGTERM.
If dwm receives these signals it calls quit() with
arg .i = to 1 or 0, respectively.

To restart dwm:
MOD+CTRL+SHIFT+Q
or
kill -HUP dwmpid

To quit dwm cleanly:
MOD+SHIFT+Q
or
kill -TERM dwmpid
---
 config.def.h |  1 +
 dwm.1        | 10 ++++++++++
 dwm.c        | 22 ++++++++++++++++++++++
 3 files changed, 33 insertions(+)

diff --git a/config.def.h b/config.def.h
index a9ac303..e559429 100644
--- a/config.def.h
+++ b/config.def.h
@@ -94,6 +94,7 @@ static Key keys[] = {
 	TAGKEYS(                        XK_8,                      7)
 	TAGKEYS(                        XK_9,                      8)
 	{ MODKEY|ShiftMask,             XK_q,      quit,           {0} },
+	{ MODKEY|ControlMask|ShiftMask, XK_q,      quit,           {1} }, 
 };
I may be wrong, but it seems the line annotation is what to be changed, i.e '@@ -94,6 +94,7 @@' to the values he provided.
Untested.

EDIT: He also added three lines, mind the final empty line.
Thks 4 ur attention, interest & support.
Top
The Main Man
Veteran
Veteran
Posts: 1173
Joined: Thu Nov 27, 2014 11:25 pm
Location: /run/user/1000

  • Quote

Post by The Main Man » Sun May 17, 2020 8:38 am

With dwm you just have to do some things manually when using a lot of patches, that's just the way it is.
One patch modifies something and then some other patch fails because it expected to find different code.
Problem is not in the gentoo, besides... you would face the same problem when installing dwm manually with those same patches.

Try removing 'dwm-restartsig-20180523-6.2.patch' and see will it emerge.
Top
InvisibleRasta
Apprentice
Apprentice
User avatar
Posts: 197
Joined: Wed Mar 30, 2011 10:41 pm

  • Quote

Post by InvisibleRasta » Sun May 17, 2020 10:57 am

kajzer wrote:With dwm you just have to do some things manually when using a lot of patches, that's just the way it is.
One patch modifies something and then some other patch fails because it expected to find different code.
Problem is not in the gentoo, besides... you would face the same problem when installing dwm manually with those same patches.

Try removing 'dwm-restartsig-20180523-6.2.patch' and see will it emerge.

Code: Select all

Hunk #1 succeeded at 734 with fuzz 1 (offset 15 lines).                                                    [ ok ]
 * Applying dwm-alpha-20180613-b69c870.diff ...                                                            [ ok ]
 * Applying dwm-attachaside-20180126-db22360.diff ...                                                      [ ok ]
 * Applying dwm-cyclelayouts-20180524-6.2.diff ...                                                         [ ok ]
 * Applying dwm-fancybar-6.2.diff ...                                                                      [ ok ]
 * Applying dwm-gridmode-5.8.2.diff ...                                                                    [ ok ]
 * Applying dwm-rotatestack-20161021-ab9571b.diff ...
patching file config.def.h
Hunk #1 succeeded at 90 (offset 26 lines).
patching file dwm.c
Hunk #1 FAILED at 165.
Hunk #2 succeeded at 199 (offset 5 lines).
Hunk #3 succeeded at 881 (offset 115 lines).
Hunk #4 succeeded at 1531 (offset 118 lines).
1 out of 4 hunks FAILED -- saving rejects to file dwm.c.rej                                                [ !! ]
 * ERROR: x11-wm/dwm-6.2::gentoo failed (prepare phase):
 *   patch -p1  failed with /etc/portage/patches/x11-wm/dwm/dwm-rotatestack-20161021-ab9571b.diff
 *
 * Call stack:
 *               ebuild.sh, line  125:  Called src_prepare
 *             environment, line 1272:  Called default
 *      phase-functions.sh, line  855:  Called default_src_prepare
 *      phase-functions.sh, line  920:  Called __eapi6_src_prepare
 *             environment, line  205:  Called eapply_user
 *             environment, line  501:  Called eapply '/etc/portage/patches/x11-wm/dwm/dwm-rotatestack-20161021-ab9571b.diff'
 *             environment, line  471:  Called _eapply_patch '/etc/portage/patches/x11-wm/dwm/dwm-rotatestack-20161021-ab9571b.diff'
 *             environment, line  409:  Called __helpers_die 'patch -p1  failed with /etc/portage/patches/x11-wm/dwm/dwm-rotatestack-20161021-ab9571b.diff'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *   		die "$@"
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2110
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Sun May 17, 2020 4:00 pm

CaptainBlood wrote:I can see it cleary:
...
I may be wrong, but it seems the line annotation is what to be changed, i.e '@@ -94,6 +94,7 @@' to the values he provided.
Untested.

EDIT: He also added three lines, mind the final empty line.
Exactly, although the 3 lines that follow the one with '+' end the hunk. I edited the patch above to make it clearer.
InvisibleRasta wrote:

Code: Select all

 * Applying dwm-rotatestack-20161021-ab9571b.diff ...
patching file config.def.h
Hunk #1 succeeded at 90 (offset 26 lines).
patching file dwm.c
Hunk #1 FAILED at 165.
Hunk #2 succeeded at 199 (offset 5 lines).
Hunk #3 succeeded at 881 (offset 115 lines).
Hunk #4 succeeded at 1531 (offset 118 lines).
1 out of 4 hunks FAILED -- saving rejects to file dwm.c.rej                                                [ !! ]
Yeah, dwm-6.2-taggrid.patch also interferes with dwm-rotatestack-20161021-ab9571b.patch, but for dwm.c in this case. The latter also needs to be partially modified:

dwm-rotatestack-20161021-ab9571b.patch

Code: Select all

--- a/dwm.c
+++ b/dwm.c
@@ -166,6 +166,8 @@ static Monitor *dirtomon(int dir);
 static void drawbar(Monitor *m);
 static void drawbars(void);
 static void drawtaggrid(Monitor *m, int *x_pos, unsigned int occ);
+static void enqueue(Client *c);
+static void enqueuestack(Client *c);
 static void enternotify(XEvent *e);
 static void expose(XEvent *e);
 static void focus(Client *c);
@@ -194,6 +196,7 @@ static void resize(Client *c, int x, int y, int w, int h, int interact);
All lines that do not start with a plus sign start with a single space character.
Top
jb1277976_
n00b
n00b
User avatar
Posts: 35
Joined: Mon Oct 30, 2023 3:50 am

Re: Cant build dwm with some patches

  • Quote

Post by jb1277976_ » Sat Feb 03, 2024 7:38 am

InvisibleRasta wrote:Hello guys, I am trying to build dwm with some patches and i am getting errors. I am not sure why as i have built dwm with this patches before on another distro.
I placed the patches in /etc/portage/patches/x11-wm/dwm
Had to rename them from .diff to .patch as the wiki describes

Code: Select all

dwm-6.2-taggrid.patch                   dwm-cyclelayouts-20180524-6.2.patch  dwm-rotatestack-20161021-ab9571b.patch
dwm-activetagindicatorbar-6.2.patch     dwm-fancybar-6.2.patch               dwm-statuspadding-20150524-c8e9479.patch
dwm-alpha-20180613-b69c870.patch        dwm-gridmode-5.8.2.patch
dwm-attachaside-20180126-db22360.patch  dwm-restartsig-20180523-6.2.patch  

Code: Select all

[ebuild  N    ] x11-wm/dwm-6.2

Would you like to merge these packages? [Yes/No]
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) x11-wm/dwm-6.2::gentoo
>>> Failed to emerge x11-wm/dwm-6.2, Log file:
>>>  '/var/tmp/portage/x11-wm/dwm-6.2/temp/build.log'
 * Package:    x11-wm/dwm-6.2
 * Repository: gentoo
 * Maintainer: desktop-misc@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
 * Applying dwm-6.2-taggrid.patch ...
 [ ok ]
 * Applying dwm-activetagindicatorbar-6.2.patch ...
patching file dwm.c
Hunk #1 succeeded at 734 with fuzz 1 (offset 15 lines).
 [ ok ]
 * Applying dwm-alpha-20180613-b69c870.patch ...
 [ ok ]
 * Applying dwm-attachaside-20180126-db22360.patch ...
 [ ok ]
 * Applying dwm-cyclelayouts-20180524-6.2.patch ...
 [ ok ]
 * Applying dwm-fancybar-6.2.patch ...
 [ ok ]
 * Applying dwm-gridmode-5.8.2.patch ...
 [ ok ]
 * Applying dwm-restartsig-20180523-6.2.patch ...
patching file config.def.h
Hunk #1 FAILED at 94.
1 out of 1 hunk FAILED -- saving rejects to file config.def.h.rej
patching file dwm.1
Hunk #1 succeeded at 148 (offset 6 lines).
Hunk #2 succeeded at 164 (offset 6 lines).
patching file dwm.c
Hunk #1 succeeded at 212 with fuzz 2 (offset 7 lines).
Hunk #2 succeeded at 271 (offset 9 lines).
Hunk #3 succeeded at 1389 (offset 138 lines).
Hunk #4 succeeded at 1678 (offset 138 lines).
Hunk #5 succeeded at 1858 (offset 214 lines).
Hunk #6 succeeded at 2418 with fuzz 1 (offset 258 lines).
 [ !! ]
 * ERROR: x11-wm/dwm-6.2::gentoo failed (prepare phase):
 *   patch -p1  failed with /etc/portage/patches/x11-wm/dwm/dwm-restartsig-20180523-6.2.patch
 *
 * Call stack:
 *               ebuild.sh, line  125:  Called src_prepare
 *             environment, line 1259:  Called default
 *      phase-functions.sh, line  855:  Called default_src_prepare
 *      phase-functions.sh, line  920:  Called __eapi6_src_prepare
 *             environment, line  192:  Called eapply_user
 *             environment, line  488:  Called eapply '/etc/portage/patches/x11-wm/dwm/dwm-restartsig-20180523-6.2.patch'
 *             environment, line  458:  Called _eapply_patch '/etc/portage/patches/x11-wm/dwm/dwm-restartsig-20180523-6.2.patch'
 *             environment, line  396:  Called __helpers_die 'patch -p1  failed with /etc/portage/patches/x11-wm/dwm/dwm-restartsig-20180523-6.2.patch'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *   		die "$@"
 *
 * If you need support, post the output of `emerge --info '=x11-wm/dwm-6.2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=x11-wm/dwm-6.2::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/x11-wm/dwm-6.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-wm/dwm-6.2/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-wm/dwm-6.2/work/dwm-6.2'
 * S: '/var/tmp/portage/x11-wm/dwm-6.2/work/dwm-6.2'

 * Messages for package x11-wm/dwm-6.2:

 * ERROR: x11-wm/dwm-6.2::gentoo failed (prepare phase):
 *   patch -p1  failed with /etc/portage/patches/x11-wm/dwm/dwm-restartsig-20180523-6.2.patch
 *
 * Call stack:
 *               ebuild.sh, line  125:  Called src_prepare
 *             environment, line 1259:  Called default
 *      phase-functions.sh, line  855:  Called default_src_prepare
 *      phase-functions.sh, line  920:  Called __eapi6_src_prepare
 *             environment, line  192:  Called eapply_user
 *             environment, line  488:  Called eapply '/etc/portage/patches/x11-wm/dwm/dwm-restartsig-20180523-6.2.patch'
 *             environment, line  458:  Called _eapply_patch '/etc/portage/patches/x11-wm/dwm/dwm-restartsig-20180523-6.2.patch'
 *             environment, line  396:  Called __helpers_die 'patch -p1  failed with /etc/portage/patches/x11-wm/dwm/dwm-restartsig-20180523-6.2.patch'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *   		die "$@"
 *
 * If you need support, post the output of `emerge --info '=x11-wm/dwm-6.2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=x11-wm/dwm-6.2::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/x11-wm/dwm-6.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-wm/dwm-6.2/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-wm/dwm-6.2/work/dwm-6.2'
 * S: '/var/tmp/portage/x11-wm/dwm-6.2/work/dwm-6.2'                            
Follow this guide https://wiki.gentoo.org/wiki/Creating_a_patch and you should be good.

I have about 6 good patches that work. some fail but most work. it just depends.

Like i found out that you can't have multiple layouts. like bottom stack and dwm won't compile anymore. delete bottom stack layout and put centeredmasterd and that works. very wierd. Been patching all day. Will report back if i find anything else

~ Joe B
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56073
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Feb 04, 2024 11:49 am

Moved from Desktop Environments to Portage & Programming.

Its more to do with how portage applies patches
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
arvamircea
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 109
Joined: Sat May 21, 2022 10:09 am
Location: Swadlincote
Contact:
Contact arvamircea
Website

  • Quote

Post by arvamircea » Mon Feb 05, 2024 7:09 am

Gentoo wiki for dwm:
"Copy the dwm patches to /etc/portage/patches/x11-wm/dwm/ and make sure each patch is prefixed with a number, like so: 01-name_of_patch.patch. Also the filename needs to end with .patch or .diff otherwise Portage will not apply it."
I believe you need to rename the patches and put "01-*" and "02-* and so on in front of the patch names and they will be added in that order. For example I have:

Code: Select all

01-dwm-stacker-6.2.diff  02-dwm-fibonacci-6.2.patch
Secondly, if I wore you I would take all those patches out. Add one at a time. Move the first patch, rename it, emerge dwm, if successful move the next patch.
If a patch fails, you want to look where it fails. You will see something like "Hunk #1 FAILED at 94". You need to go into the patch file and you will find something like "@@ -90,6 +101,29 @@" (this is just random example).
You can see how your dwm.c looks in "/var/tmp/portage/x11-wm/dwm-6.2/work..."(somewhere in there look for it), open it and go (in this example) around line 90.
You have both files side by side "your patch file" and "dwm.c".
Your goal is to manually change the patch file so it works. There is no one rule that works all time time here. You do it mostly by eye, it will take time and luck.
I will give you an example. In my patch file I had something like:

Code: Select all

-           if (!selmon->sel)
But i found that line in my dwm.c was:

Code: Select all

if (!selmon->sel || (selmon->sel->isfullscreen && lockfullscreen))
So I manually changed the patch file to:

Code: Select all

-           if (!selmon->sel || (selmon->sel->isfullscreen && lockfullscreen))
And yep that worked and the patch went through.

Also for me at least the "dwm.h" never gets patched even if emerge dwm was successful. So I have to look what the patch file tries to do to the "dwm.h" file and manually write that in. Not sure if this is intended behaviour or not. But it works.
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2110
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Mon Feb 05, 2024 10:47 pm

And that sounds like a lllllllllot of manual work, is DWM worth it?
arvamircea wrote:Also for me at least the "dwm.h" never gets patched even if emerge dwm was successful. So I have to look what the patch file tries to do to the "dwm.h" file and manually write that in. Not sure if this is intended behaviour or not. But it works.
You mean config.h? If yes, then it's intended behaviour, config.h is the file that upstream actually expects users to modify for customization, so it is covered by the savedconfig USE flag mechanism. But DWM users seemingly want rewrites actually :)
NeddySeagoon wrote:I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Top
flexibeast
l33t
l33t
Posts: 679
Joined: Mon Apr 04, 2022 4:15 am
Location: Naarm/Melbourne, Australia
Contact:
Contact flexibeast
Website

  • Quote

Post by flexibeast » Tue Feb 06, 2024 12:12 am

GDH-gentoo wrote:And that sounds like a lllllllllot of manual work, is DWM worth it?
Yes, because it avoids Bloat(tm)! Just like ed(1) does: only mere mortals want to see the state of the file when editing. Vi is just Bloat.
Top
Post Reply

14 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy