Migrating Xi-Text from a Tarball Installation to a Package
The order, the export and restore commands, and the systemd unit the package will not replace
You have Xi-Text installed from a tarball and you want the native RPM or Debian package on the same machine. This article gives the order and the commands. Choosing a Distribution Format covers what a removal takes with it, and Migrating Xi-Text to Another System explains what the export carries; read the removal section of the first before you start.
The licence remains valid. It is bound to the machine, and the machine is not changing, so the same licence file works in the new installation.
The systemd unit is the one thing the package will not replace
Both package formats keep a unit file that is already there. The RPM prints Not changing existing systemd file; the Debian package prints postinst: keeping existing /lib/systemd/system/xitext.service. The reason is sound - an administrator who has edited the unit does not want it overwritten - and it has a consequence for this migration.
A tarball installation made before 1.25.5 wrote a unit without TimeoutStopSec=330 and KillMode=mixed, which the package has carried since the July 2026 work. Those two directives are what lets a stop finish. A graceful stop halts every printer, syncs the spool and only then removes the SysV shared memory, and sstop itself waits up to 300 seconds; systemd's default stop timeout is 90. Under the thinner unit, systemctl stop could SIGKILL the scheduler part-way through shutdown and leave the shared memory segments behind, which ipcs then shows with no dest flag.
The tarball installer and the Debian package write the unit to /lib/systemd/system/xitext.service and the RPM to /usr/lib/systemd/system/xitext.service. Where /lib is a symlink to /usr/lib, which it is on the Linux distributions these packages are built for, those are one file - so the package finds the tarball's unit and keeps it.
From 1.25.5 the tarball installer writes the same unit as the package, so a tarball installation made with 1.25.5 or later carries the full unit already.
Drop-ins under /etc/systemd/system/xitext.service.d/ are left alone by every route - the tarball installer, both packages, and removal. A drop-in you rely on survives the migration and still applies afterwards.
Two further facts about the unit under a package follow from the same code. Removal deletes the unit file, on upgrade as well as on removal, and the install writes it again - so an edit made directly to the unit file is lost at the next package upgrade. Put changes in a drop-in instead.
What to do
Step 1: establish what you have, and where
rpm -qa | grep xitext
dpkg -l | grep xitext
cat /etc/xi/textconfig
Where neither package query names the product, the installation is from a tarball. Read the spool, user-programs and internal-programs directories out of /etc/xi/textconfig and use those values in the commands below: a blend installs into different directories, and the paths in this article are the default ones.
Step 2: stop the spooler
sstop -y
ps -ef | grep spshed
ipcs -m
Let sstop finish rather than interrupting it. ipcs -m afterwards confirms the shared memory has gone; a segment left behind is the fault the unit change addresses, and clearing it before the migration saves diagnosing it afterwards.
Step 3: export the jobs, printers and users
BACKUP_DIR=/var/tmp/textsave
mkdir -p "$BACKUP_DIR/Scripts"
xt-cjlist -D /var/spool/xi/spd spshed_jfile "$BACKUP_DIR/joblist.sh" "$BACKUP_DIR/Scripts"
xt-cplist -D /var/spool/xi/spd spshed_pfile "$BACKUP_DIR/ptrlist.sh"
xt-spuconv -D /var/spool/xi/spd spufile23 "$BACKUP_DIR/userlist.sh"
cp /etc/xi/textconfig /etc/xi/text-hosts "$BACKUP_DIR/"
Check the file names against the spool directory before typing them; the format generation forms part of the user file's name.
Step 4: copy the printer setup directories
The setup directories hold the form types, paper types and printer definitions, and the export scripts do not carry them. Copy them as they stand, from the location named in textconfig.
Step 5: copy the licence file somewhere the removal cannot reach
cp /usr/libexec/xi/.xitext.lic /root/xitext.lic.saved
xt-checklic
This is the step that is missed. The removal takes the licence with it, and a licence file cannot be reconstructed on the machine - a replacement needs codes from the customer portal. Record what xt-checklic reports now, so you can compare it afterwards.
Step 6: remove the tarball installation by its own route
Run the tarball's DEINSTALL.sh, as described in Removing Xi-Text from a System. It stops the spooler, disables the service and removes the unit file.
Step 7: confirm no unit file is left
ls -l /lib/systemd/system/xitext.service /usr/lib/systemd/system/xitext.service
ls -l /etc/systemd/system/xitext.service.d/ 2>/dev/null
Both paths are listed because the formats disagree about which to write. Where a unit file remains, remove it before installing the package, or the package keeps it and you end up running the thinner unit - and its missing stop timeout - under a packaged installation. Leave any drop-in directory in place.
Step 8: install the package
sudo rpm -ivh xitext-<variant>-1.25.5+<buildref>-x86_64-linux-rockylinux9.rpm
Or for a Debian system:
sudo dpkg -i xitext-<variant>-1.25.5+<buildref>-x86_64-linux-debian13.deb
The install writes the configuration, sets the service user and permissions, writes a trial licence because no licence file is present at that moment, writes the unit, and enables and starts the service.
Step 9: put your own licence back over the trial
sstop -y
sudo cp /root/xitext.lic.saved /usr/libexec/xi/.xitext.lic
xt-checklic
Confirm the licence and the end date are the ones you recorded in step 5. Where xt-checklic reports the licence invalid, the machine's identity has changed and you need new codes from the customer portal.
Step 10: restore the configuration, then users, printers and jobs
Put the configuration files and the printer setup directories back first, then restore in this order.
sh "$BACKUP_DIR/userlist.sh" # users; spuchange edits the user file directly
sh "$BACKUP_DIR/ptrlist.sh" # printers; spadd starts the spooler itself
sh "$BACKUP_DIR/joblist.sh" # jobs; spr requires a running spooler
Users come first because a printer or job owned by a user the system does not yet know is rejected. Jobs come last because spr exits with Spooler not running without a spooler, and the printer script starts one.
Step 11: verify
systemctl cat xitext
systemctl status xitext
splist
sqlist
xt-checklic
systemctl cat shows the unit the machine ended up with, together with any drop-in. Confirm it carries TimeoutStopSec and KillMode=mixed; their absence means the old unit survived step 7. Then confirm the printers and jobs match what you exported, and that the form types are present on each printer.
Stop and start the service once as a final check, and run ipcs -m after the stop: with the shipped unit the shared memory is released, which is what the two directives are there to allow.
Related articles
Choosing a Distribution Format - RPM, Debian Package or Tarball
What each format gives you, which platforms have which, and what an upgrade or removal does to your queue and licence
Migrating Xi-Text to Another System
Exporting the print queue, printers and users with xt-backup, and restoring them on a newly licensed machine
Removing Xi-Text from a System
What to save first, how to remove an RPM, Debian package or tarball, and what each route destroys, licence included