Whamcloud - gitweb
TT-177 build: add missing SLES 11 RPM patches v1.42.3.wc3
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 24 Jul 2012 00:54:47 +0000 (17:54 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 9 Aug 2012 08:34:27 +0000 (02:34 -0600)
Some patches referenced by the SLES 11 RPM .spec file were dropped
from the master-lustre branch when converting from the old quilt
patch series over to git commits.  This wasn't noticed, since we
didn't automatically build e2fsprogs on SLES servers.

Add back the SLES-specific patches, excluding the replacement de.po
file, since the original SLES11 de.po file is only against 1.41.4,
and is missing a large number of changes to the translated messages
related to 64-bit format specifiers.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I783d58bd78d7c4c66cc85ec5557ae1aaf64016ba

e2fsprogs-SUSE_LINUX-11.spec.in
patches/sles/11/rpm/README.SUSE [new file with mode: 0644]
patches/sles/11/rpm/e2fsprogs-1.41.1-splash_support.patch [new file with mode: 0644]
patches/sles/11/rpm/libcom_err-compile_et_permissions.patch [new file with mode: 0644]

index 53a4d97..8103892 100644 (file)
@@ -157,7 +157,7 @@ patch -p1 < patches/sles/11/rpm/e2fsprogs-1.41.1-splash_support.patch
 # libcom_err patches
 patch -p1 < patches/sles/11/rpm/libcom_err-compile_et_permissions.patch
 cp patches/sles/11/rpm/README.SUSE .
-cp patches/sles/11/rpm/%{name}-1.41.4.de.po po/de.po
+#cp patches/sles/11/rpm/%{name}-1.41.4.de.po po/de.po
 
 %build
 autoreconf --force --install
diff --git a/patches/sles/11/rpm/README.SUSE b/patches/sles/11/rpm/README.SUSE
new file mode 100644 (file)
index 0000000..ef2be40
--- /dev/null
@@ -0,0 +1,11 @@
+e2fsprogs-devel
+---------------
+Since the e2fsprogs libraries has been split out into own packages,
+each having its own devel package
+libext2fs-devel
+libblkid-devel
+libuuid-devel
+libcom_err-devel
+the e2fsprogs-devel package is deprecated and is provided for temporary
+backwards compatibility only.
+
diff --git a/patches/sles/11/rpm/e2fsprogs-1.41.1-splash_support.patch b/patches/sles/11/rpm/e2fsprogs-1.41.1-splash_support.patch
new file mode 100644 (file)
index 0000000..31f09c6
--- /dev/null
@@ -0,0 +1,188 @@
+Index: e2fsprogs-1.41.7/e2fsck/splash.c
+===================================================================
+--- /dev/null
++++ e2fsprogs-1.41.7/e2fsck/splash.c
+@@ -0,0 +1,100 @@
++/*
++ * add support for switching the splash screen on boot
++ */
++#include <stdio.h>
++#include <string.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <fcntl.h>
++#include <unistd.h>
++#include <errno.h>
++#include "splash.h"
++
++static int verbose = 0;
++
++/* nop implementation
++ */
++static void nop(void)
++{
++}
++
++static struct splash_ops nop_ops = {
++      .splash_on = nop,
++      .splash_off = nop
++};
++
++/*
++ *  bootsplash implementation
++ */
++#define BOOTSPLASH_CTL        "/proc/splash"
++
++static int bootsplash_exists(void)
++{
++      struct stat sb;
++
++      if (stat(BOOTSPLASH_CTL, &sb) == -1)
++              return 0;
++
++      if (S_ISREG(sb.st_mode))
++              return 1;
++
++      return 0;
++}
++
++/* write msg to splash control */
++static void bootsplash_msg(const char *msg, size_t size)
++{
++      int fd;
++      size_t written;
++
++      fd = open(BOOTSPLASH_CTL, O_WRONLY);
++      if (fd == -1) {
++              if (verbose)
++                      printf("cannot open %s\n", BOOTSPLASH_CTL);
++              return;
++      }
++
++      written = write(fd, msg, size);
++      if (written != size) {
++              if (verbose)
++                      printf("size = %i, written = %i\n", size, written);
++      }
++
++      close(fd);
++}
++
++static void bootsplash_on(void)
++{
++      if (verbose)
++              printf("setting bootsplash silent\n");
++      bootsplash_msg("silent\n", 7);
++}
++
++static void bootsplash_off(void)
++{
++      if (verbose)
++              printf("setting bootsplash verbose\n");
++      bootsplash_msg("verbose\n", 8);
++}
++
++static struct splash_ops bootsplash_ops = {
++      .splash_on = bootsplash_on,
++      .splash_off = bootsplash_off
++};
++
++/*
++ * Initialisation
++ */
++void splash_init(struct splash_ops **ops)
++{
++      if (bootsplash_exists())
++              *ops = &bootsplash_ops;
++      else
++              *ops = &nop_ops;
++}
++
++void splash_set_verbose(void)
++{
++      verbose = 1;
++}
++
+Index: e2fsprogs-1.41.7/e2fsck/splash.h
+===================================================================
+--- /dev/null
++++ e2fsprogs-1.41.7/e2fsck/splash.h
+@@ -0,0 +1,13 @@
++#ifndef _SPLASH_H
++#define _SPLASH_H
++
++struct splash_ops {
++      void (*splash_on)(void);
++      void (*splash_off)(void);
++};
++
++void splash_init(struct splash_ops **ops);
++void splash_set_verbose(void);
++
++#endif /* _SPLASH_H */
++
+Index: e2fsprogs-1.42.3/e2fsck/Makefile.in
+===================================================================
+--- e2fsprogs-1.42.3/e2fsck/Makefile.in
++++ e2fsprogs-1.42.3/e2fsck/Makefile.in
+@@ -71,7 +71,7 @@ COMPILE_ET=$(top_builddir)/lib/et/compile_et --build-tree
+ #
+ #MCHECK= -DMCHECK
+-OBJS= crc32.o dict.o unix.o e2fsck.o super.o pass1.o pass1b.o pass2.o \
++OBJS= crc32.o dict.o unix.o e2fsck.o super.o pass1.o pass1b.o pass2.o splash.o \
+       pass3.o pass4.o pass5.o pass6.o journal.o badblocks.o util.o dirinfo.o \
+       dx_dirinfo.o ehandler.o problem.o message.o quota.o recovery.o \
+       region.o revoke.o ea_refcount.o rehash.o profile.o prof_err.o \
+@@ -119,6 +119,7 @@ SRCS= $(srcdir)/e2fsck.c \
+       $(srcdir)/rehash.c \
+       $(srcdir)/region.c \
+       $(srcdir)/profile.c \
++      $(srcdir)/splash.c \
+       $(srcdir)/sigcatcher.c \
+       $(srcdir)/logfile.c \
+       prof_err.c \
+@@ -551,6 +552,7 @@ region.o: $(srcdir)/region.c $(top_builddir)/lib/config.h \
+  $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
+  $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/mkquota.h \
+  $(top_srcdir)/lib/quota/quota.h $(top_srcdir)/lib/../e2fsck/dict.h
++splash.o: splash.c splash.h
+ profile.o: $(srcdir)/profile.c $(top_builddir)/lib/config.h \
+  $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/et/com_err.h \
+  $(srcdir)/profile.h prof_err.h
+Index: e2fsprogs-1.41.7/e2fsck/unix.c
+===================================================================
+--- e2fsprogs-1.41.7.orig/e2fsck/unix.c
++++ e2fsprogs-1.41.7/e2fsck/unix.c
+@@ -54,6 +54,7 @@ extern int optind;
+ #include "et/com_err.h"
+ #include "e2p/e2p.h"
+ #include "e2fsck.h"
++#include "splash.h"
+ #include "problem.h"
+ #include "../version.h"
+@@ -1348,6 +1349,7 @@ int main (int argc, char *argv[])
+       int sysval, sys_page_size = 4096;
+       int old_bitmaps;
+       __u32 features[3];
++      struct splash_ops *sops;
+       char *cp;
+       int qtype;  /* quota type */
+@@ -1380,6 +1382,7 @@ int main (int argc, char *argv[])
+                       _("while trying to initialize program"));
+               exit(FSCK_ERROR);
+       }
++      splash_init(&sops);
+       reserve_stdio_fds();
+       set_up_logging(ctx);
+@@ -1806,6 +1809,7 @@ print_unsupp_features:
+       }
+       check_resize_inode(ctx);
++      sops->splash_off();
+       if (bad_blocks_file)
+               read_bad_blocks_file(ctx, bad_blocks_file, replace_bad_blocks);
+       else if (cflag)
diff --git a/patches/sles/11/rpm/libcom_err-compile_et_permissions.patch b/patches/sles/11/rpm/libcom_err-compile_et_permissions.patch
new file mode 100644 (file)
index 0000000..528f303
--- /dev/null
@@ -0,0 +1,13 @@
+Index: e2fsprogs-1.41.7/lib/et/compile_et.sh.in
+===================================================================
+--- e2fsprogs-1.41.7.orig/lib/et/compile_et.sh.in
++++ e2fsprogs-1.41.7/lib/et/compile_et.sh.in
+@@ -51,7 +51,7 @@ if test -f ${BASE}.h && cmp -s ${BASE}.h
+     rm -f ${BASE}.h.$$
+ else
+     mv -f ${BASE}.h.$$ ${BASE}.h
+-    chmod -w ${BASE}.h
++#    chmod -w ${BASE}.h
+ fi
+ $AWK -f "${DIR}/et_c.awk" "outfile=${BASE}.c.$$" "outfn=${BASE}.c" "$ROOT.et"
+ if test -f ${BASE}.c && cmp -s ${BASE}.c.$$ ${BASE}.c ; then