3 fixes for CentOS 5.8
cover 3 fixes for CentOS 5.8
The following changes since commit 72576e2d04dc8b43ae0d7f31cddd74318f52103e:
bitbake: hob: replace the use of hob-toolchain with populate_sdk task (2014-02-25 08:06:11 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib rbt/cent5
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=rbt/cent5
Donn Seeley (1):
dpkg: fix a link problem for dpkg-native on CentOS 5.8
Robert Yang (2):
grub: exclude .pc from POTFILES.in (fix build on CentOS 5.8) dpkg-compiler.m4: remove -Wvla (fix build on CentOS 5.8)
.../grub/grub/autogen.sh-exclude-pc.patch | 34 +++++++++ meta/recipes-bsp/grub/grub_git.bb | 1 + .../dpkg/dpkg/glibc2.5-sync_file_range.patch | 86 ++++++++++++++++++++++ .../dpkg/dpkg/no-vla-warning.patch | 32 ++++++++ meta/recipes-devtools/dpkg/dpkg_1.17.4.bb | 2 + 5 files changed, 155 insertions(+) create mode 100644 meta/recipes-bsp/grub/grub/autogen.sh-exclude-pc.patch create mode 100644 meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch create mode 100644 meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch
Signature · 1 line
1.8.3.1
PATCH 1/3 grub: exclude .pc from POTFILES.in (fix build on CentOS 5.8)
Exclude the .pc from po/POTFILES.in since quilt uses "patch --backup", which will create the backup file under .pc, this may cause unexpected errors, for example, on CentOS 5.x, if the backup file is null (newfile), it's mode will be 000, then we will get errors when xgettext try to read it.
--- .../grub/grub/autogen.sh-exclude-pc.patch | 34 ++++++++++++++++++++++ meta/recipes-bsp/grub/grub_git.bb | 1 + 2 files changed, 35 insertions(+) create mode 100644 meta/recipes-bsp/grub/grub/autogen.sh-exclude-pc.patch
meta/recipes-bsp/grub/grub/autogen.sh-exclude-pc.patch new file +34 -0
@@ -0,0 +1,34 @@ +From ff8f68cc48fd3c30d55e1d570d51f2e0952c968e Mon Sep 17 00:00:00 2001 +From: Robert Yang <[email protected]> +Date: Sat, 25 Jan 2014 23:49:44 -0500 +Subject: [PATCH] autogen.sh: exclude .pc from po/POTFILES.in + +Exclude the .pc from po/POTFILES.in since quilt uses "patch --backup", +which will create the backup file under .pc, this may cause unexpected +errors, for example, on CentOS 5.x, if the backup file is null +(newfile), it's mode will be 000, then we will get errors when xgettext +try to read it. + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Robert Yang <[email protected]> +--- + autogen.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/autogen.sh b/autogen.sh +index 7424428..843619e 100755 +--- a/autogen.sh ++++ b/autogen.sh +@@ -5,7 +5,7 @@ set -e + export LC_COLLATE=C + unset LC_ALL + +-find . -iname '*.[ch]' ! -ipath './grub-core/lib/libgcrypt-grub/*' ! -ipath './build-aux/*' ! -ipath './grub-core/lib/libgcrypt/src/misc.c' ! -ipath './grub-core/lib/libgcrypt/src/global.c' ! -ipath './grub-core/lib/libgcrypt/src/secmem.c' ! -ipath './util/grub-gen-widthspec.c' ! -ipath './util/grub-gen-asciih.c' |sort > po/POTFILES.in ++find . -iname '*.[ch]' ! -ipath './grub-core/lib/libgcrypt-grub/*' ! -ipath './build-aux/*' ! -ipath './grub-core/lib/libgcrypt/src/misc.c' ! -ipath './grub-core/lib/libgcrypt/src/global.c' ! -ipath './grub-core/lib/libgcrypt/src/secmem.c' ! -ipath './util/grub-gen-widthspec.c' ! -ipath './util/grub-gen-asciih.c' ! -path './.pc/*' | sort > po/POTFILES.in + find util -iname '*.in' ! -name Makefile.in |sort > po/POTFILES-shell.in + + echo "Importing unicode..." +-- +1.7.10.4 +
meta/recipes-bsp/grub/grub_git.bb +1 -0
@@ -20,6 +20,7 @@ PV = "2.00+${SRCPV}" SRCREV = "0776112c5311196889a15058a3b1be4c81ba5e05" SRC_URI = "git://git.savannah.gnu.org/grub.git \ file://40_custom \ + file://autogen.sh-exclude-pc.patch \ " S = "${WORKDIR}/git"
Signature · 1 line
1.8.3.1
PATCH 2/3 dpkg: fix a link problem for dpkg-native on CentOS 5.8
In reply to Robert YangFrom: Donn Seeley <[email protected]>
[ CQID: WIND00392830 ]
CentOS 5.8 provides the kernel support and headers for the sync_file_range() syscall, but glibc 2.5 doesn't implement the sync_file_range() syscall stub, so we can't link dpkg-native. Add a patch that makes dpkg require a glibc version >= 2.6 in order to use sync_file_range().
--- .../dpkg/dpkg/glibc2.5-sync_file_range.patch | 86 ++++++++++++++++++++++ meta/recipes-devtools/dpkg/dpkg_1.17.4.bb | 1 + 2 files changed, 87 insertions(+) create mode 100644 meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch
meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch new file +86 -0
@@ -0,0 +1,86 @@ +CentOS 5.8 kernels and headers support the sync_file_range() system call, +but glibc 2.5 doesn't provide the syscall stub. It appears that this +problem is known but will never be fixed: + + https://bugzilla.redhat.com/show_bug.cgi?id=518581 + + Bug 518581 - [RHEL5] glibc misses sync_file_range syscall interface + + Status: CLOSED CANTFIX + Last Closed: 2009-11-22 22:19:55 + + Kirby Zhou 2009-08-20 23:37:55 EDT + + Description of problem: + + glibc misses sync_file_range syscall interface. The header file and + man page both say 'sync_file_range' should exist. From man page, + sync_file_range should exist sinc kernel-2.6.17 + + Andreas Schwab 2009-08-21 03:24:24 EDT + + It has only been added to glibc 2.6, and cannot be backported due to + ABI breakage. You can always fall back to syscall(3). + + Ulrich Drepper 2009-11-22 22:19:55 EST + + As comment #1 says, no chance to backport this. + + See the syscall man page for instructions. + + Jon E 2010-03-19 10:32:37 EDT + + then why document it if it's broken and you're not going to fix it? + .. might want to FTFM over at sync_file_range(2) - in the meantime - + borrowing from glibc 2.6 .. any thoughts on this implementation for a + hacky workaround for those still on your "ancient releases" .. (eg: + RHEL5.3)?: + + #ifdef ULI_WONT_FIX_THIS_IN_GLIBC2.5 + #define NR_sync_file_range 277 + int sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags) + { + return syscall (NR_sync_file_range, fd, + __LONG_LONG_PAIR ((long) (from >> 32), (long) from), + __LONG_LONG_PAIR ((long) (to >> 32), (long) to), + flags); + } + #endif + + assuming of course that you're on an x86_64 and include/asm- + x86_64/unistd.h has the correct entry + + (fwiw - fio is starting to use this now) + +Rather than attempting to provide an implementation using syscall(), +we take the more conservative route and ignore header support for +sync_file_range() flags when the glibc version is <= 2.5. + +Upstream-Status: Inappropriate [everyone else builds on newer hosts :-)] + +Signed-off-by: Donn Seeley <[email protected]> +Signed-off-by: Lei Liu <[email protected]> +--- + src/archives.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/src/archives.c ++++ b/src/archives.c +@@ -75,7 +75,7 @@ + /* Ignore the return code as it should be considered equivalent to an + * asynchronous hint for the kernel, we are doing an fsync() later on + * anyway. */ +-#if defined(SYNC_FILE_RANGE_WRITE) ++#if defined(SYNC_FILE_RANGE_WRITE) && __GLIBC_PREREQ(2, 6) + sync_file_range(fd, 0, 0, SYNC_FILE_RANGE_WRITE); + #elif defined(HAVE_POSIX_FADVISE) + posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED); +@@ -1179,7 +1179,7 @@ + return 0; + } + +-#if defined(SYNC_FILE_RANGE_WAIT_BEFORE) ++#if defined(SYNC_FILE_RANGE_WAIT_BEFORE) && __GLIBC_PREREQ(2, 6) + static void + tar_writeback_barrier(struct fileinlist *files, struct pkginfo *pkg) + {
meta/recipes-devtools/dpkg/dpkg_1.17.4.bb +1 -0
@@ -10,6 +10,7 @@ SRC_URI += "file://noman.patch \ file://fix-abs-redefine.patch \ file://arch_pm.patch \ file://dpkg-configure.service \ + file://glibc2.5-sync_file_range.patch \ " SRC_URI[md5sum] = "cc25086e1e3bd9512a95f14cfe9002e1"
Signature · 1 line
1.8.3.1
PATCH 3/3 dpkg-compiler.m4: remove -Wvla (fix build on CentOS 5.8)
In reply to Robert YangRemove the -Wvla flag from the set of compiler warning flags, since gcc on old host systems such as CentOS 5.8 doesn't support it, and it causes a build error for dpkg-native.
--- .../dpkg/dpkg/no-vla-warning.patch | 32 ++++++++++++++++++++++ meta/recipes-devtools/dpkg/dpkg_1.17.4.bb | 1 + 2 files changed, 33 insertions(+) create mode 100644 meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch
meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch new file +32 -0
@@ -0,0 +1,32 @@ +From e94474d805377d67c8b09664a602f20969e12b8a Mon Sep 17 00:00:00 2001 +From: Robert Yang <[email protected]> +Date: Thu, 23 Jan 2014 04:17:23 -0500 +Subject: [PATCH] dpkg-compiler.m4: remove -Wvla + +Remove the -Wvla flag from the set of compiler warning flags, since gcc +on old host systems such as CentOS 5.8 doesn't support it, and it +causes a build error for dpkg-native. + +Upstream-Status: Pending + +Signed-off-by: Donn Seeley <[email protected]> +Signed-off-by: Robert Yang <[email protected]> +--- + m4/dpkg-compiler.m4 | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/m4/dpkg-compiler.m4 b/m4/dpkg-compiler.m4 +index f1c760b..500b5ad 100644 +--- a/m4/dpkg-compiler.m4 ++++ b/m4/dpkg-compiler.m4 +@@ -72,7 +72,6 @@ if test "x$enable_compiler_warnings" = "xyes"; then + DPKG_WARNING_ALL([-Wformat-security]) + DPKG_WARNING_ALL([-Wpointer-arith]) + DPKG_WARNING_ALL([-Wlogical-op]) +- DPKG_WARNING_ALL([-Wvla]) + DPKG_WARNING_ALL([-Winit-self]) + DPKG_WARNING_ALL([-Wwrite-strings]) + DPKG_WARNING_ALL([-Wcast-align]) +-- +1.7.10.4 +
meta/recipes-devtools/dpkg/dpkg_1.17.4.bb +1 -0
@@ -11,6 +11,7 @@ SRC_URI += "file://noman.patch \ file://arch_pm.patch \ file://dpkg-configure.service \ file://glibc2.5-sync_file_range.patch \ + file://no-vla-warning.patch \ " SRC_URI[md5sum] = "cc25086e1e3bd9512a95f14cfe9002e1"
Signature · 1 line
1.8.3.1