Zypper key not found kinda like a chroot (leaky layer)

So to be clear this isn’t a chroot at all. It just helps explain the setup a little bit.
Also the system underneath is not Opensuse.
It is a leaky layer setup. So there is no opensue kernel and insteal a compatability layer between the actual kernal and Xorg.
Everything works except package management. I can use rpm on packages. But dependency hunting is a real pain.
This is a partial log output from adding the oss repo. I notice no trusted keys were imported. Maybe that is normal?

2016-06-26 03:30:08 <1> P4N800K(1795) [zypp] ZYppImpl.cc(ZYppImpl):46 Initializing keyring...
2016-06-26 03:30:08 <1> P4N800K(1795) [zypp::KeyRing] KeyRing.cc(Impl):173 Current KeyRing::DefaultAccept: 0000000000
2016-06-26 03:30:08 <1> P4N800K(1795) [zypper] Zypper.cc(doCommand):2760 Going to process command addrepo
2016-06-26 03:30:08 <1> P4N800K(1795) [zypp] PathInfo.cc(dirForEach):563 readdir /etc/zypp/services.d 
2016-06-26 03:30:08 <1> P4N800K(1795) [zypp] PathInfo.cc(dirForEach):563 readdir /usr/lib/zypp/plugins/services 
2016-06-26 03:30:08 <1> P4N800K(1795) [zypp] RepoManager.cc(init_knownRepositories):636 start construct known repos
2016-06-26 03:30:08 <1> P4N800K(1795) [zypp] RepoManager.cc(repositories_in_dir):222 directory /etc/zypp/repos.d
2016-06-26 03:30:08 <1> P4N800K(1795) [zypp] PathInfo.cc(dirForEach):563 readdir /etc/zypp/repos.d 
2016-06-26 03:30:08 <1> P4N800K(1795) [zypp] PathInfo.cc(dirForEach):563 readdir /var/cache/zypp/raw 
2016-06-26 03:30:08 <1> P4N800K(1795) [zypp] PathInfo.cc(dirForEach):563 readdir /var/cache/zypp/solv 
2016-06-26 03:30:08 <1> P4N800K(1795) [zypp] RepoManager.cc(init_knownRepositories):673 end construct known repos


cut some stuff


2016-06-26 03:30:08 <1> P4N800K(1795) [zypp] RpmDb.cc(syncTrustedKeys):965 Going to sync trusted keys...
2016-06-26 03:30:08 <1> P4N800K(1795) [zypp++] librpmDb.cc(D):97 DBACCESS {NULL(/)/var/lib/rpm}
2016-06-26 03:30:08 <1> P4N800K(1795) [zypp++] librpmDb.cc(dbRelease):308 dbRelease: release, outstanding 0
2016-06-26 03:30:08 <1> P4N800K(1795) [zypp] RpmDb.cc(syncTrustedKeys):969 Rpm keys to export into zypp trusted keyring: 0
2016-06-26 03:30:08 <1> P4N800K(1795) [zypp] RpmDb.cc(syncTrustedKeys):970 Zypp trusted keys to import into rpm database: 0
2016-06-26 03:30:08 <1> P4N800K(1795) [zypp] RpmDb.cc(syncTrustedKeys):1019 Trusted keys synced.

Here is the console output for the attempt at refreshing the added repo

# /emul/linux/usr/bin/zypper -v ref oss
Verbosity: 1
Non-option program arguments: 'oss' 
Initializing Target
Specified repositories: oss 
Checking whether to refresh metadata for oss
Retrieving: media .........................................................................................................................[done]
Retrieving: content.asc ...................................................................................................................[done]
Retrieving: content.key ...................................................................................................................[done]
Retrieving repository 'oss' metadata .....................................................................................................[error]
Repository 'oss' is invalid.
|] Valid metadata not found at specified URL
History:
 - File /var/tmp/TmpFile.bkeDDu doesn't contain public key data




Please check if the URIs defined for this repository are pointing to a valid repository.
Skipping repository 'oss' because of the above error.
Could not refresh the repositories because of errors.

This is a patial log from that output.

