NetBSD Problem Report #57120

From root@test.anduin.org.uk  Mon Dec 19 00:28:36 2022
Return-Path: <root@test.anduin.org.uk>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id C6D831A921F
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 19 Dec 2022 00:28:36 +0000 (UTC)
Message-Id: <20221218230609.CE42C8BE6B@test.anduin.org.uk>
Date: Sun, 18 Dec 2022 23:06:09 +0000 (GMT)
From: Dave Tyson <dtyson@anduin.org.uk> 
Reply-To: Dave Tyson <dtyson@anduin.org.uk>
To: gnats-bugs@NetBSD.org
Subject: Gerbera package fails to start and crashes out with a config error
X-Send-Pr-Version: 3.95

>Number:         57120
>Category:       pkg
>Synopsis:       Gerbera package fails to start and crashes out with a config error
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 19 00:30:00 +0000 2022
>Last-Modified:  Fri Dec 23 21:45:01 +0000 2022
>Originator:     Dave Tyson
>Release:        NetBSD 9.99.108
>Organization:
	Anduin
>Environment:


System: NetBSD test.anduin.org.uk 9.99.108 NetBSD 9.99.108 (HP) #0: Tue Dec 6 22:25:14 GMT 2022 root@test.anduin.org.uk:/usr/obj/sys/arch/amd64/compile/HP amd64
Architecture: x86_64
Machine: amd64
>Description:
	Gerbera compiles and installs OK. Trying to run it from the standard rc setup fails
	as the supplied gerbera startup file has a -g option to set a group id. Sadly the
	package doesn't support this option. Removing the -g option means the package starts
	but then it falls over after it has read the config.xml file with a missing tag 47 error.
>How-To-Repeat:
	Install Gerbera, move the startup file from /usr/pkg/share/examples/rc.d/gerbera to /etc/rc.d/gerbera
	put gerbera=YES in /etc/rc.conf and start the package. Note it complains about a superfluous -g option
        Fix the startup file and try again. It fails after reading the config.xml file...
	The /var/log/gerbera.log shows:

2022-12-18 22:02:36   info: Gerbera UPnP Server 1.11.0 - http://gerbera.io/
2022-12-18 22:02:36   info: Copyright 2016-2022 Gerbera Contributors.
2022-12-18 22:02:36   info: Gerbera is free software, covered by the GNU General Public License version 2
2022-12-18 22:02:36   info: Dropped to User: gerbera
2022-12-18 22:02:36   info: Loading configuration from: /usr/pkg/etc/gerbera/config.xml
2022-12-18 22:02:36   info: Checking configuration...
2022-12-18 22:02:36  error: [/usr/pkgsrc/multimedia/gerbera/work/gerbera-1.11.0/src/config/config_definition.cc:1380] static std::shared_ptr<ConfigSetup> ConfigDefinition::findConfigSetup(config_option_t, bool) Error: Error in config code: 47 tag not found. CFG_MAX=140

Notes: (1) The tags are part of an enum list which has conditional parts so it is not obvious which tag 47 is. However a bit of crude poking around shows it is CFG_SERVER_EXTOPTS_FFMPEGTHUMBNAILER_ENABLED. This
seems to be defined in the supplied config.xml file.  
       (2) The package can generate a config.xml file using gerbera --create-config however the generated file still causes the package to crash with the same error.
>Fix:
	1. The gerbera startup file needs the -g option removing
        2. I don't know what is wrong with the supplied or generated config.xml but the package complains about a missing tag. Could be config error or program error.

>Audit-Trail:
From: Dave Tyson <dtyson@anduin.org.uk>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/57120: Gerbera package fails to start and crashes out with a config error
Date: Mon, 19 Dec 2022 22:20:11 +0000

 I recompiled gerbera adding the following line to /etc/mk.conf:

 PKG_OPTIONS.gerbera += -ffmpegthumbnailer -matroska

 and that seemed to fix the problem with it not starting up due to a config 
 error. 

 That gives me a chance to play around with the software (which I hope will 
 replace the older ushare package which is no longer available). I will try and 
 diagnose what the problem with the ffmegthumbnailer is at a later date and 
 update this pr.

 Dave

From: "David H. Gutteridge" <gutteridge@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57120 CVS commit: pkgsrc/multimedia/gerbera
Date: Fri, 23 Dec 2022 21:44:20 +0000

 Module Name:	pkgsrc
 Committed By:	gutteridge
 Date:		Fri Dec 23 21:44:20 UTC 2022

 Modified Files:
 	pkgsrc/multimedia/gerbera: Makefile
 	pkgsrc/multimedia/gerbera/files: gerbera.sh

 Log Message:
 gerbera: correct startup script

 Unlike MediaTomb, Gerbera does not support a -g option for group.
 (And seemingly never has, having checked their GitHub repo. Presumably
 this was a copy-pasto from the other package.) Addresses an error on
 startup, one part of PR pkg/57120 reported by Dave Tyson.


 To generate a diff of this commit:
 cvs rdiff -u -r1.10 -r1.11 pkgsrc/multimedia/gerbera/Makefile
 cvs rdiff -u -r1.1 -r1.2 pkgsrc/multimedia/gerbera/files/gerbera.sh

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2022 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.