Refreshing/Update openSUSE filesystem database:

Hi, is it necessary to sometimes update the openSUSE Tumbleweed filesystem database (after zypper dup)? with a command similar to a command in the debian world (updatedb - update database for mlocate)? I ask this because for some time I was unaware of this command.

Is this initially (after installing openSUSE) handled automatically with openSUSE Tumbleweed? Or is it initially invoked somehow manually in openSUSE Tumbleweed by the use of executing an application such as zypper or what?

-Thanks

mlocate has a timer:

erlangen:~ # systemctl status mlocate.timer
● mlocate.timer - Daily locate database update
     Loaded: loaded (/usr/lib/systemd/system/mlocate.timer; enabled; preset: enabled)
     Active: active (waiting) since Wed 2024-01-10 19:19:09 CET; 1 day 1h ago
    Trigger: Fri 2024-01-12 00:00:00 CET; 2h 46min left
   Triggers: ● mlocate.service
       Docs: man:updatedb

Jan 10 19:19:09 erlangen systemd[1]: Started Daily locate database update.
erlangen:~ # 
Thinkcentre-M57p:~ # systemctl status 
● paul-Thinkcentre-M57p
    State: running
    Units: 476 loaded (incl. loaded aliases)
     Jobs: 0 queued
   Failed: 0 units
    Since: Thu 2024-01-11 11:58:37 CST; 2h 33min ago
  systemd: 254.5+suse.21.g071ac409a0
   CGroup: /
           ├─1347 bpfilter_umh
           ├─init.scope
           │ └─1 /usr/lib/systemd/systemd --switched-root --system --deserialize=32
           ├─system.slice
           │ ├─ModemManager.service
           │ │ └─1320 /usr/sbin/ModemManager
           │ ├─NetworkManager.service
           │ │ └─1349 /usr/sbin/NetworkManager --no-daemon
           │ ├─auditd.service
           │ │ └─1132 /sbin/auditd
           │ ├─avahi-daemon.service
           │ │ └─1141 "avahi-daemon: running [paul-Thinkcentre-M57p.local]"
           │ ├─chronyd.service
           │ │ └─1484 /usr/sbin/chronyd
           │ ├─cron.service
           │ │ └─1612 /usr/sbin/cron -n
           │ ├─cups.service
           │ │ └─1453 /usr/sbin/cupsd -l
           │ ├─dbus.service
           │ │ └─1142 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
           │ ├─display-manager.service
           │ │ ├─1798 /usr/bin/sddm
           │ │ └─1811 /usr/bin/Xorg.bin -nolisten tcp -background none -seat seat0 vt2 -auth /run/sddm/xauth_UthVDn -noreset -displayfd 16
           │ ├─firewalld.service
           │ │ └─1321 /usr/bin/python3 /usr/sbin/firewalld --nofork --nopid
           │ ├─haveged.service
           │ │ └─1052 /usr/sbin/haveged -w 1024 -v 0 -F
           │ ├─irqbalance.service
           │ │ └─1144 /usr/sbin/irqbalance
           │ ├─mcelog.service
lines 1-38

It looks like service “mlocate.timer” is not installed or active:
Passing: .

Thinkcentre-M57p:~ # systemctl status mlocate.timer
Unit mlocate.timer could not be found.
Thinkcentre-M57p:~ #

Am I assuming this correctly?

-Thanks

Is mlocate installed on your system? If not then you also don’t have a mlocate.timer

It looks like mlocate is not installed on the machine here. See the attached screenshot if able.

There are 2 repositories also (shown in screenshot) to get the mlocate package from. I am wondering which repository to use and what is the difference between the 2 repositories are?

Below is taken from the mlocate Description specification tab.

mlocate - A utility for finding files by name

A new locate implementation. The m character stands for merging, because updatedb reuses the existing database to avoid re-reading most of the file system.

Where is updatedb built into openSUSE Tumbleweed?

Thanks

They are basically the same because you have two times the OSS repo but with different names and /or URLs. This can be verified with
zypper lr -d

