Force ODL RPM tarball source name consistency 55/43555/3
authorDaniel Farrell <dfarrell@redhat.com>
Tue, 9 Aug 2016 18:36:37 +0000 (14:36 -0400)
committerDaniel Farrell <dfarrell@redhat.com>
Tue, 9 Aug 2016 20:28:15 +0000 (20:28 +0000)
When we pass a URL to Source0, autosetup guesses the source tarball name
based on the last segment of the URL. Since distribution and autorelease
builds use different tarball name formats, we need force them to download
to the same format and explicitly use that for Source0.

Change-Id: Ic13c501c336a8cc752316ce63dea927c307597ed
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
rpm/build.py
rpm/cache/cache.py
rpm/specs/opendaylight.spec

index 774c9de05e60557750b4189681b3f23e16c78a2f..41e187d8a3db8bed7e4e38f890fd526f96ef5f08 100755 (executable)
@@ -30,8 +30,8 @@ srpm_out_dir = os.path.join(rpmbuild_dir, "SRPMS")
 rpm_out_dir = os.path.join(rpmbuild_dir, "RPMS", "noarch")
 
 # Templates that can be specialized into common artifact names per-build
-odl_template = Template("distribution-karaf-0.$version_major."
-                        "$version_minor-$codename.tar.gz")
+odl_template = Template("opendaylight-$version_major.$version_minor."
+                        "$version_patch-$rpm_release.tar.gz")
 specfile_template = Template("opendaylight-$version_major.$version_minor."
                              "$version_patch-$rpm_release.spec")
 unitfile_tb_template = Template("opendaylight-$sysd_commit.service.tar.gz")
index 8334d5733c276c66e5b1a83c062983afe46f390e..a5eae52fca8928ddfa0f197040a626a4118c561c 100755 (executable)
@@ -18,13 +18,8 @@ except ImportError:
 cache_dir = os.path.dirname(os.path.abspath(__file__))
 
 # Templates that can be specialized into artifact names/paths per-build
-odl_template = Template("distribution-karaf-0.$version_major."
-                        "$version_minor-$codename.tar.gz")
-odl_url_template = Template("https://nexus.opendaylight.org/content/"
-                            "groups/public/org/opendaylight/integration/"
-                            "distribution-karaf/0.$version_major."
-                            "$version_minor-$codename/distribution-karaf-0."
-                            "$version_major.$version_minor-$codename.tar.gz")
+odl_template = Template("opendaylight-$version_major.$version_minor."
+                        "$version_patch-$rpm_release.tar.gz")
 unitfile_template = Template("opendaylight-$sysd_commit.service")
 unitfile_url_template = Template("https://git.opendaylight.org/gerrit/"
                                  "gitweb?p=integration/packaging.git;a="
index 90aea653268b1f471fbf064fdd151ab7dd8ad2d7..d2e3a377289a9c78d7ef5de363666f39005a6e74 100644 (file)
@@ -14,7 +14,7 @@ Summary:    OpenDaylight SDN Controller
 Group:      Applications/Communications
 License:    EPL-1.0
 URL:        http://www.opendaylight.org
-Source0:    {{ download_url }}
+Source0:    %name-{{ version_major }}.{{ version_minor }}.{{ version_patch }}-{{ rpm_release }}.tar.gz
 Source1:    %name-{{ sysd_commit }}.service.tar.gz
 Buildroot:  /tmp
 # Required for ODL at run time