Merge branch 'fix-docache'
authorSebastian Pipping <sebastian@pipping.org>
Fri, 30 Mar 2012 17:32:40 +0000 (19:32 +0200)
committerSebastian Pipping <sebastian@pipping.org>
Fri, 30 Mar 2012 17:32:40 +0000 (19:32 +0200)
Conflicts:
ChangeLog

ChangeLog
defaults/initrd.defaults
defaults/initrd.scripts
gen_funcs.sh
gen_initramfs.sh
genkernel

index f83809bbb04c27691a759e5051d5ef201826d9d0..912f7b7200d084072c7c820cf6a6c2886eb580e9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,10 +5,28 @@
 # Distributed under the GPL v2
 # $Id$
 
-  17 Mar 2012; Sebastian Pipping <sping@gentoo.org> defaults/initrd.scripts,
+  29 Mar 2012; Sebastian Pipping <sping@gentoo.org> defaults/initrd.scripts:
+  Restore original /dev/tty after GPG (bug #410073), report and initial patch
+  by Brendan Pike
+
+  22 Mar 2012; Sebastian Pipping <sping@gentoo.org> genkernel:
+  Bump version to 3.4.27
+
+  22 Mar 2012; Sebastian Pipping <sping@gentoo.org> gen_initramfs.sh:
+  Fail hard on LUKS inclusion error (bug #409277), advise about
+  sys-fs/cryptsetup[static], drop support for cryptsetup binary from /bin/
+
+  22 Mar 2012; Sebastian Pipping <sping@gentoo.org> gen_funcs.sh,
+  gen_initramfs.sh:
+  Make errors stand out more
+
+  22 Mar 2012; Sebastian Pipping <sping@gentoo.org> defaults/initrd.scripts,
   defaults/linuxrc:
   Fix docache (bug #397309)
 
+  22 Mar 2012; Sebastian Pipping <sping@gentoo.org> genkernel:
+  Bump version to 3.4.26
+
   16 Mar 2012; Sebastian Pipping <sping@gentoo.org> defaults/initrd.scripts,
   defaults/linuxrc:
   Drop into debug shell when squashfs could not be mounted
index 8be54a9346c29e63934d010e282802f5247c53b4..73fe4c96c9f3d08ff93abe3d320916c022b65fbb 100755 (executable)
@@ -81,4 +81,4 @@ DEFAULT_NFSOPTIONS="ro,nolock,rsize=1024,wsize=1024"
 # Only sections that are in by default or those that
 # are not module groups need to be defined here...
 HWOPTS='keymap cache modules pata sata scsi usb firewire waitscan slowusb lvm dmraid mdadm fs net'
-MY_HWOPTS='modules pata sata scsi slowusb usb firewire waitscan dmraid mdadm fs net iscsi'
+MY_HWOPTS='modules pata sata scsi slowusb usb firewire waitscan dmraid mdadm fs net iscsi crypto'
index 350de4a7a19e8da5adc712abbd1f8e74260b81b8..6d27a00f97c85014aaeee2900094e56eb3dc7a03 100755 (executable)
@@ -879,7 +879,13 @@ openLUKS() {
                                fi
                                # At this point, keyfile or not, we're ready!
                                crypt_filter "${gpg_cmd}cryptsetup ${cryptsetup_options} luksOpen ${LUKS_DEVICE} ${LUKS_NAME}"
-                               if [ $? -eq 0 ]
+                               crypt_filter_ret=$?
+
+                               [ -e /dev/tty.org ] \
+                                       && rm -f /dev/tty \
+                                       && mv /dev/tty.org /dev/tty
+
+                               if [ ${crypt_filter_ret} -eq 0 ]
                                then
                                        good_msg "LUKS device ${LUKS_DEVICE} opened" ${CRYPT_SILENT}
                                        break
index 739311b915eb9c325628cec627dc6147c449e43b..f1990140fee9a7482fbd43ecc82c349bc294ef60 100755 (executable)
@@ -204,29 +204,30 @@ gen_die() {
        then
                print_error 1 "ERROR: ${1}"
        fi
-       echo
-       print_info 1 "-- Grepping log... --"
-       echo
+       print_error 1 ''
+       print_error 1 "-- Grepping log... --"
+       print_error 1 ''
 
        if isTrue ${USECOLOR}
        then
-               GREP_COLOR='1' grep -B5 -E --colour=always "([Ww][Aa][Rr][Nn][Ii][Nn][Gg]|[Ee][Rr][Rr][Oo][Rr][ :,!]|[Ff][Aa][Ii][Ll][Ee]?[Dd]?)" ${LOGFILE}
+               GREP_COLOR='1' grep -B5 -E --colour=always "([Ww][Aa][Rr][Nn][Ii][Nn][Gg]|[Ee][Rr][Rr][Oo][Rr][ :,!]|[Ff][Aa][Ii][Ll][Ee]?[Dd]?)" ${LOGFILE} \
+                               | sed -s "s|^\(*\)\?|${BAD}*${NORMAL}|"
        else
                grep -B5 -E "([Ww][Aa][Rr][Nn][Ii][Nn][Gg]|[Ee][Rr][Rr][Oo][Rr][ :,!]|[Ff][Aa][Ii][Ll][Ee]?[Dd]?)" ${LOGFILE}
        fi
-       echo
-       print_info 1 "-- End log... --"
-       echo
-       print_info 1 "Please consult ${LOGFILE} for more information and any"
-       print_info 1 "errors that were reported above."
-       echo
-       print_info 1 "Report any genkernel bugs to bugs.gentoo.org and"
-       print_info 1 "assign your bug to genkernel@gentoo.org. Please include"
-       print_info 1 "as much information as you can in your bug report; attaching"
-       print_info 1 "${LOGFILE} so that your issue can be dealt with effectively."
-       print_info 1 ''
-       print_info 1 'Please do *not* report compilation failures as genkernel bugs!'
-       print_info 1 ''
+       print_error 1 ''
+       print_error 1 "-- End log... --"
+       print_error 1 ''
+       print_error 1 "Please consult ${LOGFILE} for more information and any"
+       print_error 1 "errors that were reported above."
+       print_error 1 ''
+       print_error 1 "Report any genkernel bugs to bugs.gentoo.org and"
+       print_error 1 "assign your bug to genkernel@gentoo.org. Please include"
+       print_error 1 "as much information as you can in your bug report; attaching"
+       print_error 1 "${LOGFILE} so that your issue can be dealt with effectively."
+       print_error 1 ''
+       print_error 1 'Please do *not* report compilation failures as genkernel bugs!'
+       print_error 1 ''
 
        # Cleanup temp dirs and caches if requested
        cleanup
index 9a17b3a1ac9ac595d263b704a90bb3a9afffd6a3..419d557ec80b876d23bfce7a7ac60152703a42a0 100755 (executable)
@@ -391,6 +391,10 @@ append_overlay(){
 }
 
 append_luks() {
+       local _luks_error_format="LUKS support cannot be included: %s.  Please emerge sys-fs/cryptsetup[static]."
+       local _luks_source=/sbin/cryptsetup
+       local _luks_dest=/sbin/cryptsetup
+
        if [ -d "${TEMP}/initramfs-luks-temp" ]
        then
                rm -r "${TEMP}/initramfs-luks-temp/"
@@ -402,20 +406,15 @@ append_luks() {
 
        if isTrue ${LUKS}
        then
-               if is_static /bin/cryptsetup
-               then
-                       print_info 1 "Including LUKS support"
-                       cp /bin/cryptsetup ${TEMP}/initramfs-luks-temp/sbin/cryptsetup
-                       chmod +x "${TEMP}/initramfs-luks-temp/sbin/cryptsetup"
-               elif is_static /sbin/cryptsetup
-               then
-                       print_info 1 "Including LUKS support"
-                       cp /sbin/cryptsetup ${TEMP}/initramfs-luks-temp/sbin/cryptsetup
-                       chmod +x "${TEMP}/initramfs-luks-temp/sbin/cryptsetup"
-               else
-                       print_info 1 "LUKS support requires static cryptsetup at /bin/cryptsetup or /sbin/cryptsetup"
-                       print_info 1 "Not including LUKS support"
-               fi
+               [ -x "${_luks_source}" ] \
+                               || gen_die "$(printf "${_luks_error_format}" "no file ${_luks_source}")"
+
+               is_static "${_luks_source}" \
+                               || gen_die "$(printf "${_luks_error_format}" "${_luks_source} not a static binary")"
+
+               print_info 1 "Including LUKS support"
+               cp "${_luks_source}" ${TEMP}/initramfs-luks-temp${_luks_dest}
+               chmod +x "${TEMP}/initramfs-luks-temp${_luks_dest}"
        fi
 
        find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \
index 74f6eda44c567253b4e33f2451a3dfbc1b26548a..d8ff5afed262643a0f5711cd8e8f949feb2a5077 100755 (executable)
--- a/genkernel
+++ b/genkernel
@@ -2,7 +2,7 @@
 # $Id$
 
 PATH="${PATH}:/sbin:/usr/sbin"
-GK_V='3.4.25.1'
+GK_V='3.4.27'
 
 # Set the default for TMPDIR.  May be modified by genkernel.conf or the
 # --tempdir command line option.