We have moved to a new Sailfish OS Forum. Please start new discussions there.

Revision history [back]

click to hide/show revision 1
initial version

posted 2015-10-29 09:08:35 +0200

Verify integrity of installed packages after upgrade or later

My Jolla has suffered so far two problems after 2.0.0.10 upgrade. (This post)

Both related to zero sized files and not properly updated package where package was in place, but there were no files in filesystem or some files were missing belonging that package, and package version was old.

These problems caused that I could not access Accounts, or launch browser since browser paniced because missing library files (package xulrunner-qt5 was installed, but wrong version and missing library files)

My question/feature-request: Is there or should be there some sort of verify process or tool after upgrade to make sure everything is up to date?

In my case fix was to re-run: pkcon install pkgname

I was curious and luckily find out that there was rpm binary installed so I ended up running rpm --verify against all installed packages to see how much there are differencies. I found there was some, mostly just timestamp and permission differencies but also MD5 sum differencies. Below is explained what verify output means.

   S file Size differs
   M Mode differs (includes permissions and file type)
   5 MD5 sum differs
   D Device major/minor number mismatch
   L readLink(2) path mismatch
   U User ownership differs
   G Group ownership differs
   T mTime differs
   P caPabilities differ

One package for example.

[root@Jolla tmp]# rpm -V libjollasignonuiservice-qt5
5..T.....    /usr/lib/libjollasignonuiservice-qt5.so.1.0.0
...T.....    /usr/share/translations/libjollasignonuiservice_qt5_eng_en.qm

[root@Jolla tmp]# pkcon install libjollasignonuiservice-qt5
Installing                                                                                                                                                                 
Waiting in queue                                                                                                                                                           
Starting                                                                                                                                                                    
Refreshing software list                                                                                                                                                   
Querying                                                                                                                                                                   
Resolving dependencies                                                                                                                                                     
Installing packages                                                                                                                                                        
Installing                                                                                                                                                                 
Waiting in queue                                                                                                                                                           
Waiting for authentication                                                                                                                                                 
Waiting in queue                                                                                                                                                           
Starting                                                                                                                                                                    
Refreshing software list                                                                                                                                                   
Querying                                                                                                                                                                   
Resolving dependencies                                                                                                                                                     
Installing packages                                                                                                                                                        
Downloading packages                                                                                                                                                       
Installing packages                                                                                                                                                        
[root@Jolla tmp]# rpm -V libjollasignonuiservice-qt5
[root@Jolla tmp]#

Another example:

[root@Jolla tmp]# rpm -V nemo-qml-plugin-calendar-qt5-lightweight      
5S.T.....    /usr/bin/calendardataservice
5..T.....    /usr/lib/qt5/qml/org/nemomobile/calendar/lightweight/libnemocalendarwidget.so
[root@Jolla tmp]# ls -l /usr/bin/calendardataservice 
-rwxr-sr-x 1 root privileged 211660 Jul 16 15:59 /usr/bin/calendardataservice
[root@Jolla tmp]# pkcon install nemo-qml-plugin-calendar-qt5-lightweight
Installing                                                                                                                                                                 
Waiting in queue                                                                                                                                                           
Starting                                                                                                                                                                    
Refreshing software list                                                                                                                                                   
Querying                                                                                                                                                                   
Resolving dependencies                                                                                                                                                     
Installing packages                                                                                                                                                        
Installing                                                                                                                                                                 
Waiting in queue                                                                                                                                                           
Waiting for authentication                                                                                                                                                 
Waiting in queue                                                                                                                                                           
Starting                                                                                                                                                                    
Refreshing software list                                                                                                                                                   
Querying                                                                                                                                                                   
Resolving dependencies                                                                                                                                                     
Installing packages                                                                                                                                                        
Downloading packages                                                                                                                                                       
Installing packages                                                                                                                                                        
[root@Jolla tmp]# ls -l /usr/bin/calendardataservice 
-rwxr-sr-x 1 root privileged 212288 Sep  5 01:15 /usr/bin/calendardataservice
[root@Jolla tmp]# rpm -V nemo-qml-plugin-calendar-qt5-lightweight
[root@Jolla tmp]#

