Ticket #20038: rabbit-1.6.0.patch

File rabbit-1.6.0.patch, 7.0 KB (added by tim@…, 15 years ago)
Line 
1diff -crBN rabbitmq-server-1.5.3/files/rabbitmqctl_wrapper rabbitmq-server-1.6.0/files/rabbitmqctl_wrapper
2*** rabbitmq-server-1.5.3/files/rabbitmqctl_wrapper     2009-06-22 13:31:24.000000000 +0100
3--- rabbitmq-server-1.6.0/files/rabbitmqctl_wrapper     1970-01-01 01:00:00.000000000 +0100
4***************
5*** 1,2 ****
6- #!/bin/bash
7- exec sudo -H -u rabbitmq "@PREFIX@/sbin/rabbitmqctl_real" "$@"
8--- 0 ----
9diff -crBN rabbitmq-server-1.5.3/files/rabbitmq-script-wrapper rabbitmq-server-1.6.0/files/rabbitmq-script-wrapper
10*** rabbitmq-server-1.5.3/files/rabbitmq-script-wrapper 1970-01-01 01:00:00.000000000 +0100
11--- rabbitmq-server-1.6.0/files/rabbitmq-script-wrapper 2009-06-22 13:32:51.000000000 +0100
12***************
13*** 0 ****
14--- 1,13 ----
15+ #!/bin/bash
16+ cd /var/lib/rabbitmq
17+
18+ SCRIPT=`basename $0`
19+
20+ if [ `id -u` = 0 ] ; then
21+     sudo -u rabbitmq -H /usr/lib/rabbitmq/bin/${SCRIPT} "$@"
22+ else
23+     /usr/lib/rabbitmq/bin/${SCRIPT}
24+     echo -e "\nOnly root should run ${SCRIPT}\n"
25+     exit 1
26+ fi
27+
28diff -crBN rabbitmq-server-1.5.3/Portfile rabbitmq-server-1.6.0/Portfile
29*** rabbitmq-server-1.5.3/Portfile      2009-06-22 13:31:24.000000000 +0100
30--- rabbitmq-server-1.6.0/Portfile      2009-06-22 13:32:51.000000000 +0100
31***************
32*** 1,15 ****
33  # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
34! # $Id: Portfile 50984 2009-05-14 21:08:43Z and.damore@macports.org $
35 
36! PortSystem      1.0
37!
38! name            rabbitmq-server
39! version         1.5.3
40! categories      net
41! maintainers     rabbitmq.com:tonyg
42! platforms       darwin
43! description     The RabbitMQ AMQP Server
44! long_description    \
45      RabbitMQ is an implementation of AMQP, the emerging standard for \
46      high performance enterprise messaging. The RabbitMQ server is a \
47      robust and scalable implementation of an AMQP broker.
48--- 1,15 ----
49  # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
50! # $Id$
51 
52! PortSystem 1.0
53! name          rabbitmq-server
54! version               1.6.0
55! revision      0
56! categories    net
57! maintainers   tonyg@rabbitmq.com
58! platforms     darwin
59! description   The RabbitMQ AMQP Server
60! long_description      \
61      RabbitMQ is an implementation of AMQP, the emerging standard for \
62      high performance enterprise messaging. The RabbitMQ server is a \
63      robust and scalable implementation of an AMQP broker.
64***************
65*** 19,27 ****
66  master_sites    http://www.rabbitmq.com/releases/rabbitmq-server/v${version}/
67 
68  checksums \
69!     md5 3242a67885c2471b5ab62254bf024679 \
70!     sha1 f4d6a01eaa2c74fa32f567fe410d21d9be1b43aa \
71!     rmd160 1a1c4b97d765548028c161d1617905151ca9e040
72 
73  depends_build   port:erlang port:py25-simplejson
74  depends_run     port:erlang
75--- 19,27 ----
76  master_sites    http://www.rabbitmq.com/releases/rabbitmq-server/v${version}/
77 
78  checksums \
79!     md5 af3b0d868d58e5aefb4f0837b82ca010 \
80!     sha1 1834c670d076fa9878223aacaa35a5a6528f1d86 \
81!     rmd160 d6c9de4e1fb48c6ceb1cb5d717ca2afb5e3266fe
82 
83  depends_build   port:erlang port:py25-simplejson
84  depends_run     port:erlang
85***************
86*** 32,37 ****
87--- 32,39 ----
88  set logdir ${prefix}/var/log/rabbitmq
89  set mnesiadbdir ${prefix}/var/lib/rabbitmq/mnesia
90  set plistloc ${prefix}/etc/LaunchDaemons/org.macports.rabbitmq-server
91+ set sbindir ${destroot}${prefix}/lib/rabbitmq/bin
92+ set wrappersbin ${destroot}${prefix}/sbin
93 
94  use_configure   no
95 
96***************
97*** 41,47 ****
98 
99  destroot.destdir \
100      TARGET_DIR=${destroot}${prefix}/lib/erlang/lib/rabbitmq_server-${version} \
101!     SBIN_DIR=${destroot}${prefix}/sbin \
102      MAN_DIR=${destroot}${prefix}/share/man
103 
104  destroot.keepdirs \
105--- 43,49 ----
106 
107  destroot.destdir \
108      TARGET_DIR=${destroot}${prefix}/lib/erlang/lib/rabbitmq_server-${version} \
109!     SBIN_DIR=${sbindir} \
110      MAN_DIR=${destroot}${prefix}/share/man
111 
112  destroot.keepdirs \
113***************
114*** 59,90 ****
115      xinstall -d -g [existsgroup ${servergroup}] -m 775 ${destroot}${mnesiadbdir}
116 
117      reinplace -E "s:(/etc/rabbitmq/rabbitmq.conf):${prefix}\\1:g" \
118!         ${destroot}${prefix}/sbin/rabbitmq-multi \
119!         ${destroot}${prefix}/sbin/rabbitmq-server \
120!         ${destroot}${prefix}/sbin/rabbitmqctl
121!     reinplace -E "s:(RABBITMQ_CLUSTER_CONFIG_FILE)=/:\\1=${prefix}/:" \
122!         ${destroot}${prefix}/sbin/rabbitmq-multi \
123!         ${destroot}${prefix}/sbin/rabbitmq-server \
124!         ${destroot}${prefix}/sbin/rabbitmqctl
125!     reinplace -E "s:(RABBITMQ_LOG_BASE)=/:\\1=${prefix}/:" \
126!         ${destroot}${prefix}/sbin/rabbitmq-multi \
127!         ${destroot}${prefix}/sbin/rabbitmq-server \
128!         ${destroot}${prefix}/sbin/rabbitmqctl
129!     reinplace -E "s:(RABBITMQ_MNESIA_BASE)=/:\\1=${prefix}/:" \
130!         ${destroot}${prefix}/sbin/rabbitmq-multi \
131!         ${destroot}${prefix}/sbin/rabbitmq-server \
132!         ${destroot}${prefix}/sbin/rabbitmqctl
133!     reinplace -E "s:(RABBITMQ_PIDS_FILE)=/:\\1=${prefix}/:" \
134!         ${destroot}${prefix}/sbin/rabbitmq-multi \
135!         ${destroot}${prefix}/sbin/rabbitmq-server \
136!         ${destroot}${prefix}/sbin/rabbitmqctl
137!
138!     file rename ${destroot}${prefix}/sbin/rabbitmqctl ${destroot}${prefix}/sbin/rabbitmqctl_real
139!     xinstall -m 555 ${filespath}/rabbitmqctl_wrapper ${destroot}${prefix}/sbin
140!     file rename ${destroot}${prefix}/sbin/rabbitmqctl_wrapper ${destroot}${prefix}/sbin/rabbitmqctl
141 
142-     reinplace -E "s:@PREFIX@:${prefix}:" \
143-         ${destroot}${prefix}/sbin/rabbitmqctl
144  }
145 
146  pre-install {
147--- 61,96 ----
148      xinstall -d -g [existsgroup ${servergroup}] -m 775 ${destroot}${mnesiadbdir}
149 
150      reinplace -E "s:(/etc/rabbitmq/rabbitmq.conf):${prefix}\\1:g" \
151!         ${sbindir}/rabbitmq-multi \
152!         ${sbindir}/rabbitmq-server \
153!         ${sbindir}/rabbitmqctl
154!     reinplace -E "s:(CLUSTER_CONFIG_FILE)=/:\\1=${prefix}/:" \
155!         ${sbindir}/rabbitmq-multi \
156!         ${sbindir}/rabbitmq-server \
157!         ${sbindir}/rabbitmqctl
158!     reinplace -E "s:(LOG_BASE)=/:\\1=${prefix}/:" \
159!         ${sbindir}/rabbitmq-multi \
160!         ${sbindir}/rabbitmq-server \
161!         ${sbindir}/rabbitmqctl
162!     reinplace -E "s:(MNESIA_BASE)=/:\\1=${prefix}/:" \
163!         ${sbindir}/rabbitmq-multi \
164!         ${sbindir}/rabbitmq-server \
165!         ${sbindir}/rabbitmqctl
166!     reinplace -E "s:(PIDS_FILE)=/:\\1=${prefix}/:" \
167!         ${sbindir}/rabbitmq-multi \
168!         ${sbindir}/rabbitmq-server \
169!         ${sbindir}/rabbitmqctl
170!
171!     xinstall -m 555 ${filespath}/rabbitmq-script-wrapper \
172!                 ${wrappersbin}/rabbitmq-multi
173!
174!     reinplace -E "s:/usr/lib/rabbitmq/bin/:${prefix}/lib/rabbitmq/bin/:" \
175!                 ${wrappersbin}/rabbitmq-multi
176!     reinplace -E "s:/var/lib/rabbitmq:${prefix}/var/lib/rabbitmq:" \
177!                 ${wrappersbin}/rabbitmq-multi
178!     file copy ${wrappersbin}/rabbitmq-multi ${wrappersbin}/rabbitmq-server
179!     file copy ${wrappersbin}/rabbitmq-multi ${wrappersbin}/rabbitmqctl
180 
181  }
182 
183  pre-install {