Bug #397947: Run depmod on new modules to avoid need to run at every boot on unionfs...
[genkernel.git] / gen_compile.sh
index 646e0efd21dccb936aeaa8e252a528b013847bfd..c92396717cd2599e2f8c2163b8b6e8172c9f4026 100755 (executable)
@@ -297,6 +297,8 @@ compile_modules() {
        export UNAME_MACHINE="${ARCH}"
        [ "${INSTALL_MOD_PATH}" != '' ] && export INSTALL_MOD_PATH
        MAKEOPTS="${MAKEOPTS} -j1" compile_generic "modules_install" kernel
+       print_info 1 "        >> Generating module dependency data..."
+       depmod -a -e -b "${INSTALL_MOD_PATH}"/lib/modules/$KV ${KV}
        unset UNAME_MACHINE
 }
 
@@ -565,40 +567,6 @@ compile_device_mapper() {
        compile_lvm
 }
 
-compile_e2fsprogs() {
-       if [ -f "${BLKID_BINCACHE}" ]
-       then
-               print_info 1 "blkid: >> Using cache"
-       else
-               [ ! -f "${E2FSPROGS_SRCTAR}" ] &&
-                       gen_die "Could not find e2fsprogs source tarball: ${E2FSPROGS_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
-               cd "${TEMP}"
-               rm -rf "${E2FSPROGS_DIR}"
-               tar -zxpf "${E2FSPROGS_SRCTAR}"
-               [ ! -d "${E2FSPROGS_DIR}" ] &&
-                       gen_die "e2fsprogs directory ${E2FSPROGS_DIR} invalid"
-               cd "${E2FSPROGS_DIR}"
-               apply_patches e2fsprogs ${E2FSPROGS_VER}
-               print_info 1 'e2fsprogs: >> Configuring...'
-               LDFLAGS=-static ./configure >> ${LOGFILE} 2>&1 ||
-                       gen_die 'Configuring e2fsprogs failed!'
-               print_info 1 'e2fsprogs: >> Compiling...'
-               MAKE=${UTILS_MAKE} MAKEOPTS="${MAKEOPTS} -j1" compile_generic "" ""
-               print_info 1 'blkid: >> Copying to cache...'
-               [ -f "${TEMP}/${E2FSPROGS_DIR}/misc/blkid" ] ||
-                       gen_die 'Blkid executable does not exist!'
-               ${UTILS_CROSS_COMPILE}strip "${TEMP}/${E2FSPROGS_DIR}/misc/blkid" ||
-                       gen_die 'Could not strip blkid binary!'
-               bzip2 "${TEMP}/${E2FSPROGS_DIR}/misc/blkid" ||
-                       gen_die 'bzip2 compression of blkid failed!'
-               mv "${TEMP}/${E2FSPROGS_DIR}/misc/blkid.bz2" "${BLKID_BINCACHE}" ||
-                       gen_die 'Could not copy the blkid binary to the package directory, does the directory exist?'
-
-               cd "${TEMP}"
-               rm -rf "${E2FSPROGS_DIR}" > /dev/null
-       fi
-}
-
 compile_fuse() {
        if [ ! -f "${FUSE_BINCACHE}" ]
        then
@@ -612,7 +580,7 @@ compile_fuse() {
                cd "${FUSE_DIR}"
                apply_patches fuse ${FUSE_VER}
                print_info 1 'fuse: >> Configuring...'
-               ./configure  --disable-kernel-module --disable-example >> ${LOGFILE} 2>&1 ||
+               ./configure --disable-example >> ${LOGFILE} 2>&1 ||
                        gen_die 'Configuring fuse failed!'
                print_info 1 'fuse: >> Compiling...'
                MAKE=${UTILS_MAKE} compile_generic "" ""
@@ -650,7 +618,7 @@ compile_unionfs_fuse() {
                apply_patches unionfs-fuse ${UNIONFS_FUSE_VER}
                print_info 1 'unionfs-fuse: >> Compiling...'
                sed -i "/^\(CFLAGS\|CPPFLAGS\)/s:^\\(.*\\)$:\\1 -static -I${TEMP}/${FUSE_DIR}/include -L${TEMP}/${FUSE_DIR}/lib/.libs:" Makefile src/Makefile
-               sed -i "/^LIB = /s:^LIB = \(.*\)$:LIB = -static -L${TEMP}/${FUSE_DIR}/lib/.libs \1 -ldl -lrt:" Makefile src/Makefile
+               sed -i "/^LIB = /s:^LIB = \(.*\)$:LIB = -static -L${TEMP}/${FUSE_DIR}/lib/.libs \1 -ldl -lpthread -lrt:" Makefile src/Makefile
                MAKE=${UTILS_MAKE} compile_generic "" ""
                print_info 1 'unionfs-fuse: >> Copying to cache...'
                [ -f "${TEMP}/${UNIONFS_FUSE_DIR}/src/unionfs" ] ||