httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GOMEZ Henri <hgo...@slib.fr>
Subject RE: Apache 2.0.27 and 2.0.28 RPM available
Date Tue, 20 Nov 2001 08:29:19 GMT
>Comparing with my Debian packages, the patches from which I will post
>after my exam:

Hope you'll be successfull :)

>On Mon, Nov 19, 2001 at 01:40:55PM +0100, GOMEZ Henri wrote:
>> BTW: From my RPM works I detect many stuff which could (should)
>>      be added :
>> 
>>      - Modify apachectl and apxs to use @sbindir@/@progname@ instead
>>        of @prefix@/bin/@progname@. A security concert on 
>many distrib 
>>        (ie Redhat which use /usr/sbin for httpd)
>
>Check.	

Ditto, but borred...

>>      - update apxs to let user use it's own installed 
>libtool instead of
>>        the one in $prefix/build.
>
>Check.
>
>>      - add a --with-ssl-port as we have --with-port
>
>Nope, could you please send this to dev@httpd?

Requirement sent yesterday.

>>      - have httpd-std.conf supporting datadir and config.layout.
>>        For example, htdocs location in conf file, still 
>didn't follow what
>> has
>>        been set in config.layout.
>
>Hm, I just have a very minimalistic apache2.conf that I distribute,
>users can make changes in httpd.conf (simplifies packaging).

Do you put your own copy of apache2.conf (we're using httpd2.conf) or
do you put a patched version from distro ? The latest release expand
nicely with @@LoadModule@@, and I'd like if they could add a @@AddModule@@
to make <IfModule xxx> works.

>>      The general goal is to try to have Apache 2.0 more FHS compliant
>> without having 
>>      to make huge patchs (or perl replace) at each release ;)
>
>Well, my package manages to fit into Debian FHS, and only has 
>11 patches
>all up.

FYI, here is a part of what should be patched or change via perl to make
apache 2 fit better on FHS from my spec file :

# patch apachectl to make it follow sbindir for binaries
%patch1

# patch apxs2 to make it follow sbindir for binaries and config.mk in
/usr/lib/apache2
%patch2

# patch httpd-conf to replace <IfModule mod_ssl.c> by <IfDefine HAVE_SSL>
%patch3

# set ssl port to 8093
perl -pi -e "s|443|%{ssllport}|g;" docs/conf/ssl-std.conf

# replace <IfDefine SSL> by <IfDefine HAVE_SSL> provided by init script
perl -pi -e "s|<IfDefine SSL>|<IfDefine HAVE_SSL>|g;" docs/conf/ssl-std.conf

# comment ServerName in ssl
perl -pi -e "s|ServerName|#ServerName|g;" docs/conf/ssl-std.conf

# change logs/ to /var/log/httpd2/
perl -pi -e "s|logs/|%{logdir}/|g;" docs/conf/httpd-std.conf
perl -pi -e "s|logs/|%{logdir}/|g;" docs/conf/ssl-std.conf

# change conf in ssl conf
perl -pi -e "s|\@\@\ServerRoot\@\@/conf/|%{confdir}/|g;"
docs/conf/ssl-std.conf

# change conf/ to /etc/httpd2/conf/
perl -pi -e "s|conf/|%{confdir}/|g;" docs/conf/httpd-std.conf

# set @@ServerRoot@@/htdocs to /var/www2/html
perl -pi -e "s|\@\@\ServerRoot\@\@/htdocs|%{contentdir}/html|g;"
docs/conf/httpd-std.conf
perl -pi -e "s|\@\@\ServerRoot\@\@/htdocs|%{contentdir}/html|g;"
docs/conf/ssl-std.conf

# set @@ServerRoot@@/ to /var/www2/
perl -pi -e "s|\@\@\ServerRoot\@\@/|%{contentdir}/|g;"
docs/conf/httpd-std.conf
perl -pi -e "s|\@\@\ServerRoot\@\@/|%{contentdir}/|g;"
docs/conf/ssl-std.conf

# set @@ServerRoot@@ to /usr
perl -pi -e "s|\@\@\ServerRoot\@\@|/usr|g;" docs/conf/httpd-std.conf

# change userid from nobody to apache2
perl -pi -e "s|nobody|%{name}|g;" docs/conf/httpd-std.conf

