[SOLVED] DWM - how do you apply patches with patch?

I'm totally new to dwm (it's working great by the way) and patching. I'm having problems understanding how to use the patch program. The basic usage on dwm site says basically:
patch -p1 < path/to/patch.diff
Great, now I have the patch file ~/builds/dwn/patch/dwm-5.9-statuscolors.diff and my altered ~/builds/dwn/config.h. Here's what I did
herman@sam ~/builds/dwm $ patch -p1 <patch/dwm-5.9-statuscolors.diff
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
|diff -up dwm-5.9/config.def.h dwm-5.9-colors/config.def.h
|--- dwm-5.9/config.def.h 2011-07-10 16:24:25.000000000 -0400
|+++ dwm-5.9-colors/config.def.h 2011-08-18 02:02:47.033830823 -0400
File to patch: config.def.h
config.def.h: No such file or directory
Skip this patch? [y]
Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 41
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
|Only in dwm-5.9: config.h
|Only in dwm-5.9: dwm
|diff -up dwm-5.9/dwm.c dwm-5.9-colors/dwm.c
|--- dwm-5.9/dwm.c 2011-07-10 16:24:25.000000000 -0400
|+++ dwm-5.9-colors/dwm.c 2011-08-18 02:07:20.788935100 -0400
File to patch: dwm.c
dwm.c: No such file or directory
Skip this patch? [y]
Skipping patch.
12 out of 12 hunks ignored
and it asks me for the filename it didn't find at line 4. Looking at the patch, I see it's a diff on config.def.h so I suppose this is the file to be patched and that I should supply this filename and the same with dwm.c? I'm not new to C coding but fresh out when it comes to diffing and patching, how do I actually go forward from here?
Edit:
More info  - I used the description using ABS to download the PKGBUILD for dwm and making dwm. My files
herman@sam ~/builds/dwm $ ls -R
PKGBUILD config.h dwm-5.9-2-x86_64.pkg.tar.xz dwm-5.9.tar.gz dwm.desktop dwm.install patch pkg src
./patch:
dwm-5.9-statuscolors.diff
./pkg:
usr
./pkg/usr:
bin share
./pkg/usr/bin:
dwm
./pkg/usr/share:
doc licenses man xsessions
./pkg/usr/share/doc:
dwm
./pkg/usr/share/doc/dwm:
README
./pkg/usr/share/licenses:
dwm
./pkg/usr/share/licenses/dwm:
LICENSE
./pkg/usr/share/man:
man1
./pkg/usr/share/man/man1:
dwm.1.gz
./pkg/usr/share/xsessions:
dwm.desktop
./src:
config.h dwm-5.9 dwm-5.9.tar.gz dwm.desktop
./src/dwm-5.9:
LICENSE Makefile README config.def.h config.def.h.orig config.def.h.rej config.h config.mk dwm dwm.1 dwm.c dwm.o
Last edited by roygbiv (2011-12-06 20:37:40)

Ok thanks but I'm confused again (I know..). I managed to patch the files config.def.h and dwm.c in the source dir and noticed there is yet another config.h file there as well. Now, the in the top level dir with the PKGBUILD I also have a config.h, which is the one I do my config changes. I'm confused because I now have these three header files (2x config.h + config.def.h) which are supposed to have the same source code? I've read around on the net, but haven't gotten any further answers yet. What are the purpose of each config and how should I use/update/manage them when recompiling? This is my situation:
herman@sam ~/build/dwm $ tree .
├── PKGBUILD
├── config.h <----------------------------------------------------- this one
├── dwm-5.9-2-x86_64.pkg.tar.xz
├── dwm-5.9.tar.gz
├── dwm.desktop
├── dwm.install
├── pkg
│   └── usr
│   ├── bin
│   │   └── dwm
│   └── share
│   ├── doc
│   │   └── dwm
│   │   └── README
│   ├── licenses
│   │   └── dwm
│   │   └── LICENSE
│   ├── man
│   │   └── man1
│   │   └── dwm.1.gz
│   └── xsessions
│   └── dwm.desktop
└── src
├── config.h -> /home/herman/build/dwm/config.h
├── dwm-5.9
│   ├── LICENSE
│   ├── Makefile
│   ├── README
│   ├── config.def.h <-----------------------------------------------------this one
│   ├── config.def.h.orig
│   ├── config.h <----------------------------------------------------------this one
│   ├── config.mk
│   ├── dwm
│   ├── dwm-5.9-statuscolors.diff
│   ├── dwm.1
│   ├── dwm.c
│   ├── dwm.c.orig
│   └── dwm.o
├── dwm-5.9.tar.gz -> /home/herman/build/dwm/dwm-5.9.tar.gz
└── dwm.desktop -> /home/herman/build/dwm/dwm.desktop
Thanks guys!
Last edited by roygbiv (2011-12-06 20:06:10)

