aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/databases.scm
Commit message (Collapse)AuthorAge
* services: postgresql: Add default package.Ludovic Courtès2023-04-21
| | | | | | * gnu/services/databases.scm (<postgresql-configuration>)[postgresql]: Add default value, moved from... (postgresql-service-type)[default-value]: ... here.
* services: redis: Add 'configuration' action.Ludovic Courtès2023-04-21
| | | | | * gnu/services/databases.scm (redis-shepherd-service): Add 'actions' field.
* services: mysql: Add 'configuration' action.Ludovic Courtès2023-04-21
| | | | | * gnu/services/databases.scm (mysql-shepherd-service): Add 'actions' field.
* services: postgresql: Add 'configuration' action.Ludovic Courtès2023-04-21
| | | | | * gnu/services/databases.scm (postgresql-shepherd-service): Add 'actions' field.
* services: postgresql: Add the 'postgresql' Shepherd service name.Ludovic Courtès2023-04-21
| | | | | * gnu/services/databases.scm (postgresql-shepherd-service): Add 'postgresql' to 'provision'.
* services: mysql: Run mariadb-install-db instead of hard coding schemas.Marius Bakke2022-11-20
| | | | | | * gnu/services/databases.scm (mysql-install): Run "mariadb-install-db" instead of a hard coded set of SQL commands. (mysql-upgrade-wrapper): Explicitly run as mysql user.
* services: mysql: Remove mysql-install-service in favor of wrapper.Marius Bakke2022-11-20
| | | | | | | | | | | | * gnu/services/databases.scm (mysql-with-install-lock): Remove variable. (mysql-start): Rename to ... (mysqld-wrapper): ... this. Do the preliminary initialization steps and call out to MYSQL-INSTALL when necessary. (mysql-install): Only initialize table schemas. (mysql-install-shepherd-service): Remove. (mysql-service)[requirement]: Remove 'mysql-install. Add 'user-processes. [start]: Don't pass #:user and #:group. (mysql-shepherd-services): Remove MYSQL-INSTALL-SHEPHERD-SERVICE.
* services: mysql-upgrade: Add log file.Marius Bakke2022-11-20
| | | | | * gnu/services/databases.scm (mysql-upgrade-shepherd-service)[start]: Pass #:log-file.
* services: mysql-upgrade: Support custom datadir.Marius Bakke2022-11-20
| | | | | | | * gnu/services/databases.scm (mysql-upgrade-wrapper): Take service configuration as argument, and pass the config file to mysql_upgrade. (mysql-upgrade-shepherd-service): Pass CONFIG instead of just socket and executable to MYSQL-UPGRADE-WRAPPER.
* gnu: mysql: Support custom data dir.Ellen Papsch2022-11-20
| | | | | | | | | | | | | | | | | | | | | | * gnu/services/databases.scm (mysql-configuration): Add datadir property. * gnu/services/databases.scm (mysql-configuration-file): Replace hard coded data dir with property from config. * gnu/services/databases.scm (%mysql-activation): Remove activation, it runs before PID 1. The data dir may reside on a file system not mounted at this time. * gnu/services/databases.scm (mysql-install-shepherd-service): Create service which replaces the activation. Provide mysql-install. * gnu/services/databases.scm (mysql-shepherd-service): Move invocation of mysqld to mysql-start program-file, because the invocation gotten more complex. Require mysql-install. * gnu/services/databases.scm (mysql-start): Invoke mysqld only if a lock file appears. * gnu/services/databases.scm (mysql-shepherd-services): Prepend the install service before the normal service. * gnu/services/databases.scm (mysql-upgrade-wrapper): Increase timeout to 20s to let the mysql install procedure finish. Signed-off-by: Marius Bakke <marius@gnu.org>
* services: Add missing 'description' fields.Ludovic Courtès2022-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/services/databases.scm (postgresql-service-type)[description]: New field. (memcached-service-type)[description]: New field. (mysql-service-type)[description]: New field. (redis-service-type)[description]: New field. * gnu/services/desktop.scm (geoclue-service-type)[description]: New field. (udisks-service-type)[description]: New field. (elogind-service-type)[description]: New field. (account-service-type)[description]: New field. * gnu/services/kerberos.scm (krb5-service-type)[description]: New field. (pam-krb5-service-type)[description]: New field. * gnu/services/lirc.scm (lirc-service-type)[description]: New field. * gnu/services/mail.scm (dovecot-service-type)[description]: New field. (opensmtpd-service-type)[description]: New field. (mail-aliases-service-type)[description]: New field. (exim-service-type)[description]: New field. * gnu/services/monitoring.scm (zabbix-server-service-type)[description]: New field. (zabbix-agent-service-type)[description]: New field. * gnu/services/nfs.scm (rpcbind-service-type)[description]: New field. (pipefs-service-type)[description]: New field. (gss-service-type)[description]: New field. (idmap-service-type)[description]: New field. * gnu/services/spice.scm (spice-vdagent-service-type)[description]: New field. * gnu/services/sysctl.scm (sysctl-service-type)[description]: New field. * gnu/services/virtualization.scm (libvirt-service-type)[description]: New field. (virtlog-service-type)[description]: New field. * gnu/services/vpn.scm (openvpn-server-service-type)[description]: New field. (openvpn-client-service-type)[description]: New field. (wireguard-service-type)[description]: New field. * gnu/services/web.scm (httpd-service-type)[description]: New field. (fcgiwrap-service-type)[description]: New field. (agate-service-type)[description]: New field. [name]: Fix.
* services: postgresql: Export missing <postgresql-configuration> accessor.Marius Bakke2022-01-29
| | | | * gnu/services/databases.scm: Export POSTGRESQL-CONFIGURATION-EXTENSION-PACKAGES.
* Merge remote-tracking branch 'origin/master' into core-updates-frozenRicardo Wurmus2021-12-05
|\
| * services: Accept <inferior-package>s in lieu of <package>s.Tobias Geerinckx-Rice2021-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/services/authentication.scm (fprintd-configuration) (nslcd-configuration): Substitute file-like objects for package ones. * gnu/services/cgit.scm (cgit-configuration, opaque-cgit-configuration): Likewise. * gnu/services/cups.scm (package-list?, cups-configuration): Likewise. * gnu/services/dns.scm (verify-knot-configuration) (ddclient-configuration): Likewise. * gnu/services/docker.scm (docker-configuration): Likewise. * gnu/services/file-sharing.scm (transmission-daemon-configuration): Likewise. * gnu/services/getmail.scm (getmail-configuration): Likewise. * gnu/services/mail.scm (dovecot-configuration) (opaque-dovecot-configuration): Likewise. * gnu/services/messaging.scm (prosody-configuration) (opaque-prosody-configuration): Likewise. * gnu/services/monitoring.scm (zabbix-server-configuration) (zabbix-agent-configuration): Likewise. * gnu/services/networking.scm (opendht-configuration): Likewise. * gnu/services/pm.scm (tlp-configuration): Likewise. * gnu/services/telephony.scm (jami-configuration): Likewise. * gnu/services/virtualization.scm (libvirt-configuration) (qemu-guest-agent-configuration): Likewise. * gnu/services/vpn.scm (openvpn-client-configuration): Likewise.
* | services: database: Change postgresql default socket.Mathieu Othacehe2021-09-27
|/ | | | | | | | | Adapt to the postgresql default socket directory set to /var/run/postgresql. * gnu/services/databases.scm (<postgresql-config-file>)[socket-directory]: Set to /var/run/postgresql. (<postgresql-role-configuration>): Ditto. * gnu/tests/databases.scm (run-postgresql-test): Adapt it.
* services: mysql: Add extra-environment as configuration option.methuselah-02021-04-27
| | | | | | | | * gnu/services/databases.scm (mysql-configuration): Add extra-environment (mysql-service): Use #:log-file and #:environment-variables * doc/guix.texi: Document it. Signed-off-by: Leo Prikler <leo.prikler@student.tugraz.at>
* Revert "services: mysql: Add extra-environment as configuration option."Leo Prikler2021-04-14
| | | | | | This reverts commit f3626119d738f30b5ab59e76c105fd7b4c077ddc. This commit inadvertently broke a string freeze. Let's be nice to our translators and not do that.
* services: postgresql: Use "/tmp" host directory.Mathieu Othacehe2021-04-13
| | | | | | | This is a follow-up of c311147bd16aa0e5746d9cbf31502f5fd61e470c. * gnu/services/databases.scm (<postgresql-role-configuration>)[host]: Set to "/tmp" which the default Postgresql socket directory.
* services: mysql: Add extra-environment as configuration option.methuselah-02021-04-13
| | | | | | | | * gnu/services/databases.scm (mysql-configuration): Add extra-environment (mysql-service): Use #:log-file and #:environment-variables * doc/guix.texi: Document it. Signed-off-by: Leo Prikler <leo.prikler@student.tugraz.at>
* services: postgresql: Change service default socket directory.Christopher Baines2021-04-12
| | | | | | | | | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/46737>. PostgreSQL running with a different socket directory to the default one in the package itself breaks some services, this commit restores the previous behaviour where PostgreSQL by default will run with a socket directory that matches the default used by PostgreSQL packaged for Guix. Switching to a different default value can happen, but only alongside changing the PostgreSQL package. * gnu/services/databases.scm (<postgresql-config-file>)[socket-directory]: Change default to #false. * doc/guix.texi (Database Services): Update documentation, and specify a different value for disabling connections via sockets. * gnu/tests/guix.scm (%guix-data-service-os): Use default PostgreSQL behaviour. * gnu/tests/monitoring.scm (%zabbix-os): Likewise. * gnu/tests/web.scm (patchwork-os): Likewise. Signed-off-by: Leo Famulari <leo@famulari.name>
* gnu: Remove MongoDB.Léo Le Bouter2021-03-16
| | | | | | | | | | | | | | | | | | | | | | mongodb 3.4.10 has unpatched CVEs and mongodb 3.4.24 has some files in the release tarball under the SSPL, therefore we cannot provide mongodb while upholding to good security standards. It turns out feff80cec3c97a3df2c20d300be12d67f79d4f22 was right since while the main license file wasnt altered to SSPL, some files in the tree contain SSPL headers. * gnu/packages/databases.scm (go-gopkg.in-mgo.v2): Remove. * gnu/packages/databases.scm (mongo-tools): Remove. * doc/guix.texi (mongodb-service-type): Remove. * gnu/tests/databases.scm (%test-mongodb, %mongodb-os, run-mongodb-test): Remove. * gnu/services/databases.scm (mongodb-configuration, mongodb-configuration?, mongodb-configuration-mongodb, mongodb-configuration-config-file, mongodb-configuration-data-directory, mongodb-service-type, %default-mongodb-configuration-file, %mongodb-accounts, mongodb-activation, mongodb-shepherd-service): Remove. * gnu/packages/databases.scm (mongodb): Remove.
* services: postgresql-roles: Fix race condition.Mathieu Othacehe2021-02-23
| | | | | | | | | | Make sure that the postgresql-roles script is completed before declaring the postgresql-roles service as started. * gnu/services/databases.scm (postgresql-create-roles): Return the command line instead of a program-file. (postgresql-role-shepherd-service): Use fork+exec-command to start the role creation script and wait for its completion before returning.
* services: postgresql: Define a default value.Mathieu Othacehe2021-02-22
| | | | * gnu/services/databases.scm (postgresql-service-type): Define a default value.
* services: PostgreSQL: Quote database names.Marius Bakke2021-02-06
| | | | | * gnu/services/databases.scm (postgresql-create-roles): Quote the name in the SQL query so that roles/usernames containing hyphens will work.
* services: postgresql: Add postgresql-role-service-type.Mathieu Othacehe2021-01-28
| | | | | | | | | | | * gnu/services/databases.scm (postgresql-role, postgresql-role?, postgresql-role-name, postgresql-role-permissions, postgresql-role-create-database?, postgresql-role-configuration, postgresql-role-configuration?, postgresql-role-configuration-host, postgresql-role-configuration-roles, postgresql-role-service-type): New procedures. * gnu/tests/databases.scm: Test it. * doc/guix.texi: Document it.
* services: postgresql: Wrap long lines.Mathieu Othacehe2021-01-28
| | | | * gnu/services/databases.scm: Wrap long lines, no functional change.
* services: postgresql: Add log directory support.Mathieu Othacehe2021-01-28
| | | | | | | | | | | * gnu/services/databases.scm (postgresql-configuration-log-directory): New procedure. (<postgresql-configuration>)[log-directory]: New field. (postgresql-activation): Create the log directory. (postgresql-shepherd-service): Honor it. * gnu/tests/databases.scm (%postgresql-log-directory): New variable. (log-file): New test case. * doc/guix.texi (Database Services): Document it.
* services: postgresql: Add socket directory support.Mathieu Othacehe2021-01-28
| | | | | | | | | | | | | | * gnu/services/databases.scm (postgresql-config-file-socket-directory): New procedure. (<postgresql-config-file>)[socket-directory]: New field. (postgresql-config-file-compiler): Honor it. (postgresql-activation): Create the socket directory if needed. * doc/guix.texi (Database Services): Document it. * gnu/tests/guix.scm (%guix-data-service-os): Adapt it. * gnu/tests/monitoring.scm (%zabbix-os): Ditto. * gnu/tests/web.scm (patchwork-os): Ditto. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* services: postgresql: Use Guile datatypes.Mathieu Othacehe2021-01-28
| | | | | | | * gnu/services/databases.scm (postgresql-config-file-compiler): Support Guile datatypes in the "extra-config" field. * gnu/tests/databases.scm (%postgresql-os): Test it. * doc/guix.texi (Database Services): Document it.
* services: MySQL: Fix indentation.Marius Bakke2020-12-01
| | | | * gnu/services/databases.scm (mysql-upgrade-wrapper): Adjust indentation.
* services: databases: Do not export record type descriptors.Marius Bakke2020-12-01
| | | | | | * gnu/services/databases.scm (<postgresql-config-file>, <postgresql-configuration>, <memcached-configuration>, <mongodb-configuration>): Remove exports.
* services: MySQL: Upgrade database schemas automatically.Marius Bakke2020-11-28
| | | | | | | | | | | * gnu/services/databases.scm (<mysql-configuration>): Add AUTO-UPGRADE? field. (mysql-upgrade-wrapper, mysql-upgrade-shepherd-service, mysql-shepherd-services): New variables. (mysql-service-type): Use MYSQL-SHEPHERD-SERVICES instead of MYSQL-SHEPHERD-SERVICE. * doc/guix.texi (Database Services): Document the AUTO-UPGRADE? field of MYSQL-SERVICE-TYPE. * gnu/tests/databases.scm (run-mysql-test): Test that mysql_upgrade has run.
* services: MySQL: Make the socket configurable.Marius Bakke2020-11-28
| | | | | | * gnu/services/databases.scm (<mysql-configuration>): Add SOCKET field. (mysql-configuration-file): Adjust accordingly. * doc/guix.texi (Database Services): Likewise.
* services: MySQL: Bind to localhost only by default.Marius Bakke2020-11-28
| | | | | | * gnu/services/databases.scm (<mysql-configuration>): Add BIND-ADDRESS field. (mysql-configuration-file): Adjust accordingly. * doc/guix.texi (Database Services): Document it.
* services: MySQL: Deprecate 'mysql-service'.Marius Bakke2020-11-28
| | | | | | | | * gnu/services/databases.scm (mysql-service): Define in terms of DEFINE-DEPRECATED. * gnu/tests/databases.scm (%mysql-os): Adjust accordingly. * doc/guix.texi (Database Services): Adjust the MariaDB/MySQL section to document MYSQL-SERVICE-TYPE instead of MYSQL-SERVICE. While at it, document the EXTRA-CONTENT field.
* services: databases: Don't specify a default postgresql version.Christopher Baines2020-10-20
| | | | | | | | | | | | | | | | | | | | Currently, if the postgresql package major version changes, this is going to break the service upon upgrade, because PostgreSQL will reject the data files from the differing major version of the service. Because it's important to either keep running a particular major version, or intentionally upgrade, I think the configuration would be better with no default. I think this is also going to be helpful when trying to assist users upgrading PostgreSQL. * gnu/services/databases.scm (<postgresql-configuration>): Remove default for postgresql. (postgresql-service-type): Remove the default value. * gnu/tests/databases.scm (%postgresql-os): Update accordingly. * gnu/tests/guix.scm (%guix-data-service-os): Update accordingly. * gnu/tests/monitoring.scm (%zabbix-os): Update accordingly. * gnu/tests/web.scm (patchwork-os): Update accordingly. * doc/guix.texi (PostgreSQL): Update accordingly.
* services: databases: Deprecate the postgresql-service procedure.Christopher Baines2020-10-20
| | | | | | | | | Using the service type directly is a better approach, making it easier to configure the service. * gnu/services/databases.scm (postgresql-service): Deprecate this procedure. * doc/guix.texi (PostgreSQL): Update the documentation for the use of (service postgresql-service-type).
* services: postgresql: Provide postgresql commands.Pierre Neidhardt2020-08-01
| | | | | * gnu/services/databases.scm (postgresql-service-type): Extend profile-service-type to provide postgresql commands.
* gnu: services: Allow extra content in mysql configuration.Alex Sassmannshausen2020-01-17
| | | | | * gnu/services/databases.scm (<mysql-configuration>): New field. (mysql-configuration-file): Use it.
* gnu: services: Fix mysql service activation.Julien Lepiller2020-01-14
| | | | | | | This change is necessary after the split of mariadb outputs. * gnu/services/databases.scm (%mysql-activation): Use mysql:lib in mariadb-specific part.
* gnu: postgres service: More secure default permissions.Robert Vollmert2019-07-02
| | | | | | | | | | This changes to 'peer' authentication for local socket connections, and password-based authentication for local network connections. * gnu/services/databases.scm (%default-postgres-hba): Change authentication method. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* gnu: postgresql: Add extension-packages.Julien Lepiller2018-10-04
| | | | | | | * gnu/services/databases.scm (postgresql-configuration): Add extension-packages. (postgresql-shepherd-service): New key #:extension-packages. * doc/guix.texi (Database Services): Document it.
* services: postgresql: Get the Shepherd to respawn PostgreSQL.Clément Lassieur2018-08-13
| | | | | * gnu/services/databases.scm (postgresql-shepherd-service): Change 'start' to return the PID.
* services: databases: Change quote' to single-quote.Christopher Baines2018-03-17
| | | | | | | In the postgresql-config-file gexp compiler. * gnu/services/databases.scm (postgresql-config-file-compiler): Change quote' to single-quote.
* services: databases: Add postgresql-configuration record exports.Christopher Baines2018-03-10
| | | | | * gnu/services/databases.scm: Export the record type, and all the field accessors.
* services: Rework the PostgreSQL config file to use a record type.Christopher Baines2018-03-10
| | | | | | | | | | | For the default config file representation. This makes it possible to more easily change the configuration file, and have dynamic content. * gnu/services/databases.scm (<postgresql-config-file>): New record type. (%default-postgres-config): Remove this, it's been replaced by the configuration file. (<postgresql-configuration>): Alter the default for the config file field. (postgresql-service): Alter the default value for the config-file parameter.
* services: redis: Add a default-value to the redis-service-type.Christopher Baines2018-03-03
| | | | | * gnu/packages/databases.scm (redis-service-type)[default-value]: Set to (redis-configuration).
* services: mysql: Add a default-value to the mysql-service-type.Christopher Baines2018-03-03
| | | | | * gnu/services/databases.scm (mysql-service-type)[default-value]: Set to (mysql-configuration).
* services: postgresql: Add a default-value to the postgresql-service-type.Christopher Baines2018-03-03
| | | | | | | * gnu/packages/databases.scm (<postgresql-configuration>) [config-file,data-directory]: Add default. (postgresql-service-type)[default-value]: Set to (postgresql-configuration).
* services: postgresql: Use pg_ctl to start and stop postgres.Clément Lassieur2018-01-25
| | | | | | | Fixes <https://bugs.gnu.org/29992>. * gnu/services/databases.scm (postgresql-shepherd-service): Replace make-forkexec-constructor and make-kill-destructor with pg_ctl.