Pages

Showing posts with label dnf. Show all posts
Showing posts with label dnf. Show all posts

Saturday, May 29, 2021

Fedora 34 : Upgrade to the last version Fedora 34 Linux distro.

Today I upgraded from the fedora 33 version to the new Fedora 34 Linux distro version.
Here are the commands I used to upgrade this Linux distro:
[root@desk mythcat]# dnf upgrade 
[root@desk mythcat]# dnf --refresh upgrade
[root@desk mythcat]# dnf system-upgrade reboot
The whole process will require a restart and then continue with the following commands:
[root@desk mythcat]# dnf install dnf-plugin-system-upgrade --best
[root@desk mythcat]# dnf system-upgrade download --refresh --releasever=34 --allowerasing --skip-broken
[root@desk mythcat]# dnf system-upgrade reboot
[root@desk mythcat]# rpm --rebuilddb
[root@desk mythcat]# dnf distro-sync --setopt=deltarpm=0
[root@desk mythcat]# dnf install rpmconf
[root@desk mythcat]# rpmconf -a
[root@desk mythcat]# reboot
You can find this version on the official webpage.

Tuesday, April 27, 2021

Fedora 33 : Test Days - test the kernel.

Test Days are often focused on testing Changes planned for an upcoming Fedora release, but they also regularly test important areas of the Fedora distribution, like upgrades, internationalization, graphical drivers, desktop environments, kernel updates, and others., see the Test Days webpage.
In today's tutorial I will show you how to test the kernel, see the kernel test week webpage.
Fedora contains the following kernel packages:
kernel — Contains the kernel for single, multicore and multiprocessor systems.
kernel-debug — Contains a kernel with numerous debugging options enabled for kernel diagnosis, at the expense of reduced performance.
kernel-devel — Contains the kernel headers and makefiles sufficient to build modules against the kernel package.
kernel-debug-devel — Contains the development version of the kernel with numerous debugging options enabled for kernel diagnosis, at the expense of reduced performance.
kernel-headers — Includes the C header files that specify the interface between the Linux kernel and user-space libraries and programs. The header files define structures and constants that are needed for building most standard programs.
linux-firmware — Contains all of the firmware files that are required by various devices to operate.
perf — This package contains supporting scripts and documentation for the perf tool shipped in each kernel image subpackage.
kernel-abi-whitelists — Contains information pertaining to the Fedora kernel ABI, including a lists of kernel symbols that are needed by external Linux kernel modules and a dnf plug-in to aid enforcement.
kernel-tools — Contains tools for manipulating the Linux kernel and supporting documentation.
You can see all events from Test Days on this webpage.
First, you need to install koji tool:
[root@desk mythcat]# dnf install koji.
Last metadata expiration check: 1:42:23 ago on Tue 27 Apr 2021 07:08:25 PM EEST.
Package koji-1.24.0-1.fc33.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
The koji tool is the software that builds RPM packages for the Fedora project.
This command show all available kernel builds:
[root@desk mythcat]# koji list-builds --package=kernel --after="2021-04-09"
Build                                                    Built by          State
-------------------------------------------------------  ----------------  ----------------
kernel-5.11.13-100.fc32                                  jforbes           COMPLETE
kernel-5.11.13-200.fc33                                  jforbes           COMPLETE
kernel-5.11.13-300.fc34                                  jforbes           COMPLETE
kernel-5.11.14-100.fc32                                  jforbes           COMPLETE
kernel-5.11.14-200.fc33                                  jforbes           COMPLETE
kernel-5.11.14-300.fc34                                  jforbes           COMPLETE
kernel-5.11.15-100.fc32                                  jforbes           COMPLETE
kernel-5.11.15-200.fc33                                  jforbes           COMPLETE
kernel-5.11.15-300.fc34                                  jforbes           COMPLETE
kernel-5.11.16-100.fc32                                  jforbes           COMPLETE
kernel-5.11.16-200.fc33                                  jforbes           COMPLETE
kernel-5.11.16-300.fc34                                  jforbes           COMPLETE
kernel-5.12.0-0.rc7.189.eln110                           jforbes           COMPLETE
kernel-5.12.0-0.rc7.189.fc35                             jforbes           COMPLETE
kernel-5.12.0-0.rc7.20210416git7e25f40eab52.191.fc35     jforbes           COMPLETE
kernel-5.12.0-0.rc8.191.eln110                           jforbes           COMPLETE
kernel-5.12.0-0.rc8.191.fc35                             jforbes           COMPLETE
kernel-5.12.0-0.rc8.20210423git7af08140979a.193.eln110   jforbes           COMPLETE
kernel-5.12.0-0.rc8.20210423git7af08140979a.193.fc35     jforbes           COMPLETE
kernel-5.12.0-198.eln110                                 jforbes           CANCELED
kernel-5.12.0-198.fc35                                   jforbes           COMPLETE
I download the kernel:
[root@desk mythcat]# koji download-build --arch=x86_64 kernel-5.12.0-198.fc35
Downloading: kernel-debug-5.12.0-198.fc35.x86_64.rpm
[====================================] 100% 243.62 KiB / 243.62 KiB
Downloading: kernel-modules-internal-5.12.0-198.fc35.x86_64.rpm
[====================================] 100% 399.58 KiB / 399.58 KiB
Downloading: kernel-debug-modules-internal-5.12.0-198.fc35.x86_64.rpm
[====================================] 100% 422.61 KiB / 422.61 KiB
Downloading: kernel-debug-modules-extra-5.12.0-198.fc35.x86_64.rpm
[====================================] 100% 2.28 MiB / 2.28 MiB
Downloading: kernel-modules-extra-5.12.0-198.fc35.x86_64.rpm
[====================================] 100% 2.19 MiB / 2.19 MiB
Downloading: kernel-5.12.0-198.fc35.x86_64.rpm
[====================================] 100% 243.52 KiB / 243.52 KiB
Downloading: kernel-debug-core-5.12.0-198.fc35.x86_64.rpm
[====================================] 100% 35.78 MiB / 35.78 MiB
Downloading: kernel-modules-5.12.0-198.fc35.x86_64.rpm
[====================================] 100% 31.24 MiB / 31.24 MiB
Downloading: kernel-core-5.12.0-198.fc35.x86_64.rpm
[====================================] 100% 33.92 MiB / 33.92 MiB
Downloading: kernel-debug-modules-5.12.0-198.fc35.x86_64.rpm
[====================================] 100% 31.97 MiB / 31.97 MiB
Downloading: kernel-devel-5.12.0-198.fc35.x86_64.rpm
[====================================] 100% 14.51 MiB / 14.51 MiB
Downloading: kernel-debug-devel-5.12.0-198.fc35.x86_64.rpm
[====================================] 100% 14.62 MiB / 14.62 MiB
The last step is update your kernel and see if is working well:
[root@desk mythcat]# dnf update kernel-*.rpm
Last metadata expiration check: 2:01:14 ago on Tue 27 Apr 2021 07:08:25 PM EEST.
The same or higher version of kernel is already installed, cannot update it.
The same or higher version of kernel-core is already installed, cannot update it.
Package kernel-debug not installed, cannot update it.
...
Dependencies resolved.
========================================================================================================
 Package                                  Arch        Version                  Repository          Size