Similar Messages

  • How do you apply a master page to multiple documents at the same time?

    How do you apply a master page to multiple documents at the same time?

    Hi friends,
    Thank you for trying to help me out.
    Let me explain it a bit to remove the ambiguity.
    I have 10 documents nested under a book. Each of these documents have 'n' number of pages. I want to apply my custom made master page "First" to the first page of all these 10 documents in one go. The remaining pages of the documents have to be in default "Right" master page format. How will I do it?
    I tried selecting all the documents and importing the formats from another document with the custom made "First" master page. The master page format is getting imported but the first page of all the documents still remain with the default "Right" master page format.
    I think now my question is more clear...

  • How do you apply the school proxy settings to the ipad to filter website searches?

    How do you apply the school proxy settings to the ipad to filter website searches?

    Hi Stebop1987,
    You will want to apply a configuration profile with Global HTTP proxy settings to your proxy server. Use Apple Configurator or an MDM to deploy the configuration profile to your fleet of iPads. I recommend you contact your web filter provider for detials on what proxy details to enter in the configuration profile (type, server, port, username, password).
    Hope this helps!
    ~Joe

  • How do you apply freight to a PO number on a second invoice?

    Some of our vendors will bill us later for freight from a PO.  How do you apply this to a PO number?  The only way I can see this happen is if you create a change order and add the freight to a line on the PO.  Any ideas would be appreciated.  

    Sampleconstruct wrote:
    .... or you can use Soundtrack Pro (export your file to SP with command shift+w) which comes with Logic Studio as an external Audio editor, do all the Plug rendering in there and bring the file back into Logic which works great for me.
    I tried to find the thread we had going on here about this very thing, but couldn't find it (it probably got deleted, because it was informative...)
    But opening Soundtrack Pro from Logic is THE way to do this. If I had known how easy this was, I would've been doing this months ago.
    Just this week, mixing a song, and there was a serious plosive on a word on the lead vocal rack. I hit shift/W, and the vocal file opened in Soundtrack Pro. I highlighted the plosive, applied a low cut from the channel EQ, flattened it, and quit STP.
    The vocal file in Logic immediately updated, and it was done. The EQ was applied permanently to that one section of the vocal file, and I didn't have to automate anything, or export anything.
    It took less than a minute. Seriously... this is the way to handle destructive edits to audio. It's VERY easy to do.

  • How do you move itunes with playlists from one computer to another

    how do you move itunes with playlists from a computer to ext hard drive, so it will play from the ext harddrive and not the computer

    Type "move itunes library to external hard drive" into the google search bar.

  • How do you close programs with new iOS7? Old way doesn't seem to work!

    How do you close programs with new iOS7? Old way doesn't seem to work!

    After double tap home button, swipe up on the app card that appears above the icon.

  • How do you make a customized template?? When I customize an original template it does not apply it to the whole document! How do you apply style changes permanently to your document???

    When one customize text styles or spacing between paragraphs. How do you apply settings permanently to a document???
    Should you create a new template???

    Happily, when you edit a document created by a given template, the changes aren't stored in the template.
    If you want to get a template embedding your changes, you need to use :
    File > Save as Template
    then use the newly created custom template as starting point.
    Yvan KOENIG (VALLAURIS, France) dimanche 22 janvier 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k
    My iDisk is : http://public.me.com/koenigyvan

  • HT4759 how do you update icloud with contacts transferred to Iphone by verizon

    How do you update icloud with contacts transferred to Iphone by Verizon?  The only contacts that show up in icloud are the ones I entered myself to the phone.

    You'll need to copy them to iCloud in order to see them on your PC.  To do this, do the following:
    Go to Settings>iCloud, turn Contacts to Off, choose Delete from My iPhone when prompted (they will still be in iCloud).
    Download the app My Contacts Backup.  Use this to backup the remaining contacts on your phone (from Verizon) as a vCard attachment to an email that you send to yourself.  Confirm that you have received the email.
    Go to Settings>iCloud and turn Contacts back to On.
    Open the My Contacts Backup email and tap the attachment to import the Verizon contacts back to your phone.  They should now be in iCloud, and appear on your PC.  You may see duplicate contacts on your phone because you are still viewing both the contacts from Verizon as well as the copies now in iCloud.
    Open Contacts on your phone and tap Groups, tap the Groups that were imported from Verizon so they are unchecked and tap Done.  This will hide them from view and illiminate the duplicates.

  • Noob question... How do you familiarize yourself with a library?

    I'm very new to Java and programming in general. but I am currently reading some beginner books for Java. From what I've read, libraries are nothing more than prewritten code which you can call to use in your programs. My question is how do you familiarize yourself with the libraries? With so many different libraries, how do you find out what they are capable of? Is is simply diving in it and analyzing the code? Can you create your own libraries? If so, what is the advantage of creating a library instead of baking the code right into the program? Why advantage do you have with referencing an outside file for code over having a self contained program?

    Morisato13 wrote:
    I'm very new to Java and programming in general. Welcome to the forums!
    but I am currently reading some beginner books for Java. From what I've read, libraries are nothing more than prewritten code which you can call to use in your programs. Yes indeed. Why reinvent the wheel?
    My question is how do you familiarize yourself with the libraries? Gradually.
    With so many different libraries, how do you find out what they are capable of? The best way is by working through a good Java book.
    Is is simply diving in it and analyzing the code? You can do that, too.
    Can you create your own libraries?Yes.
    If so, what is the advantage of creating a library instead of baking the code right into the program? 1. You can analyze it and test it separately.
    2. You can reuse it separately.
    Why advantage do you have with referencing an outside file for code over having a self contained program?Are you asking the same question, just with different wording?

  • How do you shuffle genre with iOS7 on iPhone5?

    How do you shuffle genre with iOS7 on iPhone5?

    Turn the phone sideways - First make sure that landscape mode isn't locked by swiping up from the bottom to bring up Control Center and then the top right icon is Portrait lock.

  • How do you change password with out using cd on imac?

    How do you change password with out cd on imac?

    Please read:
    http://osxdaily.com/2011/08/24/reset-mac-os-x-10-7-lion-password/

  • How  do you set up with pc

    How  do you set up with pc.

    I set up last year with Win 7. I downloaded Airport Utility from apple.com. I don't recall any difficulty. Wireless is not my forte. Sorry I can't offer better assistance.
    I installed Software Update on the pc to keep software up to date.
    Hope this helps.

  • How do you apply a vector mask to a folder in Photoshop CS6?

    The ways you apply vector masks in CS6 is different than in CS5.
    I knew how to apply a vector mask to a folder of layers in CS5.
    I cannot figure out how to do it in CS6.
    So my question is:
    How do you apply a vector mask to a folder in Photoshop CS6?
    And while we're at it, what are the best methods for applying vector masks to regular layers?
    Thanks.

    thomasbricker wrote:
    Im back...
    The thing is, Im not usiing the pen tool to create the vector shape. Im using the vector box tool to create a rectangle [...]
    Yes and that's why I wrote the words "vector tool" and never mentioned a pen. (Although the instructions would be exactly the same for using the Pen Tool because the Pen Tool is a vector tool.)
    which I then want to turn into a layer group mask.
    And yes, this does not work the same way as it did in CS5.
    I wish it did. : |
    Adding a vector mask to a layer or group is exactly the same in CS5.1 and CS6 on my Mac. Maybe that's done differently in CS5 than in CS5.1, but it seems unlikely.
    You have the layer or group targeted. Now draw a rectangular path after making sure the Rectangle Tool is in Path mode, and not Shape mode and not Pixel mode. Then Cmd/Ctrl-click the Add Mask button at bottom of Layers panel.

  • How do you apply the EQ settings to a particular genre or album?

    How do  you apply the EQ settings to a particular genre or an album instead of individually applying the setting to one song at a time.

    It's probably easiest to first be in list view and have your Column browser up.
    Set the Column Browser to show Genres.
    In the Genres column, select the Genre you want to apply the EQ to. Now select all of the songs that appear for that genre. 
    Right-click on the blue mass and select "Get Info". Say yes to the dialog asking if you're sure you want to edit information for multiple items.
    In the Options tab of the Multiple Item Information window, check "Equaliser preset", pick the equaliser setting you want and click "OK".
    Processing may take a while if you've got a lot of songs in that genre.
    For an album, it's basically the same process.
    Set the Column browser to show albums.
    In the Albums column, select the album you want to apply the EQ to. Now select all of the songs that appear for that album.
    Right-click on the blue mass and select "Get Info". Say yes to the dialog asking if you're sure you want to edit information for multiple items.
    In the Options tab of the Multiple Item Information window, check "Equaliser preset", pick the equaliser setting you want and click "OK".

  • HT204216 Used to highlight just the portion of an article that I wanted to print and press print selection only.  How do you do that with a MAC?

    Used to highlight just the portion of an article that I wanted to print and press print selection only.  How do you do that with a MAC?

    Depends to some extent what application you're printing from, and what printer you're using, but here's the dialogue box for ⌘P in Firefox -
    Note the option to print selection only.
    Haven't looked before, but I can't find anything similar in Pages print options.
    It does appear in Word though.
    Message was edited by: noondaywitch

Maybe you are looking for