From: Hugo Villeneuve Date: Tue, 29 Jan 2013 22:16:45 +0000 (-0500) Subject: TEMPORAIRE: Tentative installation module Apache php5, mais segfault X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=305cb288ba63239087a799237e8a3bd680b09b22;p=hvlinux.git TEMPORAIRE: Tentative installation module Apache php5, mais segfault --- diff --git a/config/packages-list b/config/packages-list index e59e40a..158c7c9 100644 --- a/config/packages-list +++ b/config/packages-list @@ -11,7 +11,7 @@ ALSA_LIB="alsa-lib-1.0.25" ALSA_PLUGINS="alsa-plugins-1.0.25" ALSA_UTILS="alsa-utils-1.0.25" APR="apr-1.4.6" -APR_UTIL="apr-util-1.4.1" +APR_UTIL="apr-util-1.5.1" AVR_GDB="gdb-6.4" AVRDUDE="avrdude-5.1" ATK="atk-2.4.0" @@ -304,7 +304,7 @@ PERL_MOD_DIGEST_SHA1="Digest-SHA1-2.13" PERL_MOD_LWP="libwww-perl-6.04" PERL_MOD_URI="URI-1.60" PERL_MOD_NET_DNS="Net-DNS-0.68" -PHP="php-5.4.5" +PHP="php-5.4.10" PIXMAN="pixman-0.24.4" POPPLER="poppler-0.20.4" PKG_CONFIG="pkg-config-0.26" diff --git a/stage3/hv-install-1 b/stage3/hv-install-1 index 13305f2..2071f93 100755 --- a/stage3/hv-install-1 +++ b/stage3/hv-install-1 @@ -21,8 +21,8 @@ ipkg -j ${FCRON} ipkg ${OPENSSH} ipkg -s lynx ${LYNX} ipkg ${EXPAT} -ipkg ${APR} "--with-installbuilddir=/usr/lib/apr-1/build" -ipkg ${APR_UTIL} "--with-apr=/usr/bin/apr-1-config" +ipkg ${APR} "--disable-static --with-installbuilddir=/usr/share/apr-1/build" +ipkg ${APR_UTIL} "--with-apr=/usr --with-gdbm=/usr -with-openssl=/usr" ipkg ${NEON} "--with-ssl" ipkg -s tcl ${TCL} CFLAGS="${CFLAGS} -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_UNLOCK_NOTIFY=1" \ diff --git a/stage5/hv-install-1 b/stage5/hv-install-1 index 857d31e..41f864b 100755 --- a/stage5/hv-install-1 +++ b/stage5/hv-install-1 @@ -180,6 +180,9 @@ ipkg ${XARCHIVER} ipkg -m acnb ${LIBFM} ipkg ${PCMANFM} +ipkg -s apache ${HTTPD} # Apache +ipkg ${PHP} + if [ "x${INST_TYPE}" = "xserver" -o "x${INST_TYPE}" = "xltsp-server" ]; then ipkg -m noac ${PROCMAIL} ipkg -m noac ${LIBSPF2} @@ -200,18 +203,12 @@ if [ "x${INST_TYPE}" = "xserver" -o "x${INST_TYPE}" = "xltsp-server" ]; then ipkg ${UW_IMAP} - ipkg ${HTTPD} # Apache - ipkg ${PHP} - ipkg -m noac ${SQUIRRELMAIL} ipkg ${FETCHMAIL} "--with-ssl" # Subversion server (client was already installed in stage2) ipkg ${SUBVERSION} -fi -if [ "x${INST_TYPE}" = "xworkstation" -o \ - "x${INST_TYPE}" = "xltsp-server" ]; then ipkg ${LIBGSF} ipkg -m acnb ${GOFFICE} ipkg ${GNUMERIC} "--localstatedir=/var/lib --disable-pdfdocs" diff --git a/stage5/pkg/apache b/stage5/pkg/apache index 37559e3..19b5d04 100644 --- a/stage5/pkg/apache +++ b/stage5/pkg/apache @@ -2,29 +2,54 @@ hvconfig_pre() { + cd ${LFS_TMP}/${PACKAGE} + + cat >> config.layout << "EOF" && +# BLFS FHS layout + + prefix: /usr + exec_prefix: ${prefix} + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + libdir: ${exec_prefix}/lib + libexecdir: ${exec_prefix}/libexec/apache + mandir: ${prefix}/share/man + sysconfdir: /etc/apache + datadir: /srv/www + installbuilddir: ${libexecdir}/build + errordir: ${datadir}/error + iconsdir: ${datadir}/icons + htdocsdir: ${datadir}/htdocs + manualdir: ${datadir}/manual + cgidir: ${datadir}/cgi-bin + includedir: ${prefix}/include/apache + localstatedir: ${datadir} + runtimedir: /var/run + logfiledir: /var/log/apache + proxycachedir: /var/cache/apache/proxy + +EOF + groupadd -f ${APACHE_USER} hv_useradd -c WebServer -d /dev/null -g ${APACHE_USER} -s /bin/false \ ${APACHE_USER} CONFIGURE_OPTS=" \ - ${CONFIGURE_OPTS} \ --enable-layout=FHS \ --enable-mods-shared=all \ --enable-ssl \ --with-z" - # --enable-rewrite \ - # --enable-deflate \ - # --enable-dav \ } hvbuild_post() { - # There's a problem with the ISAPI DSO module caused from compiling with - # GCC-4.1.2. - # Commenting out the module from the configuration: - if grep -q "LoadModule isapi_module" /etc/apache/httpd.conf; then - sed -i -e "s/^LoadModule isapi_module/# &/" /etc/apache/httpd.conf - fi + chown -v root:root /usr/bin/{apxs,dbmmanage} \ + /usr/sbin/{apachectl,envvars{,-std}} \ + /usr/libexec/apache/httpd.exp \ + /usr/share/man/man1/{ab,apxs,dbmmanage,ht{dbm,digest,passwd,txt2dbm},logresolve}.1 \ + /usr/share/man/man8/{apachectl,htcacheclean,httpd,rotatelogs,suexec}.8 && + + sed -i -e "s!^\(DocumentRoot\) .*!\1 /srv/www/htdocs!" /etc/apache/httpd.conf # Modifying the listening port if an alternate one is specified. if [ -n "${HTTPD_PORT}" ]; then @@ -102,13 +127,13 @@ EOF sed -i -e "s!^!\n Include /etc/apache/ssl/ssl.conf!" /etc/apache/httpd.conf mkdir -p /srv/www/htdocs/ssl - chown apache:apache /srv/www/htdocs/ssl - sed -i -e "s!^DocumentRoot .*!DocumentRoot /srv/www/htdocs/ssl!" /etc/apache/ssl/ssl.conf sed -i -e "s!^ServerName .*:443!ServerName www.${DOMAIN}:443!" /etc/apache/ssl/ssl.conf sed -i -e "s!^ServerAdmin .*!ServerAdmin webmaster@${DOMAIN}!" /etc/apache/ssl/ssl.conf sed -i -e "s!/etc/apache!/etc/apache/ssl!" /etc/apache/ssl/ssl.conf + chown -v -R ${APACHE_USER}:${APACHE_USER} /srv/www + # Bootscript install -v -m740 ${SCRDIR}/bootscripts/apache /etc/rc.d/init.d diff --git a/stage5/pkg/php b/stage5/pkg/php index 87f343b..c23ba58 100644 --- a/stage5/pkg/php +++ b/stage5/pkg/php @@ -2,9 +2,6 @@ hvconfig_pre() { - sed -i 's/const char \*errpfx,/const DB_ENV *dbenv, & const/' \ - ${LFS_TMP}/${PACKAGE}/ext/dba/dba_db4.c - # Since PHP 5, you need to explicitly bundle PHP with MySQL by --with-mysql # directive (make sure you specified path to where MySQL is installed on # your system). @@ -13,30 +10,30 @@ hvconfig_pre() # gcc: Zend/zend_language_scanner.c: No such file or directory CONFIGURE_OPTS=" \ ${CONFIGURE_OPTS} \ - --with-apxs2=/usr/sbin/apxs \ - --enable-force-cgi-redirect \ - --enable-discard-path \ + --with-apxs2 \ --with-config-file-path=/etc \ --with-zlib \ --enable-bcmath \ --with-bz2 \ - --with-gd \ - --with-freetype-dir=/usr \ - --with-t1lib \ - --enable-gd-native-ttf \ --enable-calendar \ - --enable-dba \ - --enable-exif \ + --enable-dba=shared \ + --with-gdbm \ + --with-gmp \ --enable-ftp \ --with-gettext \ --enable-mbstring \ - --with-ncurses \ --with-readline \ - --with-openssl=/usr \ - --with-ldap \ --with-mysql=/usr \ - --with-imap=/usr/lib/uw-imap \ - --with-imap-ssl=/usr/include/openssl" + --with-openssl=/usr \ + --with-gd \ + --with-freetype-dir=/usr \ + --with-t1lib \ + --enable-gd-native-ttf \ + --enable-exif" + +# IMAP +# --with-imap=/usr/lib/uw-imap \ +# --with-imap-ssl=/usr/include/openssl" } hvbuild_post() @@ -44,7 +41,7 @@ hvbuild_post() if [ -f /etc/php.ini ]; then cp /etc/php.ini /etc/php.ini.old fi - cp ${LFS_TMP}/${PACKAGE}/php.ini-dist /etc/php.ini + cp ${LFS_TMP}/${PACKAGE}/php.ini-production /etc/php.ini # To enable PHP support in the Apache web server, a new AddType directive # must be added to the httpd.conf file. @@ -52,8 +49,11 @@ hvbuild_post() echo "AddType application/x-httpd-php .php" >> /etc/apache/httpd.conf fi + # Est-ce nécessaire? + #cgi.discard_path = 1 + if ! grep -q "DirectoryIndex" /etc/apache/httpd.conf | grep "index.php"; then - sed -i -e "s!\(^DirectoryIndex index.html.*\)!\1 index.php!g" \ + sed -i -e "s!\(^\s*DirectoryIndex index.html.*\)!\1 index.php!g" \ /etc/apache/httpd.conf fi }