浏览代码

Merge pull request #22535 from mlaventure/fix-oraclelinux-6-rpm

Fix rpm generation on oraclelinux-6
Alexander Morozov 9 年之前
父节点
当前提交
68ba274d22
共有 2 个文件被更改,包括 14 次插入14 次删除
  1. 11 11
      contrib/builder/rpm/amd64/generate.sh
  2. 3 3
      contrib/builder/rpm/amd64/oraclelinux-6/Dockerfile

+ 11 - 11
contrib/builder/rpm/amd64/generate.sh

@@ -41,6 +41,17 @@ for version in "${versions[@]}"; do
 	extraBuildTags='pkcs11'
 	runcBuildTags=
 
+	case "$from" in
+		oraclelinux:6)
+			# We need a known version of the kernel-uek-devel headers to set CGO_CPPFLAGS, so grab the UEKR4 GA version
+			# This requires using yum-config-manager from yum-utils to enable the UEKR4 yum repo
+			echo "RUN yum install -y yum-utils && curl -o /etc/yum.repos.d/public-yum-ol6.repo http://yum.oracle.com/public-yum-ol6.repo && yum-config-manager -q --enable ol6_UEKR4"  >> "$version/Dockerfile"
+			echo "RUN yum install -y kernel-uek-devel-4.1.12-32.el6uek"  >> "$version/Dockerfile"
+			echo >> "$version/Dockerfile"
+			;;
+		*) ;;
+	esac
+
 	case "$from" in
 		centos:*)
 			# get "Development Tools" packages dependencies
@@ -125,17 +136,6 @@ for version in "${versions[@]}"; do
 
 	echo >> "$version/Dockerfile"
 
-	case "$from" in
-		oraclelinux:6)
-			# We need a known version of the kernel-uek-devel headers to set CGO_CPPFLAGS, so grab the UEKR4 GA version
-			# This requires using yum-config-manager from yum-utils to enable the UEKR4 yum repo
-			echo "RUN yum install -y yum-utils && curl -o /etc/yum.repos.d/public-yum-ol6.repo http://yum.oracle.com/public-yum-ol6.repo && yum-config-manager -q --enable ol6_UEKR4"  >> "$version/Dockerfile"
-			echo "RUN yum install -y kernel-uek-devel-4.1.12-32.el6uek"  >> "$version/Dockerfile"
-			echo >> "$version/Dockerfile"
-			;;
-		*) ;;
-	esac
-
 
 	awk '$1 == "ENV" && $2 == "GO_VERSION" { print; exit }' ../../../../Dockerfile >> "$version/Dockerfile"
 	echo 'RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local' >> "$version/Dockerfile"

+ 3 - 3
contrib/builder/rpm/amd64/oraclelinux-6/Dockerfile

@@ -4,12 +4,12 @@
 
 FROM oraclelinux:6
 
-RUN yum groupinstall -y "Development Tools"
-RUN yum install -y btrfs-progs-devel device-mapper-devel glibc-static  libselinux-devel libtool-ltdl-devel pkgconfig selinux-policy selinux-policy-devel sqlite-devel  tar git
-
 RUN yum install -y yum-utils && curl -o /etc/yum.repos.d/public-yum-ol6.repo http://yum.oracle.com/public-yum-ol6.repo && yum-config-manager -q --enable ol6_UEKR4
 RUN yum install -y kernel-uek-devel-4.1.12-32.el6uek
 
+RUN yum groupinstall -y "Development Tools"
+RUN yum install -y btrfs-progs-devel device-mapper-devel glibc-static  libselinux-devel libtool-ltdl-devel pkgconfig selinux-policy selinux-policy-devel sqlite-devel  tar git
+
 ENV GO_VERSION 1.5.4
 RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local
 ENV PATH $PATH:/usr/local/go/bin