Merge lp:~jontai/openvista-gtm-integration/bug400432 into lp:openvista-gtm-integration

Proposed by Jon Tai
Status: Merged
Merged at revision: not available
Proposed branch: lp:~jontai/openvista-gtm-integration/bug400432
Merge into: lp:openvista-gtm-integration
Diff against target: None lines
To merge this branch: bzr merge lp:~jontai/openvista-gtm-integration/bug400432
Reviewer Review Type Date Requested Status
jeff.apple Approve
Review via email: mp+8981@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jon Tai (jontai) wrote :

I was hoping to push out a 0.8.4 release last night, but since I have GT.M 5.3-004 packaged, I figured we'd include it in this release. 5.3-003 is still available (and will remain available for sites who do not want to upgrade). 5.3-004 can be parallel-installed. Any new OpenVista instances added with ovinstanceadd will use the latest version of GT.M installed on the system.

The main reason I'm including this branch in the 0.8.4 release is beacuse it provides a new GT.M 5.3-003 package that makes the "groupdel gtm" in the postun script conditional - the gtm group is only removed if there are no other GT.M installations in /opt/lsb-gtm. This prevents the scenario where 5.3-004 is installed, all instances are upgraded (manually), and the administrator goes to remove 5.3-003, and the postun script removes the gtm group, breaking the system.

86. By Jon Tai

explicitly depend on gpgme, libgpg-error, and libgcrypt