========================================================================================================
Installing:
 kernel                                   x86_64      5.12.0-198.fc35          @commandline       244 k
 kernel-core                              x86_64      5.12.0-198.fc35          @commandline        34 M
 kernel-devel                             x86_64      5.12.0-198.fc35          @commandline        15 M
 kernel-modules                           x86_64      5.12.0-198.fc35          @commandline        31 M
 kernel-modules-extra                     x86_64      5.12.0-198.fc35          @commandline       2.2 M
Installing dependencies:
 bison                                    x86_64      3.6.4-3.fc33             fedora             860 k
 flex                                     x86_64      2.6.4-5.fc33             fedora             311 k
Removing:
 kernel                                   x86_64      5.11.14-200.fc33         @updates             0  
 kernel-core                              x86_64      5.11.14-200.fc33         @updates            74 M
 kernel-devel                             x86_64      5.11.14-200.fc33         @updates            56 M
 kernel-modules                           x86_64      5.11.14-200.fc33         @updates            30 M
 kernel-modules-extra                     x86_64      5.11.14-200.fc33         @updates           1.9 M
Removing dependent packages:
 kmod-nvidia-5.11.14-200.fc33.x86_64      x86_64      3:465.24.02-1.fc33       @@commandline       44 M

Transaction Summary
========================================================================================================
Install  7 Packages
Remove   6 Packages

Total size: 83 M
Total download size: 1.1 M
Is this ok [y/N]: y
...
Installed:
  bison-3.6.4-3.fc33.x86_64                             flex-2.6.4-5.fc33.x86_64                       
  kernel-5.12.0-198.fc35.x86_64                         kernel-core-5.12.0-198.fc35.x86_64             
  kernel-devel-5.12.0-198.fc35.x86_64                   kernel-modules-5.12.0-198.fc35.x86_64          
  kernel-modules-extra-5.12.0-198.fc35.x86_64          
Removed:
  kernel-5.11.14-200.fc33.x86_64                                                                        
  kernel-core-5.11.14-200.fc33.x86_64                                                                   
  kernel-devel-5.11.14-200.fc33.x86_64                                                                  
  kernel-modules-5.11.14-200.fc33.x86_64                                                                
  kernel-modules-extra-5.11.14-200.fc33.x86_64                                                          
  kmod-nvidia-5.11.14-200.fc33.x86_64-3:465.24.02-1.fc33.x86_64                                         

Complete!
If you want to see kernel packages are installed, execute this command:
[root@desk mythcat]# dnf list installed "kernel-*"
Installed Packages
kernel-core.x86_64                                 5.11.15-200.fc33                        @updates     
kernel-core.x86_64                                 5.11.16-200.fc33                        @updates     
kernel-core.x86_64                                 5.12.0-198.fc35                         @@commandline
kernel-devel.x86_64                                5.11.15-200.fc33                        @updates     
kernel-devel.x86_64                                5.11.16-200.fc33                        @updates     
kernel-devel.x86_64                                5.12.0-198.fc35                         @@commandline
kernel-headers.x86_64                              5.11.16-200.fc33                        @updates     
kernel-modules.x86_64                              5.11.15-200.fc33                        @updates     
kernel-modules.x86_64                              5.11.16-200.fc33                        @updates     
kernel-modules.x86_64                              5.12.0-198.fc35                         @@commandline
kernel-modules-extra.x86_64                        5.11.15-200.fc33                        @updates     
kernel-modules-extra.x86_64                        5.11.16-200.fc33                        @updates     
kernel-modules-extra.x86_64                        5.12.0-198.fc35                         @@commandline
kernel-srpm-macros.noarch                          1.0-3.fc33                              @fedora    

Sunday, March 7, 2021

Fedora 33 : Electron based terminal named Hyper.

Hyper is an Electron-based terminal built on HTML/CSS/JS.
About Electron is an open-source software framework developed and maintained by GitHub.
The original Hyper renderer was based on the DOM, and now Hyper 3 use Electron from V1 to V3 and is tested with V4.
You can install multiple plugins and themes to make your work easier.
The install process is easy, just download the RPM package and use the DNF tool to install it:
[root@desk mythcat]# dnf install Downloads/hyper-3.0.2.x86_64.rpm 
Last metadata expiration check: 0:14:49 ago on Sun 07 Mar 2021 11:22:49 AM EET.
Dependencies resolved.
================================================================================
 Package        Architecture    Version             Repository             Size
================================================================================
Installing:
 hyper          x86_64          3.0.2-3440          @commandline           37 M

Transaction Summary
================================================================================
Install  1 Package

Total size: 37 M
Installed size: 141 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : hyper-3.0.2-3440.x86_64                                1/1 
  Running scriptlet: hyper-3.0.2-3440.x86_64                                1/1 
  Verifying        : hyper-3.0.2-3440.x86_64                                1/1 

Installed:
  hyper-3.0.2-3440.x86_64                                                       

Complete!
The Hyper terminal is installed on the LXDE main menu on the Other submenu.
You can find more information on the official webpage.
The next image is a screenshot from my Fedora 33 distro with Hyper terminal.

Sunday, February 7, 2021

Fedora 33 : Running Zeek - part 001.

Zeek is often used as a network analysis tool but can also be deployed as an IDS known as Intrusion Detection System.
The full documentation can be found on this website page.
Let's install this tool on Fedora 33 distro.
[root@desk mythcat]# dnf search zeek
Last metadata expiration check: 0:18:02 ago on Sun 07 Feb 2021 11:21:35 AM EET.
No matches found.
[root@desk mythcat]# dnf config-manager --add-repo 
https://download.opensuse.org/repositories/security:zeek/Fedora_33/security:zeek.repo
Adding repo from: https://download.opensuse.org/repositories/security:zeek/Fedora_33/security:zeek.repo
[root@desk mythcat]# dnf install zeek
The Zeek Network Security Monitor. (Fedora_33)  105 kB/s | 128 kB     00:01    
Last metadata expiration check: 0:00:01 ago on Sun 07 Feb 2021 11:40:31 AM EET.
...
  Verifying        : zeekctl-3.2.3-1.1.x86_64                               8/8 

Installed:
  libbroker-devel-3.2.3-1.1.x86_64       libpcap-devel-14:1.9.1-6.fc33.x86_64  
  openssl-devel-1:1.1.1i-1.fc33.x86_64   zeek-3.2.3-1.1.x86_64                 
  zeek-core-3.2.3-1.1.x86_64             zeek-devel-3.2.3-1.1.x86_64           
  zeek-libcaf-devel-3.2.3-1.1.x86_64     zeekctl-3.2.3-1.1.x86_64              

Complete!
[root@desk mythcat]# whereis zeek
zeek: /opt/zeek/bin/zeek
[root@desk mythcat]# whereis zeekctl
zeekctl: /opt/zeek/bin/zeekctl
I found this informations into the documentation area:
ZeekControl is an interactive shell for easily operating/managing Zeek installations on a single system or even across multiple systems in a traffic-monitoring cluster.
A Minimal Starting Configuration
These are the basic configuration changes to make for a minimal ZeekControl installation that will manage a single Zeek instance on the localhost:
  • In $PREFIX/etc/node.cfg, set the right interface to monitor.
  • In $PREFIX/etc/networks.cfg, comment out the default settings and add the networks that Zeek will consider local to the monitored environment.
  • In $PREFIX/etc/zeekctl.cfg, change the MailTo email address to a desired recipient and the LogRotationInterval to a desired log archival frequency.
