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
|
|
|
#
|
2011-03-21 11:05:51 +01:00
|
|
|
# Copyright (c) 2011 SUSE LINUX Products 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.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
|
|
|
|
|
|
|
Name: post-build-checks
|
2010-01-12 12:55:49 +01:00
|
|
|
License: GPLv2+
|
2008-09-04 15:59:45 +02:00
|
|
|
Group: Development/Tools/Building
|
|
|
|
AutoReqProv: on
|
|
|
|
Summary: post checks for build after rpms have been created
|
|
|
|
Version: 1.0
|
2011-07-26 12:05:06 +02:00
|
|
|
Release: 95
|
2008-09-04 15:59:45 +02:00
|
|
|
PreReq: aaa_base permissions sed
|
2010-11-30 11:11:48 +01:00
|
|
|
Url: http://gitorious.org/opensuse/post-build-checks
|
|
|
|
#
|
|
|
|
# Note: don't rebuild this manually. Instead submit your patches
|
|
|
|
# for inclusion in the git repo!
|
|
|
|
#
|
|
|
|
# git clone git://gitorious.org/opensuse/post-build-checks.git
|
|
|
|
# cd post-build-checks
|
|
|
|
# make package
|
|
|
|
#
|
2008-09-04 15:59:45 +02:00
|
|
|
Source0: %{name}-%{version}.tar.bz2
|
|
|
|
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
|
|
|
|
# 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
|
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
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%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
|
|
|
|
sed -i -e "s@^TIMEZONE=.*@TIMEZONE=\"UTC\"@" /etc/sysconfig/clock
|
|
|
|
if test -f /bin/uname -a ! -L /bin/uname ; then
|
|
|
|
mv /bin/uname /bin/uname.bin
|
|
|
|
ln -s /usr/lib/build/helper/uname.sh /bin/uname
|
|
|
|
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
|
2009-02-24 00:03:11 +01:00
|
|
|
if test "$1" = 0 -a -f /bin/uname.bin ; then
|
|
|
|
mv /bin/uname.bin /bin/uname
|
|
|
|
fi
|
|
|
|
|
2008-09-04 15:59:45 +02:00
|
|
|
%files
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%doc COPYING
|
|
|
|
/usr/lib/build
|
2009-06-12 19:49:38 +02:00
|
|
|
/etc/profile.d/suse-buildsystem.sh
|
2008-09-04 15:59:45 +02:00
|
|
|
|
|
|
|
%changelog
|