PDA

View Full Version : building own RPM-packages --> don't appear in database



wicking
19th November 2006, 03:44 PM
Hello.

I built my first RPM-package in Fedora Core 6. And I installed it on another machine running FC6 with no problems.

But the package wasn't listed when I typed
rpm -qa However when I tried to install it again it says that the package is already installed.

The package is for installing my RPM-GPG-key to verify the genuineness of my forthcoming packages.

And now another question: Are RPM-packages only listed in the RPM-database if they are part of a repository? Hmm...that would be strange.

My SPEC-file:

%define pubkeyname erikstreb

Summary: The %{pubkeyname} rpm public key
Name: rpmkey-%{pubkeyname}
Version: 0.1
Release: 2
License: GPL
URL: http://www.erikstreb.de/
Group: System Environment/Base
Source0: RPM-GPG-KEY-%{pubkeyname}
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-root

%description
The %{pubkeyname} rpm public key

%prep
%setup -c -T
%build
%install
rm -rf $RPM_BUILD_ROOT
install -Dpm 644 %{SOURCE0} \
$RPM_BUILD_ROOT%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-%{pubkeyname}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%{_sysconfdir}/pki/rpm-gpg/*

%changelog
* Sat Nov 18 2006 Erik Streb (RPM Key) <mail> 0.1-1
- first creation of gpg-key and rpm-package

wicking
19th November 2006, 04:07 PM
Ok, I already solved it. I've searched for the wrong package name.

But my GPG-key is still not in the database.
rpm -q gpg-pubkey-* doesn't list it. Even though the file with the key is in
/etc/pki/rpm-gpg/

And if I try
rpm -vK rpmkey-erikstreb-0.1-1.noarch.rpm it says
rpmkey-erikstreb-0.1-1.noarch.rpm:
Header V3 DSA-Signatur: NOKEY, key ID e899e085
SHA1-Kurzfassung des Headers: OK (a78bdaae755b3bfb7bd9bd614b0370c3ed12de8f)
MD5-Kurzfassung: OK (d379c174f9c02d0ba060a86b578a91a8)
V3 DSA-Signatur: NOKEY, key ID e899e085 which means that the key is not there, or not? Why??

Hmmm...I know, that you have to use
rpm --import ... normally to import the GPG-key in the database, but I didn't find such a line in fedora-release.spec or in livna-release.spec. How do they do that?