From d7900cf1804af891098cd22b0ff32aee9df51969 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 27 Feb 2010 08:50:18 +0000 Subject: [PATCH] Improved fpkg and now chwcking integrity of bz2 archives --- TODO | 34 ++----- dependencies | 5 +- functions-update | 173 +++++++++++++++++++++++------------- packages-list | 51 ++++++----- stage0/packages-update | 4 + stage1/packages-update | 4 + stage2/packages-update | 4 + stage3/bootscripts/firewire | 37 -------- stage3/bootscripts/fwplugd | 55 ------------ stage3/cis-firewire | 53 ----------- stage3/packages-update | 20 +++-- stage4/packages-update | 71 +++++++-------- 12 files changed, 203 insertions(+), 308 deletions(-) delete mode 100755 stage3/bootscripts/firewire delete mode 100755 stage3/bootscripts/fwplugd delete mode 100755 stage3/cis-firewire diff --git a/TODO b/TODO index b729b1e..b32888c 100644 --- a/TODO +++ b/TODO @@ -1,11 +1,10 @@ TODO --tar -tf $tarball | head -n1 --> pour extraire le nom du répertoire root - du package automatiquement... - -basename $(tar -tf mozilla-3.0.1.tar.bz2 | head -n1) +-Vérifier option du kernel pour créér automatiquement /dev au démarrage + (Generic Driver Options) +-Remplacer hv_useradd par adduser? -Dans le fichier packages-list, utiliser un array pour définir le nom du module et l'hyperlien pour le télécharger: @@ -14,25 +13,15 @@ basename $(tar -tf mozilla-3.0.1.tar.bz2 | head -n1) BZIP2[0]=bzip2-1.0.1 BZIP2[1]=http://www.bzip.org/$(get_pkg_ver ${BZIP2}) +-packages-list: prefixer chaque variabler avec "HVPKG_" pour eviter les bugs + -Enlever automatiquement les patches antérieures du style: [module]-[version]-[nom_patch]-[version_patch] --DBUS: Chaque usager doit ajouter 'dbus-launch' dans son - fichier ~/.xsession ou ~/.xinitrc - --webalizer: needs gd-2.0.33 - -install guitartex et lilypond automatiquement: --lilypond: - -fontforge - -mftrace -> t1utils - -> autotrace - -installer modes emacs: php, html, css, etc. --cur_dir: set automatically in install_package() (see cis-mailman) - -install gdb. -syslog -r est nécessaire pour LTSP: @@ -47,8 +36,6 @@ basename $(tar -tf mozilla-3.0.1.tar.bz2 | head -n1) -uw-imap: use config files instead of modifying Makefiles. --Automatically install Acrobat Reader? - SPIP: mysql database name: localhost :( localhost.localdomain :) @@ -58,8 +45,6 @@ SPIP: mysql database name: -Compiler certains packages en parallèle (système de dependences) --packages-list: prefixer chaque variabler avec "HVPKG_" pour eviter les bugs - -Combiner stageX-install et packages-update. stageX-install devrait accepter les arguments: fetch : download packages @@ -70,22 +55,17 @@ SPIP: mysql database name: packages décompressent certains fichiers automatiquement, donc il faudrait trouver une façon de les downloader aussi. +-stageX-install: si un package n'est pas disponible, le downloader automatiquement? + -ldconfig et source /etc/profile: éxécuter automatiquement après chaque installation d'un package. --stageX-install: si un package n'est pas disponible, le downloader automatiquement? - -Mettre "local" devant chaque variable des fonctions dans functions et functions-update. -BIND: run in IPV4 mode only (option "-4") --Remove /home/named/var/run/named.run dans le start/stop script au début? - --installer libcroco pour librsvg? Mounting network volumes: check if networking is up. -Check if reinstall of inetd at stage3 is necessary? - Octave: install gnuplot f2c --> install src/f2c /usr/bin install src/f2c.h /usr/include diff --git a/dependencies b/dependencies index aae337f..c16b5d3 100644 --- a/dependencies +++ b/dependencies @@ -54,7 +54,7 @@ ${LIBMNG}: ${LCMS} ${LIBJPEG} ${FONTCONFIG}: ${FREETYPE} ${EXPAT} -${LIBRSVG}: ${GTK} ${LIBXML2} +${LIBRSVG}: ${GTK} ${LIBXML2} ${LIBCROCO} ${LIBGSF} ${GTK_ENGINES}: ${PERL_MOD_XML_PARSER} @@ -90,3 +90,6 @@ ${XMLTO}: ${LIBXSLT} ${DOCBOOK_XML} ${DOCBOOK_XSL} ${EMACS}: ${GTK} +webalizer: gd-2.0.33 + +${LILYPOND}: fontforge mftrace t1utils autotrace diff --git a/functions-update b/functions-update index 742d9f1..2f2359f 100644 --- a/functions-update +++ b/functions-update @@ -22,8 +22,10 @@ SOURCEFORGE_URL="http://cdnetworks-us-1.dl.sourceforge.net" GNOME_URL="http://ftp.gnome.org/pub/gnome/sources" GNU_URL="http://ftp.gnu.org/pub/gnu" TETEX_URL="http://www.tug.org/ftp/tex-archive/systems/unix/teTeX" +BLFS_XORG_URL="http://anduin.linuxfromscratch.org/files/BLFS/svn/xorg" +XORG_URL="http://xorg.freedesktop.org/releases/individual" -WGETCMD="wget --directory-prefix=${LFS_PKG_DIR} --timeout=15 --tries=3 -nc -c -o ${WGET_LOG_FILE}" +WGETCMD="wget --directory-prefix=${LFS_PKG_DIR} --timeout=15 --tries=3 -nc --continue --no-check-certificate -o ${WGET_LOG_FILE}" LFS_PATCHES_LIST=${LFS_PKG_DIR}/patches-list-lfs.html BLFS_PATCHES_LIST=${LFS_PKG_DIR}/patches-list-blfs.html @@ -186,7 +188,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 + echo "404 NOTFOUND" return 0 elif grep "No such file" ${WGET_LOG_FILE} 1> /dev/null 2>&1; then return 0 @@ -211,7 +213,7 @@ static_getpkg() return 1 fi - if [ -z "${ARCH_EXT}" ]; then + if [ -z "${MY_ARCH_EXT}" ]; then # List of default archive extensions to try MY_ARCH_EXT="tar.bz2 tar.gz tgz tar.Z" fi @@ -219,6 +221,11 @@ static_getpkg() echo " MY_ARCH_EXT=${MY_ARCH_EXT}" for arch_ext in ${MY_ARCH_EXT}; do + # Don't take any chance: remove any partially downloaded file. + # If we arrive here, it means the final destination file was not found + # so we can safely remove any file prior to trying to download it. + rm -f ${LFS_PKG_DIR}/${PACK}.${arch_ext} + ${WGETCMD} ${URL}/${PACK}.${arch_ext} # Failure: if it was a connection timeout, don't try for other file extensions. @@ -246,10 +253,47 @@ static_getpkg() # Get package if it is not in the repository # Arg. #1: Package name and version # Arg. #2: URL +# Options: +# -e File extension (default is tar.bz2) +# -d Fetch directory (default is LFS_PKG_DIR) +# -f Filename (default is PACKAGE) +# -h Display this help and returns +# -s Subdirectory on server fpkg() { - PACK=${1} - URL=${2} + local FILE_EXT="" + local DEST_DIR="" + local SRC_FILENAME="" + local SRC_DIR="" + + while getopts "e:d:f:hs:" flag ;do + case ${flag} in + e) + # File extension + FILE_EXT=${OPTARG} + ;; + d) + # Fetch directory (where to put file) + DEST_DIR=${OPTARG} + ;; + f) + # Filename if different than package name + SRC_FILENAME=${OPTARG} + ;; + s) + SRC_DIR=${OPTARG} + ;; + ?) + echo "${FUNCNAME}(): Invalid option: ${OPTARG}." + return 1 + ;; + esac + done + shift `expr "${OPTIND}" - 1` + + unset OPTSTRING + unset OPTIND + unset OPTARG # Checking for correct number of arguments if [ $# -ne 2 ]; then @@ -257,83 +301,73 @@ fpkg() return 1 fi - # Default extension - local FINAL_EXT=tar.bz2 - + local PACK=${1} + local URL=${2} local FETCH_STRING="Fetching ${PACK}" - if [ -n "${ARCH_EXT}" ]; then - FINAL_EXT=${ARCH_EXT} - FETCH_STRING="${FETCH_STRING}.${ARCH_EXT}" + if [ -z "${SRC_FILENAME}" ]; then + # Default source filename = name of package + SRC_FILENAME=${PACK} fi - # Default destination directory - local MY_FETCH_DIR=${LFS_PKG_DIR} + if [ -n "${FILE_EXT}" ]; then + FETCH_STRING="${FETCH_STRING}.${FILE_EXT}" + fi - if [ -n "${FETCH_DIR}" ]; then - local MY_FETCH_DIR=${FETCH_DIR} - local MOVE_FILE=1 + if [ -z "${FILE_EXT}" -o \ + "x${FILE_EXT}" = "xtar.gz" -o \ + "x${FILE_EXT}" = "xtgz" -o \ + "x${FILE_EXT}" = "xtar.Z" -o \ + "x${FILE_EXT}" = "xtar.bz2" \ + ]; then + FINAL_EXT=tar.bz2 + else + FINAL_EXT=${FILE_EXT} fi - DEST_FILE=${MY_FETCH_DIR}/${PACK}.${FINAL_EXT} + if [ -z "${DEST_DIR}" ]; then + # Default destination directory + DEST_DIR=${LFS_PKG_DIR} + fi - ##########echo "DEST_FILE=${DEST_FILE}" - if [ ! -f ${DEST_FILE} ]; then - rcmd "${FETCH_STRING}" static_getpkg ${PACK} ${URL} ${ARCH_EXT} + mkdir -v -p ${DEST_DIR} >> ${LFS_LOG_FILE} 2>&1 - # Move to final directory if alternate directory specified - if [ -f ${LFS_PKG_DIR}/${PACK}.${FINAL_EXT} -a -n "${MOVE_FILE}" ]; then - mv ${LFS_PKG_DIR}/${PACK}.${FINAL_EXT} ${DEST_FILE} - fi + if [ -z "${SRC_DIR}" ]; then + # Default source subdirectory on server + SRC_DIR="" + else + URL=${URL}/${SRC_DIR} fi - # Check if a patch is available. - static_getpatch ${PACK} -} + DEST_FILE=${DEST_DIR}/${PACK}.${FINAL_EXT} -# Get package if it is not in the repository. -# This function is used if the source and target names for the -# package are different (name mismatch). -# Arg. #1: Target package name and version (on disk) -# Arg. #2: Source package name and version (on internet) -# Arg. #3: URL -fpkg_mis() -{ - TARGET=${1} - SOURCE=${2} - URL=${3} + if [ ! -f ${DEST_FILE} ]; then + rcmd "${FETCH_STRING}" static_getpkg ${SRC_FILENAME} ${URL} ${FILE_EXT} - # Checking for correct number of arguments - if [ $# -ne 3 ]; then - echo "${FUNCNAME}(), wrong number of arguments: ${*}" - reurn 1 - fi + # Move file if source filename is not equal to package name and/or destination + # directory is not the default: + DOWNLOADED_FILE=${LFS_PKG_DIR}/${SRC_FILENAME}.${FINAL_EXT} - if [ -z "${ARCH_EXT}" ]; then - # Default extension - FINAL_EXT=tar.bz2 - else - FINAL_EXT=${ARCH_EXT} + if [ "${DEST_FILE}" != "${DOWNLOADED_FILE}" ]; then + mv ${DOWNLOADED_FILE} ${DEST_FILE} + fi fi - if [ ! -f ${LFS_PKG_DIR}/${TARGET}.${FINAL_EXT} ]; then - fpkg ${SOURCE} ${URL} - - if [ -f ${LFS_PKG_DIR}/${SOURCE}.${FINAL_EXT} ]; then - mv ${LFS_PKG_DIR}/${SOURCE}.${FINAL_EXT} ${LFS_PKG_DIR}/${TARGET}.${FINAL_EXT} - fi + # Test integrity of archive if requested + if [ -f ${DEST_FILE} -a -n "${TEST_INTEGRITY}" -a "x${FINAL_EXT}" = "xtar.bz2" ]; then + rcmd "Testing integrity of ${PACK}.${FINAL_EXT}" bzip2 -t ${DEST_FILE} fi - # Check for available patches with TARGET name. - static_getpatch ${TARGET} + # Check for available patches with PACKAGE (TARGET) name. + static_getpatch ${PACK} - # Check for available patches with SOURCE name. - static_getpatch ${SOURCE} + # Check for available patches with SRC_FILENAME name. + static_getpatch ${SRC_FILENAME} # Rename any patch fetched (in fpkg call) and replace SOURCE by TARGET in # patch name. - if ls ${LFS_PKG_DIR}/${SOURCE}-*.patch 1> /dev/null 2>&1; then - rename ${SOURCE} ${TARGET} ${LFS_PKG_DIR}/${SOURCE}-*.patch + if ls ${LFS_PKG_DIR}/${SRC_FILENAME}-*.patch 1> /dev/null 2>&1; then + rename ${SRC_FILENAME} ${PACK} ${LFS_PKG_DIR}/${SRC_FILENAME}-*.patch fi } @@ -342,7 +376,7 @@ fpkg_mis() # Arg. #2: Directory name (optional) fpkg_gnu() { - PACK=${1} + local PACK=${1} if [ $# -eq 2 ]; then NAME=${2} @@ -443,6 +477,23 @@ fpkg_lfs() fi } +# Get package if it is not in the repository +# Arg. #1: Package name and version +# Arg. #2: Subdirectory name (module name) +fpkg_xorg() +{ + local PACK=${1} + local SUBDIR=${2} + + # Checking for correct number of arguments + if [ $# -ne 2 ]; then + echo "${FUNCNAME}(), wrong number of arguments: ${*}" + return 1 + fi + + fpkg -d ${LFS_PKG_DIR}/${SUBDIR} -s ${SUBDIR} ${PACK} ${XORG_URL} +} + # Create a symbolic link to a package that is located in another stage # repository (to not have the same file twice). # Arg. #1: Source stage number (1, 2, 3, etc) diff --git a/packages-list b/packages-list index dcc6c61..bf9d264 100644 --- a/packages-list +++ b/packages-list @@ -241,49 +241,48 @@ LFS_BOOTSCRIPTS="lfs-bootscripts-20070813" LIBA52="a52dec-0.7.4" LIBART="libart_lgpl-2.3.20" LIBBOOST="boost_1_35_0" -LIBFFI="libffi-3.0.8" +LIBCROCO="libcroco-0.6.2" LIBDVDCSS="libdvdcss-1.2.10" LIBDVDREAD="libdvdread-0.9.7" LIBEXIF="libexif-0.6.17" LIBFAAD2="faad2-2.7" LIBFAAC="faac-1.28" +LIBFFI="libffi-3.0.8" LIBGAMIN="gamin-0.1.9" LIBGEDA="libgeda-1.2.0" LIBGLADE="libglade-2.6.0" -LIBGSF="libgsf-1.14.5" -LIBIDL="libIDL-0.8.6" -LIBPCAP="libpcap-1.0.0" -LIBTOOL="libtool-2.2.6a" -LIBSIGCPP="libsigc++-2.0.17" -LIBOGG="libogg-1.1.4" -LIBVORBIS="libvorbis-1.2.3" -VORBIS_TOOLS="vorbis-tools-1.2.0" +LIBGPHOTO2="libgphoto2-2.1.99" +LIBGSF="libgsf-1.14.7" LIBID3TAG="libid3tag-0.15.1b" -LIBEXIF="libexif-0.6.16" -LIBGSF="libgsf-1.14.5" -LIBMAD="libmad-0.15.1b" +LIBIDL="libIDL-0.8.6" LIBJPEG="libjpeg-7" -LIBOPENJPEG="libopenjpeg-1.2" -LIBPNG="libpng-1.2.39" +LIBMAD="libmad-0.15.1b" LIBMNG="libmng-1.0.10" LIBMUSICBRAINZ="libmusicbrainz-2.1.5" +LIBNOTIFY="libnotify-0.4.4" +LIBOGG="libogg-1.1.4" +LIBOIL="liboil-0.3.15" +LIBOPENJPEG="libopenjpeg-1.2" +LIBPCAP="libpcap-1.0.0" +LIBPNG="libpng-1.2.39" +LIBPTHREAD_STUBS="libpthread-stubs-0.1" LIBRSVG="librsvg-2.26.0" +LIBSAMPLERATE="libsamplerate-0.1.2" +LIBSIGCPP="libsigc++-2.0.17" LIBSNDFILE="libsndfile-1.0.18pre18" LIBSOUP="libsoup-2.4.1" -LIBXML2="libxml2-2.7.6" -LIBXSLT="libxslt-1.1.26" -LIBUSB="libusb-1.0.2" -LIBUSB_COMPAT="libusb-compat-0.1.3" -LIBGPHOTO2="libgphoto2-2.1.99" -LIBXKLAVIER="libxklavier-2.91" -LIBOIL="liboil-0.3.15" -LIBSAMPLERATE="libsamplerate-0.1.2" +LIBSPF2="libspf2-1.2.5" LIBTASN1="libtasn1-2.2" LIBTHEORA="libtheora-1.0" -LIBSPF2="libspf2-1.2.5" -LIBNOTIFY="libnotify-0.4.4" -LIBPTHREAD_STUBS="libpthread-stubs-0.1" +LIBTOOL="libtool-2.2.6a" +LIBVORBIS="libvorbis-1.2.3" +VORBIS_TOOLS="vorbis-tools-1.2.0" +LIBUSB="libusb-1.0.2" +LIBUSB_COMPAT="libusb-compat-0.1.3" LIBWNCK="libwnck-2.16.1" +LIBXKLAVIER="libxklavier-2.91" +LIBXML2="libxml2-2.7.6" +LIBXSLT="libxslt-1.1.26" LILYPOND="lilypond-2.12.2" LTSP_UTILS="ltsp-utils-0.25-0" @@ -337,7 +336,7 @@ PERL_MOD_LWP="libwww-perl-5.834" PERL_MOD_URI="URI-1.52" PERL_MOD_NET_DNS="Net-DNS-0.66" PHP="php-5.2.6" -PIXMAN="pixman-0.17.4" +PIXMAN="pixman-0.17.8" POLKIT="polkit-0.96" POLICYKIT="PolicyKit-0.9" POPPLER="poppler-0.12.3" diff --git a/stage0/packages-update b/stage0/packages-update index 0b071fc..af1dc07 100755 --- a/stage0/packages-update +++ b/stage0/packages-update @@ -14,6 +14,10 @@ source ../packages-list update_packages_init +if [ ${#} -eq 1 -a "x${1}" = "xtest" ]; then + export TEST_INTEGRITY=1 +fi + fpkg ${KERNEL} "http://www.kernel.org/pub/linux/kernel/v2.6" fpkg ${FILE_PKG} "http://cross-lfs.org/files/packages/svn" fpkg_gnu ${NCURSES} diff --git a/stage1/packages-update b/stage1/packages-update index 7ca40cd..569db79 100755 --- a/stage1/packages-update +++ b/stage1/packages-update @@ -12,6 +12,10 @@ source ../packages-list update_packages_init +if [ ${#} -eq 1 -a "x${1}" = "xtest" ]; then + export TEST_INTEGRITY=1 +fi + # These packages are already downloaded for stage0: lpkg 0 ${GMP} lpkg 0 ${MPFR} diff --git a/stage2/packages-update b/stage2/packages-update index 01ce4d0..d1a1f37 100755 --- a/stage2/packages-update +++ b/stage2/packages-update @@ -14,6 +14,10 @@ source ../packages-list update_packages_init +if [ ${#} -eq 1 -a "x${1}" = "xtest" ]; then + export TEST_INTEGRITY=1 +fi + # These packages were already downloaded for stage0: lpkg 0 ${KERNEL} lpkg 0 ${EGLIBC} diff --git a/stage3/bootscripts/firewire b/stage3/bootscripts/firewire deleted file mode 100755 index d3aa2c0..0000000 --- a/stage3/bootscripts/firewire +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -# Source functions library -source /etc/rc.d/init.d/functions - -log_script_name "$0 $*" - -case "$1" in - start) - cmd_run_log_box "Enabling IEEE-1394 support" modprobe ieee1394 - cmd_run_log_box "Enabling OHCI IEEE-1394 support" modprobe ohci1394 - cmd_run_log_box "Enabling raw1394 library support" modprobe raw1394 - sleep 1 - cmd_run_log_box_warn "Starting IEC61883-1 fwplugd" /etc/rc.d/init.d/fwplugd start - ;; - - stop) - cmd_run_log_box_warn "Stopping IEC61883-1 fwplugd" /etc/rc.d/init.d/fwplugd stop - cmd_run_log_box "Disabling raw1394 library support" rmmod raw1394 - cmd_run_log_box "Disabling OHCI IEEE-1394 support" rmmod ohci1394 - cmd_run_log_box "Disabling IEEE-1394 support" rmmod ieee1394 - ;; - - restart) - $0 stop - sleep 1 - $0 start - ;; - - *) - echo "Usage: $0 {start|stop|restart}" - exit 1 - ;; -esac - -exit $? - diff --git a/stage3/bootscripts/fwplugd b/stage3/bootscripts/fwplugd deleted file mode 100755 index ad0a96b..0000000 --- a/stage3/bootscripts/fwplugd +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh - -prefix=/usr/local -exec_prefix=${prefix} - -# Checking if the fwplugd daemon is running. -pid=`ps ax | awk '{if (match($5, ".*/fwplugd$") || $5 == "fwplugd") print $1}'` - -# See how we were called. -case "$1" in - start) - if test "$pid" = ""; then - ${exec_prefix}/bin/fwplugd - if test $? != 0; then - echo "fwplugd: unable to start daemon." - exit 1 - fi - else - echo "fwplugd: already running." - exit 1 - fi - echo "fwplugd: started daemon." - ;; - - stop) - if test "$pid" != ""; then - kill $pid - else - echo "fwplugd: not running." - exit 1 - fi - echo "fwplugd: stopped daemon." - ;; - - restart) - $0 stop - sleep 1 - $0 start - ;; - - status) - if test "$pid" = ""; then - echo "fwplugd: not running." - else - echo "fwplugd: running." - fi - ;; - - *) - echo "Usage: $0 {start|stop|restart|status}" - exit 1 - ;; -esac - -exit $? diff --git a/stage3/cis-firewire b/stage3/cis-firewire deleted file mode 100755 index bf5e4fe..0000000 --- a/stage3/cis-firewire +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -# Grabbing latest version of 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 - -# Grabbing latest version of hv-firewire utilities -svn co http://hugovil.com:8080/svn/firewire/trunk /usr/src/hv-firewire - -cd /usr/src/libraw1394 -./autogen.sh -./configure \ - --prefix=/usr -make -make dev -make install - -cd /usr/src/libiec61883 -./autogen.sh -./configure \ - --prefix=/usr -make -make install - -cd /usr/src/hv-firewire -#./autogen.sh -#./configure \ -# --prefix=/usr -#make -#make install - -# Firewire Start/Stop script -install -v -m740 ${SCRDIR}/bootscripts/firewire /etc/rc.d/init.d - -# script-name start stop -bootscript_add_rc3 firewire 80 40 - -# Firewire plugs daemon Start/Stop script -install -v -m740 ${SCRDIR}/bootscripts/fwplugd /etc/rc.d/init.d - -chmod 740 /etc/rc.d/init.d/fwplugd - -exit $? diff --git a/stage3/packages-update b/stage3/packages-update index 35b5fe5..a2d167e 100755 --- a/stage3/packages-update +++ b/stage3/packages-update @@ -13,6 +13,10 @@ source ../packages-list update_packages_init +if [ ${#} -eq 1 -a "x${1}" = "xtest" ]; then + export TEST_INTEGRITY=1 +fi + # These packages were already downloaded for stage1: lpkg 1 ${NANO} @@ -52,17 +56,16 @@ fpkg_sf ${DDCLIENT} 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 -e "tar.gz" -s "$(get_pkg_ver ${BIND})" ${BIND} "http://gd.tuwien.ac.at/infosys/servers/isc/bind9" fpkg ${IPTABLES} "http://www.netfilter.org/projects/iptables/files" fpkg ${CURL} "http://curl.haxx.se/download" fpkg ${RSYNC} "http://samba.org/ftp/rsync/src" 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 -fpkg_mis ${UNZIP} "unzip$(get_pkg_ver ${UNZIP} | sed 's!\.!!g')" ${SOURCEFORGE_URL}/infozip -fpkg_mis ${UNRAR} "unrarsrc-$(get_pkg_ver ${UNRAR})" "http://www.rarlab.com/rar" +fpkg -f "zip$(get_pkg_ver ${ZIP} | sed 's!\.!!g')" -s "infozip" ${ZIP} ${SOURCEFORGE_URL} +fpkg -f "unzip$(get_pkg_ver ${UNZIP} | sed 's!\.!!g')" -s "infozip" ${UNZIP} ${SOURCEFORGE_URL} +fpkg -f "unrarsrc-$(get_pkg_ver ${UNRAR})" ${UNRAR} "http://www.rarlab.com/rar" fpkg_gnu ${CPIO} fpkg_gnu ${PARTED} @@ -82,8 +85,7 @@ fpkg ${PERL_MOD_XML_PARSER} "http://www.cpan.org/modules/by-module/XML" fpkg_gnome ${INTLTOOL} fpkg ${PYTHON} "http://www.python.org/ftp/python/$(get_pkg_ver ${PYTHON})" -ARCH_EXT=tgz fpkg ${SGML_COMMON} "http://gd.tuwien.ac.at/hci/kde/devel/docbook/SOURCES" -unset ARCH_EXT +fpkg -e "tgz" ${SGML_COMMON} "http://gd.tuwien.ac.at/hci/kde/devel/docbook/SOURCES" fpkg_hv ${SGML_DTD3} fpkg_hv ${SGML_DTD4} fpkg_sf ${OPENSP} "openjade" @@ -98,8 +100,8 @@ fpkg_sf ${DOCBOOK_XSL} "docbook" fpkg_sf ${XMLTOMAN} fpkg ${XMLTO} "https://fedorahosted.org/releases/x/m/xmlto" -fpkg_mis ${LIBJPEG} "jpegsrc.v$(get_pkg_ver ${LIBJPEG})" "http://www.ijg.org/files" -fpkg_mis ${LIBOPENJPEG} "openjpeg_v$(get_pkg_ver ${LIBOPENJPEG} | sed 's!\.!_!g')" "http://www.openjpeg.org" +fpkg -f "jpegsrc.v$(get_pkg_ver ${LIBJPEG})" ${LIBJPEG} "http://www.ijg.org/files" +fpkg -f "openjpeg_v$(get_pkg_ver ${LIBOPENJPEG} | sed 's!\.!_!g')" ${LIBOPENJPEG} "http://www.openjpeg.org" fpkg_sf ${LIBPNG} fpkg_gnome ${LIBART} fpkg_sf ${LIBEXIF} diff --git a/stage4/packages-update b/stage4/packages-update index 9ca5748..adb5fa5 100755 --- a/stage4/packages-update +++ b/stage4/packages-update @@ -17,67 +17,62 @@ export RCMD_NO_EXIT=1 update_packages_init +if [ ${#} -eq 1 -a "x${1}" = "xtest" ]; then + export TEST_INTEGRITY=1 +fi + lpkg 3 ${PYTHON} XORG_MODULES_LIST="${XORG_APP} ${XORG_DATA} ${XORG_DRIVER} ${XORG_FONT} ${XORG_LIB} ${XORG_PROTO} ${XORG_UTIL}" -BLFS_XORG_URL=http://anduin.linuxfromscratch.org/files/BLFS/svn/xorg -XORG_URL=http://xorg.freedesktop.org/releases/individual - for module in ${XORG_MODULES_LIST}; do MOD_NAME=$(get_pkg_name ${module}) - DEST=${LFS_PKG_DIR}/${MOD_NAME} + DEST_DIR=${LFS_PKG_DIR}/${MOD_NAME} - ARCH_EXT=wget fpkg ${module} ${BLFS_XORG_URL} - ARCH_EXT=md5 fpkg ${module} ${BLFS_XORG_URL} - unset ARCH_EXT + fpkg -d ${DEST_DIR} -e wget ${module} ${BLFS_XORG_URL} + fpkg -d ${DEST_DIR} -e md5 ${module} ${BLFS_XORG_URL} if [ "${MOD_NAME}" = "driver" ]; then # Remove unwanted drivers for ext in wget md5; do - sed -i -e '/.*xf86-video-vmware.*/d' ${LFS_PKG_DIR}/${module}.${ext} - sed -i -e '/.*xf86-video-newport.*/d' ${LFS_PKG_DIR}/${module}.${ext} - sed -i -e '/.*xf86-video-xgixp.*/d' ${LFS_PKG_DIR}/${module}.${ext} + sed -i -e '/.*xf86-video-vmware.*/d' ${LFS_PKG_DIR}/${MOD_NAME}/${module}.${ext} + sed -i -e '/.*xf86-video-newport.*/d' ${LFS_PKG_DIR}/${MOD_NAME}/${module}.${ext} + sed -i -e '/.*xf86-video-xgixp.*/d' ${LFS_PKG_DIR}/${MOD_NAME}/${module}.${ext} done fi if [ "${MOD_NAME}" = "app" ]; then # Remove unneeded apps for ext in wget md5; do - sed -i -e '/.*twm-.*/d' ${LFS_PKG_DIR}/${module}.${ext} - sed -i -e '/.*xclock-.*/d' ${LFS_PKG_DIR}/${module}.${ext} + sed -i -e '/.*twm-.*/d' ${LFS_PKG_DIR}/${MOD_NAME}/${module}.${ext} + sed -i -e '/.*xclock-.*/d' ${LFS_PKG_DIR}/${MOD_NAME}/${module}.${ext} done fi - SUBMODS="$(grep -v '^#' ${LFS_PKG_DIR}/${module}.wget | sed 's!\.tar\.bz2$!!')" + SUBMODS="$(grep -v '^#' ${LFS_PKG_DIR}/${MOD_NAME}/${module}.wget | sed 's!\.tar\.bz2$!!')" - mkdir -v -p ${DEST} >> ${LFS_LOG_FILE} 2>&1 - - export FETCH_DIR=${DEST} for submod in ${SUBMODS}; do - fpkg ${submod} ${XORG_URL}/${MOD_NAME} + fpkg_xorg ${submod} ${MOD_NAME} done - unset FETCH_DIR - pushd ${DEST} >> ${LFS_LOG_FILE} - md5sum -c ${LFS_PKG_DIR}/${module}.md5 >> ${LFS_LOG_FILE} + pushd ${DEST_DIR} >> ${LFS_LOG_FILE} + md5sum -c ${LFS_PKG_DIR}/${MOD_NAME}/${module}.md5 >> ${LFS_LOG_FILE} if [ $? -ne 0 ]; then echo " md5sum error for ${module}" fi popd >> ${LFS_LOG_FILE} done -fpkg ${LIBXAU} ${XORG_URL}/lib -fpkg ${LIBXDMCP} ${XORG_URL}/lib -fpkg_sf ${LESSTIF} -fpkg ${XBITMAPS} ${XORG_URL}/data -fpkg ${LIBPTHREAD_STUBS} http://xcb.freedesktop.org/dist -fpkg ${LIBDRM} http://dri.freedesktop.org/libdrm -fpkg ${MESALIB} ftp://ftp.freedesktop.org/pub/mesa/$(get_pkg_ver ${MESALIB}) -fpkg ${XCURSOR_THEMES} ${XORG_URL}/data -fpkg ${XKEYBOARD_CONFIG} http://xlibs.freedesktop.org/xkbdesc -fpkg ${LUIT} ${XORG_URL}/app -fpkg ${PIXMAN} "http://cairographics.org/releases" - +fpkg_xorg ${LIBXAU} lib +fpkg_xorg ${LIBXDMCP} lib +fpkg_sf ${LESSTIF} +fpkg_xorg ${XBITMAPS} data +fpkg ${LIBPTHREAD_STUBS} "http://xcb.freedesktop.org/dist" +fpkg ${LIBDRM} "http://dri.freedesktop.org/libdrm" +fpkg -s "$(get_pkg_ver ${MESALIB})" ${MESALIB} ftp://ftp.freedesktop.org/pub/mesa +fpkg_xorg ${XCURSOR_THEMES} data +fpkg ${XKEYBOARD_CONFIG} "http://xlibs.freedesktop.org/xkbdesc" +fpkg_xorg ${LUIT} app +fpkg ${PIXMAN} "http://cairographics.org/releases" fpkg ${LIBFFI} "ftp://sourceware.org/pub/libffi" fpkg ${DBUS} "http://dbus.freedesktop.org/releases/dbus" fpkg_gnome ${GLIB} @@ -87,15 +82,13 @@ fpkg ${EGGDBUS} "http://hal.freedesktop.org/releases" fpkg ${POLKIT} "http://hal.freedesktop.org/releases" fpkg ${CONSOLEKIT} "http://www.freedesktop.org/software/ConsoleKit/dist" fpkg ${POLICYKIT} "http://hal.freedesktop.org/releases" -fpkg ${HAL} http://hal.freedesktop.org/releases -fpkg ${HAL_INFO} http://hal.freedesktop.org/releases - -fpkg ${XORG_SERVER} ${XORG_URL}/xserver +fpkg ${HAL} "http://hal.freedesktop.org/releases" +fpkg ${HAL_INFO} "http://hal.freedesktop.org/releases" -fpkg ${XDM} ${XORG_URL}/app +fpkg_xorg ${XORG_SERVER} xserver +fpkg ${XDM} app -ARCH_EXT=tgz fpkg ${XTERM} ftp://invisible-island.net/xterm -unset ARCH_EXT +fpkg -e tgz ${XTERM} "ftp://invisible-island.net/xterm" fpkg ${T1LIB} "http://www.ibiblio.org/pub/Linux/libs/graphics" -- 2.20.1