commit:     fe65acb50b89ceb40ef5e8087738c43386a71aa6
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Tue May  9 16:55:24 2017 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Tue May  9 16:56:02 2017 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=fe65acb5

sys-apps/portage: import upstream patch

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 sys-apps/portage/Manifest                 |  2 +-
 sys-apps/portage/files/2.3.5-loff_t.patch | 79 +++++++++++++++++++++++++++----
 2 files changed, 70 insertions(+), 11 deletions(-)

diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
index 285f379..e43af65 100644
--- a/sys-apps/portage/Manifest
+++ b/sys-apps/portage/Manifest
@@ -1,4 +1,4 @@
-AUX 2.3.5-loff_t.patch 476 SHA256 
147dbc5d8265da02019294748de91039d184a6a6b46b7d1414be52bfa75f37c0 SHA512 
d64dcc80e4747251c58b2f01eabb020894550ba69d8c3e7d8513ecb6a0f6d7e3ff4d4670532d0fa8ff9d887e3935ba3cb85c60d0bffb2ec016491165cbb31bb1
 WHIRLPOOL 
cd3b2c16afef5d32b3bc5ec170efab5249f35e0da394c7c5b3d591e8ca69d791a8f7e6f3227d87ec31427e10b4de043ae19c59565549fd91cfd0412e063849a6
+AUX 2.3.5-loff_t.patch 2569 SHA256 
709f0374f9f88cc89f379356ae8bffc6560e240f2157ccab367d0ebc2e523438 SHA512 
e944be00cd7bca618202a5f3084624eb110a02edc5d5cac44603c7a9c16132305b13e916578bfd06f6792c978cc78c60282823fc162df7120032c9239880e21f
 WHIRLPOOL 
dd638c53a1ecf36b7501bed36eccb8099f581d6a5b4c061015e40dd34cbd4bb58af3c14c18bfcab76a762813b365d5e80e8d298d230a0d29fe7a741449158cb2
 AUX README.RESCUE 137 SHA256 
69bea0c755eab59b6b4d90838b8551744f0b0c8eeac170b1cd13a71ee83f9ac4 SHA512 
dba0f0d6d4cd140e636cc70dfb7bdb298e2f2fb040bc07b0874cac994bdbabd26bfd9361d85a0f8b9a92a185281e4901606b9e4f563afdc8867341bbe6af1cb0
 WHIRLPOOL 
713fcc790442999d56e13efaf536fec9954dadeda680b3642d0358311332096ddedf8b55697bd1ca620d84f0dc7d025ff7931e086c74c1f5032be72dca2ff8f5
 DIST portage-2.3.5.tar.bz2 933047 SHA256 
9b3282eee8f7f5728a4a71864d6b34315d71d43c52b2b650cf0d8f412c871941 SHA512 
c403578caf40d97e8081c203d433b515cb2fdb14cb8b7d2652ed664bd079e65db32b54ce12ff495af6dd5fb468c5a1ef58d335e202ede5355d115049e21a6a35
 WHIRLPOOL 
25dbb6547d6488cebc1baf093a600e2034e17558306fd55f5502346330a78012e32d3c49dcf0445664c69d4e3e6b2580762417324ccd0bf3aa08575245165a24
 EBUILD portage-2.3.5.ebuild 8633 SHA256 
2e353b0fbb3e9e06a84af2f236e85b4e9fe4e204ca22bcb93ff74c367db487f8 SHA512 
0fa9d646f5e0e80990b31e9c39fe4b994efdec13530b610da22046eaa6023224dc6f7bec27865d478eb440389632e99a60a8d4f3f9c8eea9d114b2ee1b04f704
 WHIRLPOOL 
302ad07d96b58b5730ef868079137e184de1428b650182dfb45847a9712023aaa6fa844b77b5cec0c1a8b796c55ffef9e4634a8be57cd1578427427d6b7cc6de

