Bug 27425

Summary: User gerbera is not created, and the service can't start
Product: Mageia Reporter: Guillaume Bedot <guillaume.bedot>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: jani.valimaa, lewyssmith
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: gerbera-1.6.1-1.mga8.src.rpm CVE:
Status comment:

Description Guillaume Bedot 2020-10-15 11:51:17 CEST
To reproduce
1. Install gerbera in a terminal
2. Notice the errors
3. Try to start gerbera

# systemctl start gerbera.service 
# systemctl status gerbera.service 
● gerbera.service - Gerbera Media Server
     Loaded: loaded (/usr/lib/systemd/system/gerbera.service; disabled; vendor preset: disabled)
     Active: activating (auto-restart) (Result: exit-code) since Thu 2020-10-15 10:53:37 CEST; 4s ago
    Process: 306573 ExecStart=/usr/bin/gerbera -c /etc/gerbera/config.xml (code=exited, status=217/USER)
   Main PID: 306573 (code=exited, status=217/USER)
        CPU: 1ms


To successfully use the software :
# useradd -r -d /etc/gerbera -s /sbin/nologin gerbera 
# chown -R gerbera:gerbera /etc/gerbera
# systemctl stop gerbera.service 
# systemctl start gerbera.service 
# systemctl status gerbera.service 
● gerbera.service - Gerbera Media Server
     Loaded: loaded (/usr/lib/systemd/system/gerbera.service; disabled; vendor preset: disabled)
     Active: active (running) since Thu 2020-10-15 11:10:41 CEST; 2s ago
   Main PID: 309301 (gerbera)
      Tasks: 17 (limit: 4318)
     Memory: 3.3M
        CPU: 36ms
     CGroup: /system.slice/gerbera.service
             └─309301 /usr/bin/gerbera -c /etc/gerbera/config.xml

oct. 15 11:10:41 x2.local gerbera[309301]: 2020-10-15 11:10:41   info: Setting filesystem import charset to UTF-8
oct. 15 11:10:41 x2.local gerbera[309301]: 2020-10-15 11:10:41   info: Setting metadata import charset to UTF-8
oct. 15 11:10:41 x2.local gerbera[309301]: 2020-10-15 11:10:41   info: Setting playlist charset to UTF-8
oct. 15 11:10:41 x2.local gerbera[309301]: 2020-10-15 11:10:41   info: Configuration check succeeded.
oct. 15 11:10:41 x2.local gerbera[309301]: 2020-10-15 11:10:41   info: About to migrate metadata from mt_cds_object to mt_metadata
oct. 15 11:10:41 x2.local gerbera[309301]: 2020-10-15 11:10:41   info: No data will be removed from mt_cds_object
oct. 15 11:10:41 x2.local gerbera[309301]: 2020-10-15 11:10:41   info: Migrated metadata - object count: 0
oct. 15 11:10:41 x2.local gerbera[309301]: 2020-10-15 11:10:41   info: Initialized port: 49153
oct. 15 11:10:41 x2.local gerbera[309301]: 2020-10-15 11:10:41   info: Server bound to: 192.168.0.30
oct. 15 11:10:41 x2.local gerbera[309301]: 2020-10-15 11:10:41   info: The Web UI can be reached by following this link: http://192.168.0.30:49153/




To fix the package, maybe this is to change in the spec:
-%_pre_useradd %{_sysconfdir}/gerbera %{_sbindir}/nologin
+%_pre_useradd gerbera %{_sysconfdir}/gerbera %{_sbindir}/nologin
Comment 1 Jani Välimaa 2020-10-15 18:33:15 CEST
Thanks for reporting the issue. It should be fixed in gerbera-1.6.1-2.mga8.

CC: (none) => jani.valimaa

Comment 2 Lewis Smith 2020-10-15 21:22:58 CEST
@Jani : thanks for picking this up, and indicating the fix to come.
As I write, it is not yet visible.

@Guillaume : when the update arrives, please test it and report back.
Because you have already adapted your system, your update will not test a new installation. Would you be willing to UNinstall your gerbera, undo the changes you did, then re-install the update to see whether it works from scratch?

CC: (none) => lewyssmith

Comment 3 Guillaume Bedot 2020-10-16 10:53:33 CEST
For me it's fixed.

I tested with:
# urpme gerbera
# userdel gerbera
# rm -rf /etc/gerbera
(.rpmsave files were there)
# urpmi.update -a
# urpmi gerbera
# systemctl start gerbera
(the service is not automatically started)

Then I can browse to http://192.168.0.30:49153/ to configure and play the files from vlc (don't check "Play and exit" in Playlist preferences or it closes instead of browsing...)

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 4 Lewis Smith 2020-10-16 21:05:58 CEST
Thank you for your prompt and decent test of the update. This sort of thing helps a lot.