Packages in locally hosted repository are not seen by dnf - yum

I am hosting 2 repositories (myrepo-main and AppStream) on a local server. The myrepo-main hosts mysql commercial rpms and some other packages.
Unless I disable the AppStream repo, most of the mysql packages are not visible.
$ sudo dnf list | grep ^mysql
mysql-commercial-libs-compat.x86_64 5.7.29-1.1.el7 myrepo-main
Disabling the AppStream repo allows me to see the mysql packages in the repo.
$ sudo dnf --disablerepo=AppStream --enablerepo=myrepo* list | grep ^mysql
mysql-commercial-client.x86_64 5.7.29-1.1.el7 myrepo-main
mysql-commercial-common.x86_64 5.7.29-1.1.el7 myrepo-main
mysql-commercial-libs.x86_64 5.7.29-1.1.el7 myrepo-main
mysql-commercial-libs-compat.x86_64 5.7.29-1.1.el7 myrepo-main
mysql-commercial-server.x86_64 5.7.29-1.1.el7 myrepo-main
Other packages in the repo are visible in myrepo without disabling the AppStream repo
$ sudo dnf list | grep myrepo
jre1.8.x86_64 1.8.0_211-fcs #myrepo-main
tomcat.x86_64 8.5.41-2 #myrepo-main
mysql-commercial-libs-compat.x86_64 5.7.29-1.1.el7 myrepo-main
I have excluded the mysql packages from the AppStream repo on the client.
[AppStream]
name=FW-CentOS-$releasever - AppStream
baseurl=http://192.168.20.230/repos/x86/8/AppStream/AppStream
gpgcheck=1
enabled=1
gpgkey=http://192.168.20.230/repos/x86/8/RPM-GPG-KEY-FWRepo
priority=98
exclude=mysql-server,mysql-common,mysql-devel,mysql-errmsg,mysql-libs,mysql-test,mysql,mariadb,mariadb-server
[myrepo-main]
name=MyRepo Main
baseurl=http://192.168.20.230/repos/x86/8/fairwarning/fwpackages/
enabled=1
gpgcheck=1
gpgkey=http://192.168.20.230/repos/x86/8/fairwarning/fwpackages/RPM-GPG-KEY-FWRepo
priority=1
I have tried :
dnf clean all
rm -rf /var/cache/dnf/
I also tried using reposync to create AppStream without metadata, deleting all mysql rpms and generating the metadata using createrepo_c.
This allowed me to see the mysql packages in myrepo, but other packages had issues with the generated metadata and would not install.
We have a similar configuration for our CentOS6 hosts which works without issue. I suspect this is some feature of dnf or AppStream.

From the answer of user EOhm:
This is needed, from what I understand, because of the new modules system introduced with EL8.
The pgdg packages are filtered by default if dnf detects that they provides things that are also in modules but are not packaged as appropriate modules themselves.
So there are multiple solutions:
As stated, add module_hotfixes=true on the repo definition, which allows DNF to update or install packages also provided as modules (even if not already installed)
Just use dnf --disablerepo AppStream as OP did, which can be tedious
Disable the module which is causing problem with dnf module disable xxx (I don't know the name of the problematic module here)

Related

Chrome Remote Desktop not installing

It was showing a discrepancy when I tried to install chrome remote desktop for my google cloud compute engine(Ubuntu) through SSH. giving the following msg:
$sudo dpkg --install chrome-remote-desktop_current_amd64.deb
Selecting previously unselected package chrome-remote-desktop.
(Reading database ... 113227 files and directories currently installed.)
Preparing to unpack chrome-remote-desktop_current_amd64.deb ...
Unpacking chrome-remote-desktop (91.0.4472.10) ...
dpkg: dependency problems prevent configuration of chrome-remote-desktop:
chrome-remote-desktop depends on libgbm1 (>= 17.1.0~rc2); however:
Version of libgbm1:amd64 on system is 13.0.6-1+b2.
dpkg: error processing package chrome-remote-desktop (--install):
dependency problems - leaving unconfigured
Processing triggers for systemd (232-25+deb9u12) ...
Errors were encountered while processing:
chrome-remote-desktop
$ sudo apt install --assume-yes --fix-broken
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
chrome-remote-desktop
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 104 MB disk space will be freed.
(Reading database ... 113353 files and directories currently installed.)
Removing chrome-remote-desktop (91.0.4472.10) ...
Looks like you downloaded DEB package for a much newer Ubuntu than you are running. You didn't specify exactly what you are running so I have to only speculate.
The version you are using affects a lot of things, what is the output of the following?
lsb_release -a
On very old distributions you will have a lot problems installing newer out-of-distribution packages.
And I think the remote desktop needs to match the base chrome package, what happens when you run the:
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt update
sudo apt install google-chrome-stable
If you want to control your server remotely, did you consider alternatives?
X11 forwarding tunnel with SSH
NoMachine
VNC server (I would still use it through SSH to make it more secure)
TeamViewer

How to install Kicad 5.15 by use local repository way?

I have installed Kicad 5.15 on my computer and it works fine, and I have saved all the deb files downloaded during the last installation and put them in /var/cache/apt/archives, when I need to reinstall, I just need to execute these commands:
sudo add-apt-repository --yes ppa:js-reynaud/kicad-5.1
sudo apt update
sudo apt install --install-recommends kicad
The installation will start automatically, and because of the existence of the deb files, the installation process does not require an Internet connection and is very fast. However, this method does not work after the Kicad provide a latest version update, and the installation process will still access the network to download new files. I don't want to do this, one of the reasons is that I have a slow internet access and I'm not used to frequently updating software versions. So I made a local APT source according to the online materials, the method is as follows:
sudo apt install dpkg-dev
sudo mkdir /var/debs
sudo cp /var/cache/apt/archives/*.deb /var/debs/
sudo chmod 777 /var/debs
sudo cd /var/debs
sudo dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
Then I add a line in Sources.list file
deb file:/var/debs ./
I referenced this page How to create a local APT repository?
But this method does not work. When I run
sudo apt update
I got this:
sudo apt update
Get:1 file:/var/debs ./ InRelease
Ign:1 file:/var/debs ./ InRelease
Get:2 file:/var/debs ./ Release
Err:2 file:/var/debs ./ Release
File not found - /var/debs/./Release (2: No such file or directory)
Reading package lists... Done
E: The repository 'file:/var/debs ./ Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
When I run the installation command, the prompt is as follows:
sudo apt install --install-recommends kicad
E: Malformed entry 76 in list file /etc/apt/sources.list (Suite)
E: The list of sources could not be read.
E: Malformed entry 76 in list file /etc/apt/sources.list (Suite)
E: The list of sources could not be read.
Did I miss something? What should I do to continue using the DEB files saved on my hard drive?
Just add [trusted=yes] to your sources.list file:
deb [trusted=yes] file:/var/debs ./

Yum install package and all its dependencies from local directory

I have downloaded a package and all of its dependencies using yum's download only option into a local directory. I want to then install the package and its dependencies from that directory by passing yum the name of the rpm that contains the primary package in a manner similar to how pip lets you install wheel packages from local directories (provided the wheel files for the dependencies are also present). I DO NOT want yum to try and download the dependencies from a remote repo.
Basically I want this only for yum:
pip install --no-index --find-link=/directory-with-wheel-files primary_package.whl
I have used these links to try and solve my problem:
How to make rpm auto install dependencies
https://unix.stackexchange.com/questions/281715/how-can-i-install-a-local-rpm-using-only-the-local-dependency-rpm-files?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
https://wiki.centos.org/HowTos/CreateLocalRepos
https://www.ostechnix.com/install-packages-specific-repository-linux/
My repo file looks like this:
[basemap]
name=Basemap
baseurl=file:///var/tmp/install/basemap
enabled=1
gpgcheck=0
and my folder /var/tmp/install/basemap has been turned into a repo using yum's createrepo. Yet when I run yum --enablerepo=basemap install primary_package.rpm yum still tries to download the dependencies from the internet. How do I force it to look in my local repo for the dependencies?
Figured it out. I had one option missing from my yum command. I had to disable other repos and then enable only my repo. This command worked:
yum --disablerepo='*' --enablerepo=myrepo install primary_package.rpm

Compiling libapache2-svn for Apache 2.4.4

I want to use Apache 2.4.4 with SVN on Ubuntu server 12.04 (Precise Pangolin). But when I use
apt-get install libapache2-svn
I get the following dependencies error
The following packages have unmet dependencies:
libapache2-svn : Depends: apache2.2-common but it is not going to be installed
Googling around I got some suggestion about compiling from source by hand. I don't know how to do that. How can I do it?
I have two solutions:
Follow the instructions in this Server Fault Q&A.
*Note: Create another user if you're using a root account on the server.
I've asked Ondřej Surý on Launchpad to add Subversion to his Apache PPA. You can add Ondřej Surý's PPA to perform a normal update/upgrade.
You did ask Ondrej to include Subversion in his PPA launchpad. But I couldn't install the libapache2-svn package after adding Ondrej's PPA.
Somehow the instructions provided for compiling didn't work for me so here's an alternative way to get it working.
Reference:
(https://askubuntu.com/questions/312568/where-can-i-find-a-subversion-1-8-binary)
WANDisco has Subversion 1.8 for Ubuntu then:
sudo sh -c 'echo "# WANdisco Open Source Repo" >> /etc/apt/sources.list.d/WANdisco.list'
sudo sh -c 'echo "deb http://opensource.wandisco.com/ubuntu precise svn18" >> /etc/apt/sources.list.d/WANdisco.list'
wget -q http://opensource.wandisco.com/wandisco-debian.gpg -O- | sudo apt-key add -
sudo apt-get update
After that:
apt-cache show subversion | grep '^Version:'
And then you should be good to install normally:
sudo apt-get install subversion libapache2-svn

Why can you install the same package by different names with Yum

On Centos 6 I can do
# yum install webserver
or
# yum install httpd
And both commands will install httpd (apache)
I am building an RPM and I don't know which one I should use or why they are different.
Do packages have a 'generic' name that you can address them by? For instance if you had lighttpd installed it could provide the webserver package?
An RPM provides many things. Be they native library references, perl modules, etc. All are calculated while the RPM is built.
But you can also provide things yourself in a spec file (the file used to build an RPM), as in:
Provides: blablabla
So, it means the httpd package has:
Provides: webserver
in its spec file.
You can query what an installed package provides with:
rpm -q --provides pkgnamehere
But you can also ask what package provides something:
rpm -q --whatprovides theprovidedname
Finally, you can ask yum about provides:
yum whatprovides webserver
yum whatprovides grep
yum whatprovides /usr/bin/find
# etc etc