The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,230 other followers

zypper installing from a non-standard repository

Posted by jpluimers on 2016/11/25

I got a bit lost in the woods of implicit URLs between various places.

All I wanted is to install software.opensuse.org: Install package server:monitoring / lnav preferably from the link http://software.opensuse.org/ymp/server:monitoring/openSUSE_Tumbleweed/lnav.ymp

It’s the OpenSuSE package for The Log File Navigator which I found based on the recommendation “The Log File Navigator – Joe C. Hecht – Google+“.

The package was in a non-standard repository “server:monitoring”, but shortening the package link doesn’t get you there:

These do however (thanks tacit):

From both, it’s just a couple of clicks away to the lnav packages:

Zypper doesn’t allow you to install one-click install ymp links like http://software.opensuse.org/ymp/server:monitoring/openSUSE_Tumbleweed/lnav.ymp

But OCICLI (one-click install CLI) does. And yes, unlike most console commands IT’S IN UPPERCASE. You can use it like this (note the warning):

OCICLI http://software.opensuse.org/ymp/server:monitoring/openSUSE_Tumbleweed/lnav.ymp

OCICLI is fully compatible with zypper as OCICLI uses YaST and libzypp as underlying technology and zypper uses libzypp.

The yml files are metadata offering to add one or more repositories and install one or more packets or patterns. OCICLI automates that process.

Another option is to manually add the repository using zypper, then install lnav from zypper. There is no URL to this (again; are these the virtues of Web 2.0?) you have to click a few times:

  1. Go to https://software.opensuse.org/download.html?project=server:monitoring&package=lnav
  2. Click on openSUSE
  3. Click on Add repository and install manually
  4. Under openSUSE Tumbleweed, look for this code

zypper addrepo http://download.opensuse.org/repositories/server:monitoring/openSUSE_Tumbleweed/server:monitoring.repo
zypper refresh
zypper install lnav

Installing using OCICLI

As currently there is a bug in OCICLI, it will show a warning: Warning: unable to close filehandle properly: Bad file descriptor, <STDIN> line 7 during global destruction (#1) which I reported:

# OCICLI http://software.opensuse.org/ymp/server:monitoring/openSUSE_Tumbleweed/lnav.ymp
If you continue, the following repositories will be subscribed:
* http://download.opensuse.org/repositories/openSUSE:/Tumbleweed/standard/
* http://download.opensuse.org/repositories/server:/monitoring/openSUSE_Tumbleweed/
If you continue, the following software packages will be installed:
* lnav
Warning: unable to close filehandle properly: Bad file descriptor, <STDIN> line
7 during global destruction (#1)
(S io) There were errors during the implicit close() done on a filehandle
when its reference count reached zero while it was still open, e.g.:
{
open my $fh, '>', $file or die "open: '$file': $!\n";
print $fh $data or die "print: $!";
} # implicit close here
Because various errors may only be detected by close() (e.g. buffering could
allow the print in this example to return true even when the disk is full),
it is dangerous to ignore its result. So when it happens implicitly, perl will
signal errors by warning.
Prior to version 5.22.0, perl ignored such errors, so the common idiom shown
above was liable to cause silent data loss.
Continue? y/N

# cat /etc/os-release
NAME=openSUSE
VERSION="Tumbleweed"
VERSION_ID="20160714"
PRETTY_NAME="openSUSE Tumbleweed (20160714) (x86_64)"
ID=opensuse
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:opensuse:20160714"
BUG_REPORT_URL="https://bugs.opensuse.org&quot;
HOME_URL="https://www.opensuse.org/&quot;
ID_LIKE="suse"

OCICLI success: reject the first expired GnuPG key, import the second (non-expired) one, then the console looks like this:

OCICLI http://software.opensuse.org/ymp/server:monitoring/openSUSE_Tumbleweed/lnav.ymp
If you continue, the following repositories will be subscribed:
* http://download.opensuse.org/repositories/openSUSE:/Tumbleweed/standard/
* http://download.opensuse.org/repositories/server:/monitoring/openSUSE_Tumbleweed/
If you continue, the following software packages will be installed:
* lnav
Warning: unable to close filehandle properly: Bad file descriptor, <STDIN> line
7 during global destruction (#1)
(S io) There were errors during the implicit close() done on a filehandle
when its reference count reached zero while it was still open, e.g.:
{
open my $fh, '>', $file or die "open: '$file': $!\n";
print $fh $data or die "print: $!";
} # implicit close here
Because various errors may only be detected by close() (e.g. buffering could
allow the print in this example to return true even when the disk is full),
it is dangerous to ignore its result. So when it happens implicitly, perl will
signal errors by warning.
Prior to version 5.22.0, perl ignored such errors, so the common idiom shown
above was liable to cause silent data loss.
Continue? y/N
y
Adding Repositories…
Warning: unable to close filehandle properly: Bad file descriptor, <STDIN> line
7 during global destruction (#1)
(S io) There were errors during the implicit close() done on a filehandle
when its reference count reached zero while it was still open, e.g.:
{
open my $fh, '>', $file or die "open: '$file': $!\n";
print $fh $data or die "print: $!";
} # implicit close here
Because various errors may only be detected by close() (e.g. buffering could
allow the print in this example to return true even when the disk is full),
it is dangerous to ignore its result. So when it happens implicitly, perl will
signal errors by warning.
Prior to version 5.22.0, perl ignored such errors, so the common idiom shown
above was liable to cause silent data loss.

After that, the repositories list changed from:

# | Alias | Name | Enabled | GPG Check | Refresh | Priority | Type | URI | Service
–+———————————-+—————————-+———+———–+———+———-+——–+—————————————————————————————-+——–
1 | download.opensuse.org-non-oss | Main Repository (NON-OSS) | Yes | (r ) Yes | Yes | 99 | yast2 | http://download.opensuse.org/tumbleweed/repo/non-oss/ |
2 | download.opensuse.org-oss | Main Repository (OSS) | Yes | (r ) Yes | Yes | 99 | yast2 | http://download.opensuse.org/tumbleweed/repo/oss/ |
3 | download.opensuse.org-tumbleweed | Main Update Repository | Yes | (r ) Yes | Yes | 99 | rpm-md | http://download.opensuse.org/update/tumbleweed/ |
4 | openSUSE-20150508-0 | openSUSE-20150508-0 | No | —- | No | 99 | yast2 | cd:///?devices=/dev/disk/by-id/ata-VMware_Virtual_IDE_CDROM_Drive_10000000000000000001 |
5 | repo-debug | openSUSE-Tumbleweed-Debug | No | —- | Yes | 99 | NONE | http://download.opensuse.org/debug/tumbleweed/repo/oss/ |
6 | repo-source | openSUSE-Tumbleweed-Source | No | —- | Yes | 99 | NONE | http://download.opensuse.org/source/tumbleweed/repo/oss/ |

to:

# zypper lr -d
# | Alias | Name | Enabled | GPG Check | Refresh | Priority | Type | URI | Service
–+————————————-+—————————-+———+———–+———+———-+——–+—————————————————————————————-+——–
1 | download.opensuse.org-non-oss | Main Repository (NON-OSS) | Yes | (r ) Yes | Yes | 99 | yast2 | http://download.opensuse.org/tumbleweed/repo/non-oss/ |
2 | download.opensuse.org-oss | Main Repository (OSS) | Yes | (r ) Yes | Yes | 99 | yast2 | http://download.opensuse.org/tumbleweed/repo/oss/ |
3 | download.opensuse.org-tumbleweed | Main Update Repository | Yes | (r ) Yes | Yes | 99 | rpm-md | http://download.opensuse.org/update/tumbleweed/ |
4 | http-download.opensuse.org-75e8f13a | openSUSE:Tumbleweed | Yes | ( p) Yes | Yes | 99 | rpm-md | http://download.opensuse.org/repositories/openSUSE:/Tumbleweed/standard/ |
5 | http-download.opensuse.org-f3ba78e8 | server:monitoring | Yes | (r ) Yes | Yes | 99 | rpm-md | http://download.opensuse.org/repositories/server:/monitoring/openSUSE_Tumbleweed/ |
6 | openSUSE-20150508-0 | openSUSE-20150508-0 | No | —- | No | 99 | yast2 | cd:///?devices=/dev/disk/by-id/ata-VMware_Virtual_IDE_CDROM_Drive_10000000000000000001 |
7 | repo-debug | openSUSE-Tumbleweed-Debug | No | —- | Yes | 99 | NONE | http://download.opensuse.org/debug/tumbleweed/repo/oss/ |
8 | repo-source | openSUSE-Tumbleweed-Source | No | —- | Yes | 99 | NONE | http://download.opensuse.org/source/tumbleweed/repo/oss/ |

Then you can reject the GnuPG key of "openSUSE:Tumbleweed" each time it is asked for (unlike OCICLI, zypper does show the expiration date):

# zypper install lnav
Retrieving repository 'openSUSE:Tumbleweed' metadata ———————————————————————————————————————————————————————————————————————-[\]
New repository or package signing key received:
Repository: openSUSE:Tumbleweed
Key Name: openSUSE:Tumbleweed OBS Project <openSUSE:Tumbleweed@build.opensuse.org>
Key Fingerprint: 56FE3F66 EE9AD664 DD8978DF 03FCF140 B367F5CD
Key Created: Mon Feb 18 18:09:00 2013
Key Expires: Wed Apr 29 19:09:00 2015 (EXPIRED)
Rpm Name: gpg-pubkey-b367f5cd-5122602c
Do you want to reject the key, trust temporarily, or trust always? [r/t/a/? shows all options] (r): r
Retrieving repository 'openSUSE:Tumbleweed' metadata …………………………………………………………………………………………………………………………………………………………………………………………[error]
Repository 'openSUSE:Tumbleweed' is invalid.
[http-download.opensuse.org-75e8f13a|http://download.opensuse.org/repositories/openSUSE:/Tumbleweed/standard/] Valid metadata not found at specified URL
Please check if the URIs defined for this repository are pointing to a valid repository.
Warning: Skipping repository 'openSUSE:Tumbleweed' because of the above error.
Some of the repositories have not been refreshed because of an error.
Loading repository data…
Reading installed packages…
Resolving package dependencies…
The following 2 NEW packages are going to be installed:
libpcrecpp0 lnav
2 new packages to install.
Overall download size: 445.7 KiB. Already cached: 0 B. After the operation, additional 1.5 MiB will be used.
Continue? [y/n/? shows all options] (y):
Retrieving package libpcrecpp0-8.39-1.1.x86_64 (1/2), 29.6 KiB ( 38.0 KiB unpacked)
Retrieving: libpcrecpp0-8.39-1.1.x86_64.rpm ………………………………………………………………………………………………………………………………………………………………………………………………….[done]
Retrieving package lnav-0.8.0-1.17.x86_64 (2/2), 416.1 KiB ( 1.4 MiB unpacked)
Retrieving: lnav-0.8.0-1.17.x86_64.rpm ………………………………………………………………………………………………………………………………………………………………………………………………………[done]
Checking for file conflicts: ……………………………………………………………………………………………………………………………………………………………………………………………………………….[done]
(1/2) Installing: libpcrecpp0-8.39-1.1.x86_64 ………………………………………………………………………………………………………………………………………………………………………………………………..[done]
(2/2) Installing: lnav-0.8.0-1.17.x86_64 …………………………………………………………………………………………………………………………………………………………………………………………………….[done]

This isn’t the end of the story though: the expired key was a symptom of some old cruft.

Cleaning up the repos

It appeared that http://download.opensuse.org/repositories/openSUSE:/Tumbleweed/standard/ was an old repository not maintained any more so it had an expired key. After addressing the expired key on IRC channel #opensuse-buildservice (thanks malcolmlewis at TUMBLEWEED Key expired of http://download.opensuse.org/repositories/openSUSE:/Tumbleweed/standard/ – what now?) I got help from adrianS and DimStar.

The failing repository URL got redirected to http://download.opensuse.org/tumbleweed/repo/oss/suse/ which means it’s now part of download.opensuse.org-oss.

Unlike the old repo URL, new one didn’t (doesn’t?) have RPM metadata yet so there was no repodata directory yet with files like repomd.xml, repomd.xml.asc, repomd.xml.key which will be fixed in the future.

This means it’s time to disable the offending repository and (whey zypper dup succeeds) delete it:

# zypper modifyrepo --disable http-download.opensuse.org-75e8f13a 
Repository 'http-download.opensuse.org-75e8f13a' has been successfully disabled.
# zypper dist-upgrade --no-allow-vendor-change
Warning: You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this command.
Loading repository data...
Reading installed packages...
Computing distribution upgrade...

Since that works, we can remove the repository:

# zypper removerepo http-download.opensuse.org-75e8f13a
Removing repository 'openSUSE:Tumbleweed' ................................................................................................................................................................................................................................[done]
Repository 'openSUSE:Tumbleweed' has been removed.

–jeroen

via: Show openSUSE:Factory / monit – openSUSE Build Service

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: