From 4a1b3830a8ff6b05ad9a2b27c8a2cdbd00a45787 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Thu, 7 Dec 2023 12:28:29 +0900 Subject: gnu: dante: Enable preloading support. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . Dante uses dlopen which doesn't work with libc.so but libc.so.6. This fixes socksify, which is patched to skip invoking uname needlessly. * gnu/packages/networking.scm (dante): Enable preloading support. * gnu/packages/patches/dante-non-darwin.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. References: https://github.com/NixOS/nixpkgs/pull/68418#discussion_r343625853 Change-Id: I03a5b6b6e11cf6a0453a4968ff00c6dd627249a8 Signed-off-by: Ludovic Courtès --- gnu/packages/patches/dante-non-darwin.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 gnu/packages/patches/dante-non-darwin.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/dante-non-darwin.patch b/gnu/packages/patches/dante-non-darwin.patch new file mode 100644 index 0000000000..0ecb705c78 --- /dev/null +++ b/gnu/packages/patches/dante-non-darwin.patch @@ -0,0 +1,15 @@ +Disable runtime check for Darwin so we don't have to substitute uname. +--- a/bin/socksify.in ++++ b/bin/socksify.in +@@ -65,11 +65,6 @@ + unset FULLPATH + fi + +-#use "FLAT_NAMESPACE" on Darwin in attempt to match LD_PRELOAD behavior +-if test x`uname` = xDarwin; then +- export DYLD_FORCE_FLAT_NAMESPACE=t +-fi +- + #dlib/Makefile.am libtool flags should produce a predictable library name + #(ending in SOLIB_POSTFIX). + LIBRARY="${SOCKS_LIBRARY:-${FULLPATH}libdsocks.@SOLIB_POSTFIX@}" -- cgit v1.2.3 From fad93748cd2d44f7f68d2d973a22ed0b438e657b Mon Sep 17 00:00:00 2001 From: Herman Rimm Date: Mon, 27 Nov 2023 09:33:47 +0100 Subject: gnu: u-boot: Update to 2023.10. * gnu/local.mk: De-register patches. * gnu/packages/bootloaders.scm (u-boot): Update to 2023.10. [source]: Remove patches. (u-boot-documentation)[inputs]: Add python-sphinx-prompt. * gnu/packages/patches/u-boot-allow-disabling-openssl.patch: Refresh. * gnu/packages/patches/u-boot-fix-build-python-3.10.patch: Delete file. * gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch: Delete file. * gnu/packages/patches/u-boot-rk3399-enable-emmc-phy.patch: Delete file. * gnu/packages/patches/u-boot-rockchip-inno-usb.patch: Refresh. * gnu/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch: Delete file. Modifed-by: Vagrant Cascadian Signed-off-by: Vagrant Cascadian --- gnu/local.mk | 5 +- gnu/packages/bootloaders.scm | 21 ++------ .../patches/u-boot-allow-disabling-openssl.patch | 56 ++++++++++++---------- .../patches/u-boot-fix-build-python-3.10.patch | 37 -------------- .../patches/u-boot-fix-u-boot-lib-build.patch | 24 ---------- .../patches/u-boot-rk3399-enable-emmc-phy.patch | 26 ---------- .../patches/u-boot-rockchip-inno-usb.patch | 16 +++---- .../u-boot-sifive-prevent-reloc-initrd-fdt.patch | 16 ------- 8 files changed, 43 insertions(+), 158 deletions(-) delete mode 100644 gnu/packages/patches/u-boot-fix-build-python-3.10.patch delete mode 100644 gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch delete mode 100644 gnu/packages/patches/u-boot-rk3399-enable-emmc-phy.patch delete mode 100644 gnu/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 0d0258d8d4..4497804e07 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -61,6 +61,7 @@ # Copyright © 2023 Andy Tai # Copyright © 2023 B. Wilson # Copyright © 2023 gemmaro +# Copyright © 2023 Herman Rimm # # This file is part of GNU Guix. # @@ -2071,13 +2072,9 @@ dist_patch_DATA = \ %D%/packages/patches/tuxpaint-stamps-path.patch \ %D%/packages/patches/twinkle-bcg729.patch \ %D%/packages/patches/u-boot-allow-disabling-openssl.patch \ - %D%/packages/patches/u-boot-fix-build-python-3.10.patch \ - %D%/packages/patches/u-boot-fix-u-boot-lib-build.patch \ %D%/packages/patches/u-boot-nintendo-nes-serial.patch \ %D%/packages/patches/u-boot-patman-change-id.patch \ %D%/packages/patches/u-boot-rockchip-inno-usb.patch \ - %D%/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch \ - %D%/packages/patches/u-boot-rk3399-enable-emmc-phy.patch \ %D%/packages/patches/ucx-tcp-iface-ioctl.patch \ %D%/packages/patches/ultrastar-deluxe-no-freesans.patch \ %D%/packages/patches/ungoogled-chromium-extension-search-path.patch \ diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index e708641623..d0df4f62c2 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -18,6 +18,7 @@ ;;; Copyright © 2022, 2023 Denis 'GNUtoo' Carikli ;;; Copyright © 2021 Stefan ;;; Copyright © 2022, 2023 Maxim Cournoyer +;;; Copyright © 2023 Herman Rimm ;;; ;;; This file is part of GNU Guix. ;;; @@ -692,34 +693,19 @@ tree binary files. These are board description files used by Linux and BSD.") ;; and https://patchwork.ozlabs.org/project/uboot/patch/20210406151059.1187379-1-icenowy@aosc.io (search-patch "u-boot-rockchip-inno-usb.patch")) -(define %u-boot-sifive-prevent-relocating-initrd-fdt - ;; Fix boot in 2021.07 on Hifive unmatched, see - ;; https://bugs.launchpad.net/ubuntu/+source/u-boot/+bug/1937246 - (search-patch "u-boot-sifive-prevent-reloc-initrd-fdt.patch")) - (define %u-boot-allow-disabling-openssl-patch ;; Fixes build of u-boot 2021.10 without openssl ;; https://lists.denx.de/pipermail/u-boot/2021-October/462728.html (search-patch "u-boot-allow-disabling-openssl.patch")) -(define %u-boot-rk3399-enable-emmc-phy-patch - ;; Fix emmc boot on rockpro64 and pinebook-pro, this was a regression - ;; therefore should hopefully be fixed when updating u-boot. - ;; https://lists.denx.de/pipermail/u-boot/2021-November/466329.html - (search-patch "u-boot-rk3399-enable-emmc-phy.patch")) - (define u-boot (package (name "u-boot") - (version "2023.07.02") + (version "2023.10") (source (origin (patches (list %u-boot-rockchip-inno-usb-patch %u-boot-allow-disabling-openssl-patch - %u-boot-sifive-prevent-relocating-initrd-fdt - %u-boot-rk3399-enable-emmc-phy-patch - (search-patch "u-boot-fix-build-python-3.10.patch") - (search-patch "u-boot-fix-u-boot-lib-build.patch") (search-patch "u-boot-patman-change-id.patch"))) (method url-fetch) (uri (string-append @@ -727,7 +713,7 @@ tree binary files. These are board description files used by Linux and BSD.") "u-boot-" version ".tar.bz2")) (sha256 (base32 - "1m91w3fpywllkwm000dqsw3294j0szs1lz6qbgwv1aql3ic4hskb")))) + "0039rravvjq9yi41645fynycw4c869px024xfc0n212f05pnq3p0")))) (build-system gnu-build-system) (native-inputs (list bison @@ -778,6 +764,7 @@ also initializes the boards (RAM etc).") (modify-inputs (package-native-inputs u-boot) (append fontconfig python-sphinx + python-sphinx-prompt texinfo which))) (synopsis "U-Boot documentation") diff --git a/gnu/packages/patches/u-boot-allow-disabling-openssl.patch b/gnu/packages/patches/u-boot-allow-disabling-openssl.patch index 5195a7a6f8..708ed81e93 100644 --- a/gnu/packages/patches/u-boot-allow-disabling-openssl.patch +++ b/gnu/packages/patches/u-boot-allow-disabling-openssl.patch @@ -8,8 +8,10 @@ This reverts commit b4f3cc2c42d97967a3a3c8796c340f6b07ecccac. Addendum 2022-12-08, Ricardo Wurmus: This patch has been updated to introduce CONFIG_FIT_PRELOAD to remove fit_pre_load_data, which depends on openssl. +Addendum 2023-10-17, Herman Rimm: Update patch for u-boot v2023.10. + diff --git a/tools/kwbimage.c b/tools/kwbimage.c -index 94b7685392..eec599b0ee 100644 +index 4dce495ff0..976174ae77 100644 --- a/tools/kwbimage.c +++ b/tools/kwbimage.c @@ -19,6 +19,7 @@ @@ -38,7 +40,7 @@ index 94b7685392..eec599b0ee 100644 struct boot_mode { unsigned int id; -@@ -278,6 +282,8 @@ image_count_options(unsigned int optiontype) +@@ -281,6 +285,8 @@ image_count_options(unsigned int optiontype) return count; } @@ -47,7 +49,7 @@ index 94b7685392..eec599b0ee 100644 static int image_get_csk_index(void) { struct image_cfg_element *e; -@@ -288,6 +294,7 @@ static int image_get_csk_index(void) +@@ -291,6 +297,7 @@ static int image_get_csk_index(void) return e->csk_idx; } @@ -55,7 +57,7 @@ index 94b7685392..eec599b0ee 100644 static bool image_get_spezialized_img(void) { -@@ -432,6 +439,7 @@ static uint8_t baudrate_to_option(unsigned int baudrate) +@@ -435,6 +442,7 @@ static uint8_t baudrate_to_option(unsigned int baudrate) } } @@ -63,29 +65,31 @@ index 94b7685392..eec599b0ee 100644 static void kwb_msg(const char *fmt, ...) { if (verbose_mode) { -@@ -926,6 +934,7 @@ static int kwb_dump_fuse_cmds(struct secure_hdr_v1 *sec_hdr) +@@ -929,6 +937,7 @@ static int kwb_dump_fuse_cmds(struct secure_hdr_v1 *sec_hdr) done: return ret; } +#endif - static size_t image_headersz_align(size_t headersz, uint8_t blockid) + static int image_fill_xip_header(void *image, struct image_tool_params *params) { -@@ -1079,11 +1088,13 @@ static size_t image_headersz_v1(int *hasext) - */ - headersz = sizeof(struct main_hdr_v1); +@@ -1149,13 +1158,13 @@ static size_t image_headersz_v1(int *hasext) + int ret; + headersz = sizeof(struct main_hdr_v1); +- +#if defined(CONFIG_KWB_SECURE) if (image_get_csk_index() >= 0) { headersz += sizeof(struct secure_hdr_v1); if (hasext) *hasext = 1; } +- +#endif - cpu_sheeva = image_is_cpu_sheeva(); -@@ -1270,6 +1281,7 @@ err_close: + count = 0; +@@ -1351,6 +1360,7 @@ err_close: return -1; } @@ -93,7 +97,7 @@ index 94b7685392..eec599b0ee 100644 static int export_pub_kak_hash(RSA *kak, struct secure_hdr_v1 *secure_hdr) { FILE *hashf; -@@ -1382,6 +1394,7 @@ static int add_secure_header_v1(struct image_tool_params *params, uint8_t *ptr, +@@ -1458,6 +1468,7 @@ static int add_secure_header_v1(struct image_tool_params *params, uint8_t *image return 0; } @@ -101,9 +105,9 @@ index 94b7685392..eec599b0ee 100644 static void finish_register_set_header_v1(uint8_t **cur, uint8_t **next_ext, struct register_set_hdr_v1 *register_set_hdr, -@@ -1406,7 +1419,9 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params, +@@ -1481,7 +1492,9 @@ static void *image_create_v1(size_t *dataoff, struct image_tool_params *params, + struct image_cfg_element *e; struct main_hdr_v1 *main_hdr; - struct opt_hdr_v1 *ohdr; struct register_set_hdr_v1 *register_set_hdr; +#if defined(CONFIG_KWB_SECURE) struct secure_hdr_v1 *secure_hdr = NULL; @@ -111,15 +115,16 @@ index 94b7685392..eec599b0ee 100644 size_t headersz; uint8_t *image, *cur; int hasext = 0; -@@ -1491,6 +1506,7 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params, - if (main_hdr->blockid == IBR_HDR_PEX_ID) - main_hdr->srcaddr = cpu_to_le32(0xFFFFFFFF); - +@@ -1562,7 +1575,7 @@ static void *image_create_v1(size_t *dataoff, struct image_tool_params *params, + } + *dataoff = le32_to_cpu(main_hdr->srcaddr); + } +- +#if defined(CONFIG_KWB_SECURE) if (image_get_csk_index() >= 0) { /* * only reserve the space here; we fill the header later since -@@ -1501,7 +1517,7 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params, +@@ -1573,7 +1586,7 @@ static void *image_create_v1(size_t *dataoff, struct image_tool_params *params, *next_ext = 1; next_ext = &secure_hdr->next; } @@ -128,7 +133,7 @@ index 94b7685392..eec599b0ee 100644 datai = 0; for (cfgi = 0; cfgi < cfgn; cfgi++) { e = &image_cfg[cfgi]; -@@ -1624,10 +1640,12 @@ static void *image_create_v1(size_t *dataoff, struct image_tool_params *params, +@@ -1624,9 +1637,11 @@ static void *image_create_v1(size_t *dataoff, struct image_tool_params *params, &datai, delay); } @@ -140,7 +145,6 @@ index 94b7685392..eec599b0ee 100644 /* Calculate and set the header checksum */ main_hdr->checksum = image_checksum8(main_hdr, headersz); - --- a/tools/image-host.c +++ b/tools/image-host.c @@ -14,8 +14,10 @@ @@ -154,7 +158,7 @@ index 94b7685392..eec599b0ee 100644 /** * fit_set_hash_value - set hash value in requested has node -@@ -1116,6 +1118,7 @@ +@@ -1119,6 +1121,7 @@ static int fit_config_add_verification_data(const char *keydir, return 0; } @@ -162,7 +166,7 @@ index 94b7685392..eec599b0ee 100644 /* * 0) open file (open) * 1) read certificate (PEM_read_X509) -@@ -1224,6 +1227,7 @@ +@@ -1227,6 +1230,7 @@ int fit_pre_load_data(const char *keydir, void *keydest, void *fit) out: return ret; } @@ -172,7 +176,7 @@ index 94b7685392..eec599b0ee 100644 const char *comment, int require_keys, --- a/tools/fit_image.c +++ b/tools/fit_image.c -@@ -59,9 +59,10 @@ +@@ -61,9 +61,10 @@ static int fit_add_file_data(struct image_tool_params *params, size_t size_inc, ret = fit_set_timestamp(ptr, 0, time); } @@ -186,7 +190,7 @@ index 94b7685392..eec599b0ee 100644 params->comment, --- a/include/image.h +++ b/include/image.h -@@ -1090,6 +1090,7 @@ +@@ -1182,6 +1182,7 @@ int fit_image_hash_get_value(const void *fit, int noffset, uint8_t **value, int fit_set_timestamp(void *fit, int noffset, time_t timestamp); @@ -194,7 +198,7 @@ index 94b7685392..eec599b0ee 100644 /** * fit_pre_load_data() - add public key to fdt blob * -@@ -1104,6 +1105,7 @@ +@@ -1196,6 +1197,7 @@ int fit_set_timestamp(void *fit, int noffset, time_t timestamp); * < 0, on failure */ int fit_pre_load_data(const char *keydir, void *keydest, void *fit); diff --git a/gnu/packages/patches/u-boot-fix-build-python-3.10.patch b/gnu/packages/patches/u-boot-fix-build-python-3.10.patch deleted file mode 100644 index 7e5d6ba656..0000000000 --- a/gnu/packages/patches/u-boot-fix-build-python-3.10.patch +++ /dev/null @@ -1,37 +0,0 @@ -This patch is backported from U-Boot 2023.01; remove when updating. - -From 7d01bb1c5a1daef0187c9ea276bde19a8d0e7fde Mon Sep 17 00:00:00 2001 -From: Michal Suchanek -Date: Thu, 13 Oct 2022 22:43:41 +0200 -Subject: [PATCH] libfdt: Fix build with python 3.10 - -Python 3.10 requires defining PY_SSIZE_T_CLEAN. This will be fixed in -swig 4.10 but it is not clear when it will be released. There was a -warning since python 3.8. - -Link: https://github.com/swig/swig/pull/2277 - -Signed-off-by: Michal Suchanek -Reviewed-by: Simon Glass ---- - scripts/dtc/pylibfdt/libfdt.i_shipped | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/scripts/dtc/pylibfdt/libfdt.i_shipped b/scripts/dtc/pylibfdt/libfdt.i_shipped -index 27c29ea260..56cc5d48f4 100644 ---- a/scripts/dtc/pylibfdt/libfdt.i_shipped -+++ b/scripts/dtc/pylibfdt/libfdt.i_shipped -@@ -7,6 +7,10 @@ - - %module libfdt - -+%begin %{ -+#define PY_SSIZE_T_CLEAN -+%} -+ - %include - - %{ --- -GitLab - diff --git a/gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch b/gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch deleted file mode 100644 index 233c437de6..0000000000 --- a/gnu/packages/patches/u-boot-fix-u-boot-lib-build.patch +++ /dev/null @@ -1,24 +0,0 @@ -Submitted upstream (see: -https://lists.denx.de/pipermail/u-boot/2023-July/521984.html) - -diff --git a/tools/u_boot_pylib/pyproject.toml b/tools/u_boot_pylib/pyproject.toml -index 3f33caf6f8..037c5d629e 100644 ---- a/tools/u_boot_pylib/pyproject.toml -+++ b/tools/u_boot_pylib/pyproject.toml -@@ -9,7 +9,7 @@ authors = [ - { name="Simon Glass", email="sjg@chromium.org" }, - ] - description = "U-Boot python library" --readme = "README.md" -+readme = "README.rst" - requires-python = ">=3.7" - classifiers = [ - "Programming Language :: Python :: 3", -@@ -20,3 +20,7 @@ classifiers = [ - [project.urls] - "Homepage" = "https://u-boot.readthedocs.io" - "Bug Tracker" = "https://source.denx.de/groups/u-boot/-/issues" -+ -+[tool.setuptools.packages.find] -+where = [".."] -+include = ["u_boot_pylib*"] diff --git a/gnu/packages/patches/u-boot-rk3399-enable-emmc-phy.patch b/gnu/packages/patches/u-boot-rk3399-enable-emmc-phy.patch deleted file mode 100644 index f14a9ce104..0000000000 --- a/gnu/packages/patches/u-boot-rk3399-enable-emmc-phy.patch +++ /dev/null @@ -1,26 +0,0 @@ -adapting commit ac804143cf ("mmc: rockchip_sdhci: add phy and clock -config for rk3399") to fix the issue "Not found emmc phy device". - -Signed-off-by: Yifeng Zhao ---- - - arch/arm/dts/rk3399-u-boot.dtsi | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/arch/arm/dts/rk3399-u-boot.dtsi b/arch/arm/dts/rk3399-u-boot.dtsi -index 73922c328a..716b9a433a 100644 ---- a/arch/arm/dts/rk3399-u-boot.dtsi -+++ b/arch/arm/dts/rk3399-u-boot.dtsi -@@ -88,6 +88,10 @@ - u-boot,dm-pre-reloc; - }; - -+&emmc_phy { -+ u-boot,dm-pre-reloc; -+}; -+ - &grf { - u-boot,dm-pre-reloc; - }; --- -2.17.1 diff --git a/gnu/packages/patches/u-boot-rockchip-inno-usb.patch b/gnu/packages/patches/u-boot-rockchip-inno-usb.patch index 58f04b2c78..eeb25f4b89 100644 --- a/gnu/packages/patches/u-boot-rockchip-inno-usb.patch +++ b/gnu/packages/patches/u-boot-rockchip-inno-usb.patch @@ -170,10 +170,10 @@ Tested-by: Peter Robinson 1 file changed, 21 insertions(+) diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c -index 62b8ba3a4a..be9cc99d90 100644 +index 70e61eccb7..ce36db94a7 100644 --- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c +++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c -@@ -62,6 +62,8 @@ struct rockchip_usb2phy { +@@ -64,6 +64,8 @@ struct rockchip_usb2phy { void *reg_base; struct clk phyclk; const struct rockchip_usb2phy_cfg *phy_cfg; @@ -182,7 +182,7 @@ index 62b8ba3a4a..be9cc99d90 100644 }; static inline int property_enable(void *reg_base, -@@ -92,6 +94,10 @@ static int rockchip_usb2phy_power_on(struct phy *phy) +@@ -106,6 +108,10 @@ static int rockchip_usb2phy_power_on(struct phy *phy) struct rockchip_usb2phy *priv = dev_get_priv(parent); const struct rockchip_usb2phy_port_cfg *port_cfg = us2phy_get_port(phy); @@ -193,7 +193,7 @@ index 62b8ba3a4a..be9cc99d90 100644 property_enable(priv->reg_base, &port_cfg->phy_sus, false); /* waiting for the utmi_clk to become stable */ -@@ -106,6 +112,10 @@ static int rockchip_usb2phy_power_off(struct phy *phy) +@@ -120,6 +126,10 @@ static int rockchip_usb2phy_power_off(struct phy *phy) struct rockchip_usb2phy *priv = dev_get_priv(parent); const struct rockchip_usb2phy_port_cfg *port_cfg = us2phy_get_port(phy); @@ -204,7 +204,7 @@ index 62b8ba3a4a..be9cc99d90 100644 property_enable(priv->reg_base, &port_cfg->phy_sus, true); return 0; -@@ -118,6 +128,10 @@ static int rockchip_usb2phy_init(struct phy *phy) +@@ -132,6 +142,10 @@ static int rockchip_usb2phy_init(struct phy *phy) const struct rockchip_usb2phy_port_cfg *port_cfg = us2phy_get_port(phy); int ret; @@ -213,9 +213,9 @@ index 62b8ba3a4a..be9cc99d90 100644 + return 0; + ret = clk_enable(&priv->phyclk); - if (ret) { + if (ret && ret != -ENOSYS) { dev_err(phy->dev, "failed to enable phyclk (ret=%d)\n", ret); -@@ -140,6 +154,10 @@ static int rockchip_usb2phy_exit(struct phy *phy) +@@ -154,6 +168,10 @@ static int rockchip_usb2phy_exit(struct phy *phy) struct udevice *parent = dev_get_parent(phy->dev); struct rockchip_usb2phy *priv = dev_get_priv(parent); @@ -226,7 +226,7 @@ index 62b8ba3a4a..be9cc99d90 100644 clk_disable(&priv->phyclk); return 0; -@@ -212,6 +230,9 @@ static int rockchip_usb2phy_probe(struct udevice *dev) +@@ -294,6 +312,9 @@ static int rockchip_usb2phy_probe(struct udevice *dev) return ret; } diff --git a/gnu/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch b/gnu/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch deleted file mode 100644 index 858f42efe7..0000000000 --- a/gnu/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch +++ /dev/null @@ -1,16 +0,0 @@ -Description: prevent relocating initrd & fdt, that results in failure to boot -Author: Heinrich Schuchardt (xypron) -Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/u-boot/+bug/1937246 -Index: u-boot-2021.07~rc4+dfsg/include/configs/sifive-unmatched.h -=================================================================== ---- u-boot-2021.07~rc4+dfsg.orig/include/configs/sifive-unmatched.h -+++ u-boot-2021.07~rc4+dfsg/include/configs/sifive-unmatched.h -@@ -55,6 +55,8 @@ - "name=system,size=-,bootable,type=${type_guid_gpt_system};" - - #define CFG_EXTRA_ENV_SETTINGS \ -+ "fdt_high=0xffffffffffffffff\0" \ -+ "initrd_high=0xffffffffffffffff\0" \ - "kernel_addr_r=0x84000000\0" \ - "kernel_comp_addr_r=0x88000000\0" \ - "kernel_comp_size=0x4000000\0" \ -- cgit v1.2.3 From 2c8cdb05502cacaf603da231796ccafa59671117 Mon Sep 17 00:00:00 2001 From: Feng Shu Date: Thu, 14 Dec 2023 09:28:44 +0800 Subject: gnu: slim: Update to 1.4.0. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/display-managers.scm (slim)[version]: Update to 1.4.0. [inputs]: Remove input label. [arguments]: Use gexp and remove fix-0-pointer-comparison. [home-pages]: Update to slim-fork's url. * gnu/packages/patches/slim-config.patch: Port to slim-1.4.0. * gnu/packages/patches/slim-display.patch: Port to slim-1.4.0. * gnu/packages/patches/slim-reset.patch: Deleted, no ablilty to port this patch for big change in v1.4.0. * gnu/packages/patches/slim-session.patch: Deleted. seem to work without this patch, further observation is needed. * gnu/packages/patches/slim-sigusr1.patch: Deleted, fixed in upstream. * gnu/local.mk: Remove slim-reset.patch, slim-session.patch, slim-sigur1.patch. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 3 -- gnu/packages/display-managers.scm | 89 ++++++++++++++------------------- gnu/packages/patches/slim-config.patch | 43 +++++++++------- gnu/packages/patches/slim-display.patch | 74 +++++++++++++++++---------- gnu/packages/patches/slim-reset.patch | 33 ------------ gnu/packages/patches/slim-session.patch | 17 ------- gnu/packages/patches/slim-sigusr1.patch | 33 ------------ 7 files changed, 111 insertions(+), 181 deletions(-) delete mode 100644 gnu/packages/patches/slim-reset.patch delete mode 100644 gnu/packages/patches/slim-session.patch delete mode 100644 gnu/packages/patches/slim-sigusr1.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index eca52cd39f..a472c62acb 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2004,10 +2004,7 @@ dist_patch_DATA = \ %D%/packages/patches/serf-python3.patch \ %D%/packages/patches/shakespeare-spl-fix-grammar.patch \ %D%/packages/patches/sharutils-CVE-2018-1000097.patch \ - %D%/packages/patches/slim-session.patch \ %D%/packages/patches/slim-config.patch \ - %D%/packages/patches/slim-sigusr1.patch \ - %D%/packages/patches/slim-reset.patch \ %D%/packages/patches/slim-login.patch \ %D%/packages/patches/slim-display.patch \ %D%/packages/patches/stex-copy-from-immutable-store.patch \ diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm index 935563c94c..7120c2ad75 100644 --- a/gnu/packages/display-managers.scm +++ b/gnu/packages/display-managers.scm @@ -486,59 +486,46 @@ GTK+, lets you select a desktop session and log in to it.") (define-public slim (package (name "slim") - (version "1.3.6") - (source (origin - (method url-fetch) - ;; Used to be available from download.berlios.de. - (uri (string-append - "mirror://sourceforge/slim.berlios/slim-" - version ".tar.gz")) - (sha256 - (base32 "1pqhk22jb4aja4hkrm7rjgbgzjyh7i4zswdgf5nw862l2znzxpi1")) - (patches (search-patches "slim-config.patch" - "slim-reset.patch" - "slim-login.patch" - "slim-session.patch" - "slim-sigusr1.patch" - "slim-display.patch")))) + (version "1.4.0") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/slim-fork/slim-" version + ".tar.gz")) + (sha256 + (base32 "011jfmksy0kgw4z0y70mc80bm5kmz5i1sgm6krrfj0h00zak22rm")) + (patches (search-patches "slim-config.patch" + "slim-login.patch" + "slim-display.patch")))) (build-system cmake-build-system) - (inputs `(("linux-pam" ,linux-pam) - ("libpng" ,libpng) - ("libjpeg" ,libjpeg-turbo) - ("freeglut" ,freeglut) - ("libxrandr" ,libxrandr) - ("libxrender" ,libxrender) - ("freetype" ,freetype) - ("fontconfig" ,fontconfig) - ("libx11" ,libx11) - ("libxft" ,libxft) - ("libxmu" ,libxmu) - ("xauth" ,xauth))) - (native-inputs - (list pkg-config)) + (inputs (list fontconfig + freeglut + freetype + libjpeg-turbo + libpng + libx11 + libxft + libxmu + libxrandr + libxrender + linux-pam + xauth)) + (native-inputs (list pkg-config)) (arguments - '(#:phases - (modify-phases %standard-phases - (add-before 'configure 'set-new-etc-location - (lambda _ - (substitute* "CMakeLists.txt" - (("/etc") - (string-append (assoc-ref %outputs "out") "/etc")) - (("install.*systemd.*") - ;; The build system's logic here is: if "Linux", then - ;; "systemd". Strip that. - "")) - #t)) - (add-before 'configure 'fix-0-pointer-comparison - (lambda _ - (substitute* "panel.cpp" - (("WinGC < 0") "WinGC == NULL"))))) - #:configure-flags '("-DUSE_PAM=yes" - "-DUSE_CONSOLEKIT=no") - #:tests? #f)) - - ;; This used to be at . - (home-page "https://github.com/iwamatsu/slim") + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'set-new-etc-location + (lambda _ + (substitute* "CMakeLists.txt" + (("/etc") + (string-append #$output "/etc")))))) + #:configure-flags + #~(list "-DUSE_PAM=yes" "-DUSE_CONSOLEKIT=no") + #:tests? #f)) + ;; The original project (https://github.com/iwamatsu/slim) has not been + ;; maintained since 2013, so we use slim-fork instead. + (home-page "https://slim-fork.sourceforge.io/") (synopsis "Desktop-independent graphical login manager for X11") (description "SLiM is a Desktop-independent graphical login manager for X11, derived diff --git a/gnu/packages/patches/slim-config.patch b/gnu/packages/patches/slim-config.patch index 5e6135d75c..91eeb5f56c 100644 --- a/gnu/packages/patches/slim-config.patch +++ b/gnu/packages/patches/slim-config.patch @@ -1,27 +1,36 @@ Allow the configuration file and theme directory to be specified at run time. + Patch by Eelco Dolstra, from Nixpkgs. +--- + app.cpp | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) ---- slim-1.3.6/app.cpp 2013-10-02 00:38:05.000000000 +0200 -+++ slim-1.3.6/app.cpp 2013-10-15 11:02:55.629263422 +0200 -@@ -200,7 +200,9 @@ - - /* Read configuration and theme */ - cfg = new Cfg; -- cfg->readConf(CFGFILE); -+ char *cfgfile = getenv("SLIM_CFGFILE"); -+ if (!cfgfile) cfgfile = CFGFILE; -+ cfg->readConf(cfgfile); +diff --git a/app.cpp b/app.cpp +index 237477d..735df9c 100644 +--- a/app.cpp ++++ b/app.cpp +@@ -285,7 +285,9 @@ void App::Run() + if ( cfg == 0 ) + { + cfg = new Cfg; +- cfg->readConf(CFGFILE); ++ const char* cfgfile = getenv("SLIM_CFGFILE"); ++ if (!cfgfile) cfgfile = CFGFILE; ++ cfg->readConf(cfgfile); + } string themebase = ""; string themefile = ""; - string themedir = ""; -@@ -208,7 +210,9 @@ - if (testing) { - themeName = testtheme; - } else { +@@ -297,7 +299,9 @@ void App::Run() + } + else + { - themebase = string(THEMESDIR) + "/"; -+ char *themesdir = getenv("SLIM_THEMESDIR"); ++ const char* themesdir = getenv("SLIM_THEMESDIR"); + if (!themesdir) themesdir = THEMESDIR; + themebase = string(themesdir) + "/"; themeName = cfg->getOption("current_theme"); string::size_type pos; - if ((pos = themeName.find(",")) != string::npos) { + if ((pos = themeName.find(",")) != string::npos) +-- +2.39.2 + diff --git a/gnu/packages/patches/slim-display.patch b/gnu/packages/patches/slim-display.patch index f68604a94b..b59e20c25c 100644 --- a/gnu/packages/patches/slim-display.patch +++ b/gnu/packages/patches/slim-display.patch @@ -1,39 +1,52 @@ -Add "display_name" configuration option and use its value instead of -the hard coded one. +Add "display_name" configuration option and use its value instead of the hard +coded one. Patch by Diego N. Barbato +--- + app.cpp | 23 ++++++++++------------- + cfg.cpp | 1 + + switchuser.cpp | 2 +- + 3 files changed, 12 insertions(+), 14 deletions(-) ---- a/app.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ b/app.cpp 2019-04-27 13:48:23.479133531 +0200 -@@ -190,7 +190,13 @@ - } +diff --git a/app.cpp b/app.cpp +index b840e60..4f72da0 100644 +--- a/app.cpp ++++ b/app.cpp +@@ -270,7 +270,16 @@ App::App(int argc, char** argv) - void App::Run() { + void App::Run() + { - DisplayName = DISPLAY; + /* Read configuration */ -+ cfg = new Cfg; -+ char *cfgfile = getenv("SLIM_CFGFILE"); -+ if (!cfgfile) cfgfile = CFGFILE; -+ cfg->readConf(cfgfile); ++ if ( cfg == 0 ) ++ { ++ cfg = new Cfg; ++ const char *cfgfile = getenv("SLIM_CFGFILE"); ++ if (!cfgfile) cfgfile = CFGFILE; ++ cfg->readConf(cfgfile); + -+ DisplayName = cfg->getOption("display_name").c_str(); ++ DisplayName = cfg->getOption("display_name").c_str(); ++ } #ifdef XNEST_DEBUG char* p = getenv("DISPLAY"); -@@ -200,11 +206,7 @@ +@@ -281,14 +287,7 @@ void App::Run() } #endif - /* Read configuration and theme */ -- cfg = new Cfg; -- char *cfgfile = getenv("SLIM_CFGFILE"); -- if (!cfgfile) cfgfile = CFGFILE; -- cfg->readConf(cfgfile); -+ /* Read theme */ +- if ( cfg == 0 ) +- { +- cfg = new Cfg; +- const char* cfgfile = getenv("SLIM_CFGFILE"); +- if (!cfgfile) cfgfile = CFGFILE; +- cfg->readConf(cfgfile); +- } ++ /* Read theme */ string themebase = ""; string themefile = ""; string themedir = ""; -@@ -911,9 +913,7 @@ +@@ -1115,9 +1114,7 @@ int App::StartServer() static const int MAX_XSERVER_ARGS = 256; static char* server[MAX_XSERVER_ARGS+2] = { NULL }; server[0] = (char *)cfg->getOption("default_xserver").c_str(); @@ -44,7 +57,7 @@ Patch by Diego N. Barbato char* args = new char[argOption.length()+2]; /* NULL plus vt */ strcpy(args, argOption.c_str()); -@@ -1233,7 +1233,7 @@ +@@ -1424,7 +1421,7 @@ void App::CreateServerAuth() authfile = cfg->getOption("authfile"); remove(authfile.c_str()); putenv(StrConcat("XAUTHORITY=", authfile.c_str())); @@ -53,9 +66,11 @@ Patch by Diego N. Barbato authfile); } ---- a/cfg.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ b/cfg.cpp 2019-04-27 13:49:40.511773743 +0200 -@@ -31,6 +31,7 @@ +diff --git a/cfg.cpp b/cfg.cpp +index 37fb10d..a0c9bf1 100644 +--- a/cfg.cpp ++++ b/cfg.cpp +@@ -40,6 +40,7 @@ Cfg::Cfg() /* Configuration options */ options.insert(option("default_path","/bin:/usr/bin:/usr/local/bin")); options.insert(option("default_xserver","/usr/bin/X")); @@ -63,13 +78,18 @@ Patch by Diego N. Barbato options.insert(option("xserver_arguments","")); options.insert(option("numlock","")); options.insert(option("daemon","")); ---- a/switchuser.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ b/switchuser.cpp 2019-04-27 13:50:19.380096651 +0200 -@@ -54,6 +54,6 @@ +diff --git a/switchuser.cpp b/switchuser.cpp +index ca936ae..255f5d9 100644 +--- a/switchuser.cpp ++++ b/switchuser.cpp +@@ -69,6 +69,6 @@ void SwitchUser::SetClientAuth(const char* mcookie) string home = string(Pw->pw_dir); string authfile = home + "/.Xauthority"; remove(authfile.c_str()); - Util::add_mcookie(mcookie, ":0", cfg->getOption("xauth_path"), -+ Util::add_mcookie(mcookie, displayName.c_str(), cfg->getOption("xauth_path"), ++ Util::add_mcookie(mcookie, cfg->getOption("display_name").c_str(), cfg->getOption("xauth_path"), authfile); } +-- +2.39.2 + diff --git a/gnu/packages/patches/slim-reset.patch b/gnu/packages/patches/slim-reset.patch deleted file mode 100644 index eebee6b7b5..0000000000 --- a/gnu/packages/patches/slim-reset.patch +++ /dev/null @@ -1,33 +0,0 @@ -Do not reset chosen session and maintain the session-choser dialog after a -failed login attempt. - -Patch by E. Bavier - ---- slim-1.3.6/panel.cpp.orig 1969-12-31 18:00:00.000000000 -0600 -+++ slim-1.3.6/panel.cpp 2016-10-17 17:00:07.259649063 -0500 -@@ -260,13 +260,12 @@ - } - - void Panel::ClearPanel() { -- session_name = ""; -- session_exec = ""; - Reset(); - XClearWindow(Dpy, Root); - XClearWindow(Dpy, Win); - Cursor(SHOW); - ShowText(); -+ ShowSession(); - XFlush(Dpy); - } - -@@ -760,9 +760,7 @@ - pair ses = cfg->nextSession(); - session_name = ses.first; - session_exec = ses.second; -- if (session_name.size() > 0) { -- ShowSession(); -- } -+ ShowSession(); - } - - /* Display session type on the screen */ diff --git a/gnu/packages/patches/slim-session.patch b/gnu/packages/patches/slim-session.patch deleted file mode 100644 index b85d3f7dd0..0000000000 --- a/gnu/packages/patches/slim-session.patch +++ /dev/null @@ -1,17 +0,0 @@ -Exit after the user's session has finished. This works around slim's broken -PAM session handling (see -http://developer.berlios.de/bugs/?func=detailbug&bug_id=19102&group_id=2663). - -Patch by Eelco Dolstra, from Nixpkgs. - ---- slim-1.3.6/app.cpp 2013-10-15 11:02:55.629263422 +0200 -+++ slim-1.3.6/app.cpp 2013-10-15 13:00:10.141210784 +0200 -@@ -816,7 +822,7 @@ - StopServer(); - RemoveLock(); - while (waitpid(-1, NULL, WNOHANG) > 0); /* Collects all dead childrens */ -- Run(); -+ exit(OK_EXIT); - } - - void App::KillAllClients(Bool top) { diff --git a/gnu/packages/patches/slim-sigusr1.patch b/gnu/packages/patches/slim-sigusr1.patch deleted file mode 100644 index 344b02933e..0000000000 --- a/gnu/packages/patches/slim-sigusr1.patch +++ /dev/null @@ -1,33 +0,0 @@ -This patch fixes SLiM so it really waits for the X server to be ready -before attempting to connect to it. Indeed, the X server notices that -its parent process has a handler for SIGUSR1, and consequently sends it -SIGUSR1 when it's ready to accept connections. - -The problem was that SLiM doesn't pay attention to SIGUSR1. So in practice, -if X starts slowly, then SLiM gets ECONNREFUSED a couple of time on -/tmp/.X11-unix/X0, then goes on trying to connect to localhost:6000, -where nobody answers; eventually, it times out and tries again on -/tmp/.X11-unix/X0, and finally it shows up on the screen. - -Patch by L. Courtès. - ---- slim-1.3.6/app.cpp 2014-02-05 15:27:20.000000000 +0100 -+++ slim-1.3.6/app.cpp 2014-02-09 22:42:04.000000000 +0100 -@@ -119,7 +119,9 @@ void CatchSignal(int sig) { - exit(ERR_EXIT); - } - -+static volatile int got_sigusr1 = 0; - void User1Signal(int sig) { -+ got_sigusr1 = 1; - signal(sig, User1Signal); - } - -@@ -884,6 +886,7 @@ int App::WaitForServer() { - int ncycles = 120; - int cycles; - -+ while (!got_sigusr1); - for(cycles = 0; cycles < ncycles; cycles++) { - if((Dpy = XOpenDisplay(DisplayName))) { - XSetIOErrorHandler(xioerror); -- cgit v1.2.3