Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3766234
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/roles/dbserver-pgsql/server/build.sls b/roles/dbserver-pgsql/server/build.sls
new file mode 100644
index 0000000..484407d
--- /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
index 58524ce..d949943 100644
--- a/roles/dbserver-pgsql/server/init.sls
+++ b/roles/dbserver-pgsql/server/init.sls
@@ -1,14 +1,15 @@
# -------------------------------------------------------------
# Salt — Database server — PostgreSQL
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
include:
+ - .build
- .software
- .config
- .service
# Content includes databases, users, privileges
- .content
diff --git a/roles/dbserver-pgsql/server/software.sls b/roles/dbserver-pgsql/server/software.sls
index d9ce49b..8b0dfdd 100644
--- a/roles/dbserver-pgsql/server/software.sls
+++ b/roles/dbserver-pgsql/server/software.sls
@@ -1,20 +1,22 @@
# -------------------------------------------------------------
# Salt — Database server — PostgreSQL
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
{% from "map.jinja" import packages with context %}
# -------------------------------------------------------------
# PostgreSQL server
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Nov 24, 17:13 (20 m, 40 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2258505
Default Alt Text
(3 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment