From 21b3b755151028647081fe96d2992b3743531d71 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Thu, 11 Mar 2021 05:34:28 -0500 Subject: gnu: glib: Fix CVE-2021-27218 and CVE-2021-27219. * gnu/packages/patches/glib-CVE-2021-27218.patch, gnu/packages/patches/glib-CVE-2021-27219-01.patch, gnu/packages/patches/glib-CVE-2021-27219-02.patch, gnu/packages/patches/glib-CVE-2021-27219-03.patch, gnu/packages/patches/glib-CVE-2021-27219-04.patch, gnu/packages/patches/glib-CVE-2021-27219-05.patch, gnu/packages/patches/glib-CVE-2021-27219-06.patch, gnu/packages/patches/glib-CVE-2021-27219-07.patch, gnu/packages/patches/glib-CVE-2021-27219-08.patch, gnu/packages/patches/glib-CVE-2021-27219-09.patch, gnu/packages/patches/glib-CVE-2021-27219-10.patch, gnu/packages/patches/glib-CVE-2021-27219-11.patch, gnu/packages/patches/glib-CVE-2021-27219-12.patch, gnu/packages/patches/glib-CVE-2021-27219-13.patch, gnu/packages/patches/glib-CVE-2021-27219-14.patch, gnu/packages/patches/glib-CVE-2021-27219-15.patch, gnu/packages/patches/glib-CVE-2021-27219-16.patch, gnu/packages/patches/glib-CVE-2021-27219-17.patch, gnu/packages/patches/glib-CVE-2021-27219-18.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/glib.scm (glib)[replacement]: New field. (glib/fixed): New variable. --- gnu/packages/glib.scm | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'gnu/packages/glib.scm') diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 9cc2b1b69e..520b723722 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2020 Ludovic Courtès ;;; Copyright © 2013, 2015 Andreas Enge ;;; Copyright © 2013 Nikita Karetnikov -;;; Copyright © 2014, 2015, 2016, 2017, 2018 Mark H Weaver +;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2021 Mark H Weaver ;;; Copyright © 2016, 2020 Efraim Flashner ;;; Copyright © 2016 Lukas Gradl ;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus @@ -172,6 +172,7 @@ shared NFS home directories.") (package (name "glib") (version "2.62.6") + (replacement glib/fixed) (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" @@ -390,6 +391,33 @@ dynamic loading, and an object system.") (home-page "https://developer.gnome.org/glib/") (license license:lgpl2.1+))) +(define glib/fixed + (package + (inherit glib) + (source (origin + (inherit (package-source glib)) + (patches + (append (search-patches "glib-CVE-2021-27218.patch" + "glib-CVE-2021-27219-01.patch" + "glib-CVE-2021-27219-02.patch" + "glib-CVE-2021-27219-03.patch" + "glib-CVE-2021-27219-04.patch" + "glib-CVE-2021-27219-05.patch" + "glib-CVE-2021-27219-06.patch" + "glib-CVE-2021-27219-07.patch" + "glib-CVE-2021-27219-08.patch" + "glib-CVE-2021-27219-09.patch" + "glib-CVE-2021-27219-10.patch" + "glib-CVE-2021-27219-11.patch" + "glib-CVE-2021-27219-12.patch" + "glib-CVE-2021-27219-13.patch" + "glib-CVE-2021-27219-14.patch" + "glib-CVE-2021-27219-15.patch" + "glib-CVE-2021-27219-16.patch" + "glib-CVE-2021-27219-17.patch" + "glib-CVE-2021-27219-18.patch") + (origin-patches (package-source glib)))))))) + (define-public glib-with-documentation ;; glib's doc must be built in a separate package since it requires gtk-doc, ;; which in turn depends on glib. -- cgit v1.2.3 From 5a06b83fc92710c5846a83bbf49f0ea84c8ecec2 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Fri, 12 Mar 2021 00:48:58 -0500 Subject: gnu: glib: Fix CVE-2021-28153. * gnu/packages/patches/glib-CVE-2021-28153.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/glib.scm (glib/fixed): Add the new patch. --- gnu/local.mk | 1 + gnu/packages/glib.scm | 3 +- gnu/packages/patches/glib-CVE-2021-28153.patch | 283 +++++++++++++++++++++++++ 3 files changed, 286 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/glib-CVE-2021-28153.patch (limited to 'gnu/packages/glib.scm') diff --git a/gnu/local.mk b/gnu/local.mk index c2637926ee..ce30d1db1c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1095,6 +1095,7 @@ dist_patch_DATA = \ %D%/packages/patches/glib-CVE-2021-27219-16.patch \ %D%/packages/patches/glib-CVE-2021-27219-17.patch \ %D%/packages/patches/glib-CVE-2021-27219-18.patch \ + %D%/packages/patches/glib-CVE-2021-28153.patch \ %D%/packages/patches/glibc-CVE-2018-11236.patch \ %D%/packages/patches/glibc-CVE-2018-11237.patch \ %D%/packages/patches/glibc-CVE-2019-7309.patch \ diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 520b723722..eaa319a2ff 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -415,7 +415,8 @@ dynamic loading, and an object system.") "glib-CVE-2021-27219-15.patch" "glib-CVE-2021-27219-16.patch" "glib-CVE-2021-27219-17.patch" - "glib-CVE-2021-27219-18.patch") + "glib-CVE-2021-27219-18.patch" + "glib-CVE-2021-28153.patch") (origin-patches (package-source glib)))))))) (define-public glib-with-documentation diff --git a/gnu/packages/patches/glib-CVE-2021-28153.patch b/gnu/packages/patches/glib-CVE-2021-28153.patch new file mode 100644 index 0000000000..54443186d9 --- /dev/null +++ b/gnu/packages/patches/glib-CVE-2021-28153.patch @@ -0,0 +1,283 @@ +Backport of: + +From 317b3b587058a05dca95d56dac26568c5b098d33 Mon Sep 17 00:00:00 2001 +From: Philip Withnall +Date: Wed, 24 Feb 2021 17:35:40 +0000 +Subject: [PATCH] glocalfileoutputstream: Fix CREATE_REPLACE_DESTINATION + with symlinks +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The `G_FILE_CREATE_REPLACE_DESTINATION` flag is equivalent to unlinking +the destination file and re-creating it from scratch. That did +previously work, but in the process the code would call `open(O_CREAT)` +on the file. If the file was a dangling symlink, this would create the +destination file (empty). That’s not an intended side-effect, and has +security implications if the symlink is controlled by a lower-privileged +process. + +Fix that by not opening the destination file if it’s a symlink, and +adjusting the rest of the code to cope with + - the fact that `fd == -1` is not an error iff `is_symlink` is true, + - and that `original_stat` will contain the `lstat()` results for the + symlink now, rather than the `stat()` results for its target (again, + iff `is_symlink` is true). + +This means that the target of the dangling symlink is no longer created, +which was the bug. The symlink itself continues to be replaced (as +before) with the new file — this is the intended behaviour of +`g_file_replace()`. + +The behaviour for non-symlink cases, or cases where the symlink was not +dangling, should be unchanged. + +Includes a unit test. + +Signed-off-by: Philip Withnall + +Fixes: #2325 +--- + gio/glocalfileoutputstream.c | 70 ++++++++++++++++------- + gio/tests/file.c | 108 +++++++++++++++++++++++++++++++++++ + 2 files changed, 158 insertions(+), 20 deletions(-) + +diff --git a/gio/glocalfileoutputstream.c b/gio/glocalfileoutputstream.c +index a3dd62172..553fcbbae 100644 +--- a/gio/glocalfileoutputstream.c ++++ b/gio/glocalfileoutputstream.c +@@ -874,16 +874,22 @@ handle_overwrite_open (const char *filename, + /* Could be a symlink, or it could be a regular ELOOP error, + * but then the next open will fail too. */ + is_symlink = TRUE; +- fd = g_open (filename, open_flags, mode); ++ if (!(flags & G_FILE_CREATE_REPLACE_DESTINATION)) ++ fd = g_open (filename, open_flags, mode); + } +-#else +- fd = g_open (filename, open_flags, mode); +- errsv = errno; ++#else /* if !O_NOFOLLOW */ + /* This is racy, but we do it as soon as possible to minimize the race */ + is_symlink = g_file_test (filename, G_FILE_TEST_IS_SYMLINK); ++ ++ if (!is_symlink || !(flags & G_FILE_CREATE_REPLACE_DESTINATION)) ++ { ++ fd = g_open (filename, open_flags, mode); ++ errsv = errno; ++ } + #endif + +- if (fd == -1) ++ if (fd == -1 && ++ (!is_symlink || !(flags & G_FILE_CREATE_REPLACE_DESTINATION))) + { + char *display_name = g_filename_display_name (filename); + g_set_error (error, G_IO_ERROR, +@@ -893,13 +899,25 @@ handle_overwrite_open (const char *filename, + g_free (display_name); + return -1; + } +- ++ ++ if (!is_symlink) ++ { + #ifdef G_OS_WIN32 +- res = GLIB_PRIVATE_CALL (g_win32_fstat) (fd, &original_stat); ++ res = GLIB_PRIVATE_CALL (g_win32_fstat) (fd, &original_stat); + #else +- res = fstat (fd, &original_stat); ++ res = fstat (fd, &original_stat); + #endif +- errsv = errno; ++ errsv = errno; ++ } ++ else ++ { ++#ifdef G_OS_WIN32 ++ res = GLIB_PRIVATE_CALL (g_win32_lstat_utf8) (filename, &original_stat); ++#else ++ res = g_lstat (filename, &original_stat); ++#endif ++ errsv = errno; ++ } + + if (res != 0) + { +@@ -916,16 +934,27 @@ handle_overwrite_open (const char *filename, + if (!S_ISREG (original_stat.st_mode)) + { + if (S_ISDIR (original_stat.st_mode)) +- g_set_error_literal (error, +- G_IO_ERROR, +- G_IO_ERROR_IS_DIRECTORY, +- _("Target file is a directory")); +- else +- g_set_error_literal (error, +- G_IO_ERROR, +- G_IO_ERROR_NOT_REGULAR_FILE, +- _("Target file is not a regular file")); +- goto err_out; ++ { ++ g_set_error_literal (error, ++ G_IO_ERROR, ++ G_IO_ERROR_IS_DIRECTORY, ++ _("Target file is a directory")); ++ goto err_out; ++ } ++ else if (!is_symlink || ++#ifdef S_ISLNK ++ !S_ISLNK (original_stat.st_mode) ++#else ++ FALSE ++#endif ++ ) ++ { ++ g_set_error_literal (error, ++ G_IO_ERROR, ++ G_IO_ERROR_NOT_REGULAR_FILE, ++ _("Target file is not a regular file")); ++ goto err_out; ++ } + } + + if (etag != NULL) +@@ -1006,7 +1035,8 @@ handle_overwrite_open (const char *filename, + } + } + +- g_close (fd, NULL); ++ if (fd >= 0) ++ g_close (fd, NULL); + *temp_filename = tmp_filename; + return tmpfd; + } +diff --git a/gio/tests/file.c b/gio/tests/file.c +index efb2eaadd..bc55f3af4 100644 +--- a/gio/tests/file.c ++++ b/gio/tests/file.c +@@ -804,6 +804,113 @@ test_replace_cancel (void) + g_object_unref (tmpdir); + } + ++static void ++test_replace_symlink (void) ++{ ++#ifdef G_OS_UNIX ++ gchar *tmpdir_path = NULL; ++ GFile *tmpdir = NULL, *source_file = NULL, *target_file = NULL; ++ GFileOutputStream *stream = NULL; ++ const gchar *new_contents = "this is a test message which should be written to source and not target"; ++ gsize n_written; ++ GFileEnumerator *enumerator = NULL; ++ GFileInfo *info = NULL; ++ gchar *contents = NULL; ++ gsize length = 0; ++ GError *local_error = NULL; ++ ++ g_test_bug ("https://gitlab.gnome.org/GNOME/glib/-/issues/2325"); ++ g_test_summary ("Test that G_FILE_CREATE_REPLACE_DESTINATION doesn’t follow symlinks"); ++ ++ /* Create a fresh, empty working directory. */ ++ tmpdir_path = g_dir_make_tmp ("g_file_replace_symlink_XXXXXX", &local_error); ++ g_assert_no_error (local_error); ++ tmpdir = g_file_new_for_path (tmpdir_path); ++ ++ g_test_message ("Using temporary directory %s", tmpdir_path); ++ g_free (tmpdir_path); ++ ++ /* Create symlink `source` which points to `target`. */ ++ source_file = g_file_get_child (tmpdir, "source"); ++ target_file = g_file_get_child (tmpdir, "target"); ++ g_file_make_symbolic_link (source_file, "target", NULL, &local_error); ++ g_assert_no_error (local_error); ++ ++ /* Ensure that `target` doesn’t exist */ ++ g_assert_false (g_file_query_exists (target_file, NULL)); ++ ++ /* Replace the `source` symlink with a regular file using ++ * %G_FILE_CREATE_REPLACE_DESTINATION, which should replace it *without* ++ * following the symlink */ ++ stream = g_file_replace (source_file, NULL, FALSE /* no backup */, ++ G_FILE_CREATE_REPLACE_DESTINATION, NULL, &local_error); ++ g_assert_no_error (local_error); ++ ++ g_output_stream_write_all (G_OUTPUT_STREAM (stream), new_contents, strlen (new_contents), ++ &n_written, NULL, &local_error); ++ g_assert_no_error (local_error); ++ g_assert_cmpint (n_written, ==, strlen (new_contents)); ++ ++ g_output_stream_close (G_OUTPUT_STREAM (stream), NULL, &local_error); ++ g_assert_no_error (local_error); ++ ++ g_clear_object (&stream); ++ ++ /* At this point, there should still only be one file: `source`. It should ++ * now be a regular file. `target` should not exist. */ ++ enumerator = g_file_enumerate_children (tmpdir, ++ G_FILE_ATTRIBUTE_STANDARD_NAME "," ++ G_FILE_ATTRIBUTE_STANDARD_TYPE, ++ G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL, &local_error); ++ g_assert_no_error (local_error); ++ ++ info = g_file_enumerator_next_file (enumerator, NULL, &local_error); ++ g_assert_no_error (local_error); ++ g_assert_nonnull (info); ++ ++ g_assert_cmpstr (g_file_info_get_name (info), ==, "source"); ++ g_assert_cmpint (g_file_info_get_file_type (info), ==, G_FILE_TYPE_REGULAR); ++ ++ g_clear_object (&info); ++ ++ info = g_file_enumerator_next_file (enumerator, NULL, &local_error); ++ g_assert_no_error (local_error); ++ g_assert_null (info); ++ ++ g_file_enumerator_close (enumerator, NULL, &local_error); ++ g_assert_no_error (local_error); ++ g_clear_object (&enumerator); ++ ++ /* Double-check that `target` doesn’t exist */ ++ g_assert_false (g_file_query_exists (target_file, NULL)); ++ ++ /* Check the content of `source`. */ ++ g_file_load_contents (source_file, ++ NULL, ++ &contents, ++ &length, ++ NULL, ++ &local_error); ++ g_assert_no_error (local_error); ++ g_assert_cmpstr (contents, ==, new_contents); ++ g_assert_cmpuint (length, ==, strlen (new_contents)); ++ g_free (contents); ++ ++ /* Tidy up. */ ++ g_file_delete (source_file, NULL, &local_error); ++ g_assert_no_error (local_error); ++ ++ g_file_delete (tmpdir, NULL, &local_error); ++ g_assert_no_error (local_error); ++ ++ g_clear_object (&target_file); ++ g_clear_object (&source_file); ++ g_clear_object (&tmpdir); ++#else /* if !G_OS_UNIX */ ++ g_test_skip ("Symlink replacement tests can only be run on Unix") ++#endif ++} ++ + static void + on_file_deleted (GObject *object, + GAsyncResult *result, +@@ -1754,6 +1861,7 @@ main (int argc, char *argv[]) + g_test_add_data_func ("/file/async-create-delete/4096", GINT_TO_POINTER (4096), test_create_delete); + g_test_add_func ("/file/replace-load", test_replace_load); + g_test_add_func ("/file/replace-cancel", test_replace_cancel); ++ g_test_add_func ("/file/replace-symlink", test_replace_symlink); + g_test_add_func ("/file/async-delete", test_async_delete); + #ifdef G_OS_UNIX + g_test_add_func ("/file/copy-preserve-mode", test_copy_preserve_mode); +-- +2.30.1 + -- cgit v1.2.3 From ce29866c01661693645daeba60657bf32bd3322b Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 20 Feb 2021 14:55:37 -0500 Subject: gnu: Add glib-static. * gnu/packages/glib.scm (glib-static): New variable. --- gnu/packages/glib.scm | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'gnu/packages/glib.scm') diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index eaa319a2ff..0d265e8687 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -9,7 +9,7 @@ ;;; Copyright © 2017 Petter ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2018 Alex Vong -;;; Copyright © 2019 Maxim Cournoyer +;;; Copyright © 2019, 2021 Maxim Cournoyer ;;; Copyright © 2019 Giacomo Leidi ;;; Copyright © 2019, 2020 Marius Bakke ;;; Copyright © 2020 Nicolò Balzarotti @@ -446,6 +446,34 @@ dynamic loading, and an object system.") (delete-file-recursively (string-append out html)) #t))))))))) +;;; TODO: Merge into glib as a 'static' output on core-updates. +(define-public glib-static + (hidden-package + (package + (inherit glib) + (name "glib-static") + (outputs '("out")) + (arguments + (substitute-keyword-arguments (package-arguments glib) + ((#:configure-flags flags ''()) + `(cons* "--default-library=static" + "-Dselinux=disabled" + "-Dman=false" + "-Dgtk_doc=false" + "-Dinternal_pcre=false" + ,flags)) + ((#:phases phases) + `(modify-phases ,phases + (delete 'move-executables) + (replace 'install + ;; Only install the static libraries. + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib"))) + (for-each (lambda (f) + (install-file f lib)) + (find-files "." "\\.a$")))))))))))) + (define gobject-introspection (package (name "gobject-introspection") -- cgit v1.2.3 From 74fdd0fea08fde451ad1a9d43abeeab27c422383 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 8 Mar 2021 22:02:38 -0500 Subject: gnu: dbus-c++: Fix command name in description. * gnu/packages/glib.scm (dbus-c++)[description]: Fix command prefix in description, and mention the second command installed as well. --- gnu/packages/glib.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/glib.scm') diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 0d265e8687..1b9cd71785 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -995,8 +995,8 @@ This package provides the library for GLib applications.") #t))))) (synopsis "D-Bus API for C++") (description "This package provides D-Bus client API bindings for the C++ -programming language. It also contains the utility -@command{dbuscxx-xml2cpp}.") +programming language. It also provides the @command{dbusxx-xml2cpp} and +@command{dbusxx-introspect} commands.") (home-page "https://sourceforge.net/projects/dbus-cplusplus/") (license license:lgpl2.1+))) -- cgit v1.2.3 From 1a265842e634656411bc7304c4648273f174f65e Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Wed, 17 Mar 2021 03:42:12 -0400 Subject: gnu: Use PACKAGE/INHERIT in more places. * gnu/packages/algebra.scm (fftwf, fftw-openmpi), gnu/packages/audio.scm (ztoolkit-rsvg), gnu/packages/bioinformatics.scm (python2-dendropy), gnu/packages/boost.scm (boost-with-python2), gnu/packages/check.scm (python2-mock, python2-pytest-mock), gnu/packages/cups.scm (hplip-minimal), gnu/packages/freedesktop.scm (libinput-minimal), gnu/packages/gettext.scm (gnu-gettext), gnu/packages/glib.scm (python2-pygobject), gnu/packages/gnome.scm (gdl-minimal, libsoup-minimal, python2-pyatspi), gnu/packages/groff.scm (groff-minimal), gnu/packages/jami.scm (ffmpeg-jami), gnu/packages/libcanberra.scm (libcanberra/gtk+-2), gnu/packages/lirc.scm (python2-lirc), gnu/packages/llvm.scm (clang-runtime-3.5), gnu/packages/mpi.scm (java-openmpi, openmpi-thread-multiple), gnu/packages/node.scm (libnode), gnu/packages/onc-rpc.scm (libtirpc/hurd), gnu/packages/python-compression.scm (bitshuffle-for-snappy), gnu/packages/python-crypto.scm (python2-pycrypto, python2-cryptography) (python2-cryptography, python2-m2crypto), gnu/packages/python-web.scm (python2-html2text, python2-tornado) (python2-terminado, python2-ndg-httpsclient, python2-websocket-client) (python2-rauth, python2-url, python2-s3transfer), gnu/packages/python-xyz.scm (python2-psutil, python2-serpent) (python2-humanfriendly, python2-empy, python2-parse-type, python2-polib) (python2-jsonschema, python2-pystache, python2-cython, python2-numpydoc) (python2-ipyparallel, python2-traitlets, python2-dbus) (python2-beautifulsoup4, python2-pep517, python2-flake8, python2-llfuse) (python2-tlsh, python-file, python2-notebook, python-jupyter-console-minimal) (python2-contextlib2, python2-promise, python2-anyjson, python2-amqp) (python2-kombu, python2-billiard, python2-celery, python2-whoosh) (python2-jellyfish, python-rope, ptpython-2, python2-binaryornot) (python2-setproctitle, python2-argcomplete, python2-xopen, python2-isort) (python2-radon, python2-rfc6555, python2-activepapers, python2-send2trash) (python2-cloudpickle, python2-reparser), gnu/packages/python.scm (python2-called-python), gnu/packages/qt.scm (python2-sip, python-pyqt-without-qtwebkit, python2-pyqt) (python-qscintilla, python-pyqt+qscintilla), gnu/packages/scanner.scm (sane-backends), gnu/packages/sdl.scm (guile3.0-sdl2), gnu/packages/selinux.scm (checkpolicy, libselinux, libsemanage, secilc) (python-sepolgen, policycoreutils), gnu/packages/serialization.scm (lua5.1-libmpack, lua5.2-libmpack), gnu/packages/simulation.scm (fenics), gnu/packages/statistics.scm (python2-statsmodels), gnu/packages/texinfo.scm (info-reader), gnu/packages/wxwidgets.scm (wxwidgets-gtk2, wxwidgets-gtk2-3.1), gnu/packages/xml.scm (xmlsec-nss), gnu/packages/xorg.scm (uim-gtk, uim-qt), guix/build-system/python.scm (package-with-explicit-python) (strip-python2-variant): Use PACKAGE/INHERIT. --- gnu/packages/algebra.scm | 4 +- gnu/packages/audio.scm | 3 +- gnu/packages/bioinformatics.scm | 3 +- gnu/packages/boost.scm | 3 +- gnu/packages/check.scm | 4 +- gnu/packages/cups.scm | 3 +- gnu/packages/freedesktop.scm | 2 +- gnu/packages/gettext.scm | 3 +- gnu/packages/glib.scm | 51 ++++++------ gnu/packages/gnome.scm | 9 +- gnu/packages/groff.scm | 3 +- gnu/packages/jami.scm | 3 +- gnu/packages/libcanberra.scm | 2 +- gnu/packages/lirc.scm | 3 +- gnu/packages/llvm.scm | 3 +- gnu/packages/mpi.scm | 5 +- gnu/packages/node.scm | 3 +- gnu/packages/onc-rpc.scm | 8 +- gnu/packages/python-compression.scm | 3 +- gnu/packages/python-crypto.scm | 6 +- gnu/packages/python-web.scm | 20 ++--- gnu/packages/python-xyz.scm | 162 +++++++++++++++--------------------- gnu/packages/python.scm | 3 +- gnu/packages/qt.scm | 10 +-- gnu/packages/scanner.scm | 3 +- gnu/packages/sdl.scm | 3 +- gnu/packages/selinux.scm | 12 +-- gnu/packages/serialization.scm | 4 +- gnu/packages/simulation.scm | 2 +- gnu/packages/statistics.scm | 2 +- gnu/packages/texinfo.scm | 3 +- gnu/packages/wxwidgets.scm | 4 +- gnu/packages/xml.scm | 3 +- gnu/packages/xorg.scm | 6 +- guix/build-system/python.scm | 6 +- 35 files changed, 158 insertions(+), 209 deletions(-) (limited to 'gnu/packages/glib.scm') diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm index d2caa13d0e..129d922751 100644 --- a/gnu/packages/algebra.scm +++ b/gnu/packages/algebra.scm @@ -794,7 +794,7 @@ cosine/ sine transforms or DCT/DST).") (license license:gpl2+))) (define-public fftwf - (package (inherit fftw) + (package/inherit fftw (name "fftwf") (arguments (substitute-keyword-arguments (package-arguments fftw) @@ -812,7 +812,7 @@ cosine/ sine transforms or DCT/DST).") " Single-precision version.")))) (define-public fftw-openmpi - (package (inherit fftw) + (package/inherit fftw (name "fftw-openmpi") (inputs `(("openmpi" ,openmpi) diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 67a3e57dd9..8b23f04fe5 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -4918,8 +4918,7 @@ edited, converted, compressed and saved.") (license license:lgpl2.1))) (define-public ztoolkit-rsvg - (package - (inherit ztoolkit) + (package/inherit ztoolkit (name "ztoolkit-rsvg") (arguments `(#:configure-flags `("-Denable_rsvg=true"))) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 90e81354a5..eb466868d1 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -2744,8 +2744,7 @@ trees (phylogenies) and characters.") (define-public python2-dendropy (let ((base (package-with-python2 python-dendropy))) - (package - (inherit base) + (package/inherit base (arguments `(#:phases (modify-phases %standard-phases diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm index b1ab8a4ec9..1323e28278 100644 --- a/gnu/packages/boost.scm +++ b/gnu/packages/boost.scm @@ -200,8 +200,7 @@ across a broad spectrum of applications.") "Some components have other similar licences.")))) (define-public boost-with-python2 - (package - (inherit boost) + (package/inherit boost (name "boost-python2") (native-inputs `(("python" ,python-2) diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index cfda247d67..21514d1bc4 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -836,7 +836,7 @@ have been used.") (define-public python2-mock (let ((base (package-with-python2 (strip-python2-variant python-mock)))) - (package (inherit base) + (package/inherit base (propagated-inputs `(("python2-functools32" ,python2-functools32) ("python2-funcsigs" ,python2-funcsigs) @@ -1240,7 +1240,7 @@ same arguments.") (define-public python2-pytest-mock (let ((base (package-with-python2 (strip-python2-variant python-pytest-mock)))) - (package (inherit base) + (package/inherit base (propagated-inputs `(("python2-mock" ,python2-mock) ,@(package-propagated-inputs base)))))) diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index 2edd5d245c..b18273109e 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -676,8 +676,7 @@ should only be used as part of the Guix cups-pk-helper service.") ("pkg-config" ,pkg-config))))) (define-public hplip-minimal - (package - (inherit hplip) + (package/inherit hplip (name "hplip-minimal") (arguments (substitute-keyword-arguments (package-arguments hplip) diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index e5f9ea71b6..4105dd7ca0 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -508,7 +508,7 @@ other applications that need to directly deal with input devices.") (license license:x11))) (define-public libinput-minimal - (package (inherit libinput) + (package/inherit libinput (name "libinput-minimal") (inputs (fold alist-delete (package-inputs libinput) diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm index bee33f2685..21228694d7 100644 --- a/gnu/packages/gettext.scm +++ b/gnu/packages/gettext.scm @@ -139,8 +139,7 @@ translated messages from the catalogs. Nearly all GNU packages use Gettext.") ;; module when there's a #:renamer, and that module may be empty at that point ;; in case or circular dependencies. (define-public gnu-gettext - (package - (inherit gettext-minimal) + (package/inherit gettext-minimal (name "gettext") (arguments (substitute-keyword-arguments (package-arguments gettext-minimal) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 1b9cd71785..5f710a4a38 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -833,32 +833,33 @@ useful for C++.") (properties `((python2-variant . ,(delay python2-pygobject)))))) (define-public python2-pygobject - (package (inherit (strip-python2-variant python-pygobject)) - (name "python2-pygobject") + (let ((base (strip-python2-variant python-pygobject))) + (package/inherit base + (name "python2-pygobject") - ;; Note: We use python-build-system here, because Meson only supports - ;; Python 3, and needs PYTHONPATH etc set up correctly, which makes it - ;; difficult to use for Python 2 projects. - (build-system python-build-system) - (arguments - `(#:python ,python-2 - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'delete-broken-tests - (lambda _ - ;; FIXME: this test freezes and times out. - (delete-file "tests/test_mainloop.py") - ;; FIXME: this test fails with this kind of error: - ;; AssertionError: != != Date: Sat, 20 Mar 2021 18:21:58 +0100 Subject: gnu: glib: Increase timeout for armhf builds. * gnu/packages/glib.scm (glib)[arguments]: Increase timeout for armhf builds. --- gnu/packages/glib.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gnu/packages/glib.scm') diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 5f710a4a38..a62a31a87b 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -235,7 +235,7 @@ shared NFS home directories.") (lambda _ (substitute* "meson.build" (("test_timeout = 60") - "test_timeout = 90") + "test_timeout = 120") (("test_timeout_slow = 120") "test_timeout_slow = 180"))))) '()) @@ -391,9 +391,10 @@ dynamic loading, and an object system.") (home-page "https://developer.gnome.org/glib/") (license license:lgpl2.1+))) -(define glib/fixed +(define-public glib/fixed (package (inherit glib) + (properties '()) (source (origin (inherit (package-source glib)) (patches -- cgit v1.2.3 From 13953f0e7ec230e701faa679bcf2c1d6a3ab4693 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Sat, 20 Mar 2021 18:25:44 +0100 Subject: gnu: glib: Partially revert bb804a0d58687dcb3f3ba904dcb958c84b8b84d5. It contained some changes used during tests that should not have been commited. * gnu/packages/glib (glib/fixed): Do not make public. --- gnu/packages/glib.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gnu/packages/glib.scm') diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index a62a31a87b..9c3cd75624 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -391,10 +391,9 @@ dynamic loading, and an object system.") (home-page "https://developer.gnome.org/glib/") (license license:lgpl2.1+))) -(define-public glib/fixed +(define glib/fixed (package (inherit glib) - (properties '()) (source (origin (inherit (package-source glib)) (patches -- cgit v1.2.3