[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: no login to lwat: Smarty error...



Holger Levsen skrev:
> Hi John,
> 
> On Montag, 20. April 2009, Frank Weißer wrote:
>> frank@tjener:~$ sudo cat /etc/lwat/config.php | grep smarty_
>> $smarty_templ = "" ;
>> $smarty_compile = "/var/tmp" ;
> 
> could you maybe+please come up with a patch for 
> http://ftp.skolelinux.org/skolelinux/pool/local/l/lwat/lwat_0.17-1.1%7Eterra%2B1.dsc 
> fixing this issue?
> 
> 
> regards,
> 	Holger

This problems seems to have been fixed by Patrick Winnertz in lwat svn
revision 804.
I have attached a diff which contains the changes in r804 as well as
r803, which fixes the wrong path to config.md5sum in the comments of (a
newly created) config.php.

Here are the debian/changelog entries:

Index: debian/changelog
===================================================================
--- debian/changelog	(revisjon 802)
+++ debian/changelog	(revisjon 803)
@@ -1,3 +1,10 @@
+lwat (0.17-2) unstable; urgency=low
+
+  * Fix a path in a comment in the config.php file.
+  * Raise two questions in the debconf priority.
+
+ -- Patrick Winnertz <winnie@debian.org>  Wed, 16 Jan 2008 09:57:43 +0100
+
 lwat (0.17-1) unstable; urgency=low

   [ Patrick Winnertz ]

Index: debian/changelog
===================================================================
--- debian/changelog	(revisjon 803)
+++ debian/changelog	(revisjon 804)
@@ -2,6 +2,8 @@

   * Fix a path in a comment in the config.php file.
   * Raise two questions in the debconf priority.
+  * Added a new debconf question in order to correct smarty_templ|compile
+    paths. This could be broken if a version <0.16 was previously
installed.

  -- Patrick Winnertz <winnie@debian.org>  Wed, 16 Jan 2008 09:57:43 +0100

Index: debian/dummy-config.php
===================================================================
--- debian/dummy-config.php	(revisjon 802)
+++ debian/dummy-config.php	(revisjon 803)
@@ -2,7 +2,7 @@
 # This file is generated by the postinst script of lwat
 # If you change anything in this file but wants dpkg to install 
 # the new config.php on its own, please do a:
-#   md5sum /etc/lwat/config.php > /var/cache/lwat/config.md5sum
+#   md5sum /etc/lwat/config.php > /usr/share/lwat/config.md5sum
 # If you won't do that, the postinst script will create a config.php.dpkg-dist 
 # with the original settings.
 
Index: debian/config
===================================================================
--- debian/config	(revisjon 802)
+++ debian/config	(revisjon 803)
@@ -7,10 +7,10 @@
 db_input high lwat/domain || true
 db_go
 
-db_input medium shared/ldapns/ldap-server || true
+db_input high shared/ldapns/ldap-server || true
 db_go
 
-db_input medium shared/ldapns/base-dn || true
+db_input high shared/ldapns/base-dn || true
 db_go
 
 db_input medium lwat/homedirlocation || true
Index: debian/postinst
===================================================================
--- debian/postinst	(revisjon 803)
+++ debian/postinst	(revisjon 804)
@@ -91,7 +91,17 @@
 db_get lwat/allowPwSet
 if [ ! -z "$RET" ]; then
        sed -e "s/^\([[:space:]]*\)\$allowPwSet[[:space:]]*=[[:space:]]*ALLOWPWSET/\1\$allowPwSet = $RET ;/" -i $config
-fi 
+fi
+#Fix in order to correct settings by previous version of lwat which are now completly incompatible.
+db_get lwat/incompatiblesettings
+if [ ! -z "$RET" ] && [ "$RET" = "true" ]; then
+       sed -e "s/^\([[:space:]]*\)\$smarty_templ[[:space:]]*=.*/\1\$smarty_templ= \"/usr/share/lwat/templates\" ;/" -i /etc/lwat/config.php
+       sed -e "s/^\([[:space:]]*\)\$smarty_compile[[:space:]]*=.*/\1\$smarty_compile= \"/var/spool/lwat\" ;/" -i /etc/lwat/config.php
+       if [ -f "/etc/lwat/config.php.dpkg-dist" ]; then
+                sed -e "s/^\([[:space:]]*\)\$smarty_templ[[:space:]]*=.*/\1\$smarty_templ= \"/usr/share/lwat/templates\" ;/" -i /etc/lwat/config.php.dpkg-dist
+                sed -e "s/^\([[:space:]]*\)\$smarty_compile[[:space:]]*=.*/\1\$smarty_compile= \"/var/spool/lwat\" ;/" -i /etc/lwat/config.php.dpkg-dist
+       fi
+fi
 
 if [ "$config" = "/etc/lwat/config.php" ]; then
         md5sum /etc/lwat/config.php > /usr/share/lwat/config.md5sum;
Index: debian/config
===================================================================
--- debian/config	(revisjon 803)
+++ debian/config	(revisjon 804)
@@ -49,3 +49,5 @@
 db_input high lwat/templates || true
 db_go
 
+db_input high lwat/incompatiblesettings || true
+db_go
Index: debian/templates
===================================================================
--- debian/templates	(revisjon 803)
+++ debian/templates	(revisjon 804)
@@ -121,3 +121,11 @@
  Lwat uses templates for creating user accounts, to make sure that
  home directories are placed in the right locations, users
  are member of the correct groups, etc.
+
+Template: lwat/incompatiblesettings
+Type boolean
+Default: true
+_Description: Rewrite smarty template and compile dir?
+ lwat 0.17 is incompatible with some values set in older configuration files. 
+ So for a correct usage of lwat you'll have to fix these settings. The package will
+ fix this for you if you enter yes here.

Reply to: