fix opensuse rpm

Signed-off-by: Jessica Frazelle <acidburn@docker.com>
This commit is contained in:
Jessica Frazelle 2016-01-15 15:46:56 -08:00
parent 5ba3edd486
commit 1cbd772629
No known key found for this signature in database
GPG Key ID: 18F3685C0022BFF3
5 changed files with 16 additions and 4 deletions

View File

@ -108,6 +108,10 @@ for version in "${versions[@]}"; do
opensuse:*) opensuse:*)
packages=( "${packages[@]/btrfs-progs-devel/libbtrfs-devel}" ) packages=( "${packages[@]/btrfs-progs-devel/libbtrfs-devel}" )
packages=( "${packages[@]/pkgconfig/pkg-config}" ) packages=( "${packages[@]/pkgconfig/pkg-config}" )
if [[ "$from" == "opensuse:13."* ]]; then
packages+=( systemd-rpm-macros )
fi
# use zypper # use zypper
echo "RUN zypper --non-interactive install ${packages[*]}" >> "$version/Dockerfile" echo "RUN zypper --non-interactive install ${packages[*]}" >> "$version/Dockerfile"
;; ;;

View File

@ -5,7 +5,7 @@
FROM opensuse:13.2 FROM opensuse:13.2
RUN zypper --non-interactive install ca-certificates* curl gzip rpm-build RUN zypper --non-interactive install ca-certificates* curl gzip rpm-build
RUN zypper --non-interactive install libbtrfs-devel device-mapper-devel glibc-static libselinux-devel libtool-ltdl-devel pkg-config selinux-policy selinux-policy-devel sqlite-devel systemd-devel tar RUN zypper --non-interactive install libbtrfs-devel device-mapper-devel glibc-static libselinux-devel libtool-ltdl-devel pkg-config selinux-policy selinux-policy-devel sqlite-devel systemd-devel tar systemd-rpm-macros
ENV GO_VERSION 1.5.3 ENV GO_VERSION 1.5.3
RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local

View File

@ -1,5 +1,5 @@
# #
# THIS FILE IS AUTOGENERATED; SEE "contrib/builder/rpm/generate.sh"! # THIS FILE IS AUTOGENERATED; SEE "contrib/builder/rpm/amd64/generate.sh"!
# #
FROM oraclelinux:6 FROM oraclelinux:6

View File

@ -12,7 +12,7 @@ Vendor: Docker
Packager: Docker <support@docker.com> Packager: Docker <support@docker.com>
# is_systemd conditional # is_systemd conditional
%if 0%{?fedora} >= 21 || 0%{?centos} >= 7 || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1300 %if 0%{?fedora} >= 21 || 0%{?centos} >= 7 || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1210
%global is_systemd 1 %global is_systemd 1
%endif %endif
@ -20,9 +20,12 @@ Packager: Docker <support@docker.com>
# most are already in the container (see contrib/builder/rpm/ARCH/generate.sh) # most are already in the container (see contrib/builder/rpm/ARCH/generate.sh)
# only require systemd on those systems # only require systemd on those systems
%if 0%{?is_systemd} %if 0%{?is_systemd}
%if 0%{?suse_version} >= 1210
BuildRequires: systemd-rpm-macros
%{?systemd_requires}
%else
BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(systemd)
Requires: systemd-units Requires: systemd-units
%if !0%{?suse_version}
BuildRequires: pkgconfig(libsystemd-journal) BuildRequires: pkgconfig(libsystemd-journal)
%endif %endif
%else %else
@ -35,7 +38,11 @@ Requires(preun): initscripts
# required packages on install # required packages on install
Requires: /bin/sh Requires: /bin/sh
Requires: iptables Requires: iptables
%if !0%{?suse_version}
Requires: libcgroup Requires: libcgroup
%else
Requires: libcgroup1
%endif
Requires: tar Requires: tar
Requires: xz Requires: xz
%if 0%{?fedora} >= 21 || 0%{?centos} >= 7 || 0%{?rhel} >= 7 || 0%{?oraclelinux} >= 7 %if 0%{?fedora} >= 21 || 0%{?centos} >= 7 || 0%{?rhel} >= 7 || 0%{?oraclelinux} >= 7

View File

@ -100,6 +100,7 @@ set -e
RUN tar -cz -C /usr/src -f /root/rpmbuild/SOURCES/${rpmName}.tar.gz ${rpmName} RUN tar -cz -C /usr/src -f /root/rpmbuild/SOURCES/${rpmName}.tar.gz ${rpmName}
RUN { cat /usr/src/${rpmName}/contrib/builder/rpm/${PACKAGE_ARCH}/changelog; } >> ${rpmName}.spec && tail >&2 ${rpmName}.spec RUN { cat /usr/src/${rpmName}/contrib/builder/rpm/${PACKAGE_ARCH}/changelog; } >> ${rpmName}.spec && tail >&2 ${rpmName}.spec
RUN rpmbuild -ba \ RUN rpmbuild -ba \
--define '_gitcommit $DOCKER_GITCOMMIT' \
--define '_release $rpmRelease' \ --define '_release $rpmRelease' \
--define '_version $rpmVersion' \ --define '_version $rpmVersion' \
--define '_origversion $VERSION' \ --define '_origversion $VERSION' \