[arch-commits] Commit in memcached/trunk (5 files)

Dan McGee dan at archlinux.org
Thu Aug 16 14:41:00 UTC 2012


    Date: Thursday, August 16, 2012 @ 10:40:59
  Author: dan
Revision: 165365

upgpkg: memcached 1.4.14-2

* Add systemd support

Added:
  memcached/trunk/memcached.install
  memcached/trunk/memcached.service
Modified:
  memcached/trunk/PKGBUILD
  memcached/trunk/memcached.conf
Deleted:
  memcached/trunk/ChangeLog

-------------------+
 ChangeLog         |   24 ------------------------
 PKGBUILD          |   20 ++++++++++----------
 memcached.conf    |    2 +-
 memcached.install |   22 ++++++++++++++++++++++
 memcached.service |   11 +++++++++++
 5 files changed, 44 insertions(+), 35 deletions(-)

Deleted: ChangeLog
===================================================================
--- ChangeLog	2012-08-16 13:00:45 UTC (rev 165364)
+++ ChangeLog	2012-08-16 14:40:59 UTC (rev 165365)
@@ -1,24 +0,0 @@
-2011-02-07 Ionut Biru <ibiru at archlinux.org>
-	* Rebuild 1.4.5 against libevent 2.0.10
-
-2011-01-31 Dan McGee <dan at archlinux.org>
-	* Rebuild 1.4.5 with gcc 4.5.X patch accepted upstream
-
-2009-11-14 Dan McGee <dan at archlinux.org>
-	* Bump to 1.4.3
-	* Added memcached-tool to package
-
-2009-09-13 Dan McGee <dan at archlinux.org>
-	* Bump to 1.4.1
-	* Add new required conf.d option MEMCACHED_USER
-	* Rework the way we store the PID for init script usage
-
-2009-04-12 Dan McGee <dan at archlinux.org>
-	* Bump to 1.2.8
-
-2009-04-05 Dan McGee <dan at archlinux.org>
-	* Bump to 1.2.7
-
-2008-12-13 Dan McGee <dan at archlinux.org>
-	* Added conf file to backup array
-	* Fixed the not quite right default config

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-08-16 13:00:45 UTC (rev 165364)
+++ PKGBUILD	2012-08-16 14:40:59 UTC (rev 165365)
@@ -4,7 +4,7 @@
 
 pkgname=memcached
 pkgver=1.4.14
-pkgrel=1
+pkgrel=2
 pkgdesc="A distributed memory object caching system"
 arch=(i686 x86_64)
 url="http://memcached.org/"
@@ -12,13 +12,15 @@
 depends=('libevent')
 optdepends=('perl: for memcached-tool usage')
 backup=('etc/conf.d/memcached')
+install=memcached.install
 source=(http://memcached.googlecode.com/files/$pkgname-$pkgver.tar.gz
         memcached.conf
-		memcached.sh)
-changelog=ChangeLog
+		memcached.sh
+		memcached.service)
 sha256sums=('f2e2ad8ee8d256f2c3748d7f741dcddfd0ab6bdece6fa1c18484e83f311156ef'
-            '0e57a0f528b387f1f04f628ec74856c615d82d44f4d6bc041c33b3814ce13d0a'
-            '72efa639c5a39c7c14f07cc51731ebbf82299870d9cf31cf3aaa981bc084b4eb')
+            '17f66873b77e96c6706dcf13ab0aa8ddff94b2851366c787fc23e614dfc11f47'
+            '72efa639c5a39c7c14f07cc51731ebbf82299870d9cf31cf3aaa981bc084b4eb'
+            '453cad82bddb25fac43fd5cedc5702b9b6c6abaf7498e21445facf20f25f53a6')
 
 build() {
   cd "$srcdir/$pkgname-$pkgver"
@@ -30,9 +32,7 @@
   cd "$srcdir/$pkgname-$pkgver"
   make DESTDIR="$pkgdir" install
   install -D -m 755 scripts/memcached-tool "$pkgdir"/usr/bin/memcached-tool
-  # This POS is entirely RedHat specific, so not including it now
-  #install -D -m 755 scripts/memcached.service "$pkgdir"/lib/systemd/system/memcached.service
-  #sed -i -e 's#^EnvironmentFile.*#EnvironmentFile=/etc/conf.d/memcached#' "$pkgdir"/lib/systemd/system/memcached.service
-  install -D -m 644 "$srcdir/memcached.conf" "$pkgdir"/etc/conf.d/memcached
-  install -D -m 755 "$srcdir/memcached.sh" "$pkgdir"/etc/rc.d/memcached
+  install -D -m 644 ../memcached.conf "$pkgdir"/etc/conf.d/memcached
+  install -D -m 755 ../memcached.sh "$pkgdir"/etc/rc.d/memcached
+  install -D -m 644 ../memcached.service "$pkgdir"/usr/lib/systemd/system/memcached.service
 }

Modified: memcached.conf
===================================================================
--- memcached.conf	2012-08-16 13:00:45 UTC (rev 165364)
+++ memcached.conf	2012-08-16 14:40:59 UTC (rev 165365)
@@ -1,4 +1,4 @@
 # user to run memcached as; also used for pid file ownership
-MEMCACHED_USER="nobody"
+MEMCACHED_USER="memcached"
 # see 'memcached -h' for available options
 MEMCACHED_ARGS="-l 127.0.0.1 -t 1"

Added: memcached.install
===================================================================
--- memcached.install	                        (rev 0)
+++ memcached.install	2012-08-16 14:40:59 UTC (rev 165365)
@@ -0,0 +1,22 @@
+post_install() {
+  if ! getent group memcached >/dev/null; then
+    groupadd --system memcached
+  fi
+  if ! getent passwd memcached >/dev/null; then
+    useradd --system -c 'memcached user' -g memcached -d / -s /bin/bash memcached
+    passwd -l memcached >/dev/null
+  fi
+}
+
+post_upgrade() {
+  post_install $1
+}
+
+post_remove() {
+  if getent passwd memcached >/dev/null; then
+    userdel memcached
+  fi
+  if getent group memcached >/dev/null; then
+    groupdel memcached
+  fi
+}

Added: memcached.service
===================================================================
--- memcached.service	                        (rev 0)
+++ memcached.service	2012-08-16 14:40:59 UTC (rev 165365)
@@ -0,0 +1,11 @@
+[Unit]
+Description=Memcached Daemon
+After=network.target
+
+[Service]
+User=memcached
+# Remove '-l 127.0.0.1' to listen on all addresses
+ExecStart=/usr/bin/memcached -l 127.0.0.1
+
+[Install]
+WantedBy=multi-user.target




More information about the arch-commits mailing list