2016-06-26 03:55:36 <1> P4N800K(3458) [zypp++] MediaHandler.cc(provideFile):998 provideFile(/content.key)
2016-06-26 03:55:36 <1> P4N800K(3458) [zypp++] MediaManager.cc(checkDesired):112 checkDesired(7): desired (cached)
2016-06-26 03:55:36 <1> P4N800K(3458) [zypp] PathInfo.cc(hardlinkCopy):845 hardlinkCopy /var/tmp/AP_0xHmJlkd/content.key -> /var/cache/zypp/raw/ossdI3BS4/content.key
2016-06-26 03:55:36 <1> P4N800K(3458) [zypp++] MediaSetAccess.cc(releaseFile):85 Going to release file /content.key from media number 1
2016-06-26 03:55:36 <1> P4N800K(3458) [zypp] PathInfo.cc(unlink):666 unlink /var/tmp/AP_0xHmJlkd/content.key
2016-06-26 03:55:36 <1> P4N800K(3458) [zypp:fetcher] Fetcher.cc(validate):392 Checking job [/var/cache/zypp/raw/ossdI3BS4/content.key] (0 checkers )
2016-06-26 03:55:36 <1> P4N800K(3458) [Progress++] ProgressData.cc(report):86 {#6|}END
2016-06-26 03:55:36 <1> P4N800K(3458) [zypp] PublicKey.cc(Impl):304 Taking pubkey from /var/cache/zypp/raw/ossdI3BS4/content.key of size 988 and sha1 e4605fd88549fcbeb609d32a2c29d8bb18188ab4
2016-06-26 03:55:36 <1> P4N800K(3458) [zypp] PathInfo.cc(unlink):666 hardlinkCopy /var/cache/zypp/raw/ossdI3BS4/content.key -> /var/tmp/TmpFile.bkeDDuunlink /var/tmp/TmpFile.bkeDDu
2016-06-26 03:55:36 <1> P4N800K(3458) [zypp] PathInfo.cc(hardlinkCopy):845 
2016-06-26 03:55:36 <1> P4N800K(3458) [zypp] PublicKey.cc(readFromFile):344 Reading pubkey from /var/tmp/TmpFile.bkeDDu of size 988 and sha1 e4605fd88549fcbeb609d32a2c29d8bb18188ab4
2016-06-26 03:55:36 <1> P4N800K(3458) [zypp++] ExternalProgram.cc(start_program):246 Executing 'gpg' '-v' '--no-default-keyring' '--fixed-list-mode' '--with-fingerprint' '--with-colons' '--homedir' '/var/tmp/TmpDir.9D9VKn' '--quiet' '--no-tty' '--no-greeting' '--batch' '--status-fd' '1' '/var/tmp/TmpFile.bkeDDu'
2016-06-26 03:55:36 <1> P4N800K(3458) [zypp++] ExternalProgram.cc(start_program):402 pid 4933 launched
2016-06-26 03:55:36 <1> P4N800K(3458) [zypp++] ExternalProgram.cc(checkStatus):496 Pid 4933 exited with status 127
2016-06-26 03:55:36 <5> P4N800K(3458) [zypp] Exception.cc(log):137 PublicKey.cc(readFromFile):377 THROW:    File /var/tmp/TmpFile.bkeDDu doesn't contain public key data
2016-06-26 03:55:36 <1> P4N800K(3458) [zypp] PathInfo.cc(unlink):666 unlink /var/tmp/TmpFile.bkeDDu
2016-06-26 03:55:36 <1> P4N800K(3458) [zypp++] TmpPath.cc(~Impl):78 TmpPath cleaned up /var/tmp/TmpFile.bkeDDu{- 0644 0/0 size 988}
2016-06-26 03:55:36 <1> P4N800K(3458) [zypp++] MediaSetAccess.cc(release):434 Releasing all media IDs held by this MediaSetAccess
2016-06-26 03:55:36 <1> P4N800K(3458) [zypp++] MediaManager.cc(release):486 release(id=7)
2016-06-26 03:55:36 <1> P4N800K(3458) [zypp++] MediaHandler.cc(release):734 Request to release attached media http<http://download.opensuse.org/distribution/13.1/repo/oss/>, use count=1
2016-06-26 03:55:36 <1> P4N800K(3458) [zypp++] MediaHandler.cc(release):741 Releasing media http<http://download.opensuse.org/distribution/13.1/repo/oss/>
2016-06-26 03:55:36 <1> P4N800K(3458) [zypp] MediaHandler.cc(disconnect):713 Disconnected: http://download.opensuse.org/distribution/13.1/repo/oss/ attached; localRoot "/var/tmp/AP_0xHmJlkd"
2016-06-26 03:55:36 <1> P4N800K(3458) [zypp++] MediaHandler.cc(removeAttachPoint):179 MediaHandler - checking if to remove attach point
2016-06-26 03:55:36 <1> P4N800K(3458) [zypp] PathInfo.cc(recursive_rmdir):430 recursive_rmdir /var/tmp/AP_0xHmJlkd 
2016-06-26 03:55:36 <1> P4N800K(3458) [zypp] MediaHandler.cc(removeAttachPoint):191 Deleted default attach point /var/tmp/AP_0xHmJlkd
2016-06-26 03:55:36 <1> P4N800K(3458) [zypp] MediaHandler.cc(release):795 Released: http://download.opensuse.org/distribution/13.1/repo/oss/ not attached; localRoot ""
2016-06-26 03:55:36 <1> P4N800K(3458) [zypp] PathInfo.cc(recursive_rmdir):430 recursive_rmdir /var/cache/zypp/raw/ossdI3BS4 
2016-06-26 03:55:36 <1> P4N800K(3458) [zypp++] TmpPath.cc(~Impl):78 TmpPath cleaned up /var/cache/zypp/raw/ossdI3BS4{d 0755 0/0}
2016-06-26 03:55:36 <5> P4N800K(3458) [zypp] Exception.cc(log):137 RepoManager.cc(refreshMetadata):1044 CAUGHT:   File /var/tmp/TmpFile.bkeDDu doesn't contain public key data
2016-06-26 03:55:36 <3> P4N800K(3458) [zypp] RepoManager.cc(refreshMetadata):1045 Trying another url...
2016-06-26 03:55:36 <3> P4N800K(3458) [zypp] RepoManager.cc(refreshMetadata):1054 No more urls...
2016-06-26 03:55:36 <5> P4N800K(3458) [zypp] Exception.cc(log):137 RepoManager.cc(refreshMetadata):1055 THROW:    |] Valid metadata not found at specified URL
2016-06-26 03:55:36 <5> P4N800K(3458) [zypp] Exception.cc(log):137 History:
2016-06-26 03:55:36 <5> P4N800K(3458) [zypp] Exception.cc(log):137  - File /var/tmp/TmpFile.bkeDDu doesn't contain public key data
2016-06-26 03:55:36 <5> P4N800K(3458) [zypp] Exception.cc(log):137 
2016-06-26 03:55:36 <5> P4N800K(3458) [zypp] Exception.cc(log):137 repos.cc(refresh_raw_metadata):241 CAUGHT:   |] Valid metadata not found at specified URL
2016-06-26 03:55:36 <5> P4N800K(3458) [zypp] Exception.cc(log):137 History:
2016-06-26 03:55:36 <5> P4N800K(3458) [zypp] Exception.cc(log):137  - File /var/tmp/TmpFile.bkeDDu doesn't contain public key data
2016-06-26 03:55:36 <5> P4N800K(3458) [zypp] Exception.cc(log):137 
2016-06-26 03:55:36 <3> P4N800K(3458) [zypper] repos.cc(refresh_repos):1279 Skipping repository 'oss' because of the above error.

