Add dummy binary RPMs
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Fri, 18 Jul 2014 13:05:29 +0000 (16:05 +0300)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Mon, 21 Jul 2014 08:55:32 +0000 (11:55 +0300)
Reference RPMs for buildpackage testing.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
bootstrap.py
rpm/gbp-test-1.0-1.noarch.rpm [new file with mode: 0644]
rpm/gbp-test-1.1-1.noarch.rpm [new file with mode: 0644]
rpm/gbp-test-1.1-2.noarch.rpm [new file with mode: 0644]
rpm/gbp-test-native-1.0-1.noarch.rpm [new file with mode: 0644]
rpm/gbp-test-native2-2.0-0.noarch.rpm [new file with mode: 0644]
rpm/gbp-test2-2.0-0.noarch.rpm [new file with mode: 0644]
rpm/gbp-test2-2.0-1.noarch.rpm [new file with mode: 0644]

index 4ba61cffd5ef005853aed16dfba12d7017d34091..9d86b7978bc814ed6eff8ec5baeea0f4018a6871 100755 (executable)
@@ -109,8 +109,9 @@ def do_build(tag, builddir, silent_build=False):
     """Run git-buildpackage-rpm"""
     gbp_opts =  ['--git-ignore-new','--git-export=%s' % tag,
                  '--git-export-dir=%s' % builddir, '--git-ignore-branch']
-    ret, out, _err = run_cmd('git-buildpackage-rpm', gbp_opts, True,
-                             silent_build)
+    rpmbuild_opts = ['-ba', '--target=noarch']
+    ret, out, _err = run_cmd('git-buildpackage-rpm', gbp_opts + rpmbuild_opts,
+                             True, silent_build)
     if ret:
         for line in out:
             print line
@@ -148,12 +149,17 @@ def build_test_pkg(pkg_name, branch, outdir, silent_build=False):
 
         # Create subdirs
         orig_dir = '%s/%s' % (outdir, 'orig')
-        if not os.path.isdir(orig_dir):
-            os.mkdir(orig_dir)
+        rpm_dir = '%s/%s' % (outdir, 'rpm')
+        for path in (orig_dir, rpm_dir):
+            if not os.path.isdir(path):
+                os.mkdir(path)
 
         for fname in glob('%s/SRPMS/*rpm' % builddir):
             LOG.debug('Copying %s -> %s', fname, outdir)
             shutil.copy(fname, outdir)
+        for fname in glob('%s/RPMS/*/*rpm' % builddir):
+            LOG.debug('Copying %s -> %s', fname, rpm_dir)
+            shutil.copy(fname, rpm_dir)
         for fname in os.listdir('%s/SOURCES' % builddir):
             if (fnmatch(fname, 'gbp*tar.gz') or fnmatch(fname, 'gbp*tar.bz2') or
                     fnmatch(fname, 'gbp*zip')):
diff --git a/rpm/gbp-test-1.0-1.noarch.rpm b/rpm/gbp-test-1.0-1.noarch.rpm
new file mode 100644 (file)
index 0000000..45b2a3d
Binary files /dev/null and b/rpm/gbp-test-1.0-1.noarch.rpm differ
diff --git a/rpm/gbp-test-1.1-1.noarch.rpm b/rpm/gbp-test-1.1-1.noarch.rpm
new file mode 100644 (file)
index 0000000..435c1c3
Binary files /dev/null and b/rpm/gbp-test-1.1-1.noarch.rpm differ
diff --git a/rpm/gbp-test-1.1-2.noarch.rpm b/rpm/gbp-test-1.1-2.noarch.rpm
new file mode 100644 (file)
index 0000000..e19dc04
Binary files /dev/null and b/rpm/gbp-test-1.1-2.noarch.rpm differ
diff --git a/rpm/gbp-test-native-1.0-1.noarch.rpm b/rpm/gbp-test-native-1.0-1.noarch.rpm
new file mode 100644 (file)
index 0000000..14ebba6
Binary files /dev/null and b/rpm/gbp-test-native-1.0-1.noarch.rpm differ
diff --git a/rpm/gbp-test-native2-2.0-0.noarch.rpm b/rpm/gbp-test-native2-2.0-0.noarch.rpm
new file mode 100644 (file)
index 0000000..752c94a
Binary files /dev/null and b/rpm/gbp-test-native2-2.0-0.noarch.rpm differ
diff --git a/rpm/gbp-test2-2.0-0.noarch.rpm b/rpm/gbp-test2-2.0-0.noarch.rpm
new file mode 100644 (file)
index 0000000..97cf265
Binary files /dev/null and b/rpm/gbp-test2-2.0-0.noarch.rpm differ
diff --git a/rpm/gbp-test2-2.0-1.noarch.rpm b/rpm/gbp-test2-2.0-1.noarch.rpm
new file mode 100644 (file)
index 0000000..4b1a3cc
Binary files /dev/null and b/rpm/gbp-test2-2.0-1.noarch.rpm differ