Next step is to configure and adjust your PATH environment variable:
[root@desk mythcat]# export PATH=/opt/zeek/bin:$PATH
[root@desk mythcat]# zeekctl

Welcome to ZeekControl 2.2.0

Type "help" for help.
...
Use install , start and diag commands on Zeek command line to check if the Zeek tool works fine.
If you received this error on diag command , then you need to set your network interface:
==== stderr.log
fatal error: problem with interface eth0 (pcap_error: SIOCGIFHWADDR: No such device (pcap_activate))
Let's fix this error using the files configuration:
[root@desk mythcat]# updatedb
[root@desk mythcat]# locate node.cfg
/opt/zeek/etc/node.cfg
[root@desk mythcat]# vi /opt/zeek/etc/node.cfg
I change the row with the interface= with my network interface.
You can find your interface with these commands:
[root@desk mythcat]# ip link show
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
...
[root@desk mythcat]# nmcli device status
DEVICE  TYPE      STATE                   CONNECTION 
...
Now I can run the zeekctl command an check if is all right.
And first issue reported by diag and zeekctl is this:
1612693272.168741 Reporter::WARNING Your interface is likely receiving invalid TCP and UDP checksums, most likely from NIC checksum offloading. By default, packets with invalid checksums are discarded by Zeek unless using the -C command-line option or toggling the 'ignore_checksums' variable. Alternatively, disable checksum offloading by the network adapter to ensure Zeek analyzes the actual checksums that are transmitted. /opt/zeek/share/zeek/base/misc/find-checksum-offloading.zeek, line 54
You can see this tool can provide good information for users.

Fedora 33 : C# and Google A.P.I .

In this tutorial, I will show you how to use C # with Google A.P.I. on Fedora Linux. 
You can find more C # tutorials written by me on the web. 
This tutorial was added here by me because it is used with Fedora 33 distro. 
You will need to set an authentication key in your google account, see the credentials page
I used Fedora Linux to install the NuGet command:
[root@desk mythcat]# dnf install nuget 
...
Installed:
  nuget-2.8.7-11.fc33.x86_64                                                    
Complete!
Use this command to install it:
[mythcat@desk CSharpProjects]$ nuget install Google.Apis.Discovery.v1 
Attempting to resolve dependency 'Google.Apis (= 1.10.0)'.
Attempting to resolve dependency 'Google.Apis.Core (≥ 1.10.0)'.
...
Attempting to resolve dependency 'Google.Apis (≥ 1.49.0)'.
'Google.Apis' already has a dependency defined for 'Google.Apis.Core'.
Create a basic C# project and test it:
[mythcat@desk CSharpProjects]$ mkdir booksAPI && cd booksAPI
[mythcat@desk booksAPI]$ dotnet new console
Getting ready...
...
[mythcat@desk booksAPI]$ dotnet run
Hello World!
Add Google A.P.I. to this project:
[mythcat@desk booksAPI]$ dotnet add package Google.Apis.Discovery.v1 --version 1.49.0
  Determining projects to restore...
log  : Restored /home/mythcat/CSharpProjects/booksAPI/booksAPI.csproj (in 8.86 sec).
Change the default project source code with this example and add your Google key:
using System;
using System.Threading.Tasks;

using Google.Apis.Discovery.v1;
using Google.Apis.Discovery.v1.Data;
using Google.Apis.Services;
namespace booksAPI
{
    class Program
    {
    [STAThread]
        static void Main(string[] args)
        {
            Console.WriteLine("Discovery API Sample");
            Console.WriteLine("====================");
            try
            {
                new Program().Run().Wait();
            }
            catch (AggregateException ex)
            {
                foreach (var e in ex.InnerExceptions)
                {
                    Console.WriteLine("ERROR: " + e.Message);
                }
            }
            Console.WriteLine("Press any key to continue...");
            Console.ReadKey();
        }

        private async Task Run()
        {
            // Create the service.
            var service = new DiscoveryService(new BaseClientService.Initializer
                {
                    ApplicationName = "Discovery Sample",
                    ApiKey="...",
                });

            // Run the request.
            Console.WriteLine("Executing a list request...");
            var result = await service.Apis.List().ExecuteAsync();

            // Display the results.
            if (result.Items != null)
            {
                foreach (DirectoryList.ItemsData api in result.Items)
                {
                    Console.WriteLine(api.Id + " - " + api.Title);
                }
            }
        }
    }
}
I used my key and this is the result of the run project:
[mythcat@desk booksAPI]$ dotnet run
Discovery API Sample
====================
Executing a list request...
abusiveexperiencereport:v1 - Abusive Experience Report API
acceleratedmobilepageurl:v1 - Accelerated Mobile Pages (AMP) URL API
accessapproval:v1 - Access Approval API
accesscontextmanager:v1beta - Access Context Manager API
...

Saturday, October 31, 2020

Fedora 33 : Upgrade from Fedora 32.

It is recommended to put SElinux in the disabled ... Use the following commands for this operation Edit the /etc/selinux/config file, run:
sudo vi /etc/selinux/config
Set SELINUX to disabled:
SELINUX=disabled
These commands will prepare the Fedora 32 for update
[root@desk mythcat]# dnf config-manager --set-disabled "*"
[root@desk mythcat]# dnf repolist 
[root@desk mythcat]# dnf config-manager --set-enabled updates
[root@desk mythcat]# dnf repolist 
repo id                                       repo name
fedora                                        Fedora 32 - x86_64
updates                                       Fedora 32 - x86_64 - Updates
[root@desk mythcat]# dnf upgrade --refresh
...
[root@desk mythcat]# dnf install dnf-plugin-system-upgrade
...
Let's upgrade with new Fedora 33 packages:
[root@desk mythcat]# dnf system-upgrade download --releasever=33 --allowerasing
Before you continue ensure that your system is fully upgraded by running "dnf --refresh upgrade". 
Do you want to continue [y/N]: y
...
  file /usr/bin/ocamlprof.byte conflicts between attempted installs of ocaml-4.11.1-1.fc33.i686 
  and ocaml-4.11.1-1.fc33.x86_64
...
[root@desk mythcat]# dnf remove ocaml
...
I try again to update:
[root@desk mythcat]# dnf system-upgrade download --releasever=33 --allowerasing
...
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Complete!
Download complete! Use 'dnf system-upgrade reboot' to start the upgrade.
To remove cached metadata and transaction use 'dnf system-upgrade clean'
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
[root@desk mythcat]# dnf system-upgrade reboot
After reboot and system upgrade the new Fedora 33 is ready to use.
If exist another upgrade then use dnf tool command:
[sudo] password for mythcat: 
[root@desk mythcat]# dnf upgrade
Last metadata expiration check: 1:58:19 ago on Sat 31 Oct 2020 04:06:13 PM EET.
Dependencies resolved.
================================================================================
 Package                   Arch        Version               Repository    Size
