[Debian-l10n-commits] r1932 - in /pootle/trunk/debian: changelog pootle.postinst rules

nekral-guest at users.alioth.debian.org nekral-guest at users.alioth.debian.org
Fri Sep 11 22:20:04 UTC 2009


Author: nekral-guest
Date: Fri Sep 11 22:20:03 2009
New Revision: 1932

URL: http://svn.debian.org/wsvn/?sc=1&rev=1932
Log:
  * debian/rules
    + new setup file
    + Cleanup should be updated
    + The new setup rules install files in the expected locations.
    + There is no Pootle directory anymore.
    + Run dh_pycentral with --noscripts because some code is needed between
      the dh_pycentral and dh_installinit blocks in the postinst script.
  * debian/pootle.postinst: Updated to the new /var/lib layout
  * debian/pootle.postinst: Configure the pootle database on installation and
    try to import users during updates.

Modified:
    pootle/trunk/debian/changelog
    pootle/trunk/debian/pootle.postinst
    pootle/trunk/debian/rules

Modified: pootle/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pootle/trunk/debian/changelog?rev=1932&op=diff
==============================================================================
--- pootle/trunk/debian/changelog (original)
+++ pootle/trunk/debian/changelog Fri Sep 11 22:20:03 2009
@@ -11,8 +11,18 @@
   * debian/pootle.docs: There is no Pootle directory anymore.
   * debian/pootle.init: With the new version, start-stop-daemon needs to do
     the daemonization and creation of the pidfile.
-
- -- Nicolas FRANCOIS (Nekral) <nicolas.francois at centraliens.net>  Sat, 12 Sep 2009 00:05:29 +0200
+  * debian/rules
+    + new setup file
+    + Cleanup should be updated
+    + The new setup rules install files in the expected locations.
+    + There is no Pootle directory anymore.
+    + Run dh_pycentral with --noscripts because some code is needed between
+      the dh_pycentral and dh_installinit blocks in the postinst script.
+  * debian/pootle.postinst: Updated to the new /var/lib layout
+  * debian/pootle.postinst: Configure the pootle database on installation and
+    try to import users during updates.
+
+ -- Nicolas FRANCOIS (Nekral) <nicolas.francois at centraliens.net>  Sat, 12 Sep 2009 00:10:26 +0200
 
 pootle (1.2.1-4) unstable; urgency=low
 

Modified: pootle/trunk/debian/pootle.postinst
URL: http://svn.debian.org/wsvn/pootle/trunk/debian/pootle.postinst?rev=1932&op=diff
==============================================================================
--- pootle/trunk/debian/pootle.postinst (original)
+++ pootle/trunk/debian/pootle.postinst Fri Sep 11 22:20:03 2009
@@ -28,16 +28,15 @@
         mkdir -p /var/lib/pootle
         chmod 755 /var/lib/pootle
         chown $POOTLE_USER:$POOTLE_GROUP /var/lib/pootle
-        chown -R $POOTLE_USER:$POOTLE_GROUP /var/lib/pootle/pootle
-
-        mkdir -p /var/run/pootle
-        chmod 755 /var/run/pootle
-        chown $POOTLE_USER:root /var/run/pootle
+        chmod -R 755 /var/lib/pootle/po
+        chown -R $POOTLE_USER:$POOTLE_GROUP /var/lib/pootle/po
+        chmod -R 755 /var/lib/pootle/dbs
+        chown -R $POOTLE_USER:$POOTLE_GROUP /var/lib/pootle/dbs
 
         # Ensure the configuration files will be only readable by 'pootle'
         chmod 770 /etc/pootle
-        chmod 660 /etc/pootle/pootle.prefs
-        chmod 660 /etc/pootle/users.prefs
+#        chmod 660 /etc/pootle/pootle.prefs
+#        chmod 660 /etc/pootle/users.prefs
         chown -R $POOTLE_USER:root /etc/pootle
         ;;
 
@@ -50,6 +49,32 @@
         ;;
 esac
 
