unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: <notmuch@notmuchmail.org>
Subject: test: (gnu) tar(1) portability
Date: Sat, 11 Jan 2014 12:46:03 +0200	[thread overview]
Message-ID: <m2mwj2aj9w.fsf@guru.guru-group.fi> (raw)

Hi

Currently performance-test requires GNU tar and the uprgrade test
in progress will (in it's current form) require it too.

From portability point of view these tests will work only on Linux
by default -- BSD/Mac OS X have libarchive based tar(1) and other
systems something less capable (no -z option, for example).

From the test point of view we can expect people to install GNU tar
(somewhere) in for their systems but should we provide less "intrusive"
way for having the GNU tar available.

Options:

1) Do nothing, and expect testers to have GNU tar in PATH available
   before any other tar. For example /usr/local/bin/tar could be GNU tar
   and that is put before /bin:/usr/bin in path.

2) Change calls to 'tar' to format ${GNU_TAR:-tar} so testers can set 
   environment variable GNU_TAR to the name/path of gnu tar when running
   tests (like GNU_TAR=/usr/local/bin/gtar make test or GNU_TAR=gtar ...)

3) Check whether 'gtar' is in system and use that. if not use tar:

   # opportunistically check whether 'gtar' is in system and use that if it is
   if hash gtar >/dev/null
   then TAR=gtar
   else TAR=tar
   fi

   and then replate tar with ${TAR} ($ & {} to emphasize the variable usage)
   in the test code.

   Interestingly Fedora 20 installs both /usr/bin/gtar & /usr/bin/tar.
   In one wheezy system I saw only tar. I tried to JFGI 'gnu tar installation'
   but I could not find references to 'gtar' there.

If installing gtar is widespread I'd use option 3. If not, option 2.
It may be that we end up using option 1 ;/

Tomi

             reply	other threads:[~2014-01-11 10:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-11 10:46 Tomi Ollila [this message]
2014-01-11 16:04 ` test: (gnu) tar(1) portability David Bremner
2014-01-19 13:58   ` Tomi Ollila

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://notmuchmail.org/

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

  git send-email \
    --in-reply-to=m2mwj2aj9w.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=notmuch@notmuchmail.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.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

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).