[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Connecting those interested in getting GT.M into theDebianrepositories



Hi everyone,

I now have a draft version of a Debian installation package for the 32-bit version of GT.M that I'd like to submit for your feedback. Once we get any problems ironed out, I'll simply pattern the 64-bit version after it. In the mean time, I thought I'd save myself the double work.

A lot of discussion has ensued since we began, and I'm not sure if I hit all the points. Here, though, I can summarize what I've done to build the package. My apologies to everyone for any details that I missed.

The package contains the result of running the GT.M 'config' script to install GT.M in '/usr/lib/fis-gtm/V5.4-000A_x86' with a twist. To allow someone to use 'dpkg -x' without root privileges, I changed the permissions on the directories that initially had 555 to 755. The 'postinst' script resets these directories to 555.

Although the package contains the .o versions of the MUMPS routines, the 'postinst' script recompiles them all.

I don't know whether the internal number for the 'bin' user is guaranteed to be '2' on all systems, so the 'postinst' script changes ownership of the installed files to root:bin or bin:bin, whichever is appropriate.

The 'postinst' script uses update-alternatives to setup 'gtm-su' (single-user). My hope is that we can keep this name (or something similar) because I've also been working on a set of scripts, one of which is named 'gtm'. These scripts help to configure a GT.M multi-user environment, enter it, etc. Once the GT.M package is out there, I'd be interested in sharing these scripts.

Since I'm not certain precisely how to proceed from here, I'll include the postinst script below and ask for the group's feedback on what to do next.

Also, I've added my public e-mail address of 'alan.oneill@cavtel.net' to the Debian Med list, so please feel free to remove my private e-mail address that you've been using when you respond. (I keep these things separate because of spam.)

Thanks, and I look forward to hearing from you.

Alan

----------[ postinst script ]----------

#!/bin/sh

# ----------------------------------------------------------------------

version="V5.4-000A_x86"
priority="540001"
icu_version=4.2
owner="bin"

# ----------------------------------------------------------------------

update-alternatives --install /usr/bin/gtm-su gtm-su /usr/lib/fis-gtm/$version/gtm $priority

# Prevent %GTM-I-NOTERMENTRY errors when compiling MUMPS routines
TERM=dumb
export TERM

cd "/usr/lib/fis-gtm/$version"
echo -n "Compiling MUMPS routines..."
. ./gtmprofile_preV54000
for routine in *.m; do
        echo -n "."
        mumps $routine
        chmod 444 "`echo $routine | sed s/[.]m/.o/`"
done
chown $owner:$owner *.o
echo "Done."

echo -n "Compiling UTF-8 versions of MUMPS routines..."
export gtm_chset=UTF-8
export gtm_icu_version=$icu_version
export LC_ALL=en_US.utf8
. ./gtmprofile_preV54000
cd utf8
for routine in *.m; do
        echo -n "."
        mumps $routine
        chmod 444 "`echo $routine | sed s/[.]m/.o/`"
done
chown $owner:$owner *.o
echo "Done."

# Make sure ownership values are correct
cd /usr/lib/fis-gtm
chown -R --from=0:2 root:$owner "$version"
chown -R --from=2:2 $owner:$owner "$version"

# Update permissions on UTF-8 directories
chmod 555 "$version" "$version/utf8" "$version/plugin" "$version/plugin/gtmcrypt" "$version/plugin/gtmcrypt/utf8"


Reply to: