diff -Nru couchdb-1.2.0/debian/changelog couchdb-1.2.0/debian/changelog --- couchdb-1.2.0/debian/changelog 2012-06-29 12:31:16.000000000 -0600 +++ couchdb-1.2.0/debian/changelog 2012-07-18 09:25:05.000000000 -0600 @@ -1,3 +1,29 @@ +couchdb (1.2.0-1ubuntu1) quantal; urgency=low + + * Started with branch of 1.2.0-1 from Debian unstable + * Split into `couchdb-bin` and `couchdb` binary packages as found in Ubuntu, + with goal of keeping delta between Debian and Ubuntu as low as possible + * Changes from how the split is done in Ubuntu: + - /etc/couchdb/default.ini and /etc/couchdb/default.d are delivered in the + `couchdb-bin` package and are owned by root + - /etc/couchdb/local.ini and /etc/couchdb/local.d are delivered in the + `couchdb` package and are owned by the "couchdb" user + - The `couchdb-bin` package does not create nor require the "couchdb" user + (this is now done in the `couchdb` package instead) + * Changes from Debian: + - After couchdb.postinst runs, only /etc/couchdb/local.ini and + /etc/couchdb/local.d are owned by the "couchdb" user, while the rest of + /etc/couchdb remains owned by root + - Patched /etc/init.d/couchdb so /var/run/couchdb is owned by the "couchdb" + user, needed for the init.d script to actually work (var-run.patch) + - Added a short sleep delay in couchdb.postrm so couchdb is more likely to + have actually terminated by the time we `deluser couchdb`, which is needed + for `sudo apt-get purge couchdb` to work when couchdb is running + - Added couchdb-bin.postinst to fix permissions in /etc/couchdb after + upgrading from the couchdb-bin 1.0.1 package + + -- Jason Gerard DeRose Mon, 09 Jul 2012 01:30:32 +0000 + couchdb (1.2.0-1) unstable; urgency=low * New major upstream release (closes: #672141). diff -Nru couchdb-1.2.0/debian/control couchdb-1.2.0/debian/control --- couchdb-1.2.0/debian/control 2012-06-29 12:35:46.000000000 -0600 +++ couchdb-1.2.0/debian/control 2012-07-16 17:16:52.000000000 -0600 @@ -17,10 +17,9 @@ libreadline-dev Homepage: http://couchdb.apache.org/ -Package: couchdb +Package: couchdb-bin Architecture: any -Depends: adduser, - erlang-base-hipe | erlang-base | ${erlang-abi:Depends}, +Depends: erlang-base-hipe | erlang-base | ${erlang-abi:Depends}, libjs-jquery (>= 1.4.2), libjs-jquery-form (>= 2.36), lsb-base, @@ -43,3 +42,23 @@ that provides means to make HTTP requests. There are a multitude of third-party client libraries that make this even easier for a variety of programming languages and environments. + +Package: couchdb +Architecture: all +Depends: couchdb-bin (>= ${binary:Version}), ${misc:Depends}, adduser +Replaces: couchdb-bin (<= 1.0.1-0ubuntu18) +Description: RESTful document oriented database (system-wide instance) + Apache CouchDB is a distributed, fault-tolerant and schema-free + document-oriented database accessible via a RESTful HTTP/JSON API. Among other + features, it provides robust, incremental replication with bi-directional + conflict detection and resolution, and is queryable and indexable using a + table-oriented view engine with JavaScript acting as the default view + definition language. + . + CouchDB is written in Erlang, but can be easily accessed from any environment + that provides means to make HTTP requests. There are a multitude of third-party + client libraries that make this even easier for a variety of programming + languages and environments. + . + This package adds the /etc/init.d/couchdb script and other items needed for a + system-wide CouchDB instance that is started at boot. diff -Nru couchdb-1.2.0/debian/couchdb-bin.install couchdb-1.2.0/debian/couchdb-bin.install --- couchdb-1.2.0/debian/couchdb-bin.install 1969-12-31 17:00:00.000000000 -0700 +++ couchdb-1.2.0/debian/couchdb-bin.install 2012-07-09 03:27:09.000000000 -0600 @@ -0,0 +1,3 @@ +debian/tmp/usr +debian/tmp/etc/couchdb/default.ini +debian/tmp/etc/couchdb/default.d diff -Nru couchdb-1.2.0/debian/couchdb-bin.postinst couchdb-1.2.0/debian/couchdb-bin.postinst --- couchdb-1.2.0/debian/couchdb-bin.postinst 1969-12-31 17:00:00.000000000 -0700 +++ couchdb-1.2.0/debian/couchdb-bin.postinst 2012-07-18 08:32:57.000000000 -0600 @@ -0,0 +1,15 @@ +#!/bin/sh -e + +case $1 in + configure) + # Hack to make the upgrade from the 1.0.1 Ubuntu package more correct: + chown root:root /etc/couchdb + chown root:root /etc/couchdb/default.ini + chown -R root:root /etc/couchdb/default.d + chmod 755 /etc/couchdb + chmod 644 /etc/couchdb/default.ini + chmod 755 /etc/couchdb/default.d + ;; +esac + +#DEBHELPER# diff -Nru couchdb-1.2.0/debian/couchdb.install couchdb-1.2.0/debian/couchdb.install --- couchdb-1.2.0/debian/couchdb.install 1969-12-31 17:00:00.000000000 -0700 +++ couchdb-1.2.0/debian/couchdb.install 2012-07-09 03:26:50.000000000 -0600 @@ -0,0 +1,8 @@ +debian/tmp/etc/init.d +debian/tmp/etc/couchdb/local.ini +debian/tmp/etc/couchdb/local.d +debian/tmp/etc/default +debian/tmp/etc/logrotate.d +debian/tmp/var/lib +debian/tmp/var/log + diff -Nru couchdb-1.2.0/debian/couchdb.postinst couchdb-1.2.0/debian/couchdb.postinst --- couchdb-1.2.0/debian/couchdb.postinst 1969-12-31 17:00:00.000000000 -0700 +++ couchdb-1.2.0/debian/couchdb.postinst 2012-07-15 02:40:49.000000000 -0600 @@ -0,0 +1,31 @@ +#!/bin/sh -e + +# Copyright 2009, Noah Slater + +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice and this +# notice are preserved. + +case $1 in + configure) + if ! getent passwd couchdb > /dev/null; then + adduser --system --quiet \ + --home /var/lib/couchdb --no-create-home \ + --shell /bin/bash --group --gecos "CouchDB Administrator" couchdb + fi + if test "`id -u couchdb`" -eq 0; then + echo "The couchdb administrative user must not be root." >&2 + false + fi + if test "`id -g couchdb`" -eq 0; then + echo "The couchdb administrative group must not be root." >&2 + false + fi + chown couchdb:couchdb /etc/couchdb/local.ini + chown -R couchdb:couchdb /etc/couchdb/local.d + chown -R couchdb:couchdb /var/lib/couchdb + chown -R couchdb:couchdb /var/log/couchdb + ;; +esac + +#DEBHELPER# diff -Nru couchdb-1.2.0/debian/couchdb.postrm couchdb-1.2.0/debian/couchdb.postrm --- couchdb-1.2.0/debian/couchdb.postrm 1969-12-31 17:00:00.000000000 -0700 +++ couchdb-1.2.0/debian/couchdb.postrm 2012-07-18 09:25:20.000000000 -0600 @@ -0,0 +1,38 @@ +#!/bin/sh -e + +# Copyright 2009, Noah Slater + +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice and this +# notice are preserved. + +VERSION=%VERSION% + +case $1 in + purge) + sleep 3 # Time for couchdb to actually terminate, so we can deluser + if test -f "/etc/couchdb/local.ini"; then + rm "/etc/couchdb/local.ini" + fi + if test -d "/etc/couchdb/local.d"; then + rm -r -f "/etc/couchdb/local.d" + fi + if test -d "/var/lib/couchdb"; then + rm -r -f "/var/lib/couchdb" + fi + if test -d "/var/log/couchdb"; then + rm -r -f "/var/log/couchdb" + fi + if test -d "/var/run/couchdb"; then + rm -r -f "/var/run/couchdb" + fi + if getent passwd couchdb > /dev/null && which deluser > /dev/null; then + deluser couchdb + fi + if getent group couchdb > /dev/null && which delgroup > /dev/null; then + delgroup couchdb + fi + ;; +esac + +#DEBHELPER# diff -Nru couchdb-1.2.0/debian/patches/series couchdb-1.2.0/debian/patches/series --- couchdb-1.2.0/debian/patches/series 2011-11-27 01:19:17.000000000 -0700 +++ couchdb-1.2.0/debian/patches/series 2012-07-15 02:11:49.000000000 -0600 @@ -1 +1,2 @@ force-reload.patch +var-run.patch diff -Nru couchdb-1.2.0/debian/patches/var-run.patch couchdb-1.2.0/debian/patches/var-run.patch --- couchdb-1.2.0/debian/patches/var-run.patch 1969-12-31 17:00:00.000000000 -0700 +++ couchdb-1.2.0/debian/patches/var-run.patch 2012-07-15 02:15:54.000000000 -0600 @@ -0,0 +1,12 @@ +Index: 1.2.0-low-delta/etc/init/couchdb.tpl.in +=================================================================== +--- 1.2.0-low-delta.orig/etc/init/couchdb.tpl.in 2012-07-15 02:08:49.420787000 -0600 ++++ 1.2.0-low-delta/etc/init/couchdb.tpl.in 2012-07-15 02:15:24.587451507 -0600 +@@ -84,6 +84,7 @@ + # Start Apache CouchDB as a background process. + + mkdir -p "$RUN_DIR" ++ chown -R couchdb:couchdb "$RUN_DIR" + command="$COUCHDB -b" + if test -n "$COUCHDB_STDOUT_FILE"; then + command="$command -o $COUCHDB_STDOUT_FILE" diff -Nru couchdb-1.2.0/debian/postinst couchdb-1.2.0/debian/postinst --- couchdb-1.2.0/debian/postinst 2011-09-25 08:33:05.000000000 -0600 +++ couchdb-1.2.0/debian/postinst 1969-12-31 17:00:00.000000000 -0700 @@ -1,30 +0,0 @@ -#!/bin/sh -e - -# Copyright 2009, Noah Slater - -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice and this -# notice are preserved. - -case $1 in - configure) - if ! getent passwd couchdb > /dev/null; then - adduser --system --quiet \ - --home /var/lib/couchdb --no-create-home \ - --shell /bin/bash --group --gecos "CouchDB Administrator" couchdb - fi - if test "`id -u couchdb`" -eq 0; then - echo "The couchdb administrative user must not be root." >&2 - false - fi - if test "`id -g couchdb`" -eq 0; then - echo "The couchdb administrative group must not be root." >&2 - false - fi - chown -R couchdb:couchdb /etc/couchdb - chown -R couchdb:couchdb /var/lib/couchdb - chown -R couchdb:couchdb /var/log/couchdb - ;; -esac - -#DEBHELPER# diff -Nru couchdb-1.2.0/debian/postrm couchdb-1.2.0/debian/postrm --- couchdb-1.2.0/debian/postrm 2012-06-29 12:56:43.000000000 -0600 +++ couchdb-1.2.0/debian/postrm 1969-12-31 17:00:00.000000000 -0700 @@ -1,34 +0,0 @@ -#!/bin/sh -e - -# Copyright 2009, Noah Slater - -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice and this -# notice are preserved. - -VERSION=%VERSION% - -case $1 in - purge) - if test -d "/etc/couchdb"; then - rm -r -f "/etc/couchdb" - fi - if test -d "/var/lib/couchdb"; then - rm -r -f "/var/lib/couchdb" - fi - if test -d "/var/log/couchdb"; then - rm -r -f "/var/log/couchdb" - fi - if test -d "/var/run/couchdb"; then - rm -r -f "/var/run/couchdb" - fi - if getent passwd couchdb > /dev/null && which deluser > /dev/null; then - deluser couchdb - fi - if getent group couchdb > /dev/null && which delgroup > /dev/null; then - delgroup couchdb - fi - ;; -esac - -#DEBHELPER# diff -Nru couchdb-1.2.0/debian/rules couchdb-1.2.0/debian/rules --- couchdb-1.2.0/debian/rules 2012-06-29 12:30:40.000000000 -0600 +++ couchdb-1.2.0/debian/rules 2012-07-09 03:01:02.000000000 -0600 @@ -12,7 +12,7 @@ #DEB_CONFIGURE_EXTRA_FLAGS = --enable-js-trunk DEB_INSTALL_DOCS_ALL = -DEB_DH_INSTALLINIT_ARGS = --onlyscripts +DEB_DH_INSTALLINIT_ARGS = -Ncouchdb-bin --onlyscripts LIB = ${localstatedir}/lib/\$${package_identifier} @@ -21,31 +21,33 @@ post-patches:: sed -i s,$(LIB)$$,$(LIB)/$(DEB_UPSTREAM_VERSION), configure - sed -i s,VERSION=%VERSION%$$,VERSION=$(DEB_UPSTREAM_VERSION), debian/postrm + sed -i s,VERSION=%VERSION%$$,VERSION=$(DEB_UPSTREAM_VERSION), debian/couchdb.postrm cleanbuilddir:: sed -i s,$(LIB)/$(DEB_UPSTREAM_VERSION)$$,$(LIB), configure - sed -i s,VERSION=$(DEB_UPSTREAM_VERSION)$$,VERSION=%VERSION%, debian/postrm + sed -i s,VERSION=$(DEB_UPSTREAM_VERSION)$$,VERSION=%VERSION%, debian/couchdb.postrm common-binary-post-install-arch:: - rm -r debian/couchdb/var/run - rm -f debian/couchdb/usr/share/doc/couchdb/LICENSE.gz - rm -f debian/couchdb/usr/share/doc/couchdb/INSTALL.* - rm -f debian/couchdb/usr/lib/couchdb/erlang/lib/couch-*/priv/lib/couch_erl_driver.la - rm -f debian/couchdb/usr/share/couchdb/www/script/jquery.js - rm -f debian/couchdb/usr/share/couchdb/www/script/jquery.form.js - chmod a-x debian/couchdb/usr/share/couchdb/server/main.js \ - debian/couchdb/usr/share/couchdb/server/main-coffee.js - sed -i "/dependency_libs/ s/'.*'/''/" `find debian/couchdb -name '*.la'` + rm -r debian/tmp/var/run + rm -f debian/couchdb-bin/usr/share/doc/couchdb/LICENSE.gz + rm -f debian/couchdb-bin/usr/share/doc/couchdb/INSTALL.* + rm -f debian/couchdb-bin/usr/lib/couchdb/erlang/lib/couch-*/priv/lib/couch_erl_driver.la + rm -f debian/couchdb-bin/usr/share/couchdb/www/script/jquery.js + rm -f debian/couchdb-bin/usr/share/couchdb/www/script/jquery.form.js + chmod a-x debian/couchdb-bin/usr/share/couchdb/server/main.js \ + debian/couchdb-bin/usr/share/couchdb/server/main-coffee.js + sed -i "/dependency_libs/ s/'.*'/''/" `find debian/couchdb-bin -name '*.la'` dh_link /usr/share/javascript/jquery/jquery.js /usr/share/couchdb/www/script/jquery.js dh_link /usr/share/javascript/jquery-form/jquery.form.js /usr/share/couchdb/www/script/jquery.form.js common-binary-predeb-arch:: - dh_fixperms debian/couchdb/ + dh_fixperms debian/couchdb-bin/ + erlang-depends -pcouchdb-bin + +common-binary-predeb-indep:: chmod 660 debian/couchdb/etc/couchdb/local.ini chmod 750 debian/couchdb/var/lib/couchdb chmod 750 debian/couchdb/var/log/couchdb - erlang-depends # @@ only works from source directory, see #494141 .PHONY: get-orig-source