Forums

Skip to content

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

[Solved] Patching Dwm

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
jb1277976_
n00b
n00b
User avatar
Posts: 35
Joined: Mon Oct 30, 2023 3:50 am

[Solved] Patching Dwm

  • Quote

Post by jb1277976_ » Mon Apr 28, 2025 6:33 pm

Hello,

I have patched dwm the suckless way and everything is fine.. My question is that i want to start over and do it the portage gentoo way.. i also want to use git.. if Gentoo puts cocnfig.def.h and other stuff in /var/tmp working directory it would make sense to get a git init in the working directory but for some reason when i emerge dwm the /var/tmp directory is gone meaning the git init repo is gone.. What can i do ?

Thanks
Last edited by jb1277976_ on Tue Apr 29, 2025 1:24 am, edited 1 time in total.
Top
Banana
Moderator
Moderator
User avatar
Posts: 2363
Joined: Fri May 21, 2004 12:02 pm
Location: Germany
Contact:
Contact Banana
Website

  • Quote

Post by Banana » Mon Apr 28, 2025 6:40 pm

I don't really get what you mean by using git in this case.
Gentoo has an official way to apply patches: https://wiki.gentoo.org/wiki//etc/portage/patches
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Top
jb1277976_
n00b
n00b
User avatar
Posts: 35
Joined: Mon Oct 30, 2023 3:50 am

  • Quote

Post by jb1277976_ » Mon Apr 28, 2025 6:44 pm

Banana wrote:I don't really get what you mean by using git in this case.
Gentoo has an official way to apply patches: https://wiki.gentoo.org/wiki//etc/portage/patches
Hi,

Sorry if i didn't explain.. When i put patches in the correct dir and run ebuild name.ebuild clean prepare if they work they work then i can rebuild dwm and it works.. but sometimes it fails and i don't know where dwm.c or config.def.h are since the working directory gets rebuilt every time i re-emerge.. how do i manually fix patches if it fails ?

Hope that makes sense

I found this viewtopic-p-8815189.html#8815189 and will try it.. i will patch manually the put that patch into portage direcotry with the patches and see if it works
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56071
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Mon Apr 28, 2025 7:56 pm

jb1277976_,

Is FEATURES="keepwork" what you want?
Read

Code: Select all

man make.conf
before you use it.

Set it either on the command line or on a per package basis.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
jb1277976_
n00b
n00b
User avatar
Posts: 35
Joined: Mon Oct 30, 2023 3:50 am

  • Quote

Post by jb1277976_ » Mon Apr 28, 2025 10:09 pm

NeddySeagoon wrote:jb1277976_,

Is FEATURES="keepwork" what you want?
Read

Code: Select all

man make.conf
before you use it.

Set it either on the command line or on a per package basis.
Thanks

Seems like it would work but for some reason it seems like portage is skipping the working dir. i just deleted savedconfig and took out the keepwork and will try to see what i can do..

Any other hints or tips ?

@NeddySeagoon

It's working thanks.. trying to git init from there isn't working for some reason.. patching the dir without git works fine

This is such a learning experience.. i'm giong to try git again

Thanks
Top
Hu
Administrator
Administrator
Posts: 24380
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Mon Apr 28, 2025 11:29 pm

Portage normally clears the working directory before starting the build, to avoid mysterious failures from broken prior runs. The Portage /etc/portage/patches mechanism exists to let you apply patches to the newly reinitialized working directory after it has been cleared and unpacked. You should not use a workflow that depends on the long term persistence of anything in /var/tmp. For the limited purpose of prototyping your patch, working in that directory can work. However, you should only do this long enough to draft a patch for use via /etc/portage/patches.

If you still need help, please describe your current workflow in sufficient detail we could recreate it, and describe what is still not working as desired.
Top
jb1277976_
n00b
n00b
User avatar
Posts: 35
Joined: Mon Oct 30, 2023 3:50 am

  • Quote

Post by jb1277976_ » Tue Apr 29, 2025 1:24 am

Hu wrote:Portage normally clears the working directory before starting the build, to avoid mysterious failures from broken prior runs. The Portage /etc/portage/patches mechanism exists to let you apply patches to the newly reinitialized working directory after it has been cleared and unpacked. You should not use a workflow that depends on the long term persistence of anything in /var/tmp. For the limited purpose of prototyping your patch, working in that directory can work. However, you should only do this long enough to draft a patch for use via /etc/portage/patches.

If you still need help, please describe your current workflow in sufficient detail we could recreate it, and describe what is still not working as desired.
Hello,

Everything is working now.. i used the post from here viewtopic-p-8860431.html#8860431 enabled FEATURES="keepwork" so the working dir of dwm is always there after i unpacked it with the ebuild.. i created a git repo and i've applied like 8 patches lol.. i don't have savedconfig i just edit the source directly and emerge dwm..

Everything is good

Thanks
Top
jb1277976_
n00b
n00b
User avatar
Posts: 35
Joined: Mon Oct 30, 2023 3:50 am

  • Quote

Post by jb1277976_ » Thu May 01, 2025 10:51 pm

NeddySeagoon wrote:jb1277976_,

Is FEATURES="keepwork" what you want?
Read

Code: Select all

man make.conf
before you use it.

Set it either on the command line or on a per package basis.
Something wierd is literally happening right now

i put a patch in portage patches area right.. when i emerge it says that config.def.h.rej has been placed in my working dir in /var/tmp i then go there patch it and emerge dwm and it fails again.. same problem..

This is ware it gets weird.. say i patch it then go to /var/db/repos/gentoo/x11-wm/dwm then rune ebuild dwm-6 merge everything works fine and im a happy camper.. it does fail with the ebuild if i run it with clean prepare or clean merge

Wierd right ?

What should i do ?
Top
jb1277976_
n00b
n00b
User avatar
Posts: 35
Joined: Mon Oct 30, 2023 3:50 am

  • Quote

Post by jb1277976_ » Thu May 01, 2025 11:01 pm

Hu wrote:Portage normally clears the working directory before starting the build, to avoid mysterious failures from broken prior runs. The Portage /etc/portage/patches mechanism exists to let you apply patches to the newly reinitialized working directory after it has been cleared and unpacked. You should not use a workflow that depends on the long term persistence of anything in /var/tmp. For the limited purpose of prototyping your patch, working in that directory can work. However, you should only do this long enough to draft a patch for use via /etc/portage/patches.

If you still need help, please describe your current workflow in sufficient detail we could recreate it, and describe what is still not working as desired.
I didn't see this but i just did a comment about this here viewtopic-p-8860610.html#8860610

Thanks
Top
Post Reply

9 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