Lots of things could be going wrong, I know. But any suggestions would be appreciated.
Do I need to install keychain?

Also found this in the log

2016-06-26 03:55:35 <5> P4N800K(3458) [zypp] Exception.cc(log):137 MediaCurl.cc(evaluateCurlCode):1000 THROW:    File '/repodata/repomd.xml' not found on medium 'http://download.opensuse.org/distribution/13.1/repo/oss/'
2016-06-26 03:55:35 <5> P4N800K(3458) [zypp] Exception.cc(log):137 
2016-06-26 03:55:35 <5> P4N800K(3458) [zypp] Exception.cc(log):137 MediaCurl.cc(evaluateCurlCode):1062 RETHROW:  File '/repodata/repomd.xml' not found on medium 'http://download.opensuse.org/distribution/13.1/repo/oss/'
2016-06-26 03:55:35 <5> P4N800K(3458) [zypp] Exception.cc(log):137

On Sun 26 Jun 2016 04:56:01 AM CDT, b0xh4x wrote:

So to be clear this isn’t a chroot at all. It just helps explain the
setup a little bit.
Also the system underneath is not Opensuse.
It is a leaky layer setup. So there is no opensue kernel and insteal a
compatability layer between the actual kernal and Xorg.
Everything works except package management. I can use rpm on packages.
But dependency hunting is a real pain.
This is a partial log output from adding the oss repo. I notice no
trusted keys were imported. Maybe that is normal?

