[packages/libtar] - updated to 1.2.20 (from git repo) - removed obsolete shared,fix-memleak patches

qboosh qboosh at pld-linux.org
Wed Mar 2 12:06:12 CET 2016


commit 3f8487fbb6f55764b15b984eedaf7c8352a4300c
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Mar 2 12:09:43 2016 +0100

    - updated to 1.2.20 (from git repo)
    - removed obsolete shared,fix-memleak patches

 libtar-fix-memleak.patch |  69 -----------------
 libtar-shared.patch      | 188 -----------------------------------------------
 libtar.spec              |  40 +++++-----
 3 files changed, 20 insertions(+), 277 deletions(-)
---
diff --git a/libtar.spec b/libtar.spec
index ba5c027..168e5f2 100644
--- a/libtar.spec
+++ b/libtar.spec
@@ -1,16 +1,17 @@
 Summary:	C library for manipulating POSIX tar files
 Summary(pl.UTF-8):	Biblioteka C do manipulacji plikami tar zgodnymi z POSIX
 Name:		libtar
-Version:	1.2.11
-Release:	2
+Version:	1.2.20
+Release:	1
 License:	BSD
 Group:		Libraries
-Source0:	ftp://ftp.feep.net/pub/software/libtar/%{name}-%{version}.tar.gz
-# Source0-md5:	604238e8734ce6e25347a58c4f1a1d7e
-Patch0:		%{name}-shared.patch
-Patch1:		%{name}-fix-memleak.patch
-URL:		http://www.feep.net/libtar/
-BuildRequires:	autoconf
+#Source0:	ftp://ftp.feep.net/pub/software/libtar/%{name}-%{version}.tar.gz
+Source0:	http://http.debian.net/debian/pool/main/libt/libtar/%{name}_%{version}.orig.tar.gz
+# Source0-md5:	6ced95ab3a4b33fbfe2dfb231d156cdb
+# dead currently
+#URL:		http://www.feep.net/libtar/
+URL:		http://repo.or.cz/w/libtar.git/
+BuildRequires:	autoconf >= 2.61
 BuildRequires:	automake
 BuildRequires:	libtool
 BuildRequires:	zlib-devel
@@ -49,19 +50,14 @@ Static libtar library.
 Statyczna biblioteka libtar.
 
 %prep
-%setup -q
-%patch0 -p1
-%patch1 -p1
+%setup -q -n %{name}
 
 %build
-# ugly, but working solution
-cat %{_aclocaldir}/libtool.m4 >> autoconf/aclocal.m4
-cat %{_aclocaldir}/ltoptions.m4 >> autoconf/aclocal.m4
-cat %{_aclocaldir}/ltversion.m4 >> autoconf/aclocal.m4
-cat %{_aclocaldir}/ltsugar.m4 >> autoconf/aclocal.m4
-cp %{_datadir}/libtool/build-aux/config.{sub,guess} autoconf
 %{__libtoolize}
-%{__autoconf} -I autoconf
+%{__aclocal} -I autoconf
+%{__autoconf}
+%{__autoheader}
+%{__automake}
 %configure
 %{__make}
 
@@ -88,8 +84,12 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libtar.so
 %{_libdir}/libtar.la
