Hello community,

here is the log from the commit of package blog for openSUSE:Factory checked in 
at 2016-03-09 19:01:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/blog (Old)
 and      /work/SRC/openSUSE:Factory/.blog.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "blog"

Changes:
--------
--- /work/SRC/openSUSE:Factory/blog/blog.changes        2016-02-23 
16:53:11.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.blog.new/blog.changes   2016-03-09 
19:01:43.000000000 +0100
@@ -1,0 +2,13 @@
+Mon Feb 22 12:17:51 UTC 2016 - [email protected]
+
+- Do not use privata glibc API (boo#967437) but implement
+  missing shared memory mkstemp()
+- Remove patch remove-bad-symbol-use.patch
+
+-------------------------------------------------------------------
+Mon Feb 22 10:00:13 UTC 2016 - [email protected]
+
+- remove-bad-symbol-use.patch: Remove bad use of internal glibc interface
+  (bnc#967437)
+
+-------------------------------------------------------------------

Old:
----
  showconsole-2.17.tar.bz2

New:
----
  showconsole-2.18.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ blog.spec ++++++
--- /var/tmp/diff_new_pack.YuBNlu/_old  2016-03-09 19:01:44.000000000 +0100
+++ /var/tmp/diff_new_pack.YuBNlu/_new  2016-03-09 19:01:44.000000000 +0100
@@ -16,10 +16,8 @@
 #
 
 
-%define __filter_GLIBC_PRIVATE 1
-
 Name:           blog
-Version:        2.17
+Version:        2.18
 Release:        0
 Summary:        Boot logging
 License:        GPL-2.0+

++++++ showconsole-2.17.tar.bz2 -> showconsole-2.18.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/showconsole-2.17/Makefile 
new/showconsole-2.18/Makefile
--- old/showconsole-2.17/Makefile       2016-02-19 17:57:38.000000000 +0100
+++ new/showconsole-2.18/Makefile       2016-02-22 13:16:07.000000000 +0100
@@ -14,9 +14,9 @@
 #DESTDIR =     /tmp/root
 DEBUG   =
 DESTDIR         =
-VERSION         =      2.17
-MAJOR   =      2
-MINOR   =      17
+MAJOR   :=     2
+MINOR   :=     18
+VERSION         :=     $(MAJOR).$(MINOR)
 DATE    =      $(shell date +'%d%b%y' | tr '[:lower:]' '[:upper:]')
 COPTS    =
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/showconsole-2.17/libconsole/shm.c 
new/showconsole-2.18/libconsole/shm.c
--- old/showconsole-2.17/libconsole/shm.c       2015-12-16 13:09:26.000000000 
+0100
+++ new/showconsole-2.18/libconsole/shm.c       2016-02-22 13:11:46.000000000 
+0100
@@ -10,30 +10,84 @@
  */
 
 #include <fcntl.h>     
+#include <linux/magic.h>
+#include <mntent.h>
+#include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <sys/mman.h>
 #include <sys/stat.h>
 #include <sys/types.h>
+#include <sys/statfs.h>
 #include <unistd.h>
 #include "libconsole.h"
 
-extern char *__mktemp(char *) __THROW __nonnull ((1));
+/*
+ * glibc does not provide a shm_mkstemp(char *template) and not
+ * using shm_open() but hard coded /dev/shm seems to by risky,
+ * therefore determine the location for POSIX shared memory.
+ */
+
+static const char *devshm;
+
+static void _locateshm(void) __attribute__((__constructor__));
+static void _locateshm(void)
+{
+    static const char defaultdir[] = "/dev/shm";
+    struct statfs st;
+    struct mntent *p;
+    FILE *mounts;
+    int ret;
+
+    ret = statfs(defaultdir, &st);
+    if (ret == 0 && (st.f_type == RAMFS_MAGIC || st.f_type == TMPFS_MAGIC)) {
+       devshm = &defaultdir[0];
+       return;
+    }
+
+    mounts = setmntent("/proc/mounts", "re");
+    if (!mounts)
+       return;         /* Ouch! */
+
+    while((p = getmntent(mounts))) {
+
+       if (strcmp(p->mnt_type, "tmpfs") != 0)
+           continue;
+
+       if (strlen(p->mnt_dir) <= 0)
+           continue;
+
+       ret = statfs(p->mnt_dir, &st);
+       if (ret < 0)
+           continue;
+
+       if (st.f_type != RAMFS_MAGIC && st.f_type != TMPFS_MAGIC)
+           continue;
+
+       devshm = strdup(p->mnt_dir);
+       break;
+    }
+
+    endmntent(mounts);
+}
 
 void* shm_malloc(size_t size, int flags)
 {
-    static char temp[] = "/blogd-XXXXXX";
-    char *name;
+    char *template;
     void *area;
     int shmfd = -1;
     int ret;
 
-    name = __mktemp(&temp[0]);
-    if (!name)
-       error("can not generate temporay name");
-
-    shmfd = shm_open(name, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
-    if (shmfd < 0)
-       error("can not open shared memory object %s", name);
+    if (!devshm)
+       error("can not generate shared memory area");
+
+    ret = asprintf(&template, "%s/blogd-XXXXXX", devshm);
+    if (ret < 0)
+       error("can not allocate string for shared memory area");
+
+    shmfd = mkstemp(template);
+    if (ret < shmfd)
+       error("can not generate shared memory area");
 
     ret = ftruncate(shmfd, size);
     if (ret < 0)
@@ -43,6 +97,7 @@
     if (area == MAP_FAILED)
         error("can not map shared memory object into memory");
 
-    shm_unlink(name);
+    shm_unlink(template);
+    free(template);
     return area;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/showconsole-2.17/showconsole-2.17.lsm 
new/showconsole-2.18/showconsole-2.17.lsm
--- old/showconsole-2.17/showconsole-2.17.lsm   2016-02-19 17:57:41.000000000 
+0100
+++ new/showconsole-2.18/showconsole-2.17.lsm   1970-01-01 01:00:00.000000000 
+0100
@@ -1,15 +0,0 @@
-Begin3
-Title:         console tools for boot scripts
-Version:       2.17
-Entered-date:  19FEB16
-Description:   Used for fetch the real device in boot scripts
-               running on /dev/console.
-Keywords:      boot control
-Author:                Werner Fink <[email protected]>
-Maintained-by: Werner Fink <[email protected]>
-Primary-site:  sunsite.unc.edu /pub/Linux/system/daemons/init
-               @UNKNOWN showconsole-2.17.tar.gz
-Alternate-site:        ftp.suse.com /pub/projects/init
-Platforms:     Linux with System VR2 or higher boot scheme
-Copying-policy:        GPL
-End
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/showconsole-2.17/showconsole-2.18.lsm 
new/showconsole-2.18/showconsole-2.18.lsm
--- old/showconsole-2.17/showconsole-2.18.lsm   1970-01-01 01:00:00.000000000 
+0100
+++ new/showconsole-2.18/showconsole-2.18.lsm   2016-02-22 13:16:29.000000000 
+0100
@@ -0,0 +1,15 @@
+Begin3
+Title:         console tools for boot scripts
+Version:       2.18
+Entered-date:  22FEB16
+Description:   Used for fetch the real device in boot scripts
+               running on /dev/console.
+Keywords:      boot control
+Author:                Werner Fink <[email protected]>
+Maintained-by: Werner Fink <[email protected]>
+Primary-site:  sunsite.unc.edu /pub/Linux/system/daemons/init
+               @UNKNOWN showconsole-2.18.tar.gz
+Alternate-site:        ftp.suse.com /pub/projects/init
+Platforms:     Linux with System VR2 or higher boot scheme
+Copying-policy:        GPL
+End


Reply via email to