bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Simon Josefsson via Gnulib discussion list <bug-gnulib@gnu.org>
To: bug-gnulib@gnu.org
Subject: cmp/diff
Date: Sat, 26 Dec 2020 17:24:43 +0100	[thread overview]
Message-ID: <878s9k8rhw.fsf@latte.josefsson.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 2087 bytes --]

Hi!  I have noticed self-check failures of libidn on ArchLinux:

https://gitlab.com/libidn/libidn/-/jobs/932649011

The gnulib self-tests that fail are: test-binary-io.sh test-perror.sh
test-init.sh

https://gitlab.com/libidn/libidn/-/jobs/932649011/artifacts/file/libidn-1.36a/b/gltests/test-binary-io.sh.log
https://gitlab.com/libidn/libidn/-/jobs/932649011/artifacts/file/libidn-1.36a/b/gltests/test-perror.sh.log
https://gitlab.com/libidn/libidn/-/jobs/932649011/artifacts/file/libidn-1.36a/b/gltests/test-init.sh.log

Essentialy it boils down to:

../../gltests/test-binary-io.sh: line 8: cmp: command not found
test-init.sh: failed test: err not empty: ../../gltests/init.sh: line 648: cmp: command not found
../../gltests/test-perror.sh: line 14: diff: command not found

I was a little surprised ArchLinux do not have cmp/diff by default, but
I was surprised that nothing except these gnulib tests failed.

I am reading gnulib's DEPENDENCIES which says:

  * The comparison utilities 'cmp' and 'diff'.
    + Mandatory. Using the platform's native utilities gives good portability
      exposure, but you can also use GNU diffutils.
    + Homepage:
      https://www.gnu.org/software/diffutils/

I read the DEPENDENCIES file a bit more careful after noticing that it
has several mandatory dependencies that I find questionable, and I
noticed this in the beginning:

  The following packages are needed by maintainers for using
  'gnulib-tool'.

It doesn't say the packages are required for users building gnulib-based
packages.  I can live with having diffutils installed as a maintainer.
Was this subtle distinction intentional?

I sympathize with ArchLinux's decision to be minimal, so my preference
is to make things work when it appears to be so simple.

What do you think about rewriting these self-tests to avoid cmp/diff?

Does anyone know a good portable shell-based idiom for comparing files
instead of using cmp/diff?

I'm posting this instead of just fixing the self-tests because I have a
suspicion this has been discussed, and maybe it is time to revisit it.

/Simon

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

             reply	other threads:[~2020-12-26 16:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-26 16:24 Simon Josefsson via Gnulib discussion list [this message]
2020-12-26 17:32 ` cmp/diff Bruno Haible
2020-12-26 18:34   ` cmp/diff Simon Josefsson via Gnulib discussion list
2020-12-26 18:49     ` cmp/diff Bruno Haible
2020-12-26 19:12       ` cmp/diff Paul Eggert
2020-12-26 21:55         ` cmp/diff Simon Josefsson via Gnulib discussion list
2020-12-26 23:12           ` cmp/diff Paul Eggert
2020-12-27  0:07             ` cmp/diff Alfred M. Szmidt
2020-12-27  0:23               ` cmp/diff Paul Eggert
2020-12-27  1:05                 ` cmp/diff Alfred M. Szmidt
2020-12-27  0:07             ` cmp/diff Alfred M. Szmidt
2020-12-27  0:43             ` egrep, fgrep, and install-info Bruno Haible
2020-12-27  1:12               ` Alfred M. Szmidt
2020-12-26 19:31       ` cmp/diff Paul Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878s9k8rhw.fsf@latte.josefsson.org \
    --to=bug-gnulib@gnu.org \
    --cc=simon@josefsson.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).