<?xml version="1.0" encoding="UTF-8" standalone="yes"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-us"><id>https://blog.pgxn.org/tags/bundle/</id><title>Bundle</title><updated>2024-01-31T16:52:19Z</updated><link rel="self" type="application/atom+xml" href="https://blog.pgxn.org/tags/bundle/feed.xml"/><link rel="alternate" type="text/html" href="https://blog.pgxn.org/tags/bundle/"/><author><name>The PGXN Maintainers</name></author><generator uri="https://gohugo.io/" version="0.167.0">Hugo</generator><entry><id>https://blog.pgxn.org/post/741049567045468160</id><title type="html">PGXN Tools Docker Image Updated</title><link rel="alternate" type="text/html" href="https://blog.pgxn.org/2024/pgxn-tools-v4/"/><updated>2026-10-07T16:13:48Z</updated><published>2024-01-31T16:52:19Z</published><author><name>David E. Wheeler</name></author><category scheme="https://blog.pgxn.org/tags" term="pgxn" label="PGXN"/><category scheme="https://blog.pgxn.org/tags" term="docker" label="Docker"/><category scheme="https://blog.pgxn.org/tags" term="github-actions" label="GitHub Actions"/><category scheme="https://blog.pgxn.org/tags" term="github-workflows" label="GitHub Workflows"/><category scheme="https://blog.pgxn.org/tags" term="release" label="Release"/><category scheme="https://blog.pgxn.org/tags" term="bundle" label="Bundle"/><summary type="html"><![CDATA[<p>Just a quick note to highlight some bug fixes and improvements in the
<a href="https://github.com/pgxn/docker-pgxn-tools/">pgxn/pgxn-tools Docker image</a> in the last few weeks.</p>
<p>v1.4.0 adds the <code>GIT_BUNDLE_OPTS</code> and <code>ZIP_BUNDLE_OPTS</code> environment variables.
The former is passed to <code>git archive</code> and the latter to zip, and let
additional options be passed to those commands. For example, the <a href="https://pgxn.org/dist/vectorize/">vectorize
extension</a>&rsquo;s <a href="https://github.com/tembo-io/pg_vectorize/blob/v0.9.0/.github/workflows/pgxn-release.yml">release workflow</a> sets <code>GIT_BUNDLE_OPTS: --add-file META.json</code>
because git archive archives only checked-in files, and <code>META.json</code> is not
checked in but <a href="https://github.com/tembo-io/pg_vectorize/blob/v0.9.0/Makefile#L17-L18">generated from</a> <code>META.json.in</code>.</p>]]></summary><content type="html" xml:base="https://blog.pgxn.org/" xml:space="preserve"><![CDATA[<p>Just a quick note to highlight some bug fixes and improvements in the
<a href="https://github.com/pgxn/docker-pgxn-tools/">pgxn/pgxn-tools Docker image</a> in the last few weeks.</p>
<p>v1.4.0 adds the <code>GIT_BUNDLE_OPTS</code> and <code>ZIP_BUNDLE_OPTS</code> environment variables.
The former is passed to <code>git archive</code> and the latter to zip, and let
additional options be passed to those commands. For example, the <a href="https://pgxn.org/dist/vectorize/">vectorize
extension</a>&rsquo;s <a href="https://github.com/tembo-io/pg_vectorize/blob/v0.9.0/.github/workflows/pgxn-release.yml">release workflow</a> sets <code>GIT_BUNDLE_OPTS: --add-file META.json</code>
because git archive archives only checked-in files, and <code>META.json</code> is not
checked in but <a href="https://github.com/tembo-io/pg_vectorize/blob/v0.9.0/Makefile#L17-L18">generated from</a> <code>META.json.in</code>.</p>
<p>v1.4.1 <a href="https://github.com/pgxn/docker-pgxn-tools/commit/1114aed">fixes an issue</a> where <code>git archive</code> was never actually used to build a
release zip archive. This changed at some point without noticing due to the
introduction of the <code>safe.directory</code> configuration in recent versions of Git.
Inside the container the directory was never trusted, and the <code>pgxn-bundle</code>
command caught the error, decided it wasn&rsquo;t working with a Git repository, and
used the <code>zip</code> command, instead.</p>
<p>As a result, a number of recent releases have included files they shouldn&rsquo;t,
such as the contents of the <code>.git</code> directory. <a href="https://github.com/pgxn/docker-pgxn-tools/commit/1114aed">The fix</a>
<a href="https://stackoverflow.com/a/73100228/79202">disables</a> <code>safe.directory</code> so that the repository directory is always trusted
inside the container, as needed in GitHub actions.</p>
<p>If you use <code>pgxn-bundle</code> in a GitHub workflow, be aware that recent releases
(since November 2021 at least) include stuff that it should not, including the
<code>.git</code> directory (here&rsquo;s <a href="https://gist.github.com/theory/93c93571200aad02e93170c6d2c93cbe">a list</a>) and patterns excluded in <code>.gitattributes</code>.
Your next release should be cleaner.</p>
<p>v1.4.1 also allows the setting of the <code>PROFILE</code> environment variable, so that
the default <code>PROFILE=--Werror</code> can be overridden.</p>
<p>v1.4.2 adds (and v1.4.3 improves, see below) <code>git-archive-all</code> to the image,
and the <code>GIT_ARCHIVE_CMD</code> environment variable to tell <code>pgxn-bundle</code> which archive
command to use, either <code>archive</code> or <code>archive-all</code>. The latter is useful for
repositories that use Git submodules and need to include their contents in the
release, as demonstrated in <a href="https://github.com/plv8/plv8/pull/570/files#diff-4e4745c3f39dff4c307faf79bfa1242cc5ba2eb5947bebdcddc8d97eeb40685fR15">this plv8 pull request</a>.</p>
<p>v1.4.2 also adds <a href="https://cmake.org/"><code>cmake</code></a> and the <code>libarchive-tools</code> package to the image.
The latter bundles in <a href="https://libarchive.org/">libarchive</a> tools like <code>bsdtar</code> and <code>bsdcpio</code>, which
might be useful for editing Zip files in place.</p>
<p>v1.4.3 passes the <code>--force-submodules</code> option to <code>git-archive-all</code>, because
otherwise submodules weren&rsquo;t included in the bundle.</p>
<p>All of this should just start showing up in your GitHub workflows as long as
they use <code>container: pgxn/pgxn-tools</code> or <code>container: pgxn/pgxn-tools@v1</code>.</p>
<p>Questions? Post em in the <a href="https://postgresteam.slack.com/archives/C056ZA93H1A">#extensions</a> channel on the <a href="https://pgtreats.info/slack-invite">Postgres Slack</a> or to
the attention of the <a href="https://mastodon.social/@pgxn">PGXN Mastodon bot</a>.</p>
]]></content></entry><entry><id>https://blog.pgxn.org/post/6883009649</id><title type="html">PGXN Utils 0.1.2 Released!</title><link rel="alternate" type="text/html" href="https://blog.pgxn.org/2011/pgxn-utils-012-released/"/><updated>2026-10-07T16:13:48Z</updated><published>2011-06-24T23:53:00Z</published><author><name>Dickson S. Guedes</name></author><category scheme="https://blog.pgxn.org/tags" term="build" label="Build"/><category scheme="https://blog.pgxn.org/tags" term="create-extension" label="Create Extension"/><category scheme="https://blog.pgxn.org/tags" term="utils" label="Utils"/><category scheme="https://blog.pgxn.org/tags" term="meta" label="Meta"/><category scheme="https://blog.pgxn.org/tags" term="release" label="Release"/><category scheme="https://blog.pgxn.org/tags" term="bundle" label="Bundle"/><summary type="html"><![CDATA[<p>Hello everyone!</p>
<p>I&rsquo;m proud to tell you that a new version of <a href="https://github.com/guedes/pgxn-utils">pgxn_utils</a> was released!</p>
<p>Now you can release a distribution to <a href="https://pgxn.org">PGXN</a> in <strong>five steps</strong>!</p>
<p><strong>First</strong>, install it:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">gem install pgxn_utils
</span></span></code></pre></div><p><strong>Second</strong>, create your extension, optionally overwrite some defaults:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">mkdir <span class="nv">$HOME</span>/extensions
</span></span><span class="line"><span class="cl"><span class="nb">cd</span> <span class="nv">$HOME</span>/extensions
</span></span><span class="line"><span class="cl">pgxn_utils skeleton my_extension --maintainer <span class="s2">&#34;Dickson S. Guedes&#34;</span>
</span></span></code></pre></div><p><strong>Third</strong>, code!</p>
<p><strong>Fourth</strong>, bundle it:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-console" data-lang="console"><span class="line"><span class="cl"><span class="go">pgxn_utils bundle my_extension
</span></span></span><span class="line"><span class="cl"><span class="go">Extension generated at: /home/guedes/extensions/my_extension-0.0.1.zip
</span></span></span></code></pre></div><p><strong>Fifth</strong>, release it:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-console" data-lang="console"><span class="line"><span class="cl"><span class="go">pgxn_utils release my_extension-0.0.1.zip
</span></span></span><span class="line"><span class="cl"><span class="go">Enter your PGXN username: guedes
</span></span></span><span class="line"><span class="cl"><span class="go">Enter your PGXN password: ******
</span></span></span><span class="line"><span class="cl"><span class="go">Trying to release my_cool_extension-0.0.1.zip ... released successfully!
</span></span></span><span class="line"><span class="cl"><span class="go">Visit: https://manager.pgxn.org/distributions/my_cool_extension/0.0.1
</span></span></span></code></pre></div><p>Ah, you can export <code>PGXN_USER</code> and <code>PGXN_PASSWORD</code> if you are tired to type
your username and password every time.</p>]]></summary><content type="html" xml:base="https://blog.pgxn.org/" xml:space="preserve"><![CDATA[<p>Hello everyone!</p>
<p>I&rsquo;m proud to tell you that a new version of <a href="https://github.com/guedes/pgxn-utils">pgxn_utils</a> was released!</p>
<p>Now you can release a distribution to <a href="https://pgxn.org">PGXN</a> in <strong>five steps</strong>!</p>
<p><strong>First</strong>, install it:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">gem install pgxn_utils
</span></span></code></pre></div><p><strong>Second</strong>, create your extension, optionally overwrite some defaults:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">mkdir <span class="nv">$HOME</span>/extensions
</span></span><span class="line"><span class="cl"><span class="nb">cd</span> <span class="nv">$HOME</span>/extensions
</span></span><span class="line"><span class="cl">pgxn_utils skeleton my_extension --maintainer <span class="s2">&#34;Dickson S. Guedes&#34;</span>
</span></span></code></pre></div><p><strong>Third</strong>, code!</p>
<p><strong>Fourth</strong>, bundle it:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-console" data-lang="console"><span class="line"><span class="cl"><span class="go">pgxn_utils bundle my_extension
</span></span></span><span class="line"><span class="cl"><span class="go">Extension generated at: /home/guedes/extensions/my_extension-0.0.1.zip
</span></span></span></code></pre></div><p><strong>Fifth</strong>, release it:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-console" data-lang="console"><span class="line"><span class="cl"><span class="go">pgxn_utils release my_extension-0.0.1.zip
</span></span></span><span class="line"><span class="cl"><span class="go">Enter your PGXN username: guedes
</span></span></span><span class="line"><span class="cl"><span class="go">Enter your PGXN password: ******
</span></span></span><span class="line"><span class="cl"><span class="go">Trying to release my_cool_extension-0.0.1.zip ... released successfully!
</span></span></span><span class="line"><span class="cl"><span class="go">Visit: https://manager.pgxn.org/distributions/my_cool_extension/0.0.1
</span></span></span></code></pre></div><p>Ah, you can export <code>PGXN_USER</code> and <code>PGXN_PASSWORD</code> if you are tired to type
your username and password every time.</p>
<p><a href="https://github.com/guedes/pgxn-utils">Check this out!</a>.</p>
]]></content></entry></feed>