================================================================================
Upgrading:
 dnf                       noarch      4.4.0-3.fc33          updates      445 k
 dnf-data                  noarch      4.4.0-3.fc33          updates       46 k
 libdnf                    x86_64      0.54.2-3.fc33         updates      604 k
 php-symfony-polyfill      noarch      1.19.0-1.fc33         updates       57 k
 python3-dnf               noarch      4.4.0-3.fc33          updates      410 k
 python3-hawkey            x86_64      0.54.2-3.fc33         updates      112 k
 python3-libdnf            x86_64      0.54.2-3.fc33         updates      775 k
 unixODBC                  x86_64      2.3.9-1.fc33          updates      460 k
 yum                       noarch      4.4.0-3.fc33          updates       43 k

Transaction Summary
================================================================================
Upgrade  9 Packages

Total download size: 2.9 M
Is this ok [y/N]: y
...
Upgraded:
  dnf-4.4.0-3.fc33.noarch             dnf-data-4.4.0-3.fc33.noarch             
  libdnf-0.54.2-3.fc33.x86_64         php-symfony-polyfill-1.19.0-1.fc33.noarch
  python3-dnf-4.4.0-3.fc33.noarch     python3-hawkey-0.54.2-3.fc33.x86_64      
  python3-libdnf-0.54.2-3.fc33.x86_64 unixODBC-2.3.9-1.fc33.x86_64             
  yum-4.4.0-3.fc33.noarch            

Complete!
[root@desk mythcat]# uname -a
Linux desk 5.8.16-300.fc33.x86_64 #1 SMP Mon Oct 19 13:18:33 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
A job very well done by Fedora team.

Tuesday, August 25, 2020

Fedora 32 : Change display manager.

The display manager is a graphical login manager which starts a session, simply asks username and password to login desktop.
On Fedora, you can choose for example GDM (Gnome Display Manager), SDDM (Simple Desktop Display Manager), LXDM (LXDE Display Manager), LightDM, KDM (KDE Display Manager), XDM (X Display Manager).
I like the old gdm display manager, is good and works great.
If you want to change it then use these commands:
[root@desk mythcat]# dnf install gdm
...
Complete!
[root@desk mythcat]# systemctl disable lightdm 
[root@desk mythcat]# systemctl enable gdm
Failed to enable unit: File /etc/systemd/system/display-manager.service already exists and is a symlink to /usr/lib/systemd/system/sddm.service.
[root@desk mythcat]# systemctl disable sddm.service 
Removed /etc/systemd/system/display-manager.service.
[root@desk mythcat]# systemctl enable gdm
Created symlink /etc/systemd/system/display-manager.service → /usr/lib/systemd/system/gdm.service.
[root@desk mythcat]# reboot
If you have problems with gdm display manager then you can read about settings here.
The configuration file can be found in this file:
[root@desk mythcat]# cat /etc/gdm/custom.conf 
# GDM configuration storage

[daemon]
# Uncomment the line below to force the login screen to use Xorg
#WaylandEnable=false
AutomaticLogin=mythcat
AutomaticLoginEnable=False
[security]

[xdmcp]

[chooser]

[debug]
# Uncomment the line below to turn on debugging
#Enable=true 

Tuesday, August 18, 2020

Fedora 32 : Repair the starting LightDM display manager.

LightDM is a cross-desktop display manager with these features:
  • Cross-desktop - supports different desktop technologies.
  • Supports different display technologies (X, Mir, Wayland ...).
  • Lightweight - low memory usage and high performance.
  • Supports guest sessions.
  • Supports remote login (incoming - XDMCP, VNC, outgoing - XDMCP, pluggable).
  • Comprehensive test suite. 
  • Low code complexity.
To start it you need to use these commands:
[mythcat@desk ~]$ sudo systemctl get-default
[sudo] password for mythcat: 
multi-user.target
[mythcat@desk ~]$ sudo systemctl set-default graphical.target
Removed /etc/systemd/system/default.target.
Created symlink /etc/systemd/system/default.target → /usr/lib/systemd/system/graphical.target.
Restart your Fedora distro and use it.

Tuesday, February 11, 2020

Fedora 31 : Install the drawing GNOME with DNF and flatpak.

You can use the DNF tool:
[root@desk mythcat]# dnf search gnome | grep drawing 
Last metadata expiration check: 1:53:53 ago on Tue 11 Feb 2020 05:28:15 PM EET.
drawing.noarch : Drawing application for the GNOME desktop
[root@desk mythcat]# dnf install drawing.noarch 
Last metadata expiration check: 1:54:28 ago on Tue 11 Feb 2020 05:28:15 PM EET.
Dependencies resolved.
================================================================================
 Package          Architecture    Version                Repository        Size
================================================================================
Installing:
 drawing          noarch          0.4.9-1.fc31           updates          1.0 M

Transaction Summary
================================================================================
Install  1 Package

Total download size: 1.0 M
Installed size: 1.5 M
Is this ok [y/N]: y
Downloading Packages:
drawing-0.4.9-1.fc31.noarch.rpm                 1.4 MB/s | 1.0 MB     00:00    
--------------------------------------------------------------------------------
Total                                           601 kB/s | 1.0 MB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : drawing-0.4.9-1.fc31.noarch                            1/1 
  Running scriptlet: drawing-0.4.9-1.fc31.noarch                            1/1 
  Verifying        : drawing-0.4.9-1.fc31.noarch                            1/1 

Installed:
  drawing-0.4.9-1.fc31.noarch                                                   

Complete!
This install use the flatpak tool:
[root@desk mythcat]# dnf install flatpak
Last metadata expiration check: 1:47:49 ago on Tue 11 Feb 2020 05:28:15 PM EET.
Dependencies resolved.
================================================================================
 Package                     Arch        Version             Repository    Size
================================================================================
Installing:
 flatpak                     x86_64      1.4.3-3.fc31        updates      1.1 M
Installing dependencies:
 flatpak-selinux             noarch      1.4.3-3.fc31        updates       24 k
 flatpak-session-helper      x86_64      1.4.3-3.fc31        updates       72 k
Installing weak dependencies:
 p11-kit-server              x86_64      0.23.20-1.fc31      updates      186 k
 xdg-desktop-portal          x86_64      1.4.2-3.fc31        fedora       386 k
 xdg-desktop-portal-gtk      x86_64      1.4.0-1.fc31        fedora       212 k

Transaction Summary
================================================================================
Install  6 Packages

Total download size: 1.9 M
Installed size: 7.7 M
Is this ok [y/N]: y
...
Installed:
  flatpak-1.4.3-3.fc31.x86_64                                                   
  flatpak-selinux-1.4.3-3.fc31.noarch                                           
  flatpak-session-helper-1.4.3-3.fc31.x86_64                                    
  p11-kit-server-0.23.20-1.fc31.x86_64                                          
  xdg-desktop-portal-1.4.2-3.fc31.x86_64                                        
  xdg-desktop-portal-gtk-1.4.0-1.fc31.x86_64                                    

Complete! 
Let's install the flatpakrepo:
[mythcat@desk ~]$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Note that the directories 

