<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://tech-pubs.net/wiki/index.php?action=history&amp;feed=atom&amp;title=%2Fvar%2Finst_documentation</id>
	<title>/var/inst documentation - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://tech-pubs.net/wiki/index.php?action=history&amp;feed=atom&amp;title=%2Fvar%2Finst_documentation"/>
	<link rel="alternate" type="text/html" href="https://tech-pubs.net/wiki/index.php?title=/var/inst_documentation&amp;action=history"/>
	<updated>2026-04-23T14:07:26Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://tech-pubs.net/wiki/index.php?title=/var/inst_documentation&amp;diff=402&amp;oldid=prev</id>
		<title>Raion: initial commit</title>
		<link rel="alternate" type="text/html" href="https://tech-pubs.net/wiki/index.php?title=/var/inst_documentation&amp;diff=402&amp;oldid=prev"/>
		<updated>2025-10-21T04:12:45Z</updated>

		<summary type="html">&lt;p&gt;initial commit&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Overview ==&lt;br /&gt;
Each file under /var/inst is a product definition — an installed-package record created by the IRIX &amp;lt;code&amp;gt;inst&amp;lt;/code&amp;gt; subsystem. These files are used by &amp;lt;code&amp;gt;inst&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;versions&amp;lt;/code&amp;gt;, and internal &amp;lt;code&amp;gt;libinst.so&amp;lt;/code&amp;gt; routines to reconstruct the system inventory.&lt;br /&gt;
&lt;br /&gt;
They are plain, uncompressed data streams comprising NUL-terminated ASCII records, which describe subsystems, components, conditions, paths, and metadata.&lt;br /&gt;
&lt;br /&gt;
== General Structure ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Element&lt;br /&gt;
!Type&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|Header Record&lt;br /&gt;
|Fixed ASCII string&lt;br /&gt;
|Always begins with &amp;lt;code&amp;gt;pd001VxxxP00&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;Vxxx&amp;lt;/code&amp;gt; encodes the inst database version (e.g. &amp;lt;code&amp;gt;V630&amp;lt;/code&amp;gt; = IRIX 6.3, &amp;lt;code&amp;gt;V650&amp;lt;/code&amp;gt; = IRIX 6.5).&lt;br /&gt;
|-&lt;br /&gt;
|Body Records&lt;br /&gt;
|Variable-length, NUL-terminated strings&lt;br /&gt;
|Contain subsystem, component, description, condition, path information.&lt;br /&gt;
|-&lt;br /&gt;
|Footer / Terminator&lt;br /&gt;
|EOF&lt;br /&gt;
|Files end at EOF; no explicit checksum or final sentinel required.&lt;br /&gt;
|}&lt;br /&gt;
Encoding: ASCII (7-bit) Delimiter: NUL (\0) Compression: None&lt;br /&gt;
&lt;br /&gt;
== Common Record Types (Observed) ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Token / Prefix&lt;br /&gt;
!Likely Meaning&lt;br /&gt;
!Example&lt;br /&gt;
|-&lt;br /&gt;
|(no prefix)&lt;br /&gt;
|Product name or subsystem identifier&lt;br /&gt;
|&amp;lt;code&amp;gt;sgi_apache&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;x_eoe&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* | Human-readable description | &amp;lt;code&amp;gt;+SGI Web Server based on Apache, 1.3.35&amp;lt;/code&amp;gt; ) | Source directory or source-related tag | &amp;lt;code&amp;gt;)d/usr/people/.../dist&amp;lt;/code&amp;gt; $, &amp;#039;, &amp;amp; | UI label or alternate descriptor | &amp;lt;code&amp;gt;$SGI Web Server Release Notes, 1.3.35&amp;lt;/code&amp;gt; patch*, maint* | Patch / maintenance relationships | &amp;lt;code&amp;gt;patch*sgi_apache_sw&amp;lt;/code&amp;gt; T/ | Target installation path | &amp;lt;code&amp;gt;T/var/sgi_apache/server/share/...&amp;lt;/code&amp;gt; d | Build or distribution tag | &amp;lt;code&amp;gt;d10.0.0.206:love.6530.app&amp;lt;/code&amp;gt; P_ | Timestamp pair (installation/build timestamps) | &amp;lt;code&amp;gt;P1147443119_1279655720&amp;lt;/code&amp;gt; Conditionals | &amp;lt;code&amp;gt;!noship&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!!noship&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;!noship &amp;amp;&amp;amp; DEV&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; | Installation conditions / policy expressions Architecture markers | &amp;lt;code&amp;gt;LE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;8wu&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;OT&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;NT&amp;lt;/code&amp;gt;, etc. | Platform/build variant markers (exact semantics TBD)&lt;br /&gt;
&lt;br /&gt;
== Logical Hierarchy ==&lt;br /&gt;
Although stored sequentially, the file encodes a logical tree:&lt;br /&gt;
&lt;br /&gt;
PRODUCT ├─ SUBSYSTEM │ ├─ COMPONENT │ ├─ PATHS / DOCS │ ├─ PATCH / MAINT relationships │ └─ CONDITIONS └─ GLOBAL METADATA (timestamps, build tags)&lt;br /&gt;
&lt;br /&gt;
== Parsing Heuristics ==&lt;br /&gt;
&lt;br /&gt;
# Read the first token; it must match the header &amp;lt;code&amp;gt;pd001VxxxP00&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Iterate NUL-delimited ASCII strings in order:&lt;br /&gt;
#* Short lowercase tokens → subsystem/component names.&lt;br /&gt;
#* Tokens beginning with +, &amp;amp;, $, &amp;#039; → descriptions/labels.&lt;br /&gt;
#* Tokens beginning with &amp;lt;code&amp;gt;patch*&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;maint*&amp;lt;/code&amp;gt; → relationships.&lt;br /&gt;
#* Tokens beginning with &amp;lt;code&amp;gt;T/&amp;lt;/code&amp;gt; or containing &amp;lt;code&amp;gt;/usr/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/var/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/lib/&amp;lt;/code&amp;gt; → paths.&lt;br /&gt;
#* Tokens containing &amp;lt;code&amp;gt;love.&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;d&amp;lt;version&amp;gt;&amp;lt;/code&amp;gt; → build/installer annotations.&lt;br /&gt;
# Group contiguous tokens into one logical block until the next subsystem name is encountered.&lt;br /&gt;
&lt;br /&gt;
== Header Versions (Observed) ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Header&lt;br /&gt;
!IRIX Family&lt;br /&gt;
|-&lt;br /&gt;
|pd001V530P00&lt;br /&gt;
|IRIX 5.3&lt;br /&gt;
|-&lt;br /&gt;
|pd001V630P00&lt;br /&gt;
|IRIX 6.3&lt;br /&gt;
|-&lt;br /&gt;
|pd001V650P00&lt;br /&gt;
|IRIX 6.5&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example (Simplified) ==&lt;br /&gt;
pd001V650P00 x_eoe &amp;amp;X11 Execution Environment, 6.5.30 d10.0.0.206:love.6530.app P123456789_987654321 books &amp;amp;X11 Documentation patch&amp;#039;&amp;#039;x_eoe_books maint&amp;#039;&amp;#039;x_eoe_books x_eoe_sw64 &amp;amp;X11 64-bit Executables&lt;br /&gt;
&lt;br /&gt;
== Observations &amp;amp; Notes ==&lt;br /&gt;
&lt;br /&gt;
* Files are mostly human-readable ASCII when examined as strings.&lt;br /&gt;
* Fields like descriptions may appear more than once (UI label vs. internal label).&lt;br /&gt;
* Repeated binary-looking sequences (e.g. control bytes) appear between string groups; these are likely structural delimiters or metadata bytes.&lt;br /&gt;
* The &amp;lt;code&amp;gt;love.*&amp;lt;/code&amp;gt; token is used by community installers (miniroot/overlay markers); treat it as an opaque distribution label unless confirmed otherwise.&lt;br /&gt;
&lt;br /&gt;
== Unknowns / Open Research ==&lt;br /&gt;
&lt;br /&gt;
* Exact semantics for architecture/variant tokens like 8wu, LE, OT, NT.&lt;br /&gt;
* Full truth table for conditional expressions (!noship, !!noship, and boolean combos).&lt;br /&gt;
* Precise internal representation used by libinst.so — RE of libinst would confirm concrete struct layouts.&lt;br /&gt;
* Relationship and synchronization logic between /var/inst product files and any central index (e.g., /var/inst/installed if present).&lt;br /&gt;
&lt;br /&gt;
== Recommended Next Steps ==&lt;br /&gt;
&lt;br /&gt;
# Collect /var/inst files from IRIX 6.2–6.5 and diff identical products across versions.&lt;br /&gt;
# Cross-validate parsed results against &amp;lt;code&amp;gt;versions -v&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;inst&amp;lt;/code&amp;gt; outputs on IRIX (when possible).&lt;br /&gt;
# RE &amp;lt;code&amp;gt;libinst.so&amp;lt;/code&amp;gt; (symbols like &amp;lt;code&amp;gt;inst_read_*&amp;lt;/code&amp;gt;) to confirm struct field types and ordering.&lt;br /&gt;
# Implement a minimal C parser (library) that:&lt;br /&gt;
#* Iterates NUL-delimited strings&lt;br /&gt;
#* Classifies tokens by the heuristics above&lt;br /&gt;
#* Builds an in-memory tree (PRODUCT → SUBSYSTEM → COMPONENT) for &amp;lt;code&amp;gt;versions&amp;lt;/code&amp;gt;-like queries&lt;br /&gt;
&lt;br /&gt;
== Goal ==&lt;br /&gt;
Produce a portable C library to:&lt;br /&gt;
&lt;br /&gt;
* Read /var/inst product files,&lt;br /&gt;
* Reconstruct their logical hierarchy,&lt;br /&gt;
* Provide an API for &amp;lt;code&amp;gt;versions&amp;lt;/code&amp;gt;-style checks and comparisons on non-IRIX hosts.&lt;br /&gt;
&lt;br /&gt;
This document is a living draft. Contributions and empirical data (dumps, offsets, diffs) are encouraged to refine and finalize the format.&lt;/div&gt;</summary>
		<author><name>Raion</name></author>
	</entry>
</feed>