-
Notifications
You must be signed in to change notification settings - Fork 0
udt demo
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).
-
A running UniData server with UniObjects/UniRPC available (
unirpcdlistening, theudcsservice, a login user + password). A stock UniData install has this; for the build container see the appendix. -
The bundled
demoaccount ($UDTHOME/demo). -
libgit2at runtime. The release binary linkslibgit2.so.1.7(libgit2's soname ismajor.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 8libgit2is 0.26 and will not work. Buildingudt-gityourself needs libgit2 ≥ 1.0, and the resulting binary needs whatever series you built it against — the official EL8 build uses EPEL'slibgit2_1.7.)
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.shThat installs udt-git to /usr/local/bin, builds the CallC library, and
globally catalogs the GIT verb.
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.comOlder revisions of this page set
UDT_HOST,UDT_SERVICE,UDT_USERandUDT_PASSWORDfor 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.
$ 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 gitThe 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.
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/nullNotes from getting this working:
-
unirpcdreported listen failed purely because/.unishared+unirpcserviceswere missing; with them it binds 31438. - The session error
80011isIE_BAD_LOGINNAME— a login/PAM failure, not a licensing wall. The missing/etc/pam.d/udcswas the cause (default/etc/pam.d/otherispam_deny). - Run the container with
docker run --init …sounirpcd's children are reaped, or the daemon won't stay up.
Start here
Install
Reference
Related