+rm -f /var/lib/pycentral/pootle.pkgremove
+if which pycentral >/dev/null 2>&1; then
+	pycentral pkginstall pootle
+	if grep -qs '^pootle$' /var/lib/pycentral/delayed-pkgs; then
+		sed -i '/^pootle$/d' /var/lib/pycentral/delayed-pkgs
+	fi
+fi
+
+case "$1" in
+    configure)
+        if [ -z "$2" ]; then
+            cd /var/lib/pootle
+            sudo -u pootle django-admin syncdb --settings pootle.settings --noinput
+            sudo -u pootle django-admin initdb --settings pootle.settings
+            sudo -u pootle django-admin refresh_stats --settings pootle.settings
+# createsuperuser ? => use debconf for this
+        elif dpkg --compare-versions "$2" lt 1.3.0~beta3-1; then
+            sudo -u pootle django-admin syncdb --settings pootle.settings --noinput
+            sudo -u pootle django-admin initdb --settings pootle.settings
+            sudo -u pootle python /usr/share/pyshared/pootle/tools/import_old_prefs.py \
+                /etc/pootle/pootle.prefs \
+                /etc/pootle/users.prefs
+            sudo -u pootle django-admin refresh_stats --settings pootle.settings
+        fi
+        ;;
+esac
 
 # dh_installdeb will replace this with shell code automatically
 # generated by other debhelper scripts.

Modified: pootle/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pootle/trunk/debian/rules?rev=1932&op=diff
==============================================================================
--- pootle/trunk/debian/rules (original)
+++ pootle/trunk/debian/rules Fri Sep 11 22:20:03 2009
@@ -9,7 +9,7 @@
 build: build-stamp
 build-stamp: patch
 	dh_testdir
-	python pootlesetup.py build
+	python setup.py build
 	touch build-stamp
 
 clean: unpatch
@@ -26,11 +26,11 @@
 	dh_testroot
 	dh_clean -k
 	dh_installdirs
-	python pootlesetup.py install --root=$(d)
+	python setup.py install --root=$(d)
 	# Pootle is a WEB server, I prefer to install it in sbin
 	mv $(d)/usr/bin/PootleServer $(d)/usr/sbin
 	# Remove the tests and unused files
-	rm -f $(Pootle)/test_client.py \
+#	rm -f $(Pootle)/test_client.py \
 	      $(Pootle)/test_create.py \
 	      $(Pootle)/test_indexing.py \
 	      $(Pootle)/test_init.py \
@@ -44,31 +44,31 @@
 	      $(Pootle)/test_cmdlineserver.py
 	# These files will be installed by dh_installdocs or
 	# dh_installchangelogs
-	rm -f $(Pootle)/ChangeLog \
+#	rm -f $(Pootle)/ChangeLog \
 	      $(Pootle)/COPYING \
-	      $(Pootle)/LICENSE \
+	      $(Pootle)/CREDITS \
 	      $(Pootle)/README
 	# Move the non-python parts to /usr/share/pootle/
-	mv $(Pootle)/html \
+#	mv $(Pootle)/html \
 	   $(d)/usr/share/pootle/html
 	# remove the exec mode on these files
-	find $(d)/usr/share/pootle -type f -exec chmod a-x {} \;
+#	find $(d)/usr/share/pootle -type f -exec chmod a-x {} \;
 	# Move the po directory to /var/lib/pootle
-	mv $(Pootle)/po/pootle \
+#	mv $(Pootle)/po/pootle \
 	   $(d)/var/lib/pootle/pootle
-	rmdir $(Pootle)/po
+#	rmdir $(Pootle)/po
 	dh_lintian
 
 # Build architecture-independent files here.
 binary-indep: build install
 	dh_testdir
 	dh_testroot
-	dh_installchangelogs Pootle/ChangeLog
+	dh_installchangelogs ChangeLog
 	dh_installdocs
 	dh_installexamples
 	dh_installman
 	dh_install
-	dh_pycentral
+	dh_pycentral --noscripts
 	dh_installinit
 	dh_compress
 	dh_fixperms




More information about the Debian-l10n-commits mailing list