From 9af90aafdfd8afd5fb7b5377ca5daf2215d38d7a Mon Sep 17 00:00:00 2001 From: Caleb Ristvedt Date: Thu, 21 May 2020 20:30:58 -0500 Subject: gnu: guile-fibers: Add patch to fix resource leak. guile-fibers@1.0.0 has a resource leak where run-fibers will only destroy one scheduler, but it creates as many as there are cpu cores by default (see https://github.com/wingo/fibers/issues/36). This causes the tests to fail on systems with many cores, and can cause guile to crash under certain circumstances. This fixes that resource leak. At present neither git master nor the latest release has fixed this yet. * gnu/packages/patches/guile-fibers-destroy-peer-schedulers.patch: New patch. * gnu/local.mk: Add it to the list of patches. * gnu/packages/guile-xyz.scm (guile-fibers): Use it. --- .../guile-fibers-destroy-peer-schedulers.patch | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 gnu/packages/patches/guile-fibers-destroy-peer-schedulers.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/guile-fibers-destroy-peer-schedulers.patch b/gnu/packages/patches/guile-fibers-destroy-peer-schedulers.patch new file mode 100644 index 0000000000..8bb7153153 --- /dev/null +++ b/gnu/packages/patches/guile-fibers-destroy-peer-schedulers.patch @@ -0,0 +1,24 @@ +Fibers 1.0.0 has a bug in run-fibers in which peer schedulers aren't destroyed - +so if you had 4 cores, 1 would be destroyed when run-fibers returned, but the +other 3 would stay around. Each scheduler uses 3 file descriptors, so for +machines with many cores, this resource leak adds up quickly - quickly enough +that the test suite can even fail because of it. + +See https://github.com/wingo/fibers/issues/36. + +This fixes that. It should be safe to destroy the peer schedulers at the given +point because the threads that could be running them are all either dead or the +current thread. + +As of May 21, 2020, this bug still existed in the 1.0.0 (latest) release and in +git master. +--- a/fibers.scm 2020-05-21 18:38:06.890690154 -0500 ++++ b/fibers.scm 2020-05-21 18:38:56.395686693 -0500 +@@ -137,5 +137,6 @@ + (%run-fibers scheduler hz finished? affinity)) + (lambda () + (stop-auxiliary-threads scheduler))))) ++ (for-each destroy-scheduler (scheduler-remote-peers scheduler)) + (destroy-scheduler scheduler) + (apply values (atomic-box-ref ret)))))) + -- cgit 1.4.1 From 8d0548fd34ff4b6f79b58a77f7266f3e672beb62 Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Mon, 11 May 2020 16:45:24 +0200 Subject: gnu: network-manager: Appease guix lint. * gnu/packages/gnome.scm (network-manager)[home-page]: Use the permenant redirect URL. * gnu/packages/patches/nm-plugin-path.patch: Renamed to 'gnu/packages/patches/network-manager-plugin-path.patch'. --- gnu/local.mk | 2 +- gnu/packages/gnome.scm | 4 +- .../patches/network-manager-plugin-path.patch | 51 ++++++++++++++++++++++ gnu/packages/patches/nm-plugin-path.patch | 51 ---------------------- 4 files changed, 54 insertions(+), 54 deletions(-) create mode 100644 gnu/packages/patches/network-manager-plugin-path.patch delete mode 100644 gnu/packages/patches/nm-plugin-path.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 2f24f892b1..961dedfdf6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1297,7 +1297,7 @@ dist_patch_DATA = \ %D%/packages/patches/netsurf-y2038-tests.patch \ %D%/packages/patches/netsurf-longer-test-timeout.patch \ %D%/packages/patches/ngircd-handle-zombies.patch \ - %D%/packages/patches/nm-plugin-path.patch \ + %D%/packages/patches/network-manager-plugin-path.patch \ %D%/packages/patches/nsis-env-passthru.patch \ %D%/packages/patches/nss-increase-test-timeout.patch \ %D%/packages/patches/nss-pkgconfig.patch \ diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index fb7c3b4fbd..784eb65426 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -6357,7 +6357,7 @@ users.") (uri (string-append "mirror://gnome/sources/NetworkManager/" (version-major+minor version) "/" "NetworkManager-" version ".tar.xz")) - (patches (search-patches "nm-plugin-path.patch")) + (patches (search-patches "network-manager-plugin-path.patch")) (sha256 (base32 "06044fl60bjlj7c6rqqfbm5795h61h6yzp7ch392hzcnm46wwhn3")) @@ -6493,7 +6493,7 @@ users.") ("util-linux" ,util-linux) ("elogind" ,elogind))) (synopsis "Network connection manager") - (home-page "https://www.gnome.org/projects/NetworkManager/") + (home-page "https://wiki.gnome.org/Projects/NetworkManager") (description "NetworkManager is a system network service that manages your network devices and connections, attempting to keep active network connectivity when diff --git a/gnu/packages/patches/network-manager-plugin-path.patch b/gnu/packages/patches/network-manager-plugin-path.patch new file mode 100644 index 0000000000..505ae31534 --- /dev/null +++ b/gnu/packages/patches/network-manager-plugin-path.patch @@ -0,0 +1,51 @@ +From d3026a6d331298003ccc6cd9d2e20dcb7fa9ae1d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tom=C3=A1=C5=A1=20=C4=8Cech?= +Date: Wed, 3 Jul 2019 13:31:54 +0200 +Subject: [PATCH] respect NM_VPN_PLUGIN_DIR + +--- + src/vpn/nm-vpn-manager.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/src/vpn/nm-vpn-manager.c b/src/vpn/nm-vpn-manager.c +index d063916..d779166 100644 +--- a/src/vpn/nm-vpn-manager.c ++++ b/src/vpn/nm-vpn-manager.c +@@ -223,6 +223,7 @@ nm_vpn_manager_init (NMVpnManager *self) + GSList *infos, *info; + const char *conf_dir_etc = _nm_vpn_plugin_info_get_default_dir_etc (); + const char *conf_dir_lib = _nm_vpn_plugin_info_get_default_dir_lib (); ++ const char *conf_dir_user = _nm_vpn_plugin_info_get_default_dir_user (); + + /* Watch the VPN directory for changes */ + file = g_file_new_for_path (conf_dir_lib); +@@ -241,6 +242,14 @@ nm_vpn_manager_init (NMVpnManager *self) + G_CALLBACK (vpn_dir_changed), self); + } + ++ file = g_file_new_for_path (conf_dir_user); ++ priv->monitor_etc = g_file_monitor_directory (file, G_FILE_MONITOR_NONE, NULL, NULL); ++ g_object_unref (file); ++ if (priv->monitor_etc) { ++ priv->monitor_id_etc = g_signal_connect (priv->monitor_etc, "changed", ++ G_CALLBACK (vpn_dir_changed), self); ++ } ++ + /* first read conf_dir_lib. The name files are not really user configuration, but + * plugin configuration. Hence we expect ~newer~ plugins to install their files + * in /usr/lib/NetworkManager. We want to prefer those files. +@@ -255,6 +264,11 @@ nm_vpn_manager_init (NMVpnManager *self) + try_add_plugin (self, info->data); + g_slist_free_full (infos, g_object_unref); + ++ infos = _nm_vpn_plugin_info_list_load_dir (conf_dir_user, TRUE, 0, NULL, NULL); ++ for (info = infos; info; info = info->next) ++ try_add_plugin (self, info->data); ++ g_slist_free_full (infos, g_object_unref); ++ + priv->active_services = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, NULL); + } + +-- +2.22.0 + diff --git a/gnu/packages/patches/nm-plugin-path.patch b/gnu/packages/patches/nm-plugin-path.patch deleted file mode 100644 index 505ae31534..0000000000 --- a/gnu/packages/patches/nm-plugin-path.patch +++ /dev/null @@ -1,51 +0,0 @@ -From d3026a6d331298003ccc6cd9d2e20dcb7fa9ae1d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tom=C3=A1=C5=A1=20=C4=8Cech?= -Date: Wed, 3 Jul 2019 13:31:54 +0200 -Subject: [PATCH] respect NM_VPN_PLUGIN_DIR - ---- - src/vpn/nm-vpn-manager.c | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/src/vpn/nm-vpn-manager.c b/src/vpn/nm-vpn-manager.c -index d063916..d779166 100644 ---- a/src/vpn/nm-vpn-manager.c -+++ b/src/vpn/nm-vpn-manager.c -@@ -223,6 +223,7 @@ nm_vpn_manager_init (NMVpnManager *self) - GSList *infos, *info; - const char *conf_dir_etc = _nm_vpn_plugin_info_get_default_dir_etc (); - const char *conf_dir_lib = _nm_vpn_plugin_info_get_default_dir_lib (); -+ const char *conf_dir_user = _nm_vpn_plugin_info_get_default_dir_user (); - - /* Watch the VPN directory for changes */ - file = g_file_new_for_path (conf_dir_lib); -@@ -241,6 +242,14 @@ nm_vpn_manager_init (NMVpnManager *self) - G_CALLBACK (vpn_dir_changed), self); - } - -+ file = g_file_new_for_path (conf_dir_user); -+ priv->monitor_etc = g_file_monitor_directory (file, G_FILE_MONITOR_NONE, NULL, NULL); -+ g_object_unref (file); -+ if (priv->monitor_etc) { -+ priv->monitor_id_etc = g_signal_connect (priv->monitor_etc, "changed", -+ G_CALLBACK (vpn_dir_changed), self); -+ } -+ - /* first read conf_dir_lib. The name files are not really user configuration, but - * plugin configuration. Hence we expect ~newer~ plugins to install their files - * in /usr/lib/NetworkManager. We want to prefer those files. -@@ -255,6 +264,11 @@ nm_vpn_manager_init (NMVpnManager *self) - try_add_plugin (self, info->data); - g_slist_free_full (infos, g_object_unref); - -+ infos = _nm_vpn_plugin_info_list_load_dir (conf_dir_user, TRUE, 0, NULL, NULL); -+ for (info = infos; info; info = info->next) -+ try_add_plugin (self, info->data); -+ g_slist_free_full (infos, g_object_unref); -+ - priv->active_services = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, NULL); - } - --- -2.22.0 - -- cgit 1.4.1 From f64a74dd6c69a0e404b40b7688cdcbcaf63fdf42 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Fri, 22 May 2020 14:12:50 -0400 Subject: gnu: git-annex: Update to 8.20200522. * gnu/packages/haskell-apps.scm (git-annex): Update to 8.20200522. [source]: Remove patch that is now in a release. * gnu/packages/patches/git-annex-S3v4.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. Signed-off-by: Leo Famulari --- gnu/local.mk | 1 - gnu/packages/haskell-apps.scm | 6 +-- gnu/packages/patches/git-annex-S3v4.patch | 77 ------------------------------- 3 files changed, 2 insertions(+), 82 deletions(-) delete mode 100644 gnu/packages/patches/git-annex-S3v4.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 961dedfdf6..575b18eb41 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -979,7 +979,6 @@ dist_patch_DATA = \ %D%/packages/patches/ghostscript-no-header-id.patch \ %D%/packages/patches/ghostscript-no-header-uuid.patch \ %D%/packages/patches/ghostscript-no-header-creationdate.patch \ - %D%/packages/patches/git-annex-S3v4.patch \ %D%/packages/patches/glib-tests-timer.patch \ %D%/packages/patches/glibc-CVE-2015-5180.patch \ %D%/packages/patches/glibc-CVE-2015-7547.patch \ diff --git a/gnu/packages/haskell-apps.scm b/gnu/packages/haskell-apps.scm index ecfe439c4b..3089c17145 100644 --- a/gnu/packages/haskell-apps.scm +++ b/gnu/packages/haskell-apps.scm @@ -37,7 +37,6 @@ #:use-module (guix packages) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system haskell) - #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages curl) #:use-module (gnu packages gl) @@ -342,15 +341,14 @@ to @code{cabal repl}).") (define-public git-annex (package (name "git-annex") - (version "8.20200501") + (version "8.20200522") (source (origin (method url-fetch) (uri (string-append "https://hackage.haskell.org/package/" "git-annex/git-annex-" version ".tar.gz")) - (patches (search-patches "git-annex-S3v4.patch")) (sha256 - (base32 "19rggaymvqy7r61n2rl2nigwdi2hzq5l1afcd5l0k1vbacwgq4jl")))) + (base32 "1v71k5k9mcj1nq4pb8apx99rgw2rmckr6yshhvjl1dr6j70d67x8")))) (build-system haskell-build-system) (arguments `(#:configure-flags diff --git a/gnu/packages/patches/git-annex-S3v4.patch b/gnu/packages/patches/git-annex-S3v4.patch deleted file mode 100644 index 9f7cea329e..0000000000 --- a/gnu/packages/patches/git-annex-S3v4.patch +++ /dev/null @@ -1,77 +0,0 @@ -From the upstream commit, with the changes to CHANGELOG and the docs -folder removed. - -From 1532d67c3ecf452b8c86bcc5928525398755cd01 Mon Sep 17 00:00:00 2001 -From: Joey Hess -Date: Thu, 7 May 2020 13:18:11 -0400 -Subject: [PATCH] S3: Support signature=v4 - -To use S3 Signature Version 4. Some S3 services seem to require v4, while -others may only support v2, which remains the default. - -I'm also not sure if v4 works correctly in all cases, there is this -upstream bug report: https://github.com/aristidb/aws/issues/262 -I've only tested it against the default S3 endpoint. ---- - CHANGELOG | 3 +++ - Remote/S3.hs | 23 ++++++++++++++++++- - ..._3bbdf23c8a4a480f4f6b8e8a2f8ddecd._comment | 13 +++++++++++ - ..._854390b9a781da82ecb85ad85eecad04._comment | 13 +++++++++++ - doc/special_remotes/S3.mdwn | 4 ++++ - ..._cf57e8dbd9fdc7c487565b61808b6bb2._comment | 10 ++++++++ - 6 files changed, 65 insertions(+), 1 deletion(-) - create mode 100644 doc/bugs/S3_special_remote_support_for_DigitalOcean_Spaces/comment_2_3bbdf23c8a4a480f4f6b8e8a2f8ddecd._comment - create mode 100644 doc/forum/backblaze_s3/comment_1_854390b9a781da82ecb85ad85eecad04._comment - create mode 100644 doc/special_remotes/S3/comment_34_cf57e8dbd9fdc7c487565b61808b6bb2._comment - -diff --git a/Remote/S3.hs b/Remote/S3.hs -index cb345d1f8..e3ea492f2 100644 ---- a/Remote/S3.hs -+++ b/Remote/S3.hs -@@ -99,6 +99,8 @@ remote = specialRemoteType $ RemoteType - (FieldDesc "port to connect to") - , optionalStringParser requeststyleField - (FieldDesc "for path-style requests, set to \"path\"") -+ , signatureVersionParser signatureField -+ (FieldDesc "S3 signature version") - , optionalStringParser mungekeysField HiddenField - , optionalStringParser AWS.s3credsField HiddenField - ] -@@ -148,6 +150,22 @@ protocolField = Accepted "protocol" - requeststyleField :: RemoteConfigField - requeststyleField = Accepted "requeststyle" - -+signatureField :: RemoteConfigField -+signatureField = Accepted "signature" -+ -+newtype SignatureVersion = SignatureVersion Int -+ -+signatureVersionParser :: RemoteConfigField -> FieldDesc -> RemoteConfigFieldParser -+signatureVersionParser f fd = -+ genParser go f defver fd -+ (Just (ValueDesc "v2 or v4")) -+ where -+ go "v2" = Just (SignatureVersion 2) -+ go "v4" = Just (SignatureVersion 4) -+ go _ = Nothing -+ -+ defver = SignatureVersion 2 -+ - portField :: RemoteConfigField - portField = Accepted "port" - -@@ -877,7 +895,10 @@ s3Configuration c = cfg - Nothing - | port == 443 -> AWS.HTTPS - | otherwise -> AWS.HTTP -- cfg = S3.s3 proto endpoint False -+ cfg = case getRemoteConfigValue signatureField c of -+ Just (SignatureVersion 4) -> -+ S3.s3v4 proto endpoint False S3.SignWithEffort -+ _ -> S3.s3 proto endpoint False - - data S3Info = S3Info - { bucket :: S3.Bucket --- -2.26.2 - -- cgit 1.4.1 From 51443772b80c5ca51ccbe5cf05c5db4c216a7b66 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Tue, 19 May 2020 09:24:03 +0200 Subject: gnu: python-argcomplete: Update to 1.11.1. * gnu/packages/python-xyz.scm (python-argcomplete)[version]: Update to 1.11.1. [arguments]: Remove, obsolete. [inputs]: Remove as well. * gnu/packages/patches/python-argcomplete-1.11.1-fish31.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Marius Bakke --- gnu/local.mk | 1 + .../patches/python-argcomplete-1.11.1-fish31.patch | 29 ++++++++++++++++++++++ gnu/packages/python-xyz.scm | 23 +++-------------- 3 files changed, 33 insertions(+), 20 deletions(-) create mode 100644 gnu/packages/patches/python-argcomplete-1.11.1-fish31.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 575b18eb41..23d775284a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1412,6 +1412,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-CVE-2018-14647.patch \ %D%/packages/patches/python-aiohttp-3.6.2-no-warning-fail.patch \ %D%/packages/patches/python-alembic-exceptions-cause.patch \ + %D%/packages/patches/python-argcomplete-1.11.1-fish31.patch \ %D%/packages/patches/python-axolotl-AES-fix.patch \ %D%/packages/patches/python-cairocffi-dlopen-path.patch \ %D%/packages/patches/python-cross-compile.patch \ diff --git a/gnu/packages/patches/python-argcomplete-1.11.1-fish31.patch b/gnu/packages/patches/python-argcomplete-1.11.1-fish31.patch new file mode 100644 index 0000000000..98f0ca1473 --- /dev/null +++ b/gnu/packages/patches/python-argcomplete-1.11.1-fish31.patch @@ -0,0 +1,29 @@ +Upstream commit fixing testcases for fish>=3.1, see +https://github.com/kislyuk/argcomplete/commit/08bfc8a788e8081515d733e67be026d051c726f7 + +diff --git a/test/test.py b/test/test.py +index e91352b..2c34806 100755 +--- a/test/test.py ++++ b/test/test.py +@@ -28,6 +28,8 @@ + + BASH_VERSION = subprocess.check_output(['bash', '-c', 'echo $BASH_VERSION']).decode() + BASH_MAJOR_VERSION = int(BASH_VERSION.split('.')[0]) ++FISH_VERSION_STR = subprocess.check_output(['fish', '-c', 'echo -n $FISH_VERSION']).decode() ++FISH_VERSION_TUPLE = tuple(int(x) for x in FISH_VERSION_STR.split('.')) + + + class TempDir(object): +@@ -1258,8 +1260,11 @@ class TestFish(_TestSh, unittest.TestCase): + expected_failures = [ + 'test_parse_special_characters', + 'test_comp_point', +- 'test_special_characters_double_quoted' + ] ++ if FISH_VERSION_TUPLE < (3, 1): ++ expected_failures.extend([ ++ 'test_special_characters_double_quoted' ++ ]) + + skipped = [ + 'test_single_quotes_in_single_quotes', diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 39424d0c14..9aa5635ab8 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -13070,33 +13070,16 @@ PNG, JPEG, JPEG2000 and GIF files in pure Python.") (define-public python-argcomplete (package (name "python-argcomplete") - (version "1.10.3") + (version "1.11.1") (source (origin (method url-fetch) (uri (pypi-uri "argcomplete" version)) (sha256 (base32 - "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3")))) + "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss")) + (patches (search-patches "python-argcomplete-1.11.1-fish31.patch")))) (build-system python-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'embed-tool-references - (lambda _ - (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh" - ((" grep") - (string-append " " (which "grep"))) - ((" egrep") - (string-append " " (which "egrep"))) - (("elif which") - (string-append "elif " (which "which"))) - (("\\$\\(which") - (string-append "$(" (which "which")))) - #t))))) - (inputs - `(("grep" ,grep) - ("which" ,which))) (native-inputs `(("python-coverage" ,python-coverage) ("python-flake8" ,python-flake8) -- cgit 1.4.1 From 899ffa1381afbf5f955aeba4839e920b3d910953 Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Fri, 22 May 2020 00:34:41 +0200 Subject: gnu: deja-dup: Update to 40.6. * gnu/packages/gnome.scm (deja-dup): Update to 40.6. [origin]: Use gitlab.gnome.org since the project migrated away from launchpad. [home-page]: Use 'wiki.gnome.org' instead of 'launchpad.net'. [build-system]: Switch to 'meson-build-system' because upstream removed cmake support. [arguments]: Enable tests. Remove arguments 'modules', 'imported-modules' and 'test-target'. Use argument 'glib-or-gtk?'. Replace configure-flags to only adjust 'RUN_PATH'. Use standard phases for 'configure' and 'check'. Adjust and rename phase 'patch-lockfile-deletion' to 'patch-paths'. Add phases 'patch-libgpg-error' and 'skip-gtk-update-icon-cache'. [inputs]: Remove 'libpeas', 'gobject-introspection'. Replace 'python-2' and 'python2-pygobject' with python-3 versions. Add 'json-glib', 'libsoup' and 'libgpg-error'. [native-inputs]: Remove 'cmake-minimal' and 'intltool'. Add 'appstream-glib','desktop-file-utils', 'glib:bin' and 'gobject-introspection'. * gnu/packages/patches/deja-dup-use-ref-keyword-for-iter.patch: Delete file. --- gnu/packages/gnome.scm | 105 ++++++++++----------- .../deja-dup-use-ref-keyword-for-iter.patch | 41 -------- 2 files changed, 52 insertions(+), 94 deletions(-) delete mode 100644 gnu/packages/patches/deja-dup-use-ref-keyword-for-iter.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 5271fe5fbd..db4678e3ce 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -879,73 +879,72 @@ configuration files for the GNOME menu, as well as a simple menu editor.") (define-public deja-dup (package (name "deja-dup") - (version "34.3") + (version "40.6") (source (origin - (method url-fetch) - (uri "https://launchpadlibrarian.net/295170991/deja-dup-34.3.tar.xz") - (sha256 - (base32 - "1xqcr61hpbahbla7gdjn4ngjfz7w6f57y7f5pkb77yk05f60j2n9")) - (patches - (search-patches "deja-dup-use-ref-keyword-for-iter.patch")))) - (build-system glib-or-gtk-build-system) + (method url-fetch) + (uri (string-append "https://gitlab.gnome.org/World/deja-dup/-/archive/" + version "/deja-dup-" version ".tar.bz2")) + (sha256 + (base32 + "0lwazh6crby5wpy9fg6zvwy4plqbhs2f98bm5lbizjdlbh88n5q0")))) + (build-system meson-build-system) (arguments - `(#:modules ((guix build gnu-build-system) - ((guix build cmake-build-system) #:prefix cmake:) - (guix build glib-or-gtk-build-system) - (guix build utils)) - #:imported-modules (,@%glib-or-gtk-build-system-modules - (guix build cmake-build-system)) - #:test-target "test" - #:configure-flags (list (string-append - "-DCMAKE_INSTALL_FULL_DATADIR=" %output) - (string-append - "-DCMAKE_INSTALL_LIBEXECDIR=" %output)) + `(#:glib-or-gtk? #t + #:configure-flags + (list + ;; Otherwise, the RUNPATH will lack the final path component. + (string-append "-Dc_link_args=-Wl,-rpath=" + (assoc-ref %outputs "out") "/lib/deja-dup")) #:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-lockfile-deletion - (lambda rest - (substitute* "libdeja/tools/duplicity/DuplicityInstance.vala" - (("/bin/rm") - (which "rm"))))) - (replace 'configure - (assoc-ref cmake:%standard-phases 'configure)) - (delete 'check) ;; Fails due to issues with DBus - (add-after 'install 'wrap-deja-dup - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((python (assoc-ref inputs "python")) - (python-path (getenv "PYTHONPATH")) - (duplicity (assoc-ref inputs "duplicity")) - (out (assoc-ref outputs "out"))) - (for-each - (lambda (program) - (wrap-program program - `("PATH" ":" prefix (,(string-append python "/bin") - ,(string-append duplicity "/bin")))) - (wrap-program program - `("PYTHONPATH" ":" prefix (,python-path)))) - - (find-files (string-append out "/bin"))) - #t)))))) + (add-after 'unpack 'patch-paths + (lambda* (#:key inputs #:allow-other-keys) + (let ((python (assoc-ref inputs "python"))) + (substitute* '("libdeja/tools/duplicity/DuplicityInstance.vala" + "libdeja/tests/scripts/instance-error.test") + (("/bin/rm") + (which "rm"))) + (substitute* "libdeja/tests/runner.vala" + (("/bin/sh") + (which "sh"))) + (substitute* "libdeja/tests/scripts/instance-error.test" + (("`which python3`") + (string-append python "/bin/python3")))))) + (add-after 'unpack 'patch-libgpg-error + (lambda* (#:key inputs #:allow-other-keys) + (let ((libgpg-error (assoc-ref inputs "libgpg-error"))) + (substitute* "meson.build" + (("(gpgerror_libs = ).*" _ var) + (format #f "~a '-L~a/lib -lgpg-error'\n" var libgpg-error)))) + #t)) + (add-after 'unpack 'skip-gtk-update-icon-cache + ;; Don't create 'icon-theme.cache'. + (lambda _ + (substitute* "data/post-install.sh" + (("gtk-update-icon-cache") "true")) + #t))))) (inputs `(("gsettings-desktop-schemas" ,gsettings-desktop-schemas) - ("gobject-introspection" ,gobject-introspection) ("duplicity" ,duplicity) - ("python" ,python-2) - ("python-pygobject" ,python2-pygobject) + ("python" ,python) + ("python-pygobject" ,python-pygobject) ("gtk+" ,gtk+) + ("json-glib" ,json-glib) ("libnotify" ,libnotify) - ("libpeas" ,libpeas) + ("libgpg-error" ,libgpg-error) ("libsecret" ,libsecret) + ("libsoup" ,libsoup) ("packagekit" ,packagekit))) (native-inputs - `(("pkg-config" ,pkg-config) - ("vala" ,vala) + `(("appstream-glib" ,appstream-glib) + ("desktop-file-utils" ,desktop-file-utils) ("gettext" ,gettext-minimal) + ("glib" ,glib "bin") ; for glib-compile-schemas. + ("gobject-introspection" ,gobject-introspection) ("itstool" ,itstool) - ("intltool" ,intltool) - ("cmake" ,cmake-minimal))) - (home-page "https://launchpad.net/deja-dup") + ("pkg-config" ,pkg-config) + ("vala" ,vala))) + (home-page "https://wiki.gnome.org/Apps/DejaDup") (synopsis "Simple backup tool, for regular encrypted backups") (description "Déjà Dup is a simple backup tool, for regular encrypted backups. It diff --git a/gnu/packages/patches/deja-dup-use-ref-keyword-for-iter.patch b/gnu/packages/patches/deja-dup-use-ref-keyword-for-iter.patch deleted file mode 100644 index a03e0c5481..0000000000 --- a/gnu/packages/patches/deja-dup-use-ref-keyword-for-iter.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 5676766be5e845ccb6cdf46cfa8722497f151752 Mon Sep 17 00:00:00 2001 -From: Jeremy Bicha -Date: Fri, 16 Jun 2017 15:11:37 -0400 -Subject: Use 'ref' keyword for iter, requires vala 0.36 - - -diff --git a/deja-dup/widgets/ConfigList.vala b/deja-dup/widgets/ConfigList.vala -index 15de2d6..02cd81a 100644 ---- a/deja-dup/widgets/ConfigList.vala -+++ b/deja-dup/widgets/ConfigList.vala -@@ -333,7 +333,7 @@ public class ConfigList : ConfigWidget - - model.row_deleted.disconnect(write_to_config); - foreach (Gtk.TreeIter iter in iters) { -- (model as Gtk.ListStore).remove(iter); -+ (model as Gtk.ListStore).remove(ref iter); - } - model.row_deleted.connect(write_to_config); - -diff --git a/deja-dup/widgets/ConfigLocation.vala b/deja-dup/widgets/ConfigLocation.vala -index 869e2a8..d21c556 100644 ---- a/deja-dup/widgets/ConfigLocation.vala -+++ b/deja-dup/widgets/ConfigLocation.vala -@@ -397,12 +397,12 @@ public class ConfigLocation : ConfigWidget - if (uuid == saved_uuid) - return; - -- store.remove(iter); -+ store.remove(ref iter); - - if (--num_volumes == 0) { - Gtk.TreeIter sep_iter; - if (store.get_iter_from_string(out sep_iter, index_vol_sep.to_string())) { -- store.remove(sep_iter); -+ store.remove(ref sep_iter); - index_vol_sep = -2; - } - } --- -cgit v0.10.2 - -- cgit 1.4.1 From 4492981706e0f2041053fdc728e29232855d8689 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 24 May 2020 16:09:36 +0200 Subject: gnu: pidgin: Fix build with Meson network-manager. This is a follow-up commit to 255ff74f3ab514a76068f6cfccc7f8dbcf8b7f3f: building network-manager with Meson breaks users of NetworkManager.pc. * gnu/packages/messaging.scm (pidgin)[source]: Add pidgin-libnm.patch. Force re-bootstrapping in a new snippet. [native-inputs]: Add autoconf, automake, and libtool. * gnu/packages/patches/pidgin-libnm.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/messaging.scm | 18 ++++++++-- gnu/packages/patches/pidgin-libnm.patch | 60 +++++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/pidgin-libnm.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 42707823eb..bbe06d2b20 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1363,6 +1363,7 @@ dist_patch_DATA = \ %D%/packages/patches/perl-www-curl-remove-symbol.patch \ %D%/packages/patches/picprog-non-intel-support.patch \ %D%/packages/patches/pidgin-add-search-path.patch \ + %D%/packages/patches/pidgin-libnm.patch \ %D%/packages/patches/pinball-const-fix.patch \ %D%/packages/patches/pinball-cstddef.patch \ %D%/packages/patches/pinball-missing-separators.patch \ diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index 57ff0835d1..ce542ad4f4 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -440,7 +440,16 @@ authentication.") version "/pidgin-" version ".tar.bz2")) (sha256 (base32 "13vdqj70315p9rzgnbxjp9c51mdzf1l4jg1kvnylc4bidw61air7")) - (patches (search-patches "pidgin-add-search-path.patch")))) + (patches (search-patches "pidgin-add-search-path.patch" + ;; Remove the snippet and bootstrapping + ;; native-inputs together with this patch. + "pidgin-libnm.patch")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove stale generated file after applying pidgin-libnm.patch. + (delete-file "configure") + #t)))) (build-system glib-or-gtk-build-system) (native-inputs `(("pkg-config" ,pkg-config) @@ -448,7 +457,12 @@ authentication.") ("intltool" ,intltool) ("gconf" ,gconf) ("python" ,python-2) - ("doxygen" ,doxygen))) + ("doxygen" ,doxygen) + + ;; For bootstrapping after applying pidgin-libnm.patch. + ("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool))) (inputs `(("gtk+" ,gtk+-2) ("libgcrypt" ,libgcrypt) diff --git a/gnu/packages/patches/pidgin-libnm.patch b/gnu/packages/patches/pidgin-libnm.patch new file mode 100644 index 0000000000..d34af749af --- /dev/null +++ b/gnu/packages/patches/pidgin-libnm.patch @@ -0,0 +1,60 @@ +From: Tobias Geerinckx-Rice +Date: Sun, 24 May 2020 16:11:01 +0200 +Subject: [PATCH] gnu: pidgin: Find libnm. + +Copied verbatim from[0]. + +[0]: https://git.archlinux.org/svntogit/packages.git/plain/trunk/pidgin-nm-1.0.patch?h=packages/pidgin + +diff --git a/configure.ac b/configure.ac +index 04836fa..0a2d451 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1423,18 +1423,24 @@ fi + dnl Check for NetworkManager.h; if we don't have it, oh well + if test "x$enable_dbus" = "xyes" ; then + if test "x$enable_nm" = "xyes" ; then +- PKG_CHECK_MODULES(NETWORKMANAGER, [NetworkManager >= 0.5.0], [ ++ PKG_CHECK_MODULES(NETWORKMANAGER, [libnm], [ + AC_SUBST(NETWORKMANAGER_CFLAGS) + AC_SUBST(NETWORKMANAGER_LIBS) + AC_DEFINE(HAVE_NETWORKMANAGER, 1, [Define if we have NetworkManager.]) + ], [ +- enable_nm=no +- if test "x$force_deps" = "xyes" ; then +- AC_MSG_ERROR([ ++ PKG_CHECK_MODULES(NETWORKMANAGER, [NetworkManager >= 0.5.0], [ ++ AC_SUBST(NETWORKMANAGER_CFLAGS) ++ AC_SUBST(NETWORKMANAGER_LIBS) ++ AC_DEFINE(HAVE_NETWORKMANAGER, 1, [Define if we have NetworkManager.]) ++ ], [ ++ enable_nm=no ++ if test "x$force_deps" = "xyes" ; then ++ AC_MSG_ERROR([ + NetworkManager development headers not found. + Use --disable-nm if you do not need NetworkManager support. + ]) +- fi]) ++ fi]) ++ ]) + fi + else + enable_nm=no +diff --git a/libpurple/network.c b/libpurple/network.c +index c43e3c7..b17e439 100644 +--- a/libpurple/network.c ++++ b/libpurple/network.c +@@ -939,8 +939,13 @@ nm_update_state(NMState state) + #if NM_CHECK_VERSION(0,8,992) + case NM_STATE_DISCONNECTING: + #endif ++#if NM_CHECK_VERSION(1,0,0) ++ if (prev != NM_STATE_CONNECTED_GLOBAL && prev != NM_STATE_UNKNOWN) ++ break; ++#else + if (prev != NM_STATE_CONNECTED && prev != NM_STATE_UNKNOWN) + break; ++#endif + if (ui_ops != NULL && ui_ops->network_disconnected != NULL) + ui_ops->network_disconnected(); + break; -- cgit 1.4.1 From 2ae11cd0a43bfd8c0106afc620c2e5be1cecef78 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 11 May 2020 10:12:32 +0300 Subject: gnu: enlightenment: Update to 0.24.0. * gnu/packages/enlightenment.scm (enlightenment): Update to 0.24.0. [arguments]: Change configure-flags to hardcode efl binary locations. Remove custom 'fix-dot-desktop-creation phase. Update 'set-system-actions phase. * gnu/packages/patches/enlightenment-fix-setuid-path.patch: Update for new upstream version. * gnu/services/desktop.scm (enlightenment-setuid-programs): Same. --- gnu/packages/enlightenment.scm | 39 ++-- .../patches/enlightenment-fix-setuid-path.patch | 223 ++++----------------- gnu/services/desktop.scm | 29 +-- 3 files changed, 68 insertions(+), 223 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/enlightenment.scm b/gnu/packages/enlightenment.scm index 38e5dbf1cb..08a52f9d92 100644 --- a/gnu/packages/enlightenment.scm +++ b/gnu/packages/enlightenment.scm @@ -292,7 +292,7 @@ Libraries with some extra bells and whistles.") (define-public enlightenment (package (name "enlightenment") - (version "0.23.1") + (version "0.24.0") (source (origin (method url-fetch) (uri @@ -300,27 +300,27 @@ Libraries with some extra bells and whistles.") "enlightenment/enlightenment-" version ".tar.xz")) (sha256 (base32 - "0d1cyl07w9pvi2pf029kablazks2q9aislzl46b6fq5m1465jc75")) + "01053hxdmyjfb6gmz1pqmw0llrgc4356np515h5vsqcn59mhvfz7")) (patches (search-patches "enlightenment-fix-setuid-path.patch")))) (build-system meson-build-system) (arguments - `(#:configure-flags '("-Dsystemd=false") + `(#:configure-flags + (let ((efl (assoc-ref %build-inputs "efl"))) + (list "-Dsystemd=false" + "-Dpackagekit=false" + (string-append "-Dedje-cc=" efl "/bin/edje_cc") + (string-append "-Deldbus-codegen=" efl "/bin/eldbus-codegen") + (string-append "-Deet=" efl "/bin/eet"))) #:phases (modify-phases %standard-phases (delete 'bootstrap) ; We don't want to run the autogen script. - (add-after 'unpack 'fix-dot-desktop-creation - (lambda _ - (substitute* "data/session/meson.build" - (("HAVE_WAYLAND'.*") "HAVE_WAYLAND') == true\n")) - #t)) (add-before 'configure 'set-system-actions (lambda* (#:key inputs #:allow-other-keys) - (setenv "HOME" "/tmp") + (setenv "HOME" "/tmp") (let ((xkeyboard (assoc-ref inputs "xkeyboard-config")) (setxkbmap (assoc-ref inputs "setxkbmap")) (utils (assoc-ref inputs "util-linux")) (libc (assoc-ref inputs "libc")) - (bluez (assoc-ref inputs "bluez")) (bc (assoc-ref inputs "bc")) (efl (assoc-ref inputs "efl"))) ;; We need to patch the path to 'base.lst' to be able @@ -337,23 +337,22 @@ Libraries with some extra bells and whistles.") "src/modules/conf_intl/e_int_config_intl.c" "src/modules/wizard/page_010.c") (("locale -a") (string-append libc "/bin/locale -a"))) - (substitute* "src/bin/e_import_config_dialog.c" - (("%s/edje_cc -v %s %s %s\", e_prefix_bin_get\\(\\)") - (string-append efl "/bin/edje_cc -v %s %s %s\""))) (substitute* "src/modules/everything/evry_plug_apps.c" (("/usr/bin/") "")) + (substitute* '("src/bin/e_sys_main.c" + "src/bin/e_util_suid.h") + (("PATH=/bin:/usr/bin:/sbin:/usr/sbin") + (string-append "PATH=/run/setuid-programs:" + "/run/current-system/profile/bin:" + "/run/current-system/profile/sbin"))) (substitute* "src/modules/everything/evry_plug_calc.c" (("bc -l") (string-append bc "/bin/bc -l"))) (substitute* "data/etc/meson.build" (("/bin/mount") "/run/setuid-programs/mount") (("/bin/umount") "/run/setuid-programs/umount") - (("/usr/bin/eject") (string-append utils "/bin/eject")) - (("/usr/bin/l2ping") (string-append bluez "/bin/l2ling")) - (("/bin/rfkill") (string-append utils "/sbin/rfkill")) - (("SUSPEND = ''") "SUSPEND = '/run/current-system/profile/bin/loginctl suspend'") - (("HIBERNATE = ''") "HIBERNATE = '/run/current-system/profile/bin/loginctl hibernate'") - (("/sbin/shutdown -h now") "/run/current-system/profile/bin/loginctl poweroff now") - (("/sbin/shutdown -r now") "/run/current-system/profile/bin/loginctl reboot now")) + (("/usr/bin/eject") (string-append utils "/bin/eject"))) + (substitute* "src/bin/system/e_system_power.c" + (("systemctl") "loginctl")) #t)))))) (native-inputs `(("gettext" ,gettext-minimal) diff --git a/gnu/packages/patches/enlightenment-fix-setuid-path.patch b/gnu/packages/patches/enlightenment-fix-setuid-path.patch index c48f18c8ec..f2930845ba 100644 --- a/gnu/packages/patches/enlightenment-fix-setuid-path.patch +++ b/gnu/packages/patches/enlightenment-fix-setuid-path.patch @@ -1,34 +1,31 @@ diff --git a/src/bin/e_auth.c b/src/bin/e_auth.c -index 00b0e5d84..98ab4518f 100644 +index 8b0aa6641..f15d2c2a2 100644 --- a/src/bin/e_auth.c +++ b/src/bin/e_auth.c -@@ -9,8 +9,7 @@ e_auth_begin(char *passwd) +@@ -11,9 +11,7 @@ e_auth_begin(char *passwd) + pwlen = strlen(passwd); + if (pwlen == 0) goto out; - if (strlen(passwd) == 0) goto out; - -- snprintf(buf, sizeof(buf), "%s/enlightenment/utils/enlightenment_ckpasswd", +- snprintf(buf, sizeof(buf), +- "%s/enlightenment/utils/enlightenment_ckpasswd pw", - e_prefix_lib_get()); + snprintf(buf, sizeof(buf), "/run/setuid-programs/enlightenment_ckpasswd"); + exe = ecore_exe_pipe_run(buf, ECORE_EXE_PIPE_WRITE, NULL); + if (!exe) goto out; + if (ecore_exe_send(exe, passwd, pwlen) != EINA_TRUE) goto out; +@@ -46,9 +44,7 @@ e_auth_polkit_begin(char *passwd, const char *cookie, unsigned int uid) + pwlen = strlen(passwd); + if (pwlen == 0) goto out; +- snprintf(buf, sizeof(buf), +- "%s/enlightenment/utils/enlightenment_ckpasswd pk", +- e_prefix_lib_get()); ++ snprintf(buf, sizeof(buf), "/run/setuid-programs/enlightenment_ckpasswd"); exe = ecore_exe_pipe_run(buf, ECORE_EXE_PIPE_WRITE, NULL); - if (ecore_exe_send(exe, passwd, strlen(passwd)) != EINA_TRUE) goto out; -diff --git a/src/bin/e_backlight.c b/src/bin/e_backlight.c -index 2bced6766..208e583ba 100644 ---- a/src/bin/e_backlight.c -+++ b/src/bin/e_backlight.c -@@ -521,8 +521,8 @@ _bl_sys_level_set(double val) - } - // fprintf(stderr, "SET: %1.3f\n", val); - snprintf(buf, sizeof(buf), -- "%s/enlightenment/utils/enlightenment_backlight %i %s", -- e_prefix_lib_get(), (int)(val * 1000.0), bl_sysval); -+ "/run/setuid-programs/enlightenment_backlight %i %s", -+ (int)(val * 1000.0), bl_sysval); - bl_sys_set_exe = ecore_exe_run(buf, NULL); - } - #endif // HAVE_EEZE || __FreeBSD_kernel__ + if (!exe) goto out; + snprintf(buf, sizeof(buf), "%s %u %s", cookie, uid, passwd); diff --git a/src/bin/e_fm/e_fm_main_eeze.c b/src/bin/e_fm/e_fm_main_eeze.c -index 0fcffa249..c1921121d 100644 +index 9b10b3117..74e6b72ad 100644 --- a/src/bin/e_fm/e_fm_main_eeze.c +++ b/src/bin/e_fm/e_fm_main_eeze.c @@ -318,7 +318,7 @@ _e_fm_main_eeze_volume_eject(E_Volume *v) @@ -58,163 +55,29 @@ index 0fcffa249..c1921121d 100644 eeze_disk_mount_wrapper_set(v->disk, buf2); } v->guard = ecore_timer_loop_add(E_FM_MOUNT_TIMEOUT, (Ecore_Task_Cb)_e_fm_main_eeze_vol_mount_timeout, v); -diff --git a/src/bin/e_sys.c b/src/bin/e_sys.c -index 671fbcd9a..90ee04cf1 100644 ---- a/src/bin/e_sys.c -+++ b/src/bin/e_sys.c -@@ -702,20 +702,16 @@ _e_sys_cb_timer(void *data EINA_UNUSED) - - e_init_status_set(_("Checking System Permissions")); - snprintf(buf, sizeof(buf), -- "%s/enlightenment/utils/enlightenment_sys -t halt", -- e_prefix_lib_get()); -+ "/run/setuid-programs/enlightenment_sys -t halt"); - _e_sys_halt_check_exe = ecore_exe_run(buf, NULL); - snprintf(buf, sizeof(buf), -- "%s/enlightenment/utils/enlightenment_sys -t reboot", -- e_prefix_lib_get()); -+ "/run/setuid-programs/enlightenment_sys -t reboot"); - _e_sys_reboot_check_exe = ecore_exe_run(buf, NULL); - snprintf(buf, sizeof(buf), -- "%s/enlightenment/utils/enlightenment_sys -t suspend", -- e_prefix_lib_get()); -+ "/run/setuid-programs/enlightenment_sys -t suspend"); - _e_sys_suspend_check_exe = ecore_exe_run(buf, NULL); - snprintf(buf, sizeof(buf), -- "%s/enlightenment/utils/enlightenment_sys -t hibernate", -- e_prefix_lib_get()); -+ "/run/setuid-programs/enlightenment_sys -t hibernate"); - _e_sys_hibernate_check_exe = ecore_exe_run(buf, NULL); - return ECORE_CALLBACK_CANCEL; - } -@@ -1134,8 +1130,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw) - if (e_util_immortal_check()) return 0; - e_fm2_die(); - snprintf(buf, sizeof(buf), -- "%s/enlightenment/utils/enlightenment_sys halt", -- e_prefix_lib_get()); -+ "/run/setuid-programs/enlightenment_sys halt"); - if (_e_sys_exe) - { - if ((ecore_time_get() - _e_sys_begin_time) > 2.0) -@@ -1170,8 +1165,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw) - if (e_util_immortal_check()) return 0; - e_fm2_die(); - snprintf(buf, sizeof(buf), -- "%s/enlightenment/utils/enlightenment_sys reboot", -- e_prefix_lib_get()); -+ "/run/setuid-programs/enlightenment_sys reboot"); - if (_e_sys_exe) - { - if ((ecore_time_get() - _e_sys_begin_time) > 2.0) -@@ -1204,8 +1198,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw) - case E_SYS_SUSPEND: - /* /etc/acpi/sleep.sh force */ - snprintf(buf, sizeof(buf), -- "%s/enlightenment/utils/enlightenment_sys suspend", -- e_prefix_lib_get()); -+ "/run/setuid-programs/enlightenment_sys suspend"); - if (_e_sys_exe) - { - if ((ecore_time_get() - _e_sys_begin_time) > 2.0) -@@ -1265,8 +1258,7 @@ _e_sys_action_do(E_Sys_Action a, char *param EINA_UNUSED, Eina_Bool raw) - case E_SYS_HIBERNATE: - /* /etc/acpi/hibernate.sh force */ - snprintf(buf, sizeof(buf), -- "%s/enlightenment/utils/enlightenment_sys hibernate", -- e_prefix_lib_get()); -+ "/run/setuid-programs/enlightenment_sys hibernate"); - if (_e_sys_exe) - { - if ((ecore_time_get() - _e_sys_begin_time) > 2.0) -diff --git a/src/modules/bluez4/e_mod_main.c b/src/modules/bluez4/e_mod_main.c -index 4b5148634..47d34b07f 100644 ---- a/src/modules/bluez4/e_mod_main.c -+++ b/src/modules/bluez4/e_mod_main.c -@@ -49,8 +49,8 @@ _ebluez_l2ping_poller(void *data EINA_UNUSED) - - if (tmp) - { -- eina_strbuf_append_printf(buf, "%s/enlightenment/utils/enlightenment_sys l2ping %s", -- e_prefix_lib_get(), tmp); -+ eina_strbuf_append_printf(buf, "/run/setuid-programs/enlightenment_sys l2ping %s", -+ tmp); - autolock_exe = ecore_exe_run(eina_strbuf_string_get(buf), NULL); - } - -@@ -692,8 +692,7 @@ e_modapi_init(E_Module *m) - autolock_desklock = ecore_event_handler_add(E_EVENT_DESKLOCK, _ebluez_desklock, NULL); - - buf = eina_strbuf_new(); -- eina_strbuf_append_printf(buf, "%s/enlightenment/utils/enlightenment_sys -t l2ping", -- e_prefix_lib_get()); -+ eina_strbuf_append_printf(buf, "/run/setuid-programs/enlightenment_sys -t l2ping"); - autolock_exe = ecore_exe_run(eina_strbuf_string_get(buf), NULL); - eina_strbuf_free(buf); - -diff --git a/src/modules/bluez5/e_mod_main.c b/src/modules/bluez5/e_mod_main.c -index a581c466c..095d8f360 100644 ---- a/src/modules/bluez5/e_mod_main.c -+++ b/src/modules/bluez5/e_mod_main.c -@@ -321,8 +321,8 @@ ebluez5_rfkill_unblock(const char *name) - if (buf) - { - eina_strbuf_append_printf -- (buf, "%s/enlightenment/utils/enlightenment_sys rfkill-unblock %s", -- e_prefix_lib_get(), name); -+ (buf, "/run/setuid-programs/enlightenment_sys rfkill-unblock %s", -+ name); - _rfkill_exe = ecore_exe_run(eina_strbuf_string_get(buf), NULL); - eina_strbuf_free(buf); - } -diff --git a/src/modules/cpufreq/e_mod_main.c b/src/modules/cpufreq/e_mod_main.c -index b66b365d8..bab0802cc 100644 ---- a/src/modules/cpufreq/e_mod_main.c -+++ b/src/modules/cpufreq/e_mod_main.c -@@ -1452,8 +1452,7 @@ e_modapi_init(E_Module *m) - } - E_CONFIG_LIMIT(cpufreq_config->poll_interval, 1, 1024); - -- snprintf(buf, sizeof(buf), "%s/%s/freqset", -- e_module_dir_get(m), MODULE_ARCH); -+ snprintf(buf, sizeof(buf), "/run/setuid-programs/freqset"); - cpufreq_config->set_exe_path = strdup(buf); - - if (stat(buf, &st) < 0) -diff --git a/src/modules/sysinfo/cpuclock/cpuclock.c b/src/modules/sysinfo/cpuclock/cpuclock.c -index 938916e53..00d5067d0 100644 ---- a/src/modules/sysinfo/cpuclock/cpuclock.c -+++ b/src/modules/sysinfo/cpuclock/cpuclock.c -@@ -80,8 +80,7 @@ _cpuclock_set_governor(const char *governor) - char buf[4096 + 100], exe[4096]; - struct stat st; - -- snprintf(exe, 4096, "%s/%s/cpuclock_sysfs", -- e_module_dir_get(sysinfo_config->module), MODULE_ARCH); -+ snprintf(exe, 4096, "/run/setuid-programs/cpuclock_sysfs"); - if (stat(exe, &st) < 0) return; - - snprintf(buf, sizeof(buf), -@@ -108,8 +107,7 @@ _cpuclock_set_frequency(int frequency) - if (system(buf) != 0) - ERR("Error code from trying to run \"%s\"", buf); - #else -- snprintf(exe, 4096, "%s/%s/cpuclock_sysfs", -- e_module_dir_get(sysinfo_config->module), MODULE_ARCH); -+ snprintf(exe, 4096, "/run/setuid-programs/cpuclock_sysfs"); - if (stat(exe, &st) < 0) return; - snprintf(buf, sizeof(buf), - "%s %s %i", exe, "frequency", frequency); -@@ -127,8 +125,7 @@ _cpuclock_set_pstate(int min, int max, int turbo) - char buf[4096 + 100], exe[4096]; - struct stat st; +diff --git a/src/bin/e_start_main.c b/src/bin/e_start_main.c +index b2c439455..cb16c7bd4 100644 +--- a/src/bin/e_start_main.c ++++ b/src/bin/e_start_main.c +@@ -710,7 +710,7 @@ main(int argc, char **argv) + "E_ALERT_FONT_DIR=%s/data/fonts", eina_prefix_data_get(pfx)); + putenv(buf2); + snprintf(buf3, sizeof(buf3), +- "E_ALERT_SYSTEM_BIN=%s/enlightenment/utils/enlightenment_system", eina_prefix_lib_get(pfx)); ++ "E_ALERT_SYSTEM_BIN=/run/setuid-programs/enlightenment_system"); + putenv(buf3); -- snprintf(exe, 4096, "%s/%s/cpuclock_sysfs", -- e_module_dir_get(sysinfo_config->module), MODULE_ARCH); -+ snprintf(exe, 4096, "/run/setuid-programs/cpuclock_sysfs"); - if (stat(exe, &st) < 0) return; + if ((valgrind_mode || valgrind_tool) && +diff --git a/src/bin/e_system.c b/src/bin/e_system.c +index 1e7aabb64..dc0173219 100644 +--- a/src/bin/e_system.c ++++ b/src/bin/e_system.c +@@ -132,7 +132,7 @@ _system_spawn(void) + else _respawn_count = 0; + if (_respawn_count > 5) return; snprintf(buf, sizeof(buf), - "%s %s %i %i %i", exe, "pstate", min, max, turbo); --- -2.23.0 - +- "%s/enlightenment/utils/enlightenment_system", e_prefix_lib_get()); ++ "/run/setuid-programs/enlightenment_system"); + _system_exe = ecore_exe_pipe_run + (buf, ECORE_EXE_NOT_LEADER | ECORE_EXE_TERM_WITH_PARENT | + ECORE_EXE_PIPE_READ | ECORE_EXE_PIPE_WRITE, NULL); diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 93f2ae576c..9e45743586 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -1036,29 +1036,12 @@ with the administrator's password." (match-record enlightenment-desktop-configuration (enlightenment) - (let ((module-arch (match (string-tokenize (%current-system) - (char-set-complement (char-set #\-))) - ((arch "linux") (string-append "linux-gnu-" arch)) - ((arch "gnu") (string-append "gnu-" arch))))) - (list (file-append enlightenment - "/lib/enlightenment/utils/enlightenment_sys") - (file-append enlightenment - "/lib/enlightenment/utils/enlightenment_backlight") - ;; TODO: Move this binary to a screen-locker service. - (file-append enlightenment - "/lib/enlightenment/utils/enlightenment_ckpasswd") - (file-append enlightenment - (string-append - "/lib/enlightenment/modules/cpufreq/" - module-arch "-" - (package-version enlightenment) - "/freqset")) - (file-append enlightenment - (string-append - "/lib/enlightenment/modules/sysinfo/" - module-arch "-" - (package-version enlightenment) - "/cpuclock_sysfs")))))) + (list (file-append enlightenment + "/lib/enlightenment/utils/enlightenment_sys") + (file-append enlightenment + "/lib/enlightenment/utils/enlightenment_system") + (file-append enlightenment + "/lib/enlightenment/utils/enlightenment_ckpasswd")))) (define enlightenment-desktop-service-type (service-type -- cgit 1.4.1 From 8bd0b533b30d7ee5e03aee99a2eb96d5b0b1c836 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 25 May 2020 00:12:06 +0200 Subject: gnu: libexif: Update to 0.6.22 [security fixes]. This fixes CVE-2020-13114, CVE-2020-13113, CVE-2020-13112, CVE-2020-0093, CVE-2019-9278, and CVE-2020-12767. * gnu/packages/patches/libexif-CVE-2016-6328.patch, gnu/packages/patches/libexif-CVE-2017-7544.patch, gnu/packages/patches/libexif-CVE-2018-20030.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/photo.scm (libexif): Update to 0.6.22. [source](uri): Adjust for upstream GitHub migration. --- gnu/local.mk | 3 - gnu/packages/patches/libexif-CVE-2016-6328.patch | 72 ------------- gnu/packages/patches/libexif-CVE-2017-7544.patch | 29 ------ gnu/packages/patches/libexif-CVE-2018-20030.patch | 120 ---------------------- gnu/packages/photo.scm | 14 +-- 5 files changed, 7 insertions(+), 231 deletions(-) delete mode 100644 gnu/packages/patches/libexif-CVE-2016-6328.patch delete mode 100644 gnu/packages/patches/libexif-CVE-2017-7544.patch delete mode 100644 gnu/packages/patches/libexif-CVE-2018-20030.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index f4326d4db8..ef4c5d2dcb 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1167,9 +1167,6 @@ dist_patch_DATA = \ %D%/packages/patches/libbonobo-activation-test-race.patch \ %D%/packages/patches/libcanberra-sound-theme-freedesktop.patch \ %D%/packages/patches/libdrm-symbol-check.patch \ - %D%/packages/patches/libexif-CVE-2016-6328.patch \ - %D%/packages/patches/libexif-CVE-2017-7544.patch \ - %D%/packages/patches/libexif-CVE-2018-20030.patch \ %D%/packages/patches/libextractor-exiv2.patch \ %D%/packages/patches/libgeotiff-adapt-test-script-for-proj-6.2.patch \ %D%/packages/patches/libgit2-mtime-0.patch \ diff --git a/gnu/packages/patches/libexif-CVE-2016-6328.patch b/gnu/packages/patches/libexif-CVE-2016-6328.patch deleted file mode 100644 index 67fee0f528..0000000000 --- a/gnu/packages/patches/libexif-CVE-2016-6328.patch +++ /dev/null @@ -1,72 +0,0 @@ -Fix CVE-2016-6328: - -https://bugzilla.redhat.com/show_bug.cgi?id=1366239 -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-6328 - -Patch copied from upstream source repository: - -https://github.com/libexif/libexif/commit/41bd04234b104312f54d25822f68738ba8d7133d - -From 41bd04234b104312f54d25822f68738ba8d7133d Mon Sep 17 00:00:00 2001 -From: Marcus Meissner -Date: Tue, 25 Jul 2017 23:44:44 +0200 -Subject: [PATCH] fixes some (not all) buffer overreads during decoding pentax - makernote entries. - -This should fix: -https://sourceforge.net/p/libexif/bugs/125/ CVE-2016-6328 ---- - libexif/pentax/mnote-pentax-entry.c | 16 +++++++++++++--- - 1 file changed, 13 insertions(+), 3 deletions(-) - -diff --git a/libexif/pentax/mnote-pentax-entry.c b/libexif/pentax/mnote-pentax-entry.c -index d03d159..ea0429a 100644 ---- a/libexif/pentax/mnote-pentax-entry.c -+++ b/libexif/pentax/mnote-pentax-entry.c -@@ -425,24 +425,34 @@ mnote_pentax_entry_get_value (MnotePentaxEntry *entry, - case EXIF_FORMAT_SHORT: - { - const unsigned char *data = entry->data; -- size_t k, len = strlen(val); -+ size_t k, len = strlen(val), sizeleft; -+ -+ sizeleft = entry->size; - for(k=0; kcomponents; k++) { -+ if (sizeleft < 2) -+ break; - vs = exif_get_short (data, entry->order); - snprintf (val+len, maxlen-len, "%i ", vs); - len = strlen(val); - data += 2; -+ sizeleft -= 2; - } - } - break; - case EXIF_FORMAT_LONG: - { - const unsigned char *data = entry->data; -- size_t k, len = strlen(val); -+ size_t k, len = strlen(val), sizeleft; -+ -+ sizeleft = entry->size; - for(k=0; kcomponents; k++) { -+ if (sizeleft < 4) -+ break; - vl = exif_get_long (data, entry->order); - snprintf (val+len, maxlen-len, "%li", (long int) vl); - len = strlen(val); - data += 4; -+ sizeleft -= 4; - } - } - break; -@@ -455,5 +465,5 @@ mnote_pentax_entry_get_value (MnotePentaxEntry *entry, - break; - } - -- return (val); -+ return val; - } --- -2.16.0 - diff --git a/gnu/packages/patches/libexif-CVE-2017-7544.patch b/gnu/packages/patches/libexif-CVE-2017-7544.patch deleted file mode 100644 index c4ea373dc5..0000000000 --- a/gnu/packages/patches/libexif-CVE-2017-7544.patch +++ /dev/null @@ -1,29 +0,0 @@ -Fix CVE-2017-7544: - -https://sourceforge.net/p/libexif/bugs/130/ -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7544 - -Patch copied from upstream bug tracker: - -https://sourceforge.net/p/libexif/bugs/130/#489a - -Index: libexif/exif-data.c -=================================================================== -RCS file: /cvsroot/libexif/libexif/libexif/exif-data.c,v -retrieving revision 1.131 -diff -u -r1.131 exif-data.c ---- a/libexif/exif-data.c 12 Jul 2012 17:28:26 -0000 1.131 -+++ b/libexif/exif-data.c 25 Jul 2017 21:34:06 -0000 -@@ -255,6 +255,12 @@ - exif_mnote_data_set_offset (data->priv->md, *ds - 6); - exif_mnote_data_save (data->priv->md, &e->data, &e->size); - e->components = e->size; -+ if (exif_format_get_size (e->format) != 1) { -+ /* e->format is taken from input code, -+ * but we need to make sure it is a 1 byte -+ * entity due to the multiplication below. */ -+ e->format = EXIF_FORMAT_UNDEFINED; -+ } - } - } - diff --git a/gnu/packages/patches/libexif-CVE-2018-20030.patch b/gnu/packages/patches/libexif-CVE-2018-20030.patch deleted file mode 100644 index 57e4746b58..0000000000 --- a/gnu/packages/patches/libexif-CVE-2018-20030.patch +++ /dev/null @@ -1,120 +0,0 @@ -https://github.com/libexif/libexif/commit/6aa11df549114ebda520dde4cdaea2f9357b2c89.patch - -NEWS section was removed -'12' -> '30' on line 79 - -From 6aa11df549114ebda520dde4cdaea2f9357b2c89 Mon Sep 17 00:00:00 2001 -From: Dan Fandrich -Date: Fri, 12 Oct 2018 16:01:45 +0200 -Subject: [PATCH] Improve deep recursion detection in - exif_data_load_data_content. - -The existing detection was still vulnerable to pathological cases -causing DoS by wasting CPU. The new algorithm takes the number of tags -into account to make it harder to abuse by cases using shallow recursion -but with a very large number of tags. This improves on commit 5d28011c -which wasn't sufficient to counter this kind of case. - -The limitation in the previous fix was discovered by Laurent Delosieres, -Secunia Research at Flexera (Secunia Advisory SA84652) and is assigned -the identifier CVE-2018-20030. ---- - NEWS | 1 + - libexif/exif-data.c | 45 +++++++++++++++++++++++++++++++++++++-------- - 2 files changed, 38 insertions(+), 8 deletions(-) - -diff --git a/libexif/exif-data.c b/libexif/exif-data.c -index e35403d..a6f9c94 100644 ---- a/libexif/exif-data.c -+++ b/libexif/exif-data.c -@@ -35,6 +35,7 @@ - #include - #include - -+#include - #include - #include - #include -@@ -350,6 +351,20 @@ if (data->ifd[(i)]->count) { \ - break; \ - } - -+/*! Calculate the recursion cost added by one level of IFD loading. -+ * -+ * The work performed is related to the cost in the exponential relation -+ * work=1.1**cost -+ */ -+static unsigned int -+level_cost(unsigned int n) -+{ -+ static const double log_1_1 = 0.09531017980432493; -+ -+ /* Adding 0.1 protects against the case where n==1 */ -+ return ceil(log(n + 0.1)/log_1_1); -+} -+ - /*! Load data for an IFD. - * - * \param[in,out] data #ExifData -@@ -357,13 +372,13 @@ if (data->ifd[(i)]->count) { \ - * \param[in] d pointer to buffer containing raw IFD data - * \param[in] ds size of raw data in buffer at \c d - * \param[in] offset offset into buffer at \c d at which IFD starts -- * \param[in] recursion_depth number of times this function has been -- * recursively called without returning -+ * \param[in] recursion_cost factor indicating how expensive this recursive -+ * call could be - */ - static void - exif_data_load_data_content (ExifData *data, ExifIfd ifd, - const unsigned char *d, -- unsigned int ds, unsigned int offset, unsigned int recursion_depth) -+ unsigned int ds, unsigned int offset, unsigned int recursion_cost) - { - ExifLong o, thumbnail_offset = 0, thumbnail_length = 0; - ExifShort n; -@@ -378,9 +393,20 @@ exif_data_load_data_content (ExifData *data, ExifIfd ifd, - if ((((int)ifd) < 0) || ( ((int)ifd) >= EXIF_IFD_COUNT)) - return; - -- if (recursion_depth > 30) { -+ if (recursion_cost > 170) { -+ /* -+ * recursion_cost is a logarithmic-scale indicator of how expensive this -+ * recursive call might end up being. It is an indicator of the depth of -+ * recursion as well as the potential for worst-case future recursive -+ * calls. Since it's difficult to tell ahead of time how often recursion -+ * will occur, this assumes the worst by assuming every tag could end up -+ * causing recursion. -+ * The value of 170 was chosen to limit typical EXIF structures to a -+ * recursive depth of about 6, but pathological ones (those with very -+ * many tags) to only 2. -+ */ - exif_log (data->priv->log, EXIF_LOG_CODE_CORRUPT_DATA, "ExifData", -- "Deep recursion detected!"); -+ "Deep/expensive recursion detected!"); - return; - } - -@@ -422,15 +448,18 @@ exif_data_load_data_content (ExifData *data, ExifIfd ifd, - switch (tag) { - case EXIF_TAG_EXIF_IFD_POINTER: - CHECK_REC (EXIF_IFD_EXIF); -- exif_data_load_data_content (data, EXIF_IFD_EXIF, d, ds, o, recursion_depth + 1); -+ exif_data_load_data_content (data, EXIF_IFD_EXIF, d, ds, o, -+ recursion_cost + level_cost(n)); - break; - case EXIF_TAG_GPS_INFO_IFD_POINTER: - CHECK_REC (EXIF_IFD_GPS); -- exif_data_load_data_content (data, EXIF_IFD_GPS, d, ds, o, recursion_depth + 1); -+ exif_data_load_data_content (data, EXIF_IFD_GPS, d, ds, o, -+ recursion_cost + level_cost(n)); - break; - case EXIF_TAG_INTEROPERABILITY_IFD_POINTER: - CHECK_REC (EXIF_IFD_INTEROPERABILITY); -- exif_data_load_data_content (data, EXIF_IFD_INTEROPERABILITY, d, ds, o, recursion_depth + 1); -+ exif_data_load_data_content (data, EXIF_IFD_INTEROPERABILITY, d, ds, o, -+ recursion_cost + level_cost(n)); - break; - case EXIF_TAG_JPEG_INTERCHANGE_FORMAT: - thumbnail_offset = o; diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm index dfd45fd06b..4904fa1db1 100644 --- a/gnu/packages/photo.scm +++ b/gnu/packages/photo.scm @@ -206,17 +206,17 @@ cameras (CRW/CR2, NEF, RAF, DNG, and others).") (define-public libexif (package (name "libexif") - (version "0.6.21") + (version "0.6.22") (source (origin (method url-fetch) - (uri (string-append "mirror://sourceforge/libexif/libexif/" - version "/libexif-" version ".tar.bz2")) - (patches (search-patches "libexif-CVE-2016-6328.patch" - "libexif-CVE-2017-7544.patch" - "libexif-CVE-2018-20030.patch")) + (uri (string-append + "https://github.com/libexif/libexif/releases" + "/download/libexif-" + (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version) + "-release/libexif-" version ".tar.xz")) (sha256 (base32 - "06nlsibr3ylfwp28w8f5466l6drgrnydgxrm4jmxzrmk5svaxk8n")))) + "0mhcad5zab7fsn120rd585h8ncwkq904nzzrq8vcd72hzk4g2j2h")))) (build-system gnu-build-system) (home-page "https://libexif.github.io/") (synopsis "Read and manipulate EXIF data in digital photographs") -- cgit 1.4.1