Unverified Commit abd37c51 authored by Jan Tojnar's avatar Jan Tojnar Committed by GitHub
Browse files

gamin, fileschanged: remove (#305197)

parents f4230b40 bc4dad0d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
{ lib, stdenv, fetchurl, fetchpatch, pkg-config, file, zip, wxGTK32, gtk3
, contribPlugins ? false, hunspell, gamin, boost, wrapGAppsHook3
, contribPlugins ? false, hunspell, boost, wrapGAppsHook3
}:

stdenv.mkDerivation rec {
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {

  nativeBuildInputs = [ pkg-config file zip wrapGAppsHook3 ];
  buildInputs = [ wxGTK32 gtk3 ]
    ++ lib.optionals contribPlugins [ hunspell gamin boost ];
    ++ lib.optionals contribPlugins [ hunspell boost ];
  enableParallelBuilding = true;
  patches = [
    ./writable-projects.patch
@@ -119,7 +119,7 @@ stdenv.mkDerivation rec {
  preConfigure = "substituteInPlace ./configure --replace /usr/bin/file ${file}/bin/file";
  postConfigure = lib.optionalString stdenv.isLinux "substituteInPlace libtool --replace ldconfig ${stdenv.cc.libc.bin}/bin/ldconfig";
  configureFlags = [ "--enable-pch=no" ] ++ lib.optionals contribPlugins [
    ("--with-contrib-plugins" + lib.optionalString stdenv.isDarwin "=all,-FileManager,-NassiShneiderman")
    ("--with-contrib-plugins=all,-FileManager" + lib.optionalString stdenv.isDarwin ",-NassiShneiderman")
    "--with-boost-libdir=${boost}/lib"
  ];
  postInstall = lib.optionalString stdenv.isDarwin ''
+0 −73
Original line number Diff line number Diff line
From 737452159d521aef2041a2767f3ebf9f68f4b6a9 Mon Sep 17 00:00:00 2001
From: Christian Kampka <christian@kampka.net>
Date: Tue, 1 Sep 2020 13:54:35 +0200
Subject: [PATCH] Pin abstract namespace sockets to host_os

Running programs with AC_RUN_IFELSE fails when cross-compiling.
Since abstract namespace sockets are linux feature, we can easily
assume it is available for linux and not for darwin.
---
 configure.in | 47 ++++++-----------------------------------------
 1 file changed, 6 insertions(+), 41 deletions(-)

diff --git a/configure.in b/configure.in
index eb129db..0ed82ba 100644
--- a/configure.in
+++ b/configure.in
@@ -387,47 +387,12 @@ fi
 
 #### Abstract sockets
 
-AC_MSG_CHECKING(abstract socket namespace)
-AC_LANG_PUSH(C)
-AC_RUN_IFELSE([AC_LANG_PROGRAM(
-[[
-#include <sys/types.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <errno.h>
-]],
-[[
-  int listen_fd;
-  struct sockaddr_un addr;
-  
-  listen_fd = socket (PF_UNIX, SOCK_STREAM, 0);
-  
-  if (listen_fd < 0)
-    {
-      fprintf (stderr, "socket() failed: %s\n", strerror (errno));
-      exit (1);
-    }
-
-  memset (&addr, '\0', sizeof (addr));
-  addr.sun_family = AF_UNIX;
-  strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test");
-  addr.sun_path[0] = '\0'; /* this is what makes it abstract */
-  
-  if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0)
-    {
-       fprintf (stderr, "Abstract socket namespace bind() failed: %s\n", 
-                strerror (errno));
-       exit (1);
-    }
-  else 
-    exit (0);
-]])],
-              [have_abstract_sockets=yes],
-              [have_abstract_sockets=no])
-AC_LANG_POP(C)
+AC_MSG_CHECKING([whether target os has abstract socket namespace])
+if test x$target_os = xlinux-gnu ; then
+    have_abstract_sockets=yes
+else
+    have_abstract_sockets=no
+fi	
 AC_MSG_RESULT($have_abstract_sockets)
 
 if test x$enable_abstract_sockets = xyes; then
-- 
2.25.4
+0 −68
Original line number Diff line number Diff line
Fix for a deadlock:
https://bugzilla.gnome.org/show_bug.cgi?id=667230

From cc14440eface093548cb3bc7814da11d9a99d283 Mon Sep 17 00:00:00 2001
From: Anssi Hannula <anssi@mageia.org>
Date: Wed, 4 Jan 2012 00:23:55 +0200
Subject: [PATCH] fix possible server deadlock in ih_sub_cancel

ih_sub_foreach() calls ih_sub_cancel() while inotify_lock is locked.
However, ih_sub_cancel() locks it again, and locking GMutex recursively
causes undefined behaviour.

Fix that by removing locking from ih_sub_cancel() as ih_sub_foreach()
is its only user. Also make the function static so that it won't
accidentally get used by other files without locking (inotify-helper.h
is an internal server header).

This should fix the intermittent deadlocks I've been experiencing
causing KDE applications to no longer start, and probably also
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=542361
---
 server/inotify-helper.c |    7 ++-----
 server/inotify-helper.h |    1 -
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/server/inotify-helper.c b/server/inotify-helper.c
index d77203e..0789fa4 100644
--- a/server/inotify-helper.c
+++ b/server/inotify-helper.c
@@ -123,13 +123,11 @@ ih_sub_add (ih_sub_t * sub)
 
 /**
  * Cancels a subscription which was being monitored.
+ * inotify_lock must be held when calling.
  */
-gboolean
+static gboolean
 ih_sub_cancel (ih_sub_t * sub)
 {
-	G_LOCK(inotify_lock);
-
-
 	if (!sub->cancelled)
 	{
 		IH_W("cancelling %s\n", sub->pathname);
@@ -140,7 +138,6 @@ ih_sub_cancel (ih_sub_t * sub)
 		sub_list = g_list_remove (sub_list, sub);
 	}
 
-	G_UNLOCK(inotify_lock);
 	return TRUE;
 }
 
diff --git a/server/inotify-helper.h b/server/inotify-helper.h
index 5d3b6d0..d36b5fd 100644
--- a/server/inotify-helper.h
+++ b/server/inotify-helper.h
@@ -34,7 +34,6 @@ gboolean	 ih_startup		(event_callback_t ecb,
 					 found_callback_t fcb);
 gboolean	 ih_running		(void);
 gboolean	 ih_sub_add		(ih_sub_t *sub);
-gboolean	 ih_sub_cancel		(ih_sub_t *sub);
 
 /* Return FALSE from 'f' if the subscription should be cancelled */
 void		 ih_sub_foreach		(void *callerdata, gboolean (*f)(ih_sub_t *sub, void *callerdata));
-- 
1.7.7.2
+0 −10
Original line number Diff line number Diff line
# Generated by debian-patches.sh from debian-patches.txt
let
  prefix = "https://sources.debian.org/data/main/g/gamin/0.1.10-4.1/debian/patches";
in
[
  {
    url = "${prefix}/17_deprecated_const_return.patch";
    sha256 = "0bssrqcmyivlpk2g0q71d1yavd4wv1lw34l8qipm0ndljjd6rbrk";
  }
]
+0 −2
Original line number Diff line number Diff line
gamin/0.1.10-4.1
17_deprecated_const_return.patch
Loading