'/var/lib/flatpak/exports/share'
'/home/mythcat/.local/share/flatpak/exports/share'

are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the
session is restarted.
[mythcat@desk ~]$ flatpak install flathub com.github.maoschanz.drawing

Note that the directories 

'/var/lib/flatpak/exports/share'
'/home/mythcat/.local/share/flatpak/exports/share'

are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the
session is restarted.

Looking for matches…
Required runtime for com.github.maoschanz.drawing/x86_64/stable (runtime/org.gnome.Platform/x86_64/3.34)
 found in remote flathub
Do you want to install it? [Y/n]: Y

com.github.maoschanz.drawing permissions:
    ipc   wayland   x11



        ID                                   Arch   Branch Remote  Download
 1. [✓] org.gnome.Platform                   x86_64 3.34   flathub 304.2 MB / 318.5 MB
 2. [✓] org.gnome.Platform.Locale            x86_64 3.34   flathub  16.8 kB / 322.0 MB
 3. [✓] org.freedesktop.Platform.GL.default  x86_64 19.08  flathub  92.6 MB / 92.6 MB
 4. [✓] org.freedesktop.Platform.VAAPI.Intel x86_64 19.08  flathub   8.7 MB / 8.7 MB
 5. [✗] org.freedesktop.Platform.openh264    x86_64 19.08  flathub 594.2 kB / 593.4 kB
 6. [✓] com.github.maoschanz.drawing         x86_64 stable flathub   1.0 MB / 1.1 MB
 7. [✓] com.github.maoschanz.drawing.Locale  x86_64 stable flathub   1.7 kB / 86.2 kB

Warning: org.freedesktop.Platform.openh264 not installed
Installation complete.
[mythcat@desk ~]$ flatpak install org.freedesktop.Platform/x86_64/19.08

Note that the directories 

'/var/lib/flatpak/exports/share'
'/home/mythcat/.local/share/flatpak/exports/share'

are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the
session is restarted.

Looking for matches…
Found similar ref(s) for ‘org.freedesktop.Platform/x86_64/19.08’ in remote ‘flathub’ (system).
Use this remote? [Y/n]: Y


        ID                                Arch   Branch Remote  Download
 1. [✓] org.freedesktop.Platform          x86_64 19.08  flathub  11.5 MB / 238.1 MB
 2. [✓] org.freedesktop.Platform.Locale   x86_64 19.08  flathub  16.7 kB / 318.2 MB
 3. [✓] org.freedesktop.Platform.openh264 x86_64 19.08  flathub 593.6 kB / 593.4 kB

Installation complete. 
Restart the session and run it with this command:
[mythcat@desk ~]$ flatpak run com.github.maoschanz.drawing

Saturday, November 9, 2019

Fedora 31 : The new Fedora 31 Linux distro.

I tested today the new Fedora 31.
This new Fedora comes with many features.
One is the Toolbox tool that offers a familiar RPM-based environment for developing and debugging software that runs fully unprivileged using Podman.
Fedora 31 significantly improves the speed of update installation, as packages are now compressed with zstd instead of xz.
This commands let you to upgrading Fedora 30 to Fedora 31.
[root@desk mythcat]# dnf upgrade --refresh
...
[root@desk mythcat]# dnf install dnf-plugin-system-upgrade
...
[root@desk mythcat]# dnf remove xorg-x11-drv-nvidia-340xx-libs-1:340.107-4.fc30.x86_64
...
[root@desk mythcat]# dnf system-upgrade download --releasever=31
...
[root@desk mythcat]# dnf system-upgrade reboot
You can see I remove the xorg driver because system-upgrade don't let me to update.

Monday, November 4, 2019

Fedora 30 : How to remove packages without dependency.

In this tutorial, I will show you how to remove packages without dependency.
I have this software named freecad.x86_64 and I want to remove it.
If I use the dnf tool then I got this output:
[root@desk mythcat]# dnf remove freecad.x86_64 
Dependencies resolved.
==============================================================================
 Package                       Arch   Version                  Repo      Size
==============================================================================
Removing:
 freecad                       x86_64 1:0.18.3-5.fc30.1        @updates 141 M
Removing unused dependencies:
 Coin3                         x86_64 3.1.3-24.fc30            @fedora   11 M
 OCE-foundation                x86_64 0.18.3-4.fc30            @fedora   11 M
 OCE-modeling                  x86_64 0.18.3-4.fc30            @fedora   58 M
 OCE-ocaf                      x86_64 0.18.3-4.fc30            @fedora   11 M
 OCE-visualization             x86_64 0.18.3-4.fc30            @fedora  6.7 M
 SoQt                          x86_64 1.5.0-26.fc30            @fedora  1.0 M
 assimp                        x86_64 3.3.1-19.fc30            @fedora  9.7 M
 boost-python3                 x86_64 1.69.0-8.fc30            @updates 473 k
 dotconf                       x86_64 1.3-20.fc30              @fedora   61 k
 espeak-ng                     x86_64 1.49.2-6.fc30            @fedora  6.6 M
...
The package is from Nightly FreeCAD, you can enable it if you want to install later:
[root@desk mythcat]# sudo dnf copr enable @freecad/nightly
To solve this issue you need to change this file:
[root@desk mythcat]# vim /etc/dnf/dnf.conf
From clean_requirements_on_remove=True to clean_requirements_on_remove=False.
The next commands will fix and remove the package:
[root@desk mythcat]# dnf clean all
86 files removed
[root@desk mythcat]# dnf remove freecad.x86_64 
Dependencies resolved.
==============================================================================
 Package            Architecture Version                 Repository      Size
==============================================================================
Removing:
 freecad            x86_64       1:0.18.3-5.fc30.1       @updates       141 M
Removing dependent packages:
 freecad-data       noarch       1:0.18.3-5.fc30.1       @updates       194 M

Transaction Summary
==============================================================================
Remove  2 Packages

Freed space: 335 M
Is this ok [y/N]: 
...

Wednesday, September 4, 2019

Fedora 30 : About the Jupyter lab tool.

The tutorial for today is about Jupiter Lab and Fedora 30. You can see an old tutorial with Fedora 29 here.
The JupyterLab is the next-generation web-based user interface for Project Jupyter.
This can be installed using conda, pip or pipenv.
I used pip3 tool for instalation process on Fedora 30 distro:
[mythcat@desk ~]$ pip3 install jupyterlab --user
...
Successfully installed Send2Trash-1.5.0 attrs-19.1.0 backcall-0.1.0 bleach-3.1.0 defusedxml-0.6.0 
ipykernel-5.1.2 ipython-7.8.0 ipython-genutils-0.2.0 jedi-0.15.1 json5-0.8.5 jsonschema-3.0.2 
jupyter-client-5.3.1 jupyter-core-4.5.0 jupyterlab-1.1.1 jupyterlab-server-1.0.6 mistune-0.8.4 
nbconvert-5.6.0 nbformat-4.4.0 notebook-6.0.1 pandocfilters-1.4.2 parso-0.5.1 pexpect-4.7.0 
pickleshare-0.7.5 prometheus-client-0.7.1 prompt-toolkit-2.0.9 ptyprocess-0.6.0 pyrsistent-0.15.4 
pyzmq-18.1.0 terminado-0.8.2 testpath-0.4.2 tornado-6.0.3 traitlets-4.3.2 wcwidth-0.1.7 
webencodings-0.5.1
[mythcat@desk ~]$ jupyter notebook --version
6.0.1
This tool browsers can be used with :Firefox, Chrome and Safari.
The tool can be start with this command:
[mythcat@desk ~]$ jupyter lab
[I 19:53:05.527 LabApp] Writing notebook server cookie secret to ...
The default browser will open a new tab and show the interface for this tool, see screenshot:
If you install a new python module then you need to close and reopen the tool.
You can run every row command with Shift+Enter keys.
When you want to close it just close the browser tab and press Ctrl+C keys.
Shutdown this notebook server (y/[n])? y
[C 20:09:00.058 LabApp] Shutdown confirmed
[I 20:09:00.304 LabApp] Shutting down 0 kernels
 To see additional kernels follow this link. The Fedora 30 comes with this kernels for Jupyter using the dnf tool:
