[Pkg-erlang-commits] r1265 - in couchdb/trunk/debian: . patches

statik-guest at alioth.debian.org statik-guest at alioth.debian.org
Fri Jul 16 05:45:58 UTC 2010


Author: statik-guest
Date: 2010-07-16 05:45:57 +0000 (Fri, 16 Jul 2010)
New Revision: 1265

Added:
   couchdb/trunk/debian/patches/auth_cache.patch
   couchdb/trunk/debian/patches/remove_users.patch
Removed:
   couchdb/trunk/debian/patches/couch_app.patch
Modified:
   couchdb/trunk/debian/changelog
   couchdb/trunk/debian/control
   couchdb/trunk/debian/couchdb-bin.postinst
Log:
Update to version 1.0, minor fixes from testing.


Modified: couchdb/trunk/debian/changelog
===================================================================
--- couchdb/trunk/debian/changelog	2010-07-13 07:33:07 UTC (rev 1264)
+++ couchdb/trunk/debian/changelog	2010-07-16 05:45:57 UTC (rev 1265)
@@ -1,4 +1,4 @@
-couchdb (0.11.0-3) UNRELEASED; urgency=low
+couchdb (1.0.0-1) UNRELEASED; urgency=low
 
   [ Sam Bisbee ]
   * Updated debian/control, removing mawk as a dependency per
@@ -11,8 +11,12 @@
 
   [ Elliot Murphy ]
   * split into couchdb and couchdb-bin (closes: #573061)
+  * New upstream release 1.0
+  * Added auth_cache.patch and remove_users.patch to fix problems with deleting
+    users and auth caches after final user is removed.
+  * Drop debian/patches/couch_app.erl (included upstream now).
 
- -- Elliot Murphy <elliot at ubuntu.com>  Wed, 23 Jun 2010 00:33:38 -0400
+ -- Elliot Murphy <elliot at ubuntu.com>  Fri, 16 Jul 2010 00:34:01 -0400
 
 couchdb (0.11.0-2) unstable; urgency=low
 

Modified: couchdb/trunk/debian/control
===================================================================
--- couchdb/trunk/debian/control	2010-07-13 07:33:07 UTC (rev 1264)
+++ couchdb/trunk/debian/control	2010-07-16 05:45:57 UTC (rev 1265)
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Erlang Packaging Team <pkg-erlang-devel at lists.alioth.debian.org>
 Uploaders: Sergei Golovan <sgolovan at debian.org>, Sam Bisbee <sbisbee at computervip.com>, Elliot Murphy <elliot at ubuntu.com>
-Standards-Version: 3.8.4
+Standards-Version: 3.9.0
 Build-Depends: cdbs (>= 0.4.42), debhelper (>= 7.2.11),
  erlang-dev (>= 1:13.b.1-dfsg-3), help2man, libcurl4-openssl-dev,
  libicu-dev, libmozjs-dev, libreadline-dev

Modified: couchdb/trunk/debian/couchdb-bin.postinst
===================================================================
--- couchdb/trunk/debian/couchdb-bin.postinst	2010-07-13 07:33:07 UTC (rev 1264)
+++ couchdb/trunk/debian/couchdb-bin.postinst	2010-07-16 05:45:57 UTC (rev 1265)
@@ -22,11 +22,9 @@
             false
         fi
         chown -R couchdb:couchdb /etc/couchdb
-        chown -R couchdb:couchdb /var/lib/couchdb
-        chown -R couchdb:couchdb /var/log/couchdb
         chmod -R 0770 /etc/couchdb
-        chmod -R 0770 /var/lib/couchdb
-        chmod -R 0770 /var/log/couchdb
+        chmod 0664 /etc/couchdb/default.ini
+        chmod 0664 /etc/couchdb/local.ini
         ;;
 esac
 

Added: couchdb/trunk/debian/patches/auth_cache.patch
===================================================================
--- couchdb/trunk/debian/patches/auth_cache.patch	                        (rev 0)
+++ couchdb/trunk/debian/patches/auth_cache.patch	2010-07-16 05:45:57 UTC (rev 1265)
@@ -0,0 +1,13 @@
+diff --git a/src/couchdb/couch_auth_cache.erl b/src/couchdb/couch_auth_cache.erl
+index bff801f..078bfcc 100644
+--- a/src/couchdb/couch_auth_cache.erl
++++ b/src/couchdb/couch_auth_cache.erl
+@@ -289,7 +289,7 @@ refresh_entry(Db, #doc_info{high_seq = DocSeq} = DocInfo) ->
+         [] ->
+             ok;
+         [{UserName, {_OldCreds, ATime}}] ->
+-            {ok, Doc} = couch_db:open_doc(Db, DocInfo, [conflicts]),
++            {ok, Doc} = couch_db:open_doc(Db, DocInfo, [conflicts, deleted]),
+             NewCreds = user_creds(Doc),
+             true = ets:insert(?BY_USER, {UserName, {NewCreds, ATime}})
+         end;

Deleted: couchdb/trunk/debian/patches/couch_app.patch
===================================================================
--- couchdb/trunk/debian/patches/couch_app.patch	2010-07-13 07:33:07 UTC (rev 1264)
+++ couchdb/trunk/debian/patches/couch_app.patch	2010-07-16 05:45:57 UTC (rev 1265)
@@ -1,11 +0,0 @@
---- couchdb-0.11.0.orig/src/couchdb/couch_app.erl
-+++ couchdb-0.11.0/src/couchdb/couch_app.erl
-@@ -20,7 +20,7 @@
- 
- start(_Type, DefaultIniFiles) ->
-     IniFiles = get_ini_files(DefaultIniFiles),
--    case start_apps([crypto, sasl, inets, oauth, ssl, ibrowse, mochiweb]) of
-+    case start_apps([crypto, public_key, sasl, inets, oauth, ssl, ibrowse, mochiweb]) of
-     ok ->
-         couch_server_sup:start_link(IniFiles);
-     {error, Reason} ->

Added: couchdb/trunk/debian/patches/remove_users.patch
===================================================================
--- couchdb/trunk/debian/patches/remove_users.patch	                        (rev 0)
+++ couchdb/trunk/debian/patches/remove_users.patch	2010-07-16 05:45:57 UTC (rev 1265)
@@ -0,0 +1,45 @@
+diff --git a/share/www/script/test/users_db.js b/share/www/script/test/users_db.js
+index b85adf0..667ff3c 100644
+--- a/share/www/script/test/users_db.js
++++ b/share/www/script/test/users_db.js
+@@ -85,8 +85,13 @@ couchTests.users_db = function(debug) {
+       T(/conflict/.test(e.reason))
+     }
+ 
++    // you can delete a user doc
++    s = CouchDB.session().userCtx;
++    T(s.name == null);
++    T(s.roles.indexOf("_admin") !== -1);
++    T(usersDb.deleteDoc(jchrisWithConflict).ok);
+   };
+-  
++
+   usersDb.deleteDb();
+   run_on_modified_server(
+     [{section: "couch_httpd_auth",
+diff --git a/src/couchdb/couch_js_functions.hrl b/src/couchdb/couch_js_functions.hrl
+index 3214b1f..1f314f6 100644
+--- a/src/couchdb/couch_js_functions.hrl
++++ b/src/couchdb/couch_js_functions.hrl
+@@ -12,10 +12,6 @@
+ 
+ -define(AUTH_DB_DOC_VALIDATE_FUNCTION, <<"
+     function(newDoc, oldDoc, userCtx) {
+-        if ((oldDoc && oldDoc.type !== 'user') || newDoc.type !== 'user') {
+-            throw({forbidden : 'doc.type must be user'});
+-        } // we only allow user docs for now
+-
+         if (newDoc._deleted === true) {
+             // allow deletes by admins and matching users
+             // without checking the other fields
+@@ -27,6 +23,10 @@
+             }
+         }
+ 
++        if ((oldDoc && oldDoc.type !== 'user') || newDoc.type !== 'user') {
++            throw({forbidden : 'doc.type must be user'});
++        } // we only allow user docs for now
++
+         if (!newDoc.name) {
+             throw({forbidden: 'doc.name is required'});
+         }




More information about the Pkg-erlang-commits mailing list