Page MenuHomeDevCentral

D3130.diff
No OneTemporary

D3130.diff

diff --git a/roles/dbserver-pgsql/server/build.sls b/roles/dbserver-pgsql/server/build.sls
new file mode 100644
--- /dev/null
+++ b/roles/dbserver-pgsql/server/build.sls
@@ -0,0 +1,48 @@
+# -------------------------------------------------------------
+# Salt — PostgreSQL
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% if grains['os'] == 'FreeBSD' %}
+
+# -------------------------------------------------------------
+# Port options
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+/var/db/ports/databases_postgresql15-server/options:
+ file.managed:
+ - source: salt://roles/devserver/userland-software/files/port_options
+ - template: jinja
+ - mode: 644
+ - context:
+ args:
+ category: databases
+ name: postgresql15-server
+ options:
+ set:
+ - XML
+
+# -------------------------------------------------------------
+# Build and install package
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+postgresql_build_dependencies:
+ pkg.installed:
+ - pkgs:
+ - dialog4ports
+ - gmake
+ - pkgconf
+ - gettext
+
+postgresql_build_port:
+ cmd.run:
+ - name: |
+ make build package deinstall reinstall
+ pkg lock {{ port }}
+ - cwd: /usr/ports/databases/postgresql15-server
+ - creates: /usr/local/bin/postgres
+{% endfor %}
+
+{% endif %}
diff --git a/roles/dbserver-pgsql/server/init.sls b/roles/dbserver-pgsql/server/init.sls
--- a/roles/dbserver-pgsql/server/init.sls
+++ b/roles/dbserver-pgsql/server/init.sls
@@ -6,6 +6,7 @@
# -------------------------------------------------------------
include:
+ - .build
- .software
- .config
- .service
diff --git a/roles/dbserver-pgsql/server/software.sls b/roles/dbserver-pgsql/server/software.sls
--- a/roles/dbserver-pgsql/server/software.sls
+++ b/roles/dbserver-pgsql/server/software.sls
@@ -14,7 +14,9 @@
postgresql_server_software:
pkg.installed:
- pkgs:
+ {% if grains['os'] != 'FreeBSD' %}
- {{ packages.postgresql }}
+ {% endif %}
{% if pillar["dbserver_postgresql"]["server"]["with_contrib"] | default(False) %}
- {{ packages["postgresql-contrib"] }}
{% endif %}

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 27, 09:03 (21 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2266609
Default Alt Text
D3130.diff (2 KB)

Event Timeline