Revision history for this message
jeff.apple (jeff-apple) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'packages/rpm/fis-gtm-5.3003.spec'
2--- packages/rpm/fis-gtm-5.3003.spec 2009-07-08 04:10:08 +0000
3+++ packages/rpm/fis-gtm-5.3003.spec 2009-07-18 00:45:57 +0000
4@@ -16,7 +16,7 @@
5
6 Name: fis-gtm-5.3003
7 Version: 5.3003
8-Release: 2
9+Release: 3
10 Summary: High end TP schemaless database
11 License: AGPL
12 Vendor: Fidelity Information Services
13@@ -138,10 +138,13 @@
14 /sbin/restorecon %{gtm_dist}/libgtmshr.so || :
15
16 %postun
17-# Remove libgtmshr.so from the SELinux policy if we're removing the package
18-#
19-# See http://fedoraproject.org/wiki/PackagingDrafts/SELinux
20 if [ $1 -eq 0 ]; then
21+ # Remove libgtmshr.so from the SELinux policy if we're removing the package
22+ # See http://fedoraproject.org/wiki/PackagingDrafts/SELinux
23 /usr/sbin/semanage fcontext -d -t textrel_shlib_t %{gtm_dist}/libgtmshr.so 2>/dev/null || :
24- /usr/sbin/groupdel gtm 2> /dev/null || :
25+
26+ # if we were the last GT.M package on the system, remove the gtm group
27+ if [ ! -d /opt/lsb-gtm ]; then
28+ /usr/sbin/groupdel gtm 2> /dev/null || :
29+ fi
30 fi
31
32=== added file 'packages/rpm/fis-gtm-5.3004.spec'
33--- packages/rpm/fis-gtm-5.3004.spec 1970-01-01 00:00:00 +0000
34+++ packages/rpm/fis-gtm-5.3004.spec 2009-07-18 00:45:57 +0000
35@@ -0,0 +1,151 @@
36+# FIXME: this is a pretty bad RPM:
37+# - It requires that gtm_curpro already exists on the build box
38+# - It requires that gtm_dist does not already exist on the build box
39+# - It requires the RPM be built as root
40+# - The arch is wrong (?) - GT.M requires i686 but this package is marked i386
41+
42+# This must point to an existing binary installation of GT.M because GT.M
43+# requires GT.M to build
44+%define gtm_curpro /tmp/gtm
45+
46+%ifarch x86_64
47+%define gtm_dist /opt/lsb-gtm/V5.3-004_x86_64
48+%else
49+%define gtm_dist /opt/lsb-gtm/V5.3-004_i686
50+%endif
51+
52+Name: fis-gtm-5.3004
53+Version: 5.3004
54+Release: 3
55+Summary: High end TP schemaless database
56+License: AGPL
57+Vendor: Fidelity Information Services
58+URL: http://www.fidelityinfoservices.com/FNFIS/Markets/NonFinancialIndustries/Healthcare/GTM/
59+Group: Applications/Databases
60+Packager: Jonathan Tai <jon.tai@medsphere.com>
61+
62+Provides: fis-gtm
63+
64+Requires(pre): /usr/sbin/groupadd
65+Requires(post): /usr/sbin/semanage, /sbin/restorecon
66+Requires(postun): /usr/sbin/semanage, /usr/sbin/groupdel
67+
68+Requires: /bin/sh, coreutils, libicu, zlib, ncurses
69+BuildRequires: /bin/tcsh, libicu-devel, zlib-devel, ncurses-devel, gpgme-devel, libgpg-error-devel, libgcrypt-devel
70+
71+%ifarch x86_64
72+BuildRequires: elfutils-libelf-devel
73+%endif
74+
75+# The source for both i686 and x86_64 versions are both in this tarball, even
76+# though the tarball is named i686_src
77+Source: gtm_V53004_linux_i686_src.tar.gz
78+
79+# Patch the configure script to pre-answer all of the prompts and set the
80+# installation directory
81+Patch1: fis-gtm-5.3004_noninteractive-configure.patch
82+
83+Patch2: fis-gtm-5.3004_configure-fix.patch
84+
85+BuildRoot: %{_tmppath}/%{name}-root
86+
87+%description
88+GT.M is a vetted, industrial strength, transaction processing application
89+platform consisting of a schema-less database engine optimized for extreme
90+transaction processing throughput & business continuity plus a compiler for the
91+MUMPS language.
92+
93+%prep
94+if [ ! -d "%{gtm_curpro}" ]; then
95+ echo "existing binary installation of GT.M not found at %{gtm_curpro}"
96+ exit 1
97+fi
98+
99+if [ -d "%{gtm_dist}" ]; then
100+ echo "target GT.M directory %{gtm_dist} already exists"
101+ exit 1
102+fi
103+
104+if ! grep '^gtm:' /etc/group > /dev/null; then
105+ echo "gtm group not found in /etc/group"
106+ exit 1
107+fi
108+
109+if [ `/usr/bin/id -u` -ne 0 ]; then
110+ echo "this RPM must be built as root"
111+ exit 1
112+fi
113+%setup -c
114+%patch2 -p0
115+
116+%build
117+# GT.M needs to be built with tcsh, and with a bunch of environmental variables
118+# set. Since we can't run tcsh interactively, we put all the setenv commands
119+# and the build command itself into a temporary script, then execute it with
120+# tcsh.
121+echo 'setenv gtm_curpro %{gtm_curpro}' > build.csh
122+echo 'setenv gtm_exe %{gtm_curpro}' >> build.csh
123+echo 'setenv HOSTOS `uname -s`' >> build.csh
124+echo 'setenv gtm_tools '$(pwd)'/sr_linux' >> build.csh
125+echo 'setenv gtm_inc '$(pwd)'/sr_linux' >> build.csh
126+%ifarch x86_64
127+echo 'setenv OBJECT_MODE 64' >> build.csh
128+%endif
129+echo 'setenv gtm_icu_version `icu-config --version`' >> build.csh
130+echo 'setenv gtm_version_change 1' >> build.csh
131+cat sr_unix/gtm_env.csh >> build.csh
132+echo 'make -f sr_unix/comlist.mk -I./sr_unix -I./sr_linux buildtypes=pro gtm_ver='$(pwd) >> build.csh
133+tcsh -b build.csh
134+rm -f build.csh
135+
136+# Put a copy of the COPYING file in the pro directory so that it will be
137+# installed by the ./configure script later
138+cp COPYING pro
139+
140+%install
141+rm -rf %{buildroot}
142+
143+mkdir -p $(dirname %{gtm_dist})
144+
145+cd pro
146+# We need to patch the configure script to pre-answer all of the prompts and
147+# set the installation directory
148+sed 's,@GTMDIST@,%{gtm_dist},' < %{PATCH1} | patch -p0 -b
149+chmod +x configure
150+./configure
151+
152+mkdir -p %{buildroot}$(dirname %{gtm_dist})
153+mv %{gtm_dist} %{buildroot}$(dirname %{gtm_dist})
154+
155+%clean
156+rm -rf %{buildroot}
157+
158+%files
159+%defattr(-,-,-)
160+/opt/lsb-gtm
161+
162+%pre
163+/usr/sbin/groupadd gtm 2> /dev/null || :
164+
165+%post
166+# GT.M's installation script just chcon directly, but it won't have any effect
167+# on the target system (only on the build system, and then only if SELinux is
168+# enabled on the build system). On the target system, we should use semanage
169+# to save the correct context for libgtmshr.so in the SELinux policy. This
170+# will ensure that the file has the correct context, even after relabling.
171+#
172+# See http://fedoraproject.org/wiki/PackagingDrafts/SELinux
173+/usr/sbin/semanage fcontext -a -t textrel_shlib_t %{gtm_dist}/libgtmshr.so 2>/dev/null || :
174+/sbin/restorecon %{gtm_dist}/libgtmshr.so || :
175+
176+%postun
177+if [ $1 -eq 0 ]; then
178+ # Remove libgtmshr.so from the SELinux policy if we're removing the package
179+ # See http://fedoraproject.org/wiki/PackagingDrafts/SELinux
180+ /usr/sbin/semanage fcontext -d -t textrel_shlib_t %{gtm_dist}/libgtmshr.so 2>/dev/null || :
181+
182+ # if we were the last GT.M package on the system, remove the gtm group
183+ if [ ! -d /opt/lsb-gtm ]; then
184+ /usr/sbin/groupdel gtm 2> /dev/null || :
185+ fi
186+fi
187
188=== added file 'packages/rpm/fis-gtm-5.3004_configure-fix.patch'
189--- packages/rpm/fis-gtm-5.3004_configure-fix.patch 1970-01-01 00:00:00 +0000
190+++ packages/rpm/fis-gtm-5.3004_configure-fix.patch 2009-07-18 00:42:00 +0000
191@@ -0,0 +1,23 @@
192+--- sr_unix/configure.gtc 2009-07-10 08:31:45.000000000 -0700
193++++ sr_unix/configure.gtc 2009-07-14 11:06:21.000000000 -0700
194+@@ -208,9 +208,9 @@
195+ is64bit_gtm=`file mumps | grep "64-bit" | wc -l`
196+ fi
197+ if [ $is64bit_gtm -eq 1 ] ; then
198+- library_path="/usr/local/lib64 /usr/local/lib /usr/lib /usr/lib32"
199++ library_path="/usr/local/lib64 /usr/local/lib /usr/lib64 /usr/lib /lib64 /lib"
200+ else
201+- library_path="/usr/local/lib /usr/lib /usr/lib32"
202++ library_path="/usr/local/lib32 /usr/local/lib /usr/lib32 /usr/lib /lib32 /lib"
203+ fi
204+ $echo "Should unicode support be installed? (y or n) \c"
205+ read resp
206+@@ -303,7 +303,7 @@
207+ fi
208+ done
209+ if [ "$found_icu" -eq 0 ] ; then
210+- if [ $majmin != "" ] ; then
211++ if [ "$majmin" != "" ] ; then
212+ echo "WARNING: ICU version $gtm_icu_version not found. Not installing Unicode support."
213+ else
214+ echo "WARNING: Default ICU version not found. Not installing Unicode support."
215
216=== added file 'packages/rpm/fis-gtm-5.3004_noninteractive-configure.patch'
217--- packages/rpm/fis-gtm-5.3004_noninteractive-configure.patch 1970-01-01 00:00:00 +0000
218+++ packages/rpm/fis-gtm-5.3004_noninteractive-configure.patch 2009-07-16 23:02:21 +0000
219@@ -0,0 +1,78 @@
220+--- configure 2009-07-16 15:26:02.000000000 -0700
221++++ configure 2009-07-16 15:28:00.000000000 -0700
222+@@ -112,7 +112,7 @@
223+ # create temporary file to test for valid user and group names
224+ touch tmp_owngrp
225+ $echo "What account should own the files? (bin) \c"
226+-read resp
227++resp=""
228+ if [ "$resp" = "" ] ; then
229+ owner="bin"
230+ else
231+@@ -126,10 +126,10 @@
232+ fi
233+
234+ $echo "Should execution of GT.M to be restricted to a group? (y or n) \c"
235+-read resp
236++resp="y"
237+ if [ "$resp" = "Y" -o "$resp" = "y" ] ; then
238+ $echo "Enter group name? \c"
239+- read group
240++ group="gtm"
241+ if [ "$group" != "" ] ; then
242+ chgrp $group tmp_owngrp 2> /dev/null
243+ if [ 1 = "$?" ] ; then
244+@@ -145,7 +145,7 @@
245+ rm tmp_owngrp
246+
247+ $echo "In what directory should GT.M be installed? \c"
248+-read gtmdist
249++gtmdist="@GTMDIST@"
250+
251+ # if gtmdist is relative then need to make it absolute
252+
253+@@ -171,7 +171,7 @@
254+ $echo "Directory $gtmdist does not exist. Do you wish to create it as part of"
255+ $echo "this installation? (y or n) \c"
256+
257+- read resp
258++ resp="y"
259+ if [ "$resp" = "Y" -o "$resp" = "y" ] ; then
260+ mkdir -p $gtmdist
261+ chmod 0755 $gtmdist
262+@@ -213,14 +213,14 @@
263+ library_path="/usr/local/lib32 /usr/local/lib /usr/lib32 /usr/lib /lib32 /lib"
264+ fi
265+ $echo "Should unicode support be installed? (y or n) \c"
266+- read resp
267++ resp="y"
268+ if [ "$resp" = "Y" -o "$resp" = "y" ] ; then
269+ would_like_utf8=1
270+ $echo "Should an ICU version other than the default be used? (y or n) \c"
271+- read resp
272++ resp="y"
273+ if [ "$resp" = "Y" -o "$resp" = "y" ] ; then
274+ $echo "Enter ICU version (at least ICU version 3.6 is required. Enter as <minor-ver>.<major-ver>): \c"
275+- read gtm_icu_version
276++ gtm_icu_version="3.6"
277+ icu_ver=`$echo $gtm_icu_version | sed 's/\.//'`
278+ majmin=`$echo $icu_ver | cut -f 1 -d "."`
279+ if [ "$majmin" -lt "36" ] ; then
280+@@ -567,7 +567,7 @@
281+ $echo "only the uppercase versions of the files."
282+ $echo ""
283+ $echo "Do you want uppercase and lowercase versions of the MUMPS routines? (y or n)\c"
284+-read resp
285++resp="n"
286+ if [ "$resp" = "Y" -o "$resp" = "y" ] ; then
287+ $echo ""
288+ $echo "Creating lowercase versions of the MUMPS routines."
289+@@ -768,7 +768,7 @@
290+ $echo ""
291+ $echo "Installation completed. Would you like all the temporary files"
292+ $echo "removed from this directory? (y or n) \c"
293+-read resp
294++resp="y"
295+
296+ if [ "$resp" = "Y" -o "$resp" = "y" ] ; then
297+ \rm -rf $binaries $pathmods $rscripts $nscripts $dirs configure \
298
299=== added file 'packages/rpm/openvista-libs-5.3004.spec'
300--- packages/rpm/openvista-libs-5.3004.spec 1970-01-01 00:00:00 +0000
301+++ packages/rpm/openvista-libs-5.3004.spec 2009-07-18 03:03:33 +0000
302@@ -0,0 +1,86 @@
303+%ifarch x86_64
304+%define gtm_dist /opt/lsb-gtm/V5.3-004_x86_64
305+%else
306+%define gtm_dist /opt/lsb-gtm/V5.3-004_i686
307+%endif
308+
309+Name: openvista-libs-5.3004
310+Version: 0.8.4
311+Release: 1
312+Summary: GT.M External Calls for OpenVista
313+License: AGPL
314+Vendor: Medsphere Systems Corporation
315+URL: https://medsphere.org/community/project/gtm
316+Group: Applications/System
317+Packager: Jonathan Tai <jon.tai@medsphere.com>
318+
319+Provides: openvista-libs
320+
321+Requires(post): /usr/sbin/semanage, /sbin/restorecon
322+Requires(postun): /usr/sbin/semanage
323+
324+Requires: fis-gtm-5.3004
325+BuildRequires: fis-gtm-5.3004
326+
327+Obsoletes: openvista-libs
328+
329+Source: openvista-libs-5.3004-%{version}.tar.bz2
330+BuildRoot: %{_tmppath}/%{name}-root
331+
332+%description
333+OpenVista is a cost-effective, open, trusted and complete EHR which enhances
334+patient safety, increases clinical and operational efficiency and provides an
335+opportunity to improve quality of care delivery.
336+
337+This package provides a shared library that OpenVista code running in GT.M
338+calls out to for PAM authentication and duplicating a device onto a spawned
339+child's stdin/stdout. This package also provides an suid wrapper around GT.M
340+utilities used to send signals to other GT.M processes.
341+
342+%prep
343+%setup
344+
345+%build
346+cd src/libopenvista
347+echo 'export gtm_dist="%{gtm_dist}"' > env
348+. ./env
349+./compile.sh
350+
351+cd ../../
352+
353+cd src/gtmsignal
354+./compile.sh
355+
356+%install
357+rm -rf %{buildroot}
358+
359+install -d %{buildroot}%{gtm_dist}
360+install -m 550 src/libopenvista/libopenvista.so %{buildroot}%{gtm_dist}
361+install -m 440 src/libopenvista/openvista.xc %{buildroot}%{gtm_dist}
362+install -m 4550 src/gtmsignal/gtmsignal %{buildroot}%{gtm_dist}
363+
364+%clean
365+rm -rf %{buildroot}
366+
367+%files
368+%defattr(-,root,root)
369+%doc README
370+%doc COPYING
371+%doc COPYING.AGPL
372+%doc NEWS
373+%defattr(-,bin,gtm)
374+%{gtm_dist}/libopenvista.so
375+%{gtm_dist}/openvista.xc
376+%defattr(-,root,gtm)
377+%{gtm_dist}/gtmsignal
378+
379+%post
380+# See http://fedoraproject.org/wiki/PackagingDrafts/SELinux
381+/usr/sbin/semanage fcontext -a -t textrel_shlib_t %{gtm_dist}/libopenvista.so 2>/dev/null || :
382+/sbin/restorecon %{gtm_dist}/libopenvista.so || :
383+
384+%postun
385+# See http://fedoraproject.org/wiki/PackagingDrafts/SELinux
386+if [ $1 -eq 0 ]; then
387+ /usr/sbin/semanage fcontext -d -t textrel_shlib_t %{gtm_dist}/libopenvista.so 2>/dev/null || :
388+fi
389
390=== modified file 'scripts/usr/bin/ovcc'
391--- scripts/usr/bin/ovcc 2009-07-17 08:17:11 +0000
392+++ scripts/usr/bin/ovcc 2009-07-18 03:01:31 +0000
393@@ -88,6 +88,12 @@
394 # garbled (both JOBs will write to them in no particular order)
395 cd "$root/$instance/tmp"
396
397+# ensure that $PRINCIPAL is initialized to a NOCENABLE state. This removes a
398+# minuscule window where GT.M might recognize a <CTRL-C> and enter direct mode
399+# even if a USE $PRINCIPAL:NOCENABLE was the very first command executed.
400+gtm_nocenable=1
401+export gtm_nocenable
402+
403 # use exec to replace this script with the mumps process; this ensures that an
404 # ovcc user's session will end when the mumps process finishes (either
405 # gracefully or otherwise)
406
407=== modified file 'scripts/usr/bin/ovtied'
408--- scripts/usr/bin/ovtied 2009-07-17 08:17:11 +0000
409+++ scripts/usr/bin/ovtied 2009-07-18 03:01:31 +0000
410@@ -88,6 +88,12 @@
411 # garbled (both JOBs will write to them in no particular order)
412 cd "$root/$instance/tmp"
413
414+# ensure that $PRINCIPAL is initialized to a NOCENABLE state. This removes a
415+# minuscule window where GT.M might recognize a <CTRL-C> and enter direct mode
416+# even if a USE $PRINCIPAL:NOCENABLE was the very first command executed.
417+gtm_nocenable=1
418+export gtm_nocenable
419+
420 # use exec to replace this script with the mumps process; this ensures that a
421 # tied user's session will end when the mumps process finishes (either
422 # gracefully or otherwise)

Subscribers

People subscribed via source and target branches