2007-01-16 00:38:18 +01:00
|
|
|
#
|
|
|
|
# spec file for package suse-build-key (Version 1.0)
|
|
|
|
#
|
2008-05-05 18:37:24 +02:00
|
|
|
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-16 00:38:18 +01:00
|
|
|
#
|
2008-11-03 14:25:56 +01: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.
|
|
|
|
|
2007-01-16 00:38:18 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2008-05-05 18:37:24 +02:00
|
|
|
|
2008-09-20 04:50:09 +02:00
|
|
|
Name: suse-build-key
|
2007-01-16 00:38:18 +01:00
|
|
|
BuildRequires: gpg
|
2008-05-05 18:37:24 +02:00
|
|
|
License: GPL v2 or later
|
2007-01-16 00:38:18 +01:00
|
|
|
Group: System/Packages
|
|
|
|
Provides: build-key
|
|
|
|
Requires: gpg
|
2008-05-05 18:37:24 +02:00
|
|
|
AutoReqProv: off
|
2007-01-16 00:38:18 +01:00
|
|
|
Summary: The public gpg key for rpm package signature verification
|
|
|
|
Version: 1.0
|
2008-11-03 14:25:56 +01:00
|
|
|
Release: 907
|
2008-09-20 04:50:09 +02:00
|
|
|
Source0: suse-build-key.gpg
|
2007-01-16 00:38:18 +01:00
|
|
|
Source1: dumpsigs
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2008-05-05 18:37:24 +02:00
|
|
|
BuildArch: noarch
|
2007-01-16 00:38:18 +01:00
|
|
|
%define pubring usr/lib/rpm/gnupg/pubring.gpg
|
|
|
|
%define susering usr/lib/rpm/gnupg/suse-build-key.gpg
|
|
|
|
PreReq: sh-utils gpg fileutils mktemp
|
|
|
|
|
|
|
|
%description
|
|
|
|
This package contains the gpg key that is used to sign official SuSE
|
|
|
|
rpm packages. It will be installed as a keyring in
|
|
|
|
/usr/lib/rpm/gnupg/pubring.gpg. Administrators who wish to add their
|
|
|
|
own keys to verify against should use the following commandline command
|
|
|
|
to add the key to the keyring as used by RPM:
|
|
|
|
|
|
|
|
gpg --no-options --no-default-keyring \ --keyring
|
|
|
|
/usr/lib/rpm/gnupg/pubring.gpg --import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
rm -f foobarnosuchfileordirectory
|
|
|
|
#%setup
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/usr/lib/rpm/gnupg
|
|
|
|
install %{SOURCE0} $RPM_BUILD_ROOT/%{susering}
|
|
|
|
install -m 755 %{SOURCE1} $RPM_BUILD_ROOT/usr/lib/rpm/gnupg
|
|
|
|
touch $RPM_BUILD_ROOT/%{pubring}
|
|
|
|
touch $RPM_BUILD_ROOT/%{pubring}~
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(644,root,root)
|
|
|
|
%attr(755,root,root) %dir /usr/lib/rpm/gnupg
|
|
|
|
%attr(755,root,root) /usr/lib/rpm/gnupg/dumpsigs
|
|
|
|
%config /%{susering}
|
|
|
|
%ghost /%{pubring}
|
|
|
|
%ghost /%{pubring}~
|
|
|
|
|
|
|
|
%post
|
|
|
|
if [ ! -f %{pubring} ]; then
|
|
|
|
touch %{pubring}
|
|
|
|
fi
|
|
|
|
echo -n "importing SuSE build key to rpm keyring... "
|
|
|
|
TF=`mktemp /tmp/gpg.XXXXXX`
|
|
|
|
if [ -z "$TF" ]; then
|
|
|
|
echo "suse-build-key::post: cannot make temporary file. Fatal error."
|
|
|
|
exit 20
|
|
|
|
fi
|
|
|
|
if [ -z "$HOME" ]; then
|
|
|
|
HOME=/root
|
|
|
|
fi
|
|
|
|
if [ ! -d "$HOME" ]; then
|
|
|
|
mkdir "$HOME"
|
|
|
|
fi
|
|
|
|
gpg -q --batch --no-options < /dev/null > /dev/null 2>&1 || true
|
|
|
|
# no kidding... gpg won't initialize correctly without being called twice.
|
|
|
|
gpg < /dev/null > /dev/null 2>&1 || true
|
|
|
|
gpg < /dev/null > /dev/null 2>&1 || true
|
|
|
|
gpg -q --batch --no-options --no-default-keyring --no-permission-warning \
|
|
|
|
--keyring %{susering} --export -a > $TF
|
|
|
|
a="$?"
|
|
|
|
gpg -q --batch --no-options --no-default-keyring --no-permission-warning \
|
|
|
|
--keyring %{pubring} --import < $TF
|
|
|
|
b="$?"
|
|
|
|
rm -f "$TF"
|
|
|
|
if [ "$a" = 0 -a "$b" = 0 ]; then
|
|
|
|
echo "done."
|
|
|
|
else
|
|
|
|
echo "importing the key from the file %{susering}"
|
|
|
|
echo "returned an error. This should not happen. It may not be possible"
|
|
|
|
echo "to properly verify the authenticity of rpm packages from SuSE sources."
|
|
|
|
echo "The keyring containing the SuSE rpm package signing key can be found"
|
|
|
|
echo "in the root directory of the first CD (DVD) of your SuSE product."
|
|
|
|
exit -1
|
|
|
|
fi
|
2007-03-21 00:36:23 +01:00
|
|
|
### import suse package build key to roots gpg keyring
|
|
|
|
if test -f root/.gnupg/pubring.gpg ; then
|
|
|
|
chroot . usr/bin/gpg --export --armor --no-default-keyring \
|
|
|
|
--keyring %{susering} build@suse.de \
|
|
|
|
| chroot . usr/bin/gpg --import || true
|
|
|
|
if ! chroot . usr/bin/gpg --list-keys build@suse.de >/dev/null 2>&1 ; then
|
|
|
|
echo "gpg import for build@suse.de failed, please import manually" >&2
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
cp %{susering} root/.gnupg/pubring.gpg
|
|
|
|
fi
|
|
|
|
chmod 600 root/.gnupg/pubring.gpg
|
2007-01-16 00:38:18 +01:00
|
|
|
|
2007-03-21 00:36:23 +01:00
|
|
|
%changelog
|
2008-11-03 14:25:56 +01:00
|
|
|
* Fri Oct 31 2008 ro@suse.de
|
|
|
|
- added ptf key, expiring 2010-07-02
|
2008-06-03 01:03:07 +02:00
|
|
|
* Mon Jun 02 2008 ro@suse.de
|
|
|
|
- update keys again: for collaboration with rpm, the current
|
|
|
|
self-signature needs to be the first signature found in a key
|
2008-05-05 18:37:24 +02:00
|
|
|
* Mon May 05 2008 ro@suse.de
|
|
|
|
- updated keys
|
|
|
|
9C800ACA,8495160C,307E3D54: extend expiration by 2 years
|
|
|
|
until 2010-05-05
|
|
|
|
7E2E3B05: extend expiration by 2 years until 2010-05-24
|
|
|
|
* Mon Mar 19 2007 rguenther@suse.de
|
2007-03-21 00:36:23 +01:00
|
|
|
- merge suse-build-key keyring to roots gpg pubring
|
2008-05-05 18:37:24 +02:00
|
|
|
* Mon May 29 2006 ro@suse.de
|
2007-01-16 00:38:18 +01:00
|
|
|
- added new official provo dsa autobuild key ID 7E2E3B05
|
2008-05-05 18:37:24 +02:00
|
|
|
* Fri May 19 2006 ro@suse.de
|
2007-01-16 00:38:18 +01:00
|
|
|
- removed unused provo autobuild key
|
|
|
|
- added new official provo autobuild key ID A1912208
|
2008-05-05 18:37:24 +02:00
|
|
|
* Thu Apr 20 2006 ro@suse.de
|
2007-01-16 00:38:18 +01:00
|
|
|
- add dumpsigs script here to have _one_ place for the script
|
2008-05-05 18:37:24 +02:00
|
|
|
* Fri Mar 31 2006 ro@suse.de
|
2007-01-16 00:38:18 +01:00
|
|
|
- added build@suse.de rsa key ID 307E3D54
|
2008-05-05 18:37:24 +02:00
|
|
|
* Wed Jan 25 2006 mls@suse.de
|
2007-01-16 00:38:18 +01:00
|
|
|
- converted neededforbuild to BuildRequires
|
2008-05-05 18:37:24 +02:00
|
|
|
* Tue Oct 18 2005 ro@suse.de
|
2007-01-16 00:38:18 +01:00
|
|
|
- use correct provo autobuild key
|
2008-05-05 18:37:24 +02:00
|
|
|
* Tue Oct 18 2005 ro@suse.de
|
2007-01-16 00:38:18 +01:00
|
|
|
- added provo autobuild signing key (#128128)
|
|
|
|
- removed jds key
|
2008-05-05 18:37:24 +02:00
|
|
|
* Fri May 27 2005 mls@suse.de
|
2007-01-16 00:38:18 +01:00
|
|
|
- added mktemp to PreReqs [#86177]
|
2008-05-05 18:37:24 +02:00
|
|
|
* Thu Apr 28 2005 ro@suse.de
|
2007-01-16 00:38:18 +01:00
|
|
|
- added JDS public key (15c17deb)
|
2008-05-05 18:37:24 +02:00
|
|
|
* Tue Jan 25 2005 ro@suse.de
|
2007-01-16 00:38:18 +01:00
|
|
|
- added OES public key (0dfb3188)
|
2008-05-05 18:37:24 +02:00
|
|
|
* Tue Jun 22 2004 ro@suse.de
|
2007-01-16 00:38:18 +01:00
|
|
|
- updated build key (expiration changed to 2008-06-21) (#42326)
|
2008-05-05 18:37:24 +02:00
|
|
|
* Tue Feb 24 2004 hmacht@suse.de
|
2007-01-16 00:38:18 +01:00
|
|
|
- building as non-root
|
2008-05-05 18:37:24 +02:00
|
|
|
* Tue Sep 09 2003 ro@suse.de
|
2007-01-16 00:38:18 +01:00
|
|
|
- ignore return code from first gpg calls
|
2008-05-05 18:37:24 +02:00
|
|
|
* Tue Sep 09 2003 draht@suse.de
|
2007-01-16 00:38:18 +01:00
|
|
|
- call gpg twice without any arguments for proper initialization
|
|
|
|
inside postinstall
|
2008-05-05 18:37:24 +02:00
|
|
|
* Tue Sep 09 2003 draht@suse.de
|
2007-01-16 00:38:18 +01:00
|
|
|
- use temp file instead of pipe due to resource race between two
|
|
|
|
instances of gpg in %%post.
|
2008-05-05 18:37:24 +02:00
|
|
|
* Thu Sep 05 2002 draht@suse.de
|
2007-01-16 00:38:18 +01:00
|
|
|
- package now installs key from package-owned file into the rpm
|
|
|
|
pubring in %%post to allow other key packages to add their keys.
|
2008-05-05 18:37:24 +02:00
|
|
|
* Tue Aug 20 2002 mmj@suse.de
|
2007-01-16 00:38:18 +01:00
|
|
|
- Correct PreReq
|
2008-05-05 18:37:24 +02:00
|
|
|
* Fri Jul 26 2002 kukuk@suse.de
|
2007-01-16 00:38:18 +01:00
|
|
|
- Change Provides from suse-build-key to build-key
|
2008-05-05 18:37:24 +02:00
|
|
|
* Thu Feb 21 2002 draht@suse.de
|
2007-01-16 00:38:18 +01:00
|
|
|
- directory permission problem: 644 -> 755.
|
2008-05-05 18:37:24 +02:00
|
|
|
* Mon Feb 18 2002 ro@suse.de
|
2007-01-16 00:38:18 +01:00
|
|
|
- moved to /usr/lib/rpm/gnupg/pubring.pgp
|
|
|
|
rpm needs a directory as gpg_path and will use pubring.gpg
|
|
|
|
in that directory
|
2008-05-05 18:37:24 +02:00
|
|
|
* Wed Feb 13 2002 draht@suse.de
|
2007-01-16 00:38:18 +01:00
|
|
|
- initial package. Contains
|
2007-03-21 00:36:23 +01:00
|
|
|
- pub 2048R/3D25D3D9 1999-03-06 SuSE Security Team <security@suse.de>
|
|
|
|
- pub 1024D/9C800ACA 2000-10-19 SuSE Package Signing Key <build@suse.de>
|
|
|
|
- sub 2048g/8495160C 2000-10-19 [expires: 2006-02-12]
|