[root@desk mythcat]# dnf search jupyter | grep kernel
Last metadata expiration check: 0:57:13 ago on Mi 04 sep 2019 19:46:15 +0300.
polymake-jupyter.noarch : Jupyter kernel for polymake
gap-pkg-jupyterkernel.noarch : Jupyter kernel written in GAP
python3-jupyter-c-kernel.noarch : Minimalistic C kernel for Jupyter
gap-pkg-jupyterkernel-doc.noarch : Jupyter kernel for GAP documentation
python3-jupyter-kernel-test.noarch : Machinery for testing Jupyter kernels via
python3-jupyroot.x86_64 : ROOT Jupyter kernel
python3-metakernel.noarch : Metakernel for Jupyter
python3-ipykernel.noarch : IPython Kernel for Jupyter
python3-octave-kernel.noarch : A Jupyter kernel for Octave
python3-metakernel-bash.noarch : A Bash kernel for Jupyter/IPython
python3-metakernel-python.noarch : A Python kernel for Jupyter/IPython
python3-spyder-kernels.noarch : Jupyter kernels for the Spyder console
python3-metakernel-echo.noarch : A simple echo kernel for Jupyter/IPython
R-IRkernel.noarch : Native R Kernel for the 'Jupyter Notebook'
Another feature of Jupyter is the ability to run it as a presentation server:
[mythcat@desk ~]$ jupyter nbconvert --generate-config
Writing default config to: /home/mythcat/.jupyter/jupyter_nbconvert_config.py
[mythcat@desk ~]$ cat /home/mythcat/.jupyter/jupyter_nbconvert_config.py
# Configuration file for jupyter-nbconvert.

#------------------------------------------------------------------------------
# Application(SingletonConfigurable) configuration
#------------------------------------------------------------------------------

## This is an application.
Change jupyter_nbconvert_config.py file by adding your settings. For example:
## Accept connections from all IPs
c.ServePostProcessor.ip = '*'

## Do not open the browser automatically
c.ServePostProcessor.open_in_browser = False
After you work with jupyter you can save it with a name like Test001 and run this command:
[mythcat@desk ~]$ jupyter nbconvert "Test001.ipynb" --to slides --post serve[NbConvertApp] 
Converting notebook Test001.ipynb to slides
[NbConvertApp] Writing 278626 bytes to Test001.slides.html
[NbConvertApp] Redirecting reveal.js requests to https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.5.0
Serving your slides at http://*:8000/Test001.slides.html
Use Control-C to stop this server
The result of the HTML presentation can be see at http://localhost:8000/Test001.slides.html#.

Tuesday, September 3, 2019

Fedora 30 : Few commands for Fedora distro.

In this tutorial, I will show these commands for Fedora distro and what information can provide to users. First is lspci:
[root@desk mythcat]# lspci 
...
05:00.1 Audio device: NVIDIA Corporation High Definition Audio Controller (rev a1)
[root@desk mythcat]# echo 1 > /sys/bus/pci/devices/0000\:0
0000:00:00.0/ 0000:00:1b.0/ 0000:00:1c.4/ 0000:00:1f.2/ 0000:05:00.0/
0000:00:02.0/ 0000:00:1c.0/ 0000:00:1d.0/ 0000:00:1f.3/ 0000:05:00.1/
0000:00:16.0/ 0000:00:1c.2/ 0000:00:1e.0/ 0000:02:00.0/ 
0000:00:1a.0/ 0000:00:1c.3/ 0000:00:1f.0/ 0000:03:00.0/ 
[root@desk mythcat]# echo 1 > /sys/bus/pci/devices/0000\:05\:00.1/remove
[root@desk mythcat]# lspci 
...
05:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce 210] (rev a2)
[root@desk mythcat]# echo 1 > /sys/bus/pci/rescan
[root@desk mythcat]# lspci -x -s 05:00.0
05:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce 210] (rev a2)
00: de 10 65 0a 07 04 10 00 a2 00 00 03 01 00 80 00
10: 00 00 00 f9 0c 00 00 d0 00 00 00 00 0c 00 00 ee
20: 00 00 00 00 01 df 00 00 00 00 00 00 42 38 11 13
30: 00 00 00 00 60 00 00 00 00 00 00 00 0c 01 00 00

[root@desk mythcat]# lspci -x -s 05:00.1
05:00.1 Audio device: NVIDIA Corporation High Definition Audio Controller (rev a1)
00: de 10 e3 0b 06 00 10 00 a1 00 03 04 01 00 80 00
10: 00 00 00 fa 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 42 38 11 13
30: 00 00 00 00 60 00 00 00 00 00 00 00 05 02 00 00
The next is dmesg: This NVIDIA Audio Controller detection has this output on dmesg:
[root@desk mythcat]# dmesg | grep 05:00.1
[    0.375902] pci 0000:05:00.1: [10de:0be3] type 00 class 0x040300
[    0.375929] pci 0000:05:00.1: reg 0x10: [mem 0xfaffc000-0xfaffffff]
[    0.376002] pci 0000:05:00.1: enabling Extended Tags
[ 2077.961694] pci 0000:05:00.1: [10de:0be3] type 00 class 0x040300
[ 2077.961730] pci 0000:05:00.1: reg 0x10: [mem 0xfaffc000-0xfaffffff]
[ 2077.962138] pci 0000:05:00.1: BAR 0: assigned [mem 0xfa000000-0xfa003fff]
[ 2423.644523] pci 0000:05:00.1: [10de:0be3] type 00 class 0x040300
[ 2423.644559] pci 0000:05:00.1: reg 0x10: [mem 0xfa000000-0xfa003fff]
[ 2423.644968] pci 0000:05:00.1: BAR 0: assigned [mem 0xfa000000-0xfa003fff]
[ 2517.259902] pci 0000:05:00.1: [10de:0be3] type 00 class 0x040300
[ 2517.259939] pci 0000:05:00.1: reg 0x10: [mem 0xfa000000-0xfa003fff]
[ 2517.260342] pci 0000:05:00.1: BAR 0: assigned [mem 0xfa000000-0xfa003fff]
The echo command can show information or set some issues :
[root@desk mythcat]# echo 1 > /sys/bus/pci/devices/0000:05:00.1/remove
[root@desk mythcat]# lspci -x -s 05:00.1
[root@desk mythcat]# 
Let's see
[root@desk mythcat]# lspci -v | grep -A7 -i "audio"
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio 
Controller (rev 05)
        Subsystem: Gigabyte Technology Co., Ltd Device a002
        Flags: bus master, fast devsel, latency 0, IRQ 3
        Memory at fbff4000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: [50] Power Management version 2
        Capabilities: [60] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
        Capabilities: [100] Virtual Channel
