Skip to content

udt demo

Gordon Heydon edited this page Aug 24, 2026 · 5 revisions

UniData demo account walkthrough

A shell transcript of version-controlling records in UniData's bundled demo account with init / add / commit.

Installing is documented separately and more fully in Installing on UniData. This page is the walkthrough that follows it.

Captured from a fresh Rocky 8 + UniData 8.3.2 container (the udt-builder image).

Prerequisites

  • A running UniData server with UniObjects/UniRPC available (unirpcd listening, the udcs service, a login user + password). A stock UniData install has this; for the build container see the appendix.

  • The bundled demo account ($UDTHOME/demo).

  • libgit2 at runtime. The release binary links libgit2.so.1.7 (libgit2's soname is major.minor, so a different series won't load). On Enterprise Linux 8 that comes straight from EPEL — no compiler needed:

    $ sudo dnf install -y epel-release
    $ sudo dnf install -y libgit2_1.7

    Confirm the release actually resolves it with sh preflight.sh. (The base RHEL/Rocky 8 libgit2 is 0.26 and will not work. Building udt-git yourself needs libgit2 ≥ 1.0, and the resulting binary needs whatever series you built it against — the official EL8 build uses EPEL's libgit2_1.7.)

1 — Install

See Installing on UniData for the full procedure. In short, from the latest release:

$ tar xzf mv_git-2.0.0-udt-linux-x86_64-le.tar.gz
$ cd mv_git
$ ./install.sh

That installs udt-git to /usr/local/bin, builds the CallC library, and globally catalogs the GIT verb.

2 — Identify yourself to git

udt-git runs a UniData session as you — there is no host, service or password to configure. Only git's own author identity is needed:

$ export GIT_AUTHOR_NAME="Demo User" GIT_AUTHOR_EMAIL=demo@example.com

Older revisions of this page set UDT_HOST, UDT_SERVICE, UDT_USER and UDT_PASSWORD for a UniObjects/UniRPC connection. The CLI no longer uses that route — it authenticated with a stored password rather than as the person running the command (#45). Those variables, and the UniRPC server setup, are no longer required.

3 — Version-control the demo account

$ udt-git -a /usr/ud83/demo init
initialised empty git repository

$ udt-git -a /usr/ud83/demo add CLIENTS
staged 130 record(s)

$ udt-git -a /usr/ud83/demo status
A  CLIENTS/10000
A  CLIENTS/10001
A  CLIENTS/10002
A  CLIENTS/10003
   ... (130 records staged)

$ udt-git -a /usr/ud83/demo commit -m "Import the demo CLIENTS file into git"
[f31048b] Import the demo CLIENTS file into git

$ udt-git -a /usr/ud83/demo log
f31048b Import the demo CLIENTS file into git

The working tree is the live records — show reads a committed record back out of git (attribute marks shown as ·):

$ udt-git -a /usr/ud83/demo show CLIENTS 10000
Andre·CHANGED CITY·Otis Concrete·854 Ivy St.·Suite 4200·Phoenix·AZ·...

That's the whole loop: a UniData file's records committed to git, and read back from history — no export copy, the account's own records are the working tree.


Appendix — configuring the build container as a UniData server

No longer needed for udt-git. This turned the build container into a UniObjects/UniRPC server, which the CLI required before #45. It is kept only for anyone who needs UniRPC for other reasons.

The udt-builder image is built for compiling packages (it runs udt locally), so it ships without the UniObjects/UniRPC server layer. These one-time steps turn it into a server udt-git can connect to (run as root in the container):

UDTBIN=/usr/ud83/bin ; US=/usr/ud83/unishared

# 1. Unishared area + the UniRPC service map (udcs -> udapi_server)
mkdir -p "$US/unirpc"
cp "$UDTBIN/unirpcd" "$US/unirpc/unirpcd"
cat > "$US/unirpc/unirpcservices" <<EOF
udcs   $UDTBIN/udapi_server * TCP/IP 0 3600
defcs  $UDTBIN/udapi_server * TCP/IP 0 3600
udserver $UDTBIN/udsrvd     * TCP/IP 0 3600
EOF
chmod 600 "$US/unirpc/unirpcservices"
echo "$US" > /.unishared
grep -q uvrpc /etc/services || echo "uvrpc 31438/tcp" >> /etc/services

# 2. PAM service for the UniObjects login (else it falls through to pam_deny)
cat > /etc/pam.d/udcs <<'PAM'
auth     required pam_unix.so nullok
account  required pam_unix.so
password required pam_unix.so
session  required pam_unix.so
PAM

# 3. a login the client authenticates as
echo 'root:rootdemo' | chpasswd

# 4. libgit2 ownership guard (demo ships owned by the install user)
printf '[safe]\n\tdirectory = *\n' > /etc/gitconfig

# 5. start the UniRPC daemon (run the container with --init so it is reaped)
setsid "$US/unirpc/unirpcd" >/tmp/unirpcd.log 2>&1 </dev/null

Notes from getting this working:

  • unirpcd reported listen failed purely because /.unishared + unirpcservices were missing; with them it binds 31438.
  • The session error 80011 is IE_BAD_LOGINNAME — a login/PAM failure, not a licensing wall. The missing /etc/pam.d/udcs was the cause (default /etc/pam.d/other is pam_deny).
  • Run the container with docker run --init … so unirpcd's children are reaped, or the daemon won't stay up.

Clone this wiki locally