3.9 - 004_httpd.patch Problems

Charles Gebhard cgebhard at pointsystems.com
Thu Aug 3 10:24:50 PDT 2006


hi dave,

thanks for the quick response.  i definitely have not aliased the "rm" 
command.  your hint about /usr/src/usr.sbin/httpd/Makefile* was spot on.

1) i don't even have the file "Makefile".
2) the checksums on "Makefile.bsd-wrapper" and "Makefile.tmpl" do not 
match your outputs.

hmm...  maybe i grabbed the src.tar.gz from an older version of openbsd? 
  oh well, i'll cvs update the src to "STABLE".

i'll post back with my results.

thanks again,
chaz


Woodchuck wrote:
> On Tue, 1 Aug 2006, Chaz Gilbert wrote:
> 
>> greetings all,
>>
>> i'm probably doing something stupid, but i can't
>> figure out why the patch won't work for my 3.9 system.
>>  any help is greatly appreciated.
>>
>> -chaz
> 
> I tried this, successfully (at least so far, I'm in the main make),
> without errors.  (3.9 STABLE, cvs'ed to about 4 July).
> 
> Differences:  I didn't install the patch.  I ran as root (no sudo).
> 
> The trouble line in the makefile looks like:
> 
> .if ${.OBJDIR} == ${.CURDIR}
> clean: prereq cleanman
>         @cd ${.OBJDIR} && ${MAKE} clean  && rm -f ${MUNGEDFILES}
> .else   
> clean: cleanman
>         @cd ${.OBJDIR} && find . \! -type d -print0 | xargs -0r rm
> .endif
> 
> 
> in my Makefile.bsd-wrapper.  Could yours be different?
> 
> It would appear that we are both hitting the first line ("MUNGEDFILES").
> It would further appear that the second line ("xargs")  lacks a -f
> on rm, which is a minor error.
> 
> The MD5 sum of my file:
> 
> [root at pequod.chuck httpd]# md5 Makefile*
> MD5 (Makefile) = 0feec83164f335521cdb2f2a389f566b
> MD5 (Makefile.bsd-wrapper) = 7cdc8ac3d511db37730a6f00e658dd9c
> MD5 (Makefile.tmpl) = bd646a05c6ecc45346d6c1825c23f6a6
> 
> I then got the patch, applied it (just as you did, except no sudo --
> i'm brave, have had root since 1985...), and cookie-cuttered
> the make commands again ... no errors.
> 
> In your position, I'd do a cvs on your source tree, and note anything
> funky in the httpd tree, or possibly in the various make infrastructure
> files.
> 
> A longshot: make sure that you haven't aliased "rm" to something
> weird.  I notice that the stock /etc/ksh.kshrc aliases certain
> commands to themselves plus flags. (alias du="du -k" for one example).
> This is a bad idea, especially for root.  It introduces a subtle
> problem.  Perhaps, following a bad example, you have been led into
> this practice for "rm"?  This is a long shot, but there's something
> wrong with either the makefile, the name of a file in the tree (that
> shouldn't be there?) or the rm command (or what your system has
> been led to believe is the rm command).  Some people, longing for
> other operating systems, redefine "rm" as a shell command that makes
> some sort of weak attempt to "save" files so that they can be
> "undeleted" later. Bad idea.  I have seen rm commonly aliased to
> "rm -i", which can cause much grief.
> 
> Let us know if you find a bug or if it heals itself, OK?
> 
> See also the comment below at the error.
> 
>>
>> src$ sudo patch -p0 < ~/004_httpd.patch
>> Password:
>> Hmm...  Looks like a unified diff to me...
>> The text leading up to this was:
>> --------------------------
>> |Apply by doing:
>> |        cd /usr/src
>> |        patch -p0 < 004_httpd.patch
>> |
>> |And then rebuild and install httpd and its modules:
>> |        cd usr.sbin/httpd
>> |        make -f Makefile.bsd-wrapper obj
>> |        make -f Makefile.bsd-wrapper cleandir
>> |        make -f Makefile.bsd-wrapper depend
>> |        make -f Makefile.bsd-wrapper
>> |        make -f Makefile.bsd-wrapper install
>> |
>> |If httpd had been started, you might want to run
>> |        apachectl stop
>> |before running "make install", and
>> |        apachectl start
>> |afterwards.
>> |
>> |Index:
>> usr.sbin/httpd/src/modules/standard/mod_rewrite.c
>> |===================================================================
>> |RCS file:
>> /cvs/src/usr.sbin/httpd/src/modules/standard/mod_rewrite.c,v
>> |retrieving revision 1.24
>> |retrieving revision 1.24.6.1
>> |diff -u -p -r1.24 -r1.24.6.1
>> |--- usr.sbin/httpd/src/modules/standard/mod_rewrite.c
>>   9 Feb 2005 12:13:10 -00
>> |00      1.24
>> |+++ usr.sbin/httpd/src/modules/standard/mod_rewrite.c
>>   28 Jul 2006 15:21:30 -0
>> |000     1.24.6.1
>> --------------------------
>> Patching file
>> usr.sbin/httpd/src/modules/standard/mod_rewrite.c
>> using Plan A...
>> Hunk #1 succeeded at 2762.
>> Hmm...  Ignoring the trailing garbage.
>> done
>>
>> src$ cd usr.sbin/httpd/  
>>                                                  
>> httpd$ sudo make -f Makefile.bsd-wrapper obj
>> /usr/src/usr.sbin/httpd/obj -> /usr/obj/usr.sbin/httpd
>>
>> httpd$ sudo make -f Makefile.bsd-wrapper cleandir
>> rm -f src/support/dbmmanage.cat1
>> src/support/htdigest.cat1 src/support/htpasswd.cat1
>> src/support/apachectl.cat8 src/support/logresolve.cat8
>> httpd.cat8 src/support/rotatelogs.cat8
>> src/support/apxs.cat8 src/support/suexec.cat8
>> src/support/dbmmanage.ps1 src/support/htdigest.ps1
>> src/support/htpasswd.ps1 src/support/apachectl.ps8
>> src/support/logresolve.ps8 httpd.ps8
>> src/support/rotatelogs.ps8 src/support/apxs.ps8
>> src/support/suexec.ps8
>> usage: rm [-dfiPRr] file ...
>> *** Error code 123
> 
> It would appear that you have neatly formatted this output, namely by
> wrapping the various file names for the rm.  In future, don't.  Leave
> it raw.  I'm wondering at this point if the definition of "MUNGEDFILES"
> has been corrupted in your makefile(s) somehow.
> 
> My output looks like this:
> 
> [root at pequod.chuck httpd]# make -f Makefile.bsd-wrapper cleandir
> rm -f src/support/dbmmanage.cat1 src/support/htdigest.cat1 src/support/htpasswd.cat1 src/support/apachectl.cat8 src/support/logresolve.cat8 httpd.cat8 src/support/rotatelogs.cat8 src/support/apxs.cat8 src/support/suexec.cat8 src/support/dbmmanage.ps1 src/support/htdigest.ps1 src/support/htpasswd.ps1 src/support/apachectl.ps8 src/support/logresolve.ps8 httpd.ps8 src/support/rotatelogs.ps8 src/support/apxs.ps8 src/support/suexec.ps8
> 
> More and more I think you have redefined or aliased "rm".
> 
> Dave


More information about the Openbsd-newbies mailing list