--
05:00.1 Audio device: NVIDIA Corporation High Definition Audio Controller (rev a1)
        Subsystem: eVga.com. Corp. Device 1311
        Flags: bus master, fast devsel, latency 0, IRQ 5
        Memory at faffc000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [78] Express Endpoint, MSI 00
The systemctl can help with Fedora settings:
[root@desk mythcat]# systemctl status alsa-state.service
● alsa-state.service - Manage Sound Card State (restore and store)
   Loaded: loaded (/usr/lib/systemd/system/alsa-state.service; static; vendor preset: disabled)
   Active: inactive (dead)
[root@desk mythcat]# systemctl start alsa-state.service
[root@desk mythcat]# systemctl status alsa-state.service
● alsa-state.service - Manage Sound Card State (restore and store)
   Loaded: loaded (/usr/lib/systemd/system/alsa-state.service; static; vendor preset: disabled)
   Active: active (running) since Thu 2019-08-29 13:53:58 EEST; 1s ago
 Main PID: 2951 (alsactl)
    Tasks: 1 (limit: 1942)
   Memory: 1.3M
   CGroup: /system.slice/alsa-state.service
           └─2951 /usr/sbin/alsactl -s -n 19 -c -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf 
--initfile=/lib/alsa/init/00main >

Aug 29 13:53:58 desk systemd[1]: Started Manage Sound Card State (restore and store).
Aug 29 13:53:58 desk alsactl[2951]: alsactl 1.1.9 daemon started
Aug 29 13:53:58 desk alsactl[2951]: /usr/sbin/alsactl: load_state:1735No soundcards found...
[root@desk mythcat]# systemctl status alsa-restore.service
● alsa-restore.service - Save/Restore Sound Card State
   Loaded: loaded (/usr/lib/systemd/system/alsa-restore.service; static; vendor preset: disabled)
   Active: inactive (dead)
[root@desk mythcat]# systemctl start alsa-restore.service
[root@desk mythcat]# systemctl status alsa-restore.service
● alsa-restore.service - Save/Restore Sound Card State
   Loaded: loaded (/usr/lib/systemd/system/alsa-restore.service; static; vendor preset: disabled)
   Active: inactive (dead)

Aug 29 13:58:53 desk systemd[1]: Condition check resulted in Save/Restore Sound Card State being skipped.
The hostnamectl command for Fedora workstations:
[root@desk mythcat]# hostnamectl set-hostname  new_hostname
The last is the common dnf command:
[root@desk mythcat]# dnf

Saturday, August 31, 2019

Fedora 30 : Rollback to Fedora 30.

In this tutorial, I will show you how to rollback from a bad distro update of Fedora 31 to the old one Fedora 30.
If you follow this tutorial and you got errors then your dnf tool will have problems with update process.
After I follow the tutorial I got many packages and errors.
I try to fix with this but not work:
[root@desk mythcat]# dnf system-upgrade download --refresh --releasever=31
--setopt=module_platform_id=platform:f31 --skip-broken
Before you continue to ensure that your system is fully upgraded by running "dnf
--refresh upgrade". Do you want to continue [y/N]: y
...
Because the Fedora 31 is not available I need to roll back to my old Fedora 30. This are steps I used to fix this issue:
[root@desk mythcat]# pkcon refresh force -c -1
[root@desk mythcat]# dnf --releasever=30 --allowerasing downgrade fedora
[root@desk mythcat]# dnf clean all --releasever=32
[root@desk mythcat]# dnf clean all --releasever=31
[root@desk mythcat]# dnf clean all --releasever=30
The pkcon tool refresh the cached information about available updates and set the maximum acceptable age for cached metadata, in seconds.
The option of dnf tool clean all --releasever=32 will clean all packages from fc32.
I used this command to see what packages with errors and the repo with problems:
[root@desk mythcat]# dnf --releasever=30 --allowerasing downgrade fedora
...
The result was rawhide repo and I remove it:
[root@desk mythcat]# ls -l /etc/yum.repos.d/
[root@desk mythcat]# rm /etc/yum.repos.d/fedora-rawhide.repo 
[root@desk mythcat]# rm /etc/yum.repos.d/fedora-rawhide-modular.repo 
After that I reboot my distro and I used dnfdragora with my repos to test it.

Friday, August 30, 2019

Fedora 30 : DNF history.

This option of the tool DNF can help you to see and rollback by transaction history. NOTE: This option not work if you use the system-upgrade to another version of the distro.
[root@desk mythcat]# dnf
usage: dnf [options] COMMAND

List of Main Commands:

...
history                   display, or use, the transaction history
... 
This command displays DNF transaction history starting from the latest transaction on top of the listing.
[root@desk mythcat]# dnf history 
ID     | Command line             | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
    64 | groupupdate Minimal Inst | 2019-08-29 21:59 | Install        |    2   
    63 | groupupdate Minimal Inst | 2019-08-29 21:59 | Install        |    2   
To display information about this transaction use this command:
[root@desk mythcat]# dnf history info 64
Transaction ID : 64
Begin time     : Thu 29 Aug 2019 09:59:52 PM EEST
Begin rpmdb    : 1643:6a997d9fa53488ec0003727cb0394b18b6b4deaf
End time       : Thu 29 Aug 2019 09:59:53 PM EEST (1 seconds)
End rpmdb      : 1643:6a997d9fa53488ec0003727cb0394b18b6b4deaf
User           : Catalin George Festila 
Return-Code    : Success
Releasever     : 30
Command Line   : groupupdate Minimal Install
Packages Altered:
    Install @core                
    Install @minimal-environment 
To rollback the latest transaction use this:
[root@desk mythcat]# dnf history undo 64

Thursday, March 21, 2019

Fedora 29 : Testing the dnf python module.

