whobutdrew: (Default)
Drew ([personal profile] whobutdrew) wrote in [site community profile] dw_dev2009-09-04 09:25 pm

(no subject)

Hi all! I've been tinkering with creating an LJ site of my own on and off for a bit, but as [profile] firefoxfey can tell you, with vanilla LJ, its been made of fail, because manually configuring Apache 1.3.x and I don't mix. So when she told me that DW was Apache2 friendly, I thusly said YAY! And have been excited about getting my hands dirty again.

I've run into my first problem. I saw this, which the same problem that I am running into. Contained within the comments is the link to this patch, which I have saved as foo.patch in my $LJHOME directory. When I try to run

patch -p0 < foo.patch

I get this:

dw@ubuntu:~$ patch -p0 < foo.patch
can't find file to patch at input line 12
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|angeset patch
|# User Andrea Nall <anall@andreanall.com>
|# Date 1247811160 0
|# Branch production
|# Node ID 3c20fe0db2767b39cf1d1594d8e0b3541e83555a
|# Parent a9fbb12e6ff89198ffded1e9235801b2994ce47b
|[mq]: DWFreeOnly
|
|diff -r a9fbb12e6ff8 -r 3c20fe0db276 cgi-bin/LJ/User.pm
|--- a/cgi-bin/LJ/User.pm Thu Jul 16 22:10:15 2009 -0500
|+++ b/cgi-bin/LJ/User.pm Fri Jul 17 06:12:40 2009 +0000
--------------------------
File to patch:

Based on that, I try to give it $LJHOME/cgi-bin/LJ/User.pm, which doesn't exist, so the script failed. I got the same thing when I sudo'd the command. I also tried to run

hg qimport foo.patch

From here: http://wiki.dwscoalition.org/notes/Patches#Applying_Patches

And I got 'parameter not recognized.'

I'm an IT tech by day, so you can drop some technobabble at me, but I am NOT by any means a programmer/developer! I took a class of Perl in college, but that's about it. This is also my first foray into building a server other than a fileserver.

So please. Tell me what probably simple thing I'm doing wrong so I can move on to squeeing about finally getting a webserver workening!
kareila: (Default)

[personal profile] kareila 2009-09-05 05:06 am (UTC)(link)
I went ahead and updated the patch. Here's the new version:

http://bugs.dwscoalition.org/attachment.cgi?id=2279
sophie: A cartoon-like representation of a girl standing on a hill, with brown hair, blue eyes, a flowery top, and blue skirt. ☀ (Default)

[personal profile] sophie 2009-09-05 05:31 am (UTC)(link)
In your case, the easiest way to revert would be quite simple - simply copy the files from your cvs/ directory:

cd $LJHOME
cp cvs/dw-free/cgi-bin/LJ/User.pm cgi-bin/LJ/User.pm
cp cvs/dw-free/cgi-bin/ljlib-local.pl cgi-bin/ljlib-local.pl
cp cvs/dw-free/htdocs/_config.bml htdocs/_config.bml

...and then try again.

(ljlib-local.pl will be deleted by the patch anyway, but you may as well copy it just so patch gets what it's expecting)