Lots of things could be going wrong, I know. But any suggestions would
be appreciated.
Do I need to install keychain?

Hi
You need to add suse/ to the url… the f option should pull in the key.


zypper ar -f http://download.opensuse.org/distribution/13.1/repo/oss/suse/ oss


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.1|GNOME 3.16.2|4.1.26-21-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

So what version of openSUSE???

Not at all sure what you are doing. When using a non-standard setup you really need to explain more

Thanks for the reply!

That seems to have cleared the repomd.xml issue.

This is the console output.

zypper -v ref oss
Verbosity: 1
Non-option program arguments: 'oss' 
Initializing Target
Specified repositories: oss 
Checking whether to refresh metadata for oss
Retrieving: repomd.xml.asc ................................................................................................................[done]
Retrieving: repomd.xml.key ................................................................................................................[done]
Retrieving repository 'oss' metadata .....................................................................................................[error]
Repository 'oss' is invalid.
|] Valid metadata not found at specified URL
History:
 - File /var/tmp/TmpFile.hfOhbj doesn't contain public key data

Please check if the URIs defined for this repository are pointing to a valid repository.
Skipping repository ‘oss’ because of the above error.
Could not refresh the repositories because of errors.

And I notice this in the log.

2016-06-26 15:57:44 <1> P4N800K(4053) [zypp] RepoFileReader.cc(repositories_in_stream):100 --------------------------------------
2016-06-26 15:57:44 <1> P4N800K(4053) [zypp] RepoFileReader.cc(repositories_in_stream):100 - alias       : oss
2016-06-26 15:57:44 <1> P4N800K(4053) [zypp] RepoFileReader.cc(repositories_in_stream):100 - name        : oss
2016-06-26 15:57:44 <1> P4N800K(4053) [zypp] RepoFileReader.cc(repositories_in_stream):100 - enabled     : 1
2016-06-26 15:57:44 <1> P4N800K(4053) [zypp] RepoFileReader.cc(repositories_in_stream):100 - autorefresh : 1
2016-06-26 15:57:44 <1> P4N800K(4053) [zypp] RepoFileReader.cc(repositories_in_stream):100 - url         : http://download.opensuse.org/distribution/13.1/repo/oss/suse
2016-06-26 15:57:44 <1> P4N800K(4053) [zypp] RepoFileReader.cc(repositories_in_stream):100 - type        : rpm-md
2016-06-26 15:57:44 <1> P4N800K(4053) [zypp] RepoFileReader.cc(repositories_in_stream):100 - priority    : 99
2016-06-26 15:57:44 <1> P4N800K(4053) [zypp] RepoFileReader.cc(repositories_in_stream):100 - gpgcheck    : 1
2016-06-26 15:57:44 <1> P4N800K(4053) [zypp] RepoFileReader.cc(repositories_in_stream):100

Is type rpm-md correct?

Thanks for the advice.
It is Opensuse 13.1.It is very much like running a chroot.
The only differnce is that I have access to the entire system. Similar to using schroot.
For all intents and purposes you can treat it like Opensure runing in a chroot, and the host isn’t Opensuse.
Otherwise I’d just use zypper --root
All libraries of the base system that are needed for the chroot like setup are linked.
This kind of setup is called a leaky layer. Meaning that Opensuse is a layer on top of the host system.