This command is part of the mlocate package…

This is the current repo list and I can’t see 2 of same.

Thanks

Number 3 and 8 are the same OSS repo. You can remove number 3.

sudo zypper rr 3 Now

paul@paul-Thinkcentre-M57p:~> sudo zypper rr 3
Removing repository 'Main Repository (OSS)' ......................................................................................................................................................................[done]
Repository 'Main Repository (OSS)' has been removed.
paul@paul-Thinkcentre-M57p:~> zypper lr -d
#  | Alias                      | Name                           | Enabled | GPG Check | Refresh | Priority | Type   | URI                                                                           | Service
---+----------------------------+--------------------------------+---------+-----------+---------+----------+--------+-------------------------------------------------------------------------------+---------
 1 | Games                      | Games                          | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/games/openSUSE_Tumbleweed/          | 
 2 | NVIDIA:repo-non-free       | repo-non-free                  | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://download.nvidia.com/opensuse/tumbleweed/                              | NVIDIA
 3 | home_pzz                   | home:pzz (openSUSE_Tumbleweed) | Yes     | (r ) Yes  | No      |   99     | rpm-md | https://download.opensuse.org/repositories/home:/pzz/openSUSE_Tumbleweed/     | 
 4 | libdvdcss2                 | libdvdcss2                     | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://opensuse-guide.org/repo/openSUSE_Tumbleweed/                           | 
 5 | openSUSE:repo-non-oss      | repo-non-oss                   | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://cdn.opensuse.org/tumbleweed//repo/non-oss                              | openSUSE
 6 | openSUSE:repo-openh264     | repo-openh264                  | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://codecs.opensuse.org/openh264/openSUSE_Tumbleweed                       | openSUSE
 7 | openSUSE:repo-oss          | repo-oss                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://cdn.opensuse.org/tumbleweed//repo/oss                                  | openSUSE
 8 | openSUSE:repo-oss-debug    | repo-oss-debug                 | No      | ----      | ----    |   99     | N/A    | http://cdn.opensuse.org/debug/tumbleweed//repo/oss                            | openSUSE
 9 | openSUSE:repo-oss-source   | repo-oss-source                | No      | ----      | ----    |   99     | N/A    | http://cdn.opensuse.org/source/tumbleweed//repo/oss                           | openSUSE
10 | openSUSE:update-tumbleweed | update-tumbleweed              | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://cdn.opensuse.org/update/tumbleweed/                                    | openSUSE
11 | packman-essentials         | packman-essentials             | Yes     | (r ) Yes  | Yes     |   90     | rpm-md | http://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Tumbleweed/Essentials | 
paul@paul-Thinkcentre-M57p:~> sudo zypper refresh
Repository 'Games' is up to date.                                                                                                                                                                                       
Repository 'repo-non-free' is up to date.                                                                                                                                                                               
Repository 'home:pzz (openSUSE_Tumbleweed)' is up to date.                                                                                                                                                              
Repository 'libdvdcss2' is up to date.                                                                                                                                                                                  
Repository 'repo-non-oss' is up to date.                                                                                                                                                                                
Repository 'repo-openh264' is up to date.                                                                                                                                                                               
Repository 'repo-oss' is up to date.                                                                                                                                                                                    
Repository 'update-tumbleweed' is up to date.                                                                                                                                                                           
Repository 'packman-essentials' is up to date.                                                                                                                                                                          
All repositories have been refreshed.
paul@paul-Thinkcentre-M57p:~> sudo zypper dup
Refreshing service 'NVIDIA'.
Refreshing service 'openSUSE'.
Loading repository data...
Reading installed packages...
Warning: You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this command.
Computing distribution upgrade...
Nothing to do.
paul@paul-Thinkcentre-M57p:~>

Thanks

What are the larger differences between yast cli and zypper cli? I would like to install mlocate with yast command line interface if possible for this instance. Neat, I see yast cli now.

Is this common for users to use yast cli? Wow it’s a bit more difficult to navigate in yast (cli) than yast (gui).

Thanks

Hi panorain,

