summaryrefslogtreecommitdiff
path: root/gnu/services/databases.scm
AgeCommit message (Expand)Author
2023-08-16services: posgresql: Add option to specify UID/GID for postgres user....Add 'createAccount?', 'uid' and 'gid' to <postgresql-configuation>. Unlike other system daemons, the PostgreSQL data directory is typically meant to persist across 'guix system reconfigure' and once created, you don't want it's UID or GID to change anymore. Furthermore, if you want to place the data directory on a network share and use NFSv4 with idmap, then the 'postgres' user must exist when the 'rpc.idmapd' daemon is launched; prior to mounting the share. And it needs to be possible to mount the share without configuring PostgreSQL. With NFSv3, the UID and GID typically needs to match those on the server. The added options allow for both of these scenarios: You can either create the user in (operating-system (users)) completely independently of the 'postgresql-service-type' (for instance to get your NFS setup working first prior to configuring your databases) - or "pin" it's UID / GID values. * gnu/services/databases.scm (<postgresql-configuration>)[create-account?] [uid, gid]: New fields. (%postgresql-accounts): Remove. (create-postgresql-account): New procedure. (postgresql-service-type)[extensions]: Use it. * doc/guix.texi (Database Services): Update accordingly. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Martin Baulig
2023-08-11services: postgresql: Add more role fields....* gnu/services/databases.scm (postgresql-role): Add more role fields. (postgresql-create-roles): Honor it. * doc/guix.texi (Database Services): Document it. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Miguel Moreno
2023-04-21services: postgresql: Add default package....* gnu/services/databases.scm (<postgresql-configuration>)[postgresql]: Add default value, moved from... (postgresql-service-type)[default-value]: ... here. Ludovic Courtès
2023-04-21services: redis: Add 'configuration' action....* gnu/services/databases.scm (redis-shepherd-service): Add 'actions' field. Ludovic Courtès
2023-04-21services: mysql: Add 'configuration' action....* gnu/services/databases.scm (mysql-shepherd-service): Add 'actions' field. Ludovic Courtès
2023-04-21services: postgresql: Add 'configuration' action....* gnu/services/databases.scm (postgresql-shepherd-service): Add 'actions' field. Ludovic Courtès
2023-04-21services: postgresql: Add the 'postgresql' Shepherd service name....* gnu/services/databases.scm (postgresql-shepherd-service): Add 'postgresql' to 'provision'. Ludovic Courtès
2022-11-20services: mysql: Run mariadb-install-db instead of hard coding schemas....* 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. Marius Bakke
2022-11-20services: mysql: Remove mysql-install-service in favor of wrapper....* 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. Marius Bakke
2022-11-20services: mysql-upgrade: Add log file....* gnu/services/databases.scm (mysql-upgrade-shepherd-service)[start]: Pass #:log-file. Marius Bakke
2022-11-20services: mysql-upgrade: Support custom datadir....* 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. Marius Bakke
2022-11-20gnu: mysql: Support custom data dir....* 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> Ellen Papsch
2022-04-29services: Add missing 'description' fields....* 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. Ludovic Courtès
2022-01-29services: postgresql: Export missing <postgresql-configuration> accessor....* gnu/services/databases.scm: Export POSTGRESQL-CONFIGURATION-EXTENSION-PACKAGES. Marius Bakke
2021-12-05Merge remote-tracking branch 'origin/master' into core-updates-frozenRicardo Wurmus
2021-11-30services: Accept <inferior-package>s in lieu of <package>s....* 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. Tobias Geerinckx-Rice
2021-09-27services: database: Change postgresql default socket....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. Mathieu Othacehe
2021-04-27services: mysql: Add extra-environment as configuration option....* 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> methuselah-0
2021-04-14Revert "services: mysql: Add extra-environment as configuration option."...This reverts commit f3626119d738f30b5ab59e76c105fd7b4c077ddc. This commit inadvertently broke a string freeze. Let's be nice to our translators and not do that. Leo Prikler
2021-04-13services: postgresql: Use "/tmp" host directory....This is a follow-up of c311147bd16aa0e5746d9cbf31502f5fd61e470c. * gnu/services/databases.scm (<postgresql-role-configuration>)[host]: Set to "/tmp" which the default Postgresql socket directory. Mathieu Othacehe
2021-04-13services: mysql: Add extra-environment as configuration option....* 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> methuselah-0
2021-04-12services: postgresql: Change service default socket directory....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> Christopher Baines
2021-03-16gnu: Remove MongoDB....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. Léo Le Bouter
2021-02-23services: postgresql-roles: Fix race condition....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. Mathieu Othacehe
2021-02-22services: postgresql: Define a default value....* gnu/services/databases.scm (postgresql-service-type): Define a default value. Mathieu Othacehe
2021-02-06services: PostgreSQL: Quote database names....* gnu/services/databases.scm (postgresql-create-roles): Quote the name in the SQL query so that roles/usernames containing hyphens will work. Marius Bakke
2021-01-28services: postgresql: Add postgresql-role-service-type....* 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. Mathieu Othacehe
2021-01-28services: postgresql: Wrap long lines....* gnu/services/databases.scm: Wrap long lines, no functional change. Mathieu Othacehe
2021-01-28services: postgresql: Add log directory support....* 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. Mathieu Othacehe
2021-01-28services: postgresql: Add socket directory support....* 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> Mathieu Othacehe
2021-01-28services: postgresql: Use Guile datatypes....* 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. Mathieu Othacehe
2020-12-01services: MySQL: Fix indentation....* gnu/services/databases.scm (mysql-upgrade-wrapper): Adjust indentation. Marius Bakke
2020-12-01services: databases: Do not export record type descriptors....* gnu/services/databases.scm (<postgresql-config-file>, <postgresql-configuration>, <memcached-configuration>, <mongodb-configuration>): Remove exports. Marius Bakke
2020-11-28services: MySQL: Upgrade database schemas automatically....* 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. Marius Bakke
2020-11-28services: MySQL: Make the socket configurable....* gnu/services/databases.scm (<mysql-configuration>): Add SOCKET field. (mysql-configuration-file): Adjust accordingly. * doc/guix.texi (Database Services): Likewise. Marius Bakke
2020-11-28services: MySQL: Bind to localhost only by default....* gnu/services/databases.scm (<mysql-configuration>): Add BIND-ADDRESS field. (mysql-configuration-file): Adjust accordingly. * doc/guix.texi (Database Services): Document it. Marius Bakke
2020-11-28services: MySQL: Deprecate 'mysql-service'....* 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. Marius Bakke
2020-10-20services: databases: Don't specify a default postgresql version....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. Christopher Baines
2020-10-20services: databases: Deprecate the postgresql-service procedure....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). Christopher Baines
2020-08-01services: postgresql: Provide postgresql commands....* gnu/services/databases.scm (postgresql-service-type): Extend profile-service-type to provide postgresql commands. Pierre Neidhardt
2020-01-17gnu: services: Allow extra content in mysql configuration....* gnu/services/databases.scm (<mysql-configuration>): New field. (mysql-configuration-file): Use it. Alex Sassmannshausen
2020-01-14gnu: services: Fix mysql service activation....This change is necessary after the split of mariadb outputs. * gnu/services/databases.scm (%mysql-activation): Use mysql:lib in mariadb-specific part. Julien Lepiller
2019-07-02gnu: postgres service: More secure default permissions....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> Robert Vollmert
2018-10-04gnu: postgresql: Add extension-packages....* gnu/services/databases.scm (postgresql-configuration): Add extension-packages. (postgresql-shepherd-service): New key #:extension-packages. * doc/guix.texi (Database Services): Document it. Julien Lepiller
2018-08-13services: postgresql: Get the Shepherd to respawn PostgreSQL....* gnu/services/databases.scm (postgresql-shepherd-service): Change 'start' to return the PID. Clément Lassieur
2018-03-17services: databases: Change quote' to single-quote....In the postgresql-config-file gexp compiler. * gnu/services/databases.scm (postgresql-config-file-compiler): Change quote' to single-quote. Christopher Baines
2018-03-10services: databases: Add postgresql-configuration record exports....* gnu/services/databases.scm: Export the record type, and all the field accessors. Christopher Baines
2018-03-10services: Rework the PostgreSQL config file to use a record type....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. Christopher Baines
2018-03-03services: redis: Add a default-value to the redis-service-type....* gnu/packages/databases.scm (redis-service-type)[default-value]: Set to (redis-configuration). Christopher Baines
2018-03-03services: mysql: Add a default-value to the mysql-service-type....* gnu/services/databases.scm (mysql-service-type)[default-value]: Set to (mysql-configuration). Christopher Baines