update
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/build?expand=0&rev=417
This commit is contained in:
57
build.spec
57
build.spec
@@ -18,9 +18,15 @@
|
||||
# needsbinariesforbuild
|
||||
|
||||
|
||||
Name: build
|
||||
%if 0%{?suse_version}
|
||||
%define __pkg_name build
|
||||
%else
|
||||
%define __pkg_name obs-build
|
||||
%endif
|
||||
|
||||
Name: %{__pkg_name}
|
||||
Summary: A Script to Build SUSE Linux RPMs
|
||||
License: GPL-2.0-or-later AND GPL-2.0-only
|
||||
License: GPL-2.0-only OR GPL-3.0-only
|
||||
Group: Development/Tools/Building
|
||||
Version: 20200313
|
||||
Release: 0
|
||||
@@ -33,12 +39,28 @@ Requires: bash
|
||||
Requires: binutils
|
||||
Requires: perl
|
||||
Requires: tar
|
||||
# needed for fuser
|
||||
Requires: psmisc
|
||||
# just to verify existence of packages
|
||||
BuildRequires: bash
|
||||
BuildRequires: binutils
|
||||
BuildRequires: perl
|
||||
BuildRequires: psmisc
|
||||
BuildRequires: tar
|
||||
# For testcases
|
||||
BuildRequires: perl(Date::Parse)
|
||||
BuildRequires: perl(Test::Harness)
|
||||
BuildRequires: perl(Test::More)
|
||||
%if 0%{?fedora}
|
||||
Requires: perl-MD5
|
||||
Requires: perl-TimeDate
|
||||
BuildRequires: perl-TimeDate
|
||||
%endif
|
||||
Conflicts: bsdtar < 2.5.5
|
||||
%if 0%{?suse_version} > 1000
|
||||
BuildRequires: perl(Date::Parse)
|
||||
BuildRequires: perl(Test::Harness)
|
||||
BuildRequires: perl(Test::More)
|
||||
%if 0%{?suse_version} > 1000 || 0%{?centos_version} >= 800 || 0%{?rhel_version} >= 800 || 0%{?fedora_version} >= 21
|
||||
# None of them are actually required for core features.
|
||||
# Perl helper scripts use them.
|
||||
Recommends: perl(Date::Language)
|
||||
@@ -53,15 +75,17 @@ Recommends: perl(YAML)
|
||||
Recommends: perl(YAML::LibYAML)
|
||||
Recommends: bsdtar
|
||||
Recommends: qemu-linux-user
|
||||
Recommends: zstd
|
||||
Recommends: /usr/bin/qemu-kvm
|
||||
Recommends: /sbin/mkfs.ext3
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version} > 1120 || ! 0%{?suse_version}
|
||||
Requires: build-mkbaselibs
|
||||
Requires: %{__pkg_name}-mkbaselibs
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version} > 1120 || 0%{?mdkversion}
|
||||
Recommends: build-mkdrpms
|
||||
Recommends: %{__pkg_name}-mkdrpms
|
||||
%endif
|
||||
|
||||
%description
|
||||
@@ -85,7 +109,7 @@ Summary: Tools to generate delta rpms
|
||||
Group: Development/Tools/Building
|
||||
Requires: deltarpm
|
||||
# XXX: we wanted to avoid that but mkdrpms needs Build::Rpm::rpmq
|
||||
Requires: build
|
||||
Requires: %{__pkg_name}
|
||||
|
||||
%description mkdrpms
|
||||
This package contains the parts which may be installed in the inner build system
|
||||
@@ -100,11 +124,11 @@ for generating delta rpm packages.
|
||||
%package initvm-%{initvm_arch}
|
||||
Summary: Virtualization initializer for emulated cross architecture builds
|
||||
Group: Development/Tools/Building
|
||||
Requires: build
|
||||
Requires: %{__pkg_name}
|
||||
BuildRequires: gcc
|
||||
BuildRequires: glibc-devel
|
||||
Provides: build-initvm
|
||||
Obsoletes: build-initvm
|
||||
Provides: %{__pkg_name}-initvm
|
||||
Obsoletes: %{__pkg_name}-initvm
|
||||
%if 0%{?suse_version} > 1200
|
||||
BuildRequires: glibc-devel-static
|
||||
%endif
|
||||
@@ -156,7 +180,7 @@ ln -s sl${SUSE_V:0:2}.${SUSE_V:2:1}.conf default.conf
|
||||
ln -s sle${SLE_V:0:2}.${SLE_V:3:1}.conf default.conf
|
||||
%endif
|
||||
%if 0%{?sles_version} == 1110
|
||||
# this is SUSE SLE 11
|
||||
# this is SUSE SLE 11
|
||||
ln -s sles11sp2.conf default.conf
|
||||
%endif
|
||||
# make sure that we have a config
|
||||
@@ -182,12 +206,17 @@ test -e baselibs_global.conf || exit 1
|
||||
%endif
|
||||
|
||||
%check
|
||||
for i in build build-* ; do bash -n $i || exit 1 ; done
|
||||
|
||||
# run perl module unit tests
|
||||
LANG=C make test || exit 1
|
||||
|
||||
if [ `whoami` != "root" ]; then
|
||||
echo "WARNING: Not building as root, tests did not run!"
|
||||
echo "WARNING: Not building as root, build test did not run!"
|
||||
exit 0
|
||||
fi
|
||||
if [ ! -f "%{buildroot}/usr/lib/build/configs/default.conf" ]; then
|
||||
echo "WARNING: No default config, tests did not run!"
|
||||
echo "WARNING: No default config, build test did not run!"
|
||||
exit 0
|
||||
fi
|
||||
# get back the default.conf link
|
||||
@@ -196,6 +225,8 @@ cp -av %{buildroot}/usr/lib/build/configs/default.conf configs/
|
||||
export BUILD_IGNORE_2ND_STAGE=1
|
||||
# use our own build code
|
||||
export BUILD_DIR=$PWD
|
||||
|
||||
# simple chroot build test
|
||||
cd test
|
||||
# target is autodetected
|
||||
%if 0%{?sles_version}
|
||||
@@ -222,7 +253,7 @@ sed -i 's,build-mkbaselibs,,' ../configs/*.conf
|
||||
%config(noreplace) /usr/lib/build/emulator/emulator.sh
|
||||
%{_mandir}/man1/build.1*
|
||||
%{_mandir}/man1/unrpm.1*
|
||||
%{_mandir}/man1/vc.1*
|
||||
%{_mandir}/man1/buildvc.1*
|
||||
%if 0%{?suse_version}
|
||||
%exclude /usr/lib/build/initvm.*
|
||||
%endif
|
||||
|
Reference in New Issue
Block a user