aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Alex Elsayed <eternaleye@gmail.com> 2012-06-01 22:20:36 -0700
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2012-06-02 22:01:27 +0100
commita3bb614a9fe39b0cbc597197e7428f70a6b99e8c (patch)
tree4ce2fbe7b7dde4b17ac13a7a236d85ce7c8dcefc
parentd4661a13032a90c7be9a03b5c9ad11845f8cc2f6 (diff)
downloadpaludis-a3bb614a9fe39b0cbc597197e7428f70a6b99e8c.tar.gz
paludis-a3bb614a9fe39b0cbc597197e7428f70a6b99e8c.tar.xz
docs, configure.ac: libarchive[>=3.0]
Version 3.0 of libarchive fixes both xattr issues and GNU tar support, so we now hard-dep on it. As a result, we can rip out the code for creating paxballs. However, we'll keep unpaxinate and the other machinery for extracting them so as not to break old pbins.
-rw-r--r--configure.ac28
-rw-r--r--doc/overview/pbins.html.part19
-rw-r--r--paludis/repositories/e/e_repository.cc4
-rw-r--r--paludis/tar_extras.cc4
4 files changed, 6 insertions, 49 deletions
diff --git a/configure.ac b/configure.ac
index dd361a5..1b891f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1692,31 +1692,11 @@ dnl }}}
dnl {{{ libarchive
libarchive_does_gnutar=no
if test "x$need_libarchive_check" = "xyes" ; then
- AC_MSG_CHECKING([for libarchive])
- AC_PREPROC_IFELSE([AC_LANG_SOURCE([
-#include <archive.h>
- ])],
- [AC_MSG_RESULT([yes])],
- [AC_MSG_ERROR([libarchive is required for pbins])])
-
- AC_MSG_CHECKING([whether your libarchive does gnutar])
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-#include <archive.h>
-
-int main(int, char **)
-{
- struct archive * archive;
- archive_write_set_format_gnutar(archive);
-}
- ])],
- [
- AC_MSG_RESULT([yes])
- libarchive_does_gnutar=yes
- AC_DEFINE([LIBARCHIVE_DOES_GNUTAR], [1], [libarchive does gnutar])
- ],
- [AC_MSG_RESULT([no])])
+ PKG_CHECK_MODULES(
+ LIBARCHIVE, [libarchive >= 3.0.4],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_ERROR([libarchive >= 3.0.4 is required for pbins])])
fi
-AM_CONDITIONAL([LIBARCHIVE_DOES_GNUTAR], test "x$libarchive_does_gnutar" = "xyes")
dnl }}}
dnl {{{ sqlite3 check
diff --git a/doc/overview/pbins.html.part b/doc/overview/pbins.html.part
index af54817..66b19fb 100644
--- a/doc/overview/pbins.html.part
+++ b/doc/overview/pbins.html.part
@@ -38,23 +38,8 @@ in binaries only being used when necessary or explicitly requested.</p>
<h2>Notes on <code>libarchive</code></h2>
-<p>We use <a href="http://code.google.com/p/libarchive/">libarchive</a> to create binary packages. At the time of
-writing (libarchive 2.8.4), this is causing a number of issues (but not as many as using anything else would do...). In
-particular:</p>
-
-<ul>
- <li>It is strongly recommended that <strong>libarchive be built without support for extended attributes
- (xattrs)</strong>. Some users have found that binary packages cannot be created when extended attribute support
- is enabled (error messages like <code>archive_read_disk_entry_from_file failed</code>).</li>
-
- <li>Current releases of libarchive do not support GNU's tar extensions (although svn master does). However, without
- extensions, tar is effectively useless. Thus, if the version of libarchive installed when Paludis is built does not
- have GNU tar support, we use POSIX pax format when creating tarballs, and we use the <code>.pax</code> extension
- rather than <code>.tar</code> to make this clear. Unfortunately, <strong>GNU tar doesn't particularly like PAX
- tarballs</strong>, and will moan like crazy and not properly extract files built this way. Thus, if you intend
- to extract pbin tarballs by hand (e.g. to rescue a completely broken system), you must either use OpenBSD's
- <code>pax</code> to do the extracting, or use a libarchive release that does not yet exist.</li>
-</ul>
+<p>We use <a href="http://code.google.com/p/libarchive/">libarchive</a> to create binary packages, and require version
+3.0.4 or greater.</p>
<h2>Creating Binary Repositories</h2>
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index 94a3ebc..2b7a16a 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -136,11 +136,7 @@ typedef std::map<FSPath, std::string, FSPathComparator> EAPIForFileMap;
namespace
{
-#ifdef LIBARCHIVE_DOES_GNUTAR
const std::string pbin_tar_extension = ".tar";
-#else
- const std::string pbin_tar_extension = ".pax";
-#endif
std::shared_ptr<FSPathSequence> get_master_locations(
const std::shared_ptr<const ERepositorySequence> & r)
diff --git a/paludis/tar_extras.cc b/paludis/tar_extras.cc
index b3fbb6d..239504a 100644
--- a/paludis/tar_extras.cc
+++ b/paludis/tar_extras.cc
@@ -50,11 +50,7 @@ paludis_tar_extras_init(const std::string & f, const std::string & compress)
else
archive_write_set_compression_none(extras->archive);
-#ifdef LIBARCHIVE_DOES_GNUTAR
archive_write_set_format_gnutar(extras->archive);
-#else
- archive_write_set_format_pax(extras->archive);
-#endif
if (ARCHIVE_OK != archive_write_open_filename(extras->archive, f.c_str()))
throw MergerError("archive_write_open_filename failed");