From 4f47cb101cef7cf7e73e289cd6182086dc511a15 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Tue, 20 Dec 2016 18:59:47 -0500 Subject: [PATCH] dpkg: Update from 1.18.15 to 1.18.18 This allows dropping of local patches tolerating symlink size to differ between st_size and strlen(readlink()) which is now upstream. --- packages/dpkg/build.sh | 4 ++-- packages/dpkg/src-archives.c.patch | 29 ++++------------------------- packages/dpkg/src-configure.c.patch | 11 ----------- 3 files changed, 6 insertions(+), 38 deletions(-) diff --git a/packages/dpkg/build.sh b/packages/dpkg/build.sh index b4971a160..60a4a2ab6 100755 --- a/packages/dpkg/build.sh +++ b/packages/dpkg/build.sh @@ -1,8 +1,8 @@ TERMUX_PKG_HOMEPAGE=https://packages.debian.org/dpkg TERMUX_PKG_DESCRIPTION="Debian package management system" -TERMUX_PKG_VERSION=1.18.15 +TERMUX_PKG_VERSION=1.18.18 TERMUX_PKG_SRCURL=https://mirrors.kernel.org/debian/pool/main/d/dpkg/dpkg_${TERMUX_PKG_VERSION}.tar.xz -TERMUX_PKG_SHA256=aee936653b9c39403160c0a331ee7934563fbfa4e1f5adbc14a289c803cda371 +TERMUX_PKG_SHA256=c88b61e3d4660500753142689e8ddbeff1c731f29549f3338e6975f655936ff5 TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-dselect --disable-shared --disable-start-stop-daemon --disable-largefile --disable-update-alternatives --host=${TERMUX_ARCH}-linux --without-selinux dpkg_cv_c99_snprintf=yes ac_cv_lib_selinux_setexecfilecon=no HAVE_SETEXECFILECON_FALSE=#" TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --without-libbz2" TERMUX_PKG_RM_AFTER_INSTALL="lib/perl5 share/perl5 lib/dpkg/parsechangelog bin/dpkg-architecture bin/dpkg-buildflags bin/dpkg-buildpackage bin/dpkg-checkbuilddeps bin/dpkg-distaddfile bin/dpkg-genchanges bin/dpkg-gencontrol bin/dpkg-gensymbols bin/dpkg-maintscript-helper bin/dpkg-mergechangelogs bin/dpkg-name bin/dpkg-parsechangelog bin/dpkg-scanpackages bin/dpkg-scansources bin/dpkg-shlibdeps bin/dpkg-source bin/dpkg-statoverride bin/dpkg-vendor share/man/man1/dpkg-architecture.1 share/man/man1/dpkg-buildflags.1 share/man/man1/dpkg-buildpackage.1 share/man/man1/dpkg-checkbuilddeps.1 share/man/man1/dpkg-distaddfile.1 share/man/man1/dpkg-genchanges.1 share/man/man1/dpkg-gencontrol.1 share/man/man1/dpkg-gensymbols.1 share/man/man1/dpkg-maintscript-helper.1 share/man/man1/dpkg-mergechangelogs.1 share/man/man1/dpkg-name.1 share/man/man1/dpkg-parsechangelog.1 share/man/man1/dpkg-scanpackages.1 share/man/man1/dpkg-scansources.1 share/man/man1/dpkg-shlibdeps.1 share/man/man1/dpkg-source.1 share/man/man1/dpkg-vendor.1 share/man/man8/dpkg-statoverride.8 share/man/man3" diff --git a/packages/dpkg/src-archives.c.patch b/packages/dpkg/src-archives.c.patch index e0860fba9..61304265b 100644 --- a/packages/dpkg/src-archives.c.patch +++ b/packages/dpkg/src-archives.c.patch @@ -1,6 +1,6 @@ -diff -u -r ../dpkg-1.18.15/src/archives.c ./src/archives.c ---- ../dpkg-1.18.15/src/archives.c 2016-11-11 22:18:40.000000000 -0500 -+++ ./src/archives.c 2016-12-03 16:28:53.922977673 -0500 +diff -u -r ../dpkg-1.18.18/src/archives.c ./src/archives.c +--- ../dpkg-1.18.18/src/archives.c 2016-12-17 13:46:21.000000000 -0500 ++++ ./src/archives.c 2016-12-20 18:44:57.276098093 -0500 @@ -393,8 +393,10 @@ namenode->statoverride->uid, namenode->statoverride->gid, @@ -28,28 +28,7 @@ diff -u -r ../dpkg-1.18.15/src/archives.c ./src/archives.c if (chmod(path, st->mode & ~S_IFMT)) ohshite(_("error setting permissions of '%.255s'"), path); } -@@ -546,7 +552,9 @@ - linksize = readlink(fn_old, linkname, stab->st_size + 1); - if (linksize < 0) - ohshite(_("unable to read link '%.255s'"), fn_old); -- else if (linksize != stab->st_size) -+ else if (linksize > stab->st_size) -+ /* Termux patch: In some cases st_size is too large, ignore that. -+ See https://github.com/corbinlc/GNURootDebian/issues/103 */ - ohshit(_("symbolic link '%.250s' size has changed from %jd to %zd"), - fn_old, (intmax_t)stab->st_size, linksize); - linkname[linksize] = '\0'; -@@ -1033,19 +1041,28 @@ - r = readlink(fnamevb.buf, symlinkfn.buf, symlinkfn.size); - if (r < 0) - ohshite(_("unable to read link '%.255s'"), ti->name); -- else if (r != stab.st_size) -+ else if (r > stab.st_size) -+ /* Termux patch: In some cases st_size is too large, ignore that. -+ See https://github.com/corbinlc/GNURootDebian/issues/103 */ - ohshit(_("symbolic link '%.250s' size has changed from %jd to %zd"), - fnamevb.buf, (intmax_t)stab.st_size, r); - varbuf_trunc(&symlinkfn, r); +@@ -1046,12 +1052,19 @@ varbuf_end_str(&symlinkfn); if (symlink(symlinkfn.buf,fnametmpvb.buf)) ohshite(_("unable to make backup symlink for '%.255s'"), ti->name); diff --git a/packages/dpkg/src-configure.c.patch b/packages/dpkg/src-configure.c.patch index d1f18f0fd..3b3f2fdba 100644 --- a/packages/dpkg/src-configure.c.patch +++ b/packages/dpkg/src-configure.c.patch @@ -14,14 +14,3 @@ diff -u -r ../dpkg-1.18.15/src/configure.c ./src/configure.c pkg_name(pkg, pnaw_nonambig), cdr.buf, cdr2.buf, strerror(errno)); /* Fall through. */ -@@ -757,7 +759,9 @@ - pkg_name(pkg, pnaw_nonambig), in, - result->buf, strerror(errno)); - return -1; -- } else if (r != stab.st_size) { -+ } else if (r > stab.st_size) { -+ /* Termux patch: In some cases st_size is too large, ignore that. -+ See https://github.com/corbinlc/GNURootDebian/issues/103 */ - warning(_("symbolic link '%.250s' size has " - "changed from %jd to %zd"), - result->buf, (intmax_t)stab.st_size, r);