Radio_Head

Well-Known Member
Verifed Vendor
Feb 15, 2002
2,048
1
343
Anyone can explain me what does it mean

"Rpm Sanity Check PASSED"

What kind of check is executed ?

Thank you
 
Last edited:

jpetersen

Well-Known Member
Dec 31, 2006
113
4
168
This message comes from line _setupdatemessage subroutine in /scripts/cPScript/RpmUtils.pm. Basically, the check that is being run is on the operating system's update method -- up2date, yum, swup, or apt.

yum

Code:
    206     my $glibcinfo = cPScript::SafeRun::saferunallerrors( 'yum', 'info', 'glibc' ) || '';
    207     if ( $glibcinfo !~ m{ (?: Installed | Available) \s+ Packages }xmsi ) {
swup

Code:
    219     my $glibcinfo = cPScript::SafeRun::saferunallerrors( 'swup', '--list-latest' ) || '';
    220     if ( $glibcinfo !~ /^glibc-/mi ) {
up2date

Code:
    232     my $glibcinfo = cPScript::SafeRun::saferunallerrors( 'up2date', '--showall' ) || '';
    233     if ( $glibcinfo !~ /^glibc-/mi ) {
apt

Code:
    245     my $glibcinfo = cPScript::SafeRun::saferunallerrors( 'apt-get', '-s', 'glibc' ) || '';
    246     if ( $glibcinfo =~ /find package glibc/mi ) {

You can check to see which update method cPanel tags your OS as using by checking for the presence of one of the following:

/var/cpanel/useyum
/var/cpanel/useswup
/var/cpanel/useup2date
/var/cpanel/useapt

Looking at lines 206 and 207 from the yum check above, line 206 shows the command "yum info glibc" being run, while line 207 checks for the presence of "Installed Packages" or "Available Packages".

Code:
( Installed | Available) \s+ Packages
This can be read as: the string Installed or the string Available, plus 1 or more spaces, then the string Packages.


Code:
# yum info glibc
Setting up repositories
Reading repository metadata in from local files
Excluding Packages in global exclude list
Finished
[b]Installed Packages[/b]
Name   : glibc
Arch   : i686
Version: 2.3.4
Release: 2.19
Size   : 11 M
Repo   : installed
Summary: The GNU libc libraries.

Description:
 The glibc package contains standard libraries which are used by
multiple programs on the system. In order to save disk space and
memory, as well as to make upgrading easier, common system code is
kept in one place and shared between programs. This particular package
contains the most important sets of shared libraries: the standard C
library and the standard math library. Without these two libraries, a
Linux system will not function.


[b]Available Packages[/b]
Name   : glibc
Arch   : i686
Version: 2.3.4
Release: 2.25
Size   : 5.1 M
Repo   : base
Summary: The GNU libc libraries.
Description:
 The glibc package contains standard libraries which are used by
multiple programs on the system. In order to save disk space and
memory, as well as to make upgrading easier, common system code is
kept in one place and shared between programs. This particular package
contains the most important sets of shared libraries: the standard C
library and the standard math library. Without these two libraries, a
Linux system will not function.

Name   : glibc
Arch   : i386
Version: 2.3.4
Release: 2.25
Size   : 4.2 M
Repo   : base
Summary: The GNU libc libraries.
Description:
 The glibc package contains standard libraries which are used by
multiple programs on the system. In order to save disk space and
memory, as well as to make upgrading easier, common system code is
kept in one place and shared between programs. This particular package
contains the most important sets of shared libraries: the standard C
library and the standard math library. Without these two libraries, a
Linux system will not function.

Since the string is found, cPanel learns that the OS has a sane update method, and prints out the message that the sanity check has passed.
 
  • Like
Reactions: 1 person

Radio_Head

Well-Known Member
Verifed Vendor
Feb 15, 2002
2,048
1
343
Thank you for clear explanation. So it's "only" a check to verify if the "update method" (yum , apt or other) is ok . Reading the words "Sanity check" I was thinking at something similar to tripwire (data integrity tool) :rolleyes: