Bug 178657 - audio/squeezeboxserver: Start failure with mysql-server-5.0
Summary: audio/squeezeboxserver: Start failure with mysql-server-5.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Stefan Walter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-15 13:00 UTC by Thomas Mueller
Modified: 2013-05-18 23:40 UTC (History)
0 users

See Also:


Attachments
file.diff (989 bytes, patch)
2013-05-15 13:00 UTC, Thomas Mueller
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Mueller 2013-05-15 13:00:00 UTC
The most recent version of squeezeboxserver (7.5.4_6) fails to start
with mysql-server-5.0 due to an unsupported MySQL configuration variable.

Variable 'table_open_cache' was known as table_cache in MySQL 5.1.2 and
earlier, so replacing 'table_cache' with 'table_open_cache' in the
port's Makefile should depend on the MySQL version in use.

Fix: My ports foo is limited, but this appears to work:

tmu:/usr/ports/audio/squeezeboxserver# diff -u Makefile.orig  Makefile
How-To-Repeat: tmu:~# pkg_info | grep -e squeezeboxserver -e mysql-serv
mysql-server-5.0.95 Multithreaded SQL database (server)
squeezeboxserver-7.5.4_6 Slim Devices audio streaming server

tmu:~# /usr/local/etc/rc.d/squeezeboxserver start
Starting squeezeboxserver.
[13-05-15 13:43:39.5303] main::init (326) Starting Squeezebox Server (v7.5.4, r32171, Thu Apr 14 10:19:04 MDT 2011) perl 5.014002
130515 13:43:39 [ERROR] /usr/local/libexec/mysqld: unknown variable 'table_open_cache=64'
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-05-15 13:00:08 UTC
Maintainer of audio/squeezeboxserver,

Please note that PR ports/178657 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/178657

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2013-05-15 13:00:09 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Stefan Walter freebsd_committer freebsd_triage 2013-05-15 17:01:58 UTC
Responsible Changed
From-To: freebsd-ports-bugs->stefan

Take while waiting for maintainer's feedback.
Comment 4 Mark Linimon 2013-05-17 22:54:55 UTC
----- Forwarded message from Mark Knight <markk@knigma.org> -----

Date: Fri, 17 May 2013 10:43:43 +0100
From: Mark Knight <markk@knigma.org>
To: stefan@FreeBSD.org
Cc: freebsd-ports-bugs@FreeBSD.org, tmueller@sysgo.com
Subject: Re: ports/178657: audio/squeezeboxserver: Start failure with mysql-server-5.0
User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:17.0) Gecko/20130509 Thunderbird/17.0.6

Thanks, approved, slightly tweaked patch file attached with correct
white space. Apologies for breaking compatibility with old versions of
mysql.

-- 
Mark Knight
Mobile: +44 7880 556751.  Home: +44 1223 858596
Email: markk@knigma.org.  Skype: knigma

On 15/05/2013 17:02, stefan@FreeBSD.org wrote:
> Synopsis: audio/squeezeboxserver: Start failure with mysql-server-5.0
> 
> Responsible-Changed-From-To: freebsd-ports-bugs->stefan
> Responsible-Changed-By: stefan
> Responsible-Changed-When: Wed May 15 16:01:58 UTC 2013
> Responsible-Changed-Why:
> Take while waiting for maintainer's feedback.
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=178657
> 


--- Makefile.orig	2013-05-17 10:27:59.000000000 +0100
+++ Makefile	2013-05-17 10:37:58.000000000 +0100
@@ -7,7 +7,7 @@
 
 PORTNAME=	squeezeboxserver
 PORTVERSION=	7.5.4
-PORTREVISION=	6
+PORTREVISION=	7
 CATEGORIES=	audio
 MASTER_SITES=	http://downloads.slimdevices.com/SqueezeboxServer_v${PORTVERSION}/
 DISTNAME=	${PORTNAME}-${PORTVERSION}-noCPAN
@@ -174,12 +174,16 @@
 	    -e 's|%%TMP_SLIMDIR%%|${TMP_SLIMDIR}|g' \
 		${WRKSRC}/scanner.pl \
 		${WRKSRC}/slimserver.pl
