From: root Date: Tue, 9 Feb 2010 04:23:49 +0000 (+0000) Subject: Conversion errexit stage3 X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=8c1ceecd26d41af612337eb87f51fa1d353d6c8a;p=hvlinux.git Conversion errexit stage3 --- diff --git a/dependencies b/dependencies index 087f851..8bab353 100644 --- a/dependencies +++ b/dependencies @@ -70,3 +70,5 @@ ${TETEX}: ${ED} ${LIBPNG} ${T1LIB} ${XORG} ${GD} ${GIT}: ${OPENSSL} ${EXPAT} ${ZLIB} ${PERL} ${CURL} ${NMAP}: ${OPENSSL} ${PCRE} ${LIBPCAP} + +${GETDATE}: ${FCRON} diff --git a/functions-update b/functions-update index cb7a7e8..916f239 100644 --- a/functions-update +++ b/functions-update @@ -182,6 +182,7 @@ detect_file_not_found() # HTTP: will return error code 404. # FTP: will say "File not found" if grep "404" ${WGET_LOG_FILE} 1> /dev/null 2>&1; then + echo NOTFOUND return 0 elif grep "No such file" ${WGET_LOG_FILE} 1> /dev/null 2>&1; then return 0 diff --git a/packages-list b/packages-list index 107235a..320a1ff 100644 --- a/packages-list +++ b/packages-list @@ -202,7 +202,7 @@ GTK_DOC="gtk-doc-1.4" GLIBMM="glibmm-2.16.2" GTKMM="gtkmm-2.12.7" GMP="gmp-4.3.1" -GUILE="guile-1.8.2" +GUILE="guile-1.8.7" GZIP="gzip-1.3.12" HAL="hal-0.5.9.1" diff --git a/stage3/cis-agg b/stage3/cis-agg index 6937f41..2cf3c93 100755 --- a/stage3/cis-agg +++ b/stage3/cis-agg @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Remaining arguments are additional configure options. @@ -12,19 +14,18 @@ shift CONFIGURE_OPTS=${*} # Applying patches (if any) -apply_patches ${PACKAGE} && +apply_patches ${PACKAGE} -cd ${LFS_TMP}/${PACKAGE} && -sh autogen.sh && +cd ${LFS_TMP}/${PACKAGE} +sh autogen.sh ./configure \ --prefix=/usr \ --disable-static \ --enable-ctrl \ --enable-gpc \ - ${CONFIGURE_OPTS} && -make && -make install && + ${CONFIGURE_OPTS} +make +make install ldconfig -# Return last error exit $? diff --git a/stage3/cis-alsa-lib b/stage3/cis-alsa-lib index 16b5052..81d877c 100755 --- a/stage3/cis-alsa-lib +++ b/stage3/cis-alsa-lib @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,16 +9,15 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} ./configure \ - --enable-static && -make && -make install && -install -v -m644 -D doc/asoundrc.txt /usr/share/doc/${1}/asoundrc.txt && + --enable-static +make +make install +install -v -m644 -D doc/asoundrc.txt /usr/share/doc/${1}/asoundrc.txt ldconfig -# Return last error exit $? diff --git a/stage3/cis-alsa-utils b/stage3/cis-alsa-utils index 352f2f0..558b0c3 100755 --- a/stage3/cis-alsa-utils +++ b/stage3/cis-alsa-utils @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -6,25 +8,22 @@ source ../sysinfos source ../functions source ../packages-list -CUR_DIR=$(pwd) - # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && -./configure && -make && -make install && +cd ${LFS_TMP}/${1} +./configure +make +make install # The first time the alsa bootscript is run, it will complain that there is no state in # /etc/asound.state. You can prevent this by running the following commands after # installing alsa-utils: -touch /etc/asound.state && +touch /etc/asound.state -install -v -m740 ${CUR_DIR}/bootscripts/alsa /etc/rc.d/init.d && +install -v -m740 ${SCRDIR}/bootscripts/alsa /etc/rc.d/init.d # script-name start stop bootscript_add_rcS alsa 95 85 -# Return last error exit $? diff --git a/stage3/cis-apache b/stage3/cis-apache index e1eb209..2a4fe27 100755 --- a/stage3/cis-apache +++ b/stage3/cis-apache @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -6,31 +8,29 @@ source ../sysinfos source ../functions source ../packages-list -CUR_DIR=$(pwd) - # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -hv_groupadd ${APACHE_USER} && -hv_useradd -c WebServer -d /dev/null -g ${APACHE_USER} -s /bin/false ${APACHE_USER} && +hv_groupadd ${APACHE_USER} +hv_useradd -c WebServer -d /dev/null -g ${APACHE_USER} -s /bin/false ${APACHE_USER} -cd ${LFS_TMP}/${1}-build && +cd ${LFS_TMP}/${1}-build ../${1}/configure \ --enable-layout=FHS \ --enable-mods-shared=all \ --enable-ssl \ - --with-z && + --with-z # --enable-rewrite \ # --enable-deflate \ # --enable-dav \ -make && -make install && +make +make install # 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 "LoadModule isapi_module" /etc/apache/httpd.conf 1> /dev/null 2>&1; then sed -i -e "s/^LoadModule isapi_module/# &/" /etc/apache/httpd.conf -fi && +fi # Modifying the listening port if an alternate one is specified. if [ -n "${HTTPD_PORT}" ]; then @@ -38,87 +38,86 @@ if [ -n "${HTTPD_PORT}" ]; then # Adding alternate port to default port of 80 sed -i -e "s%\(Listen 80\)%\1\nListen ${HTTPD_PORT}%" /etc/apache/httpd.conf fi -fi && +fi # Modifying the configuration file to run the server as a dedicated user: sed -i \ -e "s!^\(User\).*!\1 ${APACHE_USER}!g" \ -e "s!^\(Group\).*!\1 ${APACHE_USER}!g" \ - /etc/apache/httpd.conf && + /etc/apache/httpd.conf # SSL Certificates generation script -cat > /etc/apache/generate-ssl-certs << "EOF" && +cat > /etc/apache/generate-ssl-certs << "EOF" #!/bin/sh # Creation of SSL directories for Apache -cd /etc/apache && -mkdir -p ssl && +cd /etc/apache +mkdir -p ssl -cd ssl && +cd ssl -echo "-------------------------------------------------" && -echo "Generation of the RSA private key" && -echo "-------------------------------------------------" && -openssl genrsa -des3 -rand file1:file2:file3:file4:file5 -out server.key 1024 && +echo "-------------------------------------------------" +echo "Generation of the RSA private key" +echo "-------------------------------------------------" +openssl genrsa -des3 -rand file1:file2:file3:file4:file5 -out server.key 1024 -echo "-------------------------------------------------" && -echo "Removing pass-phrase from the private key" && -echo "-------------------------------------------------" && -cp server.key server.key.orig && -openssl rsa -in server.key.orig -out server.key && +echo "-------------------------------------------------" +echo "Removing pass-phrase from the private key" +echo "-------------------------------------------------" +cp server.key server.key.orig +openssl rsa -in server.key.orig -out server.key # The unencrypted key must be readable only by root! -chown root:root server.* && -chmod 0400 server.* && - -echo "-------------------------------------------------" && -echo "Generation of a Certificate Signing Request (CSR)" && -echo "" && -echo "Example fields:" && -echo "Country name: CA" && -echo "State or Province Name: Quebec" && -echo "Locality Name: Montreal" && -echo "Organization Name: Hugo Villeneuve" && -echo "Organizational Unit Name: ." && -echo "Common Name: www.hugovil.com" && -echo "Email Address: webmaster@hugovil.com" && -echo "" && -echo "Please enter the following 'extra' attributes" && -echo "to be sent with your certificate request" && -echo "A challenge password []: (press enter) " && -echo "An optional company name []: (press enter) " && -echo "" && -echo "-------------------------------------------------" && - -openssl req -new -key server.key -out server.csr && - -echo "-------------------------------------------------" && -echo "Generation of a self-signed certificate" && -echo "-------------------------------------------------" && -openssl x509 -req -days 10000 -in server.csr -signkey server.key -out server.crt && +chown root:root server.* +chmod 0400 server.* + +echo "-------------------------------------------------" +echo "Generation of a Certificate Signing Request (CSR)" +echo "" +echo "Example fields:" +echo "Country name: CA" +echo "State or Province Name: Quebec" +echo "Locality Name: Montreal" +echo "Organization Name: Hugo Villeneuve" +echo "Organizational Unit Name: ." +echo "Common Name: www.hugovil.com" +echo "Email Address: webmaster@hugovil.com" +echo "" +echo "Please enter the following 'extra' attributes" +echo "to be sent with your certificate request" +echo "A challenge password []: (press enter) " +echo "An optional company name []: (press enter) " +echo "" +echo "-------------------------------------------------" + +openssl req -new -key server.key -out server.csr + +echo "-------------------------------------------------" +echo "Generation of a self-signed certificate" +echo "-------------------------------------------------" +openssl x509 -req -days 10000 -in server.csr -signkey server.key -out server.crt exit $? EOF -chmod 740 /etc/apache/generate-ssl-certs && +chmod 740 /etc/apache/generate-ssl-certs -mkdir -p /etc/apache/ssl && -cp /etc/apache/extra/httpd-ssl.conf /etc/apache/ssl/ssl.conf && +mkdir -p /etc/apache/ssl +cp /etc/apache/extra/httpd-ssl.conf /etc/apache/ssl/ssl.conf -sed -i -e "s!^!\n Include /etc/apache/ssl/ssl.conf!" /etc/apache/httpd.conf && +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 && +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 && +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 # Bootscript -install -v -m740 ${CUR_DIR}/bootscripts/apache /etc/rc.d/init.d && +install -v -m740 ${SCRDIR}/bootscripts/apache /etc/rc.d/init.d # script-name start stop bootscript_add_rc3 apache 70 20 -# Return last error exit $? diff --git a/stage3/cis-audacity b/stage3/cis-audacity deleted file mode 100755 index b0ac782..0000000 --- a/stage3/cis-audacity +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# First argument of this script is the package name. - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -# Applying patches (if any) -apply_patches ${1} && - -cd ${LFS_TMP}/${1} && -./configure \ - --prefix=/usr \ - --sysconfdir=/etc \ - --with-libsamplerate \ - --with-libmad && -make && -make install && -ldconfig - -# Return last error -exit $? diff --git a/stage3/cis-bind b/stage3/cis-bind index 23161c7..a29c4c5 100755 --- a/stage3/cis-bind +++ b/stage3/cis-bind @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -6,53 +8,51 @@ source ../sysinfos source ../functions source ../packages-list -CUR_DIR=$(pwd) - # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -hv_groupadd named && -hv_useradd -c BindOwner -g named -m -s /bin/false named && +hv_groupadd named +hv_useradd -c BindOwner -g named -m -s /bin/false named -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/share/man \ --enable-threads \ - --with-libtool && + --with-libtool # Use updated address for L.ROOT-SERVERS.NET. -sed -i "s@198.32.64.12@199.7.83.42@" lib/dns/rootns.c && -make && -make install && +sed -i "s@198.32.64.12@199.7.83.42@" lib/dns/rootns.c +make +make install # Enable the execute bit to prevent a warning when using ldd to check library dependencies. -chmod 755 /usr/lib/lib{bind9,isc{,cc,cfg},lwres,dns}.so.*.?.? && +chmod 755 /usr/lib/lib{bind9,isc{,cc,cfg},lwres,dns}.so.*.?.? -cd doc && -install -d -m755 /usr/share/doc/${1}/{arm,draft,misc,rfc} && -install -m644 arm/*.html /usr/share/doc/${1}/arm && -install -m644 draft/*.txt /usr/share/doc/${1}/draft && -install -m644 rfc/* /usr/share/doc/${1}/rfc && +cd doc +install -d -m755 /usr/share/doc/${1}/{arm,draft,misc,rfc} +install -m644 arm/*.html /usr/share/doc/${1}/arm +install -m644 draft/*.txt /usr/share/doc/${1}/draft +install -m644 rfc/* /usr/share/doc/${1}/rfc install -m644 misc/{dnssec,ipv6,migrat*,options,rfc-compliance,roadmap,sdb} \ - /usr/share/doc/${1}/misc && + /usr/share/doc/${1}/misc # Generation of a key for use in the named.conf and rdnc.conf files using the rndc-confgen command. -BINDKEY=$(rndc-confgen -b 512 | grep -m 1 "secret" | cut -d '"' -f 2) && +BINDKEY=$(rndc-confgen -b 512 | grep -m 1 "secret" | cut -d '"' -f 2) -cd /home/named && -mkdir -p dev etc/namedb/{pz,slave} var/run && -rm -f /home/named/dev/null && -mknod /home/named/dev/null c 1 3 && -rm -f /home/named/dev/random && -mknod /home/named/dev/random c 1 8 && -chmod 666 /home/named/dev/{null,random} && -cp /etc/localtime /home/named/etc && +cd /home/named +mkdir -p dev etc/namedb/{pz,slave} var/run +rm -f /home/named/dev/null +mknod /home/named/dev/null c 1 3 +rm -f /home/named/dev/random +mknod /home/named/dev/random c 1 8 +chmod 666 /home/named/dev/{null,random} +cp /etc/localtime /home/named/etc # Creating the named.conf file from which named will read the location of zone files, # root name servers and secure DNS keys. -cat > /home/named/etc/named.conf << "EOF" && +cat > /home/named/etc/named.conf << "EOF" options { directory "/etc/namedb"; pid-file "/var/run/named.pid"; @@ -112,9 +112,9 @@ logging { }; }; EOF -sed -i -e "s!_BIND_KEY_!${BINDKEY}!g" /home/named/etc/named.conf && +sed -i -e "s!_BIND_KEY_!${BINDKEY}!g" /home/named/etc/named.conf -cat > /etc/rndc.conf << "EOF" && +cat > /etc/rndc.conf << "EOF" key rndc_key { algorithm "hmac-md5"; secret @@ -125,9 +125,9 @@ options { default-key rndc_key; }; EOF -sed -i -e "s!_BIND_KEY_!${BINDKEY}!g" /etc/rndc.conf && +sed -i -e "s!_BIND_KEY_!${BINDKEY}!g" /etc/rndc.conf -cat > /home/named/etc/namedb/pz/127.0.0 << "EOF" && +cat > /home/named/etc/namedb/pz/127.0.0 << "EOF" $TTL 3D @ IN SOA ns.local.domain. hostmaster.local.domain. ( 1 ; Serial @@ -139,7 +139,7 @@ $TTL 3D 1 PTR localhost. EOF -cat > /home/named/etc/namedb/root.hints << "EOF" && +cat > /home/named/etc/namedb/root.hints << "EOF" . 6D IN NS A.ROOT-SERVERS.NET. . 6D IN NS B.ROOT-SERVERS.NET. . 6D IN NS C.ROOT-SERVERS.NET. @@ -168,13 +168,12 @@ L.ROOT-SERVERS.NET. 6D IN A 198.32.64.12 M.ROOT-SERVERS.NET. 6D IN A 202.12.27.33 EOF -chown -R named.named /home/named && +chown -R named.named /home/named # Bootscript -install -v -m740 ${CUR_DIR}/bootscripts/named /etc/rc.d/init.d && +install -v -m740 ${SCRDIR}/bootscripts/named /etc/rc.d/init.d # script-name start stop bootscript_add_rc3 named 25 65 -# Return last error exit $? diff --git a/stage3/cis-boost b/stage3/cis-boost index 87069d7..65cf30f 100755 --- a/stage3/cis-boost +++ b/stage3/cis-boost @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Remaining arguments are additional configure options. @@ -9,20 +11,14 @@ source ../packages-list PACKAGE=${1} -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - # Applying patches (if any) -apply_patches ${PACKAGE} && +apply_patches ${PACKAGE} -cd ${LFS_TMP}/${PACKAGE} && +cd ${LFS_TMP}/${PACKAGE} ./configure \ - --prefix=/usr && -make && -make install && + --prefix=/usr +make +make install ldconfig -# Return last error exit $? diff --git a/stage3/cis-cdrtools b/stage3/cis-cdrtools index b9e00d4..50df063 100755 --- a/stage3/cis-cdrtools +++ b/stage3/cis-cdrtools @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,11 +9,11 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && -make INS_BASE=/usr DEFINSUSR=root DEFINSGRP=root && -make INS_BASE=/usr DEFINSUSR=root DEFINSGRP=root install && +cd ${LFS_TMP}/${1} +make INS_BASE=/usr DEFINSUSR=root DEFINSGRP=root +make INS_BASE=/usr DEFINSUSR=root DEFINSGRP=root install cat > /etc/sysconfig/cdrecord << "EOF" #!/bin/sh @@ -30,5 +32,4 @@ CDREC_DEVICE_DESC="CD-Writer+ 8200" CDROM_DEVICE_DESC="CDR-8235" EOF -# Return last error exit $? diff --git a/stage3/cis-ckermit b/stage3/cis-ckermit index 2ef9f1b..5bd062b 100755 --- a/stage3/cis-ckermit +++ b/stage3/cis-ckermit @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Remaining arguments are additional configure options. @@ -12,11 +14,11 @@ shift CONFIGURE_OPTS=${*} # Applying patches (if any) -apply_patches ${PACKAGE} && +apply_patches ${PACKAGE} -cd ${LFS_TMP}/${PACKAGE} && -make linux && -make prefix=/usr install && +cd ${LFS_TMP}/${PACKAGE} +make linux +make prefix=/usr install cat > /etc/skel/.kermrc << "EOF" set line /dev/ttyUSB0 @@ -33,5 +35,4 @@ set window 5 xecho \27[32m\27[40m EOF -# Return last error exit $? diff --git a/stage3/cis-clamav b/stage3/cis-clamav index b76a000..902299d 100755 --- a/stage3/cis-clamav +++ b/stage3/cis-clamav @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -6,35 +8,33 @@ source ../sysinfos source ../functions source ../packages-list -CUR_DIR=$(pwd) - # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -hv_groupadd clamav && -hv_useradd -g clamav -s /bin/false -c Clam-AntiVirus clamav && +hv_groupadd clamav +hv_useradd -g clamav -s /bin/false -c Clam-AntiVirus clamav -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} SENDMAIL="/usr/sbin/sendmail" ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --with-dbdir=/srv/clamav \ - --enable-milter && -make && -make install && -touch /var/log/clamd.log && -chmod 600 /var/log/clamd.log && -chown clamav /var/log/clamd.log && -touch /var/log/freshclam.log && -chmod 600 /var/log/freshclam.log && -chown clamav /var/log/freshclam.log && + --enable-milter +make +make install +touch /var/log/clamd.log +chmod 600 /var/log/clamd.log +chown clamav /var/log/clamd.log +touch /var/log/freshclam.log +chmod 600 /var/log/freshclam.log +chown clamav /var/log/freshclam.log # Addition to /etc/fcron/fcrontab to update virus database -string_add "Update the Clam AV database every hour" /etc/fcron/fcrontab && -string_add "&mail(false) 0 * * * * /usr/bin/freshclam --quiet" /etc/fcron/fcrontab && +string_add "Update the Clam AV database every hour" /etc/fcron/fcrontab +string_add "&mail(false) 0 * * * * /usr/bin/freshclam --quiet" /etc/fcron/fcrontab # Configuration file -cat > /etc/clamd.conf << "EOF" && +cat > /etc/clamd.conf << "EOF" # clamd.conf # Configuration file for the Clam AV daemon @@ -150,7 +150,7 @@ EOF # Freshclam configuration file -cat > /etc/freshclam.conf << "EOF" && +cat > /etc/freshclam.conf << "EOF" # freshclam.conf # Configuration file for Freshclam @@ -195,20 +195,19 @@ DatabaseMirror database.clamav.net EOF # Create the DB directory -mkdir -p /srv/clamav && -chown clamav:clamav /srv/clamav && -chmod 755 /srv/clamav && +mkdir -p /srv/clamav +chown clamav:clamav /srv/clamav +chmod 755 /srv/clamav # Create the run directory -mkdir -p /var/run/clamav && -chown clamav:clamav /var/run/clamav && -chmod 755 /var/run/clamav && +mkdir -p /var/run/clamav +chown clamav:clamav /var/run/clamav +chmod 755 /var/run/clamav # Bootscript -install -v -m740 ${CUR_DIR}/bootscripts/clamav /etc/rc.d/init.d && +install -v -m740 ${SCRDIR}/bootscripts/clamav /etc/rc.d/init.d # script-name start stop bootscript_add_rc3 clamav 55 35 -# Return last error exit $? diff --git a/stage3/cis-dbus b/stage3/cis-dbus index d118d52..bb1abf8 100755 --- a/stage3/cis-dbus +++ b/stage3/cis-dbus @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Reading system configuration informations, functions and package versions. @@ -6,26 +8,24 @@ source ../sysinfos source ../functions source ../packages-list -CUR_DIR=$(pwd) - # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -hv_groupadd -g 18 messagebus && +hv_groupadd -g 18 messagebus hv_useradd -c D-BUS-Message-Daemon-User -d /dev/null \ - -u 18 -g messagebus -s /bin/false messagebus && + -u 18 -g messagebus -s /bin/false messagebus -cd ${LFS_TMP}/${1}-build && +cd ${LFS_TMP}/${1}-build ../${1}/configure \ --prefix=/usr \ --sysconfdir=/etc \ - --localstatedir=/var && -make && -make install && -ldconfig && + --localstatedir=/var +make +make install +ldconfig # Bootscript -install -v -m740 ${CUR_DIR}/bootscripts/dbus /etc/rc.d/init.d && +install -v -m740 ${SCRDIR}/bootscripts/dbus /etc/rc.d/init.d # script-name start stop bootscript_add_rc3 dbus 92 20 @@ -33,7 +33,7 @@ bootscript_add_rc3 dbus 92 20 # Starting the session daemon here has the added bonus that it will exit # when you log out of your GNOME session. If you wish to start the daemon #here, use the following command instead of the one shown above: -######echo "exec dbus-launch --exit-with-session gnome-session" >> ~/.xinitrc && +######echo "exec dbus-launch --exit-with-session gnome-session" >> ~/.xinitrc # Return last error exit $? diff --git a/stage3/cis-ddclient b/stage3/cis-ddclient index 7a4df53..46de4af 100755 --- a/stage3/cis-ddclient +++ b/stage3/cis-ddclient @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,14 +9,14 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && -install ddclient /usr/sbin && -mkdir -p /etc/ddclient && -cp sample-etc_ddclient.conf /etc/ddclient/ddclient.conf && +cd ${LFS_TMP}/${1} +install ddclient /usr/sbin +mkdir -p /etc/ddclient +cp sample-etc_ddclient.conf /etc/ddclient/ddclient.conf -cat > /var/lib/dhcpc/dhcpcd.exe << "EOF" && +cat > /var/lib/dhcpc/dhcpcd.exe << "EOF" #!/bin/sh ## Update the DNS server unless the IP address is a private address @@ -46,7 +48,7 @@ case "${IPADDR}" in down) ;; new) - logger -t dhcpcd "IP address changed to ${IPADDR}" && + logger -t dhcpcd "IP address changed to ${IPADDR}" ddclient -daemon=0 -syslog -use=ip -ip=${IPADDR} >/dev/null 2>&1 ;; esac @@ -58,5 +60,4 @@ EOF chmod 740 /var/lib/dhcpc/dhcpcd.exe -# Return last error exit $? diff --git a/stage3/cis-docbook-dsssl b/stage3/cis-docbook-dsssl index 8f72460..835103a 100755 --- a/stage3/cis-docbook-dsssl +++ b/stage3/cis-docbook-dsssl @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,20 +9,19 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} -install -m755 bin/collateindex.pl /usr/bin && -install -m644 bin/collateindex.pl.1 /usr/share/man/man1 && -install -d -m755 /usr/share/sgml/docbook/dsssl-stylesheets-${DOCBOOK_DSSSL_VER} && -cp -R * /usr/share/sgml/docbook/dsssl-stylesheets-${DOCBOOK_DSSSL_VER} && +install -m755 bin/collateindex.pl /usr/bin +install -m644 bin/collateindex.pl.1 /usr/share/man/man1 +install -d -m755 /usr/share/sgml/docbook/dsssl-stylesheets-${DOCBOOK_DSSSL_VER} +cp -R * /usr/share/sgml/docbook/dsssl-stylesheets-${DOCBOOK_DSSSL_VER} install-catalog --add /etc/sgml/dsssl-docbook-stylesheets.cat \ - /usr/share/sgml/docbook/dsssl-stylesheets-${DOCBOOK_DSSSL_VER}/catalog && + /usr/share/sgml/docbook/dsssl-stylesheets-${DOCBOOK_DSSSL_VER}/catalog install-catalog --add /etc/sgml/dsssl-docbook-stylesheets.cat \ - /usr/share/sgml/docbook/dsssl-stylesheets-${DOCBOOK_DSSSL_VER}/common/catalog && + /usr/share/sgml/docbook/dsssl-stylesheets-${DOCBOOK_DSSSL_VER}/common/catalog install-catalog --add /etc/sgml/sgml-docbook.cat \ /etc/sgml/dsssl-docbook-stylesheets.cat -# Return last error exit $? diff --git a/stage3/cis-docbook-utils b/stage3/cis-docbook-utils index da0a79f..46636ec 100755 --- a/stage3/cis-docbook-utils +++ b/stage3/cis-docbook-utils @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,18 +9,17 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && -sed -i 's:/html::' doc/HTML/Makefile.in && +cd ${LFS_TMP}/${1} +sed -i 's:/html::' doc/HTML/Makefile.in ./configure \ - --prefix=/usr && -make && -make install && + --prefix=/usr +make +make install for doctype in html ps dvi man pdf rtf tex texi txt; do - ln -sf docbook2$doctype /usr/bin/db2$doctype || exit 1 + ln -sf docbook2$doctype /usr/bin/db2$doctype done -# Return last error exit $? diff --git a/stage3/cis-docbook-xml b/stage3/cis-docbook-xml index 35acbdb..98a1f6b 100755 --- a/stage3/cis-docbook-xml +++ b/stage3/cis-docbook-xml @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,38 +9,38 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && -install -d -m755 /usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER} && -install -d -m755 /etc/xml && -chown -R root:root . && +cd ${LFS_TMP}/${1} +install -d -m755 /usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER} +install -d -m755 /etc/xml +chown -R root:root . cp -af docbook.cat *.dtd ent/ *.mod \ - /usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER} && + /usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER} if [ ! -e /etc/xml/docbook ]; then - xmlcatalog --noout --create /etc/xml/docbook || exit 1 -fi && + xmlcatalog --noout --create /etc/xml/docbook +fi xmlcatalog --noout --add "public" \ "-//OASIS//DTD DocBook XML V${DOCBOOK_XML_VER}//EN" \ "http://www.oasis-open.org/docbook/xml/${DOCBOOK_XML_VER}/docbookx.dtd" \ - /etc/xml/docbook && + /etc/xml/docbook xmlcatalog --noout --add "public" \ "-//OASIS//DTD DocBook XML CALS Table Model V${DOCBOOK_XML_VER}//EN" \ "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}/calstblx.dtd" \ - /etc/xml/docbook && + /etc/xml/docbook xmlcatalog --noout --add "public" \ "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}/soextblx.dtd" \ - /etc/xml/docbook && + /etc/xml/docbook xmlcatalog --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Information Pool V${DOCBOOK_XML_VER}//EN" \ "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}/dbpoolx.mod" \ - /etc/xml/docbook && + /etc/xml/docbook xmlcatalog --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V${DOCBOOK_XML_VER}//EN" \ "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}/dbhierx.mod" \ - /etc/xml/docbook && + /etc/xml/docbook xmlcatalog --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML HTML Tables V${DOCBOOK_XML_VER}//EN" \ "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}/htmltblx.mod" \ @@ -46,67 +48,65 @@ xmlcatalog --noout --add "public" \ xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Notations V${DOCBOOK_XML_VER}//EN" \ "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}/dbnotnx.mod" \ - /etc/xml/docbook && + /etc/xml/docbook xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Character Entities V${DOCBOOK_XML_VER}//EN" \ "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}/dbcentx.mod" \ - /etc/xml/docbook && + /etc/xml/docbook xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Additional General Entities V${DOCBOOK_XML_VER}//EN" \ "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}/dbgenent.mod" \ - /etc/xml/docbook && + /etc/xml/docbook xmlcatalog --noout --add "rewriteSystem" \ "http://www.oasis-open.org/docbook/xml/${DOCBOOK_XML_VER}" \ "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}" \ - /etc/xml/docbook && + /etc/xml/docbook xmlcatalog --noout --add "rewriteURI" \ "http://www.oasis-open.org/docbook/xml/${DOCBOOK_XML_VER}" \ "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}" \ - /etc/xml/docbook && + /etc/xml/docbook if [ ! -e /etc/xml/catalog ]; then xmlcatalog --noout --create /etc/xml/catalog -fi && +fi xmlcatalog --noout --add "delegatePublic" \ "-//OASIS//ENTITIES DocBook XML" \ "file:///etc/xml/docbook" \ - /etc/xml/catalog && + /etc/xml/catalog xmlcatalog --noout --add "delegatePublic" \ "-//OASIS//DTD DocBook XML" \ "file:///etc/xml/docbook" \ - /etc/xml/catalog && + /etc/xml/catalog xmlcatalog --noout --add "delegateSystem" \ "http://www.oasis-open.org/docbook/" \ "file:///etc/xml/docbook" \ - /etc/xml/catalog && + /etc/xml/catalog xmlcatalog --noout --add "delegateURI" \ "http://www.oasis-open.org/docbook/" \ "file:///etc/xml/docbook" \ - /etc/xml/catalog && + /etc/xml/catalog -for DTDVERSION in ${DOCBOOK_XML_VER_PREV} -do +for DTDVERSION in ${DOCBOOK_XML_VER_PREV}; do xmlcatalog --noout --add "public" \ "-//OASIS//DTD DocBook XML V$DTDVERSION//EN" \ "http://www.oasis-open.org/docbook/xml/$DTDVERSION/docbookx.dtd" \ - /etc/xml/docbook && + /etc/xml/docbook xmlcatalog --noout --add "rewriteSystem" \ "http://www.oasis-open.org/docbook/xml/$DTDVERSION" \ "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}" \ - /etc/xml/docbook && + /etc/xml/docbook xmlcatalog --noout --add "rewriteURI" \ "http://www.oasis-open.org/docbook/xml/$DTDVERSION" \ "file:///usr/share/xml/docbook/xml-dtd-${DOCBOOK_XML_VER}" \ - /etc/xml/docbook && + /etc/xml/docbook xmlcatalog --noout --add "delegateSystem" \ "http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \ "file:///etc/xml/docbook" \ - /etc/xml/catalog && + /etc/xml/catalog xmlcatalog --noout --add "delegateURI" \ "http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \ "file:///etc/xml/docbook" \ /etc/xml/catalog done -# Return last error exit $? diff --git a/stage3/cis-dosfstools b/stage3/cis-dosfstools index 35a5bd4..72498ae 100755 --- a/stage3/cis-dosfstools +++ b/stage3/cis-dosfstools @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Remaining arguments are additional configure options. @@ -9,18 +11,12 @@ source ../packages-list PACKAGE=${1} -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - # Applying patches (if any) -apply_patches ${PACKAGE} && +apply_patches ${PACKAGE} -cd ${LFS_TMP}/${PACKAGE} && -make && -make PREFIX=/usr SBINDIR=/sbin install && +cd ${LFS_TMP}/${PACKAGE} +make +make PREFIX=/usr SBINDIR=/sbin install ldconfig -# Return last error exit $? diff --git a/stage3/cis-dvd-rw-tools b/stage3/cis-dvd-rw-tools index b09da3e..4cd607b 100755 --- a/stage3/cis-dvd-rw-tools +++ b/stage3/cis-dvd-rw-tools @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Reading system configuration informations, functions and package versions. @@ -7,13 +9,12 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && -make all rpl8 btcflash && -make prefix=/usr install && -install -v -m644 -D index.html /usr/share/doc/${1}/index.html && +cd ${LFS_TMP}/${1} +make all rpl8 btcflash +make prefix=/usr install +install -v -m644 -D index.html /usr/share/doc/${1}/index.html ldconfig -# Return last error exit $? diff --git a/stage3/cis-dvdfs b/stage3/cis-dvdfs index 8aa3be1..ef92029 100755 --- a/stage3/cis-dvdfs +++ b/stage3/cis-dvdfs @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Remaining arguments are additional configure options. @@ -7,21 +9,18 @@ source ../sysinfos source ../functions source ../packages-list -CUR_DIR=$(pwd) - PACKAGE=${1} shift CONFIGURE_OPTS=${*} # Applying patches (if any) -apply_patches ${PACKAGE} && +apply_patches ${PACKAGE} -cd ${LFS_TMP}/${PACKAGE} && -make && -make install && +cd ${LFS_TMP}/${PACKAGE} +make +make install # Mount script -install -v -m755 ${CUR_DIR}/resources/mount.fusedvdfs /sbin +install -v -m755 ${SCRDIR}/resources/mount.fusedvdfs /sbin -# Return last error exit $? diff --git a/stage3/cis-emacs b/stage3/cis-emacs index 06639b4..d9db20d 100755 --- a/stage3/cis-emacs +++ b/stage3/cis-emacs @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,20 +9,18 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && - -olddir=$(pwd) && +apply_patches ${1} -cd ${LFS_TMP}/${1}-build && +cd ${LFS_TMP}/${1}-build ../${1}/configure \ --prefix=/usr \ --libexecdir=/usr/sbin \ - --with-x-toolkit=gtk && -make bootstrap && -make install && -ldconfig && + --with-x-toolkit=gtk +make bootstrap +make install +ldconfig -cat > /etc/skel/.emacs << "EOF" && +cat > /etc/skel/.emacs << "EOF" ;; ~/.emacs ;; Emacs initialization file @@ -60,5 +60,4 @@ cat > /etc/skel/.emacs << "EOF" && (setq compilation-scroll-output t) EOF -# Return last error exit $? diff --git a/stage3/cis-espgs b/stage3/cis-espgs index 656f9d0..2e7990c 100755 --- a/stage3/cis-espgs +++ b/stage3/cis-espgs @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Reading system configuration informations, functions and package versions. @@ -7,46 +9,45 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} GS_FONTS_PATH="${HV_FONTS_PATH}/ghostscript" # Unpack all the fonts to ${GS_FONTS_PATH} -install -v -m755 -d ${GS_FONTS_PATH} && -decompress_package ${GHOSTSCRIPT_FONTS_STD} && -decompress_package ${GHOSTSCRIPT_FONTS_OTHER} && -mv ${LFS_TMP}/fonts/* ${GS_FONTS_PATH} && -rmdir ${LFS_TMP}/fonts && -chown -v -R root:root ${GS_FONTS_PATH} && - -cd ${LFS_TMP}/${1} && -sed -i "s/bbox.dev$/x11.dev/" Makefile.in && +install -v -m755 -d ${GS_FONTS_PATH} +decompress_package ${GHOSTSCRIPT_FONTS_STD} +decompress_package ${GHOSTSCRIPT_FONTS_OTHER} +mv ${LFS_TMP}/fonts/* ${GS_FONTS_PATH} +rmdir ${LFS_TMP}/fonts +chown -v -R root:root ${GS_FONTS_PATH} + +cd ${LFS_TMP}/${1} +sed -i "s/bbox.dev$/x11.dev/" Makefile.in ./configure \ --prefix=/usr \ --enable-threads \ --without-omni \ - --with-fontpath=${GS_FONTS_PATH} && -make && -make install && -#rmdir -v /usr/lib/ghostscript/$(get_pkg_ver_base ${1}) /usr/lib/ghostscript && -ln -v -s ../ghostscript/$(get_pkg_ver_base ${1})/doc /usr/share/doc/${1} && + --with-fontpath=${GS_FONTS_PATH} +make +make install +#rmdir -v /usr/lib/ghostscript/$(get_pkg_ver_base ${1}) /usr/lib/ghostscript +ln -v -s ../ghostscript/$(get_pkg_ver_base ${1})/doc /usr/share/doc/${1} for INSTFILE in `ls doc`; do if [ ! -f /usr/share/doc/${1}/${INSTFILE} ]; then install -v -m644 doc/${INSTFILE} /usr/share/doc/${1}/ fi -done && +done # Checking if X is installed... if [ -d /usr/X11R6 ]; then # Adding our local fonts directory to local configuration file sed -i -e "s!^!${GS_FONTS_PATH}\n!" \ - /etc/fonts/local.conf && + /etc/fonts/local.conf # Updating fonts cache database. fc-cache -f -fi && +fi ldconfig -# Return last error exit $? diff --git a/stage3/cis-fcron b/stage3/cis-fcron index f83968d..3abce90 100755 --- a/stage3/cis-fcron +++ b/stage3/cis-fcron @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -6,27 +8,25 @@ source ../sysinfos source ../functions source ../packages-list -CUR_DIR=$(pwd) - # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -hv_groupadd fcron && -hv_useradd -c fcron -g fcron fcron && +hv_groupadd fcron +hv_useradd -c fcron -g fcron fcron -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} ./configure \ --with-sendmail \ - --with-answer-all=no && -make && -make install && + --with-answer-all=no +make +make install -rm -f /etc/fcron.conf && -mkdir -p /etc/fcron && -mv -f /etc/fcron.allow /etc/fcron && -mv -f /etc/fcron.deny /etc/fcron && +rm -f /etc/fcron.conf +mkdir -p /etc/fcron +mv -f /etc/fcron.allow /etc/fcron +mv -f /etc/fcron.deny /etc/fcron -cat > /etc/fcron/fcron.conf << "EOF" && +cat > /etc/fcron/fcron.conf << "EOF" # fcron.conf - Configuration file for fcron(8) and fcrontab(1). # See fcron.conf(5) for syntax and explanations. # @@ -51,32 +51,31 @@ sendmail = /usr/sbin/sendmail # Location of the default editor for "fcrontab -e" editor = /usr/bin/vi EOF -chmod 640 /etc/fcron/fcron.conf && +chmod 640 /etc/fcron/fcron.conf -cat > /etc/fcron/fcrontab << "EOF" && +cat > /etc/fcron/fcrontab << "EOF" # &options min hrs day-of-month month day-of-week command # Run rotatelogs every day at 00:05 #&mail(false) 05 00 * * * /usr/local/bin/rotatelogs EOF -chmod 640 /etc/fcron/fcrontab && -chown -R root.fcron /etc/fcron && +chmod 640 /etc/fcron/fcrontab +chown -R root.fcron /etc/fcron -cat > /etc/fcron/configure << "EOF" && +cat > /etc/fcron/configure << "EOF" #!/bin/sh fcrontab -c /etc/fcron/fcron.conf /etc/fcron/fcrontab exit $? EOF -chmod 740 /etc/fcron/configure && +chmod 740 /etc/fcron/configure # Executing fcron configure script. -/etc/fcron/configure && +/etc/fcron/configure -install -v -m740 ${CUR_DIR}/bootscripts/fcron /etc/rc.d/init.d && +install -v -m740 ${SCRDIR}/bootscripts/fcron /etc/rc.d/init.d # script-name start stop bootscript_add_rcS fcron 95 84 -# Return last error exit $? diff --git a/stage3/cis-firefox b/stage3/cis-firefox index 922f78f..e42e0be 100755 --- a/stage3/cis-firefox +++ b/stage3/cis-firefox @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -9,12 +11,12 @@ source ../packages-list PACKAGE=${1} # Applying patches (if any) -apply_patches ${PACKAGE} && +apply_patches ${PACKAGE} FIREFOX_BUILD_DIR="${1}-build" FIREFOX_PKG_VERSION="firefox-$(get_pkg_ver ${PACKAGE})" -cd ${LFS_TMP}/${PACKAGE} && +cd ${LFS_TMP}/${PACKAGE} cat > .mozconfig << "EOF" # This file contains the options used in the Firefox build. @@ -119,29 +121,28 @@ ac_add_options --enable-strip EOF -sed -i -e "s!_FIREFOX_BUILD_DIR_!${FIREFOX_BUILD_DIR}!g" .mozconfig && +sed -i -e "s!_FIREFOX_BUILD_DIR_!${FIREFOX_BUILD_DIR}!g" .mozconfig -make -f client.mk build && -make -f client.mk install && +make -f client.mk build +make -f client.mk install # Many applications look for netscape when they need to open a browser... -ln -v -sf firefox /usr/bin/netscape && +ln -v -sf firefox /usr/bin/netscape # Remove old links -rm -f /usr/lib/mozilla && -rm -f /usr/lib/firefox && -rm -f /usr/lib/${FIREFOX_PKG_VERSION}/plugins/libjavaplugin_oji.so && +rm -f /usr/lib/mozilla +rm -f /usr/lib/firefox +rm -f /usr/lib/${FIREFOX_PKG_VERSION}/plugins/libjavaplugin_oji.so -ln -v -sf ${FIREFOX_PKG_VERSION} /usr/lib/mozilla && -ln -v -sf ${FIREFOX_PKG_VERSION} /usr/lib/firefox && +ln -v -sf ${FIREFOX_PKG_VERSION} /usr/lib/mozilla +ln -v -sf ${FIREFOX_PKG_VERSION} /usr/lib/firefox # To use the installed Java plugin. -ln -v -s ${JAVA_HOME}/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/${FIREFOX_PKG_VERSION}/plugins && +ln -v -s ${JAVA_HOME}/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/${FIREFOX_PKG_VERSION}/plugins # Addition to /etc/ld.so.conf # This is necessary for shared library libmozjs.so (needed by gxine) -string_add "/usr/lib/${FIREFOX_PKG_VERSION}" /etc/ld.so.conf && +string_add "/usr/lib/${FIREFOX_PKG_VERSION}" /etc/ld.so.conf ldconfig - # Return last error exit $? diff --git a/stage3/cis-firewire b/stage3/cis-firewire index c410fad..bf5e4fe 100755 --- a/stage3/cis-firewire +++ b/stage3/cis-firewire @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -6,49 +8,46 @@ source ../sysinfos source ../functions source ../packages-list -CUR_DIR=$(pwd) - # Grabbing latest version of libraw1394 -svn co svn://svn.linux1394.org/libraw1394/trunk /usr/src/libraw1394 && +svn co svn://svn.linux1394.org/libraw1394/trunk /usr/src/libraw1394 # Grabbing latest version of libiec61883 -svn co svn://svn.linux1394.org/libiec61883/trunk /usr/src/libiec61883 && +svn co svn://svn.linux1394.org/libiec61883/trunk /usr/src/libiec61883 # Grabbing latest version of hv-firewire utilities -svn co http://hugovil.com:8080/svn/firewire/trunk /usr/src/hv-firewire && +svn co http://hugovil.com:8080/svn/firewire/trunk /usr/src/hv-firewire -cd /usr/src/libraw1394 && -./autogen.sh && +cd /usr/src/libraw1394 +./autogen.sh ./configure \ - --prefix=/usr && -make && -make dev && -make install && + --prefix=/usr +make +make dev +make install -cd /usr/src/libiec61883 && -./autogen.sh && +cd /usr/src/libiec61883 +./autogen.sh ./configure \ - --prefix=/usr && -make && -make install && + --prefix=/usr +make +make install -cd /usr/src/hv-firewire && -#./autogen.sh && +cd /usr/src/hv-firewire +#./autogen.sh #./configure \ -# --prefix=/usr && -#make && -#make install && +# --prefix=/usr +#make +#make install # Firewire Start/Stop script -install -v -m740 ${CUR_DIR}/bootscripts/firewire /etc/rc.d/init.d && +install -v -m740 ${SCRDIR}/bootscripts/firewire /etc/rc.d/init.d # script-name start stop -bootscript_add_rc3 firewire 80 40 && +bootscript_add_rc3 firewire 80 40 # Firewire plugs daemon Start/Stop script -install -v -m740 bootscripts/fwplugd /etc/rc.d/init.d && +install -v -m740 ${SCRDIR}/bootscripts/fwplugd /etc/rc.d/init.d chmod 740 /etc/rc.d/init.d/fwplugd -# Return last error exit $? diff --git a/stage3/cis-flashplugin b/stage3/cis-flashplugin index 433658f..27e1271 100755 --- a/stage3/cis-flashplugin +++ b/stage3/cis-flashplugin @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Reading system configuration informations, functions and package versions. @@ -9,20 +11,19 @@ source ../packages-list PLUGINS_DIR=/usr/lib/firefox/plugins # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} # Decompression of a package # First argument: package name # Second argument: directory where decompressing (optional) -decompress_package ${1} && +decompress_package ${1} if [ ! -d ${PLUGINS_DIR} ]; then echo "Plugins directory not found." return 1 -fi && +fi -install -v -m755 ${LFS_TMP}/${1}/flashplayer.xpt ${PLUGINS_DIR} && +install -v -m755 ${LFS_TMP}/${1}/flashplayer.xpt ${PLUGINS_DIR} install -v -m755 ${LFS_TMP}/${1}/libflashplayer.so ${PLUGINS_DIR} -# Return last error exit $? diff --git a/stage3/cis-fontconfig b/stage3/cis-fontconfig index b2e1e0d..d0bdead 100755 --- a/stage3/cis-fontconfig +++ b/stage3/cis-fontconfig @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Reading system configuration informations, functions and package versions. @@ -7,32 +9,32 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1}-build && +cd ${LFS_TMP}/${1}-build ../${1}/configure \ --prefix=/usr \ --sysconfdir=/etc \ - --disable-docs && -make && -make install && + --disable-docs +make +make install # Manually installing documentation. -cd ${LFS_TMP}/${1} && -install -v -m644 doc/*.3 /usr/share/man/man3 && -install -v -m644 doc/*.5 /usr/share/man/man5 && -install -v -m755 -d /usr/share/doc/${1}/fontconfig-devel && -install -v -m644 doc/*.{html,pdf,txt} /usr/share/doc/${1} && -install -v -m644 doc/fontconfig-devel/* /usr/share/doc/${1}/fontconfig-devel && +cd ${LFS_TMP}/${1} +install -v -m644 doc/*.3 /usr/share/man/man3 +install -v -m644 doc/*.5 /usr/share/man/man5 +install -v -m755 -d /usr/share/doc/${1}/fontconfig-devel +install -v -m644 doc/*.{html,pdf,txt} /usr/share/doc/${1} +install -v -m644 doc/fontconfig-devel/* /usr/share/doc/${1}/fontconfig-devel -mkdir -v -p ${HV_FONTS_PATH}/{TrueType,Type1} && -mkdir -v -p /etc/fonts && +mkdir -v -p ${HV_FONTS_PATH}/{TrueType,Type1} +mkdir -v -p /etc/fonts if [ -f /etc/fonts/local.conf ]; then - mv -v /etc/fonts/local.conf /etc/fonts/local.conf.old || exit 1 -fi && + mv -v /etc/fonts/local.conf /etc/fonts/local.conf.old +fi # Adding X and our local fonts directory to local configuration file -cat > /etc/fonts/local.conf << "EOF" && +cat > /etc/fonts/local.conf << "EOF" @@ -44,10 +46,9 @@ cat > /etc/fonts/local.conf << "EOF" && EOF -sed -i -e "s!_HV_FONTS_PATH_!${HV_FONTS_PATH}!g" /etc/fonts/local.conf && +sed -i -e "s!_HV_FONTS_PATH_!${HV_FONTS_PATH}!g" /etc/fonts/local.conf # Updating cache database. fc-cache -f -# Return last error exit $? diff --git a/stage3/cis-getdate b/stage3/cis-getdate index 6a96516..0c7bebb 100755 --- a/stage3/cis-getdate +++ b/stage3/cis-getdate @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,14 +9,14 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && -make && -make install && -make installman && +cd ${LFS_TMP}/${1} +make +make install +make installman -cat > /usr/local/bin/hvgetdate << EOF && +cat > /usr/local/bin/hvgetdate << EOF #!/bin/sh # Time server informations: @@ -40,13 +42,12 @@ echo -n "Synchronizing kernel time via NTP server:" getdate -adjust 1 600 \${NTP_HOST1} \${NTP_HOST2} exit 0 EOF -chmod 740 /usr/local/bin/hvgetdate && +chmod 740 /usr/local/bin/hvgetdate # Adding fcron entry string_add "# Run after five minutes of execution the first time, then run every hours" \ - /etc/fcron/fcrontab && + /etc/fcron/fcrontab string_add "@mail(false),first(5) 6h /usr/local/bin/hvgetdate" \ /etc/fcron/fcrontab -# Return last error exit $? diff --git a/stage3/cis-git-manpages b/stage3/cis-git-manpages index 86ea138..35ad050 100755 --- a/stage3/cis-git-manpages +++ b/stage3/cis-git-manpages @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Remaining arguments are additional configure options. @@ -17,10 +19,9 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${PACKAGE} && +apply_patches ${PACKAGE} -cd ${LFS_TMP}/${PACKAGE} && +cd ${LFS_TMP}/${PACKAGE} cp -a * /usr/share/man -# Return last error exit $? diff --git a/stage3/cis-gnash b/stage3/cis-gnash index 5be6d70..d80ac37 100755 --- a/stage3/cis-gnash +++ b/stage3/cis-gnash @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Remaining arguments are additional configure options. @@ -12,19 +14,18 @@ shift CONFIGURE_OPTS=${*} # Applying patches (if any) -apply_patches ${PACKAGE} && +apply_patches ${PACKAGE} -cd ${LFS_TMP}/${PACKAGE}-build && +cd ${LFS_TMP}/${PACKAGE}-build ../${PACKAGE}/configure \ --prefix=/usr \ --sysconfdir=/etc \ --enable-gui=gtk \ - ${CONFIGURE_OPTS} && -make && -make install && -ldconfig && + ${CONFIGURE_OPTS} +make +make install +ldconfig install -m 755 plugin/.libs/libgnashplugin.so /usr/lib/firefox/plugins -# Return last error exit $? diff --git a/stage3/cis-guile b/stage3/cis-guile deleted file mode 100755 index 2d1bf38..0000000 --- a/stage3/cis-guile +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# First argument of this script is the package name. -# Remaining arguments are additional configure options. - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -PACKAGE=${1} - -# Applying patches (if any) -apply_patches ${PACKAGE} && - -cd ${LFS_TMP}/${PACKAGE} && -sed -i -e '20,$ d' \ - -e 's|slib)|&)\n(load-from-path "slib/guile.init")|' \ - ice-9/slib.scm && - -cd ${LFS_TMP}/${PACKAGE}-build && -../${PACKAGE}/configure \ - --prefix=/usr \ - --sysconfdir=/etc && -make && -make install && -ldconfig - -# Return last error -exit $? diff --git a/stage3/cis-hal b/stage3/cis-hal index 3b66cad..9a0bc7e 100755 --- a/stage3/cis-hal +++ b/stage3/cis-hal @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Reading system configuration informations, functions and package versions. @@ -6,29 +8,27 @@ source ../sysinfos source ../functions source ../packages-list -CUR_DIR=$(pwd) - # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -hv_groupadd -g 19 haldaemon && +hv_groupadd -g 19 haldaemon hv_useradd -c HAL-Daemon-User -d /dev/null -u 19 \ - -g haldaemon -s /bin/false haldaemon && + -g haldaemon -s /bin/false haldaemon -cd ${LFS_TMP}/${1}-build && +cd ${LFS_TMP}/${1}-build ../${1}/configure \ --prefix=/usr \ --sysconfdir=/etc \ --libexecdir=/usr/lib/hal \ --localstatedir=/var \ - --with-hwdata=/usr/share/pciutils/pci.ids && -make && -make install && -install -v -m755 -d /var/run/hald && -ldconfig && + --with-hwdata=/usr/share/pciutils/pci.ids +make +make install +install -v -m755 -d /var/run/hald +ldconfig # Bootscript -install -v -m740 ${CUR_DIR}/bootscripts/hald /etc/rc.d/init.d && +install -v -m740 ${SCRDIR}/bootscripts/hald /etc/rc.d/init.d # script-name start stop bootscript_add_rc3 hald 93 19 @@ -36,10 +36,9 @@ bootscript_add_rc3 hald 93 19 # If the system-wide D-BUS daemon was running during the # installation of HAL, ensure you stop and restart the # D-BUS daemon before attempting to start the hald daemon. -#/etc/rc.d/init.d/dbus restart && +#/etc/rc.d/init.d/dbus restart # Starting daemon #/etc/rc.d/init.d/hal start -# Return last error exit $? diff --git a/stage3/cis-inetutils b/stage3/cis-inetutils index 3e4074a..76ce396 100755 --- a/stage3/cis-inetutils +++ b/stage3/cis-inetutils @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -6,12 +8,10 @@ source ../sysinfos source ../functions source ../packages-list -CUR_DIR=$(pwd) - # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1}-build && +cd ${LFS_TMP}/${1}-build ../${1}/configure \ --prefix=/usr \ --libexecdir=/usr/sbin \ @@ -22,19 +22,18 @@ cd ${LFS_TMP}/${1}-build && --disable-dependancy-tracking \ --disable-syslogd \ --with-pam \ - --with-wrap && -make && -make install && -mv /usr/bin/ping /bin && + --with-wrap +make +make install +mv /usr/bin/ping /bin # Creating /etc/inetd.conf -touch /etc/inetd.conf && +touch /etc/inetd.conf # Bootscript -install -v -m740 ${CUR_DIR}/bootscripts/inetd /etc/rc.d/init.d && +install -v -m740 ${SCRDIR}/bootscripts/inetd /etc/rc.d/init.d # script-name start stop bootscript_add_rc3 inetd 30 60 -# Return last error exit $? diff --git a/stage3/cis-iptables b/stage3/cis-iptables index 5b5587a..e6f05fd 100755 --- a/stage3/cis-iptables +++ b/stage3/cis-iptables @@ -6,20 +6,17 @@ source ../sysinfos source ../functions source ../packages-list -CUR_DIR=$(pwd) - # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && -make PREFIX=/usr && -make PREFIX=/usr install && +cd ${LFS_TMP}/${1} +make PREFIX=/usr +make PREFIX=/usr install # Firewall boot script -install -v -m740 ${CUR_DIR}/bootscripts/firewall /etc/rc.d/init.d && +install -v -m740 ${SCRDIR}/bootscripts/firewall /etc/rc.d/init.d # script-name start stop bootscript_add_rc3 firewall 35 55 -# Return last error exit $? diff --git a/stage3/cis-jadetex b/stage3/cis-jadetex index c5a44c2..4bcb07c 100755 --- a/stage3/cis-jadetex +++ b/stage3/cis-jadetex @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Reading system configuration informations, functions and package versions. @@ -7,13 +9,13 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} sed -i.orig -e "s/original texmf.cnf/modified texmf.cnf/" \ -e "s/memory hog.../&\npool_size.context = 750000/" \ - $(kpsewhich texmf.cnf) && -cat >> $(kpsewhich texmf.cnf) << "EOF" && + $(kpsewhich texmf.cnf) +cat >> $(kpsewhich texmf.cnf) << "EOF" % The following 3 sections added for JadeTeX @@ -56,22 +58,22 @@ max_strings.pdfjadetex = 55000 EOF -LATEX_FMT_DIR="$(kpsewhich -expand-var '$TEXMFSYSVAR')/web2c" && -mv -v $(kpsewhich latex.fmt) $(kpsewhich latex.fmt).orig && -mv -v $LATEX_FMT_DIR/latex.log $LATEX_FMT_DIR/latex.log.orig && -fmtutil-sys --byfmt latex && +LATEX_FMT_DIR="$(kpsewhich -expand-var '$TEXMFSYSVAR')/web2c" +mv -v $(kpsewhich latex.fmt) $(kpsewhich latex.fmt).orig +mv -v $LATEX_FMT_DIR/latex.log $LATEX_FMT_DIR/latex.log.orig +fmtutil-sys --byfmt latex -make && +make install -v -m755 -d \ - $(kpsewhich -expand-var '$TEXMFLOCAL')/tex/jadetex/config && + $(kpsewhich -expand-var '$TEXMFLOCAL')/tex/jadetex/config install -v -m644 dsssl.def jadetex.ltx *.sty \ - $(kpsewhich -expand-var '$TEXMFLOCAL')/tex/jadetex && + $(kpsewhich -expand-var '$TEXMFLOCAL')/tex/jadetex install -v -m644 {,pdf}jadetex.ini \ - $(kpsewhich -expand-var '$TEXMFLOCAL')/tex/jadetex/config && -FMTUTIL_CNF="$(kpsewhich fmtutil.cnf)" && -mv $FMTUTIL_CNF $FMTUTIL_CNF.orig && -cat $FMTUTIL_CNF.orig - >> $FMTUTIL_CNF << "EOF" && + $(kpsewhich -expand-var '$TEXMFLOCAL')/tex/jadetex/config +FMTUTIL_CNF="$(kpsewhich fmtutil.cnf)" +mv $FMTUTIL_CNF $FMTUTIL_CNF.orig +cat $FMTUTIL_CNF.orig - >> $FMTUTIL_CNF << "EOF" # JadeTeX formats: jadetex etex - "&latex" jadetex.ini @@ -79,20 +81,19 @@ pdfjadetex pdfetex - "&pdflatex" pdfjadetex.ini EOF mv -v $(kpsewhich -expand-var '$TEXMFMAIN')/ls-R \ - $(kpsewhich -expand-var '$TEXMFMAIN')/ls-R.orig && + $(kpsewhich -expand-var '$TEXMFMAIN')/ls-R.orig mv -v $(kpsewhich -expand-var '$TEXMFSYSVAR')/ls-R \ - $(kpsewhich -expand-var '$TEXMFSYSVAR')/ls-R.orig && -mktexlsr && -fmtutil-sys --byfmt jadetex && -fmtutil-sys --byfmt pdfjadetex && -mktexlsr && -ln -v -sf etex /usr/bin/jadetex && -ln -v -sf pdfetex /usr/bin/pdfjadetex && + $(kpsewhich -expand-var '$TEXMFSYSVAR')/ls-R.orig +mktexlsr +fmtutil-sys --byfmt jadetex +fmtutil-sys --byfmt pdfjadetex +mktexlsr +ln -v -sf etex /usr/bin/jadetex +ln -v -sf pdfetex /usr/bin/pdfjadetex install -v -m644 -D index.html \ - /usr/share/doc/jadetex-3.13/index.html && + /usr/share/doc/jadetex-3.13/index.html install -v -m644 *.1 /usr/share/man/man1 ldconfig -# Return last error exit $? diff --git a/stage3/cis-java b/stage3/cis-java index e053da0..a81c6df 100755 --- a/stage3/cis-java +++ b/stage3/cis-java @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Reading system configuration informations, functions and package versions. @@ -7,15 +9,14 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -install -v -d /usr/java && -cp -a ${LFS_TMP}/${1}/* /usr/java && +install -v -d /usr/java +cp -a ${LFS_TMP}/${1}/* /usr/java -ln -svf ../java/bin/java /usr/bin/java && +ln -svf ../java/bin/java /usr/bin/java -var_add_path JAVA_HOME /etc/profile "/usr/java" && +var_add_path JAVA_HOME /etc/profile "/usr/java" var_export JAVA_HOME /etc/profile -# Return last error exit $? diff --git a/stage3/cis-krb5 b/stage3/cis-krb5 index 95f6ce8..8e27d37 100755 --- a/stage3/cis-krb5 +++ b/stage3/cis-krb5 @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Reading system configuration informations, functions and package versions. @@ -7,30 +9,30 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1}/src && +cd ${LFS_TMP}/${1}/src ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var/lib \ --mandir=/usr/share/man \ --enable-dns \ - --enable-static && -make && -make install && -mv -v /usr/bin/ksu /bin && -mv -v /usr/lib/libkrb5.so.3* /lib && -mv -v /usr/lib/libkrb4.so.2* /lib && -mv -v /usr/lib/libdes425.so.3* /lib && -mv -v /usr/lib/libk5crypto.so.3* /lib && -mv -v /usr/lib/libcom_err.so.3* /lib && -ln -v -sf ../../lib/libkrb5.so.3 /usr/lib/libkrb5.so && -ln -v -sf ../../lib/libkrb4.so.2 /usr/lib/libkrb4.so && -ln -v -sf ../../lib/libdes425.so.3 /usr/lib/libdes425.so && -ln -v -sf ../../lib/libk5crypto.so.3 /usr/lib/libk5crypto.so && -ln -v -sf ../../lib/libcom_err.so.3 /usr/lib/libcom_err.so && -ldconfig && + --enable-static +make +make install +mv -v /usr/bin/ksu /bin +mv -v /usr/lib/libkrb5.so.3* /lib +mv -v /usr/lib/libkrb4.so.2* /lib +mv -v /usr/lib/libdes425.so.3* /lib +mv -v /usr/lib/libk5crypto.so.3* /lib +mv -v /usr/lib/libcom_err.so.3* /lib +ln -v -sf ../../lib/libkrb5.so.3 /usr/lib/libkrb5.so +ln -v -sf ../../lib/libkrb4.so.2 /usr/lib/libkrb4.so +ln -v -sf ../../lib/libdes425.so.3 /usr/lib/libdes425.so +ln -v -sf ../../lib/libk5crypto.so.3 /usr/lib/libk5crypto.so +ln -v -sf ../../lib/libcom_err.so.3 /usr/lib/libcom_err.so +ldconfig cat > /etc/krb5.conf << EOF [libdefaults] @@ -52,5 +54,4 @@ cat > /etc/krb5.conf << EOF default = SYSLOG[[:SYS]] EOF -# Return last error exit $? diff --git a/stage3/cis-libid3tag b/stage3/cis-libid3tag index acb5836..4275204 100755 --- a/stage3/cis-libid3tag +++ b/stage3/cis-libid3tag @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Reading system configuration informations, functions and package versions. @@ -7,19 +9,19 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1}-build && +cd ${LFS_TMP}/${1}-build ../${1}/configure \ --prefix=/usr \ - --sysconfdir=/etc && -make && -make install && + --sysconfdir=/etc +make +make install # Some packages check for the pkg-config file for libid3tag. # This file is particularly needed so that gst-plugins-ugly can # recognize the installed libid3tag. -cat > /usr/lib/pkgconfig/id3tag.pc << "EOF" && +cat > /usr/lib/pkgconfig/id3tag.pc << "EOF" prefix=/usr exec_prefix=${prefix} libdir=${exec_prefix}/lib @@ -33,9 +35,8 @@ Libs: -L${libdir} -lid3tag -lz Cflags: -I${includedir} EOF -sed -i -e "s!_LIBID3TAG_VERSION_!$(get_pkg_ver ${1})!g" /usr/lib/pkgconfig/id3tag.pc && +sed -i -e "s!_LIBID3TAG_VERSION_!$(get_pkg_ver ${1})!g" /usr/lib/pkgconfig/id3tag.pc ldconfig -# Return last error exit $? diff --git a/stage3/cis-libmad b/stage3/cis-libmad index 00103fd..ef83338 100755 --- a/stage3/cis-libmad +++ b/stage3/cis-libmad @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Reading system configuration informations, functions and package versions. @@ -7,19 +9,19 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1}-build && +cd ${LFS_TMP}/${1}-build ../${1}/configure \ --prefix=/usr \ - --sysconfdir=/etc && -make && -make install && + --sysconfdir=/etc +make +make install # Some packages check for the pkg-config file for libmad. # This file is particularly needed so that Cdrdao can # recognize the installed libmad. -cat > /usr/lib/pkgconfig/mad.pc << "EOF" && +cat > /usr/lib/pkgconfig/mad.pc << "EOF" prefix=/usr exec_prefix=${prefix} libdir=${exec_prefix}/lib @@ -33,9 +35,8 @@ Libs: -L${libdir} -lmad Cflags: -I${includedir} EOF -sed -i -e "s!_LIBMAD_VERSION_!$(get_pkg_ver ${1})!g" /usr/lib/pkgconfig/mad.pc && +sed -i -e "s!_LIBMAD_VERSION_!$(get_pkg_ver ${1})!g" /usr/lib/pkgconfig/mad.pc ldconfig -# Return last error exit $? diff --git a/stage3/cis-libmng b/stage3/cis-libmng index eb0ed8f..28953e7 100755 --- a/stage3/cis-libmng +++ b/stage3/cis-libmng @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,20 +9,19 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && -cp makefiles/makefile.linux Makefile && -make prefix=/usr install && +cd ${LFS_TMP}/${1} +cp makefiles/makefile.linux Makefile +make prefix=/usr install # The documentation files are not installed by the installation procedure, # so they are copied manually. -install -v -m644 doc/man/*.3 /usr/share/man/man3 && -install -v -m644 doc/man/*.5 /usr/share/man/man5 && -install -v -m755 -d /usr/share/doc/${1} && -install -v -m644 doc/*.{png,txt} /usr/share/doc/${1} && +install -v -m644 doc/man/*.3 /usr/share/man/man3 +install -v -m644 doc/man/*.5 /usr/share/man/man5 +install -v -m755 -d /usr/share/doc/${1} +install -v -m644 doc/*.{png,txt} /usr/share/doc/${1} ldconfig -# Return last error exit $? diff --git a/stage3/cis-libusb b/stage3/cis-libusb index 4c01940..dd62041 100755 --- a/stage3/cis-libusb +++ b/stage3/cis-libusb @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Reading system configuration informations, functions and package versions. @@ -7,24 +9,23 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} ./configure \ --prefix=/usr \ --sysconfdir=/etc \ - --disable-build-docs && -make && -make install && + --disable-build-docs +make +make install -hv_groupadd -g 14 usb && +hv_groupadd -g 14 usb # Checking if string exists if ! grep "/proc/bus/usb" /etc/fstab 1> /dev/null 2>&1; then - echo "usbfs /proc/bus/usb usbfs ddevgid=14,devmode=0660 0 0" >> /etc/fstab || exit 1 -fi && + echo "usbfs /proc/bus/usb usbfs ddevgid=14,devmode=0660 0 0" >> /etc/fstab +fi ldconfig -# Return last error exit $? diff --git a/stage3/cis-ltsp b/stage3/cis-ltsp index 8574edb..30ed74c 100755 --- a/stage3/cis-ltsp +++ b/stage3/cis-ltsp @@ -1,4 +1,5 @@ #!/bin/sh +set -o errexit # Reading system configuration informations, functions and package versions. source ../sysinfos @@ -12,16 +13,16 @@ LTSP_SERVER="192.168.0.4" if [ -d /tftpboot ]; then if [ -d /srv/tftpboot ]; then - rm -v -rf /srv/tftpboot || exit 1 + rm -v -rf /srv/tftpboot fi - mv -v /tftpboot /srv/tftpboot || exit 1 + mv -v /tftpboot /srv/tftpboot fi -cd /srv/tftpboot/lts/${LTSP_KERNEL}/pxelinux.cfg && -ln -v -s -f default ${MAC_ADDRESS} && +cd /srv/tftpboot/lts/${LTSP_KERNEL}/pxelinux.cfg +ln -v -s -f default ${MAC_ADDRESS} -cat > ${LTSROOT}/etc/lts.conf << "EOF" && +cat > ${LTSROOT}/etc/lts.conf << "EOF" [Default] # Uncomment to use custom XF86Config: ### XF86CONFIG_FILE = /tmp/XF86Config.1 @@ -59,18 +60,18 @@ cat > ${LTSROOT}/etc/lts.conf << "EOF" && SOUND_DAEMON = esd EOF -sed -i -e "s!_LTSP_SERVER_!${LTSP_SERVER}!g" ${LTSROOT}/etc/lts.conf && +sed -i -e "s!_LTSP_SERVER_!${LTSP_SERVER}!g" ${LTSROOT}/etc/lts.conf # LTSP-4.2 update 4: The "-public" option is absolutely necessary... sed -i -e "s!\( */bin/esd -nobeeps -tcp -port 16001\)\( -as 1 &\)!\1 -public\2!g" \ - ${LTSROOT}/etc/rc.sound && + ${LTSROOT}/etc/rc.sound -string_add "${LTSROOT} 192.168.0.0/24(rw,sync,no_root_squash)" /etc/exports && +string_add "${LTSROOT} 192.168.0.0/24(rw,sync,no_root_squash)" /etc/exports -string_add "option root-path \"${LTSP_SERVER}:${LTSROOT}\";" /etc/dhcpd.conf && +string_add "option root-path \"${LTSP_SERVER}:${LTSROOT}\";" /etc/dhcpd.conf # no spaces but tabs to separate items. -sed -i -e "s!^#\*\(.*#any host.*\)!\*\1!g" /etc/X11/xdm/Xaccess && +sed -i -e "s!^#\*\(.*#any host.*\)!\*\1!g" /etc/X11/xdm/Xaccess # By default this line is set, so that it is not listening to XDMCP connection. # This is for security reasons. diff --git a/stage3/cis-ltsp-utils b/stage3/cis-ltsp-utils index cd7a89f..b5e6381 100755 --- a/stage3/cis-ltsp-utils +++ b/stage3/cis-ltsp-utils @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Reading system configuration informations, functions and package versions. @@ -7,10 +9,9 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/ltsp-utils && +cd ${LFS_TMP}/ltsp-utils ./install.sh -# Return last error exit $? diff --git a/stage3/cis-mailman b/stage3/cis-mailman index 16ce27a..3d10711 100755 --- a/stage3/cis-mailman +++ b/stage3/cis-mailman @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -6,58 +8,56 @@ source ../sysinfos source ../functions source ../packages-list -CUR_DIR=$(pwd) - # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} MMPREFIX="/usr/lib/mailman" -hv_groupadd mailman && -hv_useradd -c "GNU-Mailman" -d ${MMPREFIX} -g mailman -s /bin/false mailman && +hv_groupadd mailman +hv_useradd -c "GNU-Mailman" -d ${MMPREFIX} -g mailman -s /bin/false mailman # Creating installation directory with correct permissions and ownerships. -install --owner=mailman --group=mailman --mode=02775 -d ${MMPREFIX} && +install --owner=mailman --group=mailman --mode=02775 -d ${MMPREFIX} # Problems when using a separate build directory -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} ../${1}/configure \ --prefix=${MMPREFIX} \ --with-cgi-gid=${APACHE_USER} \ --with-mail-gid=${SENDMAIL_GID} \ - --sysconfdir=/etc && -make && -make install && + --sysconfdir=/etc +make +make install # Checking installation directory permissions -${MMPREFIX}/bin/check_perms -f && +${MMPREFIX}/bin/check_perms -f # Configure the web server to enable CGI script permission in the $prefix/cgi-bin # to run CGI scripts. string_add "ScriptAlias /mailman/ ${MMPREFIX}/cgi-bin/" /etc/apache/httpd.conf # Creating directory for mailman icons with correct permissions and ownerships. -install --owner=mailman --group=mailman --mode=2775 -d /srv/www/icons/mailman && +install --owner=mailman --group=mailman --mode=2775 -d /srv/www/icons/mailman # Copy the Mailman, Python, and GNU logos to a location accessible to the web server. -cp ${MMPREFIX}/icons/*.{jpg,png} /srv/www/icons/mailman && +cp ${MMPREFIX}/icons/*.{jpg,png} /srv/www/icons/mailman # Specify location of icons directory in mailman configuration file. -string_add "IMAGE_LOGOS = '/icons/mailman/'" ${MMPREFIX}/Mailman/mm_cfg.py && +string_add "IMAGE_LOGOS = '/icons/mailman/'" ${MMPREFIX}/Mailman/mm_cfg.py # Addition to /etc/apache/httpd.conf # First, checking if section exists if ! grep "/pipermail/" /etc/apache/httpd.conf 1> /dev/null 2>&1; then - echo "Alias /pipermail/ ${MMPREFIX}/archives/public/" >> /etc/apache/httpd.conf && - echo "" >> /etc/apache/httpd.conf && - echo " Options FollowSymLinks" >> /etc/apache/httpd.conf && - echo " AllowOverride None" >> /etc/apache/httpd.conf && - echo " AddDefaultCharset Off" >> /etc/apache/httpd.conf && - echo "" >> /etc/apache/httpd.conf || exit 1 -fi && + echo "Alias /pipermail/ ${MMPREFIX}/archives/public/" >> /etc/apache/httpd.conf + echo "" >> /etc/apache/httpd.conf + echo " Options FollowSymLinks" >> /etc/apache/httpd.conf + echo " AllowOverride None" >> /etc/apache/httpd.conf + echo " AddDefaultCharset Off" >> /etc/apache/httpd.conf + echo "" >> /etc/apache/httpd.conf +fi # Setting default password -/usr/lib/mailman/bin/mmsitepass mailman && +/usr/lib/mailman/bin/mmsitepass mailman # Adding cron entries -cat > /etc/fcron/mailman.crontab << "EOF" && +cat > /etc/fcron/mailman.crontab << "EOF" # # !mailto(postmaster) # @@ -90,29 +90,28 @@ SHELL = /bin/sh # GZIP_ARCHIVE_TXT_FILES is false in mm_cfg.py #27 3 * * * /usr/bin/python -S _MMPREFIX_/cron/nightly_gzip EOF -sed -i -e "s!_MMPREFIX_!${MMPREFIX}!g" /etc/fcron/mailman.crontab && +sed -i -e "s!_MMPREFIX_!${MMPREFIX}!g" /etc/fcron/mailman.crontab string_add "fcrontab -u mailman -c /etc/fcron/fcron.conf /etc/fcron/mailman.crontab" \ - /etc/fcron/configure && + /etc/fcron/configure # Reloading cron configuration -/etc/fcron/configure && +/etc/fcron/configure # Bootscript -install -v -m740 ${CUR_DIR}/bootscripts/mailman /etc/rc.d/init.d && +install -v -m740 ${SCRDIR}/bootscripts/mailman /etc/rc.d/init.d # script-name start stop -bootscript_add_rc3 mailman 75 15 && +bootscript_add_rc3 mailman 75 15 # URL -string_add "DEFAULT_EMAIL_HOST = '_DOMAIN_'" ${MMPREFIX}/Mailman/mm_cfg.py && -string_add "DEFAULT_URL_HOST = 'www._DOMAIN_'" ${MMPREFIX}/Mailman/mm_cfg.py || exit 1 +string_add "DEFAULT_EMAIL_HOST = '_DOMAIN_'" ${MMPREFIX}/Mailman/mm_cfg.py +string_add "DEFAULT_URL_HOST = 'www._DOMAIN_'" ${MMPREFIX}/Mailman/mm_cfg.py if test -n ${HTTPD_PORT}; then - string_add "DEFAULT_URL_PATTERN = 'http://%s:_DOMAIN_/mailman'" ${MMPREFIX}/Mailman/mm_cfg.py && - string_add "PUBLIC_ARCHIVE_URL = 'http://%(hostname)s:_HTTPD_PORT_/pipermail/%(listname)s'" ${MMPREFIX}/Mailman/mm_cfg.py || exit 1 + string_add "DEFAULT_URL_PATTERN = 'http://%s:_DOMAIN_/mailman'" ${MMPREFIX}/Mailman/mm_cfg.py + string_add "PUBLIC_ARCHIVE_URL = 'http://%(hostname)s:_HTTPD_PORT_/pipermail/%(listname)s'" ${MMPREFIX}/Mailman/mm_cfg.py fi string_add "add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)" \ - ${MMPREFIX}/Mailman/mm_cfg.py && -sed -i -e "s!_HTTPD_PORT_!${HTTPD_PORT}!g" ${MMPREFIX}/Mailman/mm_cfg.py && + ${MMPREFIX}/Mailman/mm_cfg.py +sed -i -e "s!_HTTPD_PORT_!${HTTPD_PORT}!g" ${MMPREFIX}/Mailman/mm_cfg.py sed -i -e "s!_DOMAIN_!${DOMAIN}!g" ${MMPREFIX}/Mailman/mm_cfg.py -# Return last error exit $? diff --git a/stage3/cis-milter-greylist b/stage3/cis-milter-greylist index 836fcdc..4bc471a 100755 --- a/stage3/cis-milter-greylist +++ b/stage3/cis-milter-greylist @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Reading system configuration informations, functions and package versions. @@ -6,18 +8,16 @@ source ../sysinfos source ../functions source ../packages-list -CUR_DIR=$(pwd) - # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} ./configure \ --prefix=/usr \ --sysconfdir=/etc \ - --localstatedir=/var/run && -make && -make install && + --localstatedir=/var/run +make +make install # Configuration file cat > /etc/mail/greylist.conf << EOF @@ -124,12 +124,11 @@ acl whitelist default EOF # Bootscript -install -v -m740 ${CUR_DIR}/bootscripts/milter-greylist /etc/rc.d/init.d && +install -v -m740 ${SCRDIR}/bootscripts/milter-greylist /etc/rc.d/init.d # script-name start stop -bootscript_add_rc3 milter-greylist 57 33 && +bootscript_add_rc3 milter-greylist 57 33 ldconfig -# Return last error exit $? diff --git a/stage3/cis-milter-spf b/stage3/cis-milter-spf index 7f9ff44..4ff7ac3 100755 --- a/stage3/cis-milter-spf +++ b/stage3/cis-milter-spf @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Reading system configuration informations, functions and package versions. @@ -6,21 +8,18 @@ source ../sysinfos source ../functions source ../packages-list -CUR_DIR=$(pwd) - # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && -make && +cd ${LFS_TMP}/${1} +make make PREFIX=/usr install # Bootscript -install -v -m740 ${CUR_DIR}/bootscripts/milter-spf /etc/rc.d/init.d && +install -v -m740 ${SCRDIR}/bootscripts/milter-spf /etc/rc.d/init.d # script-name start stop bootscript_add_rc3 milter-spf 56 34 -# Return last error exit $? diff --git a/stage3/cis-mysql b/stage3/cis-mysql index f89ac65..2cc93ce 100755 --- a/stage3/cis-mysql +++ b/stage3/cis-mysql @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -6,15 +8,13 @@ source ../sysinfos source ../functions source ../packages-list -CUR_DIR=$(pwd) - # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -hv_groupadd mysql && -hv_useradd -c mysql -d /dev/null -g mysql -s /bin/false mysql && +hv_groupadd mysql +hv_useradd -c mysql -d /dev/null -g mysql -s /bin/false mysql -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} CPPFLAGS="-D_GNU_SOURCE" ./configure \ --prefix=/usr \ --sysconfdir=/etc \ @@ -27,32 +27,31 @@ CPPFLAGS="-D_GNU_SOURCE" ./configure \ --with-unix-socket-path=/var/run/mysql/mysql.sock \ --without-debug \ --without-bench \ - --without-readline && -make testdir=/usr/lib/mysql/mysql-test && -make testdir=/usr/lib/mysql/mysql-test install && -cd /usr/lib && -ln -sf mysql/libmysqlclient{,_r}.so* . && + --without-readline +make testdir=/usr/lib/mysql/mysql-test +make testdir=/usr/lib/mysql/mysql-test install +cd /usr/lib +ln -sf mysql/libmysqlclient{,_r}.so* . # Copying default configuration file. -cp /usr/share/mysql/my-medium.cnf /etc/my.cnf && +cp /usr/share/mysql/my-medium.cnf /etc/my.cnf -mysql_install_db --user=mysql && -chgrp mysql /srv/mysql{,/test,/mysql} && +mysql_install_db --user=mysql +chgrp mysql /srv/mysql{,/test,/mysql} -install -m750 -o mysql -g mysql -d /var/run/mysql && +install -m750 -o mysql -g mysql -d /var/run/mysql # Further configuration requires that the MySQL server be running (see cis-postinstall) # Bootscript -install -v -m740 ${CUR_DIR}/bootscripts/mysql /etc/rc.d/init.d && +install -v -m740 ${SCRDIR}/bootscripts/mysql /etc/rc.d/init.d # script-name start stop -bootscript_add_rc3 mysql 45 45 && +bootscript_add_rc3 mysql 45 45 # Addition to /etc/ld.so.conf -string_add "/usr/lib/mysql" /etc/ld.so.conf && +string_add "/usr/lib/mysql" /etc/ld.so.conf ldconfig -# Return last error exit $? diff --git a/stage3/cis-nss b/stage3/cis-nss index 5dea3fe..41f8a9c 100755 --- a/stage3/cis-nss +++ b/stage3/cis-nss @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Reading system configuration informations, functions and package versions. @@ -7,33 +9,33 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} # Define to 1 to test this package. RUN_TESTS=0 -cd ${LFS_TMP}/${1} && -export WORKINGDIR=${PWD} && +cd ${LFS_TMP}/${1} +export WORKINGDIR=${PWD} # Non-debug optimized build -export BUILD_OPT=1 && +export BUILD_OPT=1 -cd mozilla/security/nss && -make nss_build_all && +cd mozilla/security/nss +make nss_build_all -cd ../.. && +cd ../.. -export NSS_LINUXDIR=$(basename `ls -d $WORKINGDIR/mozilla/dist/Linux*`) || exit 1 +export NSS_LINUXDIR=$(basename `ls -d $WORKINGDIR/mozilla/dist/Linux*`) if [ ${RUN_TESTS} -eq 1 ]; then # Running tests - export DOMSUF="${DOMAIN}" && - export PATH=$PATH:$WORKINGDIR/mozilla/dist/$NSS_LINUXDIR/bin && - export TEST_RESULTSDIR=$WORKINGDIR/mozilla/tests_results/security && - cd security/nss/tests && - sed -i 's/gmake/make/' common/init.sh && - ./all.sh && - TEST_RESULTS=$(grep Passed $TEST_RESULTSDIR/$(hostname --short).1/results.html | wc -l) || exit 1 + export DOMSUF="${DOMAIN}" + export PATH=$PATH:$WORKINGDIR/mozilla/dist/$NSS_LINUXDIR/bin + export TEST_RESULTSDIR=$WORKINGDIR/mozilla/tests_results/security + cd security/nss/tests + sed -i 's/gmake/make/' common/init.sh + ./all.sh + TEST_RESULTS=$(grep Passed $TEST_RESULTSDIR/$(hostname --short).1/results.html | wc -l) if [ ${TEST_RESULTS} -ne 770 ]; then echo "Number of tests that passed: ${TEST_RESULTS}" echo "Number of tests expected to pass: 770" @@ -41,22 +43,21 @@ if [ ${RUN_TESTS} -eq 1 ]; then fi fi -cd ${LFS_TMP}/${1}/mozilla && -install -v -m755 nsprpub/$NSS_LINUXDIR/config/nspr-config /usr/bin && -#install -v -m755 -d /usr/lib/pkgconfig && +cd ${LFS_TMP}/${1}/mozilla +install -v -m755 nsprpub/$NSS_LINUXDIR/config/nspr-config /usr/bin +#install -v -m755 -d /usr/lib/pkgconfig #install -v -m644 nsprpub/lib/pkgconfig/nspr.pc \ # security/nss/lib/pkgconfig/nss.pc \ -# /usr/lib/pkgconfig && +# /usr/lib/pkgconfig -cd dist && -install -v -m755 $NSS_LINUXDIR/lib/*.so /usr/lib && -install -v -m644 $NSS_LINUXDIR/lib/{*.chk,libcrmf.a} /usr/lib && -install -v -m755 -d /usr/include/{nss,nspr} && -install -v -m644 {public,private}/nss/* /usr/include/nss && -cp -v -RL $NSS_LINUXDIR/include/* /usr/include/nspr && -chmod -v 644 /usr/include/nspr/prvrsion.h && +cd dist +install -v -m755 $NSS_LINUXDIR/lib/*.so /usr/lib +install -v -m644 $NSS_LINUXDIR/lib/{*.chk,libcrmf.a} /usr/lib +install -v -m755 -d /usr/include/{nss,nspr} +install -v -m644 {public,private}/nss/* /usr/include/nss +cp -v -RL $NSS_LINUXDIR/include/* /usr/include/nspr +chmod -v 644 /usr/include/nspr/prvrsion.h ldconfig -# Return last error exit $? diff --git a/stage3/cis-openjade b/stage3/cis-openjade index b56c9e5..da5b36d 100755 --- a/stage3/cis-openjade +++ b/stage3/cis-openjade @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,34 +9,33 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} ./configure \ --prefix=/usr \ --enable-http \ --disable-static \ --enable-default-catalog=/etc/sgml/catalog \ --enable-default-search-path=/usr/share/sgml \ - --datadir=/usr/share/sgml/${1} && -make && -make install && -ln -sf openjade /usr/bin/jade && -ln -sf libogrove.so /usr/lib/libgrove.so && -ln -sf libospgrove.so /usr/lib/libspgrove.so && -ln -sf libostyle.so /usr/lib/libstyle.so && -install -m644 dsssl/catalog /usr/share/sgml/${1}/ && -install -m644 dsssl/*.{dtd,dsl,sgm} /usr/share/sgml/${1} && + --datadir=/usr/share/sgml/${1} +make +make install +ln -sf openjade /usr/bin/jade +ln -sf libogrove.so /usr/lib/libgrove.so +ln -sf libospgrove.so /usr/lib/libspgrove.so +ln -sf libostyle.so /usr/lib/libstyle.so +install -m644 dsssl/catalog /usr/share/sgml/${1}/ +install -m644 dsssl/*.{dtd,dsl,sgm} /usr/share/sgml/${1} install-catalog --add /etc/sgml/${1}.cat \ - /usr/share/sgml/${1}/catalog && + /usr/share/sgml/${1}/catalog install-catalog --add /etc/sgml/sgml-docbook.cat \ - /etc/sgml/${1}.cat && + /etc/sgml/${1}.cat -var_add_path "SGML_BASE_DIR" /etc/profile "/usr/share/sgml" && -var_export "SGML_BASE_DIR" /etc/profile && +var_add_path "SGML_BASE_DIR" /etc/profile "/usr/share/sgml" +var_export "SGML_BASE_DIR" /etc/profile -var_add_path "SGML_CATALOGS_DIR" /etc/profile "/etc/sgml" && +var_add_path "SGML_CATALOGS_DIR" /etc/profile "/etc/sgml" var_export "SGML_CATALOGS_DIR" /etc/profile -# Return last error exit $? diff --git a/stage3/cis-openldap b/stage3/cis-openldap index cea38da..eebb006 100755 --- a/stage3/cis-openldap +++ b/stage3/cis-openldap @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Reading system configuration informations, functions and package versions. @@ -6,12 +8,10 @@ source ../sysinfos source ../functions source ../packages-list -CUR_DIR=$(pwd) - # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1}-build && +cd ${LFS_TMP}/${1}-build ../${1}/configure \ --prefix=/usr \ --libexecdir=/usr/sbin \ @@ -23,19 +23,19 @@ cd ${LFS_TMP}/${1}-build && --enable-modules \ --enable-rlookups \ --enable-backends \ - --enable-overlays && -make depend && -make && -make install && + --enable-overlays +make depend +make +make install for LINK in lber ldap ldap_r; do chmod -v 0755 /usr/lib/$(readlink /usr/lib/lib${LINK}.so) -done && +done -cd ${LFS_TMP}/${1} && -install -v -m755 -d /usr/share/doc/${1}/{drafts,guide,rfc} && -install -v -m644 doc/drafts/* /usr/share/doc/${1}/drafts && -install -v -m644 doc/rfc/* /usr/share/doc/${1}/rfc && +cd ${LFS_TMP}/${1} +install -v -m755 -d /usr/share/doc/${1}/{drafts,guide,rfc} +install -v -m644 doc/drafts/* /usr/share/doc/${1}/drafts +install -v -m644 doc/rfc/* /usr/share/doc/${1}/rfc cp -v -R doc/guide/* /usr/share/doc/${1}/guide # Only the slapd daemon is needed. @@ -43,10 +43,9 @@ cp -v -R doc/guide/* /usr/share/doc/${1}/guide # cooperate in a hierarchy, much like DNS servers. # Bootscript -install -v -m740 ${CUR_DIR}/bootscripts/openldap /etc/rc.d/init.d && +install -v -m740 ${SCRDIR}/bootscripts/openldap /etc/rc.d/init.d # script-name start stop bootscript_add_rc3 openldap 60 30 -# Return last error exit $? diff --git a/stage3/cis-opensp b/stage3/cis-opensp index 9860a5e..336b0d3 100755 --- a/stage3/cis-opensp +++ b/stage3/cis-opensp @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -19,37 +21,36 @@ if [ $? -eq 0 ]; then fi # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} # These seds prevent some annoying messages that may otherwise appear while running openjade. -sed -i 's:32,:253,:' lib/Syntax.cxx && +sed -i 's:32,:253,:' lib/Syntax.cxx sed -i 's:LITLEN 240 :LITLEN 8092:' \ - unicode/{gensyntax.pl,unicode.syn} && + unicode/{gensyntax.pl,unicode.syn} ./configure \ --prefix=/usr \ --disable-static \ --disable-doc-build \ --enable-http \ --enable-default-catalog=/etc/sgml/catalog \ - --enable-default-search-path=/usr/share/sgml && -make pkgdatadir=/usr/share/sgml/${1} && -make pkgdatadir=/usr/share/sgml/${1} install && -ln -sf onsgmls /usr/bin/nsgmls && -ln -sf osgmlnorm /usr/bin/sgmlnorm && -ln -sf ospam /usr/bin/spam && -ln -sf ospcat /usr/bin/spcat && -ln -sf ospent /usr/bin/spent && -ln -sf osx /usr/bin/sx && -ln -sf osx /usr/bin/sgml2xml && + --enable-default-search-path=/usr/share/sgml +make pkgdatadir=/usr/share/sgml/${1} +make pkgdatadir=/usr/share/sgml/${1} install +ln -sf onsgmls /usr/bin/nsgmls +ln -sf osgmlnorm /usr/bin/sgmlnorm +ln -sf ospam /usr/bin/spam +ln -sf ospcat /usr/bin/spcat +ln -sf ospent /usr/bin/spent +ln -sf osx /usr/bin/sx +ln -sf osx /usr/bin/sgml2xml ln -sf libosp.so /usr/lib/libsp.so #install-catalog --add /etc/sgml/${1}.cat \ -# /usr/share/sgml/${1}/catalog && +# /usr/share/sgml/${1}/catalog #install-catalog --add /etc/sgml/sgml-docbook.cat \ # /etc/sgml/${1}.cat -# Return last error exit $? diff --git a/stage3/cis-opera b/stage3/cis-opera deleted file mode 100755 index d18e4dc..0000000 --- a/stage3/cis-opera +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# First argument of this script is the package name - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -# Applying patches (if any) -apply_patches ${1} && - -cd ${LFS_TMP}/${1} && -echo "y" | ./install.sh && - -# Installing French language file -decompress_package ${OPERA_LANG_FR} /usr/share/opera/locale - -# Return last error -exit $? diff --git a/stage3/cis-php b/stage3/cis-php index c72c2a1..2ff7172 100755 --- a/stage3/cis-php +++ b/stage3/cis-php @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,11 +9,10 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && - -cd ${LFS_TMP}/${1} && -sed -i 's/const char \*errpfx,/const DB_ENV *dbenv, & const/' ext/dba/dba_db4.c && +apply_patches ${1} +cd ${LFS_TMP}/${1} +sed -i 's/const char \*errpfx,/const DB_ENV *dbenv, & const/' 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). @@ -44,24 +45,23 @@ sed -i 's/const char \*errpfx,/const DB_ENV *dbenv, & const/' ext/dba/dba_db4.c --with-ldap \ --with-mysql=/usr \ --with-imap=/usr/lib/uw-imap \ - --with-imap-ssl=/usr/include/openssl && -make && -make install || exit 1 + --with-imap-ssl=/usr/include/openssl +make +make install if [ -f /etc/php.ini ]; then - cp /etc/php.ini /etc/php.ini.old || exit 1 + cp /etc/php.ini /etc/php.ini.old fi -cp ../${1}/php.ini-dist /etc/php.ini || exit 1 +cp ../${1}/php.ini-dist /etc/php.ini # To enable PHP support in the Apache web server, a new AddType directive # must be added to the httpd.conf file. if ! grep "application/x-httpd-php" /etc/apache/httpd.conf 1> /dev/null 2>&1; then - echo "AddType application/x-httpd-php .php" >> /etc/apache/httpd.conf || exit 1 + echo "AddType application/x-httpd-php .php" >> /etc/apache/httpd.conf fi if ! grep "DirectoryIndex" /etc/apache/httpd.conf | grep "index.php" 1> /dev/null 2>&1; then - sed -i -e "s!\(^DirectoryIndex index.html.*\)!\1 index.php!g" /etc/apache/httpd.conf || exit 1 + sed -i -e "s!\(^DirectoryIndex index.html.*\)!\1 index.php!g" /etc/apache/httpd.conf fi -# Return last error exit $? diff --git a/stage3/cis-pm b/stage3/cis-pm index d01cafb..2d3a525 100755 --- a/stage3/cis-pm +++ b/stage3/cis-pm @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Reading system configuration informations, functions and package versions. @@ -7,15 +9,14 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} # The option "-n" is used to avoid having to answer a question and accept the # default configuration. -perl Makefile.PL -n && -make && -make install && +perl Makefile.PL -n +make +make install ldconfig -# Return last error exit $? diff --git a/stage3/cis-pm-net-dns b/stage3/cis-pm-net-dns index 7a76741..d9a6f57 100755 --- a/stage3/cis-pm-net-dns +++ b/stage3/cis-pm-net-dns @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Reading system configuration informations, functions and package versions. @@ -7,15 +9,14 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} # The option "-n" is used to avoid having to answer a question and accept the # default configuration. -perl Makefile.PL -n --no-online-tests && -make && -make install && +perl Makefile.PL -n --no-online-tests +make +make install ldconfig -# Return last error exit $? diff --git a/stage3/cis-polkit b/stage3/cis-polkit index 43d544b..e3fcbfc 100755 --- a/stage3/cis-polkit +++ b/stage3/cis-polkit @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -11,23 +13,22 @@ shift CONFIGURE_OPTS=${*} # Applying patches (if any) -apply_patches ${PACKAGE} && +apply_patches ${PACKAGE} # It is a requirement to have a dedicated user and group for polkit to function # correctly: -hv_groupadd -fg 27 polkituser && +hv_groupadd -fg 27 polkituser hv_useradd -c Policy-Kit-Daemon-User -d /dev/null -u 27 \ - -g polkituser -s /bin/false polkituser && + -g polkituser -s /bin/false polkituser -cd ${LFS_TMP}/${PACKAGE}-build && +cd ${LFS_TMP}/${PACKAGE}-build ../${PACKAGE}/configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ - ${CONFIGURE_OPTS} && -make && -make install && + ${CONFIGURE_OPTS} +make +make install ldconfig -# Return last error exit $? diff --git a/stage3/cis-procmail b/stage3/cis-procmail index 0ec58b8..7e72d39 100755 --- a/stage3/cis-procmail +++ b/stage3/cis-procmail @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,16 +9,16 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} make \ BASENAME=/usr \ LOCKINGTEST=/tmp \ - install && -make install-suid && + install +make install-suid -cat > /etc/procmailrc << "EOF" && +cat > /etc/procmailrc << "EOF" # /etc/procmailrc # SHELL=/bin/sh @@ -78,9 +80,8 @@ spam ${DEFAULT} EOF -DOMAIN1=$(echo ${DOMAIN} | sed "s!\(.*\)\.\(.*\)!\1!") && -DOMAIN2=$(echo ${DOMAIN} | sed "s!\(.*\)\.\(.*\)!\2!") && +DOMAIN1=$(echo ${DOMAIN} | sed "s!\(.*\)\.\(.*\)!\1!") +DOMAIN2=$(echo ${DOMAIN} | sed "s!\(.*\)\.\(.*\)!\2!") sed -i -e "s!_DOMAIN_!${DOMAIN1}\\\.${DOMAIN2}!g" /etc/procmailrc -# Return last error exit $? diff --git a/stage3/cis-pulseaudio b/stage3/cis-pulseaudio index ddf5539..7767ed2 100755 --- a/stage3/cis-pulseaudio +++ b/stage3/cis-pulseaudio @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -6,34 +8,32 @@ source ../sysinfos source ../functions source ../packages-list -CUR_DIR=$(pwd) - # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -hv_groupadd pulse && -hv_groupadd pulse-access && -hv_useradd -g pulse -d /var/run/pulse pulse && +hv_groupadd pulse +hv_groupadd pulse-access +hv_useradd -g pulse -d /var/run/pulse pulse gpasswd -a hugo pulse-access # Il faut ajouter l'usager pulse au groupe audio. gpasswd -a pulse audio -cd ${LFS_TMP}/${1}-build && +cd ${LFS_TMP}/${1}-build ../${1}/configure \ --prefix=/usr \ --sysconfdir=/etc \ - --localstatedir=/var && + --localstatedir=/var # Workaround pour éliminer les messages de warning # reliés à SHM... -sed -i -e "s!\(#define HAVE_SHM_OPEN 1\)!/* \1 */!g" config.h && +sed -i -e "s!\(#define HAVE_SHM_OPEN 1\)!/* \1 */!g" config.h -make && -make install && -ldconfig && +make +make install +ldconfig -cat > /etc/pulse/daemon.conf << "EOF" && +cat > /etc/pulse/daemon.conf << "EOF" ## Extra verbositiy verbose = debug @@ -78,7 +78,7 @@ system-instance = 1 disable-shm = 1 EOF -cat > /etc/pulse/default.pa << "EOF" && +cat > /etc/pulse/default.pa << "EOF" #!/usr/bin/pulseaudio -nF # ---------------- @@ -109,10 +109,9 @@ load-module module-volume-restore load-module module-rescue-streams EOF -install -v -m740 ${CUR_DIR}/bootscripts/pulseaudio /etc/rc.d/init.d && +install -v -m740 ${SCRDIR}/bootscripts/pulseaudio /etc/rc.d/init.d # script-name start stop bootscript_add_rc3 pulseaudio 95 16 -# Return last error exit $? diff --git a/stage3/cis-qt b/stage3/cis-qt deleted file mode 100755 index 7257a5b..0000000 --- a/stage3/cis-qt +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh -# First argument of this script is the package name - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -QTVER=$(get_pkg_ver ${1}) - -# Applying patches (if any) -apply_patches ${1} && - -# You can edit the $QTDIR/mkspecs/linux-g++/qmake.conf file and then -# configure/build qt and it will use those settings -cd ${LFS_TMP}/${1} && -export QTDIR=${PWD} && -export LD_LIBRARY_PATH=${PWD}/lib:${LD_LIBRARY_PATH} && -export PATH=${PWD}/bin:${PATH} && -# The "yes" input is needed to accept the license. */ -echo "yes" | ./configure \ - -prefix /opt/qt-${QTVER} \ - -sysconfdir /etc/qt \ - -qt-gif \ - -system-zlib \ - -system-libpng \ - -system-libjpeg \ - -system-libmng \ - -plugin-imgfmt-png \ - -plugin-imgfmt-jpeg \ - -plugin-imgfmt-mng \ - -no-exceptions \ - -thread \ - -tablet && -make sub-tools && -make install && -ln -v -sfn qt-${QTVER} /opt/qt && -ln -v -s libqt-mt.so /opt/qt/lib/libqt.so && -cp -v -r doc/man /opt/qt/doc && -cp -v -r examples /opt/qt/doc && - -string_add "/opt/qt/lib" /etc/ld.so.conf && -ldconfig && - -var_add_path QTDIR /etc/profile "/opt/qt" && -var_export QTDIR /etc/profile && - -var_add_path MANPATH /etc/profile "/opt/qt/doc/man" && -var_export MANPATH /etc/profile && - -var_add_path PKG_CONFIG_PATH /etc/profile "/opt/qt/lib/pkgconfig" && -var_export PKG_CONFIG_PATH /etc/profile && - -# Enlèvement de la documentation pour sauver 40M. -cd /opt/qt/doc && -rm -rf exemples html - -# Return last error -exit $? diff --git a/stage3/cis-samba b/stage3/cis-samba index 70dd737..24ab9e9 100755 --- a/stage3/cis-samba +++ b/stage3/cis-samba @@ -8,8 +8,6 @@ source ../sysinfos source ../functions source ../packages-list -CUR_DIR=$(pwd) - # Applying patches (if any) apply_patches ${1} @@ -52,7 +50,7 @@ string_add "swat_tunnel 902/tcp" /etc/services string_add "swat stream tcp nowait.400 root /usr/sbin/swat swat" /etc/inetd.conf # Bootscript -install -v -m740 ${CUR_DIR}/bootscripts/samba /etc/rc.d/init.d +install -v -m740 ${SCRDIR}/bootscripts/samba /etc/rc.d/init.d # script-name start stop bootscript_add_rc3 samba 85 10 diff --git a/stage3/cis-sasl2 b/stage3/cis-sasl2 index 9b743d6..abda5e6 100755 --- a/stage3/cis-sasl2 +++ b/stage3/cis-sasl2 @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -6,46 +8,43 @@ source ../sysinfos source ../functions source ../packages-list -CUR_DIR=$(pwd) - # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} # Fixes an issue when compiling Cyrus SASL with GCC-4: -sed -i '/sasl_global/s/^static //' lib/client.c && +sed -i '/sasl_global/s/^static //' lib/client.c # Puts the saslauthd man page in a more standard location: -sed -i 's/cat8/man8/' saslauthd/Makefile.in && +sed -i 's/cat8/man8/' saslauthd/Makefile.in -cd ${LFS_TMP}/${1}-build && +cd ${LFS_TMP}/${1}-build ../${1}/configure \ --prefix=/usr \ --sysconfdir=/etc \ --with-dbpath=/var/lib/sasl/sasldb2 \ - --with-saslauthd=/var/run && -make && -make install && + --with-saslauthd=/var/run +make +make install -cd ${LFS_TMP}/${1} && -install -v -m755 -d /usr/share/doc/${1} && +cd ${LFS_TMP}/${1} +install -v -m755 -d /usr/share/doc/${1} install -v -m644 doc/{*.{html,txt,fig},ONEWS,TODO} \ - saslauthd/LDAP_SASLAUTHD /usr/share/doc/${1} && -install -v -m700 -d /var/lib/sasl && + saslauthd/LDAP_SASLAUTHD /usr/share/doc/${1} +install -v -m700 -d /var/lib/sasl # Creating SASL configuration file for Sendmail: -cat > /usr/lib/sasl2/Sendmail.conf << "EOF" && +cat > /usr/lib/sasl2/Sendmail.conf << "EOF" pwcheck_method:saslauthd EOF -ldconfig && +ldconfig # Bootscript -install -v -m740 ${CUR_DIR}/bootscripts/saslauthd /etc/rc.d/init.d && +install -v -m740 ${SCRDIR}/bootscripts/saslauthd /etc/rc.d/init.d # script-name start stop bootscript_add_rc3 saslauthd 50 40 -# Return last error exit $? diff --git a/stage3/cis-sendmail b/stage3/cis-sendmail index e4089e4..5f8c206 100755 --- a/stage3/cis-sendmail +++ b/stage3/cis-sendmail @@ -8,8 +8,6 @@ source ../sysinfos source ../functions source ../packages-list -CUR_DIR=$(pwd) - # Applying patches (if any) apply_patches ${1} @@ -38,7 +36,7 @@ APPENDDEF(`conf_sendmail_ENVDEF', `-DMILTER') EOF # Configuration file for SASL2 - echo "pwcheck_method: saslauthd" /usr/lib/sasl2/Sendmail.conf || exit 1 + echo "pwcheck_method: saslauthd" /usr/lib/sasl2/Sendmail.conf fi cd sendmail @@ -202,7 +200,7 @@ EOF chmod 740 /etc/mail/configure # Bootscript - install -v -m740 ${CUR_DIR}/bootscripts/sendmail /etc/rc.d/init.d + install -v -m740 ${SCRDIR}/bootscripts/sendmail /etc/rc.d/init.d # script-name start stop bootscript_add_rc3 sendmail 65 25 @@ -247,7 +245,7 @@ EOF sed -i -e "s!_DOMAIN_!${DOMAIN}!g" /usr/local/bin/mail-if-fail chmod 755 /usr/local/bin/mail-if-fail - cp ${CUR_DIR}/resources/mail-files.sh /usr/local/bin + cp ${SCRDIR}/resources/mail-files.sh /usr/local/bin chmod 755 /usr/local/bin/mail-files.sh # Executing configure script. diff --git a/stage3/cis-sgml-common b/stage3/cis-sgml-common index e0c5695..955d25d 100755 --- a/stage3/cis-sgml-common +++ b/stage3/cis-sgml-common @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -19,23 +21,22 @@ if [ $? -eq 0 ]; then fi # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} # Autotools used with this package are very old, so we regenerate the autotools files. -aclocal && -automake -acf && -autoconf && +aclocal +automake -acf +autoconf ./configure \ --prefix=/usr \ --sysconfdir=/etc \ - --mandir=/usr/share/man && -make && -make install && + --mandir=/usr/share/man +make +make install install-catalog --add /etc/sgml/sgml-ent.cat \ - /usr/share/sgml/sgml-iso-entities-8879.1986/catalog && + /usr/share/sgml/sgml-iso-entities-8879.1986/catalog install-catalog --add /etc/sgml/sgml-docbook.cat \ /etc/sgml/sgml-ent.cat -# Return last error exit $? diff --git a/stage3/cis-sgml-dtd3 b/stage3/cis-sgml-dtd3 index ebbcce2..7a5c2a6 100755 --- a/stage3/cis-sgml-dtd3 +++ b/stage3/cis-sgml-dtd3 @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,20 +9,20 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} sed -i -e '/ISO 8879/d' \ -e 's|DTDDECL "-//OASIS//DTD DocBook V3.1//EN"|SGMLDECL|g' \ - docbook.cat && -install -d /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD3_VER} && -chown -R root:root . && -install docbook.cat /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD3_VER}/catalog && -cp -af *.dtd *.mod *.dcl /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD3_VER} && + docbook.cat +install -d /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD3_VER} +chown -R root:root . +install docbook.cat /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD3_VER}/catalog +cp -af *.dtd *.mod *.dcl /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD3_VER} install-catalog --add /etc/sgml/sgml-docbook-dtd-${SGML_DTD3_VER}.cat \ - /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD3_VER}/catalog && + /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD3_VER}/catalog install-catalog --add /etc/sgml/sgml-docbook-dtd-${SGML_DTD3_VER}.cat \ - /etc/sgml/sgml-docbook.cat && + /etc/sgml/sgml-docbook.cat # Using only the most current 3.x version of sgml-dtd requires the following: cat >> /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD3_VER}/catalog << "EOF" @@ -31,5 +33,4 @@ PUBLIC "-//Davenport//DTD DocBook V3.0//EN" "docbook.dtd" -- End Single Major Version catalog changes -- EOF -# Return last error exit $? diff --git a/stage3/cis-sgml-dtd4 b/stage3/cis-sgml-dtd4 index 3387993..192af58 100755 --- a/stage3/cis-sgml-dtd4 +++ b/stage3/cis-sgml-dtd4 @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,19 +9,19 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} sed -i -e '/ISO 8879/d' \ - -e '/gml/d' docbook.cat && -install -d /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD4_VER} && -chown -R root:root . && -install docbook.cat /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD4_VER}/catalog && -cp -af *.dtd *.mod *.dcl /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD4_VER} && + -e '/gml/d' docbook.cat +install -d /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD4_VER} +chown -R root:root . +install docbook.cat /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD4_VER}/catalog +cp -af *.dtd *.mod *.dcl /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD4_VER} install-catalog --add /etc/sgml/sgml-docbook-dtd-${SGML_DTD4_VER}.cat \ - /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD4_VER}/catalog && + /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD4_VER}/catalog install-catalog --add /etc/sgml/sgml-docbook-dtd-${SGML_DTD4_VER}.cat \ - /etc/sgml/sgml-docbook.cat && + /etc/sgml/sgml-docbook.cat # Using only the most current 4.x version of sgml-dtd requires the following: cat >> /usr/share/sgml/docbook/sgml-dtd-${SGML_DTD4_VER}/catalog << "EOF" @@ -33,5 +35,4 @@ PUBLIC "-//OASIS//DTD DocBook V4.0//EN" "docbook.dtd" -- End Single Major Version catalog changes -- EOF -# Return last error exit $? diff --git a/stage3/cis-sgml-spm b/stage3/cis-sgml-spm index ab0a8c1..6cee4af 100755 --- a/stage3/cis-sgml-spm +++ b/stage3/cis-sgml-spm @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Reading system configuration informations, functions and package versions. @@ -7,20 +9,19 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} sed -i -e "s@/usr/local/bin@/usr/bin@" \ -e "s@/usr/local/lib/perl5@/usr/lib/perl5/site_perl/$(get_pkg_ver ${PERL])@" \ -e "s@/usr/local/lib/www/docs@/usr/share/doc/perl5@" \ - Makefile && -make install && -install -m755 -d /usr/share/doc/perl5 && -make install_html && -rm -f /usr/share/doc/perl5/SGMLSpm/sample.pl && -install -m644 DOC/sample.pl /usr/share/doc/perl5/SGMLSpm && + Makefile +make install +install -m755 -d /usr/share/doc/perl5 +make install_html +rm -f /usr/share/doc/perl5/SGMLSpm/sample.pl +install -m644 DOC/sample.pl /usr/share/doc/perl5/SGMLSpm ldconfig -# Return last error exit $? diff --git a/stage3/cis-spamassassin b/stage3/cis-spamassassin index b0b5b6d..b833c0e 100755 --- a/stage3/cis-spamassassin +++ b/stage3/cis-spamassassin @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,17 +9,17 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} perl Makefile.PL -n \ CONTACT_ADDRESS="postmaster" \ ENABLE_SSL="no" \ - RUN_NET_TESTS="no" && -make && -make install && + RUN_NET_TESTS="no" +make +make install -cat > /usr/local/bin/hv-sa-learn << "EOF" && +cat > /usr/local/bin/hv-sa-learn << "EOF" #!/bin/sh SA_LEARN="/usr/bin/sa-learn" @@ -48,18 +50,17 @@ ${SA_LEARN} ${SA_LEARN_FLAGS} -C /etc/mail/spamassassin --ham /var/mail/ham || exit $? EOF -chmod 755 /usr/local/bin/hv-sa-learn && +chmod 755 /usr/local/bin/hv-sa-learn # Addition to /etc/fcron/fcrontab -string_add "# Run SpamAssassin sa-learn every hour + 25 minutes" /etc/fcron/fcrontab && +string_add "# Run SpamAssassin sa-learn every hour + 25 minutes" /etc/fcron/fcrontab string_add "&mail(false) 25 * * * * /usr/local/bin/mail-if-fail /usr/local/bin/hv-sa-learn" \ - /etc/fcron/fcrontab && + /etc/fcron/fcrontab # Add rule to procmailrc... # Put spamassassin databases in /srv -mkdir -v -p /srv/spamassassin && +mkdir -v -p /srv/spamassassin sed -i -e "s!^bayes_path.*!bayes_path /srv/spamassassin/bayes!g" /etc/mail/spamassassin/local.cf -# Return last error exit $? diff --git a/stage3/cis-splix b/stage3/cis-splix index bcddfab..e125018 100755 --- a/stage3/cis-splix +++ b/stage3/cis-splix @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Remaining arguments are additional configure options. @@ -17,12 +19,11 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${PACKAGE} && +apply_patches ${PACKAGE} -cd ${LFS_TMP}/${PACKAGE} && -make DISABLE_JBIG=1 && -make install && +cd ${LFS_TMP}/${PACKAGE} +make DISABLE_JBIG=1 +make install ldconfig -# Return last error exit $? diff --git a/stage3/cis-squirrelmail b/stage3/cis-squirrelmail index 31c5363..aa699e2 100755 --- a/stage3/cis-squirrelmail +++ b/stage3/cis-squirrelmail @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,21 +9,20 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -mv ${LFS_TMP}/${1} /srv/www/htdocs/squirrelmail && -chown -v -R ${APACHE_USER}:${APACHE_USER} /srv/www/htdocs/squirrelmail && +mv ${LFS_TMP}/${1} /srv/www/htdocs/squirrelmail +chown -v -R ${APACHE_USER}:${APACHE_USER} /srv/www/htdocs/squirrelmail -mkdir -v -p /srv/squirrelmail/{data,attach} && -chown -v -R ${APACHE_USER}:${APACHE_USER} /srv/squirrelmail && -chmod -v 0730 /srv/squirrelmail/attach && +mkdir -v -p /srv/squirrelmail/{data,attach} +chown -v -R ${APACHE_USER}:${APACHE_USER} /srv/squirrelmail +chmod -v 0730 /srv/squirrelmail/attach -cp /srv/www/htdocs/squirrelmail/config/config_default.php /srv/www/htdocs/squirrelmail/config/config.php && +cp /srv/www/htdocs/squirrelmail/config/config_default.php /srv/www/htdocs/squirrelmail/config/config.php sed -i -e "s!\(\$data_dir .* =\).*!\1 \'/srv/squirrelmail/data/\';!g" \ - /srv/www/htdocs/squirrelmail/config/config.php && + /srv/www/htdocs/squirrelmail/config/config.php sed -i -e "s!\(\$attachment_dir .* =\).*!\1 \'/srv/squirrelmail/attach/\';!g" \ /srv/www/htdocs/squirrelmail/config/config.php -# Return last error exit $? diff --git a/stage3/cis-subversion b/stage3/cis-subversion index 75d0f19..8a6e0aa 100755 --- a/stage3/cis-subversion +++ b/stage3/cis-subversion @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,28 +9,27 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1}-build && +cd ${LFS_TMP}/${1}-build ../${1}/configure \ --prefix=/usr \ --with-apxs=/usr/sbin/apxs \ - --without-berkeley-db && -make && -make install && + --without-berkeley-db +make +make install -cd ${LFS_TMP}/${1} && -rm doc/doxygen.conf && -find doc -type d -exec chmod 755 {} \; && -find doc -type f -exec chmod 644 {} \; && -install -v -m755 -d /usr/share/doc/${1} && -cp -v -R doc/* /usr/share/doc/${1} && +cd ${LFS_TMP}/${1} +rm doc/doxygen.conf +find doc -type d -exec chmod 755 {} \; +find doc -type f -exec chmod 644 {} \; +install -v -m755 -d /usr/share/doc/${1} +cp -v -R doc/* /usr/share/doc/${1} # Creating repositories directory -mkdir -p /srv/svn && -chown ${APACHE_USER}:${APACHE_USER} /srv/svn && +mkdir -p /srv/svn +chown ${APACHE_USER}:${APACHE_USER} /srv/svn ldconfig -# Return last error exit $? diff --git a/stage3/cis-t1lib b/stage3/cis-t1lib index 565e4c6..c4efab7 100755 --- a/stage3/cis-t1lib +++ b/stage3/cis-t1lib @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,14 +9,13 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} ./configure \ - --prefix=/usr && -make without_doc && -make install && + --prefix=/usr +make without_doc +make install ldconfig -# Return last error exit $? diff --git a/stage3/cis-tetex b/stage3/cis-tetex index d52df49..bd8ddb3 100755 --- a/stage3/cis-tetex +++ b/stage3/cis-tetex @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,17 +9,17 @@ source ../functions source ../packages-list # Removing any older directory from earlier attempt... -rm -rf ${LFS_TMP}/cm-super && +rm -rf ${LFS_TMP}/cm-super -install -v -m755 -d /usr/share/texmf && -decompress_package ${TETEX_TEXMF} /usr/share/texmf && -decompress_package ${TETEX_TEXMFSRC} /usr/share/texmf && -decompress_package ${TETEX_CM_SUPER} && +install -v -m755 -d /usr/share/texmf +decompress_package ${TETEX_TEXMF} /usr/share/texmf +decompress_package ${TETEX_TEXMFSRC} /usr/share/texmf +decompress_package ${TETEX_CM_SUPER} # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1}-build && +cd ${LFS_TMP}/${1}-build ../${1}/configure \ --prefix=/usr \ --exec-prefix=/usr \ @@ -29,33 +31,33 @@ cd ${LFS_TMP}/${1}-build && --with-system-t1lib \ --with-system-pnglib \ --with-system-gd \ - --disable-a4 && -make all && -make install && + --disable-a4 +make all +make install -texconfig-sys dvips paper letter && -texconfig-sys font rw && +texconfig-sys dvips paper letter +texconfig-sys font rw -install -v -d -m755 /usr/local/share/texmf/tex/latex && -var_add_path "TEXMFLOCAL" /etc/profile "/usr/local/share/texmf" && -var_export "TEXMFLOCAL" /etc/profile && +install -v -d -m755 /usr/local/share/texmf/tex/latex +var_add_path "TEXMFLOCAL" /etc/profile "/usr/local/share/texmf" +var_export "TEXMFLOCAL" /etc/profile # To install the optional cm-super fonts: -FONTDIR=$(kpsewhich --expand-var '$TEXMFMAIN') && +FONTDIR=$(kpsewhich --expand-var '$TEXMFMAIN') mkdir -v -p ${FONTDIR}/fonts/afm/public/cm-super \ ${FONTDIR}/fonts/type1/public/cm-super \ ${FONTDIR}/fonts/enc/dvips/cm-super \ - ${FONTDIR}/fonts/map/dvips/cm-super && + ${FONTDIR}/fonts/map/dvips/cm-super -cp -v ${LFS_TMP}/cm-super/pfb/*.pfb ${FONTDIR}/fonts/type1/public/cm-super/ && +cp -v ${LFS_TMP}/cm-super/pfb/*.pfb ${FONTDIR}/fonts/type1/public/cm-super/ -gunzip ${LFS_TMP}/cm-super/afm/* && -cp -v ${LFS_TMP}/cm-super/afm/*.afm ${FONTDIR}/fonts/afm/public/cm-super/ && +gunzip ${LFS_TMP}/cm-super/afm/* +cp -v ${LFS_TMP}/cm-super/afm/*.afm ${FONTDIR}/fonts/afm/public/cm-super/ -cp -v ${LFS_TMP}/cm-super/dvips/*.enc ${FONTDIR}/fonts/enc/dvips/cm-super/ && -cp -v ${LFS_TMP}/cm-super/dvips/*.map ${FONTDIR}/fonts/map/dvips/cm-super/ && +cp -v ${LFS_TMP}/cm-super/dvips/*.enc ${FONTDIR}/fonts/enc/dvips/cm-super/ +cp -v ${LFS_TMP}/cm-super/dvips/*.map ${FONTDIR}/fonts/map/dvips/cm-super/ -cat >> ${FONTDIR}/web2c/updmap.cfg << "EOF" && +cat >> ${FONTDIR}/web2c/updmap.cfg << "EOF" MixedMap cm-super-t1.map MixedMap cm-super-t2a.map MixedMap cm-super-t2b.map @@ -64,12 +66,11 @@ MixedMap cm-super-ts1.map MixedMap cm-super-x2.map EOF -mktexlsr && +mktexlsr updmap-sys if [ ${?} -eq 0 ]; then - rm -rf ${LFS_TMP}/cm-super || exit 1 + rm -rf ${LFS_TMP}/cm-super fi -# Return last error exit $? diff --git a/stage3/cis-tftp-hpa b/stage3/cis-tftp-hpa index 555aeb5..4fe70ce 100755 --- a/stage3/cis-tftp-hpa +++ b/stage3/cis-tftp-hpa @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Remaining arguments are additional configure options. @@ -12,24 +14,23 @@ shift CONFIGURE_OPTS=${*} # Applying patches (if any) -apply_patches ${PACKAGE} && +apply_patches ${PACKAGE} # Need to specify mandir manually because of a stupid programming error in tftpd sources... -cd ${LFS_TMP}/${PACKAGE} && +cd ${LFS_TMP}/${PACKAGE} ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/man \ --without-tcpwrappers \ - ${CONFIGURE_OPTS} && -make && -make install && + ${CONFIGURE_OPTS} +make +make install ldconfig -mkdir -v -p /srv/tftpboot && +mkdir -v -p /srv/tftpboot # Addition to /etc/inetd.conf string_add "tftp dgram udp wait root /usr/sbin/in.tftpd in.tftpd -s /srv/tftpboot -v -v -v -v -v" /etc/inetd.conf -# Return last error exit $? diff --git a/stage3/cis-tk b/stage3/cis-tk index ae58dfe..1ba210e 100755 --- a/stage3/cis-tk +++ b/stage3/cis-tk @@ -1,4 +1,5 @@ #!/bin/sh +set -o errexit # Reading system configuration informations, functions and package versions. source ../sysinfos @@ -6,32 +7,31 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} export VERSION=$(echo ${1} | sed "s!tk\(.*\)!\1!g") -export V=`echo $VERSION | cut -d "." -f 1,2` && -export DIR=$PWD && -cd unix && -sed -i "s/relid'/relid/" configure && +export V=`echo $VERSION | cut -d "." -f 1,2` +export DIR=$PWD +cd unix +sed -i "s/relid'/relid/" configure ./configure \ --prefix=/usr \ - --enable-threads && -make && + --enable-threads +make sed -i -e "s:${DIR}/unix:/usr/lib:" \ - -e "s:${DIR}:/usr/include/tk${V}:" tkConfig.sh && + -e "s:${DIR}:/usr/include/tk${V}:" tkConfig.sh -make install && -install -d /usr/include/tk${V}/unix && -install -m644 *.h /usr/include/tk${V}/unix/ && -install -d /usr/include/tk${V}/generic && -install -m644 ../generic/*.h /usr/include/tk${V}/generic/ && -rm -f /usr/include/tk${V}/generic/{tk,tkDecls,tkPlatDecls}.h && -ln -nsf ../../include/tk${V} /usr/lib/tk${V}/include && -ln -sf libtk${V}.so /usr/lib/libtk.so && -ln -sf wish${V} /usr/bin/wish && +make install +install -d /usr/include/tk${V}/unix +install -m644 *.h /usr/include/tk${V}/unix/ +install -d /usr/include/tk${V}/generic +install -m644 ../generic/*.h /usr/include/tk${V}/generic/ +rm -f /usr/include/tk${V}/generic/{tk,tkDecls,tkPlatDecls}.h +ln -nsf ../../include/tk${V} /usr/lib/tk${V}/include +ln -sf libtk${V}.so /usr/lib/libtk.so +ln -sf wish${V} /usr/bin/wish ldconfig -# Return last error exit $? diff --git a/stage3/cis-uml-utilities b/stage3/cis-uml-utilities index 54f3a1d..0034151 100755 --- a/stage3/cis-uml-utilities +++ b/stage3/cis-uml-utilities @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Remaining arguments are additional configure options. @@ -15,10 +17,9 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${PACKAGE} && +apply_patches ${PACKAGE} -cd ${LFS_TMP}/${PACKAGE} && +cd ${LFS_TMP}/${PACKAGE} make -C tunctl install -# Return last error exit $? diff --git a/stage3/cis-unzip b/stage3/cis-unzip index d3562cf..107b4cb 100755 --- a/stage3/cis-unzip +++ b/stage3/cis-unzip @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,11 +9,11 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && -make -f unix/Makefile LOCAL_UNZIP=-D_FILE_OFFSET_BITS=64 linux && -make prefix=/usr install && +cd ${LFS_TMP}/${1} +make -f unix/Makefile LOCAL_UNZIP=-D_FILE_OFFSET_BITS=64 linux +make prefix=/usr install ldconfig # Return last error diff --git a/stage3/cis-uw-imap b/stage3/cis-uw-imap index a922c32..1124c95 100755 --- a/stage3/cis-uw-imap +++ b/stage3/cis-uw-imap @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -9,78 +11,78 @@ source ../packages-list # This server is configured to use SSL only, no plain-text passwords. # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} # Setting default mailbox format for imapd -sed -i -e "s!^\(CREATEPROTO=\)unixproto!\1${MAILBOX_FORMAT}proto!" src/osdep/unix/Makefile && +sed -i -e "s!^\(CREATEPROTO=\)unixproto!\1${MAILBOX_FORMAT}proto!" src/osdep/unix/Makefile -make lnp && +make lnp # Installing imapd -install -m 755 imapd/imapd /usr/bin && -install -m 644 src/imapd/imapd.8 /usr/man/man8/imapd.8 && +install -m 755 imapd/imapd /usr/bin +install -m 644 src/imapd/imapd.8 /usr/man/man8/imapd.8 # Installing mailutil -install -m 755 mailutil/mailutil /usr/bin && -install -m 644 src/mailutil/mailutil.1 /usr/man/man1/mailutil.1 && +install -m 755 mailutil/mailutil /usr/bin +install -m 644 src/mailutil/mailutil.1 /usr/man/man1/mailutil.1 # Installing dmail -install -m 755 dmail/dmail /usr/bin && -install -m 644 src/dmail/dmail.1 /usr/man/man1/dmail.1 && +install -m 755 dmail/dmail /usr/bin +install -m 644 src/dmail/dmail.1 /usr/man/man1/dmail.1 # Installing C-library -mkdir -p /usr/lib/uw-imap/{include,lib} && -install -m 644 c-client/c-client.a /usr/lib/uw-imap/lib && -ln -sf /usr/lib/uw-imap/lib/c-client.a /usr/lib/uw-imap/lib/libc-client.a && -install -m 644 c-client/*.h /usr/lib/uw-imap/include && -install -m 644 src/osdep/tops-20/shortsym.h /usr/lib/uw-imap/include && +mkdir -p /usr/lib/uw-imap/{include,lib} +install -m 644 c-client/c-client.a /usr/lib/uw-imap/lib +ln -sf /usr/lib/uw-imap/lib/c-client.a /usr/lib/uw-imap/lib/libc-client.a +install -m 644 c-client/*.h /usr/lib/uw-imap/include +install -m 644 src/osdep/tops-20/shortsym.h /usr/lib/uw-imap/include # Addition to /etc/inetd.conf -string_add "imaps stream tcp nowait.400 root /usr/bin/imapd imapd" /etc/inetd.conf && +string_add "imaps stream tcp nowait.400 root /usr/bin/imapd imapd" /etc/inetd.conf # Addition to /etc/services -string_add "imaps 993/tcp " /etc/services && +string_add "imaps 993/tcp " /etc/services # Addition to /etc/pam.conf -string_add "# IMAP server" /etc/pam.conf && -string_add "imap auth required pam_unix.so nullok" /etc/pam.conf && -string_add "imap account required pam_unix.so try_first_pass" /etc/pam.conf && -string_add "imap session required pam_deny.so" /etc/pam.conf && +string_add "# IMAP server" /etc/pam.conf +string_add "imap auth required pam_unix.so nullok" /etc/pam.conf +string_add "imap account required pam_unix.so try_first_pass" /etc/pam.conf +string_add "imap session required pam_deny.so" /etc/pam.conf # SSL Certificates generation script -cat > /etc/mail/imap-ssl-certs << "EOF" && +cat > /etc/mail/imap-ssl-certs << "EOF" #!/bin/sh -echo "-------------------------------------------------" && -echo "Generation of a Certificate Signing Request (CSR)" && -echo "" && -echo "Example fields:" && -echo "Country name: CA" && -echo "State or Province Name: Quebec" && -echo "Locality Name: Montreal" && -echo "Organization Name: Hugo Villeneuve" && -echo "Organizational Unit Name: ." && -echo "Common Name: mail.hugovil.com" && -echo "Email Address: postmaster@hugovil.com" && -echo "" && -echo "Please enter the following 'extra' attributes" && -echo "to be sent with your certificate request" && -echo "A challenge password []: (press enter) " && -echo "An optional company name []: (press enter) " && -echo "-------------------------------------------------" && -echo "" && -echo "-------------------------------------------------" && -echo "Generation of a self-signed certificate" && -echo "-------------------------------------------------" && -cd /etc/ssl/certs && +echo "-------------------------------------------------" +echo "Generation of a Certificate Signing Request (CSR)" +echo "" +echo "Example fields:" +echo "Country name: CA" +echo "State or Province Name: Quebec" +echo "Locality Name: Montreal" +echo "Organization Name: Hugo Villeneuve" +echo "Organizational Unit Name: ." +echo "Common Name: mail.hugovil.com" +echo "Email Address: postmaster@hugovil.com" +echo "" +echo "Please enter the following 'extra' attributes" +echo "to be sent with your certificate request" +echo "A challenge password []: (press enter) " +echo "An optional company name []: (press enter) " +echo "-------------------------------------------------" +echo "" +echo "-------------------------------------------------" +echo "Generation of a self-signed certificate" +echo "-------------------------------------------------" +cd /etc/ssl/certs openssl req -new -x509 -nodes -out imapd.pem -keyout imapd.pem -days 10000 exit $? EOF -chmod 740 /etc/mail/imap-ssl-certs && +chmod 740 /etc/mail/imap-ssl-certs # Making sure cram-md5.pwd is created. if [ ! -f /etc/cram-md5.pwd ]; then @@ -95,5 +97,4 @@ if [ ! -f /etc/cram-md5.pwd ]; then chmod 600 /etc/cram-md5.pwd fi -# Return last error exit $? diff --git a/stage3/cis-windowmaker b/stage3/cis-windowmaker index 2d3c8f1..ca29a5e 100755 --- a/stage3/cis-windowmaker +++ b/stage3/cis-windowmaker @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Reading system configuration informations, functions and package versions. @@ -7,17 +9,16 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && -autoreconf && +cd ${LFS_TMP}/${1} +autoreconf ./configure \ --prefix=/usr \ --sysconfdir=/etc \ - --with-gnustepdir=/usr/share/GNUstep && -make && -make install && + --with-gnustepdir=/usr/share/GNUstep +make +make install ldconfig -# Return last error exit $? diff --git a/stage3/cis-xfree86 b/stage3/cis-xfree86 index 28a9862..fe95b2c 100755 --- a/stage3/cis-xfree86 +++ b/stage3/cis-xfree86 @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,9 +9,9 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} # Xfree86 may have a problem with sys/kd.h installed with some recent versions of # Glibc. This has recently been fixed in LFS SVN. Execute the following commands @@ -18,19 +20,19 @@ cd ${LFS_TMP}/${1} && grep "__undef_LINUX" \ /usr/include/sys/kd.h 2>&1 > /dev/null || \ sed -i.bak '/X.h/i #include ' \ - programs/Xserver/hw/xfree86/os-support/linux/lnx_agp.c && + programs/Xserver/hw/xfree86/os-support/linux/lnx_agp.c # When building XFree86, you should create a shadow directory of symbolic links for the compiled code: -make -C config/util -f Makefile.ini lndir && +make -C config/util -f Makefile.ini lndir # Now create the shadow tree: -cd ../${1}-build && -../${1}/config/util/lndir ../${1} && +cd ../${1}-build +../${1}/config/util/lndir ../${1} # Creating host.def # Although XFree86 will compile without a host.def file, the following file is # recommended for customizing the installation. -cat > config/cf/host.def << "EOF" && +cat > config/cf/host.def << "EOF" /* host.def */ /* System Related Information. */ #define DefaultGcc2i386Opt -O2 -fomit-frame-pointer -march=_MACHINE_ARCHITECTURE_ @@ -116,28 +118,28 @@ $(FONTDIR)/TrueType,$(FONTDIR)/CID,$(FONTDIR)/Speedo #define BuildSpecsDocs NO EOF -sed -i -e "s!_MACHINE_ARCHITECTURE_!${MACHINE_ARCHITECTURE}!g" config/cf/host.def && -sed -i -e "s!_XF86_CARD_DRIVER_!${XF86_CARD_DRIVER}!g" config/cf/host.def && +sed -i -e "s!_MACHINE_ARCHITECTURE_!${MACHINE_ARCHITECTURE}!g" config/cf/host.def +sed -i -e "s!_XF86_CARD_DRIVER_!${XF86_CARD_DRIVER}!g" config/cf/host.def sed -i 's:^.*asm.*$:# define PAGE_MASK (~(getpagesize() - 1)):' \ - ../${1}/programs/Xserver/hw/xfree86/fbdevhw/fbdevhw.c && + ../${1}/programs/Xserver/hw/xfree86/fbdevhw/fbdevhw.c sed -i -e "s@^#include @/* & */@" \ - `grep -lr linux/config.h ../${1}` && -echo "make World" && -make World && + `grep -lr linux/config.h ../${1}` +echo "make World" +make World -echo "make install" && -make install && -echo "make install.man" && -make install.man && -ldconfig && +echo "make install" +make install +echo "make install.man" +make install.man +ldconfig -ln -svfT /usr/X11R6/bin /usr/bin/X11 && -ln -svfT /usr/X11R6/lib/X11 /usr/lib/X11 && -ln -svfT /usr/X11R6/include/X11 /usr/include/X11 && +ln -svfT /usr/X11R6/bin /usr/bin/X11 +ln -svfT /usr/X11R6/lib/X11 /usr/lib/X11 +ln -svfT /usr/X11R6/include/X11 /usr/include/X11 -cat > /etc/X11/XF86Config << "EOF" && +cat > /etc/X11/XF86Config << "EOF" # XF86Config # # ********************************************************************** @@ -253,19 +255,19 @@ EndSection EOF # The ! character is the SED delimiter -sed -i -e "s!_HV_FONTS_PATH_!${HV_FONTS_PATH}!g" /etc/X11/XF86Config && -sed -i -e "s!_VIDEO_CARD_DRIVER_!${XF86_CARD_DRIVER}!g" /etc/X11/XF86Config && -sed -i -e "s!_XF86_KEYBOARD_LAYOUT_!${HV_XF86_KEYBOARD_LAYOUT}!g" /etc/X11/XF86Config && -sed -i -e "s!_XF86_KEYBOARD_VARIANT_!${HV_XF86_KEYBOARD_VARIANT}!g" /etc/X11/XF86Config && -sed -i -e "s!_XF86_KEYBOARD_OPTIONS_!${HV_XF86_KEYBOARD_OPTIONS}!g" /etc/X11/XF86Config && +sed -i -e "s!_HV_FONTS_PATH_!${HV_FONTS_PATH}!g" /etc/X11/XF86Config +sed -i -e "s!_VIDEO_CARD_DRIVER_!${XF86_CARD_DRIVER}!g" /etc/X11/XF86Config +sed -i -e "s!_XF86_KEYBOARD_LAYOUT_!${HV_XF86_KEYBOARD_LAYOUT}!g" /etc/X11/XF86Config +sed -i -e "s!_XF86_KEYBOARD_VARIANT_!${HV_XF86_KEYBOARD_VARIANT}!g" /etc/X11/XF86Config +sed -i -e "s!_XF86_KEYBOARD_OPTIONS_!${HV_XF86_KEYBOARD_OPTIONS}!g" /etc/X11/XF86Config -cat > /etc/skel/.xinitrc << "EOF" && +cat > /etc/skel/.xinitrc << "EOF" # ~/.xinitrc exec wmaker EOF -cat > /etc/skel/.Xdefaults << "EOF" && +cat > /etc/skel/.Xdefaults << "EOF" xterm*scrollBar: false xterm*rightScrollBar: false xterm*saveLines: 1000 @@ -290,7 +292,7 @@ xterm*color14: #50FCF8 xterm*color15: #F8FCF8 EOF -cat > /etc/skel/.xsession << "EOF" && +cat > /etc/skel/.xsession << "EOF" #!/bin/sh # ~/.xsession @@ -355,30 +357,30 @@ esac exit 0 EOF -chmod 755 /etc/skel/.xsession && +chmod 755 /etc/skel/.xsession -cp /etc/skel/.{xinitrc,Xdefaults,xsession} /root && -cp /etc/skel/.{xinitrc,Xdefaults,xsession} /home/${REGUSER} && +cp /etc/skel/.{xinitrc,Xdefaults,xsession} /root +cp /etc/skel/.{xinitrc,Xdefaults,xsession} /home/${REGUSER} -var_add_path "PATH" /etc/profile "/usr/X11R6/bin" && +var_add_path "PATH" /etc/profile "/usr/X11R6/bin" -var_add_path "PKG_CONFIG_PATH" /etc/profile "/usr/X11R6/lib/pkgconfig" && -var_export "PKG_CONFIG_PATH" /etc/profile && +var_add_path "PKG_CONFIG_PATH" /etc/profile "/usr/X11R6/lib/pkgconfig" +var_export "PKG_CONFIG_PATH" /etc/profile -var_add_path "MANPATH" /etc/profile "/usr/X11R6/man" && -var_export "MANPATH" /etc/profile && +var_add_path "MANPATH" /etc/profile "/usr/X11R6/man" +var_export "MANPATH" /etc/profile -var_add_shadow "ENV_SUPATH" /etc/login.defs "/usr/X11R6/bin" && +var_add_shadow "ENV_SUPATH" /etc/login.defs "/usr/X11R6/bin" -string_add "/usr/X11R6/lib" /etc/ld.so.conf && +string_add "/usr/X11R6/lib" /etc/ld.so.conf if [ "x${INST_TYPE}" = "xltsp-server" ]; then # Enable remote xdm login for LTSP clients - sed -i -e "s@^\(DisplayManager.requestPort.*\)@!\1@g" /etc/X11/xdm/xdm-config && - chmod 644 /etc/X11/xdm/Xaccess && - sed -i -e "s@^#\(\*[\t ]*#any host can get a login window\)@\1@g" /etc/X11/xdm/Xaccess && - chmod 444 /etc/X11/xdm/Xaccess || exit 1 -fi && + sed -i -e "s@^\(DisplayManager.requestPort.*\)@!\1@g" /etc/X11/xdm/xdm-config + chmod 644 /etc/X11/xdm/Xaccess + sed -i -e "s@^#\(\*[\t ]*#any host can get a login window\)@\1@g" /etc/X11/xdm/Xaccess + chmod 444 /etc/X11/xdm/Xaccess +fi # When needed, XFree86 creates the directory /tmp/.ICE-unix if it does not # exist. If this directory is not owned by root, XFree86 delays startup by a @@ -391,6 +393,5 @@ fi && #/tmp/.ICE-unix dir 1777 root root #EOF -# Return last error exit $? diff --git a/stage3/cis-xmltoman b/stage3/cis-xmltoman index dc89a63..2127de5 100755 --- a/stage3/cis-xmltoman +++ b/stage3/cis-xmltoman @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Remaining arguments are additional configure options. @@ -17,11 +19,10 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${PACKAGE} && +apply_patches ${PACKAGE} -cd ${LFS_TMP}/${PACKAGE} && -make PREFIX=/usr && +cd ${LFS_TMP}/${PACKAGE} +make PREFIX=/usr make install PREFIX=/usr -# Return last error exit $? diff --git a/stage3/cis-xsane b/stage3/cis-xsane index 1abeda3..2616f35 100755 --- a/stage3/cis-xsane +++ b/stage3/cis-xsane @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. # Reading system configuration informations, functions and package versions. @@ -7,17 +9,16 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} ./configure \ - --prefix=/usr && -make && -make install && -ldconfig && + --prefix=/usr +make +make install +ldconfig # Adding link for GIMP plugin (Base GIMP version hardcoded for now) ln -v -sf /usr/bin/xsane /usr/lib/gimp/2.0/plug-ins/ -# Return last error exit $? diff --git a/stage3/cis-xvidcore b/stage3/cis-xvidcore index b5205de..841455e 100755 --- a/stage3/cis-xvidcore +++ b/stage3/cis-xvidcore @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,16 +9,15 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1}/build/generic && +cd ${LFS_TMP}/${1}/build/generic ./configure \ - --prefix=/usr && -make && -make install && -ln -sf libxvidcore.so.4.0 /usr/lib/libxvidcore.so.4 && -ln -sf libxvidcore.so.4 /usr/lib/libxvidcore.so && + --prefix=/usr +make +make install +ln -sf libxvidcore.so.4.0 /usr/lib/libxvidcore.so.4 +ln -sf libxvidcore.so.4 /usr/lib/libxvidcore.so ldconfig -# Return last error exit $? diff --git a/stage3/cis-zip b/stage3/cis-zip index dc39198..f9fe719 100755 --- a/stage3/cis-zip +++ b/stage3/cis-zip @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,14 +9,13 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} sed -i -e 's@$(INSTALL) man/zip.1@$(INSTALL_PROGRAM) man/zip.1@' \ - unix/Makefile && -make prefix=/usr -f unix/Makefile generic_gcc && -make prefix=/usr -f unix/Makefile install && + unix/Makefile +make prefix=/usr -f unix/Makefile generic_gcc +make prefix=/usr -f unix/Makefile install ldconfig -# Return last error exit $? diff --git a/stage3/packages-update b/stage3/packages-update index f89e0be..a3971d6 100755 --- a/stage3/packages-update +++ b/stage3/packages-update @@ -29,6 +29,7 @@ fpkg ${LIBPCAP} "http://www.tcpdump.org/release" fpkg ${TCPDUMP} "http://www.tcpdump.org/release" fpkg ${NMAP} "http://download.insecure.org/nmap/dist" ARCH_EXT=tar.gz fpkg ${BIND} "http://gd.tuwien.ac.at/infosys/servers/isc/bind9/$(get_pkg_ver ${BIND})" +unset ARCH_EXT fpkg ${IPTABLES} "http://www.netfilter.org/projects/iptables/files" fpkg ${MYSQL} "ftp://mirror.mcs.anl.gov/pub/mysql/Downloads/MySQL-$(get_pkg_ver_base ${MYSQL})" fpkg_mis ${ZIP} "zip$(get_pkg_ver ${ZIP} | sed 's!\.!!g')" ${SOURCEFORGE_URL}/infozip diff --git a/stage3/stage3-install b/stage3/stage3-install index 73083fa..81e9da2 100755 --- a/stage3/stage3-install +++ b/stage3/stage3-install @@ -272,7 +272,7 @@ if [ "x${INST_TYPE}" = "xworkstation" -o "x${INST_TYPE}" = "xltsp-server" ]; the ipkg_cust ${NSS} cis-nss ipkg_cust ${FIREFOX} cis-firefox - # Plugins for Opera and Firefox + # Plugins for Firefox ipkg_cust ${JAVA} cis-java ipkg_cust ${AGG} cis-agg ipkg_cust ${GNASH} cis-gnash @@ -335,7 +335,11 @@ ipkg_ac_nb ${KVM} ipkg_ac_nb ${BRIDGE_UTILS} ipkg_cust ${UML_UTILITIES} cis-uml-utilities -ipkg_cust ${GUILE} cis-guile +ipkg_ac ${GUILE} \ + --enable-posix \ + --disable-static \ + --enable-networking \ + --enable-regex ipkg_cust ${CKERMIT} cis-ckermit diff --git a/sysinfos b/sysinfos index 82fcf3d..6757b83 100644 --- a/sysinfos +++ b/sysinfos @@ -9,7 +9,7 @@ MAKEJOBS=1 # Installation type: server, ltsp-server or workstation. -INST_TYPE="server" +INST_TYPE="ltsp-server" # New user to create REGUSER="hugo"