All of lore.kernel.org
 help / color / mirror / Atom feed
* [dora][RFC PATCH 0/2] dpkg changes to support CentOS 5.8 hosts
@ 2013-11-21  7:08 Mark Hatle
  2013-11-21  7:08 ` [dora][RFC PATCH 1/2] dpkg: Fix a build error for dpkg-native on CentOS 5.8 Mark Hatle
  2013-11-21  7:08 ` [dora][RFC PATCH 2/2] dpkg: Fix a link problem " Mark Hatle
  0 siblings, 2 replies; 3+ messages in thread
From: Mark Hatle @ 2013-11-21  7:08 UTC (permalink / raw)
  To: openembedded-core

Since CentOS 5.8 isn't considered supported by oe-core, this is just an RFC.
It's being sent for Yocto Project compliance reasons.

Lei Liu (2):
  dpkg: Fix a build error for dpkg-native on CentOS 5.8.
  dpkg: Fix a link problem for dpkg-native on CentOS 5.8.

 .../dpkg/dpkg/glibc2.5-sync_file_range.patch       | 86 ++++++++++++++++++++++
 .../dpkg/dpkg/no-vla-warning.patch                 | 24 ++++++
 meta/recipes-devtools/dpkg/dpkg_1.17.1.bb          |  2 +
 3 files changed, 112 insertions(+)
 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

-- 
1.8.1.2.545.g2f19ada



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [dora][RFC PATCH 1/2] dpkg: Fix a build error for dpkg-native on CentOS 5.8.
  2013-11-21  7:08 [dora][RFC PATCH 0/2] dpkg changes to support CentOS 5.8 hosts Mark Hatle
@ 2013-11-21  7:08 ` Mark Hatle
  2013-11-21  7:08 ` [dora][RFC PATCH 2/2] dpkg: Fix a link problem " Mark Hatle
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Hatle @ 2013-11-21  7:08 UTC (permalink / raw)
  To: openembedded-core

From: Lei Liu <lei.liu2@windriver.com>

Remove the -Wvla(*) flag from the set of compiler warning flags, since
gcc on ancient host systems such as CentOS 5.8 doesn't support it.

*-Wvla
  Warn if variable length array is used in the code.  -Wno-vla will prevent
  the -pedantic warning of the variable length array.

Signed-off-by: Donn Seeley <donn.seeley@windriver.com>
Signed-off-by: Lei Liu <lei.liu2@windriver.com>
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
---
 .../dpkg/dpkg/no-vla-warning.patch                 | 24 ++++++++++++++++++++++
 meta/recipes-devtools/dpkg/dpkg_1.17.1.bb          |  1 +
 2 files changed, 25 insertions(+)
 create mode 100644 meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch

diff --git a/meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch b/meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch
new file mode 100644
index 0000000..9bec523
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch
@@ -0,0 +1,24 @@
+Remove the -Wvla flag from the set of compiler warning flags, since gcc
+on ancient host systems such as CentOS 5.8 doesn't support it, and it
+causes a build error for dpkg-native.
+
+Upstream-Status: Inappropriate [everyone else builds on newer hosts :-)]
+
+Signed-off-by: Donn Seeley <donn.seeley@windriver.com>
+Signed-off-by: Lei Liu <lei.liu2@windriver.com>
+---
+ m4/dpkg-compiler.m4 |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/m4/dpkg-compiler.m4
++++ b/m4/dpkg-compiler.m4
+@@ -14,7 +14,7 @@ AC_DEFUN([DPKG_COMPILER_WARNINGS],
+ 
+ WFLAGS="-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers \
+ 	 -Wmissing-declarations -Wmissing-format-attribute \
+ 	 -Wformat-security -Wpointer-arith \
+-	 -Wvla -Winit-self -Wwrite-strings -Wcast-align -Wshadow"
++	 -Winit-self -Wwrite-strings -Wcast-align -Wshadow"
+ WCFLAGS="-Wdeclaration-after-statement -Wnested-externs -Wbad-function-cast \
+ 	 -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition"
+ # Temporarily here until #542031 gets fixed in ncurses
diff --git a/meta/recipes-devtools/dpkg/dpkg_1.17.1.bb b/meta/recipes-devtools/dpkg/dpkg_1.17.1.bb
index 525f759..4ff22cc 100644
--- a/meta/recipes-devtools/dpkg/dpkg_1.17.1.bb
+++ b/meta/recipes-devtools/dpkg/dpkg_1.17.1.bb
@@ -9,6 +9,7 @@ SRC_URI += "file://noman.patch \
             file://remove-tar-no-timestamp.patch \
             file://fix-abs-redefine.patch \
             file://arch_pm.patch \
+            file://no-vla-warning.patch \
            "
 
 SRC_URI[md5sum] = "ece3ae87a099158c17bde95c0036c575"
-- 
1.8.1.2.545.g2f19ada



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [dora][RFC PATCH 2/2] dpkg: Fix a link problem for dpkg-native on CentOS 5.8.
  2013-11-21  7:08 [dora][RFC PATCH 0/2] dpkg changes to support CentOS 5.8 hosts Mark Hatle
  2013-11-21  7:08 ` [dora][RFC PATCH 1/2] dpkg: Fix a build error for dpkg-native on CentOS 5.8 Mark Hatle
@ 2013-11-21  7:08 ` Mark Hatle
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Hatle @ 2013-11-21  7:08 UTC (permalink / raw)
  To: openembedded-core

From: Lei Liu <lei.liu2@windriver.com>

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().

Signed-off-by: Donn Seeley <donn.seeley@windriver.com>
Signed-off-by: Lei Liu <lei.liu2@windriver.com>
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
---
 .../dpkg/dpkg/glibc2.5-sync_file_range.patch       | 86 ++++++++++++++++++++++
 meta/recipes-devtools/dpkg/dpkg_1.17.1.bb          |  1 +
 2 files changed, 87 insertions(+)
 create mode 100644 meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch

diff --git a/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch b/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch
new file mode 100644
index 0000000..d56b8a6
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch
@@ -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 <donn.seeley@windriver.com>
+Signed-off-by: Lei Liu <lei.liu2@windriver.com>
+---
+ 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)
+ {
diff --git a/meta/recipes-devtools/dpkg/dpkg_1.17.1.bb b/meta/recipes-devtools/dpkg/dpkg_1.17.1.bb
index 4ff22cc..8c4dacc 100644
--- a/meta/recipes-devtools/dpkg/dpkg_1.17.1.bb
+++ b/meta/recipes-devtools/dpkg/dpkg_1.17.1.bb
@@ -10,6 +10,7 @@ SRC_URI += "file://noman.patch \
             file://fix-abs-redefine.patch \
             file://arch_pm.patch \
             file://no-vla-warning.patch \
+            file://glibc2.5-sync_file_range.patch \
            "
 
 SRC_URI[md5sum] = "ece3ae87a099158c17bde95c0036c575"
-- 
1.8.1.2.545.g2f19ada



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-11-21  7:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-21  7:08 [dora][RFC PATCH 0/2] dpkg changes to support CentOS 5.8 hosts Mark Hatle
2013-11-21  7:08 ` [dora][RFC PATCH 1/2] dpkg: Fix a build error for dpkg-native on CentOS 5.8 Mark Hatle
2013-11-21  7:08 ` [dora][RFC PATCH 2/2] dpkg: Fix a link problem " Mark Hatle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.