2008-09-04 15:59:45 +02:00
|
|
|
#
|
2011-03-21 11:05:51 +01:00
|
|
|
# spec file for package post-build-checks
|
2008-09-04 15:59:45 +02:00
|
|
|
#
|
2019-07-01 09:56:56 +02:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2008-09-04 15:59:45 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-10-15 14:32:26 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2008-09-04 15:59:45 +02:00
|
|
|
#
|
|
|
|
|
2011-12-07 11:00:33 +01:00
|
|
|
|
2018-10-15 14:32:26 +02:00
|
|
|
%define version_unconverted 84.88+git20181015.ceb5c96
|
2016-05-12 08:50:42 +02:00
|
|
|
|
2008-09-04 15:59:45 +02:00
|
|
|
Name: post-build-checks
|
2011-12-07 11:00:33 +01:00
|
|
|
Summary: post checks for build after rpms have been created
|
2018-08-09 16:16:38 +02:00
|
|
|
License: GPL-2.0-or-later
|
2008-09-04 15:59:45 +02:00
|
|
|
Group: Development/Tools/Building
|
2018-10-15 14:32:26 +02:00
|
|
|
Version: 84.88+git20181015.ceb5c96
|
2011-12-01 17:36:57 +01:00
|
|
|
Release: 0
|
2008-09-04 15:59:45 +02:00
|
|
|
PreReq: aaa_base permissions sed
|
2012-12-10 15:01:06 +01:00
|
|
|
Requires: aaa_base-malloccheck
|
2012-10-27 20:31:09 +02:00
|
|
|
Requires: gawk
|
2013-10-14 10:05:28 +02:00
|
|
|
Url: https://github.com/openSUSE/post-build-checks
|
2010-11-30 11:11:48 +01:00
|
|
|
#
|
|
|
|
# Note: don't rebuild this manually. Instead submit your patches
|
|
|
|
# for inclusion in the git repo!
|
|
|
|
#
|
2013-10-14 10:05:28 +02:00
|
|
|
# git clone https://github.com/openSUSE/post-build-checks.git
|
2014-01-07 21:12:12 +01:00
|
|
|
# osc service dr
|
2010-11-30 11:11:48 +01:00
|
|
|
#
|
2014-01-07 21:12:12 +01:00
|
|
|
Source0: %{name}-%{version}.tar.xz
|
2008-09-04 15:59:45 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
some scripts to check for problems like test-installing the newly
|
|
|
|
created rpms and checking the logfile for errors.
|
|
|
|
|
|
|
|
This package will also set/change the following sysconfig variables, so
|
|
|
|
it may not be a good idea to install this to a running system:
|
|
|
|
/etc/sysconfig/security:PERMISSION_SECURITY="secure"
|
|
|
|
/etc/sysconfig/clock:TIMEZONE="UTC"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
2019-07-01 09:56:56 +02:00
|
|
|
%define _lto_cflags %{nil}
|
2008-09-04 15:59:45 +02:00
|
|
|
# nothing to do
|
|
|
|
|
|
|
|
%install
|
|
|
|
install -d $RPM_BUILD_ROOT/usr/lib/build/checks
|
|
|
|
install -d $RPM_BUILD_ROOT/usr/lib/build/checks-data
|
|
|
|
install -d $RPM_BUILD_ROOT/usr/lib/build/helper
|
|
|
|
install -m 755 checks/* $RPM_BUILD_ROOT/usr/lib/build/checks
|
|
|
|
install -m 644 checks-data/* $RPM_BUILD_ROOT/usr/lib/build/checks-data
|
|
|
|
install -m 755 helper/* $RPM_BUILD_ROOT/usr/lib/build/helper
|
2010-11-30 11:11:48 +01:00
|
|
|
install -m 644 -D suse-buildsystem.sh $RPM_BUILD_ROOT/etc/profile.d/suse-buildsystem.sh
|
2018-10-15 14:45:59 +02:00
|
|
|
install -m 644 -D suse-ignored-rpaths.conf $RPM_BUILD_ROOT/etc/suse-ignored-rpaths.conf
|
2008-09-04 15:59:45 +02:00
|
|
|
chmod 755 $RPM_BUILD_ROOT/usr/lib/build/checks-data/check*
|
|
|
|
|
2008-10-08 12:03:27 +02:00
|
|
|
%check
|
|
|
|
for i in tests/xx*.c
|
|
|
|
do
|
|
|
|
(echo "Executing(%%build)" ; gcc $RPM_OPT_FLAGS -c $i 2>&1)| checks-data/check_gcc_output 2>&1|grep "^[WE]"
|
|
|
|
done
|
|
|
|
|
2008-09-04 15:59:45 +02:00
|
|
|
%post
|
2009-12-16 01:10:38 +01:00
|
|
|
# do nothing when not in a build chroot
|
|
|
|
if ! test -e /.buildenv; then
|
|
|
|
exit 0
|
|
|
|
fi
|
2008-09-04 15:59:45 +02:00
|
|
|
sed -i -e "s@^PERMISSION_SECURITY=.*@PERMISSION_SECURITY=\"secure\"@" /etc/sysconfig/security
|
2014-02-20 17:17:47 +01:00
|
|
|
if [ -f /etc/sysconfig/clock ] ; then
|
2008-09-04 15:59:45 +02:00
|
|
|
sed -i -e "s@^TIMEZONE=.*@TIMEZONE=\"UTC\"@" /etc/sysconfig/clock
|
2014-02-20 17:17:47 +01:00
|
|
|
fi
|
2014-02-01 09:47:26 +01:00
|
|
|
UNAME=/bin/uname
|
|
|
|
if test -f /usr/bin/uname ; then
|
|
|
|
UNAME=/usr/bin/uname
|
|
|
|
fi
|
|
|
|
if test -f $UNAME -a ! -L $UNAME ; then
|
|
|
|
mv $UNAME $UNAME.bin
|
|
|
|
ln -s /usr/lib/build/helper/uname.sh $UNAME
|
2008-09-04 15:59:45 +02:00
|
|
|
fi
|
|
|
|
|
2009-02-24 00:03:11 +01:00
|
|
|
%preun
|
2009-12-16 01:10:38 +01:00
|
|
|
if ! test -e /.buildenv; then
|
|
|
|
exit 0
|
|
|
|
fi
|
2014-02-01 09:47:26 +01:00
|
|
|
UNAME=/bin/uname
|
|
|
|
if test -f /usr/bin/uname.bin ; then
|
|
|
|
UNAME=/usr/bin/uname
|
|
|
|
fi
|
|
|
|
if test "$1" = 0 -a -f $UNAME.bin ; then
|
|
|
|
mv $UNAME.bin $UNAME
|
2009-02-24 00:03:11 +01:00
|
|
|
fi
|
|
|
|
|
2008-09-04 15:59:45 +02:00
|
|
|
%files
|
|
|
|
%defattr(-, root, root)
|
2018-08-09 16:17:07 +02:00
|
|
|
%license COPYING
|
2008-09-04 15:59:45 +02:00
|
|
|
/usr/lib/build
|
2009-06-12 19:49:38 +02:00
|
|
|
/etc/profile.d/suse-buildsystem.sh
|
2012-06-04 12:15:07 +02:00
|
|
|
/etc/suse-ignored-rpaths.conf
|
2008-09-04 15:59:45 +02:00
|
|
|
|
|
|
|
%changelog
|