···735735 shell_path = os.path.join(self.state_dir, "shell")
736736 self.shell_socket = create_socket(shell_path)
737737738738+ display_available = any(x in os.environ for x in ["DISPLAY", "WAYLAND_DISPLAY"])
738739 qemu_options = (
739740 " ".join(
740741 [
···744745 "-device virtio-serial",
745746 "-device virtconsole,chardev=shell",
746747 "-device virtio-rng-pci",
747747- "-serial stdio" if "DISPLAY" in os.environ else "-nographic",
748748+ "-serial stdio" if display_available else "-nographic",
748749 ]
749750 )
750751 + " "
+13-8
nixos/modules/services/web-apps/keycloak.nix
···168168 type = lib.types.str;
169169 default = "keycloak";
170170 description = ''
171171- Username to use when connecting to the database.
172172- This is also used for automatic provisioning of the database.
173173- Changing this after the initial installation doesn't delete the
174174- old user and can cause further problems.
171171+ Username to use when connecting to an external or manually
172172+ provisioned database; has no effect when a local database is
173173+ automatically provisioned.
174174+175175+ To use this with a local database, set <xref
176176+ linkend="opt-services.keycloak.databaseCreateLocally" /> to
177177+ <literal>false</literal> and create the database and user
178178+ manually. The database should be called
179179+ <literal>keycloak</literal>.
175180 '';
176181 };
177182···588593 PSQL=${config.services.postgresql.package}/bin/psql
589594590595 db_password="$(<'${cfg.databasePasswordFile}')"
591591- $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"
592592- $PSQL -tAc "SELECT 1 FROM pg_database WHERE datname = 'keycloak'" | grep -q 1 || $PSQL -tAc 'CREATE DATABASE "keycloak" OWNER "${cfg.databaseUsername}"'
596596+ $PSQL -tAc "SELECT 1 FROM pg_roles WHERE rolname='keycloak'" | grep -q 1 || $PSQL -tAc "CREATE ROLE keycloak WITH LOGIN PASSWORD '$db_password' CREATEDB"
597597+ $PSQL -tAc "SELECT 1 FROM pg_database WHERE datname = 'keycloak'" | grep -q 1 || $PSQL -tAc 'CREATE DATABASE "keycloak" OWNER "keycloak"'
593598 '';
594599 };
595600···607612 set -eu
608613609614 db_password="$(<'${cfg.databasePasswordFile}')"
610610- ( echo "CREATE USER IF NOT EXISTS '${cfg.databaseUsername}'@'localhost' IDENTIFIED BY '$db_password';"
615615+ ( echo "CREATE USER IF NOT EXISTS 'keycloak'@'localhost' IDENTIFIED BY '$db_password';"
611616 echo "CREATE DATABASE keycloak CHARACTER SET utf8 COLLATE utf8_unicode_ci;"
612612- echo "GRANT ALL PRIVILEGES ON keycloak.* TO '${cfg.databaseUsername}'@'localhost';"
617617+ echo "GRANT ALL PRIVILEGES ON keycloak.* TO 'keycloak'@'localhost';"
613618 ) | ${config.services.mysql.package}/bin/mysql -N
614619 '';
615620 };
···11-From 161212ef02312c0681d2d809c8ff1e1f0ea6f6f9 Mon Sep 17 00:00:00 2001
22-From: Fabio Fantoni <fabio.fantoni@m2r.biz>
33-Date: Wed, 29 Apr 2015 11:20:28 +0200
44-Subject: [PATCH] libxl: Add qxl vga interface support for upstream qemu
55-66-Usage:
77-vga="qxl"
88-99-Qxl vga support many resolutions that not supported by stdvga,
1010-mainly the 16:9 ones and other high up to 2560x1600.
1111-With QXL you can get improved performance and smooth video also
1212-with high resolutions and high quality.
1313-Require their drivers installed in the domU and spice used
1414-otherwise act as a simple stdvga.
1515-1616-Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
1717-Signed-off-by: Zhou Peng <zpengxen@gmail.com>
1818-Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
1919-Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2020-Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
2121----
2222- docs/man/xl.cfg.pod.5 | 10 +++++++++-
2323- tools/libxl/libxl.h | 10 ++++++++++
2424- tools/libxl/libxl_create.c | 13 +++++++++++++
2525- tools/libxl/libxl_dm.c | 8 ++++++++
2626- tools/libxl/libxl_types.idl | 1 +
2727- tools/libxl/xl_cmdimpl.c | 2 ++
2828- 6 files changed, 43 insertions(+), 1 deletion(-)
2929-3030-diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5
3131-index f936dfc..8e4154f 100644
3232---- a/docs/man/xl.cfg.pod.5
3333-+++ b/docs/man/xl.cfg.pod.5
3434-@@ -1360,6 +1360,9 @@ qemu-xen-traditional device-model, the amount of video RAM is fixed at 4 MB,
3535- which is sufficient for 1024x768 at 32 bpp. For the upstream qemu-xen
3636- device-model, the default and minimum is 8 MB.
3737-3838-+For B<qxl> vga, the default is both default and minimal 128MB.
3939-+If B<videoram> is set less than 128MB, an error will be triggered.
4040-+
4141- =item B<stdvga=BOOLEAN>
4242-4343- Select a standard VGA card with VBE (VESA BIOS Extensions) as the
4444-@@ -1371,9 +1374,14 @@ This option is deprecated, use vga="stdvga" instead.
4545-4646- =item B<vga="STRING">
4747-4848--Selects the emulated video card (none|stdvga|cirrus).
4949-+Selects the emulated video card (none|stdvga|cirrus|qxl).
5050- The default is cirrus.
5151-5252-+In general, QXL should work with the Spice remote display protocol
5353-+for acceleration, and QXL driver is necessary in guest in this case.
5454-+QXL can also work with the VNC protocol, but it will be like a standard
5555-+VGA without acceleration.
5656-+
5757- =item B<vnc=BOOLEAN>
5858-5959- Allow access to the display via the VNC protocol. This enables the
6060-diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h
6161-index 44bd8e2..efc0617 100644
6262---- a/tools/libxl/libxl.h
6363-+++ b/tools/libxl/libxl.h
6464-@@ -535,6 +535,16 @@ typedef struct libxl__ctx libxl_ctx;
6565- #define LIBXL_HAVE_DOMINFO_OUTSTANDING_MEMKB 1
6666-6767- /*
6868-+ * LIBXL_HAVE_QXL
6969-+ *
7070-+ * If defined, then the libxl_vga_interface_type will contain another value:
7171-+ * "QXL". This value define if qxl vga is supported.
7272-+ *
7373-+ * If this is not defined, the qxl vga support is missed.
7474-+ */
7575-+#define LIBXL_HAVE_QXL 1
7676-+
7777-+/*
7878- * LIBXL_HAVE_SPICE_VDAGENT
7979- *
8080- * If defined, then the libxl_spice_info structure will contain a boolean type:
8181-diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
8282-index e5a343f..188f7df 100644
8383---- a/tools/libxl/libxl_create.c
8484-+++ b/tools/libxl/libxl_create.c
8585-@@ -248,6 +248,10 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc,
8686- if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT)
8787- b_info->video_memkb = 0;
8888- break;
8989-+ case LIBXL_VGA_INTERFACE_TYPE_QXL:
9090-+ LOG(ERROR,"qemu upstream required for qxl vga");
9191-+ return ERROR_INVAL;
9292-+ break;
9393- case LIBXL_VGA_INTERFACE_TYPE_STD:
9494- if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT)
9595- b_info->video_memkb = 8 * 1024;
9696-@@ -272,6 +276,15 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc,
9797- if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT)
9898- b_info->video_memkb = 0;
9999- break;
100100-+ case LIBXL_VGA_INTERFACE_TYPE_QXL:
101101-+ if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) {
102102-+ b_info->video_memkb = (128 * 1024);
103103-+ } else if (b_info->video_memkb < (128 * 1024)) {
104104-+ LOG(ERROR,
105105-+ "128 Mib videoram is the minimum for qxl default");
106106-+ return ERROR_INVAL;
107107-+ }
108108-+ break;
109109- case LIBXL_VGA_INTERFACE_TYPE_STD:
110110- if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT)
111111- b_info->video_memkb = 16 * 1024;
112112-diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
113113-index 30c1578..58c9b99 100644
114114---- a/tools/libxl/libxl_dm.c
115115-+++ b/tools/libxl/libxl_dm.c
116116-@@ -251,6 +251,8 @@ static char ** libxl__build_device_model_args_old(libxl__gc *gc,
117117- case LIBXL_VGA_INTERFACE_TYPE_NONE:
118118- flexarray_append_pair(dm_args, "-vga", "none");
119119- break;
120120-+ case LIBXL_VGA_INTERFACE_TYPE_QXL:
121121-+ break;
122122- }
123123-124124- if (b_info->u.hvm.boot) {
125125-@@ -625,6 +627,12 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
126126- break;
127127- case LIBXL_VGA_INTERFACE_TYPE_NONE:
128128- break;
129129-+ case LIBXL_VGA_INTERFACE_TYPE_QXL:
130130-+ /* QXL have 2 ram regions, ram and vram */
131131-+ flexarray_append_pair(dm_args, "-device",
132132-+ GCSPRINTF("qxl-vga,vram_size_mb=%"PRIu64",ram_size_mb=%"PRIu64,
133133-+ (b_info->video_memkb/2/1024), (b_info->video_memkb/2/1024) ) );
134134-+ break;
135135- }
136136-137137- if (b_info->u.hvm.boot) {
138138-diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
139139-index 117b61d..023b21e 100644
140140---- a/tools/libxl/libxl_types.idl
141141-+++ b/tools/libxl/libxl_types.idl
142142-@@ -183,6 +183,7 @@ libxl_vga_interface_type = Enumeration("vga_interface_type", [
143143- (1, "CIRRUS"),
144144- (2, "STD"),
145145- (3, "NONE"),
146146-+ (4, "QXL"),
147147- ], init_val = "LIBXL_VGA_INTERFACE_TYPE_CIRRUS")
148148-149149- libxl_vendor_device = Enumeration("vendor_device", [
150150-diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
151151-index 648ca08..526a1f6 100644
152152---- a/tools/libxl/xl_cmdimpl.c
153153-+++ b/tools/libxl/xl_cmdimpl.c
154154-@@ -2115,6 +2115,8 @@ skip_vfb:
155155- b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_CIRRUS;
156156- } else if (!strcmp(buf, "none")) {
157157- b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_NONE;
158158-+ } else if (!strcmp(buf, "qxl")) {
159159-+ b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_QXL;
160160- } else {
161161- fprintf(stderr, "Unknown vga \"%s\" specified\n", buf);
162162- exit(1);
163163---
164164-1.9.2
165165-
···2727 description = "A system call tracer for Linux";
2828 license = with licenses; [ lgpl21Plus gpl2Plus ]; # gpl2Plus is for the test suite
2929 platforms = platforms.linux;
3030- maintainers = with maintainers; [ globin ma27 ];
3030+ maintainers = with maintainers; [ globin ma27 qyliss ];
3131 };
3232}
···800800 torch-repl = throw "torch-repl has been removed, as the upstream project has been abandoned"; # added 2020-03-28
801801 torchPackages = throw "torchPackages has been removed, as the upstream project has been abandoned"; # added 2020-03-28
802802 trang = jing-trang; # added 2018-04-25
803803- transcribe = throw "transcribe has been removed after being marked a broken for over a year"; # added 2020-09-16
804803 transmission_gtk = transmission-gtk; # added 2018-01-06
805804 transmission_remote_gtk = transmission-remote-gtk; # added 2018-01-06
806805 transmission-remote-cli = "transmission-remote-cli has been removed, as the upstream project has been abandoned. Please use tremc instead"; # added 2020-10-14