From 7b207e08492998bb91ac99f703f193d32dfee31e Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Tue, 2 Feb 2021 08:16:22 +0000 Subject: gnu: clementine: Update to 1.4.0rc1-450. * gnu/packages/music.scm (clementine): Update to 1.4.0rc1-450. [source]: Adapt snippet to list bundled directories to keep rather than ones to delete. Unbundled gmock. Remove patches no longer needed. [arguments]: Set -DUSE_SYSTEM_TAGLIB=TRUE. [native-inputs]: Add googletest. [inputs]: Remove openssl. [license]: Remove gmock license. * gnu/packages/patches/clementine-fix-sqlite.patch: Remove. * gnu/packages/patches/clementine-remove-crypto++-dependency.patch: Remvoe * gnu/packages/patches/clementine-use-openssl.patch: Remove. * gnu/local.mk (dist_patch_DATA): Remove them. Signed-off-by: Guillaume Le Vaillant --- gnu/local.mk | 3 --- 1 file changed, 3 deletions(-) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index b9b4b664e4..ae64a483b5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -894,9 +894,6 @@ dist_patch_DATA = \ %D%/packages/patches/clang-runtime-3.9-libsanitizer-mode-field.patch \ %D%/packages/patches/clang-runtime-3.8-libsanitizer-mode-field.patch \ %D%/packages/patches/classpath-aarch64-support.patch \ - %D%/packages/patches/clementine-fix-sqlite.patch \ - %D%/packages/patches/clementine-remove-crypto++-dependency.patch \ - %D%/packages/patches/clementine-use-openssl.patch \ %D%/packages/patches/clucene-pkgconfig.patch \ %D%/packages/patches/cmake-curl-certificates.patch \ %D%/packages/patches/coda-use-system-libs.patch \ -- cgit v1.2.3 From 8effdd19691576a79aa4a1e26263b251376e25e5 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Mon, 8 Feb 2021 13:16:17 -0600 Subject: gnu: hdf5: Update to 1.8.22. Fixes CVE-2018-14033, CVE-2018-11206, CVE-2018-13870, CVE-2018-13869, and CVE-2018-17435 * gnu/packages/maths.scm (hdf5-1.8): Update to 1.8.22. * gnu/packages/patches/hdf5-1.8-mpi-deprecations.patch: Delete upstreamed patch. * gnu/local/mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/maths.scm | 9 +- .../patches/hdf5-1.8-mpi-deprecations.patch | 169 --------------------- 3 files changed, 4 insertions(+), 175 deletions(-) delete mode 100644 gnu/packages/patches/hdf5-1.8-mpi-deprecations.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index ae64a483b5..e515ab6285 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1156,7 +1156,6 @@ dist_patch_DATA = \ %D%/packages/patches/hdf4-shared-fortran.patch \ %D%/packages/patches/hdf4-tirpc.patch \ %D%/packages/patches/hdf5-config-date.patch \ - %D%/packages/patches/hdf5-1.8-mpi-deprecations.patch \ %D%/packages/patches/hdf-eos2-build-shared.patch \ %D%/packages/patches/hdf-eos2-remove-gctp.patch \ %D%/packages/patches/hdf-eos2-fortrantests.patch \ diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index eff1480e62..b572f8dee4 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2020 Andreas Enge ;;; Copyright © 2013 Nikita Karetnikov ;;; Copyright © 2014, 2016, 2017 John Darrington -;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Eric Bavier +;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Eric Bavier ;;; Copyright © 2014 Federico Beffa ;;; Copyright © 2014 Mathieu Lirzin ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus @@ -1077,7 +1077,7 @@ incompatible with HDF5.") (define-public hdf5-1.8 (package (name "hdf5") - (version "1.8.21") + (version "1.8.22") (source (origin (method url-fetch) @@ -1092,9 +1092,8 @@ incompatible with HDF5.") (string-append major minor))) "/src/hdf5-" version ".tar.bz2"))) (sha256 - (base32 "03glk4w4wyb1jyb443g53y3y1ncnf6mj2cqwm6avfr2awkgb3cg5")) - (patches (search-patches "hdf5-config-date.patch" - "hdf5-1.8-mpi-deprecations.patch")))) + (base32 "194ki2s5jrgl4czkvy5nc9nwjyapah0fj72l0gb0aysplp38i6v8")) + (patches (search-patches "hdf5-config-date.patch")))) (build-system gnu-build-system) (inputs `(("zlib" ,zlib))) diff --git a/gnu/packages/patches/hdf5-1.8-mpi-deprecations.patch b/gnu/packages/patches/hdf5-1.8-mpi-deprecations.patch deleted file mode 100644 index 29242dc4e8..0000000000 --- a/gnu/packages/patches/hdf5-1.8-mpi-deprecations.patch +++ /dev/null @@ -1,169 +0,0 @@ ---- a/src/H5.c -+++ b/src/H5.c -@@ -138,7 +138,7 @@ - if (mpi_initialized && !mpi_finalized) { - int key_val; - -- if(MPI_SUCCESS != (mpi_code = MPI_Comm_create_keyval(MPI_NULL_COPY_FN, -+ if(MPI_SUCCESS != (mpi_code = MPI_Comm_create_keyval(MPI_COMM_NULL_COPY_FN, - (MPI_Comm_delete_attr_function *)H5_mpi_delete_cb, - &key_val, NULL))) - HMPI_GOTO_ERROR(FAIL, "MPI_Comm_create_keyval failed", mpi_code) ---- hdf5-1.8.19/testpar/t_cache.c -+++ hdf5-1.8.19/testpar/t_cache.c -@@ -1187,20 +1187,20 @@ - struct mssg_t sample; /* used to compute displacements */ - - /* setup the displacements array */ -- if ( ( MPI_SUCCESS != MPI_Address(&sample.req, &displs[0]) ) || -- ( MPI_SUCCESS != MPI_Address(&sample.src, &displs[1]) ) || -- ( MPI_SUCCESS != MPI_Address(&sample.dest, &displs[2]) ) || -- ( MPI_SUCCESS != MPI_Address(&sample.mssg_num, &displs[3]) ) || -- ( MPI_SUCCESS != MPI_Address(&sample.base_addr, &displs[4]) ) || -- ( MPI_SUCCESS != MPI_Address(&sample.len, &displs[5]) ) || -- ( MPI_SUCCESS != MPI_Address(&sample.ver, &displs[6]) ) || -- ( MPI_SUCCESS != MPI_Address(&sample.count, &displs[7]) ) || -- ( MPI_SUCCESS != MPI_Address(&sample.magic, &displs[8]) ) ) { -+ if ( ( MPI_SUCCESS != MPI_Get_address(&sample.req, &displs[0]) ) || -+ ( MPI_SUCCESS != MPI_Get_address(&sample.src, &displs[1]) ) || -+ ( MPI_SUCCESS != MPI_Get_address(&sample.dest, &displs[2]) ) || -+ ( MPI_SUCCESS != MPI_Get_address(&sample.mssg_num, &displs[3]) ) || -+ ( MPI_SUCCESS != MPI_Get_address(&sample.base_addr, &displs[4]) ) || -+ ( MPI_SUCCESS != MPI_Get_address(&sample.len, &displs[5]) ) || -+ ( MPI_SUCCESS != MPI_Get_address(&sample.ver, &displs[6]) ) || -+ ( MPI_SUCCESS != MPI_Get_address(&sample.count, &displs[7]) ) || -+ ( MPI_SUCCESS != MPI_Get_address(&sample.magic, &displs[8]) ) ) { - - nerrors++; - success = FALSE; - if ( verbose ) { -- HDfprintf(stdout, "%d:%s: MPI_Address() call failed.\n", -+ HDfprintf(stdout, "%d:%s: MPI_Get_address() call failed.\n", - world_mpi_rank, fcn_name); - } - -@@ -1215,14 +1215,14 @@ - - if ( success ) { - -- result = MPI_Type_struct(9, block_len, displs, mpi_types, &mpi_mssg_t); -+ result = MPI_Type_create_struct(9, block_len, displs, mpi_types, &mpi_mssg_t); - - if ( result != MPI_SUCCESS ) { - - nerrors++; - success = FALSE; - if ( verbose ) { -- HDfprintf(stdout, "%d:%s: MPI_Type_struct() call failed.\n", -+ HDfprintf(stdout, "%d:%s: MPI_Type_create_struct() call failed.\n", - world_mpi_rank, fcn_name); - } - } ---- hdf5-1.8.19/testpar/t_mpi.c -+++ hdf5-1.8.19/testpar/t_mpi.c -@@ -279,7 +279,7 @@ - printf("Skipped GB file range test " - "because MPI_Offset cannot support it\n"); - }else{ -- buf = HDmalloc(MB); -+ buf = (char *)HDmalloc(MB); - VRFY((buf!=NULL), "malloc succeed"); - - /* open a new file. Remove it first in case it exists. */ -@@ -624,7 +624,7 @@ - and this platform. - - 1. Details for the test: --1) Create two derived datatypes with MPI_Type_hindexed: -+1) Create two derived datatypes with MPI_Type_create_hindexed: - datatype1: - count = 1, blocklens = 1, offsets = 0, - base type = MPI_BYTE(essentially a char) -@@ -633,7 +633,7 @@ - base type = MPI_BYTE - - 2) Using these two derived datatypes, -- Build another derived datatype with MPI_Type_struct: -+ Build another derived datatype with MPI_Type_create_struct: - advtype: derived from datatype1 and datatype2 - advtype: - count = 2, blocklens[0] = 1, blocklens[1]=1, -@@ -676,10 +676,9 @@ - int mpi_err_strlen; - int mpi_err; - int i; -- int nerrors = 0; /* number of errors */ - MPI_Datatype etype,filetype; - MPI_Datatype adv_filetype,bas_filetype[2]; -- MPI_Datatype etypenew, filetypenew; -+ MPI_Datatype filetypenew; - MPI_Offset disp; - MPI_Status Status; - MPI_Aint adv_disp[2]; -@@ -715,7 +714,7 @@ - blocklens[0] = 1; - offsets[0] = 0; - -- if((mpi_err= MPI_Type_hindexed(count,blocklens,offsets,MPI_BYTE,&filetype)) -+ if((mpi_err= MPI_Type_create_hindexed(count,blocklens,offsets,MPI_BYTE,&filetype)) - != MPI_SUCCESS){ - MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - printf("MPI_Type_contiguous failed (%s)\n", mpi_err_str); -@@ -731,7 +730,7 @@ - count = 1; - blocklens[0]=1; - offsets[0] = 1; -- if((mpi_err= MPI_Type_hindexed(count,blocklens,offsets,MPI_BYTE,&filetypenew)) -+ if((mpi_err= MPI_Type_create_hindexed(count,blocklens,offsets,MPI_BYTE,&filetypenew)) - != MPI_SUCCESS){ - MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - printf("MPI_Type_contiguous failed (%s)\n", mpi_err_str); -@@ -752,10 +751,10 @@ - bas_filetype[0] = filetype; - bas_filetype[1] = filetypenew; - -- if((mpi_err= MPI_Type_struct(outcount,adv_blocklens,adv_disp,bas_filetype,&adv_filetype)) -+ if((mpi_err= MPI_Type_create_struct(outcount,adv_blocklens,adv_disp,bas_filetype,&adv_filetype)) - != MPI_SUCCESS){ - MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); -- printf("MPI_Type_struct failed (%s)\n", mpi_err_str); -+ printf("MPI_Type_create_struct failed (%s)\n", mpi_err_str); - return 1; - } - if((mpi_err=MPI_Type_commit(&adv_filetype))!=MPI_SUCCESS){ -@@ -842,7 +841,7 @@ - processes are needed. - - 1. Details for the test: --1) Create one derived datatype with MPI_Type_hindexed: -+1) Create one derived datatype with MPI_Type_create_hindexed: - - 2) Choosing at least two processes to contribute none for IO with - the buf size inside MPI_Write_at_all to 0. -@@ -898,7 +897,7 @@ - offsets[1] = (mpi_size+mpi_rank)*count; - - if(count !=0) { -- if((mpi_err = MPI_Type_hindexed(2, -+ if((mpi_err = MPI_Type_create_hindexed(2, - blocklens, - offsets, - etype, -@@ -914,7 +913,7 @@ - return 1; - } /* end if */ - -- if((mpi_err = MPI_Type_hindexed(2, -+ if((mpi_err = MPI_Type_create_hindexed(2, - blocklens, - offsets, - etype, -@@ -1098,7 +1097,7 @@ - * calls. By then, MPI calls may not work. - */ - if (H5dont_atexit() < 0){ -- printf("Failed to turn off atexit processing. Continue.\n", mpi_rank); -+ printf("Failed to turn off atexit processing. Continue.\n"); - }; - H5open(); - if (parse_options(argc, argv) != 0){ -- cgit v1.2.3 From 7abb893c980b969bd9e4d141f480fef1a30959a1 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 8 Feb 2021 21:57:59 +0100 Subject: gnu: emacs-undohist-el: Update to 0.2.1. * gnu/packages/emacs-xyz.scm (emacs-undohist-el): Update to 0.2.1. [origin]: Remove unnecessary patch. * gnu/packages/patches/emacs-undohist-ignored.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Apply deletion. --- gnu/local.mk | 1 - gnu/packages/emacs-xyz.scm | 39 ++++++++++------------- gnu/packages/patches/emacs-undohist-ignored.patch | 27 ---------------- 3 files changed, 17 insertions(+), 50 deletions(-) delete mode 100644 gnu/packages/patches/emacs-undohist-ignored.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index e515ab6285..7b6cd8e0ae 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -960,7 +960,6 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-source-date-epoch.patch \ %D%/packages/patches/emacs-telega-patch-server-functions.patch \ %D%/packages/patches/emacs-telega-test-env.patch \ - %D%/packages/patches/emacs-undohist-ignored.patch \ %D%/packages/patches/emacs-wordnut-require-adaptive-wrap.patch \ %D%/packages/patches/enjarify-setup-py.patch \ %D%/packages/patches/enlightenment-fix-setuid-path.patch \ diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 11c5457f57..b3611c61d2 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -8460,29 +8460,24 @@ agree upon.") (license license:gpl3+))) (define-public emacs-undohist-el - (let ((commit "d2239a5f736724ceb9e3b6bcaa86f4064805cda0") - (revision "1")) - (package - (name "emacs-undohist-el") - (version (git-version "0" revision commit)) - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/m2ym/undohist-el") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1c0daw246ky7b1x5b8h55x79pl1pjqk1k348l487bdd8zdj4w9wx")) - (patches - (search-patches "emacs-undohist-ignored.patch")))) - (build-system emacs-build-system) - (home-page "https://github.com/m2ym/undohist-el") - (synopsis "Save undo history between sessions") - (description "This package allows persistent use of undo history for + (package + (name "emacs-undohist-el") + (version "0.2.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/m2ym/undohist-el") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0hmx2b20nrxg2lb8vplgrzdh8chgxwlbmjvbq5scddggd302sd56")))) + (build-system emacs-build-system) + (home-page "https://github.com/m2ym/undohist-el") + (synopsis "Save undo history between sessions") + (description "This package allows persistent use of undo history for individual file buffers.") - (license license:gpl3+)))) + (license license:gpl3+))) (define-public emacs-eprime (let ((commit "17a481af26496be91c07139a9bfc05cfe722506f")) diff --git a/gnu/packages/patches/emacs-undohist-ignored.patch b/gnu/packages/patches/emacs-undohist-ignored.patch deleted file mode 100644 index c1ad827a26..0000000000 --- a/gnu/packages/patches/emacs-undohist-ignored.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 52bfd419bf9022726048f818d955b8ea10a16d5c Mon Sep 17 00:00:00 2001 -From: Patrick Mosby -Date: Mon, 7 Sep 2015 09:05:56 +0200 -Subject: [PATCH] Don't save undo file for ignored files. - -This fixes #4. ---- - undohist.el | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/undohist.el b/undohist.el -index b184a26..de60356 100644 ---- a/undohist.el -+++ b/undohist.el -@@ -164,7 +164,8 @@ To use undohist, you just call this function." - undohist-ignored-files))) - - (defun undohist-save-1 () -- (when (consp buffer-undo-list) -+ (when (and (consp buffer-undo-list) -+ (undohist-recover-file-p (buffer-file-name (current-buffer)))) - (let ((file (make-undohist-file-name (buffer-file-name))) - (contents `((digest . ,(md5 (current-buffer))) - (undo-list . ,(undohist-encode buffer-undo-list))))) --- -2.21.0 - -- cgit v1.2.3 From 1e9f667708ba6fdc4b16fe6851bc0ea0b6306fad Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Mon, 8 Feb 2021 16:40:17 +0100 Subject: gnu: qpdfview: Fix qt-5.15 compatibility. * gnu/packages/pdf.scm (qpdfview)[source]: Add patch to include a missing header. * gnu/packages/patches/qpdfview-qt515-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Leo Famulari --- gnu/local.mk | 1 + gnu/packages/patches/qpdfview-qt515-compat.patch | 17 +++++++++++++++++ gnu/packages/pdf.scm | 3 ++- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/qpdfview-qt515-compat.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 7b6cd8e0ae..886c8531c9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1560,6 +1560,7 @@ dist_patch_DATA = \ %D%/packages/patches/pypy3-7.3.1-fix-tests.patch \ %D%/packages/patches/qemu-build-info-manual.patch \ %D%/packages/patches/qemu-glibc-2.27.patch \ + %D%/packages/patches/qpdfview-qt515-compat.patch \ %D%/packages/patches/qrcodegen-cpp-make-install.patch \ %D%/packages/patches/qt4-ldflags.patch \ %D%/packages/patches/qtbase-absolute-runpath.patch \ diff --git a/gnu/packages/patches/qpdfview-qt515-compat.patch b/gnu/packages/patches/qpdfview-qt515-compat.patch new file mode 100644 index 0000000000..1fbf5ec3f1 --- /dev/null +++ b/gnu/packages/patches/qpdfview-qt515-compat.patch @@ -0,0 +1,17 @@ +Fix compatibility with Qt 5.15. + +Patch copied from upstream source repository: + +https://bazaar.launchpad.net/~adamreichold/qpdfview/trunk/revision/2104 + +--- a/sources/model.h 2017-04-19 21:01:25 +0000 ++++ b/sources/model.h 2020-06-09 06:24:11 +0000 +@@ -24,6 +24,7 @@ + #define DOCUMENTMODEL_H + + #include ++#include + #include + #include + #include + diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 66e920a7bb..3063aa10c0 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -869,7 +869,8 @@ program capable of converting PDF into other formats.") "trunk/" version "/+download/" "qpdfview-" version ".tar.gz")) (sha256 - (base32 "0v1rl126hvblajnph2hkansgi0s8vjdc5yxrm4y3faa0lxzjwr6c")))) + (base32 "0v1rl126hvblajnph2hkansgi0s8vjdc5yxrm4y3faa0lxzjwr6c")) + (patches (search-patches "qpdfview-qt515-compat.patch")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) -- cgit v1.2.3 From d00380b0077b0df2a0b790bb115d07c1533b8863 Mon Sep 17 00:00:00 2001 From: Vincent Legoll Date: Sun, 7 Feb 2021 11:28:21 +0100 Subject: gnu: vorbis-tools: Update to 1.4.2. * gnu/packages/xiph.scm (vorbis-tools): Update to 1.4.2. (source): Remove obsolete patches. * gnu/packages/patches/vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch, gnu/packages/patches/vorbis-tools-CVE-2014-9640.patch, gnu/packages/patches/vorbis-tools-CVE-2015-6749.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Remove them. Signed-off-by: Leo Famulari --- gnu/local.mk | 3 - .../vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch | 83 ---------------------- .../patches/vorbis-tools-CVE-2014-9640.patch | 29 -------- .../patches/vorbis-tools-CVE-2015-6749.patch | 44 ------------ gnu/packages/xiph.scm | 8 +-- 5 files changed, 2 insertions(+), 165 deletions(-) delete mode 100644 gnu/packages/patches/vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch delete mode 100644 gnu/packages/patches/vorbis-tools-CVE-2014-9640.patch delete mode 100644 gnu/packages/patches/vorbis-tools-CVE-2015-6749.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 886c8531c9..8a31bfef64 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1712,9 +1712,6 @@ dist_patch_DATA = \ %D%/packages/patches/vinagre-newer-freerdp.patch \ %D%/packages/patches/vinagre-newer-rdp-parameters.patch \ %D%/packages/patches/virglrenderer-CVE-2017-6386.patch \ - %D%/packages/patches/vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch \ - %D%/packages/patches/vorbis-tools-CVE-2014-9640.patch \ - %D%/packages/patches/vorbis-tools-CVE-2015-6749.patch \ %D%/packages/patches/vsearch-unbundle-cityhash.patch \ %D%/packages/patches/vte-CVE-2012-2738-pt1.patch \ %D%/packages/patches/vte-CVE-2012-2738-pt2.patch \ diff --git a/gnu/packages/patches/vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch b/gnu/packages/patches/vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch deleted file mode 100644 index 6e389dd59e..0000000000 --- a/gnu/packages/patches/vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch +++ /dev/null @@ -1,83 +0,0 @@ -From: Petter Reinholdtsen -Date: Tue, 22 Sep 2015 15:14:06 +0200 -Subject: oggenc: validate count of channels in the header (CVE-2014-9638 & - CVE-2014-9639) - -Author: Kamil Dudka -Origin: http://lists.xiph.org/pipermail/vorbis-dev/2015-February/020423.html -Bug: https://trac.xiph.org/ticket/2136 -Bug: https://trac.xiph.org/ticket/2137 -Bug-Debian: https://bugs.debian.org/776086 -Forwarded: not-needed -Reviewed-By: Petter Reinholdtsen -Last-Update: 2015-09-22 ---- - oggenc/audio.c | 18 ++++++++++++++++-- - 1 file changed, 16 insertions(+), 2 deletions(-) - -diff --git a/oggenc/audio.c b/oggenc/audio.c -index 05e42b3..1b3f179 100644 ---- a/oggenc/audio.c -+++ b/oggenc/audio.c -@@ -13,6 +13,7 @@ - #include - #endif - -+#include - #include - #include - #include -@@ -251,6 +252,7 @@ int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen) - aiff_fmt format; - aifffile *aiff = malloc(sizeof(aifffile)); - int i; -+ long channels; - - if(buf[11]=='C') - aifc=1; -@@ -277,11 +279,16 @@ int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen) - return 0; - } - -- format.channels = READ_U16_BE(buffer); -+ format.channels = channels = READ_U16_BE(buffer); - format.totalframes = READ_U32_BE(buffer+2); - format.samplesize = READ_U16_BE(buffer+6); - format.rate = (int)read_IEEE80(buffer+8); - -+ if(channels <= 0L || SHRT_MAX < channels) -+ { -+ fprintf(stderr, _("Warning: Unsupported count of channels in AIFF header\n")); -+ return 0; -+ } - aiff->bigendian = 1; - - if(aifc) -@@ -412,6 +419,7 @@ int wav_open(FILE *in, oe_enc_opt *opt, unsigned char *oldbuf, int buflen) - wav_fmt format; - wavfile *wav = malloc(sizeof(wavfile)); - int i; -+ long channels; - - /* Ok. At this point, we know we have a WAV file. Now we have to detect - * whether we support the subtype, and we have to find the actual data -@@ -449,12 +457,18 @@ int wav_open(FILE *in, oe_enc_opt *opt, unsigned char *oldbuf, int buflen) - } - - format.format = READ_U16_LE(buf); -- format.channels = READ_U16_LE(buf+2); -+ format.channels = channels = READ_U16_LE(buf+2); - format.samplerate = READ_U32_LE(buf+4); - format.bytespersec = READ_U32_LE(buf+8); - format.align = READ_U16_LE(buf+12); - format.samplesize = READ_U16_LE(buf+14); - -+ if(channels <= 0L || SHRT_MAX < channels) -+ { -+ fprintf(stderr, _("Warning: Unsupported count of channels in WAV header\n")); -+ return 0; -+ } -+ - if(format.format == -2) /* WAVE_FORMAT_EXTENSIBLE */ - { - if(len<40) diff --git a/gnu/packages/patches/vorbis-tools-CVE-2014-9640.patch b/gnu/packages/patches/vorbis-tools-CVE-2014-9640.patch deleted file mode 100644 index 97d18e0db7..0000000000 --- a/gnu/packages/patches/vorbis-tools-CVE-2014-9640.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: vorbis-tools/oggenc/oggenc.c -=================================================================== ---- vorbis-tools/oggenc/oggenc.c (revision 19116) -+++ vorbis-tools/oggenc/oggenc.c (revision 19117) -@@ -98,4 +98,6 @@ - 0,0,0.f, - 0, 0, 0, 0, 0}; -+ input_format raw_format = {NULL, 0, raw_open, wav_close, "raw", -+ N_("RAW file reader")}; - - int i; -@@ -240,6 +242,4 @@ - if(opt.rawmode) - { -- input_format raw_format = {NULL, 0, raw_open, wav_close, "raw", -- N_("RAW file reader")}; - - enc_opts.rate=opt.raw_samplerate; -Index: vorbis-tools/oggenc/skeleton.h -=================================================================== ---- vorbis-tools/oggenc/skeleton.h (revision 19116) -+++ vorbis-tools/oggenc/skeleton.h (revision 19117) -@@ -42,5 +42,5 @@ - ogg_int64_t start_granule; /* start granule value */ - ogg_uint32_t preroll; /* preroll */ -- unsigned char granule_shift; // a 8-bit field /* 1 byte value holding the granule shift */ -+ unsigned char granule_shift; /* 1 byte value holding the granule shift */ - char *message_header_fields; /* holds all the message header fields */ - /* current total size of the message header fields, for realloc purpose, initially zero */ diff --git a/gnu/packages/patches/vorbis-tools-CVE-2015-6749.patch b/gnu/packages/patches/vorbis-tools-CVE-2015-6749.patch deleted file mode 100644 index bcddcbfd70..0000000000 --- a/gnu/packages/patches/vorbis-tools-CVE-2015-6749.patch +++ /dev/null @@ -1,44 +0,0 @@ -Upstream fix for CVE-2015-6749. -https://trac.xiph.org/ticket/2212 - -From 04815d3e1bfae3a6cdfb2c25358a5a72b61299f7 Mon Sep 17 00:00:00 2001 -From: Mark Harris -Date: Sun, 30 Aug 2015 05:54:46 -0700 -Subject: [PATCH] oggenc: Fix large alloca on bad AIFF input - -Fixes #2212 ---- - oggenc/audio.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/oggenc/audio.c b/oggenc/audio.c -index 477da8c..4921fb9 100644 ---- a/oggenc/audio.c -+++ b/oggenc/audio.c -@@ -245,8 +245,8 @@ static int aiff_permute_matrix[6][6] = - int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen) - { - int aifc; /* AIFC or AIFF? */ -- unsigned int len; -- unsigned char *buffer; -+ unsigned int len, readlen; -+ unsigned char buffer[22]; - unsigned char buf2[8]; - aiff_fmt format; - aifffile *aiff = malloc(sizeof(aifffile)); -@@ -269,9 +269,9 @@ int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen) - return 0; /* Weird common chunk */ - } - -- buffer = alloca(len); -- -- if(fread(buffer,1,len,in) < len) -+ readlen = len < sizeof(buffer) ? len : sizeof(buffer); -+ if(fread(buffer,1,readlen,in) < readlen || -+ (len > readlen && !seek_forward(in, len-readlen))) - { - fprintf(stderr, _("Warning: Unexpected EOF in reading AIFF header\n")); - return 0; --- -2.5.0 - diff --git a/gnu/packages/xiph.scm b/gnu/packages/xiph.scm index 4a3f25e009..8ed0e518a7 100644 --- a/gnu/packages/xiph.scm +++ b/gnu/packages/xiph.scm @@ -312,18 +312,14 @@ Kate stream.") (define vorbis-tools (package (name "vorbis-tools") - (version "1.4.0") + (version "1.4.2") (source (origin (method url-fetch) (uri (string-append "https://downloads.xiph.org/releases/vorbis/" "vorbis-tools-" version ".tar.gz")) (sha256 (base32 - "1g12bnh5ah08v529y72kfdz5lhvy75iaz7f9jskyby23m9dkk2d3")) - (patches (search-patches - "vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch" - "vorbis-tools-CVE-2014-9640.patch" - "vorbis-tools-CVE-2015-6749.patch")))) + "1c7h4ivgfdyygz2hyh6nfibxlkz8kdk868a576qkkjgj5gn78xyv")))) (build-system gnu-build-system) (inputs `(("ao" ,ao) ("curl" ,curl) -- cgit v1.2.3 From 55050e54a987cd99b8477da1a4993e83adcca129 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 9 Feb 2021 22:59:51 +0100 Subject: gnu: inetutils: Update to 2.0. * gnu/packages/admin.scm (inetutils): Update to 2.0. [source](patches): Remove. * gnu/packages/patches/inetutils-hurd.patch: Remove. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. --- gnu/local.mk | 3 +- gnu/packages/admin.scm | 7 +- gnu/packages/patches/inetutils-hurd.patch | 583 ------------------------------ 3 files changed, 4 insertions(+), 589 deletions(-) delete mode 100644 gnu/packages/patches/inetutils-hurd.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 8a31bfef64..21250c2d7b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès +# Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès # Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Andreas Enge # Copyright © 2016 Mathieu Lirzin # Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Mark H Weaver @@ -1180,7 +1180,6 @@ dist_patch_DATA = \ %D%/packages/patches/id3lib-UTF16-writing-bug.patch \ %D%/packages/patches/idris-disable-test.patch \ %D%/packages/patches/ilmbase-fix-tests.patch \ - %D%/packages/patches/inetutils-hurd.patch \ %D%/packages/patches/inkscape-poppler-0.76.patch \ %D%/packages/patches/intel-xed-fix-nondeterminism.patch \ %D%/packages/patches/intltool-perl-compatibility.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index a6cf633baa..4bc08f83f0 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès +;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2013 Cyril Roelandt ;;; Copyright © 2014, 2015, 2016, 2018, 2019, 2020 Mark H Weaver ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2020 Eric Bavier @@ -612,15 +612,14 @@ re-executing them as necessary.") (define-public inetutils (package (name "inetutils") - (version "1.9.4") + (version "2.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/inetutils/inetutils-" version ".tar.gz")) - (patches (search-patches "inetutils-hurd.patch")) (sha256 (base32 - "05n65k4ixl85dc6rxc51b1b732gnmm8xnqi424dy9f1nz7ppb3xy")))) + "0j1nb69bhg29cm4xkqqjh2ln1zqcj2lnpm92v638lpwrs11dypxl")))) (build-system gnu-build-system) (arguments `(#:configure-flags '("--localstatedir=/var" diff --git a/gnu/packages/patches/inetutils-hurd.patch b/gnu/packages/patches/inetutils-hurd.patch deleted file mode 100644 index bd65c4feb1..0000000000 --- a/gnu/packages/patches/inetutils-hurd.patch +++ /dev/null @@ -1,583 +0,0 @@ -Support compiling on the Hurd. - -Taken from https://git.hadrons.org/cgit/debian/pkgs/inetutils.git/tree/debian/patches/0002-ifconfig-Improve-the-support-for-GNU-Hurd.patch - -From 9a90d9b9119906df23cb2db1503cb0f099942dd9 Mon Sep 17 00:00:00 2001 -From: Mats Erik Andersson -Date: Sat, 18 Jul 2015 01:12:41 +0200 -Subject: [PATCH 02/35] ifconfig: Improve the support for GNU/Hurd. - -Use system specific code instead of generic code. -This provides abilities similar to other systems. ---- - ChangeLog | 17 +++ - ifconfig/system.c | 10 +- - ifconfig/system.h | 2 + - ifconfig/system/Makefile.am | 4 +- - ifconfig/system/generic.c | 14 +- - ifconfig/system/hurd.c | 292 ++++++++++++++++++++++++++++++++++++ - ifconfig/system/hurd.h | 50 ++++++ - 7 files changed, 381 insertions(+), 8 deletions(-) - create mode 100644 ifconfig/system/hurd.c - create mode 100644 ifconfig/system/hurd.h - -diff --git a/ifconfig/system.c b/ifconfig/system.c -index 30677e41..e108dc2e 100644 ---- a/ifconfig/system.c -+++ b/ifconfig/system.c -@@ -25,10 +25,12 @@ - # include "system/solaris.c" - #elif defined __QNX__ - # include "system/qnx.c" --# elif defined __DragonFly__ || defined __FreeBSD__ || \ -- defined __FreeBSD_kernel__ || \ -- defined __NetBSD__ || defined __OpenBSD__ --# include "system/bsd.c" -+#elif defined __DragonFly__ || defined __FreeBSD__ || \ -+ defined __FreeBSD_kernel__ || \ -+ defined __NetBSD__ || defined __OpenBSD__ -+# include "system/bsd.c" -+#elif defined __GNU__ -+# include "system/hurd.c" - #else - # include "system/generic.c" - #endif -diff --git a/ifconfig/system.h b/ifconfig/system.h -index 8521ad95..66878d3a 100644 ---- a/ifconfig/system.h -+++ b/ifconfig/system.h -@@ -97,6 +97,8 @@ extern struct if_nameindex* (*system_if_nameindex) (void); - defined __FreeBSD_kernel__ || \ - defined __NetBSD__ || defined __OpenBSD__ - # include "system/bsd.h" -+# elif defined __GNU__ -+# include "system/hurd.h" - # else - # include "system/generic.h" - # endif -diff --git a/ifconfig/system/Makefile.am b/ifconfig/system/Makefile.am -index 954c6774..62a9f1c4 100644 ---- a/ifconfig/system/Makefile.am -+++ b/ifconfig/system/Makefile.am -@@ -26,8 +26,10 @@ noinst_HEADERS = \ - linux.h \ - solaris.h \ - qnx.h \ -+ hurd.h \ - bsd.c \ - generic.c \ - linux.c \ - solaris.c \ -- qnx.c -+ qnx.c \ -+ hurd.c -diff --git a/ifconfig/system/generic.c b/ifconfig/system/generic.c -index 9a2bda55..20a78bde 100644 ---- a/ifconfig/system/generic.c -+++ b/ifconfig/system/generic.c -@@ -22,6 +22,8 @@ - #include - - #include "../ifconfig.h" -+ -+#include - - - /* Output format stuff. */ -@@ -36,19 +38,25 @@ const char *system_help; - struct argp_child system_argp_child; - - int --system_parse_opt (struct ifconfig **ifp, char option, char *optarg) -+system_parse_opt (struct ifconfig **ifp _GL_UNUSED_PARAMETER, -+ char option _GL_UNUSED_PARAMETER, -+ char *optarg _GL_UNUSED_PARAMETER) - { - return 0; - } - - int --system_parse_opt_rest (struct ifconfig **ifp, int argc, char *argv[]) -+system_parse_opt_rest (struct ifconfig **ifp _GL_UNUSED_PARAMETER, -+ int argc _GL_UNUSED_PARAMETER, -+ char *argv[] _GL_UNUSED_PARAMETER) - { - return 0; - } - - int --system_configure (int sfd, struct ifreq *ifr, struct system_ifconfig *ifs) -+system_configure (int sfd _GL_UNUSED_PARAMETER, -+ struct ifreq *ifr _GL_UNUSED_PARAMETER, -+ struct system_ifconfig *ifs _GL_UNUSED_PARAMETER) - { - return 0; - } -diff --git a/ifconfig/system/hurd.c b/ifconfig/system/hurd.c -new file mode 100644 -index 00000000..3bd19775 ---- /dev/null -+++ b/ifconfig/system/hurd.c -@@ -0,0 +1,292 @@ -+/* hurd.c -- Code for ifconfig specific to GNU/Hurd. -+ Copyright (C) 2015 Free Software Foundation, Inc. -+ -+ This file is part of GNU Inetutils. -+ -+ GNU Inetutils is free software: you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation, either version 3 of the License, or (at -+ your option) any later version. -+ -+ GNU Inetutils is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program. If not, see `http://www.gnu.org/licenses/'. */ -+ -+/* Mostly written by Marcus Brinkmann. -+ Adaptions to GNU/Hurd by Mats Erik Andersson. */ -+ -+#include -+ -+#include -+#include -+#include -+#include "../ifconfig.h" -+ -+#include -+ -+ -+/* Output format stuff. */ -+ -+const char *system_default_format = "gnu"; -+ -+ -+/* Argument parsing stuff. */ -+ -+const char *system_help = "NAME [ADDR]\ -+ [broadcast BRDADDR] [netmask MASK]\ -+ [mtu N] [up|down] [FLAGS]"; -+ -+struct argp_child system_argp_child; -+ -+int -+system_parse_opt (struct ifconfig **ifp _GL_UNUSED_PARAMETER, -+ char option _GL_UNUSED_PARAMETER, -+ char *optarg _GL_UNUSED_PARAMETER) -+{ -+ return 0; -+} -+ -+int -+system_parse_opt_rest (struct ifconfig **ifp, int argc, char *argv[]) -+{ -+ int i = 0, mask, rev; -+ enum { -+ EXPECT_NOTHING, -+ EXPECT_AF, -+ EXPECT_BROADCAST, -+ EXPECT_NETMASK, -+ EXPECT_METRIC, -+ EXPECT_MTU -+ } expect = EXPECT_AF; -+ -+ *ifp = parse_opt_new_ifs (argv[0]); -+ -+ while (++i < argc) -+ { -+ switch (expect) -+ { -+ case EXPECT_BROADCAST: -+ parse_opt_set_brdaddr (*ifp, argv[i]); -+ break; -+ -+ case EXPECT_NETMASK: -+ parse_opt_set_netmask (*ifp, argv[i]); -+ break; -+ -+ case EXPECT_MTU: -+ parse_opt_set_mtu (*ifp, argv[i]); -+ break; -+ -+ /* XXX: 2015-07-18, GNU/Hurd does not yet support -+ ioctl(SIOCSIFMETRIC), but we let the code -+ handle this standard ability anyway! -+ */ -+ case EXPECT_METRIC: -+ parse_opt_set_metric (*ifp, argv[i]); -+ break; -+ -+ case EXPECT_AF: -+ expect = EXPECT_NOTHING; -+ if (!strcmp (argv[i], "inet")) -+ continue; -+ else if (!strcmp (argv[i], "inet6")) -+ { -+ error (0, 0, "%s is not a supported address family", argv[i]); -+ return 0; -+ } -+ break; -+ -+ case EXPECT_NOTHING: -+ break; -+ } -+ -+ if (expect != EXPECT_NOTHING) -+ expect = EXPECT_NOTHING; -+ else if (!strcmp (argv[i], "broadcast")) -+ expect = EXPECT_BROADCAST; -+ else if (!strcmp (argv[i], "netmask")) -+ expect = EXPECT_NETMASK; -+ else if (!strcmp (argv[i], "metric")) -+ expect = EXPECT_METRIC; -+ else if (!strcmp (argv[i], "mtu")) -+ expect = EXPECT_MTU; -+ else if (!strcmp (argv[i], "up")) -+ parse_opt_set_flag (*ifp, IFF_UP | IFF_RUNNING, 0); -+ else if (!strcmp (argv[i], "down")) -+ parse_opt_set_flag (*ifp, IFF_UP, 1); -+ else if (((mask = if_nameztoflag (argv[i], &rev)) -+ & ~IU_IFF_CANTCHANGE) != 0) -+ parse_opt_set_flag (*ifp, mask, rev); -+ else -+ { -+ if (!((*ifp)->valid & IF_VALID_ADDR)) -+ parse_opt_set_address (*ifp, argv[i]); -+ else if (!((*ifp)->valid & IF_VALID_DSTADDR)) -+ parse_opt_set_dstaddr (*ifp, argv[i]); -+ } -+ } -+ -+ switch (expect) -+ { -+ case EXPECT_BROADCAST: -+ error (0, 0, "option `broadcast' requires an argument"); -+ break; -+ -+ case EXPECT_NETMASK: -+ error (0, 0, "option `netmask' requires an argument"); -+ break; -+ -+ case EXPECT_METRIC: -+ error (0, 0, "option `metric' requires an argument"); -+ break; -+ -+ case EXPECT_MTU: -+ error (0, 0, "option `mtu' requires an argument"); -+ break; -+ -+ case EXPECT_AF: -+ case EXPECT_NOTHING: -+ return 1; -+ } -+ -+ return 0; -+} -+ -+int -+system_configure (int sfd _GL_UNUSED_PARAMETER, -+ struct ifreq *ifr _GL_UNUSED_PARAMETER, -+ struct system_ifconfig *ifs _GL_UNUSED_PARAMETER) -+{ -+ return 0; -+} -+ -+struct if_nameindex* (*system_if_nameindex) (void) = if_nameindex; -+ -+static void -+print_hwaddr_ether (format_data_t form _GL_UNUSED_PARAMETER, -+ unsigned char *data) -+{ -+ *column += printf ("%02X:%02X:%02X:%02X:%02X:%02X", -+ data[0], data[1], data[2], data[3], data[4], data[5]); -+ had_output = 1; -+} -+ -+struct arphrd_symbol -+{ -+ const char *name; -+ const char *title; -+ int value; -+ void (*print_hwaddr) (format_data_t form, unsigned char *data); -+} arphrd_symbols[] = -+ { -+#ifdef ARPHRD_ETHER /* Ethernet 10/100Mbps. */ -+ { "ETHER", "Ethernet", ARPHRD_ETHER, print_hwaddr_ether}, -+#endif -+#ifdef ARPHRD_LOOPBACK /* Loopback device. */ -+ { "LOOPBACK", "Local Loopback", ARPHRD_LOOPBACK, NULL}, -+#endif -+ /* XXX: The image debian-hurd-20150424 returns the value 4 -+ instead of expected ARPHRD_LOOPBACK. This has been -+ discussed in the list debian-hurd, where I was asked -+ to resist the temptation of a work around! -+ */ -+ { NULL, NULL, 0, NULL} -+ }; -+ -+struct arphrd_symbol * -+arphrd_findvalue (int value) -+{ -+ struct arphrd_symbol *arp = arphrd_symbols; -+ while (arp->name != NULL) -+ { -+ if (arp->value == value) -+ break; -+ arp++; -+ } -+ if (arp->name) -+ return arp; -+ else -+ return NULL; -+} -+ -+void -+system_fh_hwaddr_query (format_data_t form, int argc, char *argv[]) -+{ -+#ifdef SIOCGIFHWADDR -+ struct arphrd_symbol *arp; -+ -+ if (ioctl (form->sfd, SIOCGIFHWADDR, form->ifr) < 0) -+ select_arg (form, argc, argv, 1); -+ -+ arp = arphrd_findvalue (form->ifr->ifr_hwaddr.sa_family); -+ select_arg (form, argc, argv, (arp && arp->print_hwaddr) ? 0 : 1); -+#else -+ select_arg (form, argc, argv, 1); -+#endif -+} -+ -+void -+system_fh_hwaddr (format_data_t form, int argc _GL_UNUSED_PARAMETER, -+ char *argv[] _GL_UNUSED_PARAMETER) -+{ -+#ifdef SIOCGIFHWADDR -+ if (ioctl (form->sfd, SIOCGIFHWADDR, form->ifr) < 0) -+ error (EXIT_FAILURE, errno, -+ "SIOCGIFHWADDR failed for interface `%s'", -+ form->ifr->ifr_name); -+ else -+ { -+ struct arphrd_symbol *arp; -+ -+ arp = arphrd_findvalue (form->ifr->ifr_hwaddr.sa_family); -+ if (arp && arp->print_hwaddr) -+ arp->print_hwaddr (form, -+ (unsigned char *) form->ifr->ifr_hwaddr.sa_data); -+ else -+ put_string (form, "(hwaddr unknown)"); -+ } -+#else -+ *column += printf ("(not available)"); -+ had_output = 1; -+#endif -+} -+ -+void -+system_fh_hwtype_query (format_data_t form, int argc, char *argv[]) -+{ -+#ifdef SIOCGIFHWADDR -+ if (ioctl (form->sfd, SIOCGIFHWADDR, form->ifr) >= 0) -+ select_arg (form, argc, argv, 0); -+ else -+#endif -+ select_arg (form, argc, argv, 1); -+} -+ -+void -+system_fh_hwtype (format_data_t form, int argc _GL_UNUSED_PARAMETER, -+ char *argv[] _GL_UNUSED_PARAMETER) -+{ -+#ifdef SIOCGIFHWADDR -+ if (ioctl (form->sfd, SIOCGIFHWADDR, form->ifr) < 0) -+ error (EXIT_FAILURE, errno, -+ "SIOCGIFHWADDR failed for interface `%s'", -+ form->ifr->ifr_name); -+ else -+ { -+ struct arphrd_symbol *arp; -+ -+ arp = arphrd_findvalue (form->ifr->ifr_hwaddr.sa_family); -+ if (arp) -+ put_string (form, arp->title); -+ else -+ put_string (form, "(hwtype unknown)"); -+ } -+#else -+ *column += printf ("(not available)"); -+ had_output = 1; -+#endif -+} -diff --git a/ifconfig/system/hurd.h b/ifconfig/system/hurd.h -new file mode 100644 -index 00000000..bab14565 ---- /dev/null -+++ b/ifconfig/system/hurd.h -@@ -0,0 +1,50 @@ -+/* -+ Copyright (C) 2015 Free Software Foundation, Inc. -+ -+ This file is part of GNU Inetutils. -+ -+ GNU Inetutils is free software: you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation, either version 3 of the License, or (at -+ your option) any later version. -+ -+ GNU Inetutils is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program. If not, see `http://www.gnu.org/licenses/'. */ -+ -+/* Written by Mats Erik Andersson. */ -+ -+#ifndef IFCONFIG_SYSTEM_HURD_H -+# define IFCONFIG_SYSTEM_HURD_H -+ -+# include "../printif.h" -+# include "../options.h" -+ -+ -+/* Option support. */ -+ -+struct system_ifconfig -+{ -+ int valid; -+}; -+ -+ -+/* Output format support. */ -+ -+# define SYSTEM_FORMAT_HANDLER \ -+ { "hurd", fh_nothing}, \ -+ { "hwaddr?", system_fh_hwaddr_query}, \ -+ { "hwaddr", system_fh_hwaddr}, \ -+ { "hwtype?", system_fh_hwtype_query}, \ -+ { "hwtype", system_fh_hwtype}, -+ -+void system_fh_hwaddr_query (format_data_t form, int argc, char *argv[]); -+void system_fh_hwaddr (format_data_t form, int argc, char *argv[]); -+void system_fh_hwtype_query (format_data_t form, int argc, char *argv[]); -+void system_fh_hwtype (format_data_t form, int argc, char *argv[]); -+ -+#endif /* !IFCONFIG_SYSTEM_HURD_H */ --- -2.23.0.rc1.170.gbd704faa3e - -From 589dab9c7d3119da82837dabae34c8a3d16cbe49 Mon Sep 17 00:00:00 2001 -From: Mats Erik Andersson -Date: Thu, 30 Jul 2015 01:06:42 +0200 -Subject: [PATCH 07/35] ifconfig: Hardware detection in GNU/Hurd. - -A work-around needed to distinguish hardware type. ---- - ChangeLog | 10 ++++++++++ - ifconfig/system/hurd.c | 19 ++++++++++++------- - 2 files changed, 22 insertions(+), 7 deletions(-) - -diff --git a/ifconfig/system/hurd.c b/ifconfig/system/hurd.c -index 3bd19775..b6261a00 100644 ---- a/ifconfig/system/hurd.c -+++ b/ifconfig/system/hurd.c -@@ -175,6 +175,16 @@ print_hwaddr_ether (format_data_t form _GL_UNUSED_PARAMETER, - had_output = 1; - } - -+/* GNU/Hurd and Mach are using a mixture of BSD definitions -+ * and GNU/Linux interface headers, which in this situation -+ * means that sa_family_t is an unsigned char, from BSD, while -+ * all ARPHRD_* come from GNU/Linux and are thus 16 bits wide. -+ * We must account for this. The following bitmask will -+ * adapt to any future change! -+ */ -+ -+#define _ARP_MASK ((sizeof (sa_family_t) == 1) ? 0xff : 0xffff) -+ - struct arphrd_symbol - { - const char *name; -@@ -184,16 +194,11 @@ struct arphrd_symbol - } arphrd_symbols[] = - { - #ifdef ARPHRD_ETHER /* Ethernet 10/100Mbps. */ -- { "ETHER", "Ethernet", ARPHRD_ETHER, print_hwaddr_ether}, -+ { "ETHER", "Ethernet", ARPHRD_ETHER & _ARP_MASK, print_hwaddr_ether}, - #endif - #ifdef ARPHRD_LOOPBACK /* Loopback device. */ -- { "LOOPBACK", "Local Loopback", ARPHRD_LOOPBACK, NULL}, -+ { "LOOPBACK", "Local Loopback", ARPHRD_LOOPBACK & _ARP_MASK, NULL}, - #endif -- /* XXX: The image debian-hurd-20150424 returns the value 4 -- instead of expected ARPHRD_LOOPBACK. This has been -- discussed in the list debian-hurd, where I was asked -- to resist the temptation of a work around! -- */ - { NULL, NULL, 0, NULL} - }; - --- -2.23.0.rc1.170.gbd704faa3e - -From d379784b4461d17b2536effd1b52bae21cd28a32 Mon Sep 17 00:00:00 2001 -From: Guillem Jover -Date: Fri, 16 Aug 2019 00:34:03 +0200 -Subject: [PATCH 35/35] telnet: Several ioctls have been disabled in the Hurd's - glibc - -But not the related option macros. inetutils uses those macros to decide -whether the ioctls are available, so it is FTBFS now. The Hurd's glibc -is being fixed, but we'll use this for now to get the builds going. ---- - telnet/sys_bsd.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/telnet/sys_bsd.c b/telnet/sys_bsd.c -index 662536ab..5eb35cb5 100644 ---- a/telnet/sys_bsd.c -+++ b/telnet/sys_bsd.c -@@ -63,6 +63,7 @@ - #include - #include - #include -+#include - #include - - #include "ring.h" -@@ -157,7 +158,7 @@ TerminalRead (char *buf, int n) - int - TerminalAutoFlush (void) - { --#if defined LNOFLSH -+#if defined TIOCLGET && defined LNOFLSH - int flush; - - ioctl (0, TIOCLGET, (char *) &flush); -@@ -260,7 +261,9 @@ TerminalSaveState (void) - ioctl (0, TIOCGETP, (char *) &ottyb); - ioctl (0, TIOCGETC, (char *) &otc); - ioctl (0, TIOCGLTC, (char *) &oltc); -+#ifdef TIOCLGET - ioctl (0, TIOCLGET, (char *) &olmode); -+#endif - - ntc = otc; - nltc = oltc; -@@ -755,7 +758,9 @@ TerminalNewMode (register int f) - #endif - } - #ifndef USE_TERMIO -+#ifdef TIOCLSET - ioctl (tin, TIOCLSET, (char *) &lmode); -+#endif - ioctl (tin, TIOCSLTC, (char *) <c); - ioctl (tin, TIOCSETC, (char *) &tc); - ioctl (tin, TIOCSETN, (char *) &sb); --- -2.23.0.rc1.170.gbd704faa3e - -- cgit v1.2.3 From 4590ee9bd0c3d1269724f6de8bdac70f20a61640 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 10 Feb 2021 00:17:22 +0100 Subject: Revert "gnu: inetutils: Update to 2.0." This reverts commit 55050e54a987cd99b8477da1a4993e83adcca129, which rebuilds xdg-utils and hence a good part of the world (1838 packages). Reported by mroh in #guix. --- gnu/local.mk | 3 +- gnu/packages/admin.scm | 7 +- gnu/packages/patches/inetutils-hurd.patch | 583 ++++++++++++++++++++++++++++++ 3 files changed, 589 insertions(+), 4 deletions(-) create mode 100644 gnu/packages/patches/inetutils-hurd.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 21250c2d7b..8a31bfef64 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès +# Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès # Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Andreas Enge # Copyright © 2016 Mathieu Lirzin # Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Mark H Weaver @@ -1180,6 +1180,7 @@ dist_patch_DATA = \ %D%/packages/patches/id3lib-UTF16-writing-bug.patch \ %D%/packages/patches/idris-disable-test.patch \ %D%/packages/patches/ilmbase-fix-tests.patch \ + %D%/packages/patches/inetutils-hurd.patch \ %D%/packages/patches/inkscape-poppler-0.76.patch \ %D%/packages/patches/intel-xed-fix-nondeterminism.patch \ %D%/packages/patches/intltool-perl-compatibility.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 4bc08f83f0..a6cf633baa 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès +;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès ;;; Copyright © 2013 Cyril Roelandt ;;; Copyright © 2014, 2015, 2016, 2018, 2019, 2020 Mark H Weaver ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2020 Eric Bavier @@ -612,14 +612,15 @@ re-executing them as necessary.") (define-public inetutils (package (name "inetutils") - (version "2.0") + (version "1.9.4") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/inetutils/inetutils-" version ".tar.gz")) + (patches (search-patches "inetutils-hurd.patch")) (sha256 (base32 - "0j1nb69bhg29cm4xkqqjh2ln1zqcj2lnpm92v638lpwrs11dypxl")))) + "05n65k4ixl85dc6rxc51b1b732gnmm8xnqi424dy9f1nz7ppb3xy")))) (build-system gnu-build-system) (arguments `(#:configure-flags '("--localstatedir=/var" diff --git a/gnu/packages/patches/inetutils-hurd.patch b/gnu/packages/patches/inetutils-hurd.patch new file mode 100644 index 0000000000..bd65c4feb1 --- /dev/null +++ b/gnu/packages/patches/inetutils-hurd.patch @@ -0,0 +1,583 @@ +Support compiling on the Hurd. + +Taken from https://git.hadrons.org/cgit/debian/pkgs/inetutils.git/tree/debian/patches/0002-ifconfig-Improve-the-support-for-GNU-Hurd.patch + +From 9a90d9b9119906df23cb2db1503cb0f099942dd9 Mon Sep 17 00:00:00 2001 +From: Mats Erik Andersson +Date: Sat, 18 Jul 2015 01:12:41 +0200 +Subject: [PATCH 02/35] ifconfig: Improve the support for GNU/Hurd. + +Use system specific code instead of generic code. +This provides abilities similar to other systems. +--- + ChangeLog | 17 +++ + ifconfig/system.c | 10 +- + ifconfig/system.h | 2 + + ifconfig/system/Makefile.am | 4 +- + ifconfig/system/generic.c | 14 +- + ifconfig/system/hurd.c | 292 ++++++++++++++++++++++++++++++++++++ + ifconfig/system/hurd.h | 50 ++++++ + 7 files changed, 381 insertions(+), 8 deletions(-) + create mode 100644 ifconfig/system/hurd.c + create mode 100644 ifconfig/system/hurd.h + +diff --git a/ifconfig/system.c b/ifconfig/system.c +index 30677e41..e108dc2e 100644 +--- a/ifconfig/system.c ++++ b/ifconfig/system.c +@@ -25,10 +25,12 @@ + # include "system/solaris.c" + #elif defined __QNX__ + # include "system/qnx.c" +-# elif defined __DragonFly__ || defined __FreeBSD__ || \ +- defined __FreeBSD_kernel__ || \ +- defined __NetBSD__ || defined __OpenBSD__ +-# include "system/bsd.c" ++#elif defined __DragonFly__ || defined __FreeBSD__ || \ ++ defined __FreeBSD_kernel__ || \ ++ defined __NetBSD__ || defined __OpenBSD__ ++# include "system/bsd.c" ++#elif defined __GNU__ ++# include "system/hurd.c" + #else + # include "system/generic.c" + #endif +diff --git a/ifconfig/system.h b/ifconfig/system.h +index 8521ad95..66878d3a 100644 +--- a/ifconfig/system.h ++++ b/ifconfig/system.h +@@ -97,6 +97,8 @@ extern struct if_nameindex* (*system_if_nameindex) (void); + defined __FreeBSD_kernel__ || \ + defined __NetBSD__ || defined __OpenBSD__ + # include "system/bsd.h" ++# elif defined __GNU__ ++# include "system/hurd.h" + # else + # include "system/generic.h" + # endif +diff --git a/ifconfig/system/Makefile.am b/ifconfig/system/Makefile.am +index 954c6774..62a9f1c4 100644 +--- a/ifconfig/system/Makefile.am ++++ b/ifconfig/system/Makefile.am +@@ -26,8 +26,10 @@ noinst_HEADERS = \ + linux.h \ + solaris.h \ + qnx.h \ ++ hurd.h \ + bsd.c \ + generic.c \ + linux.c \ + solaris.c \ +- qnx.c ++ qnx.c \ ++ hurd.c +diff --git a/ifconfig/system/generic.c b/ifconfig/system/generic.c +index 9a2bda55..20a78bde 100644 +--- a/ifconfig/system/generic.c ++++ b/ifconfig/system/generic.c +@@ -22,6 +22,8 @@ + #include + + #include "../ifconfig.h" ++ ++#include + + + /* Output format stuff. */ +@@ -36,19 +38,25 @@ const char *system_help; + struct argp_child system_argp_child; + + int +-system_parse_opt (struct ifconfig **ifp, char option, char *optarg) ++system_parse_opt (struct ifconfig **ifp _GL_UNUSED_PARAMETER, ++ char option _GL_UNUSED_PARAMETER, ++ char *optarg _GL_UNUSED_PARAMETER) + { + return 0; + } + + int +-system_parse_opt_rest (struct ifconfig **ifp, int argc, char *argv[]) ++system_parse_opt_rest (struct ifconfig **ifp _GL_UNUSED_PARAMETER, ++ int argc _GL_UNUSED_PARAMETER, ++ char *argv[] _GL_UNUSED_PARAMETER) + { + return 0; + } + + int +-system_configure (int sfd, struct ifreq *ifr, struct system_ifconfig *ifs) ++system_configure (int sfd _GL_UNUSED_PARAMETER, ++ struct ifreq *ifr _GL_UNUSED_PARAMETER, ++ struct system_ifconfig *ifs _GL_UNUSED_PARAMETER) + { + return 0; + } +diff --git a/ifconfig/system/hurd.c b/ifconfig/system/hurd.c +new file mode 100644 +index 00000000..3bd19775 +--- /dev/null ++++ b/ifconfig/system/hurd.c +@@ -0,0 +1,292 @@ ++/* hurd.c -- Code for ifconfig specific to GNU/Hurd. ++ Copyright (C) 2015 Free Software Foundation, Inc. ++ ++ This file is part of GNU Inetutils. ++ ++ GNU Inetutils is free software: you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation, either version 3 of the License, or (at ++ your option) any later version. ++ ++ GNU Inetutils is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see `http://www.gnu.org/licenses/'. */ ++ ++/* Mostly written by Marcus Brinkmann. ++ Adaptions to GNU/Hurd by Mats Erik Andersson. */ ++ ++#include ++ ++#include ++#include ++#include ++#include "../ifconfig.h" ++ ++#include ++ ++ ++/* Output format stuff. */ ++ ++const char *system_default_format = "gnu"; ++ ++ ++/* Argument parsing stuff. */ ++ ++const char *system_help = "NAME [ADDR]\ ++ [broadcast BRDADDR] [netmask MASK]\ ++ [mtu N] [up|down] [FLAGS]"; ++ ++struct argp_child system_argp_child; ++ ++int ++system_parse_opt (struct ifconfig **ifp _GL_UNUSED_PARAMETER, ++ char option _GL_UNUSED_PARAMETER, ++ char *optarg _GL_UNUSED_PARAMETER) ++{ ++ return 0; ++} ++ ++int ++system_parse_opt_rest (struct ifconfig **ifp, int argc, char *argv[]) ++{ ++ int i = 0, mask, rev; ++ enum { ++ EXPECT_NOTHING, ++ EXPECT_AF, ++ EXPECT_BROADCAST, ++ EXPECT_NETMASK, ++ EXPECT_METRIC, ++ EXPECT_MTU ++ } expect = EXPECT_AF; ++ ++ *ifp = parse_opt_new_ifs (argv[0]); ++ ++ while (++i < argc) ++ { ++ switch (expect) ++ { ++ case EXPECT_BROADCAST: ++ parse_opt_set_brdaddr (*ifp, argv[i]); ++ break; ++ ++ case EXPECT_NETMASK: ++ parse_opt_set_netmask (*ifp, argv[i]); ++ break; ++ ++ case EXPECT_MTU: ++ parse_opt_set_mtu (*ifp, argv[i]); ++ break; ++ ++ /* XXX: 2015-07-18, GNU/Hurd does not yet support ++ ioctl(SIOCSIFMETRIC), but we let the code ++ handle this standard ability anyway! ++ */ ++ case EXPECT_METRIC: ++ parse_opt_set_metric (*ifp, argv[i]); ++ break; ++ ++ case EXPECT_AF: ++ expect = EXPECT_NOTHING; ++ if (!strcmp (argv[i], "inet")) ++ continue; ++ else if (!strcmp (argv[i], "inet6")) ++ { ++ error (0, 0, "%s is not a supported address family", argv[i]); ++ return 0; ++ } ++ break; ++ ++ case EXPECT_NOTHING: ++ break; ++ } ++ ++ if (expect != EXPECT_NOTHING) ++ expect = EXPECT_NOTHING; ++ else if (!strcmp (argv[i], "broadcast")) ++ expect = EXPECT_BROADCAST; ++ else if (!strcmp (argv[i], "netmask")) ++ expect = EXPECT_NETMASK; ++ else if (!strcmp (argv[i], "metric")) ++ expect = EXPECT_METRIC; ++ else if (!strcmp (argv[i], "mtu")) ++ expect = EXPECT_MTU; ++ else if (!strcmp (argv[i], "up")) ++ parse_opt_set_flag (*ifp, IFF_UP | IFF_RUNNING, 0); ++ else if (!strcmp (argv[i], "down")) ++ parse_opt_set_flag (*ifp, IFF_UP, 1); ++ else if (((mask = if_nameztoflag (argv[i], &rev)) ++ & ~IU_IFF_CANTCHANGE) != 0) ++ parse_opt_set_flag (*ifp, mask, rev); ++ else ++ { ++ if (!((*ifp)->valid & IF_VALID_ADDR)) ++ parse_opt_set_address (*ifp, argv[i]); ++ else if (!((*ifp)->valid & IF_VALID_DSTADDR)) ++ parse_opt_set_dstaddr (*ifp, argv[i]); ++ } ++ } ++ ++ switch (expect) ++ { ++ case EXPECT_BROADCAST: ++ error (0, 0, "option `broadcast' requires an argument"); ++ break; ++ ++ case EXPECT_NETMASK: ++ error (0, 0, "option `netmask' requires an argument"); ++ break; ++ ++ case EXPECT_METRIC: ++ error (0, 0, "option `metric' requires an argument"); ++ break; ++ ++ case EXPECT_MTU: ++ error (0, 0, "option `mtu' requires an argument"); ++ break; ++ ++ case EXPECT_AF: ++ case EXPECT_NOTHING: ++ return 1; ++ } ++ ++ return 0; ++} ++ ++int ++system_configure (int sfd _GL_UNUSED_PARAMETER, ++ struct ifreq *ifr _GL_UNUSED_PARAMETER, ++ struct system_ifconfig *ifs _GL_UNUSED_PARAMETER) ++{ ++ return 0; ++} ++ ++struct if_nameindex* (*system_if_nameindex) (void) = if_nameindex; ++ ++static void ++print_hwaddr_ether (format_data_t form _GL_UNUSED_PARAMETER, ++ unsigned char *data) ++{ ++ *column += printf ("%02X:%02X:%02X:%02X:%02X:%02X", ++ data[0], data[1], data[2], data[3], data[4], data[5]); ++ had_output = 1; ++} ++ ++struct arphrd_symbol ++{ ++ const char *name; ++ const char *title; ++ int value; ++ void (*print_hwaddr) (format_data_t form, unsigned char *data); ++} arphrd_symbols[] = ++ { ++#ifdef ARPHRD_ETHER /* Ethernet 10/100Mbps. */ ++ { "ETHER", "Ethernet", ARPHRD_ETHER, print_hwaddr_ether}, ++#endif ++#ifdef ARPHRD_LOOPBACK /* Loopback device. */ ++ { "LOOPBACK", "Local Loopback", ARPHRD_LOOPBACK, NULL}, ++#endif ++ /* XXX: The image debian-hurd-20150424 returns the value 4 ++ instead of expected ARPHRD_LOOPBACK. This has been ++ discussed in the list debian-hurd, where I was asked ++ to resist the temptation of a work around! ++ */ ++ { NULL, NULL, 0, NULL} ++ }; ++ ++struct arphrd_symbol * ++arphrd_findvalue (int value) ++{ ++ struct arphrd_symbol *arp = arphrd_symbols; ++ while (arp->name != NULL) ++ { ++ if (arp->value == value) ++ break; ++ arp++; ++ } ++ if (arp->name) ++ return arp; ++ else ++ return NULL; ++} ++ ++void ++system_fh_hwaddr_query (format_data_t form, int argc, char *argv[]) ++{ ++#ifdef SIOCGIFHWADDR ++ struct arphrd_symbol *arp; ++ ++ if (ioctl (form->sfd, SIOCGIFHWADDR, form->ifr) < 0) ++ select_arg (form, argc, argv, 1); ++ ++ arp = arphrd_findvalue (form->ifr->ifr_hwaddr.sa_family); ++ select_arg (form, argc, argv, (arp && arp->print_hwaddr) ? 0 : 1); ++#else ++ select_arg (form, argc, argv, 1); ++#endif ++} ++ ++void ++system_fh_hwaddr (format_data_t form, int argc _GL_UNUSED_PARAMETER, ++ char *argv[] _GL_UNUSED_PARAMETER) ++{ ++#ifdef SIOCGIFHWADDR ++ if (ioctl (form->sfd, SIOCGIFHWADDR, form->ifr) < 0) ++ error (EXIT_FAILURE, errno, ++ "SIOCGIFHWADDR failed for interface `%s'", ++ form->ifr->ifr_name); ++ else ++ { ++ struct arphrd_symbol *arp; ++ ++ arp = arphrd_findvalue (form->ifr->ifr_hwaddr.sa_family); ++ if (arp && arp->print_hwaddr) ++ arp->print_hwaddr (form, ++ (unsigned char *) form->ifr->ifr_hwaddr.sa_data); ++ else ++ put_string (form, "(hwaddr unknown)"); ++ } ++#else ++ *column += printf ("(not available)"); ++ had_output = 1; ++#endif ++} ++ ++void ++system_fh_hwtype_query (format_data_t form, int argc, char *argv[]) ++{ ++#ifdef SIOCGIFHWADDR ++ if (ioctl (form->sfd, SIOCGIFHWADDR, form->ifr) >= 0) ++ select_arg (form, argc, argv, 0); ++ else ++#endif ++ select_arg (form, argc, argv, 1); ++} ++ ++void ++system_fh_hwtype (format_data_t form, int argc _GL_UNUSED_PARAMETER, ++ char *argv[] _GL_UNUSED_PARAMETER) ++{ ++#ifdef SIOCGIFHWADDR ++ if (ioctl (form->sfd, SIOCGIFHWADDR, form->ifr) < 0) ++ error (EXIT_FAILURE, errno, ++ "SIOCGIFHWADDR failed for interface `%s'", ++ form->ifr->ifr_name); ++ else ++ { ++ struct arphrd_symbol *arp; ++ ++ arp = arphrd_findvalue (form->ifr->ifr_hwaddr.sa_family); ++ if (arp) ++ put_string (form, arp->title); ++ else ++ put_string (form, "(hwtype unknown)"); ++ } ++#else ++ *column += printf ("(not available)"); ++ had_output = 1; ++#endif ++} +diff --git a/ifconfig/system/hurd.h b/ifconfig/system/hurd.h +new file mode 100644 +index 00000000..bab14565 +--- /dev/null ++++ b/ifconfig/system/hurd.h +@@ -0,0 +1,50 @@ ++/* ++ Copyright (C) 2015 Free Software Foundation, Inc. ++ ++ This file is part of GNU Inetutils. ++ ++ GNU Inetutils is free software: you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation, either version 3 of the License, or (at ++ your option) any later version. ++ ++ GNU Inetutils is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see `http://www.gnu.org/licenses/'. */ ++ ++/* Written by Mats Erik Andersson. */ ++ ++#ifndef IFCONFIG_SYSTEM_HURD_H ++# define IFCONFIG_SYSTEM_HURD_H ++ ++# include "../printif.h" ++# include "../options.h" ++ ++ ++/* Option support. */ ++ ++struct system_ifconfig ++{ ++ int valid; ++}; ++ ++ ++/* Output format support. */ ++ ++# define SYSTEM_FORMAT_HANDLER \ ++ { "hurd", fh_nothing}, \ ++ { "hwaddr?", system_fh_hwaddr_query}, \ ++ { "hwaddr", system_fh_hwaddr}, \ ++ { "hwtype?", system_fh_hwtype_query}, \ ++ { "hwtype", system_fh_hwtype}, ++ ++void system_fh_hwaddr_query (format_data_t form, int argc, char *argv[]); ++void system_fh_hwaddr (format_data_t form, int argc, char *argv[]); ++void system_fh_hwtype_query (format_data_t form, int argc, char *argv[]); ++void system_fh_hwtype (format_data_t form, int argc, char *argv[]); ++ ++#endif /* !IFCONFIG_SYSTEM_HURD_H */ +-- +2.23.0.rc1.170.gbd704faa3e + +From 589dab9c7d3119da82837dabae34c8a3d16cbe49 Mon Sep 17 00:00:00 2001 +From: Mats Erik Andersson +Date: Thu, 30 Jul 2015 01:06:42 +0200 +Subject: [PATCH 07/35] ifconfig: Hardware detection in GNU/Hurd. + +A work-around needed to distinguish hardware type. +--- + ChangeLog | 10 ++++++++++ + ifconfig/system/hurd.c | 19 ++++++++++++------- + 2 files changed, 22 insertions(+), 7 deletions(-) + +diff --git a/ifconfig/system/hurd.c b/ifconfig/system/hurd.c +index 3bd19775..b6261a00 100644 +--- a/ifconfig/system/hurd.c ++++ b/ifconfig/system/hurd.c +@@ -175,6 +175,16 @@ print_hwaddr_ether (format_data_t form _GL_UNUSED_PARAMETER, + had_output = 1; + } + ++/* GNU/Hurd and Mach are using a mixture of BSD definitions ++ * and GNU/Linux interface headers, which in this situation ++ * means that sa_family_t is an unsigned char, from BSD, while ++ * all ARPHRD_* come from GNU/Linux and are thus 16 bits wide. ++ * We must account for this. The following bitmask will ++ * adapt to any future change! ++ */ ++ ++#define _ARP_MASK ((sizeof (sa_family_t) == 1) ? 0xff : 0xffff) ++ + struct arphrd_symbol + { + const char *name; +@@ -184,16 +194,11 @@ struct arphrd_symbol + } arphrd_symbols[] = + { + #ifdef ARPHRD_ETHER /* Ethernet 10/100Mbps. */ +- { "ETHER", "Ethernet", ARPHRD_ETHER, print_hwaddr_ether}, ++ { "ETHER", "Ethernet", ARPHRD_ETHER & _ARP_MASK, print_hwaddr_ether}, + #endif + #ifdef ARPHRD_LOOPBACK /* Loopback device. */ +- { "LOOPBACK", "Local Loopback", ARPHRD_LOOPBACK, NULL}, ++ { "LOOPBACK", "Local Loopback", ARPHRD_LOOPBACK & _ARP_MASK, NULL}, + #endif +- /* XXX: The image debian-hurd-20150424 returns the value 4 +- instead of expected ARPHRD_LOOPBACK. This has been +- discussed in the list debian-hurd, where I was asked +- to resist the temptation of a work around! +- */ + { NULL, NULL, 0, NULL} + }; + +-- +2.23.0.rc1.170.gbd704faa3e + +From d379784b4461d17b2536effd1b52bae21cd28a32 Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Fri, 16 Aug 2019 00:34:03 +0200 +Subject: [PATCH 35/35] telnet: Several ioctls have been disabled in the Hurd's + glibc + +But not the related option macros. inetutils uses those macros to decide +whether the ioctls are available, so it is FTBFS now. The Hurd's glibc +is being fixed, but we'll use this for now to get the builds going. +--- + telnet/sys_bsd.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/telnet/sys_bsd.c b/telnet/sys_bsd.c +index 662536ab..5eb35cb5 100644 +--- a/telnet/sys_bsd.c ++++ b/telnet/sys_bsd.c +@@ -63,6 +63,7 @@ + #include + #include + #include ++#include + #include + + #include "ring.h" +@@ -157,7 +158,7 @@ TerminalRead (char *buf, int n) + int + TerminalAutoFlush (void) + { +-#if defined LNOFLSH ++#if defined TIOCLGET && defined LNOFLSH + int flush; + + ioctl (0, TIOCLGET, (char *) &flush); +@@ -260,7 +261,9 @@ TerminalSaveState (void) + ioctl (0, TIOCGETP, (char *) &ottyb); + ioctl (0, TIOCGETC, (char *) &otc); + ioctl (0, TIOCGLTC, (char *) &oltc); ++#ifdef TIOCLGET + ioctl (0, TIOCLGET, (char *) &olmode); ++#endif + + ntc = otc; + nltc = oltc; +@@ -755,7 +758,9 @@ TerminalNewMode (register int f) + #endif + } + #ifndef USE_TERMIO ++#ifdef TIOCLSET + ioctl (tin, TIOCLSET, (char *) &lmode); ++#endif + ioctl (tin, TIOCSLTC, (char *) <c); + ioctl (tin, TIOCSETC, (char *) &tc); + ioctl (tin, TIOCSETN, (char *) &sb); +-- +2.23.0.rc1.170.gbd704faa3e + -- cgit v1.2.3