Hi
Make sure there is a trailing / after suse. Yes rpm-md is correct.

13.1 is no longer official supported so the repos for 13.1 are now gone. There is a group that supports 13…1 as evergreen but I don’t know how they handle OSS. You may be able to find an archived repo

Here is the console output.

zypper -v ref oss
Verbosity: 1
Non-option program arguments: 'oss' 
Initializing Target
Specified repositories: oss 
Checking whether to refresh metadata for oss
Retrieving: repomd.xml.asc ................................................................................................................[done]
Retrieving: repomd.xml.key ................................................................................................................[done]
Retrieving repository 'oss' metadata .....................................................................................................[error]
Repository 'oss' is invalid.
|] Valid metadata not found at specified URL
History:
 - File /var/tmp/TmpFile.wFNnV4 doesn't contain public key data


Please check if the URIs defined for this repository are pointing to a valid repository.
Skipping repository 'oss' because of the above error.
Could not refresh the repositories because of errors

This is one part of the log I’m not sure about. Is that string of zeros corret for a DefaultAccept?

2016-06-26 17:36:27 <1> P4N800K(5078) [zypp] ZYppImpl.cc(ZYppImpl):46 Initializing keyring...
2016-06-26 17:36:27 <1> P4N800K(5078) [zypp::KeyRing] KeyRing.cc(Impl):173 Current KeyRing::DefaultAccept: 0000000000

Then here there is a zero at the end of the imort and export to the keyring and database.
Is that normal? Or does that mean I haven’t installed something for functional key management?

2016-06-26 17:36:27 <1> P4N800K(5078) [zypp++] librpmDb.cc(dbRelease):308 dbRelease: release, outstanding 0
2016-06-26 17:36:27 <1> P4N800K(5078) [zypp] RpmDb.cc(syncTrustedKeys):969 Rpm keys to export into zypp trusted keyring: 0
2016-06-26 17:36:27 <1> P4N800K(5078) [zypp] RpmDb.cc(syncTrustedKeys):970 Zypp trusted keys to import into rpm database: 0
2016-06-26 17:36:27 <1> P4N800K(5078) [zypp] RpmDb.cc(syncTrustedKeys):1019 Trusted keys synced.

In this part of the log you can see that it is finding everything, just not accepting the key in the end.
Is the key making all the way?