There’s actually no “yast cli”. You can enter yast as root, rather than yast2. It will lead you to a menue very similar and with all the same functions as the GUI version - just in the terminal environment.


“Under the hood” both versions the same basic functions as zypper. Just check /var/log/zypp/history after doing some install with YaST.
I’d say, CLI i.e. zypper is more common with tumbleweed users than GUI as zypper dup is your choice for updating (=upgrading). So, I assume most / many users also use it for (un-) install. After all, that’s your choice.
I’m on Leap, however. I use zypper or yast2 just as suits me best. IMHO, (open) search for files, commands, packages etc. can be easier in GUI. If you know the exact package and task to perform, zypper is your faster friend. Again, it’s just your choice and preference.

I have installed mlocate passing systemctl.status displays the following:

Thinkcentre-M57p:~> systemctl status
● paul-Thinkcentre-M57p
    State: running
    Units: 477 loaded (incl. loaded aliases)
     Jobs: 0 queued
   Failed: 0 units
    Since: Thu 2024-01-11 16:45:54 CST; 25min ago
  systemd: 254.5+suse.21.g071ac409a0
   CGroup: /
           ├─1357 bpfilter_umh
           ├─init.scope
           │ └─1 /usr/lib/systemd/systemd --switched-root --system --deserialize=32
           ├─system.slice
           │ ├─ModemManager.service
           │ │ └─1340 /usr/sbin/ModemManager
           │ ├─NetworkManager.service
           │ │ └─1364 /usr/sbin/NetworkManager --no-daemon
           │ ├─auditd.service
           │ │ └─1055 /sbin/auditd
           │ ├─avahi-daemon.service
           │ │ └─1173 "avahi-daemon: running [paul-Thinkcentre-M57p.local]"
           │ ├─chronyd.service
           │ │ └─1486 /usr/sbin/chronyd
           │ ├─cron.service
           │ │ └─1614 /usr/sbin/cron -n
           │ ├─cups.service
           │ │ └─1456 /usr/sbin/cupsd -l
           │ ├─dbus.service
           │ │ └─1190 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
           │ ├─display-manager.service
           │ │ ├─1807 /usr/bin/sddm
           │ │ └─1813 /usr/bin/Xorg.bin -nolisten tcp -background none -seat seat0 vt2 -auth /run/sddm/xauth_RfdqET -noreset -displayfd 16
           │ ├─firewalld.service
           │ │ └─1341 /usr/bin/python3 /usr/sbin/firewalld --nofork --nopid
           │ ├─haveged.service
           │ │ └─1017 /usr/sbin/haveged -w 1024 -v 0 -F
           │ ├─irqbalance.service
           │ │ └─1199 /usr/sbin/irqbalance
           │ ├─mcelog.service
Thinkcentre-M57p:~> systemctl status mlocate.timer
● mlocate.timer - Daily locate database update
     Loaded: loaded (/usr/lib/systemd/system/mlocate.timer; enabled; preset: enabled)
     Active: active (waiting) since Thu 2024-01-11 16:46:09 CST; 26min ago
    Trigger: Fri 2024-01-12 00:00:00 CST; 6h left
   Triggers: ● mlocate.service
       Docs: man:updatedb

Warning: some journal files were not opened due to insufficient permissions.

Then

Thinkcentre-M57p:~> sudo updatedb
[sudo] password for root: 
Thinkcentre-M57p:~>
  1. My questions for you is to why the mlocate.service does not display when systemctl status is passed?
  2. The other question for you is passing: systemctl status mlocate.timer results in the following error: Warning: some journal files were not opened due to insufficient permissions.
  3. Is this a common privilege situation you may be aware of after default installation of mlocate? If so, which file or folder is this located?
  4. I did powercycle the machine and the mlocate status is the same as shown above in terminal output.

Thanks again for all the help.

systemctl status ... can be run as user (i.e. not root). However a user can only read parts of the journal. So if you run systemctl status ... as user you will see that warning.

If you want your user to see all journal entries you have to add your user to the group systemd-journal.