From fe2483be91247a0d862bfe5f1e5fc89b83ebc096 Mon Sep 17 00:00:00 2001 From: Kouhei Sutou Date: Thu, 4 Oct 2018 09:17:32 +0900 Subject: [PATCH] ARROW-3423: [Packaging] Remove RC information from deb/rpm packages Because we reuse RC packages as the official release packages when our vote is passed. Author: Kouhei Sutou Closes #2694 from kou/linux-packages-remove-rc and squashes the following commits: 74b54d0a Remove RC information from deb/rpm packages --- dev/tasks/crossbow.py | 8 +- dev/tasks/linux-packages/Rakefile | 5 +- dev/tasks/linux-packages/package-task.rb | 17 +- dev/tasks/tasks.yml | 216 +++++++++++------------ 4 files changed, 131 insertions(+), 115 deletions(-) diff --git a/dev/tasks/crossbow.py b/dev/tasks/crossbow.py index 5f7f3d08fa27..74facf4b7fa0 100755 --- a/dev/tasks/crossbow.py +++ b/dev/tasks/crossbow.py @@ -599,13 +599,19 @@ def submit(ctx, task, group, job_prefix, config_path, arrow_version, dry_run): if arrow_version: target.version = arrow_version + no_rc_version = re.sub(r'-rc\d+\Z', '', target.version) + params = { + 'version': target.version, + 'no_rc_version': no_rc_version, + } + # task and group variables are lists, containing multiple values tasks = {} task_configs = load_tasks_from_config(config_path, task, group) for name, task in task_configs.items(): # replace version number and create task instance from configuration artifacts = task.pop('artifacts', None) or [] # because of yaml - artifacts = [fn.format(version=target.version) for fn in artifacts] + artifacts = [fn.format(**params) for fn in artifacts] tasks[name] = Task(artifacts=artifacts, **task) # create job instance, doesn't mutate git data yet diff --git a/dev/tasks/linux-packages/Rakefile b/dev/tasks/linux-packages/Rakefile index d24aa11cb851..aa420817de47 100644 --- a/dev/tasks/linux-packages/Rakefile +++ b/dev/tasks/linux-packages/Rakefile @@ -22,7 +22,10 @@ require_relative "package-task" class ApacheArrowPackageTask < PackageTask def initialize release_time = detect_release_time - super("apache-arrow", detect_version(release_time), release_time) + super("apache-arrow", + detect_version(release_time), + release_time, + :rc_build_type => :release) @rpm_package = "arrow" end diff --git a/dev/tasks/linux-packages/package-task.rb b/dev/tasks/linux-packages/package-task.rb index cc32db453629..d5f11be820df 100644 --- a/dev/tasks/linux-packages/package-task.rb +++ b/dev/tasks/linux-packages/package-task.rb @@ -22,7 +22,7 @@ class PackageTask include Rake::DSL - def initialize(package, version, release_time) + def initialize(package, version, release_time, options={}) @package = package @version = version @release_time = release_time @@ -33,12 +33,19 @@ def initialize(package, version, release_time) @rpm_package = @package case @version - when /-((?:dev|rc)\d+)\z/ + when /-((dev|rc)\d+)\z/ base_version = $PREMATCH sub_version = $1 - @deb_upstream_version = "#{base_version}~#{sub_version}" - @rpm_version = base_version - @rpm_release = "0.#{sub_version}" + type = $2 + if type == "rc" and options[:rc_build_type] == :release + @deb_upstream_version = base_version + @rpm_version = base_version + @rpm_release = "1" + else + @deb_upstream_version = "#{base_version}~#{sub_version}" + @rpm_version = base_version + @rpm_release = "0.#{sub_version}" + end else @deb_upstream_version = @version @rpm_version = @version diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index 0789eeaf2821..707b296275f7 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -239,35 +239,35 @@ tasks: - .debian.tar.xz - .orig.tar.gz artifacts: - - apache-arrow_{version}-1.debian.tar.xz - - apache-arrow_{version}-1.dsc - - apache-arrow_{version}.orig.tar.gz - - gir1.2-arrow-1.0_{version}-1_amd64.deb - - gir1.2-arrow-gpu-1.0_{version}-1_amd64.deb - - gir1.2-parquet-1.0_{version}-1_amd64.deb - - libarrow-dev_{version}-1_amd64.deb - - libarrow-glib-dev_{version}-1_amd64.deb - - libarrow-glib-doc_{version}-1_all.deb - - libarrow-glib11-dbgsym_{version}-1_amd64.deb - - libarrow-glib11_{version}-1_amd64.deb - - libarrow-gpu-dev_{version}-1_amd64.deb - - libarrow-gpu-glib-dev_{version}-1_amd64.deb - - libarrow-gpu-glib11-dbgsym_{version}-1_amd64.deb - - libarrow-gpu-glib11_{version}-1_amd64.deb - - libarrow-gpu11-dbgsym_{version}-1_amd64.deb - - libarrow-gpu11_{version}-1_amd64.deb - - libarrow-python-dev_{version}-1_amd64.deb - - libarrow-python11-dbgsym_{version}-1_amd64.deb - - libarrow-python11_{version}-1_amd64.deb - - libarrow11-dbgsym_{version}-1_amd64.deb - - libarrow11_{version}-1_amd64.deb - - libparquet-dev_{version}-1_amd64.deb - - libparquet-glib-dev_{version}-1_amd64.deb - - libparquet-glib-doc_{version}-1_all.deb - - libparquet-glib11-dbgsym_{version}-1_amd64.deb - - libparquet-glib11_{version}-1_amd64.deb - - libparquet11-dbgsym_{version}-1_amd64.deb - - libparquet11_{version}-1_amd64.deb + - apache-arrow_{no_rc_version}-1.debian.tar.xz + - apache-arrow_{no_rc_version}-1.dsc + - apache-arrow_{no_rc_version}.orig.tar.gz + - gir1.2-arrow-1.0_{no_rc_version}-1_amd64.deb + - gir1.2-arrow-gpu-1.0_{no_rc_version}-1_amd64.deb + - gir1.2-parquet-1.0_{no_rc_version}-1_amd64.deb + - libarrow-dev_{no_rc_version}-1_amd64.deb + - libarrow-glib-dev_{no_rc_version}-1_amd64.deb + - libarrow-glib-doc_{no_rc_version}-1_all.deb + - libarrow-glib11-dbgsym_{no_rc_version}-1_amd64.deb + - libarrow-glib11_{no_rc_version}-1_amd64.deb + - libarrow-gpu-dev_{no_rc_version}-1_amd64.deb + - libarrow-gpu-glib-dev_{no_rc_version}-1_amd64.deb + - libarrow-gpu-glib11-dbgsym_{no_rc_version}-1_amd64.deb + - libarrow-gpu-glib11_{no_rc_version}-1_amd64.deb + - libarrow-gpu11-dbgsym_{no_rc_version}-1_amd64.deb + - libarrow-gpu11_{no_rc_version}-1_amd64.deb + - libarrow-python-dev_{no_rc_version}-1_amd64.deb + - libarrow-python11-dbgsym_{no_rc_version}-1_amd64.deb + - libarrow-python11_{no_rc_version}-1_amd64.deb + - libarrow11-dbgsym_{no_rc_version}-1_amd64.deb + - libarrow11_{no_rc_version}-1_amd64.deb + - libparquet-dev_{no_rc_version}-1_amd64.deb + - libparquet-glib-dev_{no_rc_version}-1_amd64.deb + - libparquet-glib-doc_{no_rc_version}-1_all.deb + - libparquet-glib11-dbgsym_{no_rc_version}-1_amd64.deb + - libparquet-glib11_{no_rc_version}-1_amd64.deb + - libparquet11-dbgsym_{no_rc_version}-1_amd64.deb + - libparquet11_{no_rc_version}-1_amd64.deb ubuntu-trusty: platform: linux @@ -280,21 +280,21 @@ tasks: - .debian.tar.gz - .orig.tar.gz artifacts: - - apache-arrow_{version}-1.debian.tar.gz - - apache-arrow_{version}-1.dsc - - apache-arrow_{version}.orig.tar.gz - - gir1.2-arrow-1.0_{version}-1_amd64.deb - - gir1.2-parquet-1.0_{version}-1_amd64.deb - - libarrow-dev_{version}-1_amd64.deb - - libarrow-glib-dev_{version}-1_amd64.deb - - libarrow-glib-doc_{version}-1_all.deb - - libarrow-glib11_{version}-1_amd64.deb - - libarrow11_{version}-1_amd64.deb - - libparquet-dev_{version}-1_amd64.deb - - libparquet-glib-dev_{version}-1_amd64.deb - - libparquet-glib-doc_{version}-1_all.deb - - libparquet-glib11_{version}-1_amd64.deb - - libparquet11_{version}-1_amd64.deb + - apache-arrow_{no_rc_version}-1.debian.tar.gz + - apache-arrow_{no_rc_version}-1.dsc + - apache-arrow_{no_rc_version}.orig.tar.gz + - gir1.2-arrow-1.0_{no_rc_version}-1_amd64.deb + - gir1.2-parquet-1.0_{no_rc_version}-1_amd64.deb + - libarrow-dev_{no_rc_version}-1_amd64.deb + - libarrow-glib-dev_{no_rc_version}-1_amd64.deb + - libarrow-glib-doc_{no_rc_version}-1_all.deb + - libarrow-glib11_{no_rc_version}-1_amd64.deb + - libarrow11_{no_rc_version}-1_amd64.deb + - libparquet-dev_{no_rc_version}-1_amd64.deb + - libparquet-glib-dev_{no_rc_version}-1_amd64.deb + - libparquet-glib-doc_{no_rc_version}-1_all.deb + - libparquet-glib11_{no_rc_version}-1_amd64.deb + - libparquet11_{no_rc_version}-1_amd64.deb ubuntu-xenial: platform: linux @@ -307,28 +307,28 @@ tasks: - .debian.tar.xz - .orig.tar.gz artifacts: - - apache-arrow_{version}-1.debian.tar.xz - - apache-arrow_{version}-1.dsc - - apache-arrow_{version}.orig.tar.gz - - gir1.2-arrow-1.0_{version}-1_amd64.deb - - gir1.2-arrow-gpu-1.0_{version}-1_amd64.deb - - gir1.2-parquet-1.0_{version}-1_amd64.deb - - libarrow-dev_{version}-1_amd64.deb - - libarrow-glib-dev_{version}-1_amd64.deb - - libarrow-glib-doc_{version}-1_all.deb - - libarrow-glib11_{version}-1_amd64.deb - - libarrow-gpu-dev_{version}-1_amd64.deb - - libarrow-gpu-glib-dev_{version}-1_amd64.deb - - libarrow-gpu-glib11_{version}-1_amd64.deb - - libarrow-gpu11_{version}-1_amd64.deb - - libarrow-python-dev_{version}-1_amd64.deb - - libarrow-python11_{version}-1_amd64.deb - - libarrow11_{version}-1_amd64.deb - - libparquet-dev_{version}-1_amd64.deb - - libparquet-glib-dev_{version}-1_amd64.deb - - libparquet-glib-doc_{version}-1_all.deb - - libparquet-glib11_{version}-1_amd64.deb - - libparquet11_{version}-1_amd64.deb + - apache-arrow_{no_rc_version}-1.debian.tar.xz + - apache-arrow_{no_rc_version}-1.dsc + - apache-arrow_{no_rc_version}.orig.tar.gz + - gir1.2-arrow-1.0_{no_rc_version}-1_amd64.deb + - gir1.2-arrow-gpu-1.0_{no_rc_version}-1_amd64.deb + - gir1.2-parquet-1.0_{no_rc_version}-1_amd64.deb + - libarrow-dev_{no_rc_version}-1_amd64.deb + - libarrow-glib-dev_{no_rc_version}-1_amd64.deb + - libarrow-glib-doc_{no_rc_version}-1_all.deb + - libarrow-glib11_{no_rc_version}-1_amd64.deb + - libarrow-gpu-dev_{no_rc_version}-1_amd64.deb + - libarrow-gpu-glib-dev_{no_rc_version}-1_amd64.deb + - libarrow-gpu-glib11_{no_rc_version}-1_amd64.deb + - libarrow-gpu11_{no_rc_version}-1_amd64.deb + - libarrow-python-dev_{no_rc_version}-1_amd64.deb + - libarrow-python11_{no_rc_version}-1_amd64.deb + - libarrow11_{no_rc_version}-1_amd64.deb + - libparquet-dev_{no_rc_version}-1_amd64.deb + - libparquet-glib-dev_{no_rc_version}-1_amd64.deb + - libparquet-glib-doc_{no_rc_version}-1_all.deb + - libparquet-glib11_{no_rc_version}-1_amd64.deb + - libparquet11_{no_rc_version}-1_amd64.deb ubuntu-bionic: platform: linux @@ -341,28 +341,28 @@ tasks: - .debian.tar.xz - .orig.tar.gz artifacts: - - apache-arrow_{version}-1.debian.tar.xz - - apache-arrow_{version}-1.dsc - - apache-arrow_{version}.orig.tar.gz - - gir1.2-arrow-1.0_{version}-1_amd64.deb - - gir1.2-arrow-gpu-1.0_{version}-1_amd64.deb - - gir1.2-parquet-1.0_{version}-1_amd64.deb - - libarrow-dev_{version}-1_amd64.deb - - libarrow-glib-dev_{version}-1_amd64.deb - - libarrow-glib-doc_{version}-1_all.deb - - libarrow-glib11_{version}-1_amd64.deb - - libarrow-gpu-dev_{version}-1_amd64.deb - - libarrow-gpu-glib-dev_{version}-1_amd64.deb - - libarrow-gpu-glib11_{version}-1_amd64.deb - - libarrow-gpu11_{version}-1_amd64.deb - - libarrow-python-dev_{version}-1_amd64.deb - - libarrow-python11_{version}-1_amd64.deb - - libarrow11_{version}-1_amd64.deb - - libparquet-dev_{version}-1_amd64.deb - - libparquet-glib-dev_{version}-1_amd64.deb - - libparquet-glib-doc_{version}-1_all.deb - - libparquet-glib11_{version}-1_amd64.deb - - libparquet11_{version}-1_amd64.deb + - apache-arrow_{no_rc_version}-1.debian.tar.xz + - apache-arrow_{no_rc_version}-1.dsc + - apache-arrow_{no_rc_version}.orig.tar.gz + - gir1.2-arrow-1.0_{no_rc_version}-1_amd64.deb + - gir1.2-arrow-gpu-1.0_{no_rc_version}-1_amd64.deb + - gir1.2-parquet-1.0_{no_rc_version}-1_amd64.deb + - libarrow-dev_{no_rc_version}-1_amd64.deb + - libarrow-glib-dev_{no_rc_version}-1_amd64.deb + - libarrow-glib-doc_{no_rc_version}-1_all.deb + - libarrow-glib11_{no_rc_version}-1_amd64.deb + - libarrow-gpu-dev_{no_rc_version}-1_amd64.deb + - libarrow-gpu-glib-dev_{no_rc_version}-1_amd64.deb + - libarrow-gpu-glib11_{no_rc_version}-1_amd64.deb + - libarrow-gpu11_{no_rc_version}-1_amd64.deb + - libarrow-python-dev_{no_rc_version}-1_amd64.deb + - libarrow-python11_{no_rc_version}-1_amd64.deb + - libarrow11_{no_rc_version}-1_amd64.deb + - libparquet-dev_{no_rc_version}-1_amd64.deb + - libparquet-glib-dev_{no_rc_version}-1_amd64.deb + - libparquet-glib-doc_{no_rc_version}-1_all.deb + - libparquet-glib11_{no_rc_version}-1_amd64.deb + - libparquet11_{no_rc_version}-1_amd64.deb centos-6: platform: linux @@ -372,12 +372,12 @@ tasks: upload_extensions: - .rpm artifacts: - - arrow-{version}-1.el6.src.rpm - - arrow-debuginfo-{version}-1.el6.x86_64.rpm - - arrow-devel-{version}-1.el6.x86_64.rpm - - arrow-libs-{version}-1.el6.x86_64.rpm - - arrow-python-devel-{version}-1.el6.x86_64.rpm - - arrow-python-libs-{version}-1.el6.x86_64.rpm + - arrow-{no_rc_version}-1.el6.src.rpm + - arrow-debuginfo-{no_rc_version}-1.el6.x86_64.rpm + - arrow-devel-{no_rc_version}-1.el6.x86_64.rpm + - arrow-libs-{no_rc_version}-1.el6.x86_64.rpm + - arrow-python-devel-{no_rc_version}-1.el6.x86_64.rpm + - arrow-python-libs-{no_rc_version}-1.el6.x86_64.rpm centos-7: platform: linux @@ -387,17 +387,17 @@ tasks: upload_extensions: - .rpm artifacts: - - arrow-{version}-1.el7.src.rpm - - arrow-debuginfo-{version}-1.el7.x86_64.rpm - - arrow-devel-{version}-1.el7.x86_64.rpm - - arrow-glib-devel-{version}-1.el7.x86_64.rpm - - arrow-glib-doc-{version}-1.el7.x86_64.rpm - - arrow-glib-libs-{version}-1.el7.x86_64.rpm - - arrow-libs-{version}-1.el7.x86_64.rpm - - arrow-python-devel-{version}-1.el7.x86_64.rpm - - arrow-python-libs-{version}-1.el7.x86_64.rpm - - parquet-devel-{version}-1.el7.x86_64.rpm - - parquet-glib-devel-{version}-1.el7.x86_64.rpm - - parquet-glib-doc-{version}-1.el7.x86_64.rpm - - parquet-glib-libs-{version}-1.el7.x86_64.rpm - - parquet-libs-{version}-1.el7.x86_64.rpm + - arrow-{no_rc_version}-1.el7.src.rpm + - arrow-debuginfo-{no_rc_version}-1.el7.x86_64.rpm + - arrow-devel-{no_rc_version}-1.el7.x86_64.rpm + - arrow-glib-devel-{no_rc_version}-1.el7.x86_64.rpm + - arrow-glib-doc-{no_rc_version}-1.el7.x86_64.rpm + - arrow-glib-libs-{no_rc_version}-1.el7.x86_64.rpm + - arrow-libs-{no_rc_version}-1.el7.x86_64.rpm + - arrow-python-devel-{no_rc_version}-1.el7.x86_64.rpm + - arrow-python-libs-{no_rc_version}-1.el7.x86_64.rpm + - parquet-devel-{no_rc_version}-1.el7.x86_64.rpm + - parquet-glib-devel-{no_rc_version}-1.el7.x86_64.rpm + - parquet-glib-doc-{no_rc_version}-1.el7.x86_64.rpm + - parquet-glib-libs-{no_rc_version}-1.el7.x86_64.rpm + - parquet-libs-{no_rc_version}-1.el7.x86_64.rpm