diff --git a/sys-apps/portage/files/2.3.5-loff_t.patch 
b/sys-apps/portage/files/2.3.5-loff_t.patch
index 448c312..95a3b86 100644
--- a/sys-apps/portage/files/2.3.5-loff_t.patch
+++ b/sys-apps/portage/files/2.3.5-loff_t.patch
@@ -1,11 +1,70 @@
-diff -Naur portage-2.3.5.orig/src/portage_util_file_copy_reflink_linux.c 
portage-2.3.5/src/portage_util_file_copy_reflink_linux.c
---- portage-2.3.5.orig/src/portage_util_file_copy_reflink_linux.c      
2017-03-17 17:34:29.300177738 -0700
-+++ portage-2.3.5/src/portage_util_file_copy_reflink_linux.c   2017-03-17 
17:35:26.802723400 -0700
-@@ -4,6 +4,7 @@
+From 1a7aeb58c4e687e4d4012054b56373f27941a067 Mon Sep 17 00:00:00 2001
+From: Zac Medico <[email protected]>
+Date: Sun, 7 May 2017 16:32:19 -0700
+Subject: [PATCH] file_copy: replace loff_t with off_t for portability (bug
+ 617778)
+
+The loff_t type is a GNU extension, so use the portable off_t
+type instead. Also, enable Large File Support macros in setup.py,
+for 64-bit offsets.
+
+Reported-by: Patrick Steinhardt <[email protected]>
+X-Gentoo-bug: 617778
+X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=617778
+Acked-by: Anthony G. Basile <[email protected]>
+Acked-by: Brian Dolbec <[email protected]>
+---
+ setup.py                                   | 5 ++++-
+ src/portage_util_file_copy_reflink_linux.c | 6 +++---
+ 2 files changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index e993177..1ba6f87 100755
+--- a/setup.py
++++ b/setup.py
+@@ -676,7 +676,10 @@ setup(
+               ['$sysconfdir/portage/repo.postsync.d', 
['cnf/repo.postsync.d/example']],
+       ],
  
- #include <Python.h>
- #include <errno.h>
-+#include <fcntl.h>
- #include <stdlib.h>
- #include <ctype.h>
- #include <sys/sendfile.h>
+-      ext_modules = [Extension(name=n, sources=m) for n, m in 
x_c_helpers.items()],
++      ext_modules = [Extension(name=n, sources=m,
++              extra_compile_args=['-D_FILE_OFFSET_BITS=64',
++              '-D_LARGEFILE_SOURCE', '-D_LARGEFILE64_SOURCE'])
++              for n, m in x_c_helpers.items()],
+ 
+       cmdclass = {
+               'build': x_build,
+diff --git a/src/portage_util_file_copy_reflink_linux.c 
b/src/portage_util_file_copy_reflink_linux.c
+index b031d96..2fb17a0 100644
+--- a/src/portage_util_file_copy_reflink_linux.c
++++ b/src/portage_util_file_copy_reflink_linux.c
+@@ -66,7 +66,7 @@ initreflink_linux(void)
+  * (errno is set appropriately).
+  */
+ static ssize_t
+-cfr_wrapper(int fd_out, int fd_in, loff_t *off_out, size_t len)
++cfr_wrapper(int fd_out, int fd_in, off_t *off_out, size_t len)
+ {
+ #ifdef __NR_copy_file_range
+     return syscall(__NR_copy_file_range, fd_in, NULL, fd_out,
+@@ -96,7 +96,7 @@ cfr_wrapper(int fd_out, int fd_in, loff_t *off_out, size_t 
len)
+  * reaches EOF.
+  */
+ static off_t
+-do_lseek_data(int fd_out, int fd_in, loff_t *off_out) {
++do_lseek_data(int fd_out, int fd_in, off_t *off_out) {
+ #ifdef SEEK_DATA
+     /* Use lseek SEEK_DATA/SEEK_HOLE for sparse file support,
+      * as suggested in the copy_file_range man page.
+@@ -189,7 +189,7 @@ _reflink_linux_file_copy(PyObject *self, PyObject *args)
+     ssize_t buf_bytes, buf_offset, copyfunc_ret;
+     struct stat stat_in, stat_out;
+     char* buf;
+-    ssize_t (*copyfunc)(int, int, loff_t *, size_t);
++    ssize_t (*copyfunc)(int, int, off_t *, size_t);
+ 
+     if (!PyArg_ParseTuple(args, "ii", &fd_in, &fd_out))
+         return NULL;
+-- 
+2.10.2
+

Reply via email to