2016-06-26 17:36:28 <1> P4N800K(5078) [zypp++] MediaSetAccess.cc(provide):203 Going to try to provide optional file /repodata/repomd.xml.key from media number 1
2016-06-26 17:36:28 <1> P4N800K(5078) [zypp++] MediaManager.cc(checkDesired):112 checkDesired(7): desired (cached)
2016-06-26 17:36:28 <1> P4N800K(5078) [zypp++] MediaManager.cc(checkDesired):112 checkDesired(7): desired (cached)
2016-06-26 17:36:28 <1> P4N800K(5078) [zypp++] MediaMultiCurl.cc(doGetFileCopy):1319 dest: /var/tmp/AP_0x1JnXcl/repodata/repomd.xml.key
2016-06-26 17:36:28 <1> P4N800K(5078) [zypp++] MediaMultiCurl.cc(doGetFileCopy):1320 temp: /var/tmp/AP_0x1JnXcl/repodata/repomd.xml.key.new.zypp.WZs8qC
2016-06-26 17:36:28 <1> P4N800K(5078) [zypp++] MediaCurl.cc(doGetFileCopyFile):1379 /repodata/repomd.xml.key
2016-06-26 17:36:28 <1> P4N800K(5078) [zypp++] MediaCurl.cc(doGetFileCopyFile):1389 URL: http://download.opensuse.org/distribution/13.1/repo/oss/suse/repodata/repomd.xml.key
2016-06-26 17:36:28 <1> P4N800K(5078) [zypp++] MediaMultiCurl.cc(progressCallback):1272 looks_like_metalink_fd: 0
2016-06-26 17:36:28 <1> P4N800K(5078) [zypp++] MediaMultiCurl.cc(doGetFileCopy):1360 HTTP response: 200
2016-06-26 17:36:28 <1> P4N800K(5078) [zypp++] MediaMultiCurl.cc(looks_like_metalink):1234 looks_like_metalink(/var/tmp/AP_0x1JnXcl/repodata/repomd.xml.key.new.zypp.WZs8qC): 0
2016-06-26 17:36:28 <1> P4N800K(5078) [zypp] PathInfo.cc(rename):680 rename /var/tmp/AP_0x1JnXcl/repodata/repomd.xml.key.new.zypp.WZs8qC -> /var/tmp/AP_0x1JnXcl/repodata/repomd.xml.key
2016-06-26 17:36:28 <1> P4N800K(5078) [zypp++] MediaMultiCurl.cc(doGetFileCopy):1476 done: /var/tmp/AP_0x1JnXcl/repodata/repomd.xml.key{- 0644 0/0 size 988}
2016-06-26 17:36:28 <1> P4N800K(5078) [zypp++] MediaHandler.cc(provideFile):998 provideFile(/repodata/repomd.xml.key)
2016-06-26 17:36:28 <1> P4N800K(5078) [zypp++] MediaManager.cc(checkDesired):112 checkDesired(7): desired (cached)
2016-06-26 17:36:28 <1> P4N800K(5078) [zypp] PathInfo.cc(hardlinkCopy):845 hardlinkCopy /var/tmp/AP_0x1JnXcl/repodata/repomd.xml.key -> /var/cache/zypp/raw/ossQM6d0l/repodata/repomd.xml.key
2016-06-26 17:36:28 <1> P4N800K(5078) [zypp++] MediaSetAccess.cc(releaseFile):85 Going to release file /repodata/repomd.xml.key from media number 1
2016-06-26 17:36:28 <1> P4N800K(5078) [zypp] PathInfo.cc(unlink):666 unlink /var/tmp/AP_0x1JnXcl/repodata/repomd.xml.key
2016-06-26 17:36:28 <1> P4N800K(5078) [zypp:fetcher] Fetcher.cc(validate):392 Checking job [/var/cache/zypp/raw/ossQM6d0l/repodata/repomd.xml.key] (0 checkers )
2016-06-26 17:36:28 <1> P4N800K(5078) [Progress++] ProgressData.cc(report):86 {#6|}END
2016-06-26 17:36:28 <1> P4N800K(5078) [zypp] PublicKey.cc(Impl):304 Taking pubkey from /var/cache/zypp/raw/ossQM6d0l/repodata/repomd.xml.key of size 988 and sha1 e4605fd88549fcbeb609d32a2c29d8bb18188ab4
2016-06-26 17:36:28 <1> P4N800K(5078) [zypp] PathInfo.cc(unlink):666 hardlinkCopy /var/cache/zypp/raw/ossQM6d0l/repodata/repomd.xml.key -> /var/tmp/TmpFile.wFNnV4unlink /var/tmp/TmpFile.wFNnV4
2016-06-26 17:36:28 <1> P4N800K(5078) [zypp] PathInfo.cc(hardlinkCopy):845 
2016-06-26 17:36:28 <1> P4N800K(5078) [zypp] PublicKey.cc(readFromFile):344 Reading pubkey from /var/tmp/TmpFile.wFNnV4 of size 988 and sha1 e4605fd88549fcbeb609d32a2c29d8bb18188ab4
2016-06-26 17:36:28 <1> P4N800K(5078) [zypp++] ExternalProgram.cc(start_program):246 Executing 'gpg' '-v' '--no-default-keyring' '--fixed-list-mode' '--with-fingerprint' '--with-colons' '--homedir' '/var/tmp/TmpDir.KJMOBx' '--quiet' '--no-tty' '--no-greeting' '--batch' '--status-fd' '1' '/var/tmp/TmpFile.wFNnV4'
2016-06-26 17:36:28 <1> P4N800K(5078) [zypp++] ExternalProgram.cc(start_program):402 pid 4459 launched
2016-06-26 17:36:28 <1> P4N800K(5078) [zypp++] ExternalProgram.cc(checkStatus):496 Pid 4459 exited with status 127
2016-06-26 17:36:28 <5> P4N800K(5078) [zypp] Exception.cc(log):137 PublicKey.cc(readFromFile):377 THROW:    File /var/tmp/TmpFile.wFNnV4 doesn't contain public key data

Unless I am reading this all wrong, it looks like my problem is key management. I could certianly be very wrong.
But I don’t know enough about the internals of the system to determine where the key management is failing.
Gpg(2) is working out the key fine but what happens to the key after that? Or is it that the stored keys aren’t getting stored because I haven’t done something there?

Well thats good to know. I’ll see if I can put it together.

Hi
Looks like you need to remove that TmpDir, there have been forum threads on that… eg;
https://forums.opensuse.org/showthread.php/441719-Repository-Already-Exists

For keys have a read here;
https://forums.opensuse.org/showthread.php/512615-How-do-I-un-trust-a-repo

So I tried rpm -q gpg-pubkey and got this.

rpm -q gpg-pubkey
package gpg-pubkey is not installed

But I can’t seem to find which package provides gpg-pubkey or a package called gpg-pubkey.

Hi
Those are the imported keys (by rpm), meta data packages I guess you could call them… maybe a cleanup of the rpm database is required?


rpm --rebuilddb

Did you remove the TmpDir? Also remove the old repo and add new again, it should then ask you to accept the key (zypper ref after adding).

He his trying to reach a 13.1 repo.

Hi
They still exist for the distribution and mirrorbrain redirects;
http://mirrors.opensuse.org/list/13.1.html
http://download.opensuse.org/distribution/13.1/repo/oss/suse/
http://download.opensuse.org/distribution/13.1/repo/non-oss/suse/

OBS repos are a different kettle of fish…

So this is what happened after running rpm --rebuilddbIt is creating then deleting that tmp folder. So there isn’t anything to delete so far.

2016-06-26 20:59:46 <1> P4N800K(4898) [zypp] PathInfo.cc(unlink):666 hardlinkCopy /var/cache/zypp/raw/oss6mWSJN/repodata/repomd.xml.key -> /var/tmp/TmpFile.8mZNAounlink /var/tmp/TmpFile.8mZNAo
2016-06-26 20:59:46 <1> P4N800K(4898) [zypp] PathInfo.cc(hardlinkCopy):845 
2016-06-26 20:59:46 <1> P4N800K(4898) [zypp] PublicKey.cc(readFromFile):344 Reading pubkey from /var/tmp/TmpFile.8mZNAo of size 988 and sha1 e4605fd88549fcbeb609d32a2c29d8bb18188ab4
2016-06-26 20:59:46 <1> P4N800K(4898) [zypp++] ExternalProgram.cc(start_program):246 Executing 'gpg' '-v' '--no-default-keyring' '--fixed-list-mode' '--with-fingerprint' '--with-colons' '--homedir' '/var/tmp/TmpDir.MzLg0N' '--quiet' '--no-tty' '--no-greeting' '--batch' '--status-fd' '1' '/var/tmp/TmpFile.8mZNAo'
2016-06-26 20:59:46 <1> P4N800K(4898) [zypp++] ExternalProgram.cc(start_program):402 pid 4394 launched
2016-06-26 20:59:46 <1> P4N800K(4898) [zypp++] ExternalProgram.cc(checkStatus):496 Pid 4394 exited with status 127
2016-06-26 20:59:46 <5> P4N800K(4898) [zypp] Exception.cc(log):137 PublicKey.cc(readFromFile):377 THROW:    File /var/tmp/TmpFile.8mZNAo doesn't contain public key data
2016-06-26 20:59:46 <1> P4N800K(4898) [zypp] PathInfo.cc(unlink):666 unlink /var/tmp/TmpFile.8mZNAo
2016-06-26 20:59:46 <1> P4N800K(4898) [zypp++] TmpPath.cc(~Impl):78 TmpPath cleaned up /var/tmp/TmpFile.8mZNAo{- 0644 0/0 size 988}
2016-06-26 20:59:46 <1> P4N800K(4898) [Progress++] ProgressData.cc(report):86 {#4|}END

Also it didn’t ask me to verify the key.
What could be the triggering of the ‘package gpg-pubkey is not installed’?
Since this is a bootstrap from scratch, perhaps I am missing something real simple. Like just a folder that was never created.

Well, I’m on my way home to get some sleep. I’ll do some more looking into it tomorrow.

Thanks, for everything so far guys. I never expected to get this much help. A tribute to the community here, I’d say.

Hi
Hmm, not sure, is YaST installed, maybe try adding the repo from there, try manually importing the key, gpg2 is installed?

What about the update repo from a defined mirror?;


zypper ar -f http://mirrors1.kernel.org/opensuse/update/13.1/ "oss-update"

Going back to your original posts…

Your fundamental problem is that your repo URI points to a location that isn’t the root of a repo.
Your current URI is as follows, but open that location in a web browser and you’ll find that you’re pointing to has a number of files but it’s not clear whether any of them are sufficient for a repo (maybe an old deprecated version?)

http://download.opensuse.org/distribution/13.1/repo/oss/

If you browse this tree, you can find the URI Malcolm suggests(appending /suse/) which have a repository data file that’s consistent with today’s repos. You’ll also find that the contents of this URI does contain packages.

So, delete your current oss repo

zypper rr oss

And replace by adding the repo with the following

zypper ar -f http://download.opensuse.org/distribution/13.1/repo/oss/suse/ 13.1_oss

and refresh your repos

zypper ref

I’m also a bit suspicious using the rpm command to rebuild your local repo data although it may be OK.
My philosophy is to use openSUSE tools when available and non-openSUSE tools only when openSUSE tools are insufficient. You can clear your local rpm data using zypper as follows

zypper clean -all

If you still have a problem, pls post the result of the following command which lists your repos

zypper lr -d

Lastly,
You should describe exactly how you’re building your “leaky layer” - Are you using a platform builder of some type? The only Google results I’m getting references Yocto, but IIRC Yocto is used mainly to build custom mobile OS (with a custom collection of applications). I don’t highly suspect at the moment, but it <could> be relevant if you have further problems.

TSU

Without you guys, who knows how long it would have taken me to append /suse/ to the end of the repo url.

I think a couple of you have mentioned it.

I finally have it asking if I want to accept the key or not.

I did some poking around and added some relevant packages.

These are the packages I added.

dirmngr libassuan0 libgcrypt11 libgpg-error0 libksba8 openssl pinentry util-linux sed

Not all of them where causing problem with key management. Some are just good to have on board.

The package sed I had to add because everything executed with direction to the OpenSuse layer first looks for files in the OpenSuse layer. If a file or library is called and not found in the OpenSuse layer it then checks the underlying host user land. The sed on the host is not compatible with the arguments that the OpenSuse 13.1 sed can handle. So I ended up with a error caching the repo locally. Its working great now.

A note to my self and anyone reading this and thinking about requesting help for situation a similar to mine:
In retrospect it would have help all contributors to this thread if I had posted all packages that had been installed up to the point of my issue.

zypper -v ref                                      Verbosity: 1
Initializing Target
Specified repositories: 
Checking whether to refresh metadata for oss
Retrieving: repomd.xml.asc ...............................................[done]
Retrieving: repomd.xml.key ...............................................[done]
Retrieving: repomd.xml ...................................................[done]
Retrieving: d24d3aabfd3463177dcc5feb0e09ef3ec3c6cce1e3b27e1b[done (730.4 KiB/s)]
Retrieving: fb296ceffe855bd2b1dd3813c5a8ef30b76ed949d0cd4c12[done (178.2 KiB/s)]
Retrieving: 6a7051ea37f92c9277d72b14b3597710d4f3f4a438fe40ed[done (124.0 KiB/s)]
Retrieving: bf9a6a1beabb7348ff2d1301d52ba8090afd015d5952b54d[done (161.6 KiB/s)]
Retrieving repository 'oss' metadata .....................................[done]
Building repository 'oss' cache ..........................................[done]
All repositories have been refreshed.

It looked like a possible sad ending for a little bit. But thank to you guys it turned out great.

I also want to thank you guys since this isn’t always a situation that would’ve gotten any support on some forums. Being that the setup was so far from standard, many would not consider it an OpenSuse support issue. More a “Toad’s Wild Ride” support issue. Even considering the lack of information you all where very quick to flood me with useful knowledge concerning zypper and repos.

Thanks Again.