-%{_includedir}/*.h
-%{_mandir}/man3/*.3*
+%{_includedir}/libtar.h
+%{_includedir}/libtar_listhash.h
+%{_mandir}/man3/TH_*.3*
+%{_mandir}/man3/libtar_*.3*
+%{_mandir}/man3/tar_*.3*
+%{_mandir}/man3/th_*.3*
 
 %files static
 %defattr(644,root,root,755)
diff --git a/libtar-fix-memleak.patch b/libtar-fix-memleak.patch
deleted file mode 100644
index 7fa75a0..0000000
--- a/libtar-fix-memleak.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-diff -urN libtar-1.2.11/lib/extract.c libtar-1.2.11.new/lib/extract.c
---- libtar-1.2.11/lib/extract.c	2003-03-03 00:58:07.000000000 +0100
-+++ libtar-1.2.11.new/lib/extract.c	2008-08-19 11:46:58.000000000 +0200
-@@ -21,6 +21,7 @@
- 
- #ifdef STDC_HEADERS
- # include <stdlib.h>
-+# include <string.h>
- #endif
- 
- #ifdef HAVE_UNISTD_H
-@@ -99,6 +100,7 @@
- {
- 	int i;
- 	linkname_t *lnp;
-+	char *pathname;
- 
- 	if (t->options & TAR_NOOVERWRITE)
- 	{
-@@ -140,12 +142,14 @@
- 	lnp = (linkname_t *)calloc(1, sizeof(linkname_t));
- 	if (lnp == NULL)
- 		return -1;
--	strlcpy(lnp->ln_save, th_get_pathname(t), sizeof(lnp->ln_save));
-+	pathname = th_get_pathname(t);
-+	strlcpy(lnp->ln_save, pathname, sizeof(lnp->ln_save));
- 	strlcpy(lnp->ln_real, realname, sizeof(lnp->ln_real));
- #ifdef DEBUG
- 	printf("tar_extract_file(): calling libtar_hash_add(): key=\"%s\", "
--	       "value=\"%s\"\n", th_get_pathname(t), realname);
-+	       "value=\"%s\"\n", pathname, realname);
- #endif
-+	free(pathname);
- 	if (libtar_hash_add(t->h, lnp) != 0)
- 		return -1;
- 
-diff -urN libtar-1.2.11/lib/output.c libtar-1.2.11.new/lib/output.c
---- libtar-1.2.11/lib/output.c	2003-01-07 02:41:00.000000000 +0100
-+++ libtar-1.2.11.new/lib/output.c	2008-08-19 11:46:58.000000000 +0200
-@@ -71,6 +71,7 @@
- 	char groupname[_POSIX_LOGIN_NAME_MAX];
- 	time_t mtime;
- 	struct tm *mtm;
-+	char *pathname;
- 
- #ifdef HAVE_STRFTIME
- 	char timebuf[18];
-@@ -114,7 +115,9 @@
- 	       mtm->tm_mday, mtm->tm_hour, mtm->tm_min, mtm->tm_year + 1900);
- #endif
- 
--	printf(" %s", th_get_pathname(t));
-+	pathname = th_get_pathname(t);
-+	printf(" %s", pathname);
-+	free(pathname);
- 
- 	if (TH_ISSYM(t) || TH_ISLNK(t))
- 	{
-diff -urN libtar-1.2.11/lib/wrapper.c libtar-1.2.11.new/lib/wrapper.c
---- libtar-1.2.11/lib/wrapper.c	2003-01-07 02:41:00.000000000 +0100
-+++ libtar-1.2.11.new/lib/wrapper.c	2008-08-19 11:46:58.000000000 +0200
-@@ -76,6 +76,7 @@
- 			snprintf(buf, sizeof(buf), "%s/%s", prefix, filename);
- 		else
- 			strlcpy(buf, filename, sizeof(buf));
-+		free(filename);
- #ifdef DEBUG
- 		printf("    tar_extract_all(): calling tar_extract_file(t, "
- 		       "\"%s\")\n", buf);
diff --git a/libtar-shared.patch b/libtar-shared.patch
deleted file mode 100644
index 7cea489..0000000
--- a/libtar-shared.patch
+++ /dev/null
@@ -1,188 +0,0 @@
-diff -urN libtar-1.2.11/configure.ac libtar-1.2.11.new/configure.ac
---- libtar-1.2.11/configure.ac	2003-03-03 01:13:37.000000000 +0100
-+++ libtar-1.2.11.new/configure.ac	2008-08-18 17:34:37.000000000 +0200
-@@ -27,7 +27,7 @@
- 
- dnl ### Check for compiler et al. ###################################
- AC_PROG_CC
--AC_PROG_RANLIB
-+AC_PROG_LIBTOOL
- AC_PROG_INSTALL
- AC_PROG_LN_S
- AC_PROG_MAKE_SET
-diff -urN libtar-1.2.11/lib/Makefile.in libtar-1.2.11.new/lib/Makefile.in
---- libtar-1.2.11/lib/Makefile.in	2002-12-15 19:02:30.000000000 +0100
-+++ libtar-1.2.11.new/lib/Makefile.in	2008-08-18 18:06:10.000000000 +0200
-@@ -3,6 +3,7 @@
- ### Path settings
- srcdir		= @srcdir@
- top_srcdir	= @top_srcdir@
-+top_builddir	= @top_builddir@
- prefix		= @prefix@
- exec_prefix	= @exec_prefix@
- bindir		= @bindir@
-@@ -23,6 +24,7 @@
- 
- ### Compiler and link options
- CC		= @CC@
-+LIBTOOL		= @LIBTOOL@
- CPPFLAGS	= -I. \
- 		  -I.. \
- 		  -I${srcdir} \
-@@ -32,7 +34,7 @@
- CFLAGS		= @CFLAGS@
- LDFLAGS		= @LDFLAGS@
- LIBS		= @LIBS@
--LIBOBJS		= @LIBOBJS@
-+LTLIBOBJS	= @LTLIBOBJS@
- RANLIB		= @RANLIB@
- @SET_MAKE@
- VPATH		= @srcdir@:@top_srcdir@/compat:../listhash
-@@ -40,24 +42,26 @@
- 
- ### Makefile rules - no user-servicable parts below
- 
--LIBTAR_OBJS	= append.o \
--		  block.o \
--		  decode.o \
--		  encode.o \
--		  extract.o \
--		  handle.o \
--		  libtar_hash.o \
--		  libtar_list.o \
--		  output.o \
--		  util.o \
--		  wrapper.o
-+LIBTAR_OBJS	= append.lo \
-+		  block.lo \
-+		  decode.lo \
-+		  encode.lo \
-+		  extract.lo \
-+		  handle.lo \
-+		  libtar_hash.lo \
-+		  libtar_list.lo \
-+		  output.lo \
-+		  util.lo \
-+		  wrapper.lo
- LIBTAR_HDRS	= ../config.h \
- 		  ${top_srcdir}/compat/compat.h \
- 		  ${srcdir}/libtar.h \
- 		  ${srcdir}/internal.h \
- 		  ../listhash/libtar_listhash.h
--LIBTAR_LIBS	= ./libtar.a
--ALL		= libtar.a
-+LIBTAR_LIBS	= ./libtar.la
-+ALL		= libtar.la
-+LDFLAGS		= @LDFLAGS@
-+CFLAGS		= @CFLAGS@
- 
- DISTCLEANFILES	= ../listhash/libtar_listhash.h \
- 		  ../listhash/libtar_list.c \
-@@ -68,24 +72,31 @@
- 
- .PHONY: clean distclean install
- 
--libtar.a: ${LIBTAR_OBJS} ${LIBOBJS}
--	${AR} rc libtar.a ${LIBTAR_OBJS} ${LIBOBJS}
--	${RANLIB} libtar.a
-+libtar.la: ${LIBTAR_OBJS} ${LTLIBOBJS}
-+	$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o libtar.la $(LIBTAR_OBJS) $(LTLIBOBJS) -rpath $(libdir)
-+#	${AR} rc libtar.a ${LIBTAR_OBJS} ${LIBOBJS}
-+#	${RANLIB} libtar.a
- 
- ${LIBTAR_OBJS}: ${LIBTAR_HDRS}
- 
--.c.o:
--	${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<
-+%.lo: $(srcdir)/%.c
-+	$(LIBTOOL) --mode=compile ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<
-+
-+%.lo: listhash/%.c
-+	$(LIBTOOL) --mode=compile ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<
-+
-+%.lo: compat/%.c
-+	$(LIBTOOL) --mode=compile ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<
- 
- clean:
--	rm -f *~ *.o ${ALL} core
-+	rm -rf *~ *.o $(LIBTAR_OBJS) ${ALL} core .libs $(LTLIBOBJS)
- 
- distclean: clean
- 	rm -f Makefile ${DISTCLEANFILES}
- 
- install: ${ALL}
- 	${MKDIR} ${DESTDIR}${libdir}
--	${INSTALL_DATA} libtar.a ${DESTDIR}${libdir}
-+	$(LIBTOOL) --mode=install ${INSTALL_DATA} libtar.la ${DESTDIR}${libdir}
- 	${MKDIR} ${DESTDIR}${includedir}
- 	${INSTALL_DATA} ${srcdir}/libtar.h ${DESTDIR}${includedir}
- 	${INSTALL_DATA} ../listhash/libtar_listhash.h ${DESTDIR}${includedir}
-diff -urN libtar-1.2.11/libtar/Makefile.in libtar-1.2.11.new/libtar/Makefile.in
---- libtar-1.2.11/libtar/Makefile.in	2002-12-15 19:02:30.000000000 +0100
-+++ libtar-1.2.11.new/libtar/Makefile.in	2008-08-18 18:04:36.000000000 +0200
-@@ -3,6 +3,7 @@
- ### Path settings
- srcdir		= @srcdir@
- top_srcdir	= @top_srcdir@
-+top_builddir	= @top_builddir@
- prefix		= @prefix@
- exec_prefix	= @exec_prefix@
- bindir		= @bindir@
-@@ -23,6 +24,7 @@
- 
- ### Compiler and link options
- CC		= @CC@
-+LIBTOOL		= @LIBTOOL@
- CPPFLAGS	= -I.. \
- 		  -I../lib \
- 		  -I../listhash \
-@@ -31,7 +33,7 @@
- 		  @CPPFLAGS@
- CFLAGS		= @CFLAGS@
- LDFLAGS		= @LDFLAGS@
--LIBS		= @LIBS@
-+LIBS		= @LIBS@ -ltar
- LIBOBJS		= @LIBOBJS@
- RANLIB		= @RANLIB@
- @SET_MAKE@
-@@ -40,12 +42,12 @@
- 
- ### Makefile rules - no user-servicable parts below
- 
--LIBTAR_OBJS	= libtar.o
-+LIBTAR_OBJS	= libtar.lo
- LIBTAR_HDRS	= ../config.h \
- 		  ${top_srcdir}/compat/compat.h \
- 		  ${top_srcdir}/lib/libtar.h \
- 		  ../listhash/libtar_listhash.h
--LIBTAR_LIBS	= ../lib/libtar.a
-+LIBTAR_LIBS	= $(top_builddir)/lib
- ALL		= libtar
- 
- 
-@@ -54,20 +56,20 @@
- .PHONY: clean distclean install
- 
- libtar: ${LIBTAR_OBJS} ${LIBTAR_LIBS} ${LIBTAR_HDRS}
--	${CC} ${CFLAGS} ${LDFLAGS} -o libtar libtar.o ${LIBTAR_LIBS} ${LIBS}
-+	$(LIBTOOL) --mode=link ${CC} ${CFLAGS} ${LDFLAGS} -o libtar $(LIBTAR_OBJS) -L${LIBTAR_LIBS} ${LIBS}
- 
- ${LIBTAR_OBJS}: ${LIBTAR_HDRS}
- 
--.c.o:
--	${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<
-+%.lo: %.c
-+	$(LIBTOOL) --mode=compile ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<
- 
- clean:
--	rm -f *~ *.o ${ALL} core
-+	rm -rf *~ *.o ${ALL} $(LIBTAR_OBJS) core .libs
- 
- distclean: clean
- 	rm -f Makefile
- 
- install: ${ALL}
- 	${MKDIR} ${DESTDIR}${bindir}
--	${INSTALL_PROGRAM} libtar ${DESTDIR}${bindir}
-+	$(LIBTOOL) --mode=install ${INSTALL_PROGRAM} libtar ${DESTDIR}${bindir}
- 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libtar.git/commitdiff/3f8487fbb6f55764b15b984eedaf7c8352a4300c



More information about the pld-cvs-commit mailing list