From 2163a45ca7d635b42241de7ed49dfccd2492222c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Pitucha?= Date: Fri, 19 Apr 2024 10:17:12 +1000 Subject: [PATCH] gamin, fileschanged: remove The projects have not been in development for around a decade. The original source for gamin does not exist. Although it exists in gnome archive now, it only has one similarily unmaintained tool. Remove both instead of fixing gamin for the latest clang update. --- .../gamin/abstract-socket-namespace.patch | 73 ------------------- .../libraries/gamin/deadlock.patch | 68 ----------------- .../libraries/gamin/debian-patches.nix | 10 --- .../libraries/gamin/debian-patches.txt | 2 - pkgs/development/libraries/gamin/default.nix | 50 ------------- .../libraries/gamin/returnval.patch | 12 --- pkgs/tools/misc/fileschanged/default.nix | 34 --------- .../unused-variables.debian.patch | 48 ------------ pkgs/top-level/aliases.nix | 3 + pkgs/top-level/all-packages.nix | 5 -- 10 files changed, 3 insertions(+), 302 deletions(-) delete mode 100644 pkgs/development/libraries/gamin/abstract-socket-namespace.patch delete mode 100644 pkgs/development/libraries/gamin/deadlock.patch delete mode 100644 pkgs/development/libraries/gamin/debian-patches.nix delete mode 100644 pkgs/development/libraries/gamin/debian-patches.txt delete mode 100644 pkgs/development/libraries/gamin/default.nix delete mode 100644 pkgs/development/libraries/gamin/returnval.patch delete mode 100644 pkgs/tools/misc/fileschanged/default.nix delete mode 100644 pkgs/tools/misc/fileschanged/unused-variables.debian.patch diff --git a/pkgs/development/libraries/gamin/abstract-socket-namespace.patch b/pkgs/development/libraries/gamin/abstract-socket-namespace.patch deleted file mode 100644 index ff1610559721..000000000000 --- a/pkgs/development/libraries/gamin/abstract-socket-namespace.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 737452159d521aef2041a2767f3ebf9f68f4b6a9 Mon Sep 17 00:00:00 2001 -From: Christian Kampka -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 --#include --#include --#include --#include --#include --#include --]], --[[ -- 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 - diff --git a/pkgs/development/libraries/gamin/deadlock.patch b/pkgs/development/libraries/gamin/deadlock.patch deleted file mode 100644 index e2abc8ce2d97..000000000000 --- a/pkgs/development/libraries/gamin/deadlock.patch +++ /dev/null @@ -1,68 +0,0 @@ -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 -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 - diff --git a/pkgs/development/libraries/gamin/debian-patches.nix b/pkgs/development/libraries/gamin/debian-patches.nix deleted file mode 100644 index a8f334fb3c39..000000000000 --- a/pkgs/development/libraries/gamin/debian-patches.nix +++ /dev/null @@ -1,10 +0,0 @@ -# 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"; - } -] diff --git a/pkgs/development/libraries/gamin/debian-patches.txt b/pkgs/development/libraries/gamin/debian-patches.txt deleted file mode 100644 index 46d2420b21ed..000000000000 --- a/pkgs/development/libraries/gamin/debian-patches.txt +++ /dev/null @@ -1,2 +0,0 @@ -gamin/0.1.10-4.1 -17_deprecated_const_return.patch diff --git a/pkgs/development/libraries/gamin/default.nix b/pkgs/development/libraries/gamin/default.nix deleted file mode 100644 index e2d32fd64527..000000000000 --- a/pkgs/development/libraries/gamin/default.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ lib, stdenv, fetchurl, fetchpatch, pkg-config, glib, autoreconfHook }: - -stdenv.mkDerivation rec { - pname = "gamin"; - version = "0.1.10"; - - src = fetchurl { - url = "https://www.gnome.org/~veillard/gamin/sources/gamin-${version}.tar.gz"; - sha256 = "18cr51y5qacvs2fc2p1bqv32rs8bzgs6l67zhasyl45yx055y218"; - }; - - nativeBuildInputs = [ pkg-config autoreconfHook ]; - - buildInputs = [ glib ]; - - # `_GNU_SOURCE' is needed, e.g., to get `struct ucred' from - # with Glibc 2.9. - configureFlags = [ - "--disable-debug" - "--without-python" # python3 not supported - "CPPFLAGS=-D_GNU_SOURCE" - ]; - - preBuild = lib.optionalString stdenv.isDarwin '' - sed -i 's/,--version-script=.*$/\\/' libgamin/Makefile - ''; - - env = lib.optionalAttrs stdenv.cc.isClang { - NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; - }; - - patches = [ ./deadlock.patch ] - ++ map fetchurl (import ./debian-patches.nix) - ++ lib.optional stdenv.cc.isClang ./returnval.patch - ++ lib.optional stdenv.hostPlatform.isMusl (fetchpatch { - name = "fix-pthread-mutex.patch"; - url = "https://git.alpinelinux.org/aports/plain/main/gamin/fix-pthread-mutex.patch?h=3.4-stable&id=a1a836b089573752c1b0da7d144c0948b04e8ea8"; - sha256 = "13igdbqsxb3sz0h417k6ifmq2n4siwqspj6slhc7fdl5wd1fxmdz"; - }) ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./abstract-socket-namespace.patch; - - - meta = with lib; { - homepage = "https://people.gnome.org/~veillard/gamin/"; - description = "File and directory monitoring system"; - maintainers = with maintainers; [ lovek323 ]; - license = licenses.gpl2; - platforms = platforms.unix; - }; -} - diff --git a/pkgs/development/libraries/gamin/returnval.patch b/pkgs/development/libraries/gamin/returnval.patch deleted file mode 100644 index 3944b14be64c..000000000000 --- a/pkgs/development/libraries/gamin/returnval.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -rupN gamin-0.1.10-orig/server/gam_eq.c gamin-0.1.10/server/gam_eq.c ---- gamin-0.1.10-orig/server/gam_eq.c 2015-04-05 19:25:54.000000000 -0400 -+++ gamin-0.1.10/server/gam_eq.c 2015-04-05 19:26:00.000000000 -0400 -@@ -124,7 +124,7 @@ gam_eq_flush (gam_eq_t *eq, GamConnDataP - { - gboolean done_work = FALSE; - if (!eq) -- return; -+ return done_work; - - #ifdef GAM_EQ_VERBOSE - GAM_DEBUG(DEBUG_INFO, "gam_eq: Flushing event queue for %s\n", gam_connection_get_pidname (conn)); diff --git a/pkgs/tools/misc/fileschanged/default.nix b/pkgs/tools/misc/fileschanged/default.nix deleted file mode 100644 index bb0898a5d37f..000000000000 --- a/pkgs/tools/misc/fileschanged/default.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ lib, stdenv, fetchurl, gamin }: - -stdenv.mkDerivation rec { - pname = "fileschanged"; - version = "0.6.9"; - - src = fetchurl { - url = "mirror://savannah/fileschanged/fileschanged-${version}.tar.gz"; - sha256 = "0ajc9h023vzpnlqqjli4wbvs0q36nr5p9msc3wzbic8rk687qcxc"; - }; - - buildInputs = [ gamin ]; - - patches = [./unused-variables.debian.patch]; - - doCheck = true; - - meta = { - homepage = "https://www.nongnu.org/fileschanged/"; - description = "Command-line utility that reports when files have been altered"; - license = lib.licenses.gpl3Plus; - - longDescription = '' - This utility is a client to FAM (File Alteration Monitor) servers - like FAM or Gamin. You give it some filenames on the command line - and then it monitors those files for changes. When it discovers - that a file has been altered, it displays the filename on the - standard-output or executes a given command. - ''; - - platforms = lib.platforms.linux; - mainProgram = "fileschanged"; - }; -} diff --git a/pkgs/tools/misc/fileschanged/unused-variables.debian.patch b/pkgs/tools/misc/fileschanged/unused-variables.debian.patch deleted file mode 100644 index 73d307f9413d..000000000000 --- a/pkgs/tools/misc/fileschanged/unused-variables.debian.patch +++ /dev/null @@ -1,48 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 07_unused_variables.dpatch by Colin Watson -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: GCC 4.6 warns about unused variables, and fileschanged builds with -## DP: -Werror, so deal with unused variable warnings. - -@DPATCH@ -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' fileschanged-0.6.5~/src/monitor.c fileschanged-0.6.5/src/monitor.c ---- fileschanged-0.6.5~/src/monitor.c 2006-04-19 20:42:29.000000000 +0100 -+++ fileschanged-0.6.5/src/monitor.c 2011-09-14 01:17:23.000000000 +0100 -@@ -84,6 +84,7 @@ - retval = FAMMonitorDirectory (c, node->filename, &node->request, - (void *) node); - //printf ("FAMMonitorDirectory returns %d (reqnum %d)\n", retval, node->request.reqnum); -+ (void) retval; - } - else if (S_ISREG (node->statbuf.st_mode)) - { -@@ -91,6 +92,7 @@ - retval = FAMMonitorFile (c, node->filename, &node->request, - (void *) node); - //printf ("FAMMonitorFile returns %d (reqnum %d)\n", retval, node->request.reqnum); -+ (void) retval; - } - monitor_handle_events (c, list, 0, 30); - } - -diff -r -U3 fileschanged-0.6.9-orig/src/main.c fileschanged-0.6.9/src/main.c ---- fileschanged-0.6.9-orig/src/main.c 2012-04-13 01:31:59.160601022 +0400 -+++ fileschanged-0.6.9/src/main.c 2012-04-13 01:32:47.549599643 +0400 -@@ -126,6 +126,7 @@ - { - retval = process_file (filelist, filelist_len, arguments.args[i]); - } -+ (void) retval; - return 0; - } - -@@ -168,6 +169,7 @@ - - if (fileptr != stdin) - fclose (fileptr); -+ (void) retval; - return 0; - } - int - diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 65ac0671b249..6bc847dd4400 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -441,6 +441,7 @@ mapAliases ({ ### F ### + fam = throw "'fam' (aliased to 'gamin') has been removed as it is unmaintained upstream"; # Added 2024-04-19 fancypp = throw "'fancypp' was removed because it and its dependants are unmaintained"; # Added 2024-02-14 faustStk = faustPhysicalModeling; # Added 2023-05-16 fastnlo = fastnlo-toolkit; # Added 2021-04-24 @@ -453,6 +454,7 @@ mapAliases ({ ffmpeg_5-headless = throw "ffmpeg_5-headless has been removed, please use another version"; # Added 2024-07-12 ffmpeg_5-full = throw "ffmpeg_5-full has been removed, please use another version"; # Added 2024-07-12 FIL-plugins = fil-plugins; # Added 2024-06-12 + fileschanged = throw "'fileschanged' has been removed as it is unmaintained upstream"; # Added 2024-04-19 findimagedupes = throw "findimagedupes has been removed because the perl bindings are no longer compatible"; # Added 2023-07-10 finger_bsd = bsd-finger; fingerd_bsd = bsd-fingerd; @@ -496,6 +498,7 @@ mapAliases ({ g4music = gapless; # Added 2024-07-26 g4py = python3Packages.geant4; # Added 2020-06-06 + gamin = throw "'gamin' has been removed as it is unmaintained upstream"; # Added 2024-04-19 garage_0_7 = throw "garage 0.7.x has been removed as it is EOL. Please upgrade to 0.8 series."; # Added 2023-10-10 garage_0_7_3 = throw "garage 0.7.x has been removed as it is EOL. Please upgrade to 0.8 series."; # Added 2023-10-10 garmin-plugin = throw "garmin-plugin has been removed, as it is unmaintained upstream and no longer works with modern browsers."; # Added 2024-01-12 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e0b15ffc49d7..abfe54023663 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7733,8 +7733,6 @@ with pkgs; filegive = callPackage ../tools/networking/filegive { }; - fileschanged = callPackage ../tools/misc/fileschanged { }; - filet = callPackage ../applications/misc/filet { }; findex = callPackage ../applications/misc/findex { }; @@ -20129,9 +20127,6 @@ with pkgs; game-music-emu = callPackage ../development/libraries/audio/game-music-emu { }; - gamin = callPackage ../development/libraries/gamin { }; - fam = gamin; # added 2018-04-25 - ganv = callPackage ../development/libraries/ganv { }; garble = callPackage ../development/tools/garble { };