···168 type = lib.types.str;
169 default = "keycloak";
170 description = ''
171- Username to use when connecting to the database.
172- This is also used for automatic provisioning of the database.
173- Changing this after the initial installation doesn't delete the
174- old user and can cause further problems.
00000175 '';
176 };
177···588 PSQL=${config.services.postgresql.package}/bin/psql
589590 db_password="$(<'${cfg.databasePasswordFile}')"
591- $PSQL -tAc "SELECT 1 FROM pg_roles WHERE rolname='${cfg.databaseUsername}'" | grep -q 1 || $PSQL -tAc "CREATE ROLE ${cfg.databaseUsername} WITH LOGIN PASSWORD '$db_password' CREATEDB"
592- $PSQL -tAc "SELECT 1 FROM pg_database WHERE datname = 'keycloak'" | grep -q 1 || $PSQL -tAc 'CREATE DATABASE "keycloak" OWNER "${cfg.databaseUsername}"'
593 '';
594 };
595···607 set -eu
608609 db_password="$(<'${cfg.databasePasswordFile}')"
610- ( echo "CREATE USER IF NOT EXISTS '${cfg.databaseUsername}'@'localhost' IDENTIFIED BY '$db_password';"
611 echo "CREATE DATABASE keycloak CHARACTER SET utf8 COLLATE utf8_unicode_ci;"
612- echo "GRANT ALL PRIVILEGES ON keycloak.* TO '${cfg.databaseUsername}'@'localhost';"
613 ) | ${config.services.mysql.package}/bin/mysql -N
614 '';
615 };
···168 type = lib.types.str;
169 default = "keycloak";
170 description = ''
171+ Username to use when connecting to an external or manually
172+ provisioned database; has no effect when a local database is
173+ automatically provisioned.
174+175+ To use this with a local database, set <xref
176+ linkend="opt-services.keycloak.databaseCreateLocally" /> to
177+ <literal>false</literal> and create the database and user
178+ manually. The database should be called
179+ <literal>keycloak</literal>.
180 '';
181 };
182···593 PSQL=${config.services.postgresql.package}/bin/psql
594595 db_password="$(<'${cfg.databasePasswordFile}')"
596+ $PSQL -tAc "SELECT 1 FROM pg_roles WHERE rolname='keycloak'" | grep -q 1 || $PSQL -tAc "CREATE ROLE keycloak WITH LOGIN PASSWORD '$db_password' CREATEDB"
597+ $PSQL -tAc "SELECT 1 FROM pg_database WHERE datname = 'keycloak'" | grep -q 1 || $PSQL -tAc 'CREATE DATABASE "keycloak" OWNER "keycloak"'
598 '';
599 };
600···612 set -eu
613614 db_password="$(<'${cfg.databasePasswordFile}')"
615+ ( echo "CREATE USER IF NOT EXISTS 'keycloak'@'localhost' IDENTIFIED BY '$db_password';"
616 echo "CREATE DATABASE keycloak CHARACTER SET utf8 COLLATE utf8_unicode_ci;"
617+ echo "GRANT ALL PRIVILEGES ON keycloak.* TO 'keycloak'@'localhost';"
618 ) | ${config.services.mysql.package}/bin/mysql -N
619 '';
620 };
···1-From 161212ef02312c0681d2d809c8ff1e1f0ea6f6f9 Mon Sep 17 00:00:00 2001
2-From: Fabio Fantoni <fabio.fantoni@m2r.biz>
3-Date: Wed, 29 Apr 2015 11:20:28 +0200
4-Subject: [PATCH] libxl: Add qxl vga interface support for upstream qemu
5-6-Usage:
7-vga="qxl"
8-9-Qxl vga support many resolutions that not supported by stdvga,
10-mainly the 16:9 ones and other high up to 2560x1600.
11-With QXL you can get improved performance and smooth video also
12-with high resolutions and high quality.
13-Require their drivers installed in the domU and spice used
14-otherwise act as a simple stdvga.
15-16-Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
17-Signed-off-by: Zhou Peng <zpengxen@gmail.com>
18-Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
19-Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
20-Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
21----
22- docs/man/xl.cfg.pod.5 | 10 +++++++++-
23- tools/libxl/libxl.h | 10 ++++++++++
24- tools/libxl/libxl_create.c | 13 +++++++++++++
25- tools/libxl/libxl_dm.c | 8 ++++++++
26- tools/libxl/libxl_types.idl | 1 +
27- tools/libxl/xl_cmdimpl.c | 2 ++
28- 6 files changed, 43 insertions(+), 1 deletion(-)
29-30-diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5
31-index f936dfc..8e4154f 100644
32---- a/docs/man/xl.cfg.pod.5
33-+++ b/docs/man/xl.cfg.pod.5
34-@@ -1360,6 +1360,9 @@ qemu-xen-traditional device-model, the amount of video RAM is fixed at 4 MB,
35- which is sufficient for 1024x768 at 32 bpp. For the upstream qemu-xen
36- device-model, the default and minimum is 8 MB.
37-38-+For B<qxl> vga, the default is both default and minimal 128MB.
39-+If B<videoram> is set less than 128MB, an error will be triggered.
40-+
41- =item B<stdvga=BOOLEAN>
42-43- Select a standard VGA card with VBE (VESA BIOS Extensions) as the
44-@@ -1371,9 +1374,14 @@ This option is deprecated, use vga="stdvga" instead.
45-46- =item B<vga="STRING">
47-48--Selects the emulated video card (none|stdvga|cirrus).
49-+Selects the emulated video card (none|stdvga|cirrus|qxl).
50- The default is cirrus.
51-52-+In general, QXL should work with the Spice remote display protocol
53-+for acceleration, and QXL driver is necessary in guest in this case.
54-+QXL can also work with the VNC protocol, but it will be like a standard
55-+VGA without acceleration.
56-+
57- =item B<vnc=BOOLEAN>
58-59- Allow access to the display via the VNC protocol. This enables the
60-diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h
61-index 44bd8e2..efc0617 100644
62---- a/tools/libxl/libxl.h
63-+++ b/tools/libxl/libxl.h
64-@@ -535,6 +535,16 @@ typedef struct libxl__ctx libxl_ctx;
65- #define LIBXL_HAVE_DOMINFO_OUTSTANDING_MEMKB 1
66-67- /*
68-+ * LIBXL_HAVE_QXL
69-+ *
70-+ * If defined, then the libxl_vga_interface_type will contain another value:
71-+ * "QXL". This value define if qxl vga is supported.
72-+ *
73-+ * If this is not defined, the qxl vga support is missed.
74-+ */
75-+#define LIBXL_HAVE_QXL 1
76-+
77-+/*
78- * LIBXL_HAVE_SPICE_VDAGENT
79- *
80- * If defined, then the libxl_spice_info structure will contain a boolean type:
81-diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
82-index e5a343f..188f7df 100644
83---- a/tools/libxl/libxl_create.c
84-+++ b/tools/libxl/libxl_create.c
85-@@ -248,6 +248,10 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc,
86- if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT)
87- b_info->video_memkb = 0;
88- break;
89-+ case LIBXL_VGA_INTERFACE_TYPE_QXL:
90-+ LOG(ERROR,"qemu upstream required for qxl vga");
91-+ return ERROR_INVAL;
92-+ break;
93- case LIBXL_VGA_INTERFACE_TYPE_STD:
94- if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT)
95- b_info->video_memkb = 8 * 1024;
96-@@ -272,6 +276,15 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc,
97- if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT)
98- b_info->video_memkb = 0;
99- break;
100-+ case LIBXL_VGA_INTERFACE_TYPE_QXL:
101-+ if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) {
102-+ b_info->video_memkb = (128 * 1024);
103-+ } else if (b_info->video_memkb < (128 * 1024)) {
104-+ LOG(ERROR,
105-+ "128 Mib videoram is the minimum for qxl default");
106-+ return ERROR_INVAL;
107-+ }
108-+ break;
109- case LIBXL_VGA_INTERFACE_TYPE_STD:
110- if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT)
111- b_info->video_memkb = 16 * 1024;
112-diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
113-index 30c1578..58c9b99 100644
114---- a/tools/libxl/libxl_dm.c
115-+++ b/tools/libxl/libxl_dm.c
116-@@ -251,6 +251,8 @@ static char ** libxl__build_device_model_args_old(libxl__gc *gc,
117- case LIBXL_VGA_INTERFACE_TYPE_NONE:
118- flexarray_append_pair(dm_args, "-vga", "none");
119- break;
120-+ case LIBXL_VGA_INTERFACE_TYPE_QXL:
121-+ break;
122- }
123-124- if (b_info->u.hvm.boot) {
125-@@ -625,6 +627,12 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
126- break;
127- case LIBXL_VGA_INTERFACE_TYPE_NONE:
128- break;
129-+ case LIBXL_VGA_INTERFACE_TYPE_QXL:
130-+ /* QXL have 2 ram regions, ram and vram */
131-+ flexarray_append_pair(dm_args, "-device",
132-+ GCSPRINTF("qxl-vga,vram_size_mb=%"PRIu64",ram_size_mb=%"PRIu64,
133-+ (b_info->video_memkb/2/1024), (b_info->video_memkb/2/1024) ) );
134-+ break;
135- }
136-137- if (b_info->u.hvm.boot) {
138-diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
139-index 117b61d..023b21e 100644
140---- a/tools/libxl/libxl_types.idl
141-+++ b/tools/libxl/libxl_types.idl
142-@@ -183,6 +183,7 @@ libxl_vga_interface_type = Enumeration("vga_interface_type", [
143- (1, "CIRRUS"),
144- (2, "STD"),
145- (3, "NONE"),
146-+ (4, "QXL"),
147- ], init_val = "LIBXL_VGA_INTERFACE_TYPE_CIRRUS")
148-149- libxl_vendor_device = Enumeration("vendor_device", [
150-diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
151-index 648ca08..526a1f6 100644
152---- a/tools/libxl/xl_cmdimpl.c
153-+++ b/tools/libxl/xl_cmdimpl.c
154-@@ -2115,6 +2115,8 @@ skip_vfb:
155- b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_CIRRUS;
156- } else if (!strcmp(buf, "none")) {
157- b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_NONE;
158-+ } else if (!strcmp(buf, "qxl")) {
159-+ b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_QXL;
160- } else {
161- fprintf(stderr, "Unknown vga \"%s\" specified\n", buf);
162- exit(1);
163---
164-1.9.2
165-
···27 description = "A system call tracer for Linux";
28 license = with licenses; [ lgpl21Plus gpl2Plus ]; # gpl2Plus is for the test suite
29 platforms = platforms.linux;
30- maintainers = with maintainers; [ globin ma27 ];
31 };
32}
···27 description = "A system call tracer for Linux";
28 license = with licenses; [ lgpl21Plus gpl2Plus ]; # gpl2Plus is for the test suite
29 platforms = platforms.linux;
30+ maintainers = with maintainers; [ globin ma27 qyliss ];
31 };
32}
···800 torch-repl = throw "torch-repl has been removed, as the upstream project has been abandoned"; # added 2020-03-28
801 torchPackages = throw "torchPackages has been removed, as the upstream project has been abandoned"; # added 2020-03-28
802 trang = jing-trang; # added 2018-04-25
803- transcribe = throw "transcribe has been removed after being marked a broken for over a year"; # added 2020-09-16
804 transmission_gtk = transmission-gtk; # added 2018-01-06
805 transmission_remote_gtk = transmission-remote-gtk; # added 2018-01-06
806 transmission-remote-cli = "transmission-remote-cli has been removed, as the upstream project has been abandoned. Please use tremc instead"; # added 2020-10-14
···800 torch-repl = throw "torch-repl has been removed, as the upstream project has been abandoned"; # added 2020-03-28
801 torchPackages = throw "torchPackages has been removed, as the upstream project has been abandoned"; # added 2020-03-28
802 trang = jing-trang; # added 2018-04-25
0803 transmission_gtk = transmission-gtk; # added 2018-01-06
804 transmission_remote_gtk = transmission-remote-gtk; # added 2018-01-06
805 transmission-remote-cli = "transmission-remote-cli has been removed, as the upstream project has been abandoned. Please use tremc instead"; # added 2020-10-14