~jderose/ubuntu/trusty/couchdb/1.5.0

« back to all changes in this revision

Viewing changes to debian/patches/couchdb_own_rundir.patch

  • Committer: Package Import Robot
  • Author(s): Logan Rosen
  • Date: 2012-12-25 03:35:04 UTC
  • mfrom: (7.1.16 raring-proposed)
  • Revision ID: package-import@ubuntu.com-20121225033504-iiwxq3iil2pjfgnk
Tags: 1.2.0-3ubuntu1
* Merge from Debian unstable. Remaining changes:
  - debian/rules, debian/control: Split couchdb and couchdb-bin.
  - debian/postinst: Rename to couchdb-bin.postinst.
  - debian/couchdb-bin.postrm: Don't try to delete couchdb system
    user/group.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
Description: Initscript creates RUN_DIR , make sure it's owned by couchdb
2
 
 Add chown after the mkdir to make COUCHDB_USER own the RUN_DIR being created.
 
2
 Use install to make COUCHDB_USER own the RUN_DIR being created.
3
3
Author: Laszlo Boszormenyi (GCS) <gcs@debian.hu>
4
4
Bug-Debian: http://bugs.debian.org/681549
5
 
Last-Update: 2012-07-19
 
5
Last-Update: 2012-11-18
6
6
 
7
7
---
8
8
 
9
9
--- couchdb-1.2.0.orig/etc/init/couchdb.tpl.in
10
10
+++ couchdb-1.2.0/etc/init/couchdb.tpl.in
11
 
@@ -84,6 +84,7 @@ start_couchdb () {
 
11
@@ -83,7 +83,8 @@ run_command () {
 
12
 start_couchdb () {
12
13
     # Start Apache CouchDB as a background process.
13
14
 
14
 
     mkdir -p "$RUN_DIR"
15
 
+    chown -R "$COUCHDB_USER" "$RUN_DIR"
 
15
-    mkdir -p "$RUN_DIR"
 
16
+    test -e "$RUN_DIR" || \
 
17
+        install -m 755 -o "$COUCHDB_USER" -g "$COUCHDB_USER" -d "$RUN_DIR"
16
18
     command="$COUCHDB -b"
17
19
     if test -n "$COUCHDB_STDOUT_FILE"; then
18
20
         command="$command -o $COUCHDB_STDOUT_FILE"