Package version was before and after same: nemo-qml-plugin-calendar-qt5-lightweight-0.2.8-10.22.1.jolla.armv7hl

Verify integrity of installed packages after upgrade or later

My Jolla has suffered so far two problems after 2.0.0.10 upgrade. (This post)

Both related to zero sized files and not properly updated package where package was in place, but there were no files in filesystem or some files were missing belonging that package, and package version was old.

These problems caused that I could not access Accounts, or launch browser since browser paniced because missing library files (package xulrunner-qt5 was installed, but wrong version and missing library files)

My question/feature-request: Is there or should be there some sort of verify process or tool after upgrade to make sure everything is up to date?

In my case fix was to re-run: pkcon install pkgname

I was curious and luckily find out that there was rpm binary installed so I ended up running rpm --verify against all installed packages to see how much there are differencies. I found there was some, mostly just timestamp and permission differencies but also MD5 sum differencies. Below is explained what verify output means.

   S file Size differs
   M Mode differs (includes permissions and file type)
   5 MD5 sum differs
   D Device major/minor number mismatch
   L readLink(2) path mismatch
   U User ownership differs
   G Group ownership differs
   T mTime differs
   P caPabilities differ

One package for example.

[root@Jolla tmp]# rpm -V libjollasignonuiservice-qt5
5..T.....    /usr/lib/libjollasignonuiservice-qt5.so.1.0.0
...T.....    /usr/share/translations/libjollasignonuiservice_qt5_eng_en.qm

[root@Jolla tmp]# pkcon install libjollasignonuiservice-qt5
Installing                                                                                                                                                                 
Waiting in queue                                                                                                                                                           
Starting                                                                                                                                                                    
Refreshing software list                                                                                                                                                   
Querying                                                                                                                                                                   
Resolving dependencies                                                                                                                                                     
Installing packages                                                                                                                                                        
Installing                                                                                                                                                                 
Waiting in queue                                                                                                                                                           
Waiting for authentication                                                                                                                                                 
Waiting in queue                                                                                                                                                           
Starting                                                                                                                                                                    
Refreshing software list                                                                                                                                                   
Querying                                                                                                                                                                   
Resolving dependencies                                                                                                                                                     
Installing packages                                                                                                                                                        
Downloading packages                                                                                                                                                       
Installing packages                                                                                                                                                        
[root@Jolla tmp]# rpm -V libjollasignonuiservice-qt5
[root@Jolla tmp]#

Another example:

[root@Jolla tmp]# rpm -V nemo-qml-plugin-calendar-qt5-lightweight      
5S.T.....    /usr/bin/calendardataservice
5..T.....    /usr/lib/qt5/qml/org/nemomobile/calendar/lightweight/libnemocalendarwidget.so
[root@Jolla tmp]# ls -l /usr/bin/calendardataservice 
-rwxr-sr-x 1 root privileged 211660 Jul 16 15:59 /usr/bin/calendardataservice
[root@Jolla tmp]# pkcon install nemo-qml-plugin-calendar-qt5-lightweight
Installing                                                                                                                                                                 
Waiting in queue                                                                                                                                                           
Starting                                                                                                                                                                    
Refreshing software list                                                                                                                                                   
Querying                                                                                                                                                                   
Resolving dependencies                                                                                                                                                     
Installing packages                                                                                                                                                        
Installing                                                                                                                                                                 
Waiting in queue                                                                                                                                                           
Waiting for authentication                                                                                                                                                 
Waiting in queue                                                                                                                                                           
Starting                                                                                                                                                                    
Refreshing software list                                                                                                                                                   
Querying                                                                                                                                                                   
Resolving dependencies                                                                                                                                                     
Installing packages                                                                                                                                                        
Downloading packages                                                                                                                                                       
Installing packages                                                                                                                                                        
[root@Jolla tmp]# ls -l /usr/bin/calendardataservice 
-rwxr-sr-x 1 root privileged 212288 Sep  5 01:15 /usr/bin/calendardataservice
[root@Jolla tmp]# rpm -V nemo-qml-plugin-calendar-qt5-lightweight
[root@Jolla tmp]#

Package version was before and after same: nemo-qml-plugin-calendar-qt5-lightweight-0.2.8-10.22.1.jolla.armv7hl