List gpg keys in your system

1.1. RPM based distros (RHEL, CentOS, Fedora)

Import:

$ sudo rpm --import repomd.xml.key

List:

$ rpm -q gpg-pubkey|sort

Getting info:

rpm -qi  | grep Summary   

(or without the ‘grep’ part to view full info of the key package)

To remove:

sudo rpm -e --allmatches 

Example:

[root chip ~]# rpm -q gpg-pubkey|sort
gpg-pubkey-1ac70ce6-41bebeef
gpg-pubkey-30c9ecf8-3f9da3f7
gpg-pubkey-4f2a6fd2-3f9d9d3b
gpg-pubkey-8df56d05-3e828977
gpg-pubkey-8df56d05-3e828977
gpg-pubkey-a109b1ec-3f6e28d5
gpg-pubkey-db42a60e-37ea5438
gpg-pubkey-e42d547b-3960bdf1
[root chip ~]# rpm -e --allmatches gpg-pubkey-8df56d05-3e828977
[root chip ~]# rpm -q gpg-pubkey|sort
gpg-pubkey-1ac70ce6-41bebeef
gpg-pubkey-30c9ecf8-3f9da3f7
gpg-pubkey-4f2a6fd2-3f9d9d3b
gpg-pubkey-a109b1ec-3f6e28d5
gpg-pubkey-db42a60e-37ea5438
gpg-pubkey-e42d547b-3960bdf1

1.2 Debian / Ubuntu

$ gpg --list-keys user_ID

Example:

$ gpg --list-keys
/home/iplsdk/.gnupg/pubring.gpg
-------------------------------
pub   2048R/E5****A4 2015-01-12
uid                  IBM Software Development Kit for Linux on Power
sub   2048R/F2*****9 2015-01-12

pub   4096R/78C*****4 2016-02-11
uid                  IBM SDK for Linux on Power (The IBM Software Development Kit for Linux on Power is a free Eclipse-based Integrated Development Environment) <iplsdk@linux.vnet.ibm.com>
sub   4096R/B3*****0 2016-02-1

Add a gpg-key in your environment:

After you get the .gpg file, you need to 'add-apt-key' it into your keyring. Here:
$ sudo apt-key add .gpg

Don’t forget:
$ sudo apt-get update

Cheers!

Installing clang on RHEL/CentOS and Ubuntu

For RHEL and CentOS:

1) Install EPEL repository (read here on how to install it)

2) Install clang package:
$ sudo yum install clang

For Ubuntu 16.04:

1) Install clang packages:
$ sudo apt-get install clang libclang-dev

2) Create a symlink to libclang:
$ cd /usr/lib/-linux-gnu
$ sudo ln -s libclang-.so libclang.so

Example:
$ cd /usr/lib/powerpc64le-linux-gnu
$ sudo ln -s libclang-3.8.so libclang.so

Bytemark sponsors Ubuntu Mate

A couple of weeks ago the Bytemark Managing Director, Matthew Bloch, contacted the Ubuntu MATE team to offer free hosting for the project. As of August 18th 2016 all the Ubuntu MATE infrastucture is hosted on Bytemark Cloud Servers.

Bytemark is a UK-based server hosting and datacentre provider, headquartered in York, United Kingdom. They are announcing a deal to sponsor Ubuntu Mate Desktop, an Ubuntu variation of traditional Unity Desktop Environment, with the same Operating System Core.

Continue reading “Bytemark sponsors Ubuntu Mate”

View repository versions of a package

apt-cache policy <packageName>

This gives you information of all available package versions in the Ubuntu repositories.

Example:

user@hostname:~$ apt-cache policy openssh-server
openssh-server:
 Installed: 1:6.6p1-2ubuntu2.6
 Candidate: 1:6.6p1-2ubuntu2.7
 Version table:
 1:6.6p1-2ubuntu2.7 0
 500 http://ports.ubuntu.com/ubuntu-ports/ trusty-updates/main ppc64el Packages
 500 http://ports.ubuntu.com/ubuntu-ports/ trusty-security/main ppc64el Packages
 *** 1:6.6p1-2ubuntu2.6 0
 100 /var/lib/dpkg/status
 1:6.6p1-2ubuntu1 0
 500 http://ports.ubuntu.com/ubuntu-ports/ trusty/main ppc64el Packages

From the output, you can see that there are two versions available: 1:6.6p1-2ubuntu2.7 and 1:6.6p1-2ubuntu1. It also tells you which repositories they are coming from.

Installed: tells you the version you have installed. If you don’t have the package installed, you’ll see (none).

Candidate: is the version that will be installed if you use apt-get install openssh-server. If you want to install the other version, you would do apt-get install openssh-server=1:6.6p1-2ubuntu2.7.

See the original reference here.