Hello community, here is the log from the commit of package linuxrc for openSUSE:Factory checked in at 2015-01-21 21:50:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/linuxrc (Old) and /work/SRC/openSUSE:Factory/.linuxrc.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "linuxrc" Changes: -------- --- /work/SRC/openSUSE:Factory/linuxrc/linuxrc.changes 2014-12-03 22:52:19.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.linuxrc.new/linuxrc.changes 2015-01-21 21:50:44.000000000 +0100 @@ -1,0 +2,10 @@ +Wed Jan 14 12:16:13 CET 2015 - [email protected] + +- activate newly added interfaces (bnc #906817) +- improve git2log to work in sub-branches +- gpg 2.1.1 became stricter with the usage of --verify: + program knows about it; either give both filenames on the command + line or use '-' to specify STDIN.". +- 5.0.30 + +------------------------------------------------------------------- Old: ---- linuxrc-5.0.29.tar.xz New: ---- linuxrc-5.0.30.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ linuxrc.spec ++++++ --- /var/tmp/diff_new_pack.gMb7gu/_old 2015-01-21 21:50:45.000000000 +0100 +++ /var/tmp/diff_new_pack.gMb7gu/_new 2015-01-21 21:50:45.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package linuxrc # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,7 +25,7 @@ Summary: SUSE Installation Program License: GPL-3.0+ Group: System/Boot -Version: 5.0.29 +Version: 5.0.30 Release: 0 Source: %{name}-%{version}.tar.xz BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ linuxrc-5.0.29.tar.xz -> linuxrc-5.0.30.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.29/Makefile new/linuxrc-5.0.30/Makefile --- old/linuxrc-5.0.29/Makefile 2014-12-01 09:38:39.000000000 +0100 +++ new/linuxrc-5.0.30/Makefile 2015-01-14 12:15:37.000000000 +0100 @@ -5,7 +5,7 @@ GIT2LOG := $(shell if [ -x ./git2log ] ; then echo ./git2log --update ; else echo true ; fi) GITDEPS := $(shell [ -d .git ] && echo .git/HEAD .git/refs/heads .git/refs/tags) VERSION := $(shell $(GIT2LOG) --version VERSION ; cat VERSION) -BRANCH := $(shell git branch | perl -ne 'print $$_ if s/^\*\s*//') +BRANCH := $(shell [ -d .git ] && git branch | perl -ne 'print $$_ if s/^\*\s*//') PREFIX := linuxrc-$(VERSION) SRC = $(filter-out inflate.c,$(wildcard *.c)) @@ -47,6 +47,7 @@ @for d in $(SUBDIRS); do $(MAKE) -C $$d $(MAKECMDGOALS); done archive: changelog + @if [ ! -d .git ] ; then echo no git repo ; false ; fi mkdir -p package git archive --prefix=$(PREFIX)/ $(BRANCH) > package/$(PREFIX).tar tar -r -f package/$(PREFIX).tar --mode=0664 --owner=root --group=root --mtime="`git show -s --format=%ci`" --transform='s:^:$(PREFIX)/:' VERSION changelog diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.29/VERSION new/linuxrc-5.0.30/VERSION --- old/linuxrc-5.0.29/VERSION 2014-12-01 09:38:39.000000000 +0100 +++ new/linuxrc-5.0.30/VERSION 2015-01-14 12:15:37.000000000 +0100 @@ -1 +1 @@ -5.0.29 +5.0.30 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.29/auto2.c new/linuxrc-5.0.30/auto2.c --- old/linuxrc-5.0.29/auto2.c 2014-12-01 09:38:39.000000000 +0100 +++ new/linuxrc-5.0.30/auto2.c 2015-01-14 12:15:37.000000000 +0100 @@ -354,7 +354,7 @@ if(!err) { fprintf(stderr, "parsing info file: %s\n", sl->key); file_read_info_file("file:/download/info", kf_cfg); - net_update_ifcfg(); + net_update_ifcfg(IFCFG_IFUP); } } @@ -399,7 +399,7 @@ */ fprintf(stderr, "parsing AutoYaST file\n"); file_read_info_file("file:/download/autoinst.xml", kf_cfg); - net_update_ifcfg(); + net_update_ifcfg(IFCFG_IFUP); } } @@ -872,7 +872,7 @@ */ fprintf(stderr, "parsing AutoYaST file\n"); file_read_info_file("file:/autoinst.xml", kf_cfg); - net_update_ifcfg(); + net_update_ifcfg(IFCFG_IFUP); } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.29/changelog new/linuxrc-5.0.30/changelog --- old/linuxrc-5.0.29/changelog 2014-12-01 09:38:39.000000000 +0100 +++ new/linuxrc-5.0.30/changelog 2015-01-14 12:15:37.000000000 +0100 @@ -1,3 +1,10 @@ +2015-01-07: 2623322f6d1cd888d449930a556d8b29ddea846a-5.0.30 + - activate newly added interfaces (bnc #906817) + - improve git2log to work in sub-branches + - gpg 2.1.1 became stricter with the usage of --verify: + program knows about it; either give both filenames on the command + line or use '-' to specify STDIN.". + 2014-12-01: 5.0.29 - use correct mount command location @@ -19,7 +26,7 @@ - Add check for virtual NICs to not write LLADDR to ifcfg. 2014-09-26: 5.0.23 - - s390x: revert hypervisor check (bnc 887238) + - s390x: revert hypervisor check (bnc #887238) 2014-09-23: 5.0.22 - s390x: write LLADDR only on LPAR @@ -135,7 +142,7 @@ - don't resolve proxy name - enable ipv6 by default - clean up cifs and nfs code - - fix segfault and accept ipv6 netmasks (bnc 887501) + - fix segfault and accept ipv6 netmasks (bnc #887501) - clean up nfs code 2014-07-10: 4.2.44 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.29/dialog.c new/linuxrc-5.0.30/dialog.c --- old/linuxrc-5.0.29/dialog.c 2014-12-01 09:38:39.000000000 +0100 +++ new/linuxrc-5.0.30/dialog.c 2015-01-14 12:15:37.000000000 +0100 @@ -1491,7 +1491,7 @@ f = file_parse_buffer(config.change_config, kf_cfg + kf_cmd + kf_cmd_early); file_do_info(f, kf_cfg + kf_cmd + kf_cmd_early); file_free_file(f); - net_update_ifcfg(); + net_update_ifcfg(IFCFG_IFUP); } } else if(i == -74) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.29/file.c new/linuxrc-5.0.30/file.c --- old/linuxrc-5.0.29/file.c 2014-12-01 09:38:39.000000000 +0100 +++ new/linuxrc-5.0.30/file.c 2015-01-14 12:15:37.000000000 +0100 @@ -1164,7 +1164,7 @@ */ if(do_all && (config.net.setup & NS_DHCP)) { ifcfg_append(&config.ifcfg.list, ifcfg_parse("*=dhcp")); - net_update_ifcfg(); + net_update_ifcfg(0); } if(!config.net.setup) config.net.do_setup = 0; if(config.net.now) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.29/git2log new/linuxrc-5.0.30/git2log --- old/linuxrc-5.0.29/git2log 2014-12-01 09:38:39.000000000 +0100 +++ new/linuxrc-5.0.30/git2log 2015-01-14 12:15:37.000000000 +0100 @@ -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,45 @@ 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(!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; } -@tags = sort @ntags; - -die "no tags at all?\n" unless @tags; +if($opt_branch) { + open my $f, ">$opt_file"; + print $f "$branch\n"; + close $f; -$current_version = $tags[-1]; -$current_version =~ s/(\d+)/$1 + 0/eg; - -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 +105,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 +128,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,7 +144,7 @@ @t = @t2; undef @t2; - $detail = 0; + my $detail = 0; for (@t) { $detail = 1 if /^ $/; $detail = 0 if /^commit /; @@ -160,10 +166,21 @@ last; } } + + # handle white space in every first line once and for all + my $empty = 1; + for (@t) { + $empty = 1, next if $_ eq ""; + 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 +192,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 +204,8 @@ close F; + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - sub usage { my $err = shift; @@ -196,6 +215,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 +223,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; +} + + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +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/linuxrc-5.0.29/linuxrc.c new/linuxrc-5.0.30/linuxrc.c --- old/linuxrc-5.0.29/linuxrc.c 2014-12-01 09:38:39.000000000 +0100 +++ new/linuxrc-5.0.30/linuxrc.c 2015-01-14 12:15:37.000000000 +0100 @@ -1139,7 +1139,7 @@ } } - net_update_ifcfg(); + net_update_ifcfg(0); net_wicked_up("all"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.29/net.c new/linuxrc-5.0.30/net.c --- old/linuxrc-5.0.29/net.c 2014-12-01 09:38:39.000000000 +0100 +++ new/linuxrc-5.0.30/net.c 2015-01-14 12:15:37.000000000 +0100 @@ -64,7 +64,7 @@ static void net_wicked_dhcp(void); static void net_cifs_build_options(char **options, char *user, char *password, char *workgroup); -static int ifcfg_write(char *device, ifcfg_t *ifcfg, int initial); +static int ifcfg_write(char *device, ifcfg_t *ifcfg, int flags); static int _ifcfg_write(char *device, ifcfg_t *ifcfg); static char *inet2str(inet_t *inet, int type); static int net_get_ip(char *text, char **ip, int with_prefix); @@ -2004,9 +2004,11 @@ /* * Setup all interfaces in config.ifcfg.list. * + * For flags see ifcfg_write(). + * * Note: Clears config.ifcfg.current! */ -void net_update_ifcfg() +void net_update_ifcfg(int flags) { int matched; hd_t *net_list, *hd; @@ -2027,7 +2029,7 @@ if(ifcfg->used && !ifcfg->dhcp) continue; if(ifcfg->device) { - ifcfg_write(ifcfg->device, ifcfg, 1); + ifcfg_write(ifcfg->device, ifcfg, flags | IFCFG_INITIAL); } else { /* @@ -2056,7 +2058,7 @@ matched = ifcfg->device ? match_netdevice(hd->unix_dev_name, hwaddr, ifcfg->device) : 0; - if(matched) ifcfg_write(hd->unix_dev_name, ifcfg, 1); + if(matched) ifcfg_write(hd->unix_dev_name, ifcfg, flags | IFCFG_INITIAL); } } @@ -2080,10 +2082,13 @@ * * Note: 'device' is the interface name not including any vlan id. * - * If initial is set, mark interface is 'initial'; that is, no further auto - * config is tried on it. + * flags: + * - IFCFG_INITIAL: mark interface as 'initial'; that is, no further auto + * config is tried on it + * - IFCFG_IFUP: bring interface up immediately; else a separate call to + * net_wicked_up() is necessary */ -int ifcfg_write(char *device, ifcfg_t *ifcfg, int initial) +int ifcfg_write(char *device, ifcfg_t *ifcfg, int flags) { char *ifname = NULL; int i; @@ -2113,9 +2118,10 @@ if(i) { str_copy(&config.ifcfg.current, ifname); - if(initial) slist_append_str(&config.ifcfg.initial, ifname); + if(flags & IFCFG_INITIAL) slist_append_str(&config.ifcfg.initial, ifname); fprintf(stderr, "%s: network config created\n", ifname); if(!config.win) printf("%s: network config created\n", ifname); + if(flags & IFCFG_IFUP) net_wicked_up(ifname); } else { fprintf(stderr, "%s: failed to create network config\n", ifname); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.29/net.h new/linuxrc-5.0.30/net.h --- old/linuxrc-5.0.29/net.h 2014-12-01 09:38:39.000000000 +0100 +++ new/linuxrc-5.0.30/net.h 2015-01-14 12:15:37.000000000 +0100 @@ -6,6 +6,10 @@ * */ +// flags to pass to ifcfg_write() +#define IFCFG_INITIAL (1 << 0) +#define IFCFG_IFUP (1 << 1) + int net_config(void); int net_config2(int type); void net_ask_password(void); @@ -22,7 +26,7 @@ void net_apply_ethtool(char *device, char *hwaddr); int wlan_setup(void); char *net_dhcp_type(void); -void net_update_ifcfg(void); +void net_update_ifcfg(int flags); ifcfg_t *ifcfg_parse(char *str); ifcfg_t *ifcfg_append(ifcfg_t **p0, ifcfg_t *p); void ifcfg_copy(ifcfg_t *dst, ifcfg_t *src); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.29/settings.c new/linuxrc-5.0.30/settings.c --- old/linuxrc-5.0.29/settings.c 2014-12-01 09:38:39.000000000 +0100 +++ new/linuxrc-5.0.30/settings.c 2015-01-14 12:15:37.000000000 +0100 @@ -583,7 +583,7 @@ f = file_parse_buffer(config.change_config, kf_cfg + kf_cmd + kf_cmd_early); file_do_info(f, kf_cfg + kf_cmd + kf_cmd_early); file_free_file(f); - net_update_ifcfg(); + net_update_ifcfg(IFCFG_IFUP); } break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-5.0.29/url.c new/linuxrc-5.0.30/url.c --- old/linuxrc-5.0.29/url.c 2014-12-01 09:38:39.000000000 +0100 +++ new/linuxrc-5.0.30/url.c 2015-01-14 12:15:37.000000000 +0100 @@ -1519,8 +1519,8 @@ } strprintf(&dst_sig, "%s.asc", dst); strprintf(&buf, - "gpg --homedir /root/.gnupg --batch --no-default-keyring --keyring /installkey.gpg --ignore-valid-from --ignore-time-conflict --verify %s >/dev/null%s", - dst_sig, config.debug < 2 ? " 2>&1" : "" + "gpg --homedir /root/.gnupg --batch --no-default-keyring --keyring /installkey.gpg --ignore-valid-from --ignore-time-conflict --verify %s %s >/dev/null%s", + dst_sig, dst, config.debug < 2 ? " 2>&1" : "" ); err = url_read_file_nosig(url, dir, src_sig, dst_sig, NULL, flags); -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
