Hello community, here is the log from the commit of package linuxrc-devtools for openSUSE:Factory checked in at 2017-09-21 12:35:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/linuxrc-devtools (Old) and /work/SRC/openSUSE:Factory/.linuxrc-devtools.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "linuxrc-devtools" Thu Sep 21 12:35:00 2017 rev:6 rq:527534 version:0.13 Changes: -------- --- /work/SRC/openSUSE:Factory/linuxrc-devtools/linuxrc-devtools.changes 2017-08-18 15:05:49.142196783 +0200 +++ /work/SRC/openSUSE:Factory/.linuxrc-devtools.new/linuxrc-devtools.changes 2017-09-21 12:35:07.756866034 +0200 @@ -1,0 +2,30 @@ +Fri Sep 15 06:36:25 UTC 2017 - [email protected] + +- merge gh#openSUSE/linuxrc-devtools#14 +- don't query branch from git +- 0.13 + +-------------------------------------------------------------------- +Thu Sep 14 12:26:24 UTC 2017 - [email protected] + +- merge gh#openSUSE/linuxrc-devtools#13 +- ensure dates never decrease in changelog +- 0.12 + +-------------------------------------------------------------------- +Thu Sep 14 11:50:23 UTC 2017 - [email protected] + +- merge gh#openSUSE/linuxrc-devtools#12 +- ensure the newly created changelog is used + +-------------------------------------------------------------------- +Tue Sep 12 14:11:19 UTC 2017 - [email protected] + +- merge gh#openSUSE/linuxrc-devtools#11 +- default to git project name if no package name is specified +- install also make_package script +- add --no-wait option to submit_it script +- allow to use an alternative spec file +- 0.11 + +-------------------------------------------------------------------- Old: ---- linuxrc-devtools-0.10.tar.xz New: ---- linuxrc-devtools-0.13.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ linuxrc-devtools.spec ++++++ --- /var/tmp/diff_new_pack.INGT8I/_old 2017-09-21 12:35:08.272793431 +0200 +++ /var/tmp/diff_new_pack.INGT8I/_new 2017-09-21 12:35:08.276792868 +0200 @@ -17,7 +17,7 @@ Name: linuxrc-devtools -Version: 0.10 +Version: 0.13 Release: 0 Source: %{name}-%{version}.tar.xz @@ -47,6 +47,7 @@ %{_bindir}/build_it %{_bindir}/git2log %{_bindir}/git2tags +%{_bindir}/make_package %{_bindir}/submit_it %{_bindir}/tobs ++++++ linuxrc-devtools-0.10.tar.xz -> linuxrc-devtools-0.13.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-devtools-0.10/Makefile new/linuxrc-devtools-0.13/Makefile --- old/linuxrc-devtools-0.10/Makefile 2017-08-17 12:55:18.000000000 +0200 +++ new/linuxrc-devtools-0.13/Makefile 2017-09-15 08:36:25.000000000 +0200 @@ -1,5 +1,5 @@ PACKAGE := linuxrc-devtools -SCRIPTS := build_it git2log git2tags submit_it tobs +SCRIPTS := build_it git2log git2tags submit_it tobs make_package 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) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-devtools-0.10/VERSION new/linuxrc-devtools-0.13/VERSION --- old/linuxrc-devtools-0.10/VERSION 2017-08-17 12:55:18.000000000 +0200 +++ new/linuxrc-devtools-0.13/VERSION 2017-09-15 08:36:25.000000000 +0200 @@ -1 +1 @@ -0.10 +0.13 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-devtools-0.10/build_it new/linuxrc-devtools-0.13/build_it --- old/linuxrc-devtools-0.10/build_it 2017-08-17 12:55:18.000000000 +0200 +++ new/linuxrc-devtools-0.13/build_it 2017-09-15 08:36:25.000000000 +0200 @@ -26,6 +26,13 @@ continue fi + if [ "$1" = "--spec" ] ; then + spec_opt="--spec $2" + shift + shift + continue + fi + break done @@ -53,7 +60,7 @@ $prepare fi -tobs $dist +tobs $spec_opt $dist if [ -z "$prepare" ] ; then make $clean_target diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-devtools-0.10/changelog new/linuxrc-devtools-0.13/changelog --- old/linuxrc-devtools-0.10/changelog 2017-08-17 12:55:18.000000000 +0200 +++ new/linuxrc-devtools-0.13/changelog 2017-09-15 08:36:25.000000000 +0200 @@ -1,3 +1,20 @@ +2017-09-15: 0.13 + - merge gh#openSUSE/linuxrc-devtools#14 + - don't query branch from git + +2017-09-14: 0.12 + - merge gh#openSUSE/linuxrc-devtools#12 + - ensure the newly created changelog is used + - merge gh#openSUSE/linuxrc-devtools#13 + - ensure dates never decrease in changelog + +2017-09-12: 0.11 + - merge gh#openSUSE/linuxrc-devtools#11 + - default to git project name if no package name is specified + - install also make_package script + - add --no-wait option to submit_it script + - allow to use an alternative spec file + 2017-08-17: 0.10 - merge gh#openSUSE/linuxrc-devtools#10 - fix typo in make_package diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-devtools-0.10/git2log new/linuxrc-devtools-0.13/git2log --- old/linuxrc-devtools-0.10/git2log 2017-08-17 12:55:18.000000000 +0200 +++ new/linuxrc-devtools-0.13/git2log 2017-09-15 08:36:25.000000000 +0200 @@ -31,6 +31,7 @@ sub tags_to_str; sub format_log; sub format_all_logs; +sub fix_dates; sub add_line_breaks; sub format_date_obs; sub format_date_iso; @@ -92,6 +93,7 @@ get_github_project; get_branch; get_log; +fix_dates; get_tags; choose_tags; add_head_tag; @@ -484,6 +486,36 @@ } +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# fix_dates() +# +# Adjust time stamps in entire git log. +# +# The time stamps of the git commits are not necessarily ordered by date. +# But the generated changelog is required to have a monotonic time. +# +# We do this by going through the log in reverse and rewriting any dates we +# find whenever the date decreases. +# +# Not very subtle but it works. +# +sub fix_dates +{ + my $last_date; + + for (reverse @{$config->{raw_log}}) { + # e.g. "Date: 1443184889 +0200" + if(/^(Date:\s+)(\S+)(\s+\S+)/) { + if(defined $last_date && $2 < $last_date) { + $_ = "$1$last_date$3\n"; + next; + } + } + $last_date = $2; + } +} + + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # format_all_logs() # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-devtools-0.10/make_package new/linuxrc-devtools-0.13/make_package --- old/linuxrc-devtools-0.10/make_package 2017-08-17 12:55:18.000000000 +0200 +++ new/linuxrc-devtools-0.13/make_package 2017-09-15 08:36:25.000000000 +0200 @@ -23,13 +23,16 @@ done if [ -z "$PACKAGE_NAME" ] ; then + PACKAGE_NAME=$(git config --get remote.origin.url | perl -pe 's#^.*/|\.git$##g') +fi + +if [ -z "$PACKAGE_NAME" ] ; then echo no package name set exit 1 fi VERSION=`git2log --version VERSION ; cat VERSION` PACKAGE_PREFIX=$PACKAGE_NAME-$VERSION -BRANCH=`[ -d .git ] && git branch | perl -ne 'print $_ if s/^\*\s*//'` mkdir -p package rm -f package/*.tar.xz package/*.changes @@ -41,7 +44,7 @@ exit 1 fi -git archive --prefix=$PACKAGE_PREFIX/ $BRANCH > package/$PACKAGE_PREFIX.tar +git archive --prefix=$PACKAGE_PREFIX/ HEAD > package/$PACKAGE_PREFIX.tar tar -r -f package/$PACKAGE_PREFIX.tar \ --mode=0664 --owner=root --group=root \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-devtools-0.10/submit_it new/linuxrc-devtools-0.13/submit_it --- old/linuxrc-devtools-0.10/submit_it 2017-08-17 12:55:18.000000000 +0200 +++ new/linuxrc-devtools-0.13/submit_it 2017-09-15 08:36:25.000000000 +0200 @@ -2,6 +2,8 @@ unset LANG +wait_opt=--wait-for-ok + while true; do if [ "$1" = "--dist" -o "$1" = "--target" ] ; then dist="--target $2" @@ -17,6 +19,12 @@ continue fi + if [ "$1" = "--no-wait" ] ; then + wait_opt= + shift + continue + fi + break done @@ -32,4 +40,4 @@ cd "../$job_name" fi -tobs --wait-for-ok --sr $dist $package +tobs $wait_opt --sr $dist $package diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-devtools-0.10/tobs new/linuxrc-devtools-0.13/tobs --- old/linuxrc-devtools-0.10/tobs 2017-08-17 12:55:18.000000000 +0200 +++ new/linuxrc-devtools-0.13/tobs 2017-09-15 08:36:25.000000000 +0200 @@ -149,6 +149,7 @@ my $opt_delay = 30; my $opt_target; my $opt_package; +my $opt_spec; GetOptions( 'sr' => \$opt_sr, @@ -158,6 +159,7 @@ 'test' => \$opt_test, 'target=s' => \$opt_target, 'package=s' => \$opt_package, + 'spec=s' => \$opt_spec, 'save-temp' => \$opt_save_temp, 'version' => sub { print "$VERSION\n"; exit 0 }, 'help' => sub { usage 0 }, @@ -204,6 +206,7 @@ print " Package: $config->{package}\n"; print " Version: $config->{version}\n"; print " GIT Branch: $config->{branch}\n"; +print " Spec File: $opt_spec\n" if $opt_spec; print " Dist: $config->{dist}\n"; print " Project: $config->{prj}\n"; print " Test Project: $config->{test}\n" if $config->{test}; @@ -230,6 +233,13 @@ print "Package has several spec files; using $config->{spec_name} as base\n" if @specs > 1; } +if($opt_spec) { + if(open my $f, $opt_spec) { + $config->{spec_file_alt} = [ <$f> ]; + close $f; + } +} + if(open my $f, "$tmpdir/$config->{package}/$config->{spec_name}.spec") { $config->{spec_file} = [ <$f> ]; close $f; @@ -254,8 +264,10 @@ update_changelog; +my $new_changelog = "$tmpdir/$config->{package}/$config->{spec_name}.changes"; + # write new changes file -if(open my $f, ">$tmpdir/$config->{package}/$config->{spec_name}.changes") { +if(open my $f, ">$new_changelog") { print $f @{$config->{changes}}; close $f; } @@ -266,8 +278,10 @@ unlink "$tmpdir/$config->{package}/$_"; } -# copy new files +# copy new files except *.changes (we would overwrite our newly generated one) +rename $new_changelog, "$new_changelog.tmp"; system "cp package/* $tmpdir/$config->{package}/"; +rename "$new_changelog.tmp", $new_changelog; # copy changes and specs if(@specs > 1) { @@ -317,6 +331,8 @@ General options: --target TARGET Choose config from section TARGET in config file. + --spec FILE Use FILE as spec file template instead of the spec file from + the build service project. --try Don\'t actually do anything. --test Submit to test project. A test project is an alternative project defined in .tobsrc. Sources are taken from the regular @@ -491,11 +507,29 @@ my $spec_name; my $setup = 0; + # If the user has specified an alternative spec file source we still have + # to scan the 'real' spec file to get the version info (to know which log + # entries to add to the changelog). + if($config->{spec_file_alt}) { + for (@{$config->{spec_file}}) { + last if /^%package\s+\-n/; + + if(/^Version:(\s*)(\S+)/) { + $spec_version = $config->{spec_version} = $2; + last; + } + } + + # the original spec is no longer needed + $config->{spec_file} = $config->{spec_file_alt}; + delete $config->{spec_file_alt}; + } + for (@{$config->{spec_file}}) { last if /^%package\s+\-n/; if(/^Version:(\s*)(\S+)/) { - $spec_version = $config->{spec_version} = $2; + $spec_version = $config->{spec_version} = $2 unless defined $spec_version; $_ = "Version:$1$config->{version}\n"; }
