openSUSE Commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
November 2016
- 1 participants
- 1494 discussions
Hello community,
here is the log from the commit of package cinnamon-screensaver for openSUSE:Factory checked in at 2016-11-28 15:09:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cinnamon-screensaver (Old)
and /work/SRC/openSUSE:Factory/.cinnamon-screensaver.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cinnamon-screensaver"
Changes:
--------
--- /work/SRC/openSUSE:Factory/cinnamon-screensaver/cinnamon-screensaver.changes 2016-11-18 22:03:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.cinnamon-screensaver.new/cinnamon-screensaver.changes 2016-11-28 15:09:29.000000000 +0100
@@ -1,0 +2,16 @@
+Fri Nov 25 20:23:14 UTC 2016 - sor.alexei(a)meowr.ru
+
+- Update to version 3.2.6 (changes since 3.2.4):
+ * Remove the position bar and position labels in infobar.
+ * Remove an import on BlinkLabel.
+
+-------------------------------------------------------------------
+Thu Nov 24 10:25:32 UTC 2016 - sor.alexei(a)meowr.ru
+
+- Update to version 3.2.4:
+ * Replace cinnamon-screensaver bin script with
+ cinnamon-screensaver.c, to perform setuid checks and fixes
+ prior to python and gtk starting.
+ * utils.py: Remove liveuser check, it doesn't work as expected.
+
+-------------------------------------------------------------------
Old:
----
cinnamon-screensaver-3.2.3.tar.gz
New:
----
cinnamon-screensaver-3.2.6.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cinnamon-screensaver.spec ++++++
--- /var/tmp/diff_new_pack.CGq7S9/_old 2016-11-28 15:09:30.000000000 +0100
+++ /var/tmp/diff_new_pack.CGq7S9/_new 2016-11-28 15:09:30.000000000 +0100
@@ -17,7 +17,7 @@
Name: cinnamon-screensaver
-Version: 3.2.3
+Version: 3.2.6
Release: 0
Summary: Cinnamon screensaver and locker
License: GPL-2.0+
++++++ cinnamon-screensaver-3.2.3.tar.gz -> cinnamon-screensaver-3.2.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.3/configure.ac new/cinnamon-screensaver-3.2.6/configure.ac
--- old/cinnamon-screensaver-3.2.3/configure.ac 2016-11-17 10:50:34.000000000 +0100
+++ new/cinnamon-screensaver-3.2.6/configure.ac 2016-11-24 23:39:41.000000000 +0100
@@ -2,7 +2,7 @@
AC_PREREQ(2.60)
AC_INIT([cinnamon-screensaver],
- [3.2.3],
+ [3.2.6],
[https://github.com/linuxmint/cinnamon-screensaver/issues]
PKG_PROG_PKG_CONFIG([0.26])
@@ -50,6 +50,8 @@
AM_PATH_PYTHON(3.4)
+PKG_CHECK_MODULES(SCREENSAVER_MAIN, glib-2.0)
+
PKG_CHECK_MODULES(CSCREENSAVER, gobject-2.0 gtk+-3.0 gdk-x11-3.0 x11 glib-2.0 gio-2.0)
have_shape=no
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.3/debian/changelog new/cinnamon-screensaver-3.2.6/debian/changelog
--- old/cinnamon-screensaver-3.2.3/debian/changelog 2016-11-17 10:50:34.000000000 +0100
+++ new/cinnamon-screensaver-3.2.6/debian/changelog 2016-11-24 23:39:41.000000000 +0100
@@ -1,3 +1,23 @@
+cinnamon-screensaver (3.2.6) serena; urgency=medium
+
+ * Remove import on BlinkLabel
+
+ -- Clement Lefebvre <root(a)linuxmint.com> Thu, 24 Nov 2016 22:38:57 +0000
+
+cinnamon-screensaver (3.2.5) serena; urgency=medium
+
+ * Remove position bar and position labels in infobar
+
+ -- Clement Lefebvre <root(a)linuxmint.com> Thu, 24 Nov 2016 18:55:32 +0000
+
+cinnamon-screensaver (3.2.4) serena; urgency=medium
+
+ [ Michael Webster ]
+ * Replace cinnamon-screensaver bin script with cinnamon-screensaver.c, to perform setuid checks and fixes prior to python and gtk starting.
+ * utils.py: remove liveuser check, it doesn't work as expected.
+
+ -- Clement Lefebvre <root(a)linuxmint.com> Wed, 23 Nov 2016 12:47:48 +0000
+
cinnamon-screensaver (3.2.3) serena; urgency=medium
[ Willy Sudiarto Raharjo ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.3/libcscreensaver/Makefile.am new/cinnamon-screensaver-3.2.6/libcscreensaver/Makefile.am
--- old/cinnamon-screensaver-3.2.3/libcscreensaver/Makefile.am 2016-11-17 10:50:34.000000000 +0100
+++ new/cinnamon-screensaver-3.2.6/libcscreensaver/Makefile.am 2016-11-24 23:39:41.000000000 +0100
@@ -134,8 +134,6 @@
libcscreensaver_la_gir_sources = \
cs-gdk-event-filter.c \
cs-gdk-event-filter.h \
- cs-init-utils.c \
- cs-init-utils.h \
cs-notification-watcher.c \
cs-notification-watcher.h \
$(dbus_built_sources) \
@@ -143,8 +141,6 @@
libcscreensaver_la_SOURCES = \
$(libcscreensaver_la_gir_sources) \
- setuid.c \
- setuid.h \
$(NULL)
libcscreensaver_la_LIBADD = \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.3/libcscreensaver/cs-init-utils.c new/cinnamon-screensaver-3.2.6/libcscreensaver/cs-init-utils.c
--- old/cinnamon-screensaver-3.2.3/libcscreensaver/cs-init-utils.c 2016-11-17 10:50:34.000000000 +0100
+++ new/cinnamon-screensaver-3.2.6/libcscreensaver/cs-init-utils.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,94 +0,0 @@
-#include <config.h>
-
-#include "setuid.h"
-#include <glib/gstdio.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-
-#include "cs-init-utils.h"
-
-/*
- * Portions:
- * Copyright (c) 1991-2004 Jamie Zawinski <jwz(a)jwz.org>
- * Copyright (c) 2005 William Jon McCann <mccann(a)jhu.edu>
- */
-
-#define PAM_SERVICE_NAME "cinnamon-desktop"
-
-/* from gs-auth-pam.c */
-static gboolean
-pam_check (void)
-{
- gboolean ret = TRUE;
-
- const char dir [] = "/etc/pam.d";
- const char file [] = "/etc/pam.d/" PAM_SERVICE_NAME;
- const char file2 [] = "/etc/pam.conf";
- struct stat st;
-
- if (g_stat (dir, &st) == 0 && st.st_mode & S_IFDIR) {
- if (g_stat (file, &st) != 0) {
- g_warning ("%s does not exist.\n"
- "Authentication via PAM is unlikely to work.",
- file);
- ret = FALSE;
- }
- } else if (g_stat (file2, &st) == 0) {
- FILE *f = g_fopen (file2, "r");
- if (f) {
- gboolean ok = FALSE;
- char buf[255];
- while (fgets (buf, sizeof(buf), f)) {
- if (strstr (buf, PAM_SERVICE_NAME)) {
- ok = TRUE;
- break;
- }
- }
-
- fclose (f);
- if (!ok) {
- g_warning ("%s does not list the `%s' service.\n"
- "Authentication via PAM is unlikely to work.",
- file2, PAM_SERVICE_NAME);
- ret = FALSE;
- }
- }
- /* else warn about file2 existing but being unreadable? */
- } else {
- g_warning ("Neither %s nor %s exist.\n"
- "Authentication via PAM is unlikely to work.",
- file2, file);
- ret = FALSE;
- }
-
- return ret;
-}
-
-gboolean
-cs_init_utils_initialize_locking (gboolean debug)
-{
- gboolean ret;
- char *nolock_reason;
- char *orig_uid;
- char *uid_message;
-
- ret = pam_check () && hack_uid (&nolock_reason,
- &orig_uid,
- &uid_message);
-
- if (nolock_reason) {
- g_print ("Locking disabled: %s\n", nolock_reason);
- }
-
- if (uid_message && debug) {
- g_print ("Modified UID: %s\n", uid_message);
- }
-
- g_free (nolock_reason);
- g_free (orig_uid);
- g_free (uid_message);
-
- return ret;
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.3/libcscreensaver/cs-init-utils.h new/cinnamon-screensaver-3.2.6/libcscreensaver/cs-init-utils.h
--- old/cinnamon-screensaver-3.2.3/libcscreensaver/cs-init-utils.h 2016-11-17 10:50:34.000000000 +0100
+++ new/cinnamon-screensaver-3.2.6/libcscreensaver/cs-init-utils.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-#ifndef CS_INIT_UTILS_H
-#define CS_INIT_UTILS_H
-
-#include <glib.h>
-
-G_BEGIN_DECLS
-
-gboolean cs_init_utils_initialize_locking (gboolean debug);
-
-G_END_DECLS
-
-#endif /* CS_INIT_UTILS_H */
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.3/libcscreensaver/setuid.c new/cinnamon-screensaver-3.2.6/libcscreensaver/setuid.c
--- old/cinnamon-screensaver-3.2.3/libcscreensaver/setuid.c 2016-11-17 10:50:34.000000000 +0100
+++ new/cinnamon-screensaver-3.2.6/libcscreensaver/setuid.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,245 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
- *
- * setuid.c --- management of runtime privileges.
- *
- * xscreensaver, Copyright (c) 1993-1998 Jamie Zawinski <jwz(a)jwz.org>
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation. No representations are made about the suitability of this
- * software for any purpose. It is provided "as is" without express or
- * implied warranty.
- */
-
-#include "config.h"
-
-#include <errno.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <pwd.h> /* for getpwnam() and struct passwd */
-#include <grp.h> /* for getgrgid() and struct group */
-
-#include "setuid.h"
-
-static char *
-uid_gid_string (uid_t uid,
- gid_t gid)
-{
- static char *buf;
- struct passwd *p = NULL;
- struct group *g = NULL;
-
- p = getpwuid (uid);
- g = getgrgid (gid);
-
- buf = g_strdup_printf ("%s/%s (%ld/%ld)",
- (p && p->pw_name ? p->pw_name : "???"),
- (g && g->gr_name ? g->gr_name : "???"),
- (long) uid, (long) gid);
-
- return buf;
-}
-
-static gboolean
-set_ids_by_number (uid_t uid,
- gid_t gid,
- char **message_ret)
-{
- int uid_errno = 0;
- int gid_errno = 0;
- int sgs_errno = 0;
- struct passwd *p = getpwuid (uid);
- struct group *g = getgrgid (gid);
-
- if (message_ret)
- *message_ret = NULL;
-
- /* Rumor has it that some implementations of of setuid() do nothing
- when called with -1; therefore, if the "nobody" user has a uid of
- -1, then that would be Really Bad. Rumor further has it that such
- systems really ought to be using -2 for "nobody", since that works.
- So, if we get a uid (or gid, for good measure) of -1, switch to -2
- instead. Note that this must be done after we've looked up the
- user/group names with getpwuid(-1) and/or getgrgid(-1).
- */
- if (gid == (gid_t) -1) gid = (gid_t) -2;
- if (uid == (uid_t) -1) uid = (uid_t) -2;
-
- errno = 0;
- if (setgroups (1, &gid) < 0)
- sgs_errno = errno ? errno : -1;
-
- errno = 0;
- if (setgid (gid) != 0)
- gid_errno = errno ? errno : -1;
-
- errno = 0;
- if (setuid (uid) != 0)
- uid_errno = errno ? errno : -1;
-
- if (uid_errno == 0 && gid_errno == 0 && sgs_errno == 0) {
- static char *reason;
- reason = g_strdup_printf ("changed uid/gid to %s/%s (%ld/%ld).",
- (p && p->pw_name ? p->pw_name : "???"),
- (g && g->gr_name ? g->gr_name : "???"),
- (long) uid, (long) gid);
- if (message_ret)
- *message_ret = g_strdup (reason);
-
- g_free (reason);
-
- return TRUE;
- } else {
- char *reason = NULL;
-
- if (sgs_errno) {
- reason = g_strdup_printf ("couldn't setgroups to %s (%ld)",
- (g && g->gr_name ? g->gr_name : "???"),
- (long) gid);
- if (sgs_errno == -1)
- fprintf (stderr, "%s: unknown error\n", reason);
- else {
- errno = sgs_errno;
- perror (reason);
- }
- g_free (reason);
- reason = NULL;
- }
-
- if (gid_errno) {
- reason = g_strdup_printf ("couldn't set gid to %s (%ld)",
- (g && g->gr_name ? g->gr_name : "???"),
- (long) gid);
- if (gid_errno == -1)
- fprintf (stderr, "%s: unknown error\n", reason);
- else {
- errno = gid_errno;
- perror (reason);
- }
- g_free (reason);
- reason = NULL;
- }
-
- if (uid_errno) {
- reason = g_strdup_printf ("couldn't set uid to %s (%ld)",
- (p && p->pw_name ? p->pw_name : "???"),
- (long) uid);
- if (uid_errno == -1)
- fprintf (stderr, "%s: unknown error\n", reason);
- else {
- errno = uid_errno;
- perror (reason);
- }
- g_free (reason);
- reason = NULL;
- }
- return FALSE;
- }
- return FALSE;
-}
-
-
-/* If we've been run as setuid or setgid to someone else (most likely root)
- turn off the extra permissions so that random user-specified programs
- don't get special privileges. (On some systems it is necessary to install
- this program as setuid root in order to read the passwd file to implement
- lock-mode.)
-
- *** WARNING: DO NOT DISABLE ANY OF THE FOLLOWING CODE!
- If you do so, you will open a security hole. See the sections
- of the xscreensaver manual titled "LOCKING AND ROOT LOGINS",
- and "USING XDM".
-*/
-
-/* Returns TRUE if OK to lock, FALSE otherwise */
-gboolean
-hack_uid (char **nolock_reason,
- char **orig_uid,
- char **uid_message)
-{
- char *reason;
- gboolean ret;
-
- ret = TRUE;
- reason = NULL;
-
- if (nolock_reason != NULL) {
- *nolock_reason = NULL;
- }
- if (orig_uid != NULL) {
- *orig_uid = NULL;
- }
- if (uid_message != NULL) {
- *uid_message = NULL;
- }
-
- /* Discard privileges, and set the effective user/group ids to the
- real user/group ids. That is, give up our "chmod +s" rights.
- */
- {
- uid_t euid = geteuid ();
- gid_t egid = getegid ();
- uid_t uid = getuid ();
- gid_t gid = getgid ();
-
- if (orig_uid != NULL) {
- *orig_uid = uid_gid_string (euid, egid);
- }
-
-#ifdef HAVE_BSDAUTH /* we need to setgid auth to run the bsd_auth(3) login_* helpers */
- {
- struct group *authg = getgrnam("auth");
- if (!authg || !authg->gr_name || !*authg->gr_name) {
- reason = g_strdup ("no such group as \"auth\" for bsdauth.");
-
- ret = FALSE;
- goto out;
- }
- if (! set_ids_by_number (uid, authg->gr_gid, uid_message)) {
- reason = g_strdup ("cannot setgid \"auth\" for bsdauth.");
-
- ret = FALSE;
- goto out;
- }
- }
-#else /* !HAVE_BSDAUTH */
- if (uid != euid || gid != egid) {
- if (! set_ids_by_number (uid, gid, uid_message)) {
- reason = g_strdup ("unable to discard privileges.");
-
- ret = FALSE;
- goto out;
- }
- }
-#endif
- }
-
-
- /* Locking can't work when running as root, because we have no way of
- knowing what the user id of the logged in user is (so we don't know
- whose password to prompt for.)
-
- *** WARNING: DO NOT DISABLE THIS CODE!
- If you do so, you will open a security hole. See the sections
- of the xscreensaver manual titled "LOCKING AND ROOT LOGINS",
- and "USING XDM".
- */
- if (getuid () == (uid_t) 0) {
- reason = g_strdup ("running as root");
- ret = FALSE;
- goto out;
- }
-
- out:
- if (nolock_reason != NULL) {
- *nolock_reason = g_strdup (reason);
- }
- g_free (reason);
-
- return ret;
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.3/libcscreensaver/setuid.h new/cinnamon-screensaver-3.2.6/libcscreensaver/setuid.h
--- old/cinnamon-screensaver-3.2.3/libcscreensaver/setuid.h 2016-11-17 10:50:34.000000000 +0100
+++ new/cinnamon-screensaver-3.2.6/libcscreensaver/setuid.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,27 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
- *
- * xscreensaver, Copyright (c) 1993-2004 Jamie Zawinski <jwz(a)jwz.org>
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation. No representations are made about the suitability of this
- * software for any purpose. It is provided "as is" without express or
- * implied warranty.
- */
-
-#ifndef __GS_SETUID_H
-#define __GS_SETUID_H
-
-#include <glib.h>
-
-G_BEGIN_DECLS
-
-gboolean hack_uid (char **nolock_reason,
- char **orig_uid,
- char **uid_message);
-
-G_END_DECLS
-
-#endif /* __GS_SETUID_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.3/src/binfiles/Makefile.am new/cinnamon-screensaver-3.2.6/src/binfiles/Makefile.am
--- old/cinnamon-screensaver-3.2.3/src/binfiles/Makefile.am 2016-11-17 10:50:34.000000000 +0100
+++ new/cinnamon-screensaver-3.2.6/src/binfiles/Makefile.am 2016-11-24 23:39:41.000000000 +0100
@@ -2,7 +2,6 @@
AUTOMAKE_OPTIONS = 1.7
SUBDIRS=
-
NULL =
%:%.in Makefile
@@ -10,13 +9,30 @@
-e s!\@datadir\@!$(datadir)! \
< $< > $@
-all-local: cinnamon-screensaver cinnamon-screensaver-command
+all-local: cinnamon-screensaver-command
+
+bin_SCRIPTS = cinnamon-screensaver-command
+
+bin_PROGRAMS = cinnamon-screensaver
+
+cinnamon_screensaver_SOURCES = \
+ cinnamon-screensaver.c \
+ setuid.h \
+ setuid.c \
+ $(NULL)
+
+cinnamon_screensaver_LDADD = \
+ $(SCREENSAVER_MAIN_LIBS) \
+ $(NULL)
-bin_SCRIPTS = cinnamon-screensaver cinnamon-screensaver-command
+cinnamon_screensaver_CPPFLAGS = \
+ $(WARN_CFLAGS) \
+ $(SCREENSAVER_MAIN_CFLAGS) \
+ -I$(srcdir) \
+ $(NULL)
EXTRA_DIST = \
cinnamon-screensaver.in \
- cinnamon-screensaver-command.in \
$(NULL)
MAINTAINERCLEANFILES = \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.3/src/binfiles/cinnamon-screensaver.c new/cinnamon-screensaver-3.2.6/src/binfiles/cinnamon-screensaver.c
--- old/cinnamon-screensaver-3.2.3/src/binfiles/cinnamon-screensaver.c 1970-01-01 01:00:00.000000000 +0100
+++ new/cinnamon-screensaver-3.2.6/src/binfiles/cinnamon-screensaver.c 2016-11-24 23:39:41.000000000 +0100
@@ -0,0 +1,158 @@
+#include <config.h>
+
+#include <glib.h>
+#include <glib/gstdio.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include "setuid.h"
+
+/*
+ * Portions:
+ * Copyright (c) 1991-2004 Jamie Zawinski <jwz(a)jwz.org>
+ * Copyright (c) 2005 William Jon McCann <mccann(a)jhu.edu>
+ */
+
+#define PAM_SERVICE_NAME "cinnamon-desktop"
+
+/* from gs-auth-pam.c */
+static void
+pam_check (void)
+{
+ const char dir [] = "/etc/pam.d";
+ const char file [] = "/etc/pam.d/" PAM_SERVICE_NAME;
+ const char file2 [] = "/etc/pam.conf";
+ struct stat st;
+
+ if (g_stat (dir, &st) == 0 && st.st_mode & S_IFDIR) {
+ if (g_stat (file, &st) != 0) {
+ g_warning ("%s does not exist.\n"
+ "Authentication via PAM is unlikely to work.",
+ file);
+ }
+ } else if (g_stat (file2, &st) == 0) {
+ FILE *f = g_fopen (file2, "r");
+ if (f) {
+ gboolean ok = FALSE;
+ char buf[255];
+ while (fgets (buf, sizeof(buf), f)) {
+ if (strstr (buf, PAM_SERVICE_NAME)) {
+ ok = TRUE;
+ break;
+ }
+ }
+
+ fclose (f);
+ if (!ok) {
+ g_warning ("%s does not list the `%s' service.\n"
+ "Authentication via PAM is unlikely to work.",
+ file2, PAM_SERVICE_NAME);
+ }
+ }
+ /* else warn about file2 existing but being unreadable? */
+ } else {
+ g_warning ("Neither %s nor %s exist.\n"
+ "Authentication via PAM is unlikely to work.",
+ file2, file);
+ }
+}
+
+int
+main (int argc,
+ char **argv)
+{
+ gboolean can_lock, ret;
+ gchar *nolock_reason;
+ gchar *orig_uid;
+ gchar *uid_message;
+ gchar **out_argv;
+ gchar *out_cmd;
+ GPtrArray *array = g_ptr_array_new ();
+ const gchar * const *dirs;
+
+ pam_check ();
+
+ can_lock = hack_uid (&nolock_reason,
+ &orig_uid,
+ &uid_message);
+
+ if (nolock_reason) {
+ g_print ("Locking disabled: %s\n", nolock_reason);
+ }
+
+ if (uid_message) {
+ g_print ("Modified UID: %s\n", uid_message);
+ }
+
+ g_free (nolock_reason);
+ g_free (orig_uid);
+ g_free (uid_message);
+
+ /* Locate the cinnamon-screensaver datadir */
+ out_cmd = NULL;
+ dirs = g_get_system_data_dirs ();
+
+ if (dirs != NULL)
+ {
+ guint j;
+
+ for (j = 0; j < g_strv_length ((gchar **) dirs); j++)
+ {
+ const gchar *dir = dirs[j];
+
+ gchar *tryname = g_build_filename (dir, "cinnamon-screensaver", "cinnamon-screensaver-main.py", NULL);
+
+ if (g_file_test (tryname, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_EXECUTABLE))
+ {
+ out_cmd = g_strdup (tryname);
+ }
+
+ g_free (tryname);
+
+ if (out_cmd != NULL)
+ {
+ break;
+ }
+ }
+ }
+
+ if (out_cmd == NULL)
+ {
+ g_printerr ("Could not locate cinnamon-screensaver install location");
+ exit(1);
+ }
+
+ /* Construct the argv[] for cinnamon-screensaver-main.py */
+ g_ptr_array_add (array, g_strdup ("cinnamon-screensaver-main.py"));
+
+ if (argc > 1)
+ {
+ gint i;
+ /* Skip argv[0] - which would be 'cinnamon-screensaver' */
+ for (i = 1; i < argc; i++)
+ {
+ g_ptr_array_add (array, g_strdup (argv[i]));
+ }
+ }
+
+ if (!can_lock)
+ {
+ g_ptr_array_add (array, g_strdup ("--disable-lock"));
+ }
+
+ g_ptr_array_add (array, NULL);
+
+ out_argv = (gchar **) g_ptr_array_free (array, FALSE);
+
+ ret = execv (out_cmd, out_argv);
+
+ g_strfreev (out_argv);
+ g_free (out_cmd);
+
+ return ret;
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.3/src/binfiles/cinnamon-screensaver.in new/cinnamon-screensaver-3.2.6/src/binfiles/cinnamon-screensaver.in
--- old/cinnamon-screensaver-3.2.3/src/binfiles/cinnamon-screensaver.in 2016-11-17 10:50:34.000000000 +0100
+++ new/cinnamon-screensaver-3.2.6/src/binfiles/cinnamon-screensaver.in 1970-01-01 01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-#! /bin/sh
-
-exec @datadir@/cinnamon-screensaver/cinnamon-screensaver-main.py "$@"
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.3/src/binfiles/setuid.c new/cinnamon-screensaver-3.2.6/src/binfiles/setuid.c
--- old/cinnamon-screensaver-3.2.3/src/binfiles/setuid.c 1970-01-01 01:00:00.000000000 +0100
+++ new/cinnamon-screensaver-3.2.6/src/binfiles/setuid.c 2016-11-24 23:39:41.000000000 +0100
@@ -0,0 +1,245 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * setuid.c --- management of runtime privileges.
+ *
+ * xscreensaver, Copyright (c) 1993-1998 Jamie Zawinski <jwz(a)jwz.org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation. No representations are made about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
+ * implied warranty.
+ */
+
+#include "config.h"
+
+#include <errno.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <pwd.h> /* for getpwnam() and struct passwd */
+#include <grp.h> /* for getgrgid() and struct group */
+
+#include "setuid.h"
+
+static char *
+uid_gid_string (uid_t uid,
+ gid_t gid)
+{
+ static char *buf;
+ struct passwd *p = NULL;
+ struct group *g = NULL;
+
+ p = getpwuid (uid);
+ g = getgrgid (gid);
+
+ buf = g_strdup_printf ("%s/%s (%ld/%ld)",
+ (p && p->pw_name ? p->pw_name : "???"),
+ (g && g->gr_name ? g->gr_name : "???"),
+ (long) uid, (long) gid);
+
+ return buf;
+}
+
+static gboolean
+set_ids_by_number (uid_t uid,
+ gid_t gid,
+ char **message_ret)
+{
+ int uid_errno = 0;
+ int gid_errno = 0;
+ int sgs_errno = 0;
+ struct passwd *p = getpwuid (uid);
+ struct group *g = getgrgid (gid);
+
+ if (message_ret)
+ *message_ret = NULL;
+
+ /* Rumor has it that some implementations of of setuid() do nothing
+ when called with -1; therefore, if the "nobody" user has a uid of
+ -1, then that would be Really Bad. Rumor further has it that such
+ systems really ought to be using -2 for "nobody", since that works.
+ So, if we get a uid (or gid, for good measure) of -1, switch to -2
+ instead. Note that this must be done after we've looked up the
+ user/group names with getpwuid(-1) and/or getgrgid(-1).
+ */
+ if (gid == (gid_t) -1) gid = (gid_t) -2;
+ if (uid == (uid_t) -1) uid = (uid_t) -2;
+
+ errno = 0;
+ if (setgroups (1, &gid) < 0)
+ sgs_errno = errno ? errno : -1;
+
+ errno = 0;
+ if (setgid (gid) != 0)
+ gid_errno = errno ? errno : -1;
+
+ errno = 0;
+ if (setuid (uid) != 0)
+ uid_errno = errno ? errno : -1;
+
+ if (uid_errno == 0 && gid_errno == 0 && sgs_errno == 0) {
+ static char *reason;
+ reason = g_strdup_printf ("changed uid/gid to %s/%s (%ld/%ld).",
+ (p && p->pw_name ? p->pw_name : "???"),
+ (g && g->gr_name ? g->gr_name : "???"),
+ (long) uid, (long) gid);
+ if (message_ret)
+ *message_ret = g_strdup (reason);
+
+ g_free (reason);
+
+ return TRUE;
+ } else {
+ char *reason = NULL;
+
+ if (sgs_errno) {
+ reason = g_strdup_printf ("couldn't setgroups to %s (%ld)",
+ (g && g->gr_name ? g->gr_name : "???"),
+ (long) gid);
+ if (sgs_errno == -1)
+ fprintf (stderr, "%s: unknown error\n", reason);
+ else {
+ errno = sgs_errno;
+ perror (reason);
+ }
+ g_free (reason);
+ reason = NULL;
+ }
+
+ if (gid_errno) {
+ reason = g_strdup_printf ("couldn't set gid to %s (%ld)",
+ (g && g->gr_name ? g->gr_name : "???"),
+ (long) gid);
+ if (gid_errno == -1)
+ fprintf (stderr, "%s: unknown error\n", reason);
+ else {
+ errno = gid_errno;
+ perror (reason);
+ }
+ g_free (reason);
+ reason = NULL;
+ }
+
+ if (uid_errno) {
+ reason = g_strdup_printf ("couldn't set uid to %s (%ld)",
+ (p && p->pw_name ? p->pw_name : "???"),
+ (long) uid);
+ if (uid_errno == -1)
+ fprintf (stderr, "%s: unknown error\n", reason);
+ else {
+ errno = uid_errno;
+ perror (reason);
+ }
+ g_free (reason);
+ reason = NULL;
+ }
+ return FALSE;
+ }
+ return FALSE;
+}
+
+
+/* If we've been run as setuid or setgid to someone else (most likely root)
+ turn off the extra permissions so that random user-specified programs
+ don't get special privileges. (On some systems it is necessary to install
+ this program as setuid root in order to read the passwd file to implement
+ lock-mode.)
+
+ *** WARNING: DO NOT DISABLE ANY OF THE FOLLOWING CODE!
+ If you do so, you will open a security hole. See the sections
+ of the xscreensaver manual titled "LOCKING AND ROOT LOGINS",
+ and "USING XDM".
+*/
+
+/* Returns TRUE if OK to lock, FALSE otherwise */
+gboolean
+hack_uid (char **nolock_reason,
+ char **orig_uid,
+ char **uid_message)
+{
+ char *reason;
+ gboolean ret;
+
+ ret = TRUE;
+ reason = NULL;
+
+ if (nolock_reason != NULL) {
+ *nolock_reason = NULL;
+ }
+ if (orig_uid != NULL) {
+ *orig_uid = NULL;
+ }
+ if (uid_message != NULL) {
+ *uid_message = NULL;
+ }
+
+ /* Discard privileges, and set the effective user/group ids to the
+ real user/group ids. That is, give up our "chmod +s" rights.
+ */
+ {
+ uid_t euid = geteuid ();
+ gid_t egid = getegid ();
+ uid_t uid = getuid ();
+ gid_t gid = getgid ();
+
+ if (orig_uid != NULL) {
+ *orig_uid = uid_gid_string (euid, egid);
+ }
+
+#ifdef HAVE_BSDAUTH /* we need to setgid auth to run the bsd_auth(3) login_* helpers */
+ {
+ struct group *authg = getgrnam("auth");
+ if (!authg || !authg->gr_name || !*authg->gr_name) {
+ reason = g_strdup ("no such group as \"auth\" for bsdauth.");
+
+ ret = FALSE;
+ goto out;
+ }
+ if (! set_ids_by_number (uid, authg->gr_gid, uid_message)) {
+ reason = g_strdup ("cannot setgid \"auth\" for bsdauth.");
+
+ ret = FALSE;
+ goto out;
+ }
+ }
+#else /* !HAVE_BSDAUTH */
+ if (uid != euid || gid != egid) {
+ if (! set_ids_by_number (uid, gid, uid_message)) {
+ reason = g_strdup ("unable to discard privileges.");
+
+ ret = FALSE;
+ goto out;
+ }
+ }
+#endif
+ }
+
+
+ /* Locking can't work when running as root, because we have no way of
+ knowing what the user id of the logged in user is (so we don't know
+ whose password to prompt for.)
+
+ *** WARNING: DO NOT DISABLE THIS CODE!
+ If you do so, you will open a security hole. See the sections
+ of the xscreensaver manual titled "LOCKING AND ROOT LOGINS",
+ and "USING XDM".
+ */
+ if (getuid () == (uid_t) 0) {
+ reason = g_strdup ("running as root");
+ ret = FALSE;
+ goto out;
+ }
+
+ out:
+ if (nolock_reason != NULL) {
+ *nolock_reason = g_strdup (reason);
+ }
+ g_free (reason);
+
+ return ret;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.3/src/binfiles/setuid.h new/cinnamon-screensaver-3.2.6/src/binfiles/setuid.h
--- old/cinnamon-screensaver-3.2.3/src/binfiles/setuid.h 1970-01-01 01:00:00.000000000 +0100
+++ new/cinnamon-screensaver-3.2.6/src/binfiles/setuid.h 2016-11-24 23:39:41.000000000 +0100
@@ -0,0 +1,27 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * xscreensaver, Copyright (c) 1993-2004 Jamie Zawinski <jwz(a)jwz.org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation. No representations are made about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
+ * implied warranty.
+ */
+
+#ifndef __GS_SETUID_H
+#define __GS_SETUID_H
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+gboolean hack_uid (char **nolock_reason,
+ char **orig_uid,
+ char **uid_message);
+
+G_END_DECLS
+
+#endif /* __GS_SETUID_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.3/src/cinnamon-screensaver-gtk3.14.css new/cinnamon-screensaver-3.2.6/src/cinnamon-screensaver-gtk3.14.css
--- old/cinnamon-screensaver-3.2.3/src/cinnamon-screensaver-gtk3.14.css 2016-11-17 10:50:34.000000000 +0100
+++ new/cinnamon-screensaver-3.2.6/src/cinnamon-screensaver-gtk3.14.css 2016-11-24 23:39:41.000000000 +0100
@@ -194,14 +194,6 @@
background-color: alpha(white, .5);
}
-.csstage .positionlabel {
- font-family: monospace;
- font-size: 10px;
- text-shadow: 1px 1px alpha(black, 0.8);
- background-image: none;
- background-color: transparent;
-}
-
.csstage .trackname {
font-family: monospace;
font-size: 12px;
@@ -218,13 +210,6 @@
background-color: transparent;
}
-.csstage .positionbar {
- -GtkProgressBar-min-horizontal-bar-height: 14;
- -GtkProgressBar-min-horizontal-bar-width: 180;
- background-color: rgba(255, 255, 255, .1);
- color: @theme_selected_bg_color;
-}
-
.csstage GtkViewport {
background-color: transparent;
background-image: none;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.3/src/cinnamon-screensaver-gtk3.18.css new/cinnamon-screensaver-3.2.6/src/cinnamon-screensaver-gtk3.18.css
--- old/cinnamon-screensaver-3.2.3/src/cinnamon-screensaver-gtk3.18.css 2016-11-17 10:50:34.000000000 +0100
+++ new/cinnamon-screensaver-3.2.6/src/cinnamon-screensaver-gtk3.18.css 2016-11-24 23:39:41.000000000 +0100
@@ -194,14 +194,6 @@
background-color: alpha(white, .5);
}
-.csstage .positionlabel {
- font-family: monospace;
- font-size: 10px;
- text-shadow: 1px 1px alpha(black, 0.8);
- background-image: none;
- background-color: transparent;
-}
-
.csstage .trackname {
font-family: monospace;
font-size: 12px;
@@ -218,13 +210,6 @@
background-color: transparent;
}
-.csstage .positionbar {
- -GtkProgressBar-min-horizontal-bar-height: 14;
- -GtkProgressBar-min-horizontal-bar-width: 180;
- background-color: rgba(255, 255, 255, .1);
- color: @theme_selected_bg_color;
-}
-
.csstage GtkViewport {
background-color: transparent;
background-image: none;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.3/src/cinnamon-screensaver-gtk3.20.css new/cinnamon-screensaver-3.2.6/src/cinnamon-screensaver-gtk3.20.css
--- old/cinnamon-screensaver-3.2.3/src/cinnamon-screensaver-gtk3.20.css 2016-11-17 10:50:34.000000000 +0100
+++ new/cinnamon-screensaver-3.2.6/src/cinnamon-screensaver-gtk3.20.css 2016-11-24 23:39:41.000000000 +0100
@@ -166,14 +166,6 @@
background-color: alpha(white, .5);
}
-.csstage .positionlabel {
- font-family: monospace;
- font-size: 10px;
- text-shadow: 1px 1px alpha(black, 0.8);
- background-image: none;
- background-color: transparent;
-}
-
.csstage .trackname {
font-family: monospace;
font-size: 12px;
@@ -190,13 +182,6 @@
background-color: transparent;
}
-.csstage .positionbar {
- min-height: 14px;
- min-width: 180px;
- background-color: rgba(255, 255, 255, .1);
- color: @theme_selected_bg_color;
-}
-
.csstage GtkViewport {
background-color: transparent;
background-image: none;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.3/src/cinnamon-screensaver-main.py new/cinnamon-screensaver-3.2.6/src/cinnamon-screensaver-main.py
--- old/cinnamon-screensaver-3.2.3/src/cinnamon-screensaver-main.py 2016-11-17 10:50:34.000000000 +0100
+++ new/cinnamon-screensaver-3.2.6/src/cinnamon-screensaver-main.py 2016-11-24 23:39:41.000000000 +0100
@@ -42,7 +42,7 @@
print("cinnamon-screensaver %s" % (config.VERSION))
quit()
- status.LockEnabled = CScreensaver.init_utils_initialize_locking(args.debug) and not args.lock_disabled
+ status.LockEnabled = not args.lock_disabled
if args.lock_disabled:
print("Locking disabled")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.3/src/dbusdepot/mediaPlayerWatcher.py new/cinnamon-screensaver-3.2.6/src/dbusdepot/mediaPlayerWatcher.py
--- old/cinnamon-screensaver-3.2.3/src/dbusdepot/mediaPlayerWatcher.py 2016-11-17 10:50:34.000000000 +0100
+++ new/cinnamon-screensaver-3.2.6/src/dbusdepot/mediaPlayerWatcher.py 2016-11-24 23:39:41.000000000 +0100
@@ -22,7 +22,6 @@
These are instantiated by our MediaPlayerWatcher.
"""
__gsignals__ = {
- "position-changed": (GObject.SignalFlags.RUN_LAST, None, (int,)),
"status-changed": (GObject.SignalFlags.RUN_LAST, None, (int,)),
"metadata-changed": (GObject.SignalFlags.RUN_LAST, None, ())
}
@@ -33,8 +32,6 @@
path)
self.metadata = None
- self.rate = 0
- self.max_position = 0
self.album_name = ""
self.track_name = ""
self.artist_name = ""
@@ -49,16 +46,6 @@
"notify::metadata",
self.on_metadata_changed)
- trackers.con_tracker_get().connect(self.proxy,
- "notify::rate",
- self.on_rate_changed)
-
- trackers.con_tracker_get().connect(self.proxy,
- "notify::position",
- self.on_position_changed)
-
- self.rate = self.proxy.get_property("rate")
-
self.ensure_metadata()
def get_playback_status(self):
@@ -116,41 +103,6 @@
return ""
- def get_position(self):
- """
- Position is a standard interface property, but according to the mpris spec,
- it is *not* updated - it is recommended to retrieve the value at the rate
- specified in the Rate property. Retrieving the value requires a round-trip
- to the player interface.
- """
- if self.ensure_proxy_alive():
- # To get the position *reliably*, we must make a round-trip, because
- # the proxy's cached property may not get updated
-
- bus = self.proxy.get_connection()
-
- pos = bus.call_sync(self.proxy.get_name(),
- self.proxy.get_object_path(),
- "org.freedesktop.DBus.Properties",
- "Get",
- GLib.Variant("(ss)", (self.proxy.get_interface_name(), "Position")),
- None,
- Gio.DBusCallFlags.NONE,
- -1,
- None)
-
- return pos[0]
-
- return 0.0
-
- def get_max_position(self):
- self.ensure_metadata()
-
- return self.max_position
-
- def get_rate(self):
- return self.rate
-
def get_track_name(self):
self.ensure_metadata()
@@ -179,10 +131,6 @@
self.metadata = self.proxy.get_property("metadata")
if self.metadata:
try:
- self.max_position = self.metadata["mpris:length"]
- except KeyError:
- self.max_position = 0
- try:
self.track_name = self.metadata["xesam:title"]
except KeyError:
self.track_name = ""
@@ -213,14 +161,6 @@
def on_playback_status_changed(self, proxy, pspec, data=None):
self.emit("status-changed", self.get_playback_status())
- def on_position_changed(self, proxy, pspec, data=None):
- position = proxy.get_property("position")
-
- self.emit("position-changed", position)
-
- def on_rate_changed(self, proxy, pspec, data=None):
- self.rate = proxy.get_property("rate")
-
def on_metadata_changed(self, proxy, pspec, data=None):
self.metadata = None
self.ensure_metadata()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.3/src/playerControl.py new/cinnamon-screensaver-3.2.6/src/playerControl.py
--- old/cinnamon-screensaver-3.2.3/src/playerControl.py 2016-11-17 10:50:34.000000000 +0100
+++ new/cinnamon-screensaver-3.2.6/src/playerControl.py 2016-11-24 23:39:41.000000000 +0100
@@ -8,10 +8,8 @@
from util import trackers, utils
from dbusdepot.mediaPlayerWatcher import PlaybackStatus
-from widgets.blinkingLabel import BlinkingLabel
from widgets.marqueeLabel import MarqueeLabel
from widgets.transparentButton import TransparentButton
-from widgets.positionBar import PositionBar
import singletons
import status
@@ -72,27 +70,6 @@
self.play_pause_button,
self.next_button]
- # Position labels and bar
-
- vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
- self.pack_start(vbox, True, True, 4)
-
- vbox.set_valign(Gtk.Align.CENTER)
-
- position_length_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
- vbox.pack_start(position_length_box, True, True, 2)
-
- self.current_pos_label = BlinkingLabel("", 400)
- self.current_pos_label.get_style_context().add_class("positionlabel")
- position_length_box.pack_start(self.current_pos_label, False, False, 2)
-
- self.max_pos_label = BlinkingLabel("", 400)
- self.max_pos_label.get_style_context().add_class("positionlabel")
- position_length_box.pack_end(self.max_pos_label, False, False, 2)
-
- self.position_bar = PositionBar()
- vbox.pack_end(self.position_bar, True, True, 2)
-
# Track info
vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
@@ -111,10 +88,6 @@
self.show_all()
trackers.con_tracker_get().connect(self.player,
- "position-changed",
- self.on_position_changed)
-
- trackers.con_tracker_get().connect(self.player,
"status-changed",
self.on_playback_status_changed)
@@ -129,8 +102,6 @@
"destroy",
self.on_widget_destroy)
- self.update_position_timer(player_status)
-
def on_previous_clicked(self, button, data=None):
self.player.go_previous()
@@ -148,47 +119,13 @@
return icon_name
- def position_to_time_string(self, position):
- """
- We receive track position and track length values in microseconds.
- This function formats this into readable HH:MM:SS format, and handles
- any invalid values.
- """
- delta = datetime.timedelta(microseconds=position)
-
- duration = datetime.datetime.utcfromtimestamp(delta.total_seconds())
-
- if duration.hour < 0:
- return _("--:--")
-
- if duration.hour < 1:
- return duration.strftime(_("%M:%S"))
- else:
- return duration.strftime(_("%H:%M:%S"))
-
def on_playback_status_changed(self, player, status, data=None):
self.update_buttons(status)
- self.update_position_timer(status)
- self.update_position_display()
-
- self.update_position_values_appearance(status)
-
- def update_position_values_appearance(self, status):
- """
- When the player is paused, we blink the position/length values.
- """
- if status == PlaybackStatus.Paused:
- self.max_pos_label.set_blinking(True)
- self.current_pos_label.set_blinking(True)
- else:
- self.max_pos_label.set_blinking(False)
- self.current_pos_label.set_blinking(False)
def on_metadata_changed(self, player):
"""
- Update max position and labels when the player metadata changes
+ Update labels when the player metadata changes
"""
- self.max_pos_label.set_text(self.position_to_time_string(self.player.get_max_position()))
self.update_labels()
def update_labels(self):
@@ -224,44 +161,8 @@
image = Gtk.Image.new_from_icon_name(icon_name, size)
self.play_pause_button.set_image(image)
- def update_position_display(self):
- """
- Updates the position values and bar to reflect the current state.
- """
- if self.player.get_position() < self.player.get_max_position():
- value = self.player.get_position() / self.player.get_max_position()
- else:
- value = 1.0
- value = utils.CLAMP(value, 0.0, 1.0)
- self.position_bar.set_fraction(value)
-
- self.current_pos_label.set_text(self.position_to_time_string(self.player.get_position()))
-
- return True
-
- def update_position_timer(self, status):
- """
- Starts or stops the position update timer - this is based upon the provided rate
- property of the player, which is defined as the recommended update frequency for position
- data.
- """
- if status == PlaybackStatus.Playing:
- trackers.timer_tracker_get().start("position-timer", self.player.get_rate() * 1000, self.update_position_display)
- else:
- trackers.timer_tracker_get().cancel("position-timer")
-
- def on_position_changed(self, player, position, data=None):
- """
- Callback for an explicit position change from the player.
- """
- self.update_position_display()
-
def on_widget_destroy(self, widget, data=None):
trackers.con_tracker_get().disconnect(self.player,
- "position-changed",
- self.on_position_changed)
-
- trackers.con_tracker_get().disconnect(self.player,
"status-changed",
self.on_playback_status_changed)
@@ -269,8 +170,6 @@
"destroy",
self.on_widget_destroy)
- trackers.timer_tracker_get().cancel("position-timer")
-
def should_show(self):
"""
Checked by the AudioPanel, whether or not this widget should be displayed.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.3/src/util/utils.py new/cinnamon-screensaver-3.2.6/src/util/utils.py
--- old/cinnamon-screensaver-3.2.3/src/util/utils.py 2016-11-17 10:50:34.000000000 +0100
+++ new/cinnamon-screensaver-3.2.6/src/util/utils.py 2016-11-24 23:39:41.000000000 +0100
@@ -68,13 +68,6 @@
except KeyError:
pass
- try:
- group = grp.getgrnam("liveuser")
- if name in group.gr_mem:
- return False
- except KeyError:
- pass
-
return True
def process_is_running(name):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.3/src/widgets/Makefile.am new/cinnamon-screensaver-3.2.6/src/widgets/Makefile.am
--- old/cinnamon-screensaver-3.2.3/src/widgets/Makefile.am 2016-11-17 10:50:34.000000000 +0100
+++ new/cinnamon-screensaver-3.2.6/src/widgets/Makefile.am 2016-11-24 23:39:41.000000000 +0100
@@ -9,11 +9,9 @@
app_PYTHON = \
__init__.py \
- blinkingLabel.py \
framedImage.py \
marqueeLabel.py \
notificationWidget.py \
- positionBar.py \
powerWidget.py \
transparentButton.py \
volumeSlider.py \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.3/src/widgets/blinkingLabel.py new/cinnamon-screensaver-3.2.6/src/widgets/blinkingLabel.py
--- old/cinnamon-screensaver-3.2.3/src/widgets/blinkingLabel.py 2016-11-17 10:50:34.000000000 +0100
+++ new/cinnamon-screensaver-3.2.6/src/widgets/blinkingLabel.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,116 +0,0 @@
-#! /usr/bin/python3
-
-from gi.repository import Gtk, GObject, GLib
-from util import trackers
-
-class BlinkingLabel(Gtk.Label):
- """
- Used by the PlayerControl position and max_position elements.
-
- When the player is in a paused state, we have these labels blink.
- """
- def __init__(self, text, rate):
- super(BlinkingLabel, self).__init__()
-
- self.rate = rate
-
- self.current_opacity = 1.0
- self.target_opacity = 0.0
-
- self.blinking = False
-
- self.tick_id = 0
- self.stop_blinking = False
-
- self.start_time = 0
- self.end_time = 0
-
- trackers.con_tracker_get().connect(self,
- "realize",
- self.on_realized)
-
- def on_realized(self, widget, data=None):
- if self.blinking and self.tick_id == 0:
- GObject.idle_add(self._blink_idle)
-
- trackers.con_tracker_get().disconnect(self,
- "realize",
- self.on_realized)
-
- def set_blinking(self, blinking):
- self.blinking = blinking
-
- if blinking and self.tick_id == 0:
- GObject.idle_add(self._blink_idle)
- elif self.tick_id > 0:
- self.stop_blinking = True
-
- def get_blinking(self, blinking):
- return self.tick_id > 0
-
- def cancel(self):
- if self.tick_id > 0:
- self.remove_tick_callback(self.tick_id)
- self.tick_id = 0
-
- self.stop_blinking = False
-
- def _blink_idle(self):
- self.current_opacity = self.get_opacity()
-
- if self.current_opacity == 1.0:
- self.target_opacity = 0.0
- else:
- self.target_opacity = 1.0
-
- if not self.get_visible():
- self.set_visible(True)
-
- if self.get_mapped():
- self.start_time = self.get_frame_clock().get_frame_time()
- self.end_time = self.start_time + (self.rate * 1000) # ms to microsec
-
- if self.tick_id == 0:
- self.tick_id = self.add_tick_callback(self._on_blink_tick)
-
- self._blink_step(self.start_time)
-
- return GLib.SOURCE_REMOVE
-
- def _on_blink_tick(self, widget, clock, data=None):
- now = clock.get_frame_time()
-
- self._blink_step(now)
-
- if self.stop_blinking:
- self.target_opacity = 1.0
-
- if self.current_opacity == self.target_opacity:
- if self.stop_blinking and self.current_opacity == 1.0:
- self.cancel()
- return GLib.SOURCE_REMOVE
-
- self.start_time = self.end_time
- self.end_time += (self.rate * 1000)
- self.reverse_direction()
-
- return GLib.SOURCE_CONTINUE
-
- def _blink_step(self, now):
- if now < self.end_time:
- if self.current_opacity < self.target_opacity:
- t = (now - self.start_time) / (self.end_time - self.start_time)
- else:
- t = 1.0 - ((now - self.start_time) / (self.end_time - self.start_time))
- else:
- t = self.target_opacity
-
- self.current_opacity = t
- self.set_opacity(self.current_opacity)
- self.queue_draw()
-
- def reverse_direction(self):
- if self.target_opacity == 0.0:
- self.target_opacity = 1.0
- else:
- self.target_opacity = 0.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.2.3/src/widgets/positionBar.py new/cinnamon-screensaver-3.2.6/src/widgets/positionBar.py
--- old/cinnamon-screensaver-3.2.3/src/widgets/positionBar.py 2016-11-17 10:50:34.000000000 +0100
+++ new/cinnamon-screensaver-3.2.6/src/widgets/positionBar.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,61 +0,0 @@
-#! /usr/bin/python3
-
-from gi.repository import Gtk, Gdk
-
-from util import trackers
-
-class PositionBar(Gtk.ProgressBar):
- """
- A custom GtkProgressBar for displaying the current track position.
- """
- def __init__(self):
- super(PositionBar, self).__init__(orientation=Gtk.Orientation.HORIZONTAL)
- self.get_style_context().add_class("positionbar")
-
- self.set_can_focus(False)
-
- self.set_halign(Gtk.Align.CENTER)
- self.set_valign(Gtk.Align.CENTER)
-
- trackers.con_tracker_get().connect(self,
- "draw",
- self.on_draw)
-
- def on_draw(self, widget, cr):
- ctx = widget.get_style_context()
- alloc = self.get_allocation()
-
- padding = ctx.get_padding(Gtk.StateFlags.NORMAL)
- border = ctx.get_border(Gtk.StateFlags.NORMAL)
-
- x = padding.left + border.left
- y = padding.top + border.top
- width = alloc.width - padding.left - padding.right - border.left - border.right
- height = alloc.height - padding.top - padding.bottom - border.top - border.bottom
- floor = y + height
- end = x + width
- value = self.get_fraction()
- value_width = value * width
-
- fill_color = ctx.get_color(Gtk.StateFlags.NORMAL)
- bg_color = ctx.get_background_color(Gtk.StateFlags.NORMAL)
-
- cr.save()
-
- cr.new_sub_path()
- cr.rectangle(x, y, end, floor)
- Gdk.cairo_set_source_rgba(cr, bg_color)
- cr.fill()
-
- cr.restore()
- cr.save()
-
- cr.new_sub_path()
- cr.rectangle(x, y, value_width, floor)
- Gdk.cairo_set_source_rgba(cr, fill_color)
- cr.fill()
-
- cr.restore()
-
- return True
-
1
0
Hello community,
here is the log from the commit of package perl-Image-ExifTool for openSUSE:Factory checked in at 2016-11-28 15:09:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Image-ExifTool (Old)
and /work/SRC/openSUSE:Factory/.perl-Image-ExifTool.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Image-ExifTool"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Image-ExifTool/perl-Image-ExifTool.changes 2016-06-19 10:50:11.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Image-ExifTool.new/perl-Image-ExifTool.changes 2016-11-28 15:09:21.000000000 +0100
@@ -3,0 +4,166 @@
+- Update to version 10.36 (changes since 10.20):
+ * Add a new Minolta/Sony LensType.
+ * Add a new element to the XMP Colorant structure.
+ * Add a new Pentax lens.
+ * Decode Nikon D5/D500 AF information.
+ * Decode a number of new Olympus tags.
+ * Decode a number of new Nikon tags.
+ * Decode Pentax K-1 AF points.
+ * Extract a new DPX tag.
+ * Patch to avoid writing an empty structure field for an
+ undefined value.
+ * Add read support for BPG images.
+ * Minor changes to a few of the new Nikon tags.
+ * Add read support for Ogg Opus audio files.
+ * Add ability to geotag only GPS date/time if no position
+ information is available by setting Geotag to 'DATETIMEONLY'
+ (all caps).
+ * Add a '-charset RIFF' option.
+ * Add a new Sony LensType.
+ * Decode a number of new Canon tags.
+ * Change handling of special characters in RIFF-format files
+ (e.g. AVI, WAV).
+ * Change MIME type of OGG files to audio/ogg (was audio/x-ogg).
+ * Minor change to wording of new Nikon D80 Rotation tag for
+ consistency.
+ * Add support for DJI Phantom maker notes.
+ * Add a few more XMP-crs tags.
+ * Add an ability to write DNG OpcodeList tags.
+ * Add a new Sony/Minolta LensType.
+ * Add a few new FujiFilm Saturation values.
+ * Add a new FujiFlashMode value.
+ * Fix an incorrect Italian translation.
+ * Decode more Pentax tags.
+ * Change print conversion of ProcessingTime to show 3 significant
+ digits.
+ * Fix bug decoding PanasonicRaw DistortionInfo in DNG images.
+ * Add a new Pentax PictureMode.
+ * Add a new Nikon LensID.
+ * Decode a new Samsung tag.
+ * Decode a few more Canon tags.
+ * Remove an 'Avoid' flag for XMP-crs:ColorTemperature.
+ * Change the format of a number of XMP-GPano tags from integer
+ to real.
+ * Fix incorrect tag ID's for some obscure Island Graphics EXIF
+ tags.
+ * Fix decoding of some UTF-8 DNG tags which may be stored in BYTE
+ format.
+ * Add read support for GSpherical metadata in MP4 videos.
+ * Add a few new XMP-xmpMM tags and a new XMP-crs tag.
+ * Add some new Minolta/Sony lenses.
+ * Add two new CanonModelID's.
+ * Add two new Canon LensType's.
+ * Decode a number of Nikon D610 custom settings.
+ * Remove a questionable Samsung tag.
+ * Mark TestName tag as 'Unsafe' for writing.
+ * Enhance a -progress option with ability to set a console
+ window title.
+ * Change behaviour of %C to increment for each processed file as
+ documented (was incrementing for each output file created).
+ * Patch to recreate XMP in the standard location of PNG images
+ when deleting certain non-standard XMP as a group and
+ recreating in one step.
+ * Fix runtime warning when writing 0 to MinoltaRaw ISOSetting.
+ * Fix a problem writing SRW images from some newer Samsung models.
+ * Add a new CanonModelID.
+ * Add a new Sony LensType.
+ * Add a few new NikonLensID's.
+ * Add a couple of new Olympus LensType values.
+ * Add a new Olympus CameraType.
+ * Decode some Canon 80D, 750D, 760D and 1200D CameraInfo tags.
+ * Change writing of some ExposureTime and ExposureCompensation
+ tags to allow the exact numerator and denominator of the stored
+ rational value to be specified.
+ * Fix Timecode printout in -v3 output for M2TS videos.
+ * Fix some problems with the new '-progress:TITLE'.
+ * Fix a problem where '_exiftool_tmp' file could be left around
+ after a failed write attempt
+ * Fix a potential 'isn't numeric' runtime error when reading a
+ PDF file with the -ee option.
+ * Add support for new EXIF 2.31 tags.
+ * Add some new Canon LensType values.
+ * Add a new Olympus LensType.
+ * Add the new Sony LensType and SonyModelID.
+ * Add a new Pentax LensType.
+ * Add fotoware.config and bibble.config files to the distribution.
+ * Made Composite SubSecDateTimeOriginal, SubSecCreateDate and
+ SubSecModifyDate tags writable, and expanded to include new
+ EXIF 2.31 time zone tags.
+ * Fix a problem writing user-defined structured tag elements
+ with a dot (.) in their tag ID.
+ * Add a couple of new Sony LensType values.
+ * Decode a few new Sony tags.
+ * Decode a few new FLIR tags.
+ * Decode some new Nikon D5 tags.
+ * Decode a new Apple tag.
+ * Enhance -geotag option to allow tagging from KML placemarks
+ with a TimeSpan.
+ * Enhance the -d option (and an API DateFormat option) to perform
+ inverse date/time conversion when writing if the
+ POSIX::strptime module is available. If POSIX::strptime is not
+ available then the behaviour is like in older versions (i.e.
+ the date/time is not converted) unless the API StrictDate
+ option is set in which case a warning is issued and the tag is
+ not written.
+ * Add a read support for FLIF images.
+ * Add a couple of new Minolta/Sony LensType values.
+ * Add a new SonyModelID.
+ * Add a new digiKam XMP tag.
+ * Decode a new Apple tag.
+ * Decode a few new FujiFilm tags.
+ * Decode more Nikon D5 custom settings.
+ * Decode a couple more Samsung tags.
+ * Improve decoding of the Nikon D500/D5 ShotInfo information.
+ * Enhance a -ver option to output system information when -v is
+ added.
+ * A minor change to parsing of the -@ argfile (comment lines may
+ no longer have spaces before the '#').
+ * Patch the Jpeg2000 reader to read bad UUID-EXIF boxes.
+ * Lower priority of unknown XMP tags when reading.
+ * Fix a potential 'Use of uninitialized value' warning when
+ decoding compressed a PNG iTXt chunk.
+ * Add a write support for FLIF images.
+ * Add a support for animated PNG images.
+ * Add a few new SamsungModelID values.
+ * Add a new Canon LensType.
+ * Add a new Sony/Minolta LensType.
+ * Decode more Samsung tags.
+ * Decode more Nikon tags.
+ * Change the 'TAG does not exist' warning when writing to
+ 'TAG is not supported'.
+ * Fix a problem importing information from CSV or JSON databases
+ for files with special characters in their name.
+ * Time::Piece may now be used as an alternative to
+ POSIX::strptime for parsing date/time values when writing.
+ * Add a number of new XMP tags.
+ * Add a support for a few new Sony cameras.
+ * Add a new Nikon LensID.
+ * Decode a new Nikon tag.
+ * Decode the FLIF encoding type.
+ * Decode a new Samsung tag.
+ * Ignore a -filter option for a tag if it returns an undefined
+ value.
+ * Fix an encoding problem with EXIF:Copyright when writing MWG
+ tags using an alternate EXIF charset.
+ * Add a support for new IPTC Extension version 1.3 + video
+ metadata XMP tags.
+ * Add a missing print conversion for PreviewDateTime.
+ * Decode a few new FujiFilm tags.
+ * Enhance MWG date/time tags to support new EXIF time offsets.
+ * Patch a loophole in WriteMode which would allow creation of new
+ metadata files when creation of new groups was disallowed.
+ * Fix a problem where some EXIF date/time tags may not shifted
+ when shifting all date/time tags with '-time:all-=VAL' when the
+ MWG feature was used.
+ * Add 3D Studio MAX files to the list of supported file types.
+ * Decode more Sony tags.
+ * Decode a couple more FlashPix tags.
+ * Minor changes to some of the new IPTC Extension tags.
+ * Fix a problem reading some FlashPix (Windows Compound Binary
+ Format) files.
+ * API Changes:
+ + add a CharsetRIFF option.
+
+-------------------------------------------------------------------
+Tue Jun 14 17:43:24 UTC 2016 - sor.alexei(a)meowr.ru
+
Old:
----
Image-ExifTool-10.20.tar.gz
New:
----
Image-ExifTool-10.36.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Image-ExifTool.spec ++++++
--- /var/tmp/diff_new_pack.gqN9nE/_old 2016-11-28 15:09:22.000000000 +0100
+++ /var/tmp/diff_new_pack.gqN9nE/_new 2016-11-28 15:09:22.000000000 +0100
@@ -18,7 +18,7 @@
%define cpan_name Image-ExifTool
Name: perl-Image-ExifTool
-Version: 10.20
+Version: 10.36
Release: 0
Summary: Perl module to read and write meta information
License: GPL-1.0+ or Artistic-1.0
@@ -74,10 +74,10 @@
%build
perl Makefile.PL INSTALLDIRS=vendor
-make %{?_smp_mflags}
+make %{?_smp_mflags} V=1
%check
-make %{?_smp_mflags} test
+make %{?_smp_mflags} V=1 test
%install
%perl_make_install
++++++ Image-ExifTool-10.20.tar.gz -> Image-ExifTool-10.36.tar.gz ++++++
++++ 47547 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package mate-tweak for openSUSE:Factory checked in at 2016-11-28 15:09:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mate-tweak (Old)
and /work/SRC/openSUSE:Factory/.mate-tweak.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mate-tweak"
Changes:
--------
--- /work/SRC/openSUSE:Factory/mate-tweak/mate-tweak.changes 2016-07-27 16:12:28.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.mate-tweak.new/mate-tweak.changes 2016-11-28 15:09:15.000000000 +0100
@@ -1,0 +2,7 @@
+Fri Nov 25 20:23:14 UTC 2016 - sor.alexei(a)meowr.ru
+
+- Update to version 16.10.5:
+ * Add a comment to appear in mate-menu.
+ * Support Metacity 3.20+.
+
+-------------------------------------------------------------------
Old:
----
mate-tweak-16.10.4.tar.gz
New:
----
mate-tweak-16.10.5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mate-tweak.spec ++++++
--- /var/tmp/diff_new_pack.ugW0OI/_old 2016-11-28 15:09:16.000000000 +0100
+++ /var/tmp/diff_new_pack.ugW0OI/_new 2016-11-28 15:09:16.000000000 +0100
@@ -17,9 +17,9 @@
%define _name mate_tweak
-%define _rev a80951f0ac1d
+%define _rev 197ee3a56604
Name: mate-tweak
-Version: 16.10.4
+Version: 16.10.5
Release: 0
Summary: MATE desktop tweak tool
License: GPL-2.0+
++++++ mate-tweak-16.10.4.tar.gz -> mate-tweak-16.10.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ubuntu-mate-mate-tweak-a80951f0ac1d/mate-tweak new/ubuntu-mate-mate-tweak-197ee3a56604/mate-tweak
--- old/ubuntu-mate-mate-tweak-a80951f0ac1d/mate-tweak 2016-07-13 00:13:54.000000000 +0200
+++ new/ubuntu-mate-mate-tweak-197ee3a56604/mate-tweak 2016-08-22 15:56:03.000000000 +0200
@@ -58,7 +58,7 @@
# Workaround introspection bug, gnome bug 622084
signal.signal(signal.SIGINT, signal.SIG_DFL)
-__VERSION__ = '16.10.4'
+__VERSION__ = '16.10.5'
__SYNAPSE__ = """[Desktop Entry]
Name=Synapse
@@ -376,10 +376,10 @@
self.set_string('org.gnome.desktop.interface', None, 'cursor-theme', mate_cursor_theme)
self.set_int('org.gnome.desktop.interface', None, 'cursor-size', mate_cursor_size)
- # metacity >= 3.16 - this schema may not be installed
- metacity_schema = schemasource.lookup('org.gnome.metacity', False)
+ # metacity >= 3.20 - this schema may not be installed
+ metacity_schema = schemasource.lookup('org.gnome.metacity.theme', False)
if metacity_schema:
- self.set_string('org.gnome.metacity', None, 'theme', mate_theme)
+ self.set_string('org.gnome.metacity.theme', None, 'name', mate_theme)
# If switching away from a compton or xcompmgr composited window
# manager kill compton.
1
0
Hello community,
here is the log from the commit of package wine for openSUSE:Factory checked in at 2016-11-28 15:09:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/wine (Old)
and /work/SRC/openSUSE:Factory/.wine.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "wine"
Changes:
--------
--- /work/SRC/openSUSE:Factory/wine/wine.changes 2016-11-15 18:01:58.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.wine.new/wine.changes 2016-11-28 15:09:08.000000000 +0100
@@ -1,0 +2,16 @@
+Fri Nov 25 20:26:36 UTC 2016 - meissner(a)suse.com
+
+- Updated to 1.9.24 development snapshot
+ - Support for unordered access views in Direct3D.
+ - Many fixes in the regression tests.
+ - Some more improvements in HID support.
+ - Various bug fixes.
+- updated winetricks
+
+-------------------------------------------------------------------
+Mon Nov 21 10:28:38 UTC 2016 - meissner(a)suse.com
+
+- downgrade requires of cabextract and unzip to recommends, so we can
+ use 32bit wine during build on reduced 32bit package sets.
+
+-------------------------------------------------------------------
Old:
----
wine-1.9.23.tar.bz2
wine-1.9.23.tar.bz2.sign
New:
----
wine-1.9.24.tar.bz2
wine-1.9.24.tar.bz2.sign
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ wine.spec ++++++
--- /var/tmp/diff_new_pack.Bjb90w/_old 2016-11-28 15:09:11.000000000 +0100
+++ /var/tmp/diff_new_pack.Bjb90w/_new 2016-11-28 15:09:11.000000000 +0100
@@ -54,8 +54,8 @@
BuildRequires: valgrind-devel
BuildRequires: xorg-x11-devel
BuildRequires: pkgconfig(libudev)
-%define realver 1.9.23
-Version: 1.9.23
+%define realver 1.9.24
+Version: 1.9.24
Release: 0
Summary: An MS Windows Emulator
License: LGPL-2.1+
@@ -87,9 +87,9 @@
%ifarch x86_64
Requires: %{name}-32bit = %{version}
%endif
-# for winetricks:
-Requires: cabextract
-Requires: unzip
+# some recommends for winetricks:
+Recommends: cabextract
+Recommends: unzip
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %{ix86} x86_64 ppc %arm
++++++ wine-1.9.23.tar.bz2 -> wine-1.9.24.tar.bz2 ++++++
/work/SRC/openSUSE:Factory/wine/wine-1.9.23.tar.bz2 /work/SRC/openSUSE:Factory/.wine.new/wine-1.9.24.tar.bz2 differ: char 11, line 1
++++++ winetricks ++++++
--- /var/tmp/diff_new_pack.Bjb90w/_old 2016-11-28 15:09:11.000000000 +0100
+++ /var/tmp/diff_new_pack.Bjb90w/_new 2016-11-28 15:09:11.000000000 +0100
@@ -1,4 +1,8 @@
#!/bin/sh
+# shellcheck disable=SC2030,SC2031
+# SC2030: Modification of WINE is local (to subshell caused by (..) group).
+# SC2031: WINE was modified in a subshell. That change might be lost
+# This has to be right after the shebang, see: https://github.com/koalaman/shellcheck/issues/779
# Name of this version of winetricks (YYYYMMDD)
# (This doesn't change often, use the sha1sum of the file when reporting problems)
@@ -758,11 +762,11 @@
}
# Download a file
-# Usage: w_download_to packagename url [sha1sum [filename [cookie jar]]]
+# Usage: w_download_to (packagename|path to download file) url [sha1sum [filename [cookie jar]]]
# Caches downloads in winetrickscache/$packagename
w_download_to()
{
- _W_packagename="$1"
+ _W_packagename="$1" # or path to download file to
_W_url="$2"
_W_sum="$3"
_W_file="$4"
@@ -781,10 +785,14 @@
_W_file=$(basename "$_W_url")
fi
- if [ -z "${_W_packagename%%/*}" ] && pathchk -P "$_W_packagename" ; then
- _W_cache="$_W_packagename"
+ if echo "${_W_packagename}" | grep -q -e '\/-' -e '^-'; then
+ w_die "Invalid path ${_W_packagename} given"
else
- _W_cache="$W_CACHE/$_W_packagename"
+ if ! echo "${_W_packagename}" | grep -q '^/' ; then
+ _W_cache="$W_CACHE/$_W_packagename"
+ else
+ _W_cache="$_W_packagename"
+ fi
fi
if test ! -d "$_W_cache"
@@ -792,6 +800,26 @@
w_try mkdir -p "$_W_cache"
fi
+ # If WINETRICKS_DOWNLOADER is set, ensure it is to a valid value (aria2c, curl, wget), if not, error.
+ # If unset, fallback to checking for them in $PATH as before:
+
+ # shellcheck disable=2104
+ case "${WINETRICKS_DOWNLOADER}" in
+ aria2c|curl|wget) : ;;
+ "") if [ -x "$(which aria2c 2>/dev/null)" ] ; then
+ WINETRICKS_DOWNLOADER="aria2c"
+ elif [ -x "$(which wget 2>/dev/null)" ] ; then
+ WINETRICKS_DOWNLOADER="wget"
+ elif [ -x "$(which curl 2>/dev/null)" ] ; then
+ WINETRICKS_DOWNLOADER="curl"
+ else
+ w_die "Please install wget or aria2c (or, if those aren't available, curl)"
+ fi
+ ;;
+ *) w_die "Invalid value ${WINETRICKS_DOWNLOADER} given for WINETRICKS_DOWNLOADER. Possible values: aria2c, curl, wget"
+
+ esac
+
# Common values for aria2c/curl/wget
# Connection timeout time (in seconds):
WINETRICKS_DOWNLOADER_TIMEOUT=${WINETRICKS_DOWNLOADER_TIMEOUT:-15}
@@ -866,8 +894,10 @@
aria2c_torify_opts="" ;;
esac
- if [ -x "$(which aria2c 2>/dev/null)" ]
+ if [ "${WINETRICKS_DOWNLOADER}" = "aria2c" ]
then
+ # Note: aria2c wants = for most options or silently fails
+
# (Slightly fancy) aria2c support
# See https://github.com/Winetricks/winetricks/issues/612
# --daemon=false --enable-rpc=false to ensure aria2c doesnt go into the background after starting
@@ -878,19 +908,19 @@
# ovewritten by the new aria2 process
$torify aria2c \
$aria2c_torify_opts \
- --connect-timeout "${WINETRICKS_DOWNLOADER_TIMEOUT}" \
+ --connect-timeout="${WINETRICKS_DOWNLOADER_TIMEOUT}" \
--continue \
--daemon=false \
- --dir "$_W_cache" \
+ --dir="$_W_cache" \
--enable-rpc=false \
--input-file='' \
--max-connection-per-server=5 \
--max-tries="$WINETRICKS_DOWNLOADER_RETRIES" \
- --out "$_W_file" \
+ --out="$_W_file" \
--save-session='' \
--stream-piece-selector=geom \
"$_W_url"
- elif [ -x "$(which wget 2>/dev/null)" ]
+ elif [ "${WINETRICKS_DOWNLOADER}" = "wget" ]
then
# Use -nd to insulate ourselves from people who set -x in WGETRC
# [*] --retry-connrefused works around the broken sf.net mirroring
@@ -903,15 +933,17 @@
-O "$_W_file" \
-nd \
-c\
- --read-timeout=300 \
+ --read-timeout 300 \
--retry-connrefused \
--timeout "${WINETRICKS_DOWNLOADER_TIMEOUT}" \
- --tries="$WINETRICKS_DOWNLOADER_RETRIES" \
+ --tries "$WINETRICKS_DOWNLOADER_RETRIES" \
${_W_cookiejar:+--load-cookies "$_W_cookiejar"} \
${_W_agent:+--user-agent="$_W_agent"} \
"$_W_url"
- elif [ -x "$(which curl 2>/dev/null)" ]
+ elif [ "${WINETRICKS_DOWNLOADER}" = "curl" ]
then
+ # Note: curl does not accept '=' when passing options
+
# curl doesn't get filename from the location given by the server!
# fortunately, we know it
# shellcheck disable=SC2086
@@ -920,12 +952,12 @@
-L \
-o "$_W_file" \
-C - \
- --retry="$WINETRICKS_DOWNLOADER_RETRIES" \
+ --retry "$WINETRICKS_DOWNLOADER_RETRIES" \
${_W_cookiejar:+--cookie "$_W_cookiejar"} \
${_W_agent:+--user-agent "$_W_agent"} \
"$_W_url"
else
- w_die "Please install wget or aria2c (or, if those aren't available, curl)"
+ w_die "Here be dragons"
fi
if test $? = 0
then
@@ -1600,13 +1632,14 @@
chmod +x "$W_CACHE/ahk/AutoHotkey.exe"
fi
- _W_CR=$(printf \\\\r)
- cat <<_EOF_ | sed "s/\$/$_W_CR/" > "$W_TMP"/tmp.ahk
+ # Previously this used printf + sed, but that was broken with BSD sed (FreeBSD/OS X):
+ # https://github.com/Winetricks/winetricks/issues/697
+ # So now using trying awk instead (next, perl):
+ cat <<_EOF_ | awk 'sub("$", "\r")' > "$W_TMP"/tmp.ahk
w_opt_unattended = ${W_OPT_UNATTENDED:-0}
$@
_EOF_
w_try "$WINE" "$W_CACHE_WIN\\ahk\\AutoHotkey.exe" "$W_TMP_WIN"\\tmp.ahk
- unset _W_CR
}
# Function to protect Wine-specific sections of code.
@@ -8539,6 +8572,30 @@
w_override_dlls native,builtin atl90 msvcm90 msvcp90 msvcr90 vcomp90
w_try_cd "$W_CACHE/$W_PACKAGE"
w_try "$WINE" "$file1" $W_UNATTENDED_SLASH_Q
+
+ case "$W_ARCH" in
+ win64)
+ # Also install the 64-bit version
+ # 2016/11/15: a7c83077b8a28d409e36316d2d7321fa0ccdb7e8
+ w_download https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966… a7c83077b8a28d409e36316d2d7321fa0ccdb7e8
+ if w_workaround_wine_bug 30713 "Manually extracting the 64-bit dlls"
+ then
+ rm -f "$W_TMP"/* # Avoid permission error
+ w_try_cabextract --directory="$W_TMP" vcredist_x64.exe
+ w_try_cabextract --directory="$W_TMP" "$W_TMP/vc_red.cab"
+
+ w_try cp "$W_TMP"/atl90.dll.30729.6161.Microsoft_VC90_ATL_x64.QFE "$W_SYSTEM64_DLLS"/atl90.dll
+ w_try cp "$W_TMP"/mfc90.dll.30729.6161.Microsoft_VC90_MFC_x64.QFE "$W_SYSTEM64_DLLS"/mfc90.dll
+ w_try cp "$W_TMP"/mfcm90.dll.30729.6161.Microsoft_VC90_MFC_x64.QFE "$W_SYSTEM64_DLLS"/mfcm90.dll
+ w_try cp "$W_TMP"/msvcm90.dll.30729.6161.Microsoft_VC90_CRT_x64.QFE "$W_SYSTEM64_DLLS"/msvcm90.dll
+ w_try cp "$W_TMP"/msvcp90.dll.30729.6161.Microsoft_VC90_CRT_x64.QFE "$W_SYSTEM64_DLLS"/msvcp90.dll
+ w_try cp "$W_TMP"/msvcr90.dll.30729.6161.Microsoft_VC90_CRT_x64.QFE "$W_SYSTEM64_DLLS"/msvcr90.dll
+ w_try cp "$W_TMP"/vcomp90.dll.30729.6161.Microsoft_VC90_OpenMP_x64.QFE "$W_SYSTEM64_DLLS"/vcomp90.dll
+ else
+ w_try "$WINE" vcredist_x64.exe $W_UNATTENDED_SLASH_Q
+ fi
+ ;;
+ esac
}
#----------------------------------------------------------------
@@ -10819,11 +10876,11 @@
w_try_cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
Run, ${file1}
- WinWait, MetaTrader 4 Setup, license agreement
+ WinWait, MetaTrader Setup, license agreement
ControlClick, Button1
Sleep 100
ControlClick, Button3
- WinWait, MetaTrader 4 Setup, Installation successfully completed
+ WinWait, MetaTrader Setup, Installation successfully completed
ControlClick, Button4
Process, Wait, terminal.exe
Process, Close, terminal.exe
@@ -10979,23 +11036,6 @@
}
#----------------------------------------------------------------
-
-w_metadata opera apps \
- title="Opera 11" \
- publisher="Opera Software" \
- year="2011" \
- media="download" \
- file1="Opera_1150_en_Setup.exe" \
- installed_exe1="$W_PROGRAMS_X86_WIN/Opera/opera.exe"
-
-load_opera()
-{
- w_download ftp://ftp.opera.com/pub/opera/win/1150/en/Opera_1150_en_Setup.exe df50c7aed50e92af858e8834f833dd0543014b46
- w_try_cd "$W_CACHE/$W_PACKAGE"
- w_try "$WINE" "$file1" ${W_OPT_UNATTENDED:+ /silent /launchopera 0 /allusers}
-}
-
-#----------------------------------------------------------------
w_metadata picasa39 apps \
title="Picasa 3.9" \
1
0
Hello community,
here is the log from the commit of package wxhexeditor for openSUSE:Factory checked in at 2016-11-28 15:08:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/wxhexeditor (Old)
and /work/SRC/openSUSE:Factory/.wxhexeditor.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "wxhexeditor"
Changes:
--------
--- /work/SRC/openSUSE:Factory/wxhexeditor/wxhexeditor.changes 2016-08-25 09:56:17.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.wxhexeditor.new/wxhexeditor.changes 2016-11-28 15:09:00.000000000 +0100
@@ -1,0 +2,5 @@
+Fri Nov 25 17:21:33 UTC 2016 - lazy.kent(a)opensuse.org
+
+- Fix "find requires" (remove %wx_requires).
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ wxhexeditor.spec ++++++
--- /var/tmp/diff_new_pack.AIsNDE/_old 2016-11-28 15:09:02.000000000 +0100
+++ /var/tmp/diff_new_pack.AIsNDE/_new 2016-11-28 15:09:02.000000000 +0100
@@ -16,8 +16,6 @@
#
-%define _use_internal_dependency_generator 0
-%define __find_requires %{wx_requires}
%define _name wxHexEditor
Name: wxhexeditor
Version: 0.23
1
0
Hello community,
here is the log from the commit of package mininet for openSUSE:Factory checked in at 2016-11-28 15:08:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mininet (Old)
and /work/SRC/openSUSE:Factory/.mininet.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mininet"
Changes:
--------
--- /work/SRC/openSUSE:Factory/mininet/mininet.changes 2016-06-11 00:00:56.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.mininet.new/mininet.changes 2016-11-28 15:08:52.000000000 +0100
@@ -1,0 +2,6 @@
+Fri Nov 25 11:04:59 UTC 2016 - mchandras(a)suse.de
+
+- Use the openvswitch capabilities as dependencies to accept the
+ openvswitch-dpdk packages as well.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mininet.spec ++++++
--- /var/tmp/diff_new_pack.mxQknG/_old 2016-11-28 15:08:54.000000000 +0100
+++ /var/tmp/diff_new_pack.mxQknG/_new 2016-11-28 15:08:54.000000000 +0100
@@ -40,11 +40,11 @@
Requires: ethtool
Requires: iperf
Requires: iproute2
-Requires: openvswitch-switch
+Requires: openvswitch-any-switch
Requires: socat
Requires: telnet
# In case we do not have a controller already.
-Suggests: openvswitch-test
+Suggests: openvswitch-any-test
%description
Mininet emulates a complete network of hosts, links, and switches on a single
1
0
Hello community,
here is the log from the commit of package lftp for openSUSE:Factory checked in at 2016-11-28 15:08:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lftp (Old)
and /work/SRC/openSUSE:Factory/.lftp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lftp"
Changes:
--------
--- /work/SRC/openSUSE:Factory/lftp/lftp.changes 2016-08-18 10:21:32.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.lftp.new/lftp.changes 2016-11-28 15:08:45.000000000 +0100
@@ -1,0 +2,16 @@
+Fri Nov 25 13:16:41 UTC 2016 - idonmez(a)suse.com
+
+- lftp 4.7.4:
+ * mirror: new option --directory (-F) for source directories
+ glob pattern.
+ * mirror: fixed coredump with --depth-first + --recursion=newer.
+ * mirror: create inaccessible directories anyway.
+ * pget, torrent: avoid long delays in posix_fallocate(3) call.
+ * new setting dns:name for host aliases.
+ * ftp: allow SSL after certain types of ftp proxy.
+ * http: fixed interpretation of links without a protocol.
+ * cls: fixed glob metacharacter unquoting.
+ * sftp: fixed mirroring of files with a leading tilde.
+ * fixed transfer logging.
+
+-------------------------------------------------------------------
Old:
----
lftp-4.7.3.tar.xz
lftp-4.7.3.tar.xz.asc
New:
----
lftp-4.7.4.tar.xz
lftp-4.7.4.tar.xz.asc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ lftp.spec ++++++
--- /var/tmp/diff_new_pack.atDIEJ/_old 2016-11-28 15:08:46.000000000 +0100
+++ /var/tmp/diff_new_pack.atDIEJ/_new 2016-11-28 15:08:46.000000000 +0100
@@ -19,7 +19,7 @@
%define vi_version 1.1
Name: lftp
-Version: 4.7.3
+Version: 4.7.4
Release: 0
Summary: Command Line File Transfer Program
License: GPL-2.0+
++++++ lftp-4.7.3.tar.xz -> lftp-4.7.4.tar.xz ++++++
++++ 63486 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package bmake for openSUSE:Factory checked in at 2016-11-28 15:08:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bmake (Old)
and /work/SRC/openSUSE:Factory/.bmake.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "bmake"
Changes:
--------
--- /work/SRC/openSUSE:Factory/bmake/bmake.changes 2016-09-16 11:03:19.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.bmake.new/bmake.changes 2016-11-28 15:08:38.000000000 +0100
@@ -1,0 +2,16 @@
+Wed Nov 23 19:49:33 UTC 2016 - arichardson.kde(a)gmail.com
+
+- Update to 20160926
+ * Makefile (_MAKE_VERSION): 20160926
+ + Merge with NetBSD make, pick up
+ + support for .DELETE_ON_ERROR: (remove targets that fail)
+ * Makefile MAN: tweak .Dt to match ${PROG}
+
+-------------------------------------------------------------------
+Wed Nov 23 19:29:55 UTC 2016 - arichardson.kde(a)gmail.com
+
+- Install the .mk files as well
+- Use allow-overriding-compiler-variables.patch instead overwriting the
+ installed file with Linux.sys.mk
+
+-------------------------------------------------------------------
Old:
----
Linux.sys.mk
bmake-20160818.tar.gz
New:
----
allow-overriding-compiler-variables.patch
bmake-20160926.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ bmake.spec ++++++
--- /var/tmp/diff_new_pack.x1HtW6/_old 2016-11-28 15:08:39.000000000 +0100
+++ /var/tmp/diff_new_pack.x1HtW6/_new 2016-11-28 15:08:39.000000000 +0100
@@ -17,14 +17,16 @@
Name: bmake
-Version: 20160818
+Version: 20160926
Release: 0
Summary: The NetBSD make(1) tool
License: BSD-2-Clause and BSD-3-Clause and BSD-4-Clause
Group: Development/Tools/Building
Url: ftp://ftp.NetBSD.org/pub/NetBSD/misc/sjg/
Source0: ftp://ftp.NetBSD.org/pub/NetBSD/misc/sjg/bmake-%{version}.tar.gz
-Source1: Linux.sys.mk
+# PATCH-FEATURE-OPENSUSE allow-overriding-compiler-variables.patch -- Based on Linux.sys.mk which was previously shipped with this package
+# patch generated using `git diff master opensuse` from https://github.com/RichardsonAlex/bmake
+Patch0: allow-overriding-compiler-variables.patch
%description
bmake, the NetBSD make(1) tool, is a program designed to simplify the
@@ -38,6 +40,7 @@
%prep
%setup -q -n %{name}
+%patch0 -p1
%build
unset MAKEFLAGS
@@ -46,12 +49,19 @@
--prefix="%{_prefix}" \
--sysconfdir="%{_sysconfdir}" \
--with-default-sys-path="%{_datadir}/mk" \
- --mksrc none op=build
+ --without-filemon \
+ op=build
%install
-install -Dp -m0644 bmake.1 %{buildroot}%{_mandir}/man1/bmake.1
-install -Dp -m0755 Linux/bmake %{buildroot}%{_bindir}/bmake
-install -Dp -m0644 %{SOURCE1} %{buildroot}%{_datadir}/mk/sys.mk
+./boot-strap -o Linux \
+ --prefix="%{_prefix}" \
+ --sysconfdir="%{_sysconfdir}" \
+ --with-default-sys-path="%{_datadir}/mk" \
+ --install-prefix="%{_prefix}" \
+ --install-destdir="%{buildroot}" \
+ op=install
+mv "%{buildroot}%{_mandir}/cat1" "%{buildroot}%{_mandir}/man1"
+ln -s "inc.mk" "%{buildroot}%{_datadir}/mk/bsd.inc.mk"
%check
./boot-strap op=test
++++++ allow-overriding-compiler-variables.patch ++++++
diff --git a/mk/sys/Linux.mk b/mk/sys/Linux.mk
index c619412..3a4b479 100644
--- a/mk/sys/Linux.mk
+++ b/mk/sys/Linux.mk
@@ -8,80 +8,95 @@ unix?= We run ${OS}.
ROOT_GROUP= root
# would be better to work out where it is...
-LIBCRT0= /dev/null
+LIBCRT0?= /dev/null
-NEED_SOLINKS=yes
+NEED_SOLINKS?=yes
.SUFFIXES: .out .a .ln .o .c ${CXX_SUFFIXES} .F .f .r .y .l .s .S .cl .p .h .sh .m4
.LIBS: .a
-AR= ar
-ARFLAGS= rl
-RANLIB= ranlib
-
-AS= as
-AFLAGS=
-COMPILE.s= ${AS} ${AFLAGS}
-LINK.s= ${CC} ${AFLAGS} ${LDFLAGS}
-COMPILE.S= ${CC} ${AFLAGS} ${CPPFLAGS} -c
-LINK.S= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
-.if exists(/usr/local/bin/gcc)
-CC= gcc -pipe
-DBG= -O -g
-STATIC?= -static
-.else
-CC= cc -pipe
-DBG= -g
-STATIC= -Bstatic
-.endif
-CFLAGS= ${DBG}
-COMPILE.c= ${CC} ${CFLAGS} ${CPPFLAGS} -c
-LINK.c= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CXX= g++
-CXXFLAGS= ${CFLAGS}
-COMPILE.cc= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c
-LINK.cc= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}
-
-CPP= cpp
+AR?= ar
+ARFLAGS?= rl
+RANLIB?= ranlib
+
+AS?= as
+AFLAGS?=
+COMPILE.s?= ${CC} ${AFLAGS} -c
+LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS}
+COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c -traditional-cpp
+LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
+CC?= gcc
+DBG?= -O -g
+STATIC?= -static
+CFLAGS?= ${DBG}
+COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c
+LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
+
+CXX?= g++
+CXXFLAGS?= ${CFLAGS}
+COMPILE.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c
+LINK.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}
+
+OBJC?= ${CC}
+OBJCFLAGS?= ${CFLAGS}
+COMPILE.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c
+LINK.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS}
+
+CPP?= cpp
.if defined(DESTDIR)
CPPFLAGS+= -nostdinc -idirafter ${DESTDIR}/usr/include
.endif
-MK_DEP= mkdeps.sh -N
-FC= f77
-FFLAGS= -O
-RFLAGS=
-COMPILE.f= ${FC} ${FFLAGS} -c
-LINK.f= ${FC} ${FFLAGS} ${LDFLAGS}
-COMPILE.F= ${FC} ${FFLAGS} ${CPPFLAGS} -c
-LINK.F= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS}
-COMPILE.r= ${FC} ${FFLAGS} ${RFLAGS} -c
-LINK.r= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS}
+MK_DEP?= mkdeps.sh -N
+FC?= f77
+FFLAGS?= -O
+RFLAGS?=
+COMPILE.f?= ${FC} ${FFLAGS} -c
+LINK.f?= ${FC} ${FFLAGS} ${LDFLAGS}
+COMPILE.F?= ${FC} ${FFLAGS} ${CPPFLAGS} -c
+LINK.F?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS}
+COMPILE.r?= ${FC} ${FFLAGS} ${RFLAGS} -c
+LINK.r?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS}
+
+INSTALL?= install
+
+LEX?= lex
+LFLAGS?=
+LEX.l?= ${LEX} ${LFLAGS}
-LEX= lex
-LFLAGS=
-LEX.l= ${LEX} ${LFLAGS}
+LD?= ld
+LDFLAGS?=
-LD= ld
-LDFLAGS=
+LINT?= lint
+LINTFLAGS?= -chapbxzF
-LINT= lint
-LINTFLAGS= -chapbx
+LORDER?= echo
-MAKE= bmake
+MAKE?= bmake
-PC= pc
-PFLAGS=
-COMPILE.p= ${PC} ${PFLAGS} ${CPPFLAGS} -c
-LINK.p= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
+NM?= nm
-SHELL= sh
+PC?= pc
+PFLAGS?=
+COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c
+LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
-YACC= yacc
-YFLAGS= -d
-YACC.y= ${YACC} ${YFLAGS}
+SHELL?= sh
+
+SIZE?= size
+
+TSORT?= tsort
+
+YACC?= yacc
+YFLAGS?= -d
+YACC.y?= ${YACC} ${YFLAGS}
+
+# At least Ubuntu 8.1 sets __attribute__((warn_unused_result)) on fwrite()
+# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509
+.if !defined(NOGCCERROR)
+CFLAGS+= -Wno-error
+.endif
# C
.c:
@@ -92,6 +107,8 @@ YACC.y= ${YACC} ${YFLAGS}
${COMPILE.c} ${.IMPSRC}
${AR} ${ARFLAGS} $@ $*.o
rm -f $*.o
+.c.ln:
+ ${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}
# C++
${CXX_SUFFIXES}:
++++++ bmake-20160818.tar.gz -> bmake-20160926.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/ChangeLog new/bmake/ChangeLog
--- old/bmake/ChangeLog 2016-08-19 01:02:51.000000000 +0200
+++ new/bmake/ChangeLog 2016-09-27 22:41:23.000000000 +0200
@@ -1,3 +1,13 @@
+2016-09-26 Simon J. Gerraty <sjg(a)bad.crufty.net>
+
+ * Makefile (_MAKE_VERSION): 20160926
+ Merge with NetBSD make, pick up
+ o support for .DELETE_ON_ERROR: (remove targets that fail)
+
+2016-09-26 Simon J. Gerraty <sjg(a)bad.crufty.net>
+
+ * Makefile MAN: tweak .Dt to match ${PROG}
+
2016-08-18 Simon J. Gerraty <sjg(a)bad.crufty.net>
* Makefile (_MAKE_VERSION): 20160818
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/Makefile new/bmake/Makefile
--- old/bmake/Makefile 2016-08-19 01:02:51.000000000 +0200
+++ new/bmake/Makefile 2016-09-27 22:41:23.000000000 +0200
@@ -1,7 +1,7 @@
-# $Id: Makefile,v 1.72 2016/08/18 23:02:26 sjg Exp $
+# $Id: Makefile,v 1.74 2016/09/27 20:40:54 sjg Exp $
# Base version on src date
-_MAKE_VERSION= 20160818
+_MAKE_VERSION= 20160926
PROG= bmake
@@ -156,7 +156,10 @@
.NOPATH: ${MAN}
${MAN}: make.1 my.history
@echo making $@
- @sed -e 's/^.Nx/NetBSD/' -e '/^.Nm/s/make/${PROG}/' \
+ @sed \
+ -e '/^.Dt/s/MAKE/${PROG:tu}/' \
+ -e 's/^.Nx/NetBSD/' \
+ -e '/^.Nm/s/make/${PROG}/' \
-e '/^.Sh HISTORY/rmy.history' \
-e '/^.Sh HISTORY/,$$s,^.Nm,make,' ${srcdir}/make.1 > $@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/bmake.1 new/bmake/bmake.1
--- old/bmake/bmake.1 2016-08-19 01:13:34.000000000 +0200
+++ new/bmake/bmake.1 2016-09-27 22:42:30.000000000 +0200
@@ -1,4 +1,4 @@
-.\" $NetBSD: make.1,v 1.262 2016/08/18 19:23:20 wiz Exp $
+.\" $NetBSD: make.1,v 1.263 2016/08/26 23:37:54 dholland Exp $
.\"
.\" Copyright (c) 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,8 +29,8 @@
.\"
.\" from: @(#)make.1 8.4 (Berkeley) 3/19/94
.\"
-.Dd August 15, 2016
-.Dt MAKE 1
+.Dd August 26, 2016
+.Dt BMAKE 1
.Os
.Sh NAME
.Nm bmake
@@ -2011,6 +2011,14 @@
.Ic .DEFAULT Ns 's
commands is set
to the target's own name.
+.It Ic .DELETE_ON_ERROR
+If this target is present in the makefile, it globally causes make to
+delete targets whose commands fail.
+(By default, only targets whose commands are interrupted during
+execution are deleted.
+This is the historical behavior.)
+This setting can be used to help prevent half-finished or malformed
+targets from being left around and corrupting future rebuilds.
.It Ic .END
Any command lines attached to this target are executed after everything
else is done.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/bmake.cat1 new/bmake/bmake.cat1
--- old/bmake/bmake.cat1 2016-08-15 21:28:53.000000000 +0200
+++ new/bmake/bmake.cat1 2016-09-27 22:42:30.000000000 +0200
@@ -1,4 +1,4 @@
-MAKE(1) NetBSD General Commands Manual MAKE(1)
+BMAKE(1) NetBSD General Commands Manual BMAKE(1)
NNAAMMEE
bbmmaakkee -- maintain program dependencies
@@ -1285,6 +1285,14 @@
target that inherits ..DDEEFFAAUULLTT's commands is set to the target's
own name.
+ ..DDEELLEETTEE__OONN__EERRRROORR
+ If this target is present in the makefile, it globally causes
+ make to delete targets whose commands fail. (By default, only
+ targets whose commands are interrupted during execution are
+ deleted. This is the historical behavior.) This setting can be
+ used to help prevent half-finished or malformed targets from
+ being left around and corrupting future rebuilds.
+
..EENNDD Any command lines attached to this target are executed after
everything else is done.
@@ -1498,4 +1506,4 @@
There is no way of escaping a space character in a filename.
-NetBSD 5.1 August 15, 2016 NetBSD 5.1
+NetBSD 5.1 August 26, 2016 NetBSD 5.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/compat.c new/bmake/compat.c
--- old/bmake/compat.c 2016-05-12 22:34:55.000000000 +0200
+++ new/bmake/compat.c 2016-09-27 22:41:23.000000000 +0200
@@ -1,4 +1,4 @@
-/* $NetBSD: compat.c,v 1.105 2016/05/12 20:28:34 sjg Exp $ */
+/* $NetBSD: compat.c,v 1.106 2016/08/26 23:28:39 dholland Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: compat.c,v 1.105 2016/05/12 20:28:34 sjg Exp $";
+static char rcsid[] = "$NetBSD: compat.c,v 1.106 2016/08/26 23:28:39 dholland Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: compat.c,v 1.105 2016/05/12 20:28:34 sjg Exp $");
+__RCSID("$NetBSD: compat.c,v 1.106 2016/08/26 23:28:39 dholland Exp $");
#endif
#endif /* not lint */
#endif
@@ -119,6 +119,25 @@
static GNode *ENDNode;
static void CompatInterrupt(int);
+/*
+ * CompatDeleteTarget -- delete a failed, interrupted, or otherwise
+ * duffed target if not inhibited by .PRECIOUS.
+ */
+static void
+CompatDeleteTarget(GNode *gn)
+{
+ if ((gn != NULL) && !Targ_Precious (gn)) {
+ char *p1;
+ char *file = Var_Value(TARGET, gn, &p1);
+
+ if (!noExecute && eunlink(file) != -1) {
+ Error("*** %s removed", file);
+ }
+
+ free(p1);
+ }
+}
+
/*-
*-----------------------------------------------------------------------
* CompatInterrupt --
@@ -132,6 +151,9 @@
* The target is removed and the process exits. If .INTERRUPT exists,
* its commands are run first WITH INTERRUPTS IGNORED..
*
+ * XXX: is .PRECIOUS supposed to inhibit .INTERRUPT? I doubt it, but I've
+ * left the logic alone for now. - dholland 20160826
+ *
*-----------------------------------------------------------------------
*/
static void
@@ -139,16 +161,9 @@
{
GNode *gn;
- if ((curTarg != NULL) && !Targ_Precious (curTarg)) {
- char *p1;
- char *file = Var_Value(TARGET, curTarg, &p1);
-
- if (!noExecute && eunlink(file) != -1) {
- Error("*** %s removed", file);
- }
-
- free(p1);
+ CompatDeleteTarget(curTarg);
+ if ((curTarg != NULL) && !Targ_Precious (curTarg)) {
/*
* Run .INTERRUPT only if hit with interrupt signal
*/
@@ -158,7 +173,6 @@
Compat_Make(gn, gn);
}
}
-
}
if (signo == SIGQUIT)
_exit(signo);
@@ -447,6 +461,11 @@
* continue.
*/
printf(" (continuing)\n");
+ } else {
+ printf("\n");
+ }
+ if (deleteOnError) {
+ CompatDeleteTarget(gn);
}
} else {
/*
@@ -607,7 +626,7 @@
} else if (keepgoing) {
pgn->flags &= ~REMAKE;
} else {
- PrintOnError(gn, "\n\nStop.");
+ PrintOnError(gn, "\nStop.");
exit(1);
}
} else if (gn->made == ERROR) {
@@ -698,7 +717,7 @@
if (gn != NULL) {
Compat_Make(gn, gn);
if (gn->made == ERROR) {
- PrintOnError(gn, "\n\nStop.");
+ PrintOnError(gn, "\nStop.");
exit(1);
}
}
@@ -739,7 +758,7 @@
if (errors == 0) {
Compat_Make(ENDNode, ENDNode);
if (gn->made == ERROR) {
- PrintOnError(gn, "\n\nStop.");
+ PrintOnError(gn, "\nStop.");
exit(1);
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/job.c new/bmake/job.c
--- old/bmake/job.c 2016-05-12 22:34:55.000000000 +0200
+++ new/bmake/job.c 2016-09-27 22:41:23.000000000 +0200
@@ -1,4 +1,4 @@
-/* $NetBSD: job.c,v 1.187 2016/05/12 20:28:34 sjg Exp $ */
+/* $NetBSD: job.c,v 1.188 2016/08/26 23:28:39 dholland Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: job.c,v 1.187 2016/05/12 20:28:34 sjg Exp $";
+static char rcsid[] = "$NetBSD: job.c,v 1.188 2016/08/26 23:28:39 dholland Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: job.c,v 1.187 2016/05/12 20:28:34 sjg Exp $");
+__RCSID("$NetBSD: job.c,v 1.188 2016/08/26 23:28:39 dholland Exp $");
#endif
#endif /* not lint */
#endif
@@ -388,6 +388,21 @@
}
/*
+ * Delete the target of a failed, interrupted, or otherwise
+ * unsuccessful job unless inhibited by .PRECIOUS.
+ */
+static void
+JobDeleteTarget(GNode *gn)
+{
+ if ((gn->type & (OP_JOIN|OP_PHONY)) == 0 && !Targ_Precious(gn)) {
+ char *file = (gn->path == NULL ? gn->name : gn->path);
+ if (!noExecute && eunlink(file) != -1) {
+ Error("*** %s removed", file);
+ }
+ }
+}
+
+/*
* JobSigLock/JobSigUnlock
*
* Signal lock routines to get exclusive access. Currently used to
@@ -1033,6 +1048,9 @@
if (job->flags & JOB_IGNERR) {
WAIT_STATUS(status) = 0;
} else {
+ if (deleteOnError) {
+ JobDeleteTarget(job->node);
+ }
PrintOnError(job->node, NULL);
}
} else if (DEBUG(JOB)) {
@@ -1050,6 +1068,9 @@
}
(void)printf("*** [%s] Signal %d\n",
job->node->name, WTERMSIG(status));
+ if (deleteOnError) {
+ JobDeleteTarget(job->node);
+ }
}
(void)fflush(stdout);
}
@@ -2578,12 +2599,7 @@
gn = job->node;
- if ((gn->type & (OP_JOIN|OP_PHONY)) == 0 && !Targ_Precious(gn)) {
- char *file = (gn->path == NULL ? gn->name : gn->path);
- if (!noExecute && eunlink(file) != -1) {
- Error("*** %s removed", file);
- }
- }
+ JobDeleteTarget(gn);
if (job->pid) {
if (DEBUG(JOB)) {
(void)fprintf(debug_file,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/main.c new/bmake/main.c
--- old/bmake/main.c 2016-08-13 19:55:48.000000000 +0200
+++ new/bmake/main.c 2016-09-27 22:41:23.000000000 +0200
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.250 2016/08/11 19:53:17 sjg Exp $ */
+/* $NetBSD: main.c,v 1.251 2016/08/26 23:28:39 dholland Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.250 2016/08/11 19:53:17 sjg Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.251 2016/08/26 23:28:39 dholland Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
@@ -81,7 +81,7 @@
#if 0
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: main.c,v 1.250 2016/08/11 19:53:17 sjg Exp $");
+__RCSID("$NetBSD: main.c,v 1.251 2016/08/26 23:28:39 dholland Exp $");
#endif
#endif /* not lint */
#endif
@@ -155,6 +155,7 @@
time_t now; /* Time at start of make */
GNode *DEFAULT; /* .DEFAULT node */
Boolean allPrecious; /* .PRECIOUS given on line by itself */
+Boolean deleteOnError; /* .DELETE_ON_ERROR: set */
static Boolean noBuiltins; /* -r flag */
static Lst makefiles; /* ordered list of makefiles to read */
@@ -979,6 +980,7 @@
noRecursiveExecute = FALSE; /* Execute all .MAKE targets */
keepgoing = FALSE; /* Stop on error */
allPrecious = FALSE; /* Remove targets when interrupted */
+ deleteOnError = FALSE; /* Historical default behavior */
queryFlag = FALSE; /* This is not just a check-run */
noBuiltins = FALSE; /* Read the built-in rules */
touchFlag = FALSE; /* Actually update targets */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/make.1 new/bmake/make.1
--- old/bmake/make.1 2016-08-19 01:02:51.000000000 +0200
+++ new/bmake/make.1 2016-09-27 22:41:23.000000000 +0200
@@ -1,4 +1,4 @@
-.\" $NetBSD: make.1,v 1.262 2016/08/18 19:23:20 wiz Exp $
+.\" $NetBSD: make.1,v 1.263 2016/08/26 23:37:54 dholland Exp $
.\"
.\" Copyright (c) 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" from: @(#)make.1 8.4 (Berkeley) 3/19/94
.\"
-.Dd August 15, 2016
+.Dd August 26, 2016
.Dt MAKE 1
.Os
.Sh NAME
@@ -2011,6 +2011,14 @@
.Ic .DEFAULT Ns 's
commands is set
to the target's own name.
+.It Ic .DELETE_ON_ERROR
+If this target is present in the makefile, it globally causes make to
+delete targets whose commands fail.
+(By default, only targets whose commands are interrupted during
+execution are deleted.
+This is the historical behavior.)
+This setting can be used to help prevent half-finished or malformed
+targets from being left around and corrupting future rebuilds.
.It Ic .END
Any command lines attached to this target are executed after everything
else is done.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/make.h new/bmake/make.h
--- old/bmake/make.h 2016-06-07 02:46:29.000000000 +0200
+++ new/bmake/make.h 2016-09-27 22:41:23.000000000 +0200
@@ -1,4 +1,4 @@
-/* $NetBSD: make.h,v 1.100 2016/06/07 00:40:00 sjg Exp $ */
+/* $NetBSD: make.h,v 1.101 2016/08/26 23:28:39 dholland Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -389,6 +389,7 @@
extern Boolean noExecute; /* True if should execute nothing */
extern Boolean noRecursiveExecute; /* True if should execute nothing */
extern Boolean allPrecious; /* True if every target is precious */
+extern Boolean deleteOnError; /* True if failed targets should be deleted */
extern Boolean keepgoing; /* True if should continue on unaffected
* portions of the graph when have an error
* in one portion */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/mk/ChangeLog new/bmake/mk/ChangeLog
--- old/bmake/mk/ChangeLog 2016-08-15 21:28:26.000000000 +0200
+++ new/bmake/mk/ChangeLog 2016-10-02 00:20:41.000000000 +0200
@@ -1,3 +1,20 @@
+2016-09-30 Simon J. Gerraty <sjg(a)bad.crufty.net>
+
+ * dirdeps.mk: use TARGET_SPEC_VARS to qualify components added to
+ DEP_SKIP_DIR and DEP_DIRDEPS_FILTER
+
+ * sys.mk: extract some bits to sys.{debug,vars}.mk
+ for easier re-use by others.
+
+2016-08-19 Simon J. Gerraty <sjg(a)bad.crufty.net>
+
+ * meta.sys.mk (META_COOKIE_TOUCH): use ${.OBJDIR}/${.TARGET:T} as default
+
+2016-09-23 Simon Gerraty <sjg@sjg-mba13>
+
+ * lib.mk: Use ${PICO} for extension for PIC objects.
+ default to .pico (like NetBSD) safe on case insensitive filesystem.
+
2016-08-15 Simon J. Gerraty <sjg(a)bad.crufty.net>
* install-mk (MK_VERSION): 20160815
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/mk/FILES new/bmake/mk/FILES
--- old/bmake/mk/FILES 2014-11-08 07:46:34.000000000 +0100
+++ new/bmake/mk/FILES 2016-10-02 00:20:41.000000000 +0200
@@ -38,7 +38,9 @@
subdir.mk
sys.mk
sys.clean-env.mk
+sys.debug.mk
sys.dependfile.mk
+sys.vars.mk
sys/AIX.mk
sys/Darwin.mk
sys/Generic.mk
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/mk/dirdeps.mk new/bmake/mk/dirdeps.mk
--- old/bmake/mk/dirdeps.mk 2016-08-15 21:28:26.000000000 +0200
+++ new/bmake/mk/dirdeps.mk 2016-10-01 01:47:37.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: dirdeps.mk,v 1.73 2016/08/15 19:28:13 sjg Exp $
+# $Id: dirdeps.mk,v 1.75 2016/09/30 23:47:23 sjg Exp $
# Copyright (c) 2010-2013, Juniper Networks, Inc.
# All rights reserved.
@@ -305,8 +305,10 @@
DEP_SKIP_DIR = ${SKIP_DIR} \
${SKIP_DIR.${DEP_TARGET_SPEC}:U} \
- ${SKIP_DIR.${DEP_MACHINE}:U} \
- ${SKIP_DIRDEPS.${DEP_MACHINE}:U}
+ ${TARGET_SPEC_VARS:@v@${SKIP_DIR.${DEP_$v}:U}@} \
+ ${SKIP_DIRDEPS.${DEP_TARGET_SPEC}:U} \
+ ${TARGET_SPEC_VARS:@v@${SKIP_DIRDEPS.${DEP_$v}:U}@}
+
NSkipDir = ${DEP_SKIP_DIR:${M_ListToSkip}}
@@ -522,7 +524,7 @@
# these we reset each time through as they can depend on DEP_MACHINE
DEP_DIRDEPS_FILTER = \
${DIRDEPS_FILTER.${DEP_TARGET_SPEC}:U} \
- ${DIRDEPS_FILTER.${DEP_MACHINE}:U} \
+ ${TARGET_SPEC_VARS:@v@${DIRDEPS_FILTER.${DEP_$v}:U}@} \
${DIRDEPS_FILTER:U}
.if empty(DEP_DIRDEPS_FILTER)
# something harmless
@@ -696,7 +698,7 @@
.if ${_src:T} != ${.MAKE.DEPENDFILE_PREFIX:T}
(cd ${.CURDIR} && sed ${.MAKE.DEPENDFILE_BOOTSTRAP_SED} ${_src} > ${_want})
.else
- cp ${.CURDIR}/${_src} ${_want}
+ cp ${.CURDIR}/${_src:T} ${_want}
.endif
# create Makefile.depend* for this dir and its dependencies
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/mk/install-mk new/bmake/mk/install-mk
--- old/bmake/mk/install-mk 2016-08-15 21:28:26.000000000 +0200
+++ new/bmake/mk/install-mk 2016-10-01 01:47:37.000000000 +0200
@@ -55,7 +55,7 @@
# Simon J. Gerraty <sjg(a)crufty.net>
# RCSid:
-# $Id: install-mk,v 1.130 2016/08/15 19:28:13 sjg Exp $
+# $Id: install-mk,v 1.131 2016/09/30 23:47:23 sjg Exp $
#
# @(#) Copyright (c) 1994 Simon J. Gerraty
#
@@ -70,7 +70,7 @@
# sjg(a)crufty.net
#
-MK_VERSION=20160815
+MK_VERSION=20160930
OWNER=
GROUP=
MODE=444
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/mk/lib.mk new/bmake/mk/lib.mk
--- old/bmake/mk/lib.mk 2016-08-11 01:58:27.000000000 +0200
+++ new/bmake/mk/lib.mk 2016-09-27 07:50:03.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: lib.mk,v 1.54 2016/08/02 20:52:17 sjg Exp $
+# $Id: lib.mk,v 1.55 2016/09/23 23:04:51 sjg Exp $
.if !target(__${.PARSEFILE}__)
__${.PARSEFILE}__:
@@ -9,39 +9,30 @@
NEED_SOLINKS?= yes
.endif
-.if exists(${.CURDIR}/shlib_version)
-SHLIB_MAJOR != . ${.CURDIR}/shlib_version ; echo $$major
-SHLIB_MINOR != . ${.CURDIR}/shlib_version ; echo $$minor
-.endif
-
-print-shlib-major:
-.if defined(SHLIB_MAJOR) && ${MK_PIC} != "no"
- @echo ${SHLIB_MAJOR}
-.else
- @false
+SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version
+.if !defined(SHLIB_MAJOR) && exists(${SHLIB_VERSION_FILE})
+SHLIB_MAJOR != . ${SHLIB_VERSION_FILE} ; echo $$major
+SHLIB_MINOR != . ${SHLIB_VERSION_FILE} ; echo $$minor
+SHLIB_TEENY != . ${SHLIB_VERSION_FILE} ; echo $$teeny
.endif
-print-shlib-minor:
-.if defined(SHLIB_MINOR) && ${MK_PIC} != "no"
- @echo ${SHLIB_MINOR}
-.else
- @false
-.endif
-
-print-shlib-teeny:
-.if defined(SHLIB_TEENY) && ${MK_PIC} != "no"
- @echo ${SHLIB_TEENY}
+.for x in major minor teeny
+print-shlib-$x:
+.if defined(SHLIB_${x:tu}) && ${MK_PIC} != "no"
+ @echo ${SHLIB_${x:tu}}
.else
@false
.endif
+.endfor
SHLIB_FULLVERSION ?= ${${SHLIB_MAJOR} ${SHLIB_MINOR} ${SHLIB_TEENY}:L:ts.}
SHLIB_FULLVERSION := ${SHLIB_FULLVERSION}
# add additional suffixes not exported.
# .po is used for profiling object files.
-# .So is used for PIC object files.
-.SUFFIXES: .out .a .ln .So .po .o .s .S .c .cc .C .m .F .f .r .y .l .cl .p .h
+# ${PICO} is used for PIC object files.
+PICO?= .pico
+.SUFFIXES: .out .a .ln ${PICO} .po .o .s .S .c .cc .C .m .F .f .r .y .l .cl .p .h
.SUFFIXES: .sh .m4 .m
CFLAGS+= ${COPTS}
@@ -62,12 +53,12 @@
# with ELF, also set shared-lib version for ld.so.
# SHLIB_LDSTARTFILE: support .o file, call C++ file-level constructors
# SHLIB_LDENDFILE: support .o file, call C++ file-level destructors
-# FPICFLAGS: flags for ${FC} to compile .[fF] files to .So objects.
+# FPICFLAGS: flags for ${FC} to compile .[fF] files to ${PICO} objects.
# CPPICFLAGS: flags for ${CPP} to preprocess .[sS] files for ${AS}
-# CPICFLAGS: flags for ${CC} to compile .[cC] files to .So objects.
+# CPICFLAGS: flags for ${CC} to compile .[cC] files to ${PICO} objects.
# CAPICFLAGS flags for {$CC} to compiling .[Ss] files
# (usually just ${CPPPICFLAGS} ${CPICFLAGS})
-# APICFLAGS: flags for ${AS} to assemble .[sS] to .So objects.
+# APICFLAGS: flags for ${AS} to assemble .[sS] to ${PICO} objects.
.if ${TARGET_OSNAME} == "NetBSD"
.if ${MACHINE_ARCH} == "alpha"
@@ -162,14 +153,14 @@
LD_so=sl
DLLIB=
# HPsUX lorder does not grok anything but .o
-LD_sobjs=`${LORDER} ${OBJS} | ${TSORT} | sed 's,\.o,.So,'`
+LD_sobjs=`${LORDER} ${OBJS} | ${TSORT} | sed 's,\.o,${PICO},'`
LD_pobjs=`${LORDER} ${OBJS} | ${TSORT} | sed 's,\.o,.po,'`
.elif ${TARGET_OSNAME} == "OSF1"
LD_shared= -msym -shared -expect_unresolved '*'
LD_solib= -all lib${LIB}_pic.a
DLLIB=
# lorder does not grok anything but .o
-LD_sobjs=`${LORDER} ${OBJS} | ${TSORT} | sed 's,\.o,.So,'`
+LD_sobjs=`${LORDER} ${OBJS} | ${TSORT} | sed 's,\.o,${PICO},'`
LD_pobjs=`${LORDER} ${OBJS} | ${TSORT} | sed 's,\.o,.po,'`
AR_cq= -cqs
.elif ${TARGET_OSNAME} == "FreeBSD"
@@ -250,9 +241,9 @@
DLLIB ?= -ldl
.endif
-# some libs have lots of objects, and scanning all .o, .po and .So meta files
+# some libs have lots of objects, and scanning all .o, .po and ${PICO} meta files
# is a waste of time, this tells meta.autodep.mk to just pick one
-# (typically .So)
+# (typically ${PICO})
# yes, 42 is a random number.
.if ${MK_DIRDEPS_BUILD} == "yes" && ${SRCS:Uno:[\#]} > 42
OPTIMIZE_OBJECT_META_FILES ?= yes
@@ -287,7 +278,7 @@
${CXX_SUFFIXES:%=%.po}:
${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}
-.S.So .s.So:
+.S${PICO} .s${PICO}:
${COMPILE.S} ${PICFLAG} ${CC_PIC} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}
.else
.c.po:
@@ -302,7 +293,7 @@
@${LD} ${LD_X} ${LD_r} ${.TARGET}.o -o ${.TARGET}
@rm -f ${.TARGET}.o
-.S.So .s.So:
+.S${PICO} .s${PICO}:
@echo ${COMPILE.S} ${PICFLAG} ${CC_PIC} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}
@${COMPILE.S} ${PICFLAG} ${CC_PIC} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
@${LD} ${LD_x} ${LD_r} ${.TARGET}.o -o ${.TARGET}
@@ -310,23 +301,23 @@
.endif
.if (${LD_x} == "")
-.c.So:
+.c${PICO}:
${COMPILE.c} ${PICFLAG} ${CC_PIC} ${.IMPSRC} -o ${.TARGET}
-${CXX_SUFFIXES:%=%.So}:
+${CXX_SUFFIXES:%=%${PICO}}:
${COMPILE.cc} ${PICFLAG} ${CC_PIC} ${.IMPSRC} -o ${.TARGET}
.S.po .s.po:
${COMPILE.S} ${PROFFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}
.else
-.c.So:
+.c${PICO}:
@echo ${COMPILE.c} ${PICFLAG} ${CC_PIC} ${.IMPSRC} -o ${.TARGET}
@${COMPILE.c} ${PICFLAG} ${CC_PIC} ${.IMPSRC} -o ${.TARGET}.o
@${LD} ${LD_x} ${LD_r} ${.TARGET}.o -o ${.TARGET}
@rm -f ${.TARGET}.o
-${CXX_SUFFIXES:%=%.So}:
+${CXX_SUFFIXES:%=%${PICO}}:
@echo ${COMPILE.cc} ${PICFLAG} ${CC_PIC} ${.IMPSRC} -o ${.TARGET}
@${COMPILE.cc} ${PICFLAG} ${CC_PIC} ${.IMPSRC} -o ${.TARGET}.o
@${LD} ${LD_x} ${LD_r} ${.TARGET}.o -o ${.TARGET}
@@ -396,7 +387,7 @@
all: _SUBDIRUSE
.for s in ${SRCS:N*.h:M*/*}
-${.o .So .po .lo:L:@o@${s:T:R}$o@}: $s
+${.o ${PICO} .po .lo:L:@o@${s:T:R}$o@}: $s
.endfor
OBJS+= ${SRCS:T:N*.h:R:S/$/.o/g}
@@ -441,7 +432,7 @@
@${AR} ${AR_cq} ${.TARGET} ${LD_pobjs}
${RANLIB} ${.TARGET}
-SOBJS+= ${OBJS:.o=.So}
+SOBJS+= ${OBJS:.o=${PICO}}
.NOPATH: ${SOBJS}
lib${LIB}_pic.a:: ${SOBJS}
@echo building shared object ${LIB} library
@@ -502,7 +493,7 @@
.if defined(SRCS) && (!defined(MKDEP) || ${MKDEP} != autodep)
afterdepend: .depend
@(TMP=/tmp/_depend$$$$; \
- sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1.So \1.ln:/' \
+ sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1${PICO} \1.ln:/' \
< .depend > $$TMP; \
mv $$TMP .depend)
.endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/mk/meta.sys.mk new/bmake/mk/meta.sys.mk
--- old/bmake/mk/meta.sys.mk 2016-08-13 19:55:49.000000000 +0200
+++ new/bmake/mk/meta.sys.mk 2016-09-27 07:50:03.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: meta.sys.mk,v 1.29 2016/08/13 17:51:45 sjg Exp $
+# $Id: meta.sys.mk,v 1.31 2016/09/10 00:44:46 sjg Exp $
#
# @(#) Copyright (c) 2010, Simon J. Gerraty
@@ -102,9 +102,6 @@
.endif
-META_COOKIE_TOUCH=
-# some targets need to be .PHONY in non-meta mode
-META_NOPHONY= .PHONY
# Are we, after all, in meta mode?
.if ${.MAKE.MODE:Uno:Mmeta*} != ""
MKDEP_MK = meta.autodep.mk
@@ -121,7 +118,7 @@
# we can afford to use cookies to prevent some targets
# re-running needlessly
-META_COOKIE_TOUCH= touch ${COOKIE.${.TARGET}:U${.OBJDIR}/${.TARGET}}
+META_COOKIE_TOUCH?= touch ${COOKIE.${.TARGET}:U${.OBJDIR}/${.TARGET:T}}
META_NOPHONY=
# some targets involve old pre-built targets
@@ -162,5 +159,9 @@
.endif
.endif
+.else
+META_COOKIE_TOUCH=
+# some targets need to be .PHONY in non-meta mode
+META_NOPHONY= .PHONY
.endif
.endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/mk/sys.debug.mk new/bmake/mk/sys.debug.mk
--- old/bmake/mk/sys.debug.mk 1970-01-01 01:00:00.000000000 +0100
+++ new/bmake/mk/sys.debug.mk 2016-10-01 21:11:55.000000000 +0200
@@ -0,0 +1,33 @@
+# $Id: sys.debug.mk,v 1.1 2016/10/01 19:11:55 sjg Exp $
+#
+# @(#) Copyright (c) 2009, Simon J. Gerraty
+#
+# This file is provided in the hope that it will
+# be of use. There is absolutely NO WARRANTY.
+# Permission to copy, redistribute or otherwise
+# use this file is hereby granted provided that
+# the above copyright notice and this notice are
+# left intact.
+#
+# Please send copies of changes and bug-fixes to:
+# sjg(a)crufty.net
+#
+
+# Sometimes we want to turn on debugging in just one or two places
+# if .CURDIR is matched by any entry in DEBUG_MAKE_SYS_DIRS we
+# will apply DEBUG_MAKE_FLAGS now.
+# if an entry in DEBUG_MAKE_DIRS matches, we at the end of sys.mk
+# eg. DEBUG_MAKE_FLAGS=-dv DEBUG_MAKE_SYS_DIRS="*lib/sjg"
+# use DEBUG_MAKE_FLAGS0 to apply only to .MAKE.LEVEL 0
+#
+.if ${.MAKE.LEVEL:U1} == 0
+# we use indirection, to simplify the tests below, and incase
+# DEBUG_* were given on our command line.
+_DEBUG_MAKE_FLAGS = ${DEBUG_MAKE_FLAGS0}
+_DEBUG_MAKE_SYS_DIRS = ${DEBUG_MAKE_SYS_DIRS0:U${DEBUG_MAKE_SYS_DIRS}}
+_DEBUG_MAKE_DIRS = ${DEBUG_MAKE_DIRS0:U${DEBUG_MAKE_DIRS}}
+.else
+_DEBUG_MAKE_FLAGS = ${DEBUG_MAKE_FLAGS}
+_DEBUG_MAKE_SYS_DIRS = ${DEBUG_MAKE_SYS_DIRS}
+_DEBUG_MAKE_DIRS = ${DEBUG_MAKE_DIRS}
+.endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/mk/sys.mk new/bmake/mk/sys.mk
--- old/bmake/mk/sys.mk 2016-04-05 18:57:21.000000000 +0200
+++ new/bmake/mk/sys.mk 2016-10-02 00:20:41.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: sys.mk,v 1.43 2016/04/05 15:58:37 sjg Exp $
+# $Id: sys.mk,v 1.44 2016/10/01 19:11:55 sjg Exp $
#
# @(#) Copyright (c) 2003-2009, Simon J. Gerraty
#
@@ -15,38 +15,8 @@
# Avoid putting anything platform specific in here.
-# We use the following paradigm for preventing multiple inclusion.
-# It relies on the fact that conditionals and dependencies are resolved
-# at the time they are read.
-#
-# _this ?= ${.PARSEFILE}
-# .if !target(__${_this}__)
-# __${_this}__:
-#
-.if ${MAKE_VERSION:U0} > 20100408
-_this = ${.PARSEDIR:tA}/${.PARSEFILE}
-.else
-_this = ${.PARSEDIR}/${.PARSEFILE}
-.endif
-
-# Sometimes we want to turn on debugging in just one or two places
-# if .CURDIR is matched by any entry in DEBUG_MAKE_SYS_DIRS we
-# will apply DEBUG_MAKE_FLAGS now.
-# if an entry in DEBUG_MAKE_DIRS matches, we at the end of sys.mk
-# eg. DEBUG_MAKE_FLAGS=-dv DEBUG_MAKE_SYS_DIRS="*lib/sjg"
-# use DEBUG_MAKE_FLAGS0 to apply only to .MAKE.LEVEL 0
-#
-.if ${.MAKE.LEVEL:U1} == 0
-# we use indirection, to simplify the tests below, and incase
-# DEBUG_* were given on our command line.
-_DEBUG_MAKE_FLAGS = ${DEBUG_MAKE_FLAGS0}
-_DEBUG_MAKE_SYS_DIRS = ${DEBUG_MAKE_SYS_DIRS0:U${DEBUG_MAKE_SYS_DIRS}}
-_DEBUG_MAKE_DIRS = ${DEBUG_MAKE_DIRS0:U${DEBUG_MAKE_DIRS}}
-.else
-_DEBUG_MAKE_FLAGS = ${DEBUG_MAKE_FLAGS}
-_DEBUG_MAKE_SYS_DIRS = ${DEBUG_MAKE_SYS_DIRS}
-_DEBUG_MAKE_DIRS = ${DEBUG_MAKE_DIRS}
-.endif
+# _DEBUG_MAKE_FLAGS etc.
+.include <sys.debug.mk>
.if !empty(_DEBUG_MAKE_FLAGS)
.if ${_DEBUG_MAKE_SYS_DIRS:Uno:@x@${.CURDIR:M$x}@} != ""
@@ -54,47 +24,8 @@
.endif
.endif
-# if this is an ancient version of bmake
-MAKE_VERSION ?= 0
-.if ${MAKE_VERSION:M*make-*}
-# turn it into what we want - just the date
-MAKE_VERSION := ${MAKE_VERSION:[1]:C,.*-,,}
-.endif
-
-# some useful modifiers
-
-# A useful trick for testing multiple :M's against something
-# :L says to use the variable's name as its value - ie. literal
-# got = ${clean* destroy:${M_ListToMatch:S,V,.TARGETS,}}
-M_ListToMatch = L:@m@$${V:M$$m}@
-# match against our initial targets (see above)
-M_L_TARGETS = ${M_ListToMatch:S,V,_TARGETS,}
-
-# turn a list into a set of :N modifiers
-# NskipFoo = ${Foo:${M_ListToSkip}}
-M_ListToSkip= O:u:ts::S,:,:N,g:S,^,N,
-
-# type should be a builtin in any sh since about 1980,
-# but sadly there are exceptions!
-.if ${.MAKE.OS:Unknown:NBSD/OS} == ""
-_type_sh = which
-.endif
-# AUTOCONF := ${autoconf:L:${M_whence}}
-M_type = @x@(${_type_sh:Utype} $$x) 2> /dev/null; echo;@:sh:[0]:N* found*:[@]:C,[()],,g
-M_whence = ${M_type}:M/*:[1]
-
-# convert a path to a valid shell variable
-M_P2V = tu:C,[./-],_,g
-
-# convert path to absolute
-.if ${MAKE_VERSION:U0} > 20100408
-M_tA = tA
-.else
-M_tA = C,.*,('cd' & \&\& 'pwd') 2> /dev/null || echo &,:sh
-.endif
-
-# absoulte path to what we are reading.
-_PARSEDIR = ${.PARSEDIR:${M_tA}}
+# useful modifiers
+.include <sys.vars.mk>
# we expect a recent bmake
.if !defined(_TARGETS)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/mk/sys.vars.mk new/bmake/mk/sys.vars.mk
--- old/bmake/mk/sys.vars.mk 1970-01-01 01:00:00.000000000 +0100
+++ new/bmake/mk/sys.vars.mk 2016-10-01 21:11:55.000000000 +0200
@@ -0,0 +1,71 @@
+# $Id: sys.vars.mk,v 1.1 2016/10/01 19:11:55 sjg Exp $
+#
+# @(#) Copyright (c) 2003-2009, Simon J. Gerraty
+#
+# This file is provided in the hope that it will
+# be of use. There is absolutely NO WARRANTY.
+# Permission to copy, redistribute or otherwise
+# use this file is hereby granted provided that
+# the above copyright notice and this notice are
+# left intact.
+#
+# Please send copies of changes and bug-fixes to:
+# sjg(a)crufty.net
+#
+
+# We use the following paradigm for preventing multiple inclusion.
+# It relies on the fact that conditionals and dependencies are resolved
+# at the time they are read.
+#
+# _this ?= ${.PARSEFILE}
+# .if !target(__${_this}__)
+# __${_this}__:
+#
+.if ${MAKE_VERSION:U0} > 20100408
+_this = ${.PARSEDIR:tA}/${.PARSEFILE}
+.else
+_this = ${.PARSEDIR}/${.PARSEFILE}
+.endif
+
+# if this is an ancient version of bmake
+MAKE_VERSION ?= 0
+.if ${MAKE_VERSION:M*make-*}
+# turn it into what we want - just the date
+MAKE_VERSION := ${MAKE_VERSION:[1]:C,.*-,,}
+.endif
+
+# some useful modifiers
+
+# A useful trick for testing multiple :M's against something
+# :L says to use the variable's name as its value - ie. literal
+# got = ${clean* destroy:${M_ListToMatch:S,V,.TARGETS,}}
+M_ListToMatch = L:@m@$${V:M$$m}@
+# match against our initial targets (see above)
+M_L_TARGETS = ${M_ListToMatch:S,V,_TARGETS,}
+
+# turn a list into a set of :N modifiers
+# NskipFoo = ${Foo:${M_ListToSkip}}
+M_ListToSkip= O:u:ts::S,:,:N,g:S,^,N,
+
+# type should be a builtin in any sh since about 1980,
+# but sadly there are exceptions!
+.if ${.MAKE.OS:Unknown:NBSD/OS} == ""
+_type_sh = which
+.endif
+
+# AUTOCONF := ${autoconf:L:${M_whence}}
+M_type = @x@(${_type_sh:Utype} $$x) 2> /dev/null; echo;@:sh:[0]:N* found*:[@]:C,[()],,g
+M_whence = ${M_type}:M/*:[1]
+
+# convert a path to a valid shell variable
+M_P2V = tu:C,[./-],_,g
+
+# convert path to absolute
+.if ${MAKE_VERSION:U0} > 20100408
+M_tA = tA
+.else
+M_tA = C,.*,('cd' & \&\& 'pwd') 2> /dev/null || echo &,:sh
+.endif
+
+# absoulte path to what we are reading.
+_PARSEDIR = ${.PARSEDIR:${M_tA}}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/nonints.h new/bmake/nonints.h
--- old/bmake/nonints.h 2016-06-03 04:14:16.000000000 +0200
+++ new/bmake/nonints.h 2016-09-27 22:41:23.000000000 +0200
@@ -1,4 +1,4 @@
-/* $NetBSD: nonints.h,v 1.73 2016/06/03 01:21:59 sjg Exp $ */
+/* $NetBSD: nonints.h,v 1.74 2016/09/05 00:40:29 sevan Exp $ */
/*-
* Copyright (c) 1988, 1989, 1990, 1993
@@ -109,7 +109,6 @@
/* main.c */
void Main_ParseArgLine(const char *);
void MakeMode(const char *);
-int main(int, char **);
char *Cmd_Exec(const char *, const char **);
void Error(const char *, ...) MAKE_ATTR_PRINTFLIKE(1, 2);
void Fatal(const char *, ...) MAKE_ATTR_PRINTFLIKE(1, 2) MAKE_ATTR_DEAD;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/parse.c new/bmake/parse.c
--- old/bmake/parse.c 2016-05-10 02:06:35.000000000 +0200
+++ new/bmake/parse.c 2016-09-27 22:41:23.000000000 +0200
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.214 2016/04/06 09:57:00 gson Exp $ */
+/* $NetBSD: parse.c,v 1.215 2016/08/26 23:28:39 dholland Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.214 2016/04/06 09:57:00 gson Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.215 2016/08/26 23:28:39 dholland Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: parse.c,v 1.214 2016/04/06 09:57:00 gson Exp $");
+__RCSID("$NetBSD: parse.c,v 1.215 2016/08/26 23:28:39 dholland Exp $");
#endif
#endif /* not lint */
#endif
@@ -184,6 +184,7 @@
typedef enum {
Begin, /* .BEGIN */
Default, /* .DEFAULT */
+ DeleteOnError, /* .DELETE_ON_ERROR */
End, /* .END */
dotError, /* .ERROR */
Ignore, /* .IGNORE */
@@ -301,6 +302,7 @@
} parseKeywords[] = {
{ ".BEGIN", Begin, 0 },
{ ".DEFAULT", Default, 0 },
+{ ".DELETE_ON_ERROR", DeleteOnError, 0 },
{ ".END", End, 0 },
{ ".ERROR", dotError, 0 },
{ ".EXEC", Attribute, OP_EXEC },
@@ -1334,6 +1336,7 @@
* .BEGIN
* .END
* .ERROR
+ * .DELETE_ON_ERROR
* .INTERRUPT Are not to be considered the
* main target.
* .NOTPARALLEL Make only one target at a time.
@@ -1369,6 +1372,9 @@
(void)Lst_AtEnd(targets, gn);
DEFAULT = gn;
break;
+ case DeleteOnError:
+ deleteOnError = TRUE;
+ break;
case NotParallel:
maxJobs = 1;
break;
@@ -1597,7 +1603,8 @@
goto out;
}
*line = '\0';
- } else if ((specType == NotParallel) || (specType == SingleShell)) {
+ } else if ((specType == NotParallel) || (specType == SingleShell) ||
+ (specType == DeleteOnError)) {
*line = '\0';
}
1
0
Hello community,
here is the log from the commit of package python-future for openSUSE:Factory checked in at 2016-11-28 15:08:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-future (Old)
and /work/SRC/openSUSE:Factory/.python-future.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-future"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-future/python-future.changes 2016-10-20 23:08:06.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-future.new/python-future.changes 2016-11-28 15:08:28.000000000 +0100
@@ -1,0 +2,17 @@
+Fri Nov 25 08:26:47 UTC 2016 - mimi.vx(a)gmail.com
+
+- update to 0.16.0
+* Fix newbytes constructor bug.
+* Fix semantics of bool() with newobject.
+* Fix standard_library.install_aliases() on PyPy
+* Fix assertRaises for pow and compile` on Python 3.5.
+* Fix return argument of future.utils.ensure_new_type
+ if conversion to new type does not exist.
+* Add missing cmp_to_key for Py2.6.
+* Allow the old_div fixer to be disabled.
+* Improve compatibility with Google App Engine.
+* Add some missing imports to the tkinter and tkinter.filedialog
+ package namespaces
+* Fix raise_from on PY3 when the exception cannot be recreated from its repr.
+
+-------------------------------------------------------------------
Old:
----
future-0.15.2.tar.gz
New:
----
future-0.16.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-future.spec ++++++
--- /var/tmp/diff_new_pack.deMc2O/_old 2016-11-28 15:08:29.000000000 +0100
+++ /var/tmp/diff_new_pack.deMc2O/_new 2016-11-28 15:08:29.000000000 +0100
@@ -17,24 +17,20 @@
Name: python-future
-Version: 0.15.2
+Version: 0.16.0
Release: 0
Summary: Clean single-source support for Python 3 and 2
License: MIT
Group: Development/Languages/Python
Url: https://python-future.org
-Source: https://pypi.python.org/packages/source/f/future/future-%{version}.tar.gz
+Source: https://pypi.python.org/packages/00/2b/8d082ddfed935f3608cc61140df6dcbf0ede…
BuildRequires: fdupes
BuildRequires: python-devel
BuildRequires: python-setuptools
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-%if 0%{?suse_version} && 0%{?suse_version} <= 1110
-%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%else
BuildArch: noarch
-%endif
%description
future: Easy, safe support for Python 2/3 compatibility
++++++ future-0.15.2.tar.gz -> future-0.16.0.tar.gz ++++++
++++ 53934 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package perl-Cpanel-JSON-XS for openSUSE:Factory checked in at 2016-11-28 15:08:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Cpanel-JSON-XS (Old)
and /work/SRC/openSUSE:Factory/.perl-Cpanel-JSON-XS.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Cpanel-JSON-XS"
Changes:
--------
Files /work/SRC/openSUSE:Factory/perl-Cpanel-JSON-XS/perl-Cpanel-JSON-XS.changes and /work/SRC/openSUSE:Factory/.perl-Cpanel-JSON-XS.new/perl-Cpanel-JSON-XS.changes differ
Old:
----
Cpanel-JSON-XS-3.0223.tar.gz
New:
----
Cpanel-JSON-XS-3.0225.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Cpanel-JSON-XS.spec ++++++
--- /var/tmp/diff_new_pack.MJaLSK/_old 2016-11-28 15:08:26.000000000 +0100
+++ /var/tmp/diff_new_pack.MJaLSK/_new 2016-11-28 15:08:26.000000000 +0100
@@ -17,7 +17,7 @@
Name: perl-Cpanel-JSON-XS
-Version: 3.0223
+Version: 3.0225
Release: 0
%define cpan_name Cpanel-JSON-XS
Summary: Cpanel Fork of Json::Xs, Fast and Correct Serializing
++++++ Cpanel-JSON-XS-3.0223.tar.gz -> Cpanel-JSON-XS-3.0225.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cpanel-JSON-XS-3.0223/Changes new/Cpanel-JSON-XS-3.0225/Changes
--- old/Cpanel-JSON-XS-3.0223/Changes 2016-11-16 12:43:56.000000000 +0100
+++ new/Cpanel-JSON-XS-3.0225/Changes 2016-11-23 19:30:10.000000000 +0100
@@ -2,6 +2,17 @@
TODO: http://stevehanov.ca/blog/index.php?id=104 compression
+3.0225 2016-11-23 (rurban)
+ - decode utf8 security fixes for perl 5.6.
+ added extra detection code for overflows and non-continuations.
+ This broke one 5.6 test with an overlong multi-byte character,
+ which previously worked accidently.
+ i.e. decode "\ud801\udc02\x{10204}"
+ - Added tests for ill-formed utf8 sequences from Encode.
+
+3.0224 2016-11-20 (rurban)
+ - fixes for g++-6, stricter -fpermissive and -Wc++11-compat
+
3.0223 2016-11-16 (rurban)
- fixed decode bignum with a string prefix. #76, patch by GilmarSantosJr.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cpanel-JSON-XS-3.0223/META.json new/Cpanel-JSON-XS-3.0225/META.json
--- old/Cpanel-JSON-XS-3.0223/META.json 2016-11-16 12:46:04.000000000 +0100
+++ new/Cpanel-JSON-XS-3.0225/META.json 2016-11-23 19:37:26.000000000 +0100
@@ -49,6 +49,6 @@
"url" : "https://github.com/rurban/Cpanel-JSON-XS"
}
},
- "version" : "3.0223",
+ "version" : "3.0225",
"x_serialization_backend" : "JSON::PP version 2.27400"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cpanel-JSON-XS-3.0223/META.yml new/Cpanel-JSON-XS-3.0225/META.yml
--- old/Cpanel-JSON-XS-3.0223/META.yml 2016-11-16 12:46:04.000000000 +0100
+++ new/Cpanel-JSON-XS-3.0225/META.yml 2016-11-23 19:37:26.000000000 +0100
@@ -24,5 +24,5 @@
homepage: http://software.schmorp.de/pkg/JSON-XS.html
license: http://dev.perl.org/licenses/
repository: https://github.com/rurban/Cpanel-JSON-XS
-version: '3.0223'
+version: '3.0225'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cpanel-JSON-XS-3.0223/SIGNATURE new/Cpanel-JSON-XS-3.0225/SIGNATURE
--- old/Cpanel-JSON-XS-3.0223/SIGNATURE 2016-11-16 12:46:07.000000000 +0100
+++ new/Cpanel-JSON-XS-3.0225/SIGNATURE 2016-11-23 19:37:28.000000000 +0100
@@ -16,20 +16,20 @@
SHA1 7473e2b9cd191810a0531dcd0bed55a153acc497 .travis.yml
SHA1 9a56f3b919dfc8fced3803e165a2e38de62646e5 COPYING
-SHA1 830d4c2ddef2fdf46ede88ef9604db5bab1117d3 Changes
+SHA1 0eca63583004e23c85152568093cffc27d32fc6a Changes
SHA1 7ebf5876b2d33d6ddcfd69e2541394c63537fcfd MANIFEST
-SHA1 3ce749fd92c1dafc7ac8deb3562eb6cc750ff3de META.json
-SHA1 fc6d87e54d5aed44f254dab692c6724703fe85f6 META.yml
+SHA1 c3b7f25a966e88510f9724acb1947d57175c2331 META.json
+SHA1 df66f431b2870bd559872ce6dbb12081fd50a1d7 META.yml
SHA1 326673d83f68b486d22267c540f457f55cd91c76 Makefile.PL
SHA1 c14d9febccd6bdcb718cae6a307b9c7a0cb4dfea README
-SHA1 ac7157cf78b897be42912331f938a855168a84b0 XS.pm
-SHA1 b327d89b15797321e33cb74d7db64eeb44931099 XS.xs
+SHA1 533e03d4469a48de286155ecd1dab2fe5dde0d77 XS.pm
+SHA1 72a97b626375f9dc02a022d5687bb2d7de238880 XS.xs
SHA1 27b0bc7e0cd6fe90876fb3d285065c6a07cca028 XS/Boolean.pm
SHA1 9e4b04d1af085e6959aaed51734475d350136392 bin/cpanel_json_xs
SHA1 ea72bbe602baaabdd0004ef1d7e7cc3334b42bb4 eg/bench
SHA1 4adab19c45378f079298d6d0b9f90a57f55bafe7 ppport.h
SHA1 f7101031fd3fde35fe2421a07ab6cee8a822c00c t/00_load.t
-SHA1 378ac291e67b37edef69c4e82b015d269f9120b0 t/01_utf8.t
+SHA1 2e04c54c8e6bf0d8090bcbc17487238a98f5e0aa t/01_utf8.t
SHA1 9cf542e0bf68c90749420c7d07d7be80e1860592 t/02_error.t
SHA1 1dbcee8e27652d901af1c7f03a06a081e3b69092 t/03_types.t
SHA1 d876bdffc381f4f67ec90f9c331e3ec2138946e2 t/04_dwiw_encode.t
@@ -430,7 +430,7 @@
SHA1 e93c9b53438be114c25aa426742e24f4343057a7 typemap
-----BEGIN PGP SIGNATURE-----
-iEUEARECAAYFAlgsRvwACgkQmm2SYo/9yULocQCY0AZYfrAA57Ijuy1FFt2oCcL6
-dQCgg//DLqhS65kL8WMVhVgY8eSPEp8=
-=XY1P
+iEUEARECAAYFAlg14eYACgkQmm2SYo/9yUIi3QCYieGKtBzH0GSR0h4OXSSP1c3s
++ACeOJJKpuCzdkrscHxFj9eBs7Pyg/8=
+=v46H
-----END PGP SIGNATURE-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cpanel-JSON-XS-3.0223/XS.pm new/Cpanel-JSON-XS-3.0225/XS.pm
--- old/Cpanel-JSON-XS-3.0223/XS.pm 2016-11-16 12:43:56.000000000 +0100
+++ new/Cpanel-JSON-XS-3.0225/XS.pm 2016-11-23 19:25:00.000000000 +0100
@@ -1,5 +1,5 @@
package Cpanel::JSON::XS;
-our $VERSION = '3.0223';
+our $VERSION = '3.0225';
our $XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cpanel-JSON-XS-3.0223/XS.xs new/Cpanel-JSON-XS-3.0225/XS.xs
--- old/Cpanel-JSON-XS-3.0223/XS.xs 2016-11-16 12:43:56.000000000 +0100
+++ new/Cpanel-JSON-XS-3.0225/XS.xs 2016-11-23 19:22:32.000000000 +0100
@@ -138,13 +138,13 @@
#ifdef WARN_NONCHAR
#define WARNER_NONCHAR(hi) \
Perl_ck_warner_d(aTHX_ packWARN(WARN_NONCHAR), \
- "Unicode non-character U+%04"UVXf" is not " \
+ "Unicode non-character U+%04" UVXf " is not " \
"recommended for open interchange", hi)
/* before check use warnings 'utf8' */
#elif PERL_VERSION > 10
#define WARNER_NONCHAR(hi) \
Perl_ck_warner_d(aTHX_ packWARN(WARN_UTF8), \
- "Unicode non-character U+%04"UVXf" is illegal " \
+ "Unicode non-character U+%04" UVXf " is illegal " \
"for interchange", hi)
#else
#define WARNER_NONCHAR(hi) \
@@ -379,8 +379,8 @@
decode_utf8 (pTHX_ unsigned char *s, STRLEN len, int relaxed, STRLEN *clen)
{
if (LIKELY(len >= 2
- && IN_RANGE_INC (char, s[0], 0xc2, 0xdf)
- && IN_RANGE_INC (char, s[1], 0x80, 0xbf)))
+ && IN_RANGE_INC (char, s[0], 0xc2, 0xdf)
+ && IN_RANGE_INC (char, s[1], 0x80, 0xbf)))
{
*clen = 2;
return ((s[0] & 0x1f) << 6) | (s[1] & 0x3f);
@@ -391,7 +391,7 @@
We accept only valid unicode, unless we are in the relaxed mode. */
#if PERL_VERSION > 12
UV c = utf8n_to_uvuni (s, len, clen,
- UTF8_CHECK_ONLY | (relaxed ? 0 : UTF8_DISALLOW_SUPER));
+ UTF8_CHECK_ONLY | (relaxed ? 0 : UTF8_DISALLOW_SUPER));
#elif PERL_VERSION >= 8
UV c = utf8n_to_uvuni (s, len, clen, UTF8_CHECK_ONLY);
#endif
@@ -402,31 +402,70 @@
#if PERL_VERSION >= 8
return c;
#else
- /* for perl 5.6 */
+ /* 5.6 does not detect certain ill-formed sequences, esp. overflows,
+ which are security relevant. so we add code to detect these. */
UV c = utf8_to_uv(s, len, clen, UTF8_CHECK_ONLY);
- if (c > PERL_UNICODE_MAX && !relaxed)
- *clen = -1;
+ if (!relaxed) {
+ if (!c || c > PERL_UNICODE_MAX)
+ *clen = -1;
+ /* need to check manually for some overflows. 5.6 unicode bug */
+ else if (len >= 2
+ && IN_RANGE_INC (char, s[0], 0xc0, 0xfe)
+ && !IN_RANGE_INC (char, s[0], 0xc2, 0xdf)) {
+ U8 *s0, *send;
+ UV uv = *s;
+ UV expectlen = UTF8SKIP(s);
+
+#define UTF_CONTINUATION_MASK ((U8) ((1U << 6) - 1))
+#define UTF_ACCUMULATION_OVERFLOW_MASK \
+ (((UV) UTF_CONTINUATION_MASK) << ((sizeof(UV) * 8) - 6))
+
+ s0 = s;
+ /*printf ("maybe overlong <%.*s> %d/%d %x %x\n", len, s, c,
+ *clen, s[0], s[1]);*/
+ if (*clen > 4) {
+ *clen = -1;
+ return c;
+ }
+ send = (U8*) s0 + ((expectlen <= len) ? len : len);
+ for (s = s0 + 1; s < send; s++) {
+ if (LIKELY(UTF8_IS_CONTINUATION(*s))) {
+ if (uv & UTF_ACCUMULATION_OVERFLOW_MASK) {
+ /*printf ("overflow\n");*/
+ *clen = -1;
+ return c;
+ }
+ uv = UTF8_ACCUMULATE(uv, *s);
+ }
+ else {
+ /*printf ("unexpected non continuation\n");*/
+ *clen = -1;
+ return c;
+ }
+ }
+ }
+ }
return c;
#endif
}
}
-/* likewise for encoding, also never called for ascii codepoints */
-/* this function takes advantage of this fact, although current gccs */
-/* seem to optimise the check for >= 0x80 away anyways */
+/* Likewise for encoding, also never called for ascii codepoints. */
+/* This function takes advantage of this fact, although current gcc's */
+/* seem to optimise the check for >= 0x80 away anyways. */
INLINE unsigned char *
encode_utf8 (unsigned char *s, UV ch)
{
- if (UNLIKELY(ch < 0x000080))
+ if (UNLIKELY(ch < 0x000080))
*s++ = ch;
else if (LIKELY(ch < 0x000800))
*s++ = 0xc0 | ( ch >> 6),
*s++ = 0x80 | ( ch & 0x3f);
- else if ( ch < 0x010000)
+ else if (ch < 0x010000)
*s++ = 0xe0 | ( ch >> 12),
*s++ = 0x80 | ((ch >> 6) & 0x3f),
*s++ = 0x80 | ( ch & 0x3f);
- else if ( ch < 0x110000)
+ else if (ch < 0x110000)
*s++ = 0xf0 | ( ch >> 18),
*s++ = 0x80 | ((ch >> 12) & 0x3f),
*s++ = 0x80 | ((ch >> 6) & 0x3f),
@@ -787,8 +826,8 @@
while (--clen);
}
else
- {
- need (aTHX_ enc, len += UTF8_MAXBYTES - 1); /* never more than 11 bytes needed */
+ { /* never more than 11 bytes needed */
+ need (aTHX_ enc, len += UTF8_MAXBYTES - 1);
enc->cur = (char*)encode_utf8 ((U8*)enc->cur, uch);
++str;
}
@@ -801,6 +840,12 @@
}
INLINE void
+encode_const_str (pTHX_ enc_t *enc, const char *str, STRLEN len, int is_utf8)
+{
+ encode_str (aTHX_ enc, (char *)str, len, is_utf8);
+}
+
+INLINE void
encode_indent (pTHX_ enc_t *enc)
{
if (enc->json.flags & F_INDENT)
@@ -866,7 +911,7 @@
if (svp)
encode_sv (aTHX_ enc, *svp);
else
- encode_str (aTHX_ enc, "null", 4, 0);
+ encode_const_str (aTHX_ enc, "null", 4, 0);
if (i < len)
encode_comma (aTHX_ enc);
@@ -1077,7 +1122,7 @@
if (isref && !(enc->json.flags & F_ALLOW_UNKNOWN))
croak ("cannot encode reference to scalar '%s' unless the scalar is 0 or 1",
SvPV_nolen (sv_2mortal (newRV_inc (sv))));
- encode_str (aTHX_ enc, "null", 4, 0);
+ encode_const_str (aTHX_ enc, "null", 4, 0);
return;
}
/* sv_2pv_flags does not accept those types: */
@@ -1109,7 +1154,7 @@
}
#endif
if (!len) {
- encode_str (aTHX_ enc, "null", 4, 0);
+ encode_const_str (aTHX_ enc, "null", 4, 0);
SvREFCNT_dec(pv);
return;
}
@@ -1144,7 +1189,7 @@
}
}
if (!str)
- encode_str (aTHX_ enc, "null", 4, 0);
+ encode_const_str (aTHX_ enc, "null", 4, 0);
else {
if (isref != 1)
encode_ch (aTHX_ enc, '"');
@@ -1182,9 +1227,9 @@
if (stash == bstash || stash == mstash || stash == oldstash)
{
if (SvIV (sv))
- encode_str (aTHX_ enc, "true", 4, 0);
+ encode_const_str (aTHX_ enc, "true", 4, 0);
else
- encode_str (aTHX_ enc, "false", 5, 0);
+ encode_const_str (aTHX_ enc, "false", 5, 0);
}
else if ((enc->json.flags & F_ALLOW_TAGS)
&& (method = gv_fetchmethod_autoload (stash, "FREEZE", 0)))
@@ -1264,7 +1309,7 @@
else if (enc->json.flags & F_CONV_BLESSED)
encode_stringify(aTHX_ enc, sv, 0);
else if (enc->json.flags & F_ALLOW_BLESSED)
- encode_str (aTHX_ enc, "null", 4, 0);
+ encode_const_str (aTHX_ enc, "null", 4, 0);
else
croak ("encountered object '%s', but neither allow_blessed, convert_blessed nor allow_tags settings are enabled (or TO_JSON/FREEZE method missing)",
SvPV_nolen (sv_2mortal (newRV_inc (sv))));
@@ -1278,19 +1323,19 @@
int bool_type = ref_bool_type (aTHX_ sv);
if (bool_type == 1)
- encode_str (aTHX_ enc, "true", 4, 0);
+ encode_const_str (aTHX_ enc, "true", 4, 0);
else if (bool_type == 0)
- encode_str (aTHX_ enc, "false", 5, 0);
+ encode_const_str (aTHX_ enc, "false", 5, 0);
else if (enc->json.flags & F_ALLOW_STRINGIFY)
encode_stringify(aTHX_ enc, sv, SvROK(sv));
else if (enc->json.flags & F_ALLOW_UNKNOWN)
- encode_str (aTHX_ enc, "null", 4, 0);
+ encode_const_str (aTHX_ enc, "null", 4, 0);
else
croak ("cannot encode reference to scalar '%s' unless the scalar is 0 or 1",
SvPV_nolen (sv_2mortal (newRV_inc (sv))));
}
else if (enc->json.flags & F_ALLOW_UNKNOWN)
- encode_str (aTHX_ enc, "null", 4, 0);
+ encode_const_str (aTHX_ enc, "null", 4, 0);
else
croak ("encountered %s, but JSON can only represent references to arrays or hashes",
SvPV_nolen (sv_2mortal (newRV_inc (sv))));
@@ -1303,11 +1348,11 @@
if (UNLIKELY(sv == &PL_sv_yes ))
{
- encode_str (aTHX_ enc, "true", 4, 0);
+ encode_const_str (aTHX_ enc, "true", 4, 0);
}
else if (UNLIKELY(sv == &PL_sv_no ))
{
- encode_str (aTHX_ enc, "false", 5, 0);
+ encode_const_str (aTHX_ enc, "false", 5, 0);
}
else if (SvNOKp (sv))
{
@@ -1473,8 +1518,8 @@
saveend = enc->end;
enc->cur +=
SvIsUV(sv)
- ? snprintf (enc->cur, IVUV_MAXCHARS, "%"UVuf, (UV)SvUVX (sv))
- : snprintf (enc->cur, IVUV_MAXCHARS, "%"IVdf, (IV)SvIVX (sv));
+ ? snprintf (enc->cur, IVUV_MAXCHARS, "%" UVuf, (UV)SvUVX (sv))
+ : snprintf (enc->cur, IVUV_MAXCHARS, "%" IVdf, (IV)SvIVX (sv));
}
if (SvPOKp (sv) && !strEQ(savecur, SvPVX (sv))) {
@@ -1499,7 +1544,7 @@
else if (SvROK (sv))
encode_rv (aTHX_ enc, sv);
else if (!SvOK (sv) || enc->json.flags & F_ALLOW_UNKNOWN)
- encode_str (aTHX_ enc, "null", 4, 0);
+ encode_const_str (aTHX_ enc, "null", 4, 0);
else
croak ("encountered perl type (%s,0x%x) that JSON cannot handle, check your input data",
SvPV_nolen (sv), (unsigned int)SvFLAGS (sv));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cpanel-JSON-XS-3.0223/t/01_utf8.t new/Cpanel-JSON-XS-3.0225/t/01_utf8.t
--- old/Cpanel-JSON-XS-3.0223/t/01_utf8.t 2016-10-30 13:27:46.000000000 +0100
+++ new/Cpanel-JSON-XS-3.0225/t/01_utf8.t 2016-11-23 19:21:40.000000000 +0100
@@ -1,4 +1,4 @@
-use Test::More tests => 23;
+use Test::More tests => 155;
use utf8;
use Cpanel::JSON::XS;
@@ -16,7 +16,12 @@
is(Cpanel::JSON::XS->new->allow_nonref (1)->decode ('"ü"'), "ü");
is(Cpanel::JSON::XS->new->allow_nonref (1)->decode ('"\u00fc"'), "ü");
-is(Cpanel::JSON::XS->new->allow_nonref (1)->decode ('"\ud801\udc02' . "\x{10204}\""), "\x{10402}\x{10204}");
+if ($] < 5.008) {
+ eval { decode_json ('"\ud801\udc02' . "\x{10204}\"", 1) };
+ like $@, qr/malformed UTF-8/;
+} else {
+ is(Cpanel::JSON::XS->new->allow_nonref (1)->decode ('"\ud801\udc02' . "\x{10204}\""), "\x{10402}\x{10204}");
+}
is(Cpanel::JSON::XS->new->allow_nonref (1)->decode ('"\"\n\\\\\r\t\f\b"'), "\"\012\\\015\011\014\010");
my $love = $] < 5.008 ? "I \342\235\244 perl" : "I ❤ perl";
@@ -80,3 +85,77 @@
is ($d, "\x{fdd0}", "no warning with relaxed");
is($w, undef);
}
+
+# security exploits via ill-formed subsequences
+# see http://unicode.org/reports/tr36/#UTF-8_Exploit
+# testcases from Encode/t/utf8strict.t
+# All these sequences are not handled by the unsafe, fast XS decoder,
+# rather passed through to the safe Perl decoder, which detects those.
+my @ill =
+ (# http://smontagu.damowmow.com/utf8test.html
+ # The numbers below, like 2.1.2 are test numbers on this web page
+ qq/80/ , # 3.1.1
+ qq/bf/ , # 3.1.2
+ qq/80 bf/ , # 3.1.3
+ qq/80 bf 80/ , # 3.1.4
+ qq/80 bf 80 bf/ , # 3.1.5
+ qq/80 bf 80 bf 80/ , # 3.1.6
+ qq/80 bf 80 bf 80 bf/ , # 3.1.7
+ qq/80 bf 80 bf 80 bf 80/ , # 3.1.8
+ qq/80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f 90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab ac ad ae af b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 ba bb bc bd be bf/ , # 3.1.9
+ qq/c0 20 c1 20 c2 20 c3 20 c4 20 c5 20 c6 20 c7 20 c8 20 c9 20 ca 20 cb 20 cc 20 cd 20 ce 20 cf 20 d0 20 d1 20 d2 20 d3 20 d4 20 d5 20 d6 20 d7 20 d8 20 d9 20 da 20 db 20 dc 20 dd 20 de 20 df 20/ , # 3.2.1
+ qq/e0 20 e1 20 e2 20 e3 20 e4 20 e5 20 e6 20 e7 20 e8 20 e9 20 ea 20 eb 20 ec 20 ed 20 ee 20 ef 20/ , # 3.2.2
+ qq/f0 20 f1 20 f2 20 f3 20 f4 20 f5 20 f6 20 f7 20/ , # 3.2.3
+ qq/f8 20 f9 20 fa 20 fb 20/ , # 3.2.4
+ qq/fc 20 fd 20/ , # 3.2.5
+ qq/c0/ , # 3.3.1
+ qq/e0 80/ , # 3.3.2
+ qq/f0 80 80/ , # 3.3.3
+ qq/f8 80 80 80/ , # 3.3.4
+ qq/fc 80 80 80 80/ , # 3.3.5
+ qq/df/ , # 3.3.6
+ qq/ef bf/ , # 3.3.7
+ qq/f7 bf bf/ , # 3.3.8
+ qq/fb bf bf bf/ , # 3.3.9
+ qq/fd bf bf bf bf/ , # 3.3.10
+ qq/c0 e0 80 f0 80 80 f8 80 80 80 fc 80 80 80 80 df ef bf f7 bf bf fb bf bf bf fd bf bf bf bf/ , # 3.4.1
+ qq/fe/ , # 3.5.1
+ qq/ff/ , # 3.5.2
+ qq/fe fe ff ff/ , # 3.5.3
+ qq/f0 8f bf bf/ , # 4.2.3
+ qq/f8 87 bf bf bf/ , # 4.2.4
+ qq/fc 83 bf bf bf bf/ , # 4.2.5
+ qq/c0 af/ , # 4.1.1 # ! overflow not with perl 5.6
+ qq/e0 80 af/ , # 4.1.2 # ! overflow not with perl 5.6
+ qq/f0 80 80 af/ , # 4.1.3 # ! overflow not with perl 5.6
+ qq/f8 80 80 80 af/ , # 4.1.4 # ! overflow not with perl 5.6
+ qq/fc 80 80 80 80 af/ , # 4.1.5 # ! overflow not with perl 5.6
+ qq/c1 bf/ , # 4.2.1 # ! overflow not with perl 5.6
+ qq/e0 9f bf/ , # 4.2.2 # ! overflow not with perl 5.6
+ qq/c0 80/ , # 4.3.1 # xx! overflow not with perl 5.6
+ qq/e0 80 80/ , # 4.3.2 # xx! overflow not with perl 5.6
+ qq/f0 80 80 80/ , # 4.3.3 # xx! overflow not with perl 5.6
+ qq/f8 80 80 80 80/ , # 4.3.4 # xx! overflow not with perl 5.6
+ qq/fc 80 80 80 80 80/ , # 4.3.5 # xx! overflow not with perl 5.6
+ # non-shortest form of 5c i.e. "\\"
+ qq/c1 9c/ , # ! not with perl 5.6
+ );
+
+{
+ # these are no multibyte codepoints, just raw utf8 bytes,
+ # so most of them work with 5.6 also.
+ $^W = 1;
+ my $w;
+ warnings->import($] < 5.014 ? 'utf8' : 'nonchar');
+ $SIG{__WARN__} = sub { $w = shift };
+
+ for my $ill (@ill) {
+ my $o = pack "C*" => map {hex} split /\s+/, $ill;
+ my $d = eval { decode_json("[\"$o\"]"); };
+ is ($d, undef, substr($@,0,25))
+ or diag $w, ' ', $ill, "\t => ", $d->[0], " $@";
+ like($@, qr/malformed UTF-8 character/, "ill-formed utf8 <$ill> throws error");
+ is($d, undef, "without warning");
+ $w = undef;
+ }
+}
1
0