Today we tested with Fedora 29 a python module called DNF.
All users have used this tool.
This python module is not very documented on the internet.
A more complex example can be found on DNF tool documentation.
I tried to see what I can get from this module.
Let's start installing it with the pip tool:
$ pip install dnf --user
Here are some tests that I managed to run in the python shell.
[mythcat@desk ~]$ python
Python 2.7.15 (default, Oct 15 2018, 15:26:09) 
[GCC 8.2.1 20180801 (Red Hat 8.2.1-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> import dnf
>>> dir(dnf)
['Base', 'Plugin', 'VERSION', '__builtins__', '__doc__', '__file__', '__name__', '__package__', 
'__path__', '__version__', 'base', 'callback', 'cli', 'comps', 'conf', 'const', 'crypto', 'db', 
'dnf', 'dnssec', 'drpm', 'exceptions', 'goal', 'history', 'i18n', 'lock', 'logging', 'match_counter',
 'module', 'package', 'persistor', 'plugin', 'pycomp', 'query', 'repo', 'repodict', 'rpm', 'sack',
 'selector', 'subject', 'transaction', 'unicode_literals', 'util', 'warnings', 'yum']
>>> import dnf.conf
>>> print(dnf.conf.Conf())
[main]
assumeno: 0
assumeyes: 0
autocheck_running_kernel: 1
bandwidth: 0
best: 0
...
>>> import dnf.module
>>> import dnf.rpm
>>> import dnf.cli
>>> base = dnf.Base()
>>> base.update_cache()
True
This read all repositories:

>>> base.read_all_repos()
You need to read the sack for querying:

>>> base.fill_sack()

>>> base.sack_activation = True
Create a query to matches all packages in sack:

>>> qr=base.sack.query() 
Get only available packages:

>>> qa=qr.available() 
Get only installed packages:

>>> qi=qr.installed()
>>> q_a=qa.run()
>>> for pkg in qi.run():
...     if pkg not in q_a:
...             print('%s.%s' % (pkg.name, pkg.arch))
... 
NetworkManager-openvpn.x86_64
NetworkManager-openvpn-gnome.x86_64
coolkey.x86_64
glibc-debuginfo.x86_64
glibc-debuginfo-common.x86_64
kernel.x86_64
kernel.x86_64
kernel-core.x86_64
kernel-core.x86_64
Get all packages installed on Linux:

>>> q_i=qi.run()
>>> for pkg in qi.run():
...     print('%s.%s' % (pkg.name, pkg.arch))
You can see more about the Python programming language on my blog.

Wednesday, August 1, 2018

Fedora 28 : Unusual arguments for the dnf command.

Today I will introduce you in this tutorial some more unusual arguments for the dnf command.

  • first is check which package provides that file;
  • [root@desk mythcat]# dnf provides /etc/httpd/conf/httpd.conf
    Last metadata expiration check: 0:23:46 ago on Wed 01 Aug 2018 09:31:44 AM EEST.
    httpd-2.4.34-3.fc28.x86_64 : Apache HTTP Server
    Repo        : @System
    Matched from:
    Filename    : /etc/httpd/conf/httpd.conf
    
    httpd-2.4.34-3.fc28.x86_64 : Apache HTTP Server
    Repo        : updates
    Matched from:
    Filename    : /etc/httpd/conf/httpd.conf
    
    httpd-2.4.33-2.fc28.x86_64 : Apache HTTP Server
    Repo        : fedora
    Matched from:
    Filename    : /etc/httpd/conf/httpd.conf
  • get detailed information of a package can be viewed with the ‘info’ argument;
  • [root@desk mythcat]# dnf info httpd
    Last metadata expiration check: 0:29:01 ago on Wed 01 Aug 2018 09:31:44 AM EEST.
    Installed Packages
    Name         : httpd
    Version      : 2.4.34
    Release      : 3.fc28
    Arch         : x86_64
    Size         : 4.2 M
    Source       : httpd-2.4.34-3.fc28.src.rpm
    Repo         : @System
    From repo    : updates
    Summary      : Apache HTTP Server
    URL          : https://httpd.apache.org/
    License      : ASL 2.0
    Description  : The Apache HTTP Server is a powerful, efficient, and extensible
                 : web server.
  • allows us to see what has happened to our Linux system over time, and even undo, redo, or roll back a transaction;
  • [root@desk mythcat]# dnf history
    ID     | Command line             | Date and time    | Action(s)      | Altered
    -------------------------------------------------------------------------------
       178 | upgrade                  | 2018-08-01 09:33 | Update         |   27   
       177 | upgrade                  | 2018-07-31 12:54 | Update         |   11   
       176 | upgrade                  | 2018-07-30 20:43 | Update         |    1
  • take actions will be quicker with the ‘makecache’ argument
  • [root@desk mythcat]# time dnf makecache
    Last metadata expiration check: 0:34:10 ago on Wed 01 Aug 2018 09:31:44 AM EEST.
    Metadata cache created.
    
    real    0m4.529s
    user    0m1.420s
    sys    0m0.229s
  • list all packages that are currently installed on your Linux system;
  • [root@desk mythcat]# dnf list installed
    Installed Packages
    CharLS.x86_64                          1.0-16.fc28              @System         
    Field3D.x86_64                         1.7.2-10.fc28            @System         
    GConf2.x86_64                          3.2.6-20.fc28            @updates-testing
    GeoIP.x86_64                           1.6.12-3.fc28            @fedora         
    GeoIP-GeoLite-data.noarch              2018.06-1.fc28           @updates        
    ImageMagick.x86_64                     1:6.9.9.38-1.fc28        @updates-testing
    ImageMagick-c++.x86_64                 1:6.9.9.38-1.fc28        @updates-testing
    ImageMagick-libs.x86_64                1:6.9.9.38-1.fc28        @updates-testing
    LibRaw.x86_64                          0.18.13-1.fc28           @updates        
    ModemManager.x86_64                    1.6.12-3.fc28            @fedora 

Saturday, May 26, 2018

Fedora 28 : Can you fix your Fedora !?

Fedora Packages have a different installation and development process thanks to testing and development teams.
Note: The common user may have networking problems and these will still lead to further errors.
A common error that should be more documented and constrained is:
Error: Failed to synchronize cache for repo 'updates'.

If you did not have intruders in the computer or provider changes to modify this process, then here are some elements that help you understand how it works.
The process of cleanup of temporary files kept for repositories and update / upgrade is still a testing and development process.
This includes any such data left behind from disabled or removed repositories as well as for different distribution release versions.
  • dnf clean dbcache : this removes cache files generated from the repository metadata and forces DNF to regenerate the cache files the next time it is run.
  • dnf clean expire-cache : this marks the repository metadata expired and will re-validate the cache for each repo the next time it is used.
  • dnf clean metadata : just removes repository metadata files which is uses to determine the remote availability of packages and will make to download all the metadata the next time it is run.
  • dnf clean packages :  removes any cached packages from the system.
  • dnf clean all : does all of the above.
You can mix these commands so you can get the desired effect with the shell tool dnf , see this example:
dnf update --refresh
This will make a update but with this feature: --refresh will set metadata as expired before running the command.

Wednesday, January 3, 2018

Fedora 27 : Fix your distro with package-cleanup command.

Happy New Year 2018 !
A new beginning for us, fedora distribution users, and I prefer to write about what we all use in Fedora and maybe is less well known by new  readers.
Let's start with the development process of Fedora distro come and all the installed kernels.
Normally reason why you maybe want remove kernels is limited disk space, fix problems and see what is wrong with your Fedora distro.
First issue is about installed kernels, use this command:
#rpm -q kernel
Install this package tool named dnf-utils (is a collection of add-on tool for dnf tool).
#dnf install dnf-utils
Let's start with this command, we see that several packages are seemingly installed more than once:
#package-cleanup --cleandupes
If there’s any remaining trouble with the yum database you can see with this command:
#package-cleanup --problems
To remove installed kernels from old Fedora distros use this command:
#package-cleanup --oldkernels --count=2
... the Fedora 27 use this command:
#package-cleanup --oldkernels 2
To obtain list of orphaned packages currently residing in the system:
#package-cleanup --leaves