2005-07-09, 01:15 AM
Been trying to follow these instructions in Fedora Core 4
Every things cool unitl step three. Sense these instructions are 1 year old, i have adapted it a little. Main issue is part 3
rpm -ivh ~/httpd-2.0.40-21.16.legacy.src.rpm
Does this.
warning: ./httpd-2.0.50-1.0.src.rpm: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2
1:httpd ########################################### [100%]
No files are created as the guide below says should happen.
-------------------------- missing how to -----------------------------
Here's how to rebuild Apache from SRPM, including the change you want to make.
1. Grab the httpd SRPM from the FC1 updates:
% wget [/url][url=http://download.fedora.us/fedora/fe....48-1.2.src.rpm]http://download.fedora.us/fedora/fe....48-1.2.src.rpm
2. Set up your RPM build area:
% echo "%_topdir /home/yourname/src/rpm" >> ~/.rpmmacros
% mkdir -p ~/src/rpm/
% cd ~/src/rpm
% mkdir BUILD RPMS RPMS/i386 SOURCES SPECS SRPMS
3. Install the SRPM:
% rpm -ivh ~/httpd-2.0.48-1.2.src.rpm
This will put the source tarball and patches in SOURCES, and a specfile (metadata and instructions for building) in SPECS.
4. Edit the specfile, bumping up the release number, changing the suexec docroot, and noting this in the changelog:
% vi SPECS/httpd.spec
line 8:
< Release: 1.2
> Release: 1.3
line 202:
< --with-suexec-docroot=%{contentdir} \
> --with-suexec-docroot=/home \
line 510:
%changelog
* Tue May 18 2004 Your Name <you@yours> 2.0.48-1.3
- Rebuilt with suexec-docroot set to /home instead of %{contentdir}
5. Rebuild httpd, creating both a binary RPM and a source SRPM:
% rpmbuild -ba SPECS/httpd.spec
You may have to install some additional packages to satisfy build dependencies here. When it's done, you'll have binary packages in RPMS/i386/, and a source package including your modified specfile in SRPMS/.
6. You can now either upgrade to the httpd you just compiled...
% sudo rpm -Fvh RPMS/i386/httpd*.rpm RPMS/i386/mod_ssl*.rpm
7. ...or simply extract the suexec binary and copy it over the original one:
% rpm2cpio RPMS/i386/httpd-2.0.48-1.3.i386.rpm | cpio -imVd ./usr/sbin/suexec
% sudo cp -p /usr/sbin/suexec /usr/sbin/suexec.orig
% sudo cp ./usr/sbin/suexec /usr/sbin/suexec
% sudo chown root:apache /usr/sbin/suexec
% sudo chmod 4510 /usr/sbin/suexec
Personally, I haven't yet had any problems with just keeping the suexec binary I compiled months ago and reusing it with later updates of Apache (i.e., repeat step 7 after installing an httpd update), YMMV. Obviously if there is ever a security update involving suexec itself, though, you should rebuild again.
________________________________________
Last edited by bradthemad : 2004-05-18 at 07:14 AM PDT.
------------------how to that was missing --------------------------