[DRE-commits] [SCM] samizdat.git branch, master, updated. upstream/0.6.2.20110927-10-g5f72716

Dmitry Borodaenko angdraug at debian.org
Mon Dec 26 01:04:43 UTC 2011


The following commit has been merged in the master branch:
commit 5f72716df8afb2632a4878959201ea0389ef77a9
Author: Dmitry Borodaenko <angdraug at debian.org>
Date:   Sun Dec 25 20:34:34 2011 +0300

    new upstream snapshot 2011-12-25

diff --git a/debian/README.Debian b/debian/README.Debian
index 070887b..b47c121 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -6,64 +6,44 @@ Synopsis
 
 1) Install all required and recommended packages:
 
-apt-get install samizdat postgresql-8.3 apache2-mpm-prefork \
-  libapache2-mod-ruby libapache-ruby1.8 libgettext-ruby1.8 \
-  libalgorithm-diff-ruby1.8 libredcloth-ruby1.8
+apt-get install samizdat ruby-fast-gettext ruby-libalgorithm-diff \
+  ruby-redcloth libtzinfo-ruby1.9.1 postgresql-9.1 nginx thin
 
-2) Configure Apache:
+2) Configure Thin:
 
-Copy example configuration file:
-
-gzip -dc /usr/share/samizdat/doc/examples/apache.conf.gz > \
-  /etc/apache2/sites-available/samizdat
+Create separate user for your web application:
 
-Enable it:
-
-ln -s /etc/apache2/sites-available/samizdat \
-  /etc/apache2/sites-enabled/samizdat
+adduser --system samizdat --group --no-create-home
 
 Create required directories:
 
-mkdir -p /var/www/samizdat /var/www/samizdat/content \
-  /var/log/apache2/samizdat
-chown www-data:www-data /var/www/samizdat/content
+install -o samizdat -g samizdat -d \
+  /var/www/samizdat/content /run/samizdat
+mkdir /var/log/samizdat
 
-3) Create PostgreSQL database and configure IDENT access for CGI
-scripts:
+Copy example configuration file:
 
-/usr/bin/samizdat-create-database samizdat pgsql
-echo 'samizdat www-data samizdat' \
-  >> /etc/postgresql/8.3/main/pg_ident.conf
+cp /usr/share/samizdat/doc/examples/samizdat-thin.yaml /etc/thin
 
-pg_hba.conf:
+2) Configure Nginx:
 
-  # Database administrative login by UNIX sockets
-  local   all         postgres                          ident sameuser
+Copy example configuration files:
 
