Author: wade
Date: 2006-07-21 02:02:11 -0400 (Fri, 21 Jul 2006)
New Revision: 62852
Modified:
trunk/release/packaging/build
trunk/release/packaging/do-build
trunk/release/pyutils/config.py
Log:
config.py:
-store all source extensions here to be reused
build:
-convert - to _ for if building rpm since - is an invalid char for rpm
-support all source extensions
do-build:
-add flexible tardir option so that name version symatics of source file don't
have to be exact
-support all source extensions
Modified: trunk/release/packaging/build
===================================================================
--- trunk/release/packaging/build 2006-07-21 03:28:18 UTC (rev 62851)
+++ trunk/release/packaging/build 2006-07-21 06:02:11 UTC (rev 62852)
@@ -79,8 +79,16 @@
# Figure out if this is a snapshot build or not...
# Could do this by looking at the tarball map... ? (but ./build parameters
would have to change)
-sources = glob.glob("sources/%s/*-%s.tar.gz" % (package_name, version)) +
glob.glob("sources/%s/*-%s.zip" % (package_name, version))
-snapshot_sources = glob.glob("snapshot_sources/%s/*-%s.tar.gz" %
(package_name, version)) + glob.glob("snapshot_sources/%s/*-%s.zip" %
(package_name, version))
+
+sources = []
+snapshot_sources = []
+
+for ext in config.source_extensions:
+ sources += glob.glob("sources/%s/*-%s%s" % (package_name, version, ext))
+
+for ext in config.source_extensions:
+ snapshot_sources += glob.glob("snapshot_sources/%s/*-%s%s" %
(package_name, version, ext))
+
if sources:
print "Using release sources and packages"
HEAD_or_RELEASE = "RELEASE"
@@ -193,6 +201,7 @@
# Get the dir that tarball unpacks
# Will this work with all tarballs? This is what we do for do-zip-build...
+# TODO: this needs some work (will break if tarball isn't just right...)
build_dir = os.path.basename(source_file).replace('.tar.gz', '')
build_dir = build_dir.replace('.zip', '')
@@ -212,13 +221,15 @@
step_env_pre_cmd = ". /tmp/build_deps/env.sh; "
else:
+ # Some 3rd party modules use '-' in their versions
+ rpm_version = version.replace('-', '_')
files_to_copy += ['do-build', '../conf/%s/*' % package_name ]
- build_command = '%s/do-build %s %s %s' % (build_location, version,
revision, build_location)
+ build_command = '%s/do-build %s %s %s' % (build_location, rpm_version,
revision, build_location)
remote_src_dir = "%s/scratch/BUILD/%s" % (build_location, build_dir)
step_env_pre_cmd = ""
-build_env.ssh.copy_to(files_to_copy, build_location, mode='scp')
+build_env.ssh.copy_to(files_to_copy, build_location, mode='scp', compress=0)
# Set up env for the build and for tests
build_env.env_vars['HEAD_or_RELEASE'] = "HEAD"
Modified: trunk/release/packaging/do-build
===================================================================
--- trunk/release/packaging/do-build 2006-07-21 03:28:18 UTC (rev 62851)
+++ trunk/release/packaging/do-build 2006-07-21 06:02:11 UTC (rev 62852)
@@ -18,10 +18,12 @@
$EXEC_AS_ROOT mv ../ximian-build.conf .
$EXEC_AS_ROOT mv ../*.patch .
$EXEC_AS_ROOT mv ../*.tar.gz .
+$EXEC_AS_ROOT mv ../*.tar.bz2 .
$EXEC_AS_ROOT mv ../*.zip .
# rpm needs this to be happy
$EXEC_AS_ROOT chown root:root *.tar.gz
+$EXEC_AS_ROOT chown root:root *.tar.bz2
$EXEC_AS_ROOT chown root:root *.zip
$EXEC_AS_ROOT chown root:root *.patch
@@ -29,7 +31,8 @@
bb_lint -g prebuild -V $version -R $rev -S '' || exit 1
bb_unpack apply || exit 1
-bb_do -V $version -R $rev -S '' -a $archive_dir || exit 1
+# flexible_tardir is for packages like nant, boo, etc...
+bb_do -V $version -R $rev -S '' -a $archive_dir --flexible_tardir || exit
1
bb_lint -V $version -R $rev -S '' || exit 1
rm -rf $archive_dir/*.src.rpm
Modified: trunk/release/pyutils/config.py
===================================================================
--- trunk/release/pyutils/config.py 2006-07-21 03:28:18 UTC (rev 62851)
+++ trunk/release/pyutils/config.py 2006-07-21 06:02:11 UTC (rev 62852)
@@ -93,3 +93,18 @@
'build_location': '/tmp'
}
+######################################
+# Common place for source extensions, which can be compiled to reg later
+# Ennumerate to make it simpler...
+source_extensions = """
+ .tar.gz
+ -src.tar.gz
+ .tar.bz2
+ -src.tar.bz2
+ .zip
+ -src.zip
+""".split()
+
+sources_ext_re_string =
"(\.tar\.gz|-src\.tar\.gz|\.tar\.bz2|-src\.tar\.bz2|\.zip|-src\.zip)"
+######################################
+
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches