[DRE-commits] [diaspora] 199/257: use scripts from diaspora-common

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Sun Apr 12 14:17:26 UTC 2015


This is an automated email from the git hooks/post-receive script.

praveen pushed a commit to branch master
in repository diaspora.

commit a646d3544812d70a60027ffe443fb790f3ea8ff1
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Wed Jan 7 15:24:28 2015 +0530

    use scripts from diaspora-common
---
 debian/adduser.sh   | 19 -------------------
 debian/control      |  1 +
 debian/grantpriv.sh | 14 --------------
 debian/postinst     |  4 ++--
 4 files changed, 3 insertions(+), 35 deletions(-)

diff --git a/debian/adduser.sh b/debian/adduser.sh
deleted file mode 100755
index e8b940d..0000000
--- a/debian/adduser.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-# add diaspora system user (requires adduser >= 3.34)
-# don't muck around with this unless you KNOW what you're doing
-user=diaspora
-
-echo "Creating/updating $user user account..."
-adduser --system --home /usr/share/$user \
-	--gecos "$user system user" --shell /bin/false \
-	--quiet --disabled-password $user || {
-  # adduser failed. Why?
-  if [ `getent passwd $user|awk -F ':' '{print $3}'` -gt 999 ] >/dev/null ; then
-	echo "Non-system user $user found. I will not overwrite a non-system" >&2
-	echo "user.  Remove the user and reinstall diaspora." >&2
-	exit 1
-  fi
-  # unknown adduser error, simply exit
-  exit 1
-  }
diff --git a/debian/control b/debian/control
index e7ae7df..94627f4 100644
--- a/debian/control
+++ b/debian/control
@@ -15,6 +15,7 @@ Architecture: all
 XB-Ruby-Versions: ${ruby:Versions}
 Pre-Depends: postgresql-client, dbconfig-common, adduser
 Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter,
+ diaspora-common,
  ruby-rails (>= 4.1~),
  ruby-actionpack-action-caching,
  ruby-actionpack-page-caching,
diff --git a/debian/grantpriv.sh b/debian/grantpriv.sh
deleted file mode 100755
index fc172c3..0000000
--- a/debian/grantpriv.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-
-user=diaspora
-
-echo "Allow $user user to create databases..."
-sudo -u postgres psql -c "ALTER USER $user CREATEDB;" || {
-  exit 1 
-  }
-echo "Grant all privileges to $user user..."
-sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE template1 to $user;" || {
-  exit 1
-  }
-
-
diff --git a/debian/postinst b/debian/postinst
index c33109f..e5955ae 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -37,8 +37,8 @@ dbc_go diaspora $@
 case "$1" in
     configure)
 
-	/usr/lib/diaspora/scripts/adduser.sh
-	/usr/lib/diaspora/scripts/grantpriv.sh
+	/usr/lib/diaspora-common/scripts/adduser.sh
+	/usr/lib/diaspora-common/scripts/grantpriv.sh
 	mkdir -p /var/log/diaspora
 	chown -R diaspora: /usr/share/diaspora
 	cd /usr/share/diaspora

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/diaspora.git



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