[Slim-Checkins] r10548 - in /trunk/platforms/fedora: SOURCES/r10464.patch SPECS/slimserver.spec

fletch at svn.slimdevices.com fletch at svn.slimdevices.com
Wed Nov 1 13:22:09 PST 2006


Author: fletch
Date: Wed Nov  1 13:22:08 2006
New Revision: 10548

URL: http://svn.slimdevices.com?rev=10548&view=rev
Log:
* Clean up pre and post scriplets:
  - Don't create the homedir with useradd
  - If slimserver user exists, change the homedir to match the new location
  - Make sure we set a default port if it's not in slimserver.conf
  - Don't try to read the sysconfig file in %postun
  - Remove Cache dir from old style rpm
* Backport errmsg.sys patch until 6.5.1 ships
* Remove reference to PXQA


Added:
    trunk/platforms/fedora/SOURCES/r10464.patch
Modified:
    trunk/platforms/fedora/SPECS/slimserver.spec

Added: trunk/platforms/fedora/SOURCES/r10464.patch
URL: http://svn.slimdevices.com/trunk/platforms/fedora/SOURCES/r10464.patch?rev=10548&view=auto
==============================================================================
--- trunk/platforms/fedora/SOURCES/r10464.patch (added)
+++ trunk/platforms/fedora/SOURCES/r10464.patch Wed Nov  1 13:22:08 2006
@@ -1,0 +1,16 @@
+Index: server/Slim/Utils/MySQLHelper.pm
+===================================================================
+--- server/Slim/Utils/MySQLHelper.pm	(revision 10463)
++++ server/Slim/Utils/MySQLHelper.pm	(revision 10464)
+@@ -139,6 +139,11 @@
+ 		$config{'language'} = '/usr/share/mysql/english';
+ 	}
+ 
++	if (Slim::Utils::OSDetect::isRHELorFC()) {
++
++		$config{'language'} = '/usr/share/mysql/english';
++	}
++
+ 	# If there's no data dir setup - that also means we need to create the system tables.
+ 	if (!-d $config{'datadir'}) {
+ 

Modified: trunk/platforms/fedora/SPECS/slimserver.spec
URL: http://svn.slimdevices.com/trunk/platforms/fedora/SPECS/slimserver.spec?rev=10548&r1=10547&r2=10548&view=diff
==============================================================================
--- trunk/platforms/fedora/SPECS/slimserver.spec (original)
+++ trunk/platforms/fedora/SPECS/slimserver.spec Wed Nov  1 13:22:08 2006
@@ -1,6 +1,5 @@
 # Following was set by makerelease.pl for Slimdevices generic Linux RPM
 %define version 6.5.0
-%define POE_XS_Queue_Array_version 0.003
 
 # Slimdevices generic Linux RPM disables stripping, not sure why
 %define __spec_install_post /usr/lib/rpm/brp-compress
@@ -33,6 +32,7 @@
 Patch1:		http://svn.slimdevices.com/repos/slim/trunk/platforms/fedora/SOURCES/r10325.patch
 # fedora-file-locations Further support new RHEL/FC file locations - Not yet committed to trunk
 Patch2:		http://svn.slimdevices.com/repos/slim/trunk/platforms/fedora/SOURCES/fedora-file-locations.patch
+Patch3:		http://svn.slimdevices.com/repos/slim/trunk/platforms/fedora/SOURCES/r10464.patch
 BuildArch:      noarch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -130,6 +130,7 @@
 # For testing, backport patches needed to support new RHEL/FC file locations
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 rm -rf %buildroot
@@ -282,11 +283,17 @@
 # Add the $SLIMSERVER_USER if there is not one
 if [ `grep -c "^$SLIMSERVER_USER:" /etc/passwd` -eq 0 ]; then
         /usr/sbin/groupadd $SLIMSERVER_USER
-        /usr/sbin/useradd -c "SlimServer" -g $SLIMSERVER_USER -m -d /usr/share/slimserver -s /sbin/nologin $SLIMSERVER_USER
+        /usr/sbin/useradd -c "SlimServer" -g $SLIMSERVER_USER -M -d /usr/share/slimserver -s /sbin/nologin $SLIMSERVER_USER
+else
+	# If the user already exists, use, the new home dir
+	/usr/sbin/usermod -d /usr/share/slimserver $SLIMSERVER_USER
 fi
 
 # Remove the old Favorites plugin
 rm -rf /usr/local/slimserver/Plugins/Favorites
+
+# Remove the old Cache dir
+rm -rf /usr/local/slimserver/Cache
 
 %post
 export SLIMSERVER_USER=slimserver
@@ -313,14 +320,12 @@
 fi
 
 if [ -x /sbin/service ]; then
-
         /sbin/service slimserver restart >/dev/null 2>&1 || :
-
         PORT=`awk '/^httpport/ {print $2}' /etc/slimserver/slimserver.conf`
 fi
 
 # Set a default port if one doesn't exist.
-if [ ! -z "$PORT" -o ! -s /etc/slimserver/slimserver.conf ]; then
+if [ -z "$PORT" ]; then
         PORT=9000
 fi
 
@@ -341,7 +346,6 @@
         fi
 
         if [ -x /sbin/chkconfig ]; then
-
                 /sbin/chkconfig --del slimserver
         fi
 fi
@@ -356,11 +360,6 @@
 
 else
         SLIMSERVER_USER="slimserver"
-        SLIMSERVER_CFG="/etc/slimserver/slimserver.conf"
-
-        if [ -f /etc/sysconfig/slimserver ]; then
-                . /etc/sysconfig/slimserver;
-        fi
 
         userdel $SLIMSERVER_USER 2>/dev/null || :
 



More information about the checkins mailing list