-	${REINPLACE_CMD} \
+	@${REINPLACE_CMD} \
 		-e 's/skip-locking/skip-external-locking/' \
 		-e 's/default-character-set/character-set-server/'\
-		-e 's/table_cache/table_open_cache/'\
 		-e 's/default-collation/collation-server/'  ${WRKSRC}/MySQL/my.tt
-	${REINPLACE_CMD} \
+# table_open_cache was known as table_cache in MySQL 5.1.2 and earlier
+	@if [ "$(MYSQL_VER)" != "50" ] ; then \
+		${REINPLACE_CMD} \
+			-e 's/table_cache/table_open_cache/' ${WRKSRC}/MySQL/my.tt ;\
+	fi
+	@${REINPLACE_CMD} \
 		-e 's/TYPE=InnoDB/ENGINE=InnoDB/' ${WRKSRC}/SQL/mysql/schema_*.sql
 
 do-build:

_______________________________________________
freebsd-ports-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "freebsd-ports-bugs-unsubscribe@freebsd.org"


----- End forwarded message -----
Comment 5 dfilter service freebsd_committer freebsd_triage 2013-05-18 23:37:13 UTC
Author: stefan
Date: Sat May 18 22:37:05 2013
New Revision: 318462
URL: http://svnweb.freebsd.org/changeset/ports/318462

Log:
  Configure correct database table depending on MySQL version in use.
  
  PR:		178657
  Submitted by:	Thomas Mueller <tmueller@sysgo.com>
  Approved by:	Mark Knight <markk@knigma.org> (maintainer)

Modified:
  head/audio/squeezeboxserver/Makefile

Modified: head/audio/squeezeboxserver/Makefile
==============================================================================
--- head/audio/squeezeboxserver/Makefile	Sat May 18 22:33:33 2013	(r318461)
+++ head/audio/squeezeboxserver/Makefile	Sat May 18 22:37:05 2013	(r318462)
@@ -1,13 +1,9 @@
-# Ports collection makefile for:		squeezeboxserver
-# Date created:					Wed Apr 14, 2004
-# Whom:						Brooks Davis <brooks@freebsd.org>
-#
+# Created by: Brooks Davis <brooks@freebsd.org>
 # $FreeBSD$
-#
 
 PORTNAME=	squeezeboxserver
 PORTVERSION=	7.5.4
-PORTREVISION=	6
+PORTREVISION=	7
 CATEGORIES=	audio
 MASTER_SITES=	http://downloads.slimdevices.com/SqueezeboxServer_v${PORTVERSION}/
 DISTNAME=	${PORTNAME}-${PORTVERSION}-noCPAN
@@ -174,12 +170,16 @@ post-patch:
 	    -e 's|%%TMP_SLIMDIR%%|${TMP_SLIMDIR}|g' \
 		${WRKSRC}/scanner.pl \
 		${WRKSRC}/slimserver.pl
-	${REINPLACE_CMD} \
+	@${REINPLACE_CMD} \
 		-e 's/skip-locking/skip-external-locking/' \
 		-e 's/default-character-set/character-set-server/'\
-		-e 's/table_cache/table_open_cache/'\
 		-e 's/default-collation/collation-server/'  ${WRKSRC}/MySQL/my.tt
-	${REINPLACE_CMD} \
+# table_open_cache was known as table_cache in MySQL 5.1.2 and earlier
+	@if [ "$(MYSQL_VER)" != "50" ] ; then \
+		${REINPLACE_CMD} \
+			-e 's/table_cache/table_open_cache/' ${WRKSRC}/MySQL/my.tt ;\
+	fi
+	@${REINPLACE_CMD} \
 		-e 's/TYPE=InnoDB/ENGINE=InnoDB/' ${WRKSRC}/SQL/mysql/schema_*.sql
 
 do-build:
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 6 Stefan Walter freebsd_committer freebsd_triage 2013-05-18 23:37:37 UTC
State Changed
From-To: feedback->closed

Patch committed, thanks!