-  # TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
-  local   samizdat    all                               ident samizdat
+cp -r /usr/share/samizdat/doc/examples/nginx/* /etc/nginx/
 
-  # "local" is for Unix domain socket connections only
-  local   all         all                               ident sameuser
-  # IPv4 local connections:
-  host    all         all         127.0.0.1/32          md5
-  # IPv6 local connections:
-  host    all         all         ::1/128               md5
+Enable the virtual host:
 
-4) Restart Apache and Samizdat and look at http://localhost/samizdat/
-with a web browser. To test a remote server, you will have to modify
-default Apache and Samizdat configuration files first.
+ln -s /etc/nginx/sites-available/samizdat \
+  /etc/nginx/sites-enabled/samizdat
 
+If you want to access your Samizdat site by something other than
+'samizdat' hostname, edit the server_name line in the virtual host
+config. If you want run multiple Samizdat sites on the same server,
+that's where you make all the other site-specific changes (document
+root, log files, certificates etc.)
 
-Explanations
-------------
+3) Create PostgreSQL database:
 
-(1) If you want full Samizdat functionality, install all Ruby libraries
-that samizdat package recommends. Samizdat works with both mod_ruby and
-FastCGI, mod_ruby generally gives better performance and memory usage,
-while FastCGI would allow you to isolate Ruby interpreter from Apache
-process if you need that.
+/usr/bin/samizdat-create-database samizdat
 
-(2) Copy example/apache.conf to a place where your Apache can find it.
-If you change site name from 'samizdat' to something else, go through
-the config and change it in all appropriate places.
+4) Restart SynCache, Thin, and Nginx and load your site in the browser.
diff --git a/debian/changelog b/debian/changelog
index 36a222e..8038e39 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,20 @@
+samizdat (0.6.2.20111225-1) unstable; urgency=low
+
+  * New upstream snapshot 2011-12-25 "Christmas for Moscow":
+    - migrated from cgi.rb to Rack (this obsoleted samizdatd Mongrel server)
+    - migrated to Sequel and Nokogiri (requires latest Graffiti and Whitewash)
+    - compatibility fixes for Ruby 1.9.3.
+  * Dependencies rearranged again:
+    - Depends on ruby-rack
+    - Recommends ruby-fast-gettext over libgettext-ruby
+    - drop Suggests mongrel, mod-ruby, and fcgi; add thin.
+  * README.Debian updated.
+  * init, default, postinst, and postrm for samizdatd are dropped; if you
+    installed 0.6.2.20110927-1 you'll need to manually take care of the
+    directories it created in /var/run and /var/log.
+
+ -- Dmitry Borodaenko <angdraug at debian.org>  Sun, 25 Dec 2011 19:25:05 +0300
+
 samizdat (0.6.2.20110927-1) unstable; urgency=low
 
   * New upstream snapshot 2011-09-27:
diff --git a/debian/control b/debian/control
index 4df073f..feafc9c 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers at lists.alioth.debian.org>
 Uploaders: Dmitry Borodaenko <angdraug at debian.org>
 DM-Upload-Allowed: yes
-Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.2.8~), gettext, ruby-graffiti, ruby-whitewash, ruby-rmagick, ruby-magic, libgettext-ruby1.8, libgettext-ruby1.9.1, libtzinfo-ruby1.8, libtzinfo-ruby1.9.1
+Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.2.8~), gettext, ruby-rack, ruby-graffiti, ruby-whitewash, ruby-rmagick, ruby-magic, ruby-fast-gettext, libtzinfo-ruby1.8, libtzinfo-ruby1.9.1
 Standards-Version: 3.9.2
 Vcs-Git: git://github.com/angdraug/samizdat.git
 Vcs-Browser: https://github.com/angdraug/samizdat
@@ -14,9 +14,9 @@ XS-Ruby-Versions: all
 Package: samizdat
 Architecture: all
 XB-Ruby-Versions: ${ruby:Versions}
-Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter, ruby-graffiti, ruby-whitewash, ruby-rmagick, ruby-magic
-Recommends: libgettext-ruby1.8 | libgettext-ruby1.9.1, ruby-algorithm-diff, ruby-redcloth, libtzinfo-ruby1.8 | libtzinfo-ruby1.9.1
-Suggests: nginx | httpd, postgresql, mongrel | libapache2-mod-ruby | libapache2-mod-fcgid, libfcgi-ruby1.8
+Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter, ruby-rack, ruby-graffiti, ruby-whitewash, ruby-rmagick, ruby-magic
+Recommends: ruby-fast-gettext | libgettext-ruby1.8 | libgettext-ruby1.9.1, ruby-algorithm-diff, ruby-redcloth, libtzinfo-ruby1.8 | libtzinfo-ruby1.9.1
+Suggests: postgresql, nginx | httpd, thin
 Replaces: libsamizdat-ruby (<< 0.6.2.20110917-1~), libsamizdat-ruby1.8 (<< 0.6.2.20110917-1~)
 Breaks: libsamizdat-ruby (<< 0.6.2.20110917-1~), libsamizdat-ruby1.8 (<< 0.6.2.20110917-1~)
 Provides: libsamizdat-ruby, libsamizdat-ruby1.8
diff --git a/debian/ruby-tests.rb b/debian/ruby-tests.rb
deleted file mode 100644
index eac5ce6..0000000
--- a/debian/ruby-tests.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# FIXME
-# there's a spec/ or a test/ directory in the upstream source, but
-# no test suite was defined in the Gem specification. It would be
-# a good idea to define it here so the package gets tested at build time.
-# Examples:
-# $: << 'lib' << '.'
-# Dir['{spec,test}/**/*.rb'].each { |f| require f }
-#
-# require 'test/ts_foo.rb'
-#
-# require 'rbconfig'
-# ruby = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name'])
-# exec("#{ruby} -I. test/runtests.rb")
diff --git a/debian/rules b/debian/rules
index d9c8ee1..6339e27 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,7 +16,6 @@
 
 override_dh_install:
 	dh_install
