ooo-build r11553 - in trunk: . scratch/packaging



Author: pmladek
Date: Tue Feb 12 10:00:44 2008
New Revision: 11553
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11553&view=rev

Log:
2008-02-12  Petr Mladek  <pmladek suse cz>

	* scratch/packaging/packaging-helper-tools-features.txt,
	  scratch/packaging/ooo-build-release: started a work on tools that
	  would help me with packaging



Added:
   trunk/scratch/packaging/
   trunk/scratch/packaging/ooo-build-release   (contents, props changed)
   trunk/scratch/packaging/packaging-helper-tools-features.txt
Modified:
   trunk/ChangeLog

Added: trunk/scratch/packaging/ooo-build-release
==============================================================================
--- (empty file)
+++ trunk/scratch/packaging/ooo-build-release	Tue Feb 12 10:00:44 2008
@@ -0,0 +1,112 @@
+#!/usr/bin/perl
+
+use strict;
+use File::Temp qw/ tempfile tempdir /;
+
+my $default_branch='trunk';
+
+# get ooo-build version from the given configure.in
+sub get_version_configure_in($)
+{
+    my ($configure) = @_;
+    my $version;
+
+    open (CONFIGURE, $configure) || die "can't open $configure for reading: $!\n";
+
+    while (my $line = <CONFIGURE>) {
+        chomp $line;
+    
+	if ($line =~ /AC_INIT\s*\(\s*ooo-build\s*,\s*([\w\.]*)\)/) {
+	    $version="$1";
+	}
+    }
+    close (CONFIGURE);
+    return $version;
+}
+
+# increment the version for a test build:
+#	+ add 'a' if the version ended with a number
+#       + bump the letter otherwise
+sub inc_test_version($)
+{
+    my ($version) = @_;
+    my $lastchar = chop $version;
+    my $new_version;
+    print "lastchar = |$lastchar|\n";
+    if ($lastchar =~ /\d/) {
+	return "$version" . "$lastchar" . "a";
+    } elsif ($lastchar =~ /\w/) {
+	# select next letter alhabeticaly: a->b, b->c, ...
+	$lastchar =~ tr/0a-zA-Z/a-zA-Z0/;
+	return "$version" . "$lastchar";
+    } else {
+	die "Can't generate test version from \"$version$lastchar\n";
+    }
+}
+
+# copy the local version of ooo-build into a tmp directory
+# omit the .svn subdirectories
+sub copy_to_tempdir($)
+{
+    my ($ooo_build_dir) = @_;
+    
+    my $temp_dir = tempdir( '/tmp/ooo-build-XXXXXX' );
+    my $blacklist = "$temp_dir/ooo-build.copy.blacklist";
+    
+    print "Copying \"$ooo_build_dir\" -> \"$temp_dir\"...";
+    # FIXME: crazy hacks to copy ooo-build without .svn subdirectories and to show a progress
+    system "find $ooo_build_dir -wholename \"*/.svn\" >$blacklist";
+    system "tar -cf - --transform=s%$ooo_build_dir%% -X $blacklist $ooo_build_dir | tar -xf - -C $temp_dir --checkpoint=25 2>&1 | awk '{ ORS=\"\" ; printf \".\"; fflush() }'";
+    print "\n";
+    unlink $blacklist;
+}
+
+
+sub usage()
+{
+    print "This tool helps with ooo-build releasing\n\n" .
+    
+          "Usage:\n".
+	  "\tooo-build-release [--help] [--diff] [stat-type-sw] [--entry=<entry>]\n" .
+	  "\t[--entry-id=<id>] [--sort=[column[,column]...] [--revert] res...\n\n" .
+	
+	  "Options:\n" .
+	  "\t--help: prints this help\n\n" .
+
+	  "\t--final:\n" .
+	  "\t--daily:\n" .
+	  "\t--ptf: release ptf-specific tarball for given bugzilla number\n" .
+	  "\t--get-last:\n" .
+	  "\t--branch=<name>\n" .
+	  "\t--version\n" .
+	  "\t--set-version=<ver>\n" .
+	  "\t--inc-version=<ver>\n" .
+	  "\t--upload=<milestone>\n";
+}
+
+
+my $ptf;
+my $daily;
+my $branch;
+my $bugid;
+my $config_version;
+my $test_version_inc;
+for my $arg (@ARGV) {
+    if ($arg eq '--help' || $arg eq '-h') {
+	usage;
+    } elsif ($arg eq '--daily') {
+	$daily=1
+    } elsif ($a =~ m/--ptf=(.*)/) {
+	$bugid=$1;
+	$ptf=1;
+    } else {
+	print "Too many arguments $arg\n";
+	syntax (1);
+    }
+}
+
+#$config_version = get_version_configure_in("ooo-build/configure.in");
+#$test_version_inc = inc_test_version($config_version);
+#    print "config_version = $config_version\n";
+#    print "test_version_inc = $test_version_inc\n";
+#copy_to_tempdir("tmp/ooo-build");

Added: trunk/scratch/packaging/packaging-helper-tools-features.txt
==============================================================================
--- (empty file)
+++ trunk/scratch/packaging/packaging-helper-tools-features.txt	Tue Feb 12 10:00:44 2008
@@ -0,0 +1,63 @@
+Features of ooo-build packaging helper tools
+============================================
+
++ release ooo-build
+    + types:
+	+ PTF
+	    + from read-only svn account
+	    + for given branch
+	    + version ~= bug number
+	+ test build
+	    + clean vs. local modifications
+	    + bump test version on request
+	    + daily snapshot => version = date
+	    + remember last test version per branch
+	+ final release
+	    + bump version
+	    + changelog, NEWS file (just check?)
+	    + create md5sum
+	    + upload
+    + store in local archive
+
+
++ update packages sources (join with build stuff?)
+    + ooo-build tarball + spec
+    + localizations + spec + changelog
+    + extra sources from download + spec
+
+
++ build packages
+    + types
+	+ remote by abuild
+	+ remote by osc
+	+ mbuild
+	+ BS
+	+ universal build
+    + more products and architectures
+    + more packages by dependency
+    + show msg window on error
+    + incremental build
+    + allow download to local disk
+    + remember what has been built?
+
+
++ test packages
+    + install from directory
+    + install from YUM installation source (BS, official package)
+    + run qatesttool
+    + smoke test
+
+
++ upload packages (join with build stuff)
+    + build type
+	+ mbuild
+	+ local build (just falback)
+	+ universal build
+    + purpose:
+	+ QA for Eric; sync structure with MS
+	+ test build for all, even external users (same place as QA?)
+
+
++ submit package
+    + diff
+    + more sources (after clean split)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]