From f9b68503f7042e8698a1c282695c6aef4f463a20 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 31 2019 09:58:57 +0000 Subject: import pax-3.4-19.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..151f45f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/pax-3.4.tar.bz2 diff --git a/.pax.metadata b/.pax.metadata new file mode 100644 index 0000000..5a9a20a --- /dev/null +++ b/.pax.metadata @@ -0,0 +1 @@ +1bc05b2e1cd2d69e048e0e2b415b230d2c3ad08c SOURCES/pax-3.4.tar.bz2 diff --git a/SOURCES/pax-3.0-PATHMAX.patch b/SOURCES/pax-3.0-PATHMAX.patch new file mode 100644 index 0000000..43aaa0b --- /dev/null +++ b/SOURCES/pax-3.0-PATHMAX.patch @@ -0,0 +1,21 @@ +--- pax-3.0/src/pax.h.MAXPATH 2001-12-15 14:52:52.000000000 +0100 ++++ pax-3.0/src/pax.h 2004-10-08 11:10:50.673000632 +0200 +@@ -41,6 +41,7 @@ + /* + * BSD PAX global data structures and constants. + */ ++#include + + #define MAXBLK 64512 /* MAX blocksize supported (posix SPEC) */ + /* WARNING: increasing MAXBLK past 32256 */ +@@ -50,8 +51,8 @@ + /* Don't even think of changing this */ + #define DEVBLK 8192 /* default read blksize for devices */ + #define FILEBLK 10240 /* default read blksize for files */ +-#define PAXPATHLEN 3072 /* maximium path length for pax. MUST be */ +- /* longer than the system MAXPATHLEN */ ++#define PAXPATHLEN PATH_MAX /* maximium path length for pax. MUST be */ ++ /* longer than the system MAXPATHLEN */ + + /* + * Pax modes of operation diff --git a/SOURCES/pax-3.4-abs100.patch b/SOURCES/pax-3.4-abs100.patch new file mode 100644 index 0000000..53584f0 --- /dev/null +++ b/SOURCES/pax-3.4-abs100.patch @@ -0,0 +1,17 @@ +--- pax-3.4/src/tar.c.abs100 2005-08-01 18:17:58.000000000 +0200 ++++ pax-3.4/src/tar.c 2007-06-20 10:44:54.000000000 +0200 +@@ -1181,6 +1181,14 @@ name_split (name, len) + * prefix we can find) + */ + start = name + len - TNMSZ; ++ /* if filename is absolute and exactly TNMSZ in length, ++ * before we invoke the strict interpretation of /str below, we ++ * check to see if there is another slash further along which ++ * would allow a safe split. if this search fails then we hit ++ * the end of the string and fail in a similar manner ++ */ ++ if((start == name) && (*start == '/')) ++ ++start; + while ((*start != '\0') && (*start != '/')) + ++start; + diff --git a/SOURCES/pax-3.4-manpage.patch b/SOURCES/pax-3.4-manpage.patch new file mode 100644 index 0000000..ba5a06c --- /dev/null +++ b/SOURCES/pax-3.4-manpage.patch @@ -0,0 +1,160 @@ +diff --git a/src/pax.1 b/src/pax.1 +index cd85bb0..6320bcc 100644 +--- a/src/pax.1 ++++ b/src/pax.1 +@@ -38,10 +38,10 @@ + .Dt PAX 1 + .Os + .Sh NAME +-.Nm pax +-.Nd read and write file archives and copy directory hierarchies ++.Nm opax ++.Nd read and write file archives and copy directory hierarchies (OpenBSD \fIpax\fR implementation) + .Sh SYNOPSIS +-.Nm pax ++.Nm + .Op Fl 0cdOnvz + .Bk -words + .Op Fl f Ar archive +@@ -67,7 +67,7 @@ + .Ar ... + .Ek + .Op Ar pattern ... +-.Nm pax ++.Nm + .Fl r + .Op Fl cdiknuvzDOYZ + .Bk -words +@@ -103,7 +103,7 @@ + .Ar ... + .Ek + .Op Ar pattern ... +-.Nm pax ++.Nm + .Fl w + .Op Fl 0dituvzHLOPX + .Bk -words +@@ -145,7 +145,7 @@ + .Ar ... + .Ek + .Op Ar file ... +-.Nm pax ++.Nm + .Fl r + .Fl w + .Op Fl 0diklntuvDHLOPXYZ +@@ -647,7 +647,7 @@ are not selected and will be skipped. + Reset the access times of any file or directory read or accessed by + .Nm + to be the same as they were before being read or accessed by +-.Nm pax . ++.Nm . + .It Fl u + Ignore files that are older (having a less recent file modification time) + than a pre-existing file or archive member with the same name. +@@ -733,7 +733,7 @@ and is repaired. + The old BSD tar format as found in BSD4.3. + The default blocksize for this format is 10240 bytes. + Pathnames stored by this format must be 100 characters or less in length +-(including the trailing \0 character, which means that filenames can have ++(including the trailing \0 character, which means that filenames can have + a maximum length of 99 characters). + Only + .Em regular +@@ -753,9 +753,9 @@ The extended tar interchange format specified in the + standard. + The default blocksize for this format is 10240 bytes. + Filenames stored by this format must be 100 characters or less in length +-(including the trailing \0 character, which means that filenames can have ++(including the trailing \0 character, which means that filenames can have + a maximum length of 99 characters). +-Pathnames (directorynames + filenames) stored by this format must be ++Pathnames (directorynames + filenames) stored by this format must be + 250 characters or less in length. + .El + .Pp +@@ -1081,26 +1081,34 @@ than the file to which it is compared. + Path in which to store temporary files. + .El + .Sh EXAMPLES +-.Li $ pax -w -f /dev/rst0 \&. ++.Li $ ++.Nm ++-w -f /dev/rst0 \&. + .Pp + Copies the contents of the current directory to the device + .Pa /dev/rst0 . + .Pp +-.Li $ pax -v -f filename ++.Li $ ++.Nm ++-v -f filename + .Pp + Gives the verbose table of contents for an archive stored in + .Pa filename . + .Pp + .Li $ mkdir newdir ; + .Li cd olddir ; +-.Li pax -rw \&. newdir ++.Li ++.Nm ++-rw \&. newdir + .Pp + This sequence of commands will copy the entire + .Pa olddir + directory hierarchy to + .Pa newdir . + .Pp +-.Li $ pax -r -s ',^//*usr//*,,' -f a.pax ++.Li $ ++.Nm ++-r -s ',^//*usr//*,,' -f a.pax + .Pp + Reads the archive + .Pa a.pax , +@@ -1108,13 +1116,17 @@ with all files rooted in + .Pa /usr + into the archive extracted relative to the current directory. + .Pp +-.Li $ pax -rw -i \&. dest_dir ++.Li $ ++.Nm ++-rw -i \&. dest_dir + .Pp + Can be used to interactively select the files to copy from the current + directory to + .Pa dest_dir . + .Pp +-.Li $ pax -r -pe -U root -G bin -f a.pax ++.Li $ ++.Nm ++-r -pe -U root -G bin -f a.pax + .Pp + Extract all files from the archive + .Pa a.pax +@@ -1124,7 +1136,9 @@ with group + .Em bin + and preserve all file permissions. + .Pp +-.Li "$ pax -r -w -v -Y -Z home /backup" ++.Li "$ ++.Nm ++-r -w -v -Y -Z home /backup" + .Pp + Update (and list) only those files in the destination directory + .Pa /backup +@@ -1177,8 +1191,13 @@ and when + .Nm + completes it will exit with a non-zero exit status. + .Sh SEE ALSO ++.Xr spax 1 , ++.Xr tar 1 , ++.Xr bsdtar 1 , ++.Xr star 1 , + .Xr cpio 1 , +-.Xr tar 1 ++.Xr bsdcpio 1 , ++.Xr scpio 1 + .Sh STANDARDS + The + .Nm diff --git a/SOURCES/pax-3.4-rdtruncate.patch b/SOURCES/pax-3.4-rdtruncate.patch new file mode 100644 index 0000000..abd0e42 --- /dev/null +++ b/SOURCES/pax-3.4-rdtruncate.patch @@ -0,0 +1,11 @@ +--- pax-3.4/src/tar.c.rdtruncate 2007-07-13 15:33:05.000000000 +0200 ++++ pax-3.4/src/tar.c 2007-07-13 15:34:23.000000000 +0200 +@@ -821,7 +821,7 @@ ustar_rd (ARCHD *arcn, char *buf) + if (gnu_hack_string) + { + arcn->nlen = cnt + strlcpy (dest, gnu_hack_string, +- MIN(TNMSZ+1, sizeof (arcn->name) - cnt)); ++ sizeof (arcn->name) - cnt); + free(gnu_hack_string); + gnu_hack_string = NULL; + } else diff --git a/SOURCES/pax-gcc46.patch b/SOURCES/pax-gcc46.patch new file mode 100644 index 0000000..da4f550 --- /dev/null +++ b/SOURCES/pax-gcc46.patch @@ -0,0 +1,18 @@ +diff -urNp pax-3.4-orig/lib/fts.c pax-3.4/lib/fts.c +--- pax-3.4-orig/lib/fts.c 2005-07-29 09:55:25.000000000 +0200 ++++ pax-3.4/lib/fts.c 2011-06-29 14:50:05.256431237 +0200 +@@ -465,12 +465,8 @@ name: t = sp->fts_path + NAPPEND(p->fts + */ + /* ARGSUSED */ + int +-fts_set(sp, p, instr) +- FTS *sp; +- FTSENT *p; +- int instr; ++fts_set(FTS *sp __attribute__ ((__unused__)), FTSENT *p, int instr) + { +-sp = NULL; /* stop compiler whinging */ + if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW && + instr != FTS_NOINSTR && instr != FTS_SKIP) { + errno = EINVAL; +Binary files pax-3.4-orig/lib/.fts.c.swp and pax-3.4/lib/.fts.c.swp differ diff --git a/SPECS/pax.spec b/SPECS/pax.spec new file mode 100644 index 0000000..f25d90e --- /dev/null +++ b/SPECS/pax.spec @@ -0,0 +1,216 @@ +%global ALTERNATIVES %{_sbindir}/alternatives + +Summary: POSIX File System Archiver +Name: pax +Version: 3.4 +Release: 19%{?dist} +License: BSD +Group: Applications/Archiving +Source: ftp://ftp.suse.com/pub/people/kukuk/pax/%{name}-%{version}.tar.bz2 +URL: ftp://ftp.suse.com/pub/people/kukuk/pax/ +#use Linux PATH_MAX (4092) for maximum PATHLENGTH instead of pax default 3072 +Patch0: pax-3.0-PATHMAX.patch +#fix bug with archiving files of filename length exactly 100 chars +Patch1: pax-3.4-abs100.patch +#do not truncate names when extracting +Patch2: pax-3.4-rdtruncate.patch +#do not fail with gcc-4.6+ +Patch3: pax-gcc46.patch + +# manpage edits - s/pax/opax/, add cross references +Patch4: pax-3.4-manpage.patch + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +Requires(post): %{ALTERNATIVES} +Requires(preun): %{ALTERNATIVES} + +%description +The 'pax' utility is the POSIX standard archive tool. It supports the two most +common forms of standard Unix archive (backup) files - CPIO and TAR. + +# "desired" alternative constants +%global ALT_NAME pax +%global ALT_LINK %{_bindir}/pax +%global ALT_SL1_NAME pax-man +%global ALT_SL1_LINK %{_mandir}/man1/pax.1.gz + +# "local" alternative constants ("opax" - OpenBSD pax) +%global ALT_PATH %{_bindir}/opax +%global ALT_SL1_PATH %{_mandir}/man1/opax.1.gz + +# helpers for alternatives +%global ALT_MAN_ORIG %{_mandir}/man1/pax.1 +%global ALT_MAN_NEW %{_mandir}/man1/opax.1 + +%prep +%setup -q +%patch0 -p1 -b .PATHMAX +%patch1 -p1 -b .abs100 +%patch2 -p1 -b .rdtruncate +%patch3 -p1 -b .gcc46 +%patch4 -p1 -b .manpage + +%build +%configure +make %{?_smp_mflags} + +%install +rm -rf %{buildroot} +make DESTDIR=%{buildroot} install +mv %{buildroot}%{ALT_LINK} %{buildroot}%{ALT_PATH} +mv %{buildroot}%{ALT_MAN_ORIG} %{buildroot}%{ALT_MAN_NEW} +ln -s %{ALT_PATH} %{buildroot}%{ALT_LINK} +ln -s %{ALT_MAN_NEW} %{buildroot}%{ALT_MAN_ORIG} + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc ABOUT-NLS AUTHORS ChangeLog COPYING NEWS README THANKS +%{ALT_PATH} +%doc %{ALT_SL1_PATH} +%ghost %verify(not md5 size mode mtime) %{ALT_LINK} +%ghost %verify(not md5 size mode mtime) %{ALT_SL1_LINK} + +%post +# We need to remove old /usr/bin/pax binary because the following +# 'update-alternatives' step does not do it itself. We may remove this once we +# are sure that pax >= 3.4-16 is installed on the system. +test -f %{ALT_LINK} && test ! -h %{ALT_LINK} && rm -rf %{ALT_LINK} + +%{ALTERNATIVES} \ + --install %{ALT_LINK} %{ALT_NAME} %{ALT_PATH} 33 \ + --slave %{ALT_SL1_LINK} %{ALT_SL1_NAME} %{ALT_SL1_PATH} \ + +%preun +if [ $1 -eq 0 ]; then + # only on pure uninstall (not upgrade) + %{ALTERNATIVES} --remove %{ALT_NAME} %{ALT_PATH} +fi + +%changelog +* Fri Jan 24 2014 Daniel Mach - 3.4-19 +- Mass rebuild 2014-01-24 + +* Fri Dec 27 2013 Daniel Mach - 3.4-18 +- Mass rebuild 2013-12-27 + +* Thu Jun 06 2013 Pavel Raiskup - 3.4-17 +- remove old %%{_bindir}/pax binary if existent during update + +* Wed May 15 2013 Pavel Raiskup - 3.4-16 +- setup the 'alternatives' template (#929349) + +* Thu Feb 14 2013 Fedora Release Engineering - 3.4-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Fri Jul 20 2012 Fedora Release Engineering - 3.4-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 13 2012 Fedora Release Engineering - 3.4-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Jun 29 2011 Ondrej Vasik - 3.4-12 +- fix FTBFS with gcc4.6+ - (#715754) + +* Tue Feb 08 2011 Fedora Release Engineering - 3.4-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sat Jul 25 2009 Fedora Release Engineering - 3.4-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Thu Feb 26 2009 Fedora Release Engineering - 3.4-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Mon Jan 19 2009 Ondrej Vasik - 3.4-8 +- Merge review #226235: fix use of %%makeinstall as well + +* Mon Jan 19 2009 Ondrej Vasik - 3.4-7 +- Merge review #226235: do ship doc files, + do comment patches, use better buildroot and + defaults for attributes, allow parallel builds + +* Fri Aug 29 2008 Ondrej Vasik - 3.4-6 +- removed duplicate Source0 + +* Tue Feb 19 2008 Fedora Release Engineering - 3.4-5 +- Autorebuild for GCC 4.3 + +* Wed Aug 29 2007 Fedora Release Engineering - 3.4-4 +- Rebuild for selinux ppc32 issue. + +* Mon Jul 16 2007 Radek Brich - 3.4-3 +- do not truncate file names when extracting (#205324) + +* Wed Jun 20 2007 Radek Brich - 3.4-2 +- applied patch for #239000 (pax fails creation of ustar + if an absolute name is exactly 100 characters long) + +* Wed Jul 12 2006 Jesse Keating - 3.4-1.2.2 +- rebuild + +* Fri Feb 10 2006 Jesse Keating - 3.4-1.2.1 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 3.4-1.2 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Mon Aug 15 2005 Peter Vrabec 3.4-1 +- upgrade 3.4 + +* Fri Mar 18 2005 Peter Vrabec 3.0-11 +- rebuilt + +* Thu Oct 21 2004 Peter Vrabec +- fix PAXPATHLEN (#132857) + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Wed Jan 22 2003 Tim Powers +- rebuilt + +* Thu Dec 12 2002 Tim Powers 3.0-5 +- rebuild on all arches + +* Wed Jul 03 2002 Karsten Hopp +- fix documentation (#63671) + +* Fri Jun 21 2002 Tim Powers +- automated rebuild + +* Thu May 23 2002 Tim Powers +- automated rebuild + +* Tue Mar 5 2002 Matt Wilson +- pull PAX source tarball from the SuSE package (which is based off + this one yet claims copyright on the spec file) + +* Sun Jun 24 2001 Elliot Lee +- Bump release + rebuild. + +* Fri Feb 23 2001 Jakub Jelinek +- make it build under glibc 2.2.2 + +* Wed Jul 12 2000 Prospector +- automatic rebuild + +* Fri Jun 30 2000 Preston Brown +- debian version, which is a port from OpenBSD's latest. + +* Tue Jun 13 2000 Preston Brown +- FHS paths + +* Tue May 30 2000 Preston Brown +- adopted for Winston. +