-	chmod 755 debian/samizdat/usr/share/samizdat/cgi-bin/*
 	mv debian/samizdat/etc/samizdat/sites/config.yaml debian/samizdat/etc/samizdat/sites/samizdat.yaml
 	for lang in be de en eo es fr ja pl ru uk; do \
 		mkdir -p debian/samizdat/usr/share/locale/$$lang/LC_MESSAGES; \
@@ -24,4 +23,4 @@ override_dh_install:
 	done
 
 override_dh_compress:
-	dh_compress -X.dia
+	dh_compress -X.dia -X.yaml -Xnginx
diff --git a/debian/samizdat.NEWS b/debian/samizdat.NEWS
index 79e4390..553cf29 100644
--- a/debian/samizdat.NEWS
+++ b/debian/samizdat.NEWS
@@ -1,3 +1,14 @@
+samizdat (0.6.2.20111225-1) unstable; urgency=low
+
+  DBI was replaced with Sequel, update the database section of your site
+  configurations for the new format.
+
+  Mongrel application server introduced in the previous update is now
+  dropped, see README.Debian on how to replace it with Thin. Check if
+  you need to clean out the directories left behind by samizdatd.
+
+ -- Dmitry Borodaenko <angdraug at debian.org>  Sun, 25 Dec 2011 19:25:05 +0300
+
 samizdat (0.6.2.20110927-1) unstable; urgency=low
 
   As of this version, Sanitize, Cache, and Storage libraries were split
diff --git a/debian/samizdat.default b/debian/samizdat.default
deleted file mode 100644
index eed1831..0000000
--- a/debian/samizdat.default
+++ /dev/null
@@ -1,13 +0,0 @@
-# /etc/default/samizdat
-# Dmitry Borodaenko
-
-# Change to "1" to enable starting samizdatd on boot
-ENABLED=0
-
-# Hostname or IP address to bind to. Change this only if your front-end
-# HTTP server is running on a different host.
-#HOST=localhost
-
-# Comma-separated list of ports to bind to, one process per port. For
-# optimal performance, start at least one process per CPU core.
-#PORTS=3000
diff --git a/debian/samizdat.docs b/debian/samizdat.docs
index 508c273..e751b8b 100644
--- a/debian/samizdat.docs
+++ b/debian/samizdat.docs
@@ -7,3 +7,4 @@ ChangeLog.mtn
 doc/*.txt
 doc/diagrams
 doc/migration
+doc/examples
diff --git a/debian/samizdat.init b/debian/samizdat.init
deleted file mode 100755
index a7a4f92..0000000
--- a/debian/samizdat.init
+++ /dev/null
@@ -1,100 +0,0 @@
-#! /bin/sh
-
-### BEGIN INIT INFO
-# Provides:          samizdat
-# Required-Start:    $remote_fs $syslog
-# Required-Stop:     $remote_fs $syslog
-# Should-Start:      syncache postgresql
-# Should-Stop:       syncache postgresql
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# X-Start-Before:
-# X-Stop-After:
-# Short-Description: Samizdat Mongrel server
-# Description: Samizdat application server based on Mongrel.
-### END INIT INFO
-
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
-CHUID=www-data
-DAEMON=/usr/bin/samizdatd
-NAME=samizdatd
-SNAME=samizdat
-DESC="Samizdat Mongrel server"
-PIDFILE="/var/run/$SNAME/$NAME.pid"
-ERROR_LOG="/var/log/$SNAME/$NAME.log"
-PNAME=$NAME
-
-# use dummy lsb init-functions if lsb-base is not installed
-if [ -r /lib/lsb/init-functions ]; then
-    . /lib/lsb/init-functions
-else
-    log_begin_msg() { echo -n "$@"; }
-    log_progress_msg() { echo -n " $@"; }
-    log_success_msg() { echo "$@"; }
-    log_failure_msg() { echo "$@"; }
-    log_warning_msg() { echo "$@"; }
-    log_end_msg() { if [ "$1" = "0" ]; then echo "."; else echo " failed!"; fi }
-fi
-
-# Apparently people have trouble if this isn't explicitly set...
-export TMPDIR=/tmp
-
-# Defaults - don't touch, edit /etc/default/samizdat
-ENABLED=0
-OPTIONS="--user $CHUID --pidfile $PIDFILE --error-log $ERROR_LOG"
-NICE=
-
-test -f "/etc/default/$SNAME" && . /etc/default/"$SNAME"
-
-if [ "$ENABLED" = "0" ]; then
-    log_success_msg "$DESC: disabled, see /etc/default/$SNAME"
-    exit 0
-fi
-
-test -f $DAEMON || exit 0
-
-[ -n "$HOST" ] && OPTIONS="$OPTIONS --host $HOST"
-[ -n "$PORTS" ] && OPTIONS="$OPTIONS --ports $PORTS"
-
-set -e
-
-case "$1" in
-  start)
-	log_begin_msg "Starting $DESC:"
-	log_progress_msg $NAME
-	start-stop-daemon --start --pidfile $PIDFILE --name $PNAME \
-	    $NICE --oknodo --startas $DAEMON -- $OPTIONS
-	log_end_msg $?
-	;;
-
-  stop)
-	log_begin_msg "Stopping $DESC:"
-	log_progress_msg "$NAME"
-	start-stop-daemon --stop --pidfile $PIDFILE --oknodo
-	log_end_msg $?
-	;;
-
-  reload|force-reload)
-	log_begin_msg "Reloading $DESC:"
-	log_progress_msg $NAME
-	start-stop-daemon --stop --pidfile $PIDFILE --signal HUP
-	log_end_msg $?
-	;;
-
-  restart)
-	log_begin_msg "Restarting $DESC:"
-	log_progress_msg $NAME
-	start-stop-daemon --stop --pidfile $PIDFILE --oknodo
-	start-stop-daemon --start --pidfile $PIDFILE --name $PNAME \
-	    $NICE --oknodo --startas $DAEMON -- $OPTIONS
-	log_end_msg $?
-	;;
-
-  *)
-	N=/etc/init.d/$SNAME
-	log_failure_msg "Usage: $N {start|stop|restart|reload|force-reload}" >&2
-	exit 1
-	;;
-esac
-
-exit 0
diff --git a/debian/samizdat.postinst b/debian/samizdat.postinst
deleted file mode 100644
index 603176b..0000000
--- a/debian/samizdat.postinst
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-set -e
-
-PACKAGE="samizdat"
-PIDDIR="/var/run/$PACKAGE"
-LOGDIR="/var/log/$PACKAGE"
-
-case "$1" in
-	configure)
-	[ -d "$PIDDIR" ] || install -o www-data -g www-data -d "$PIDDIR"
-	[ -d "$LOGDIR" ] || install -d "$LOGDIR"
-	;;
-
-	failed-upgrade|abort-upgrade|abort-remove|abort-deconfigure|in-favour|removing)
-	;;
-
-	*)
-	echo "postinst called with unknown argument \`$1'" >&2;
-	exit 1;
-	;;
-esac
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/samizdat.postrm b/debian/samizdat.postrm
deleted file mode 100644
index b3b636c..0000000
--- a/debian/samizdat.postrm
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-set -e
-
-PACKAGE="samizdat"
-PIDDIR="/var/run/$PACKAGE"
-
-#DEBHELPER#
-
-case "$1" in
-	purge)
-	rm -rf "$PIDDIR"
-	;;
-
-	remove|upgrade|disappearfailed-install|abort-install|abort-upgrade|failed-upgrade)
-	;;
-
-	*)
-	echo "postrm called with unknown argument \`$1'" >&2;
-	;;
-esac
-
-exit 0

-- 
samizdat.git



More information about the Pkg-ruby-extras-commits mailing list