]> git.proxmox.com Git - tar.git/commitdiff
initial import stable-3
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 18 Feb 2014 06:14:55 +0000 (07:14 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 18 Feb 2014 06:14:55 +0000 (07:14 +0100)
Makefile [new file with mode: 0644]
README [new file with mode: 0644]
changelog [new file with mode: 0644]
fix-sparse-archives.patch [new file with mode: 0644]
tar_1.27.1-1.debian.tar.xz [new file with mode: 0644]
tar_1.27.1.orig.tar.xz [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..1eed0d3
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,51 @@
+RELEASE=3.1
+
+# Note: compile as root fail, so you need to do that as unpriv. user
+
+TARVER=1.27.1
+DEBREL=1
+PVETARVER=${TARVER}+pve.1
+
+# also update changelog
+
+TARSRC=tar_${TARVER}.orig.tar.xz
+TARDEBSRC=tar_${TARVER}-${DEBREL}.debian.tar.xz
+TARDIR=tar-${TARVER}
+
+ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
+GITVERSION:=$(shell cat .git/refs/heads/master)
+SOURCETXT="git clone git://git.proxmox.com/git/tar.git\\ngit checkout ${GITVERSION}"
+
+DEB=tar_${PVETARVER}_${ARCH}.deb
+
+all: deb
+
+.PHONY: dinstall
+dinstall: deb
+       dpkg -i ${DEB}
+
+.PHONY: deb
+deb ${DEB}: ${TARSRC}
+       rm -rf ${TARDIR}
+       tar xf ${TARSRC}
+       cd ${TARDIR}; tar xf ../${TARDEBSRC}
+       echo "${SOURCETXT}" > ${TARDIR}/debian/SOURCE
+       echo "debian/SOURCE" >>${TARDIR}/debian/docs
+       mv ${TARDIR}/debian/changelog ${TARDIR}/debian/changelog.org
+       cat changelog ${TARDIR}/debian/changelog.org >${TARDIR}/debian/changelog
+       cd ${TARDIR}; patch -p1 <../fix-sparse-archives.patch
+       cd ${TARDIR}; dpkg-buildpackage -b -uc -us
+
+.PHONY: upload
+upload:
+       umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw 
+       mkdir -p /pve/${RELEASE}/extra
+       rm -rf /pve/${RELEASE}/extra/apt-transport-https_*.deb
+       rm -rf /pve/${RELEASE}/extra/Packages*
+       cp ${DEB} /pve/${RELEASE}/extra
+       cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
+       umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
+
+.PHONY: clean
+clean:
+       rm -rf *~ *_${ARCH}.deb *_all.deb *_${ARCH}.udeb *.changes *.dsc ${TARDIR}
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..c97efe5
--- /dev/null
+++ b/README
@@ -0,0 +1,4 @@
+We recompile tar ourselfs to fix bug:
+
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=737226
+
diff --git a/changelog b/changelog
new file mode 100644 (file)
index 0000000..581dcad
--- /dev/null
+++ b/changelog
@@ -0,0 +1,7 @@
+tar (1.27.1+pve.1) unstable; urgency=low
+
+  * fix Debian bug #737226: tar --sparse silently corrupts files on
+    filesystems where non-empty files may have zero blocks
+
+ -- Proxmox Support Team <support@proxmox.com>  Tue, 18 Feb 2014 06:57:44 +0100
+
diff --git a/fix-sparse-archives.patch b/fix-sparse-archives.patch
new file mode 100644 (file)
index 0000000..8ac6066
--- /dev/null
@@ -0,0 +1,18 @@
+See https://bugzilla.redhat.com/show_bug.cgi?id=1024268
+
+--- old/src/sparse.c   2013-03-14 16:18:10.000000000 -0400
++++ new/src/sparse.c   2013-10-28 16:50:20.966528811 -0400
+@@ -221,9 +221,13 @@ sparse_scan_file (struct tar_sparse_file
+   st->archive_file_size = 0;
++#if 0
++  /* this shortcut is not safe because some filesystems such as Netapp
++     can hold small files without allocating any blocks. */
+   if (ST_NBLOCKS (st->stat) == 0)
+     offset = st->stat.st_size;
+   else
++#endif
+     {
+       if (!tar_sparse_scan (file, scan_begin, NULL))
+       return false;
diff --git a/tar_1.27.1-1.debian.tar.xz b/tar_1.27.1-1.debian.tar.xz
new file mode 100644 (file)
index 0000000..292ae62
Binary files /dev/null and b/tar_1.27.1-1.debian.tar.xz differ
diff --git a/tar_1.27.1.orig.tar.xz b/tar_1.27.1.orig.tar.xz
new file mode 100644 (file)
index 0000000..749b7fc
Binary files /dev/null and b/tar_1.27.1.orig.tar.xz differ