Hello community, here is the log from the commit of package perl-Bootloader for openSUSE:Factory checked in at 2015-08-15 11:39:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2015-07-21 13:25:54.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Bootloader.new/perl-Bootloader.changes 2015-08-15 11:39:18.000000000 +0200 @@ -1,0 +2,7 @@ +Fri Aug 14 16:06:08 CEST 2015 - snw...@suse.com + +- update git2log script to latest version +- remove no longer needed quotes (bsc#940486) +- 0.840 + +------------------------------------------------------------------- Old: ---- perl-Bootloader-0.839.tar.xz New: ---- perl-Bootloader-0.840.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Bootloader.spec ++++++ --- /var/tmp/diff_new_pack.3umXPE/_old 2015-08-15 11:39:19.000000000 +0200 +++ /var/tmp/diff_new_pack.3umXPE/_new 2015-08-15 11:39:19.000000000 +0200 @@ -17,7 +17,7 @@ Name: perl-Bootloader -Version: 0.839 +Version: 0.840 Release: 0 Requires: coreutils Requires: perl-base = %{perl_version} ++++++ perl-Bootloader-0.839.tar.xz -> perl-Bootloader-0.840.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.839/VERSION new/perl-Bootloader-0.840/VERSION --- old/perl-Bootloader-0.839/VERSION 2015-07-20 11:02:56.000000000 +0200 +++ new/perl-Bootloader-0.840/VERSION 2015-08-14 16:05:09.000000000 +0200 @@ -1 +1 @@ -0.839 +0.840 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.839/changelog new/perl-Bootloader-0.840/changelog --- old/perl-Bootloader-0.839/changelog 2015-07-20 11:02:56.000000000 +0200 +++ new/perl-Bootloader-0.840/changelog 2015-08-14 16:05:09.000000000 +0200 @@ -1,3 +1,7 @@ +2015-08-14: 0.840 + - update git2log script to latest version + - remove no longer needed quotes (bsc #940486) + 2015-07-20: 0.839 - do not escape empty string as it lead to invalid kernel command line (bnc #937806) @@ -14,10 +18,10 @@ - Allow to setup disabling of recovery section (fate #317016) 2015-06-03: 0.834 - - Escape dollar signs (bsc#857556) + - Escape dollar signs (bsc #857556) 2015-04-29: 0.833 - - Escape/unescape special characters on write/read (bsc#831791) + - Escape/unescape special characters on write/read (bsc #831791) 2015-04-22: 0.832 - started pbl-yaml testsuite @@ -333,7 +337,7 @@ - remove unneeded script ( SLE only ) - fix small issues in packaging - adapt package target for git - add snwint fixes which was not in git + - add snwint fixes which was not in git - version dump - add test for finding fitting section - change behavior during kernel update to first try use arameters from fitting section and have sysconfig only as failsafe (FATE#310946) @@ -366,7 +370,6 @@ - explicitelly mention that output come from pbl (bnc #597810) - fix problatic fix for product name (bnc #583034) - missing changes from RC3 - - commit changes - create failsafe also on s390x - fix key for check presence - fix precedence problem with and (bnc #592248) @@ -471,7 +474,7 @@ - add missing keyword to hashed password (bnc #598025) 2010-04-22: 0.5.11 - release 0.5.11 + - release 0.5.11 - adapt to new kernel which use only ext_range (bnc #597774) - explicitelly mention that output come from pbl (bnc #597810) - port changes from SP1 - avoid warning if path is not used and create failsafe also on s390 @@ -533,7 +536,7 @@ 2009-06-02: 0.5.2 - dump version 0.5.2 - metadata removal, suppres multipath warning when kernel module for multipath is not loaded (BNC#406742), improve partition fallback for grub - add test for adding memorytest section + - add test for adding memorytest section - don't warn during finding extended partition on non-logical drive (bnc #504083) - fix examine bug, examine duplicate warning, ppc build and dump @@ -571,7 +574,7 @@ - remove unneeded parted as it is causes performance problems. Correctly handle /sys/block for partition on mdraid devices - imrpove logging of dmraid detection - clean obsolete thinks from tools - improve reading dmraids + - improve reading dmraids - fix spaces in fstab and optimalize regex - implement filling udev mapping. Improve Tools logging - change time to store backup to 6 hours @@ -582,7 +585,7 @@ - few minot improvements in Core.pm - switch to new logging system - remove obsolete keys - fix compile and obsolete test in test-suite + - fix compile and obsolete test in test-suite - remove pcr and measures as PCR is hardcoded in trusted grub and measures is stored in initrd 2011-08-01: 0.4.89.28 @@ -647,9 +650,6 @@ - fix problatic fix for product name (bnc #583034) - missing changes from RC3 -2010-04-20: 0.4.89.13 - - commit changes - 2010-04-08: 0.4.89.12 - create failsafe also on s390x - fix key for check presence @@ -758,10 +758,10 @@ - generate man page for update-Bootloader (bnc #450880) - improve logging - properly enclose argumetns to command (bnc #447591) - fix parsing multipath output to conform more types (bnc #448110) + - fix parsing multipath output to conform more types (bnc #448110) - fix creating multipath map - fix mapping of multipath (bnc #448110) - add to test suite problem with menu section + - add to test suite problem with menu section - fix menu section in grub (bnc #449863) 2008-11-27: 0.4.80 @@ -782,7 +782,7 @@ - improve logging of detection DM RAID1 - prevent more then one serial console, also add another console test case to test suite. - improve logging, remove uncommented code and ensure using keywords in correct sections - add new doc to spec file + - add new doc to spec file - add readme to boot directory - improve logging, also export script @@ -790,9 +790,9 @@ - Version bump and allow skip during mounted boot detection. - improve logging - improve logging if more then once add same image - ignore keys image, xen and initrd in chainloader section (bnc #441463) + - ignore keys image, xen and initrd in chainloader section (bnc #441463) - add warning to MBR module, that it is experimental - document path module and improve script to generate doc + - document path module and improve script to generate doc - add to makefile automatic doc generation - properly document none bootloader - clean code...remove resolving symlinks, this need properly testing (now is Vbox broken) @@ -807,15 +807,14 @@ - fix bug with xen kernel in xen enviroment (bnc #436899); increase logging of input/ouput in/from library. 2008-10-23: 0.4.76 - commit last version bump - improve logging - add hack for live installation (bnc #432699) 2008-10-09: 0.4.74 - version bump (0.4.74) + - version bump (0.4.74) - add support for xen to elilo, as elilo now must work also on x86_64 - fix pattern to confirm mounted /boot (bnc #433835) - - add loggging for removing non-existing initrd (bnc 427854 + - add loggging for removing non-existing initrd (bnc #427854 - fix warning in metadata - improve selecting root devices (bnc #433347) - fix last commit, it had bad type @@ -879,7 +878,7 @@ - fix grub warning about ==, fix bnc #396142 (doubling configfile section) - add measure line for trusted grub (fate), add tests for trusted grub - add first write test, fix problem in sprintf with long console - add tests for zipl, prepare for writing tests + - add tests for zipl, prepare for writing tests 2008-08-15: 0.4.68 - version dump @@ -917,7 +916,7 @@ - implement remap and makeactive (FATE #301994) - fix translate GrubDev2UnixDev if input is disk (e.g. /dev/sda) - add some logging input - add initial testsuite + - add initial testsuite - fix hash key for device map - dump to log block devices on strange systems (bnc #339802) - bootloader_entry: fail also if refresh after add or remove fail (still unbootable system if uninstall old kernel). @@ -1286,9 +1285,6 @@ IsDMDevice() and IsDMRaidSlave() in Tools.pm - Fixed typo in Tools.pm - Corrected resolution of symlinks in Tools.pm (bnc #244033) - - Adapted EFI Bootloader Label code in ELILO.pm (bnc #242985) - - > Renamed "boot_efilabel" flag to "efilabel" - - > Removed "boot_rm_efilabel" flag because it's now obsolete - Cosmetic correction in Tools.pm - Improved error handling in Tools.pm - Fixed 'uname' call in Tools.pm due to return of false @@ -1300,14 +1296,6 @@ retrieve mountpoints of grub devices - Fixed functions GrubDev2UnixDev(), UnixDev2GrubDev(), GrubPath2UnixPath() and ParseLines() in GRUB.pm - - Added wrapper for GrubDev2UnixDev() to Library.pm to be able to - call it from Tools.pm - - Fixed functions ReadDMRaidPartitions(), IsDMRaidSlave(), - Udev2MajMin() and AddSection() in Tools.pm - - Commented out obsolete code in GetSectionList() and - RemoveSections() in Tools.pm - - Fixed 'uname' call in update-bootloader due to return of false - architectures (e.g. i586 instead of i386) - Corrected mechanism for removal of sections in Tools.pm - part 2 - Corrected mechanism for removal of sections in Tools.pm - fixed typo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.839/git2log new/perl-Bootloader-0.840/git2log --- old/perl-Bootloader-0.839/git2log 2015-07-20 11:02:56.000000000 +0200 +++ new/perl-Bootloader-0.840/git2log 2015-08-14 16:05:09.000000000 +0200 @@ -1,5 +1,7 @@ #! /usr/bin/perl +use strict; + use Getopt::Long; use Data::Dumper; @@ -8,27 +10,43 @@ $Data::Dumper::Indent = 1; sub usage; +sub get_branch_tags; +sub get_branch; +sub get_parent_branch; +sub get_version; usage 0 if !@ARGV; -@deps = qw ( .git/HEAD .git/refs/heads .git/refs/tags ); +my @deps = qw ( .git/HEAD .git/refs/heads .git/refs/tags ); + +my $branch; +my $current_version; +my @tags; +my @all_tags; + +my $opt_log; +my $opt_version; +my $opt_branch; +my $opt_update; +my $opt_file; GetOptions( 'help' => sub { usage 0 }, 'version' => \$opt_version, + 'branch' => \$opt_branch, 'update' => \$opt_update, 'log|changelog' => \$opt_log, ) || usage 1; -usage 1 if @ARGV > 1 || !($opt_log || $opt_version); +usage 1 if @ARGV > 1 || !($opt_log || $opt_version || $opt_branch); $opt_file = @ARGV ? shift : '-'; die "no git repo\n" unless -d ".git"; if($opt_update && $opt_file ne '-' && -f($opt_file)) { - $ok = 1; + my $ok = 1; - $t = (stat $opt_file)[9]; + my $t = (stat $opt_file)[9]; for (@deps) { $ok = 0 if (stat)[9] > $t; @@ -37,57 +55,51 @@ exit 0 if $ok; } -for (`git branch`) { - if(/^\*\s+(\S+)/) { - $branch = $1; - last; - } -} - -$branch = "master" if $branch eq '(no'; +@all_tags = `git tag`; +chomp @all_tags; +$branch = get_branch; die "no branch?\n" unless $branch; -# print STDERR "writing log for branch $branch\n"; - -@tags = `git tag`; +@tags = get_branch_tags; +die "no tags at all?\n" unless @tags; -chomp @tags; +if($branch ne 'master') { + if(!grep { /^$branch\-/ } @tags) { + $branch = get_parent_branch; + die "sorry, can't determine branch\n" unless $branch; -for (@tags) { - if(/^\d/) { - s/(\d+)/sprintf "%04d", $1/eg; - push @ntags, $_; - } - elsif(s/^$branch\-//) { - s/(\d+)/sprintf "%04d", $1/eg; - push @ntags, "$branch-$_"; + @tags = get_branch_tags; + die "no tags at all?\n" unless @tags; } } +else { + @tags = get_branch_tags; + die "no tags at all?\n" unless @tags; +} -@tags = sort @ntags; - -die "no tags at all?\n" unless @tags; - -$current_version = $tags[-1]; -$current_version =~ s/(\d+)/$1 + 0/eg; +if($opt_branch) { + open my $f, ">$opt_file"; + print $f "$branch\n"; + close $f; -if(`git log --pretty=medium --date=iso '$current_version..HEAD'`) { - $current_version =~ s/(\d+)$/$1 + 1/e; + exit 0; } -$current_version =~ s/^$branch\-//; +$current_version = get_version; if($opt_version) { - open F, ">$opt_file"; - print F "$current_version\n"; - close F; + open my $f, ">$opt_file"; + print $f "$current_version\n"; + close $f; exit 0; } if($branch ne 'master') { - for ($i = 0; $i < @tags; $i++) { + my ($i1, $i2, $bi); + + for (my $i = 0; $i < @tags; $i++) { if($tags[$i] =~ /^$branch\-(\S+)/) { $i2 = $i; $bi = $1; @@ -99,7 +111,7 @@ warn "no tags in this branch yet\n" unless $bi; - for ($i = 0; $i < $i2; $i++) { + for (my $i = 0; $i < $i2; $i++) { if($tags[$i] ge $bi) { if($tags[$i] eq $bi) { $i1 = $i; @@ -122,14 +134,14 @@ open F, ">$opt_file"; -for ($i = @tags - 1; $i > 0; $i--) { - $date = undef; - @t = `git log --pretty=medium --date=iso '$tags[$i-1]..$tags[$i]'`; +for (my $i = @tags - 1; $i > 0; $i--) { + my ($date, @t2); + + my @t = `git log --pretty=medium --date=iso '$tags[$i-1]..$tags[$i]'`; # print "\n--- $tags[$i-1]..$tags[$i] ---\n", @t, "---\n"; - undef @t2; - $merge = 0; + my $merge = 0; for (@t) { $merge = 1 if /^Merge: /; $merge = 0 if /^commit /; @@ -138,15 +150,13 @@ @t = @t2; undef @t2; - $detail = 0; + my $detail = 0; for (@t) { $detail = 1 if /^ $/; + $detail = 2 if /^ Conflicts:$/; $detail = 0 if /^commit /; - if($detail && /^ [^\-\s]/) { - # push @t2, "# $_"; - } - else { - push @t2, $_; + if(!$detail) { + push @t2, $_ if $detail < 2; } } @t = @t2; @@ -160,10 +170,21 @@ last; } } + + # handle white space in every first line once and for all + my $empty = 1; + for (@t) { + $empty = 1, $_ = "", next if $_ =~ /^\s*$/; + next if !$empty; + s/^\s*//; + $empty = 0; + } + @t = grep { !/^(commit|Author:|Date:|Merge:|\s*$)|created.*tag/ } @t; if(@t) { # rewrite a bit to have it look more consistent - map { s/(fate|bnc)#/$1 #/g } @t; + map { s/(fate|bnc|bsc)#/$1 #/g } @t; + map { s/(fate|bnc|bsc)\s*(\d{4})/$1 #$2/g } @t; map { s/\(#/(bnc #/g } @t; map { s/bug\s*#/bnc #/g } @t; map { s/feat(\.|ure)?\s*#?(\d+)/fate #$2/g } @t; @@ -175,9 +196,9 @@ map { s/^/\t/ } @t; map { s/\\'/'/ } @t; -# print "\n--- $tags[$i-1]..$tags[$i] ---\n", join("\n", @t); + # print "\n--- $tags[$i-1]..$tags[$i] ---\n", join("\n", @t); - $t = $tags[$i]; + my $t = $tags[$i]; $t = "${branch}-$t" if $branch ne 'master' && $t eq "HEAD"; $t =~ s/HEAD/$current_version/; print F "$date:\t$t\n"; @@ -187,6 +208,8 @@ close F; + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - sub usage { my $err = shift; @@ -196,6 +219,7 @@ Create changelog and project version from git repo. --changelog Write changelog to FILE. --version Write version number to FILE. + --branch Write current branch to FILE. --update Write changelog or version only if FILE is outdated. --help Print this help text. usage @@ -203,3 +227,72 @@ exit $err; } + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +sub get_branch_tags +{ + my @ntags; + + for (@all_tags) { + if(/^\d/) { + s/(\d+)/sprintf "%04d", $1/eg; + push @ntags, $_; + } + elsif(s/^$branch\-//) { + s/(\d+)/sprintf "%04d", $1/eg; + push @ntags, "$branch-$_"; + } + } + + return sort @ntags; +} + + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +sub get_branch +{ + my $b; + + for (`git branch`) { + if(/^\*\s+(\S+)/) { + $b = $1; + last; + } + } + + $b = "master" if $b eq '(no'; + + return $b; +} + + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +sub get_parent_branch +{ + my $p; + + for (`git log -g --pretty=oneline`) { + $p = $1 if /checkout: moving from (\S+) to $branch/; + } + + # print "parent = $p\n"; + + return $p || "master"; +} + + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +sub get_version +{ + my $v = $tags[-1]; + $v =~ s/(\d+)/$1 + 0/eg; + + if(`git log --pretty=medium --date=iso '$v..HEAD'`) { + $v =~ s/(\d+)$/$1 + 1/e; + } + + $v =~ s/^$branch\-//; + + return $v; +} + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.839/src/Core/GRUB2.pm new/perl-Bootloader-0.840/src/Core/GRUB2.pm --- old/perl-Bootloader-0.839/src/Core/GRUB2.pm 2015-07-20 11:02:56.000000000 +0200 +++ new/perl-Bootloader-0.840/src/Core/GRUB2.pm 2015-08-14 16:05:09.000000000 +0200 @@ -873,7 +873,7 @@ @lines = ( { 'key' => 'GRUB_DISTRIBUTOR', - 'value' => '"openSUSE"', + 'value' => 'openSUSE', 'comment_before' => [ '# If you change this file, run \'grub2-mkconfig -o /boot/grub2/grub.cfg\' afterwards to update', '# /boot/grub2/grub.cfg.' @@ -912,7 +912,7 @@ }, { 'key' => '@GRUB_BADRAM', - 'value' => '"0x01234567,0xfefefefe,0x89abcdef,0xefefefef"', + 'value' => '0x01234567,0xfefefefe,0x89abcdef,0xefefefef', 'comment_before' => [ '# Uncomment to enable BadRAM filtering, modify to suit your needs', '# This works with Linux (no patch required) and with any kernel that obtains', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.839/src/Core/GRUB2EFI.pm new/perl-Bootloader-0.840/src/Core/GRUB2EFI.pm --- old/perl-Bootloader-0.839/src/Core/GRUB2EFI.pm 2015-07-20 11:02:56.000000000 +0200 +++ new/perl-Bootloader-0.840/src/Core/GRUB2EFI.pm 2015-08-14 16:05:09.000000000 +0200 @@ -457,7 +457,7 @@ @lines = ( { 'key' => 'GRUB_DISTRIBUTOR', - 'value' => '"openSUSE"', + 'value' => 'openSUSE', 'comment_before' => [ '# If you change this file, run \'grub2-mkconfig -o /boot/grub2/grub.cfg\' afterwards to update', '# /boot/grub2/grub.cfg.' @@ -496,7 +496,7 @@ }, { 'key' => '@GRUB_BADRAM', - 'value' => '"0x01234567,0xfefefefe,0x89abcdef,0xefefefef"', + 'value' => '0x01234567,0xfefefefe,0x89abcdef,0xefefefef', 'comment_before' => [ '# Uncomment to enable BadRAM filtering, modify to suit your needs', '# This works with Linux (no patch required) and with any kernel that obtains',