Hello community, here is the log from the commit of package perl-Bootloader for openSUSE:Factory checked in at 2016-07-28 23:44:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Bootloader (Old) and /work/SRC/openSUSE:Factory/.perl-Bootloader.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Bootloader" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Bootloader/perl-Bootloader.changes 2016-05-13 09:22:15.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Bootloader.new/perl-Bootloader.changes 2016-07-28 23:44:10.000000000 +0200 @@ -1,0 +2,13 @@ +Fri Jul 22 14:50:18 UTC 2016 - snw...@suse.com + +- also clear LC_ALL when setting locale +- run grub in RC_LANG locale taken from sysconfig (bsc#985946) +- 0.915 + +------------------------------------------------------------------- +Fri Jul 22 14:27:23 UTC 2016 - snw...@suse.com + +- ensure trusted boot setting is used (fate#316553) +- 0.914 + +------------------------------------------------------------------- Old: ---- perl-Bootloader-0.913.tar.xz New: ---- perl-Bootloader-0.915.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Bootloader.spec ++++++ --- /var/tmp/diff_new_pack.faTpzO/_old 2016-07-28 23:44:11.000000000 +0200 +++ /var/tmp/diff_new_pack.faTpzO/_new 2016-07-28 23:44:11.000000000 +0200 @@ -17,7 +17,7 @@ Name: perl-Bootloader -Version: 0.913 +Version: 0.915 Release: 0 Requires: coreutils Requires: perl-base = %{perl_version} ++++++ perl-Bootloader-0.913.tar.xz -> perl-Bootloader-0.915.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.913/VERSION new/perl-Bootloader-0.915/VERSION --- old/perl-Bootloader-0.913/VERSION 2016-05-11 13:56:11.000000000 +0200 +++ new/perl-Bootloader-0.915/VERSION 2016-07-22 16:49:01.000000000 +0200 @@ -1 +1 @@ -0.913 +0.915 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.913/changelog new/perl-Bootloader-0.915/changelog --- old/perl-Bootloader-0.913/changelog 2016-05-11 13:56:11.000000000 +0200 +++ new/perl-Bootloader-0.915/changelog 2016-07-22 16:49:01.000000000 +0200 @@ -1,3 +1,10 @@ +2016-07-22: 0.915 + - also clear LC_ALL when setting locale + - run grub in RC_LANG locale taken from sysconfig (bsc #985946) + +2016-07-22: 0.914 + - ensure trusted boot setting is used (fate #316553) + 2016-05-09: 0.913 - Don't install grub2-efi during installation (bsc #979145) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.913/grub2/config new/perl-Bootloader-0.915/grub2/config --- old/perl-Bootloader-0.913/grub2/config 2016-05-11 13:56:11.000000000 +0200 +++ new/perl-Bootloader-0.915/grub2/config 2016-07-22 16:49:01.000000000 +0200 @@ -1,5 +1,12 @@ #! /bin/bash +# Settings from /etc/sysconfig/filename are available as environment vars +# with the name 'SYS__FILENAME__KEY' (filename converted to upper case). +# +# Not all files are parsed, current list is: +# bootloader, language +# + if [ -x /usr/sbin/grub2-mkconfig ] ; then if [ -d /boot/grub2 ] ; then ( set -x ; /usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.913/grub2/install new/perl-Bootloader-0.915/grub2/install --- old/perl-Bootloader-0.913/grub2/install 2016-05-11 13:56:11.000000000 +0200 +++ new/perl-Bootloader-0.915/grub2/install 2016-07-22 16:49:01.000000000 +0200 @@ -1,5 +1,12 @@ #! /bin/bash +# Settings from /etc/sysconfig/filename are available as environment vars +# with the name 'SYS__FILENAME__KEY' (filename converted to upper case). +# +# Not all files are parsed, current list is: +# bootloader, language +# + target=$(uname --hardware-platform) if [ -z "$target" ] ; then @@ -24,8 +31,12 @@ if [ "$target" = "powerpc-ieee1275" ] ; then grep -q PowerNV /proc/cpuinfo && exit 0 fi -err=0 +if [ "$SYS__BOOTLOADER__TRUSTED_BOOT" = yes -a -d "/usr/lib/trustedgrub2/$target" ] ; then + trusted="--directory=/usr/lib/trustedgrub2/$target" +fi + +err=0 if [ -x /usr/sbin/grub2-install ] ; then if [ "$needs_installdevice" = 1 ] ; then if [ -r /etc/default/grub_installdevice ] ; then @@ -33,7 +44,7 @@ # ignore everything that doesn't look like a path [ "${device::1}" != "/" ] && continue if [ -b "$device" -o -f "$device" ] ; then - ( set -x ; /usr/sbin/grub2-install --target="$target" --force --skip-fs-probe "$device" ) || err=1 + ( set -x ; /usr/sbin/grub2-install $trusted --target="$target" --force --skip-fs-probe "$device" ) || err=1 else echo "$device: not a block device" err=1 @@ -44,7 +55,7 @@ err=1 fi else - ( set -x ; /usr/sbin/grub2-install --target="$target" ) + ( set -x ; /usr/sbin/grub2-install $trusted --target="$target" ) fi else echo "grub2-install: command not found" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.913/grub2-efi/install new/perl-Bootloader-0.915/grub2-efi/install --- old/perl-Bootloader-0.913/grub2-efi/install 2016-05-11 13:56:11.000000000 +0200 +++ new/perl-Bootloader-0.915/grub2-efi/install 2016-07-22 16:49:01.000000000 +0200 @@ -1,5 +1,12 @@ #! /bin/bash +# Settings from /etc/sysconfig/filename are available as environment vars +# with the name 'SYS__FILENAME__KEY' (filename converted to upper case). +# +# Not all files are parsed, current list is: +# bootloader, language +# + target=$(uname --hardware-platform) if [ -z "$target" ] ; then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.913/pbl new/perl-Bootloader-0.915/pbl --- old/perl-Bootloader-0.913/pbl 2016-05-11 13:56:11.000000000 +0200 +++ new/perl-Bootloader-0.915/pbl 2016-07-22 16:49:01.000000000 +0200 @@ -31,8 +31,8 @@ sub pbl_usage; sub new; sub log_msg; -sub get_bootloader; sub run_command; +sub read_sysconfig; my $program; my $log; @@ -166,24 +166,6 @@ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -sub get_bootloader -{ - my $bl; - - if(open my $f, "/etc/sysconfig/bootloader") { - while(<$f>) { - $bl = $1, last if /^LOADER_TYPE=(\S*)/; - } - close $f; - } - - $bl =~ s/^["']|["']$//g; - - return $bl; -} - - -# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - sub run_command { my $ret; @@ -192,6 +174,7 @@ my $command = join " ", @_; if(open my $f, "-|") { + binmode $f, ':utf8'; local $/; $output = <$f>; close $f; @@ -216,9 +199,38 @@ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# read_sysconfig(FILENAME) +# +# Read sysconfig settings and convert them into environment vars of the form: +# +# SYS__FILENAME__KEY=value +# +sub read_sysconfig +{ + my $file = $_[0]; + + if(open my $f, "/etc/sysconfig/$file") { + while(<$f>) { + if(/^([A-Z_]+)=(.*?)\s*$/) { + my $key = $1; + my $val = $2; + $val =~ s/^(["'])(.*)\1$/$2/g; + $ENV{"SYS__\U$file\E__$key"} = $val; + } + } + close $f; + } +} + + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ($program = $0) =~ s#^.*/##; -$loader = get_bootloader; +# get settings relevant for us +read_sysconfig "bootloader"; +read_sysconfig "language"; + +$loader = $ENV{SYS__BOOTLOADER__LOADER_TYPE}; if($program eq 'pbl') { GetOptions( @@ -240,6 +252,14 @@ exit 0 if !$loader; +my $lang = $ENV{SYS__LANGUAGE__RC_LANG}; +if(defined $lang) { + log_msg(1, "locale = $lang"); + delete $ENV{LC_MESSAGES}; + delete $ENV{LC_ALL}; + $ENV{LANG} = $lang; +} + if($program ne 'pbl') { # compat: update-bootloader or bootloader_entry push @todo, [ 'config' ]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.913/u-boot/config new/perl-Bootloader-0.915/u-boot/config --- old/perl-Bootloader-0.913/u-boot/config 2016-05-11 13:56:11.000000000 +0200 +++ new/perl-Bootloader-0.915/u-boot/config 2016-07-22 16:49:01.000000000 +0200 @@ -1,5 +1,12 @@ #!/bin/bash +# Settings from /etc/sysconfig/filename are available as environment vars +# with the name 'SYS__FILENAME__KEY' (filename converted to upper case). +# +# Not all files are parsed, current list is: +# bootloader, language +# + function print_entry { local label=$1 local zimage=$2