From dd6b899c1e1ed61751014257aa873e1d7960549d Mon Sep 17 00:00:00 2001 From: srs5694 Date: Thu, 19 Mar 2015 20:54:32 -0400 Subject: [PATCH] Fixed a couple of Debian packaging bugs and cleaned out tabs from menu.c. --- NEWS.txt | 4 +++ debian/changelog | 6 +++++ debian/debinstall | 7 +++--- refind/menu.c | 64 +++++++++++++++++++++++------------------------ 4 files changed, 46 insertions(+), 35 deletions(-) diff --git a/NEWS.txt b/NEWS.txt index 89fae21..39316dc 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,6 +1,10 @@ 0.8.8 (3/??/2015): ------------------ +- Fixed Debian debinstall script to work correctly on IA32 systems. It had + a bug that caused filesystem drivers and gptsync to not be packaged for + IA32. + - Modified Debian postinst file to call install.sh with --localkeys option if sbsign and openssl are available, even when NOT in Secure Boot mode or if shim is not detected. This helps with my Ubuntu PPA when using custom diff --git a/debian/changelog b/debian/changelog index 9876973..f94d6ed 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +refind (0.8.7-0ppa2) trusty; urgency=medium + + * Fix Debian packaging error affecting IA32 platforms + + -- Roderick Smith Thu, 19 Mar 2015 20:25:03 -0400 + refind (0.8.7-0ppa1) trusty; urgency=medium * Version bump diff --git a/debian/debinstall b/debian/debinstall index cdbd44f..ad7af71 100755 --- a/debian/debinstall +++ b/debian/debinstall @@ -4,9 +4,9 @@ BUILD_ROOT=$1 KEYDIR=/mnt/refind UNAMEARCH=`uname -m` -if [[ $UNAMEARCH -eq "x86_64" ]] ; then +if [[ $UNAMEARCH == "x86_64" ]] ; then EFIARCH=x64 -elif [[ $UNAMEARCH -eq "i686" || $UNAMEARCH -eq "i586" || $UNAMEARCH -eq "i486" || $UNAMEARCH -eq "i386" ]] ; then +elif [[ $UNAMEARCH == "i686" || $UNAMEARCH == "i586" || $UNAMEARCH == "i486" || $UNAMEARCH == "i386" ]] ; then EFIARCH=ia32 else EFIARCH=$UNAMEARCH @@ -22,7 +22,7 @@ declare SBSign=`which sbsign 2> /dev/null` if [[ -f $KEYDIR/refind.key && -x $SBSign ]] ; then $SBSign --key $KEYDIR/refind.key --cert $KEYDIR/refind.crt --output $BUILD_ROOT/usr/share/refind/refind/refind_$EFIARCH.efi refind/refind_$EFIARCH.efi mkdir -p $BUILD_ROOT/usr/share/refind/refind/drivers_$EFIARCH - for File in `ls drivers_$EFIARCH/*_x64.efi` ; do + for File in `ls drivers_$EFIARCH/*_$EFIARCH.efi` ; do $SBSign --key $KEYDIR/refind.key --cert $KEYDIR/refind.crt --output $BUILD_ROOT/usr/share/refind/refind/$File $File done mkdir -p $BUILD_ROOT/usr/share/refind/refind/tools_$EFIARCH @@ -58,3 +58,4 @@ install -Dp -m0755 mvrefind.sh $BUILD_ROOT/usr/sbin/ cp -a banners $BUILD_ROOT/usr/share/refind/ cp -a fonts $BUILD_ROOT/usr/share/refind/ +echo "*** Exiting debinstall! ***" \ No newline at end of file diff --git a/refind/menu.c b/refind/menu.c index 55511be..a137b06 100644 --- a/refind/menu.c +++ b/refind/menu.c @@ -445,38 +445,38 @@ static UINTN RunGenericMenu(IN REFIT_MENU_SCREEN *Screen, IN MENU_STYLE_FUNC Sty MenuExit = MENU_EXIT_TIMEOUT; break; } else if (HaveTimeout || GlobalConfig.ScreensaverTime > 0) { - EFI_EVENT TimerEvent; - UINTN ElapsCount = 1; - - Status = refit_call5_wrapper(BS->CreateEvent, EVT_TIMER, 0, NULL, NULL, &TimerEvent); - if (EFI_ERROR(Status)) { - refit_call1_wrapper(BS->Stall, 100000); // Pause for 100 ms - } else { - EFI_EVENT WaitList[2]; - UINTN Index; - - refit_call3_wrapper(BS->SetTimer, TimerEvent, TimerRelative, 10000000); // 1s Timeout - WaitList[0] = ST->ConIn->WaitForKey; - WaitList[1] = TimerEvent; - Status = refit_call3_wrapper(BS->WaitForEvent, 2, WaitList, &Index); - refit_call1_wrapper(BS->CloseEvent, TimerEvent); - if (EFI_ERROR(Status)) - refit_call1_wrapper(BS->Stall, 100000); // Pause for 100 ms - else if(Index == 0) - continue; - else - ElapsCount = 10; // always counted as 1s to end of the timeout - } - TimeSinceKeystroke += ElapsCount; - if(HaveTimeout) { - TimeoutCountdown = TimeoutCountdown <= ElapsCount ? 0 : TimeoutCountdown - ElapsCount; - } else if (GlobalConfig.ScreensaverTime > 0 && - TimeSinceKeystroke > (GlobalConfig.ScreensaverTime * 10)) - { - SaveScreen(); - State.PaintAll = TRUE; - TimeSinceKeystroke = 0; - } // if + EFI_EVENT TimerEvent; + UINTN ElapsCount = 1; + + Status = refit_call5_wrapper(BS->CreateEvent, EVT_TIMER, 0, NULL, NULL, &TimerEvent); + if (EFI_ERROR(Status)) { + refit_call1_wrapper(BS->Stall, 100000); // Pause for 100 ms + } else { + EFI_EVENT WaitList[2]; + UINTN Index; + + refit_call3_wrapper(BS->SetTimer, TimerEvent, TimerRelative, 10000000); // 1s Timeout + WaitList[0] = ST->ConIn->WaitForKey; + WaitList[1] = TimerEvent; + Status = refit_call3_wrapper(BS->WaitForEvent, 2, WaitList, &Index); + refit_call1_wrapper(BS->CloseEvent, TimerEvent); + if (EFI_ERROR(Status)) + refit_call1_wrapper(BS->Stall, 100000); // Pause for 100 ms + else if(Index == 0) + continue; + else + ElapsCount = 10; // always counted as 1s to end of the timeout + } + TimeSinceKeystroke += ElapsCount; + if(HaveTimeout) { + TimeoutCountdown = TimeoutCountdown <= ElapsCount ? 0 : TimeoutCountdown - ElapsCount; + } else if (GlobalConfig.ScreensaverTime > 0 && + TimeSinceKeystroke > (GlobalConfig.ScreensaverTime * 10)) + { + SaveScreen(); + State.PaintAll = TRUE; + TimeSinceKeystroke = 0; + } // if } else { refit_call3_wrapper(BS->WaitForEvent, 1, &ST->ConIn->WaitForKey, &index); } -- 2.39.2