<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Home on AppBundle Documentation &amp; Implementation Details</title>
    <link>https://pelf.xplshn.com.ar/</link>
    <description>Recent content in Home on AppBundle Documentation &amp; Implementation Details</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Sat, 12 Jul 2025 14:25:11 +0000</lastBuildDate>
    <atom:link href="https://pelf.xplshn.com.ar/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Tooling Usage &amp; Explanation</title>
      <link>https://pelf.xplshn.com.ar/docs/tooling/</link>
      <pubDate>Sat, 12 Jul 2025 14:25:11 +0000</pubDate>
      <guid>https://pelf.xplshn.com.ar/docs/tooling/</guid>
      <description>&lt;h2 id=&#34;pelf&#34;&gt;&lt;code&gt;pelf&lt;/code&gt;&lt;/h2&gt;&#xA;&lt;p&gt;The &lt;code&gt;pelf&lt;/code&gt; command is responsible for assembling an AppBundle by combining an ELF runtime, runtime information, static tools, and a compressed filesystem image.&lt;/p&gt;&#xA;&lt;h3 id=&#34;functionality&#34;&gt;Functionality&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Purpose&lt;/strong&gt;: Creates an AppBundle from an AppDir, embedding necessary metadata and tools.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Key Operations&lt;/strong&gt;:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Reads an AppDir, verifies that it contains an executable AppRun&lt;/li&gt;&#xA;&lt;li&gt;Copies the runtime to the output file&lt;/li&gt;&#xA;&lt;li&gt;Embeds runtime information (MessagePack format) in the &lt;code&gt;.pbundle_runtime_info&lt;/code&gt; section of the output file&lt;/li&gt;&#xA;&lt;li&gt;If the runtime is a universal runtime (e.g: noEmbed edition), it puts a ZSTD-compressed tar archive of static tools (depending the chosen filesystem: e.g., &lt;code&gt;dwarfs&lt;/code&gt;, &lt;code&gt;squashfuse&lt;/code&gt;, &lt;code&gt;unsquashfs&lt;/code&gt;) in the &lt;code&gt;.pbundle_static_tools&lt;/code&gt; section of the output file.&lt;/li&gt;&#xA;&lt;li&gt;Compresses the AppDir into a DwarFS or SquashFS filesystem image and appends it to the output file&lt;/li&gt;&#xA;&lt;li&gt;Sets the AppBundle&amp;rsquo;s executable permissions and finalizes the output file.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;command-line-usage&#34;&gt;Command-Line Usage&lt;/h3&gt;&#xA;&lt;p&gt;The pelf tool is can be invoked with the following flags:&lt;/p&gt;</description>
    </item>
    <item>
      <title>AppBundle Runtime Logic Specification</title>
      <link>https://pelf.xplshn.com.ar/docs/runtime/</link>
      <pubDate>Sat, 12 Jul 2025 12:15:35 +0000</pubDate>
      <guid>https://pelf.xplshn.com.ar/docs/runtime/</guid>
      <description>&lt;p&gt;This document describes how the AppBundle runtime operates, including how it reads its own information, extracts static tools, determines environment variables, and handles runtime flags.&lt;/p&gt;&#xA;&lt;h2 id=&#34;execution-flow&#34;&gt;Execution Flow&lt;/h2&gt;&#xA;&lt;p&gt;When an AppBundle is executed, the runtime performs the following steps:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Read Runtime Information&lt;/strong&gt;:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The runtime reads the &lt;code&gt;.pbundle_runtime_info&lt;/code&gt; section from the ELF file, which contains CBOR-encoded metadata.&lt;/li&gt;&#xA;&lt;li&gt;This section includes:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;AppBundleID&lt;/code&gt;: A unique identifier for the AppBundle. (e.g: &amp;ldquo;com.brave.Browser-xplshn-2025-05-19&amp;rdquo;. You&amp;rsquo;re not forced to follow this format, but if you do, you can create a &lt;a href=&#34;https://github.com/xplshn/dbin&#34;&gt;dbin&lt;/a&gt; repository that countains your AppBundle by using our &lt;a href=&#34;https://github.com/xplshn/pelf/blob/master/cmd/misc/appstream-helper/appstream-helper.go&#34;&gt;appstream-helper&lt;/a&gt; tool. &lt;code&gt;$NAME-$MAINTAINER-$DATE&lt;/code&gt; or preferably: &lt;code&gt;$APPSTREAM_ID-$MAINTAINER-$DATE&lt;/code&gt;, so that you don&amp;rsquo;t have to include an AppStream file within the AppDir for appstream-helper to get metadata from it)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;PelfVersion&lt;/code&gt;: The version of the &lt;code&gt;pelf&lt;/code&gt; tool used to create the AppBundle.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;HostInfo&lt;/code&gt;: System information from &lt;code&gt;uname -mrsp(v)&lt;/code&gt; of the build machine.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;FilesystemType&lt;/code&gt;: Either &amp;ldquo;dwarfs&amp;rdquo; or &amp;ldquo;squashfs&amp;rdquo;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;Hash&lt;/code&gt;: A hash of the filesystem image for integrity verification.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;DisableRandomWorkDir&lt;/code&gt;: A boolean indicating whether to use a fixed working directory.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;MountOrExtract&lt;/code&gt;: A uint8 value (0–3) specifying the run behavior (see below).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;The runtime uses this information to configure its behavior and locate the filesystem image.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Extract Static Tools&lt;/strong&gt;:&lt;/p&gt;</description>
    </item>
    <item>
      <title>AppBundle File Format Specification</title>
      <link>https://pelf.xplshn.com.ar/docs/format/</link>
      <pubDate>Sat, 12 Jul 2025 11:00:32 +0000</pubDate>
      <guid>https://pelf.xplshn.com.ar/docs/format/</guid>
      <description>&lt;p&gt;This document outlines the structure and composition of an AppBundle, a self-contained executable format designed to package applications with their dependencies for portable execution on Linux systems.&lt;/p&gt;&#xA;&lt;h2 id=&#34;file-structure&#34;&gt;File Structure&lt;/h2&gt;&#xA;&lt;p&gt;An AppBundle is a single executable file that combines an ELF (Executable and Linkable Format) runtime with an appended filesystem image containing the application&amp;rsquo;s data. The structure is as follows:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;ELF Runtime&lt;/strong&gt;:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The AppBundle begins with an ELF executable, identifiable by the magic bytes &amp;ldquo;AB&amp;rdquo; or optionally &amp;ldquo;AI&amp;rdquo; at the start of the file.&lt;/li&gt;&#xA;&lt;li&gt;This runtime is responsible for handling the execution logic, including mounting or extracting the filesystem image and setting up the environment.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Runtime Information Section (.pbundle_runtime_info)&lt;/strong&gt;:&lt;/p&gt;</description>
    </item>
    <item>
      <title>AppBundleID Format Specification</title>
      <link>https://pelf.xplshn.com.ar/docs/appbundleid/</link>
      <pubDate>Sat, 12 Jul 2025 11:00:32 +0000</pubDate>
      <guid>https://pelf.xplshn.com.ar/docs/appbundleid/</guid>
      <description>&lt;p&gt;An &lt;code&gt;AppBundleID&lt;/code&gt; is required for every AppBundle to ensure proper functionality, such as generating the &lt;code&gt;mountDir&lt;/code&gt; and enabling tools like &lt;code&gt;appstream-helper&lt;/code&gt; to figure out info about the AppBundle. It can be non-compliant (i.e., not follow Type I, II, or III) if distribution via AppBundleHUB or &lt;code&gt;dbin&lt;/code&gt; is not intended.&lt;/p&gt;&#xA;&lt;h2 id=&#34;supported-formats&#34;&gt;Supported Formats&lt;/h2&gt;&#xA;&lt;h3 id=&#34;type-i-legacy-format&#34;&gt;Type I: Legacy Format&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Structure&lt;/strong&gt;: &lt;code&gt;name-versionString-maintainer&lt;/code&gt; or &lt;code&gt;name-date-maintainer&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Examples&lt;/strong&gt;: &lt;code&gt;steam-v128.0.3-xplshn&lt;/code&gt;, &lt;code&gt;steam-20250101-xplshn&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Description&lt;/strong&gt;: Consists of the application name, either a version or date, and the maintainer/repository identifier. Suitable for filenames on systems with restrictive character support (e.g., no &lt;code&gt;#&lt;/code&gt;, &lt;code&gt;:&lt;/code&gt;).&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Use Case&lt;/strong&gt;: Legacy distribution; preferred only for filenames&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;type-ii-modern-format-without-date&#34;&gt;Type II: Modern Format without Date&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Structure&lt;/strong&gt;: &lt;code&gt;name#repo[:version]&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Examples&lt;/strong&gt;: &lt;code&gt;steam#xplshn:v128.0.3&lt;/code&gt;, &lt;code&gt;steam#xplshn&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Description&lt;/strong&gt;: Includes the application name, repository/maintainer, and an optional version. Uses &lt;code&gt;#&lt;/code&gt; to separate name and repository, with &lt;code&gt;:&lt;/code&gt; for version.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Use Case&lt;/strong&gt;: Most preferred format, in its short-form version&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;type-iii-modern-format-with-optional-date&#34;&gt;Type III: Modern Format with Optional Date&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Structure&lt;/strong&gt;: &lt;code&gt;name#repo[:version][@date]&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Examples&lt;/strong&gt;: &lt;code&gt;steam#xplshn:v128.0.3@20250101&lt;/code&gt;, &lt;code&gt;steam#xplshn@20250101&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Description&lt;/strong&gt;: The most flexible format, including application name, repository/maintainer, optional version, and optional date. Uses &lt;code&gt;#&lt;/code&gt;, &lt;code&gt;:&lt;/code&gt;, and &lt;code&gt;@&lt;/code&gt; as separators.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Use Case&lt;/strong&gt;: Most preferred format, as it contains the most complete data for &lt;code&gt;appstream-helper&lt;/code&gt; to parse&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;requirements-and-usage&#34;&gt;Requirements and Usage&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;AppBundleHUB Distribution&lt;/strong&gt;: For inclusion in AppBundleHUB or &lt;code&gt;dbin&lt;/code&gt; repositories, the &lt;code&gt;AppBundleID&lt;/code&gt; must adhere to Type I, II, or III, as these formats allow &lt;code&gt;appstream-helper&lt;/code&gt; to parse metadata (name/appstreamID, version, maintainer, date) for automated repository indexing.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Recommendation&lt;/strong&gt;: Type III is encouraged for the AppBundleID, as it is the most complete while Type I is recommended for AppBundle filenames on systems that may not support special characters like &lt;code&gt;#&lt;/code&gt;, &lt;code&gt;:&lt;/code&gt;, or &lt;code&gt;@&lt;/code&gt; used in Type II and Type III.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1 id=&#34;notes&#34;&gt;NOTEs&lt;/h1&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The program&amp;rsquo;s AppStreamID should be used as the Name in the AppBundleID if the AppBundle does not ship with an .xml appstream metainfo file in the top-level of its AppDir. This way &lt;code&gt;appstream-helper&lt;/code&gt; can use scrapped Flathub data to automatically populate a .description, .icon, .screenshots, .rank &amp;amp; .version entry for the &lt;code&gt;dbin&lt;/code&gt; repository index file&lt;/li&gt;&#xA;&lt;li&gt;Type I, II &amp;amp; III are all parsable by &lt;code&gt;appstream-helper&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;</description>
    </item>
  </channel>
</rss>
