From c187bdc0a28e4f3b9378e2b1daa964c23b599383 Mon Sep 17 00:00:00 2001 From: Owen O'Malley Date: Thu, 21 Jul 2011 19:16:09 +0000 Subject: [PATCH] HDFS-2156. Make hdfs and mapreduce rpm only depend on the same major version for common and hdfs. (eyang via omalley) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1149323 13f79535-47bb-0310-9956-ffa450edef68 --- hdfs/CHANGES.txt | 3 +++ hdfs/src/packages/rpm/spec/hadoop-hdfs.spec | 9 +++++---- mapreduce/src/packages/rpm/spec/hadoop-mapred.spec | 9 +++++---- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/hdfs/CHANGES.txt b/hdfs/CHANGES.txt index ccd861a710..ce4ca42ddc 100644 --- a/hdfs/CHANGES.txt +++ b/hdfs/CHANGES.txt @@ -294,6 +294,9 @@ Trunk (unreleased changes) HDFS-2083. Query JMX statistics over http via JMXJsonServlet. (tanping) + HDFS-2156. Make hdfs and mapreduce rpm only depend on the same major + version for common and hdfs. (eyang via omalley) + IMPROVEMENTS HDFS-1875. MiniDFSCluster hard-codes dfs.datanode.address to localhost diff --git a/hdfs/src/packages/rpm/spec/hadoop-hdfs.spec b/hdfs/src/packages/rpm/spec/hadoop-hdfs.spec index 00fb9a9713..d2dcf4f2d8 100644 --- a/hdfs/src/packages/rpm/spec/hadoop-hdfs.spec +++ b/hdfs/src/packages/rpm/spec/hadoop-hdfs.spec @@ -17,9 +17,10 @@ # RPM Spec file for Hadoop version @version@ # -%define name hadoop-hdfs -%define version @version@ -%define release @package.release@ +%define name hadoop-hdfs +%define version @version@ +%define release @package.release@ +%define major_version %(echo %{version} | cut -d. -f -2) # Installation Locations %define _prefix @package.prefix@ @@ -75,7 +76,7 @@ Prefix: %{_conf_dir} Prefix: %{_log_dir} Prefix: %{_pid_dir} Buildroot: %{_build_dir} -Requires: sh-utils, textutils, /usr/sbin/useradd, /usr/sbin/usermod, /sbin/chkconfig, /sbin/service, jdk >= 1.6, hadoop-common >= %{version} +Requires: sh-utils, textutils, /usr/sbin/useradd, /usr/sbin/usermod, /sbin/chkconfig, /sbin/service, hadoop-common >= %{major_version}.0, hadoop-common <= %{major_version}.9999 AutoReqProv: no Provides: hadoop-hdfs diff --git a/mapreduce/src/packages/rpm/spec/hadoop-mapred.spec b/mapreduce/src/packages/rpm/spec/hadoop-mapred.spec index 8e20055738..70dfe9361b 100644 --- a/mapreduce/src/packages/rpm/spec/hadoop-mapred.spec +++ b/mapreduce/src/packages/rpm/spec/hadoop-mapred.spec @@ -17,9 +17,10 @@ # RPM Spec file for Hadoop version @version@ # -%define name hadoop-mapreduce -%define version @version@ -%define release @package.release@ +%define name hadoop-mapreduce +%define version @version@ +%define release @package.release@ +%define major_version %(echo %{version} | cut -d. -f -2) # Installation Locations %define _prefix @package.prefix@ @@ -76,7 +77,7 @@ Prefix: %{_conf_dir} Prefix: %{_log_dir} Prefix: %{_pid_dir} Buildroot: %{_build_dir} -Requires: sh-utils, textutils, /usr/sbin/useradd, /usr/sbin/usermod, /sbin/chkconfig, /sbin/service, jdk >= 1.6, hadoop-common >= %{version}, hadoop-hdfs >= %{version} +Requires: sh-utils, textutils, /usr/sbin/useradd, /usr/sbin/usermod, /sbin/chkconfig, /sbin/service, hadoop-common >= %{major_version}, , hadoop-common <= %{major_version}.9999, hadoop-hdfs >= %{major_version}, hadoop-hdfs <= %{major_version}.9999 AutoReqProv: no Provides: hadoop-mapreduce