Accepting request 155302 from Archiving

- Use %libname macro to be consistent throughout the spec file

- Update to version 3.1.1:
  + Fix an issue with the soname versioning in builds of libarchive
    using cmake
- Removed patchs; fixed and merged on upstream release:
  * libarchive-fix-checks.patch
  * libarchive-ppc64.patch
- The soname has changed and pass to 13.

OBS-URL: https://build.opensuse.org/request/show/155302
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libarchive?expand=0&rev=10
This commit is contained in:
Stephan Kulow 2013-02-13 13:38:43 +00:00 committed by Git OBS Bridge
commit bb6fa271c6
7 changed files with 31 additions and 102 deletions

View File

@ -1 +1 @@
libarchive12 libarchive13

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:76e8d7c7b100ec4071e48c1b7d3f3ea1d22b39db3e45b7189f75b5ff4df90fac
size 3632806

3
libarchive-3.1.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4968f9a3f2405ec7e07d5f6e78b36f21bceee6196df0a795165f89774bbbc6d8
size 4260090

View File

@ -1,58 +0,0 @@
From da8ac32da9e5ee4a27674de4442e24c26cb2aa6a Mon Sep 17 00:00:00 2001
From: Dan McGee <dan@archlinux.org>
Date: Tue, 27 Mar 2012 17:22:40 -0500
Subject: [PATCH] Fixes for GCC 4.7.0
Fixes the following compile error exposed with GCC 4.7.0:
libarchive/archive_string.c: In function 'cesu8_to_unicode':
libarchive/archive_string.c:2450:11: error: 'wc' may be used uninitialized in this function [-Werror=uninitialized]
cc1: all warnings being treated as errors
As well as a test failure that depends on signed integer wraparound,
which is a very bad thing to do in C [1]. Mark the intermediate result
as volatile to prevent the compiler optimizing away the arithmetic and
the logical test.
[1] http://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Signed-Overflow-Examples.html
---
libarchive/archive_string.c | 3 ++-
libarchive/test/test_read_format_mtree.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libarchive/archive_string.c b/libarchive/archive_string.c
index 2728a37..2b56a48 100644
--- a/libarchive/archive_string.c
+++ b/libarchive/archive_string.c
@@ -2447,11 +2447,12 @@ struct archive_string_conv *
static int
cesu8_to_unicode(uint32_t *pwc, const char *s, size_t n)
{
- uint32_t wc, wc2;
+ uint32_t wc = 0;
int cnt;
cnt = _utf8_to_unicode(&wc, s, n);
if (cnt == 3 && IS_HIGH_SURROGATE_LA(wc)) {
+ uint32_t wc2 = 0;
if (n - 3 < 3) {
/* Invalid byte sequence. */
goto invalid_sequence;
diff --git a/libarchive/test/test_read_format_mtree.c b/libarchive/test/test_read_format_mtree.c
index 0d86bd4..a5d7feb 100644
--- a/libarchive/test/test_read_format_mtree.c
+++ b/libarchive/test/test_read_format_mtree.c
@@ -37,7 +37,8 @@
* without relying on overflow. This assumes that long long
* is at least 64 bits. */
static const long long max_int64 = ((((long long)1) << 62) - 1) + (((long long)1) << 62);
- time_t min_time, t;
+ time_t min_time;
+ volatile time_t t;
extract_reference_file(reffile);
--
1.7.10

View File

@ -1,26 +0,0 @@
Index: libarchive-3.0.4/libarchive/archive_read_disk_entry_from_file.c
===================================================================
--- libarchive-3.0.4.orig/libarchive/archive_read_disk_entry_from_file.c
+++ libarchive-3.0.4/libarchive/archive_read_disk_entry_from_file.c
@@ -197,7 +197,7 @@ archive_read_disk_entry_from_file(struct
fd = open(path, O_RDONLY | O_NONBLOCK);
}
if (fd >= 0) {
- unsigned long stflags;
+ int stflags;
r = ioctl(fd, EXT2_IOC_GETFLAGS, &stflags);
if (r == 0 && stflags != 0)
archive_entry_set_fflags(entry, stflags, 0);
Index: libarchive-3.0.4/libarchive/archive_read_disk_posix.c
===================================================================
--- libarchive-3.0.4.orig/libarchive/archive_read_disk_posix.c
+++ libarchive-3.0.4/libarchive/archive_read_disk_posix.c
@@ -984,7 +984,7 @@ next_entry(struct archive_read_disk *a,
#elif defined(EXT2_IOC_GETFLAGS) && defined(EXT2_NODUMP_FL) &&\
defined(HAVE_WORKING_EXT2_IOC_GETFLAGS)
if (S_ISREG(st->st_mode) || S_ISDIR(st->st_mode)) {
- unsigned long stflags;
+ int stflags;
t->entry_fd = open_on_current_dir(t,
tree_current_access_path(t), O_RDONLY | O_NONBLOCK);

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Wed Feb 13 08:05:35 UTC 2013 - werner@suse.de
- Use %libname macro to be consistent throughout the spec file
-------------------------------------------------------------------
Tue Feb 5 18:48:08 UTC 2013 - p.drouand@gmail.com
- Update to version 3.1.1:
+ Fix an issue with the soname versioning in builds of libarchive
using cmake
- Removed patchs; fixed and merged on upstream release:
* libarchive-fix-checks.patch
* libarchive-ppc64.patch
- The soname has changed and pass to 13.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Aug 23 08:30:05 UTC 2012 - dvaleev@suse.com Thu Aug 23 08:30:05 UTC 2012 - dvaleev@suse.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package libarchive # spec file for package libarchive
# #
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,8 +16,11 @@
# #
%define somajor 13
%define libname libarchive%{somajor}
Name: libarchive Name: libarchive
Version: 3.0.4 Version: 3.1.1
Release: 0 Release: 0
BuildRequires: libacl-devel BuildRequires: libacl-devel
BuildRequires: pkg-config BuildRequires: pkg-config
@ -34,10 +37,6 @@ Group: Productivity/Archiving/Compression
Url: http://libarchive.github.com/ Url: http://libarchive.github.com/
Source0: http://libarchive.googlecode.com/files/libarchive-%{version}.tar.gz Source0: http://libarchive.googlecode.com/files/libarchive-%{version}.tar.gz
Source1: baselibs.conf Source1: baselibs.conf
# PATCH-FIX-UPSTREAM libarchive-fix-checks.patch dimstar@opensuse.org -- Fix GCC 4.7 side effects. Taken from upstream.
Patch0: libarchive-fix-checks.patch
# PATCH-FIX-UPSTREAM libarchive-ppc64.patch dvaleev@suse.com -- fix tests failing on ppc64
Patch1: libarchive-ppc64.patch
%description %description
Libarchive is a programming library that can create and read several Libarchive is a programming library that can create and read several
@ -57,11 +56,11 @@ Group: Productivity/Archiving/Compression
%description -n bsdtar %description -n bsdtar
This package contains the bsdtar cmdline utility. This package contains the bsdtar cmdline utility.
%package -n libarchive12 %package -n %{libname}
Summary: Library to work with several different streaming archive formats Summary: Library to work with several different streaming archive formats
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
%description -n libarchive12 %description -n %{libname}
Libarchive is a programming library that can create and read several Libarchive is a programming library that can create and read several
different streaming archive formats, including most popular tar different streaming archive formats, including most popular tar
variants and several cpio formats. It can also write shar archives and variants and several cpio formats. It can also write shar archives and
@ -115,8 +114,8 @@ I/O. It should be very easy to add new formats, new compression
methods, or new ways of reading/writing archives. methods, or new ways of reading/writing archives.
%package -n libarchive-devel %package -n libarchive-devel
Requires: %{libname} = %{version}
Requires: libacl-devel Requires: libacl-devel
Requires: libarchive12 = %{version}
Requires: libbz2-devel Requires: libbz2-devel
Requires: zlib-devel Requires: zlib-devel
Summary: Development files for libarchive Summary: Development files for libarchive
@ -135,8 +134,6 @@ This package contains the development files.
%prep %prep
%setup -q %setup -q
%patch0 -p1
%patch1 -p1
%build %build
%global optflags %{optflags} -D_REENTRANT -pipe %global optflags %{optflags} -D_REENTRANT -pipe
@ -151,9 +148,9 @@ make check
find %{buildroot} -name '*.la' -type f -delete -print find %{buildroot} -name '*.la' -type f -delete -print
rm "%{buildroot}%{_mandir}/man5/"{tar,cpio,mtree}.5* rm "%{buildroot}%{_mandir}/man5/"{tar,cpio,mtree}.5*
%post -n libarchive12 -p /sbin/ldconfig %post -n %{libname} -p /sbin/ldconfig
%postun -n libarchive12 -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig
%files -n bsdtar %files -n bsdtar
%defattr(-,root,root) %defattr(-,root,root)
@ -162,7 +159,7 @@ rm "%{buildroot}%{_mandir}/man5/"{tar,cpio,mtree}.5*
%{_mandir}/man1/* %{_mandir}/man1/*
%{_mandir}/man5/* %{_mandir}/man5/*
%files -n libarchive12 %files -n %{libname}
%defattr(-,root,root) %defattr(-,root,root)
%doc COPYING NEWS README %doc COPYING NEWS README
%{_libdir}/libarchive.so.* %{_libdir}/libarchive.so.*