Skip to content

Commit

Permalink
[libpq][hack] Workaround for libpq (#214)
Browse files Browse the repository at this point in the history
See #213 for details
  • Loading branch information
smklein authored Sep 1, 2021
1 parent 8d0d4cb commit b72c31e
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,22 @@ However, once these have been provided, the codebase should be buildable with `c

**Prerequisites:**

. Postgres

Postgres is required to link against libpq for access to the database.

(See https://github.com/oxidecomputer/omicron/issues/213 ; we may be able to remove this dependency long-term)

Linux: `sudo apt-get install libpq-dev`
Mac: `brew install postgresql`
Helios: `pkg install library/postgresql-13`

Additionally, to help all runtime commands find this library, we recommend the following:
[source,text]
----
export LD_LIBRARY_PATH="$(pg_config --libdir)"
----

. CockroachDB v20.2.5.
+
The test suite expects to be able to start a single-node CockroachDB cluster using the `cockroach` executable on your PATH.
Expand Down
5 changes: 5 additions & 0 deletions smf/bootstrap-agent/manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
<service_fmri value='svc:/milestone/devices' />
</dependency>

<method_context>
<method_environment>
<envvar name="LD_LIBRARY_PATH" value="/opt/ooce/pgsql-13/lib/amd64" />
</method_environment>
</method_context>
<exec_method type='method' name='start'
exec='ctrun -l child -o noorphan,regent /opt/oxide/bootstrap-agent/bootstrap-agent run %{config/server_id} %{config/server_addr} &amp;'
timeout_seconds='0' />
Expand Down
5 changes: 5 additions & 0 deletions smf/nexus/manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
<service_fmri value='svc:/system/illumos/bootstrap-agent' />
</dependency>

<method_context>
<method_environment>
<envvar name="LD_LIBRARY_PATH" value="/opt/ooce/pgsql-13/lib/amd64" />
</method_environment>
</method_context>
<exec_method type='method' name='start'
exec='ctrun -l child -o noorphan,regent /opt/oxide/nexus/nexus /opt/oxide/nexus/pkg/config.toml &amp;'
timeout_seconds='0' />
Expand Down
5 changes: 5 additions & 0 deletions smf/oximeter/manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
<service_fmri value='svc:/system/illumos/bootstrap-agent' />
</dependency>

<method_context>
<method_environment>
<envvar name="LD_LIBRARY_PATH" value="/opt/ooce/pgsql-13/lib/amd64" />
</method_environment>
</method_context>
<exec_method type='method' name='start'
exec='ctrun -l child -o noorphan,regent /opt/oxide/oximeter/oximeter ./config.toml &amp;'
timeout_seconds='0' />
Expand Down
5 changes: 5 additions & 0 deletions smf/propolis-server/manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
<service_fmri value='svc:/milestone/network:default' />
</dependency>

<method_context>
<method_environment>
<envvar name="LD_LIBRARY_PATH" value="/opt/ooce/pgsql-13/lib/amd64" />
</method_environment>
</method_context>
<exec_method type='method' name='start'
exec='ctrun -l child -o noorphan,regent /opt/oxide/propolis-server/propolis-server /opt/oxide/propolis-server/pkg/config.toml %{config/server_addr} &amp;'
timeout_seconds='0' />
Expand Down
5 changes: 5 additions & 0 deletions smf/sled-agent/manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
<service_fmri value='svc:/system/illumos/bootstrap-agent' />
</dependency>

<method_context>
<method_environment>
<envvar name="LD_LIBRARY_PATH" value="/opt/ooce/pgsql-13/lib/amd64" />
</method_environment>
</method_context>
<exec_method type='method' name='start'
exec='ctrun -l child -o noorphan,regent /opt/oxide/sled-agent/sled-agent run %{svc:/system/illumos/bootstrap-agent:default/:properties/config/server_id} %{config/server_addr} %{config/nexus_addr} &amp;'
timeout_seconds='0' />
Expand Down

0 comments on commit b72c31e

Please sign in to comment.