CFLAGS="$RPM_OPT_FLAGS" ./configure \
	--with-program-name=httpd2 \
	--with-port=8092 \
	--with-mpm=threaded \
    --prefix=%{_prefix} \
    --exec-prefix=%{_prefix} \
    --bindir=%{_sbindir} \
    --sbindir=%{_sbindir} \
    --libexecdir=%{_libdir}/%{name} \
    --mandir=%{_mandir} \
    --localstatedir=%{_localstatedir} \
    --sysconfdir=%{_sysconfdir}/%{pname}/conf \
    --datadir=%{contentdir} \
    --includedir=%{_includedir}/%{name} \
	--enable-layout=RedHat6 \
    --enable-modules=all \
    --enable-mods-shared=all \
    --enable-ssl \
    --enable-so \
    --with-ssl=/usr/include/

# quick patches to fix httpd.conf and cgisock locations
perl -pi -e 's|conf/httpd2.conf|%{_sysconfdir}/%{pname}/conf/httpd2.conf|g'
include/ap_config_auto.h
perl -pi -e 's|logs/cgisock|%{_var}/log/%{pname}/cgisock|g'
./modules/generators/mod_cgid.c

cat >> include/ap_config_auto.h <<EOF

#define DEFAULT_XFERLOG 	"%{_var}/log/%{pname}/access_log"
#define DEFAULT_ERRORLOG 	"%{_var}/log/%{pname}/error_log"
#define DEFAULT_LOCKFILE	"%{_var}/log/%{pname}/accept.lock"
#define DEFAULT_SCOREBOARD	"%{_var}/log/%{pname}/apache_runtime_status"
EOF

# quick patches to fix httpd.conf and cgisock locations
perl -pi -e 's|conf/httpd2.conf|%{_sysconfdir}/%{pname}/conf/httpd2.conf|g'
include/ap_config_auto.h
perl -pi -e 's|logs/cgisock|%{_var}/log/%{pname}/cgisock|g'
./modules/generators/mod_cgid.c

cat >> include/ap_config_auto.h <<EOF

#define DEFAULT_XFERLOG 	"%{_var}/log/%{pname}/access_log"
#define DEFAULT_ERRORLOG 	"%{_var}/log/%{pname}/error_log"
#define DEFAULT_LOCKFILE	"%{_var}/log/%{pname}/accept.lock"
#define DEFAULT_SCOREBOARD	"%{_var}/log/%{pname}/apache_runtime_status"
EOF

make

make install prefix=%{_sysconfdir}/%{pname}
bindir=$RPM_BUILD_ROOT%{_sbindir} sbindir=$RPM_BUILD_ROOT%{_sbindir}
libexecdir=$RPM_BUILD_ROOT%{_libdir}/%{name}
mandir=$RPM_BUILD_ROOT%{_mandir}
sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir}/%{pname}/conf
datadir=$RPM_BUILD_ROOT%{contentdir}
iconsdir=$RPM_BUILD_ROOT%{contentdir}/icons
errordir=$RPM_BUILD_ROOT%{contentdir}/error
htdocsdir=$RPM_BUILD_ROOT%{contentdir}/html
cgidir=$RPM_BUILD_ROOT%{contentdir}/cgi-bin
includedir=$RPM_BUILD_ROOT%{_includedir}/%{name}
localstatedir=$RPM_BUILD_ROOT%{_localstatedir}
runtimedir=$RPM_BUILD_ROOT{_var}/%{pname}
logdir=$RPM_BUILD_ROOT%{_var}/log/%{pname}
proxycachedir=$RPM_BUILD_ROOT%{_var}/cache/%{pname}


Nota On Redhat 6.x, I've had to add also Group apache2


The patches are attached :


I'll be very interesting in getting your patches and build file (.apt ?)
to see how I differ from Debian ;)

To be quick I use :

/etc/httpd2/conf 		=> config
/etc/httpd2/build 		=> make config (damn't I just so this one,
                                            I'll remove
/usr/lib/apache2/config_vars.mk !!!)

/etc/httpd2/conf/ssl.crl
/etc/httpd2/conf/ssl.crt
/etc/httpd2/conf/ssl.csr
/etc/httpd2/conf/ssl.key
/etc/httpd2/conf/ssl.pem   => ssl stuff (preloaded with Snake Oil dummy cert
since the 
                                         make cert is still not present in
distro)

/var/www2/manual		=> manual pages
/var/www2/error		=> error pages
/var/www2/html		=> HTML stuff for http://localhost:/
/var/www2/cgi			=> cgi

/var/log/httpd2/		=> all logs live in
/var/run/httpd2.pid		=> runpid

I've got some questions for Apache2 developpers :

What prefix represent, a basedir for conf, or binary,
or data ?

Should I set $prefix to /etc/httpd2 instead of /usr ?

If may fit better with my layout where ALL config,
and particulary the one for build subdir live in /etc/httpd2/



Mime
View raw message