chiark / gitweb /
fishdescriptor: build system (nugatory)
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 24 Oct 2017 18:17:56 +0000 (19:17 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 24 Oct 2017 18:17:56 +0000 (19:17 +0100)
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
debian/changelog
debian/control
debian/rules
fishdescriptor/.gitignore
fishdescriptor/Makefile
settings.make

index f93abeb9214d196051771ad150db3d252a72540c..1966daf2255aacfa93836520a7d8a6a8f4a6eec8 100644 (file)
@@ -3,7 +3,7 @@ chiark-utils (5.0.3~citrix3) unstable; urgency=medium
   fishdescriptor:
   * New utility.
 
- --
+ -- Ian Jackson <ian.jackson@eu.citrix.com>  Tue, 24 Oct 2017 18:10:43 +0100
 
 chiark-utils (5.0.3~citrix2) unstable; urgency=medium
 
index 3e095540e7df876c1838a52ee661b9a7affc37fa..f9c4158ffbc2cc26fbb40e59efa097fdaae0539b 100644 (file)
@@ -26,13 +26,17 @@ Priority: extra
 Conflicts: chiark-named-conf, sync-accounts
 Replaces: chiark-named-conf, sync-accounts
 Depends: ${misc:Depends}
-Suggests: tcl8.4
+Suggests: tcl8.4, python3, gdb
 Architecture: all
 Description: chiark system administration scripts
  This package contains a number of small administration scripts used
  by chiark.greenend.org.uk and other systems belonging to the Sinister
  Greenend Organisation.  Featuring:
  .
+ fishdescriptor: a tool for extracting a file descriptor from
+ another (non-cooperating) process and giving it to you (or
+ examining it).  Requires gdb and python3.
+ .
  chiark-named-conf: a tool for managing nameserver configurations
  and checking for suspected DNS problems.  Its main functions are to
  check that delegations are appropriate and working, that secondary
index 32f312912b87f42b97d5d3508ceb3bf1d451a772..cc926b8e147e35939c3d63fd0ea32fb177448997 100755 (executable)
@@ -3,7 +3,7 @@
 SHELL=/bin/bash
 
 subdirs_build_arch=    cprogs
-subdirs_nobuild=backup sync-accounts scripts
+subdirs_nobuild=backup sync-accounts scripts fishdescriptor
 package=       chiark-utils
 packages_indep=        chiark-backup chiark-scripts
 packages_arch= chiark-rwbuffer chiark-really chiark-utils-bin
@@ -52,6 +52,7 @@ binary-prep:
        #
        mv $t/cprogs $t/chiark-utils-bin
        #
+       cp -a debian/tmp/fishdescriptor/* debian/tmp/scripts/.
        cp -a debian/tmp/sync-accounts/* debian/tmp/scripts/.
        rm -r debian/tmp/sync-accounts
        mv debian/tmp/scripts debian/tmp/chiark-scripts
index e6e11d439cf9c76494022a814c2746508a2458bd..0d20b6487c61e7d1bde93acf4a14b7a89083a16d 100644 (file)
@@ -1,2 +1 @@
-libfishdescriptor-donate.so.*
 *.pyc
index e6b493ac17e5e4bc13084564e2b51690f76bc0c7..9cf2ba1eeb692dcf55d21ba381534311024fd4e8 100644 (file)
@@ -1,17 +1,53 @@
-OPTIMISE = -O2
-DEBUG = -g
+# Makefile
 
-CFLAGS = -Wall -Werror -Wwrite-strings
-CFLAGS += $(OPTIMISE) $(DEBUG)
+# This file is part of chiark-utils, a collection of useful programs
+# used on chiark.greenend.org.uk.
+#
+# This file is:
+#  Copyright (C) 2017 Ian Jackson <ian.jackson@eu.citrix.com>
+#  Copyright (C) 2001 Ian Jackson <ijackson@chiark.greenend.org.uk>
+#
+# This is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 3, or (at your option) any later version.
+#
+# This is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, consult the Free Software Foundation's
+# website at www.fsf.org, or the GNU Project website at www.gnu.org.
 
-MAJOR=1
-MINOR=0
-LIBCANON=       libfishdescriptor-donate.so.$(MAJOR)
-LIBTARGET=      $(LIBCANON).$(MINOR)
+include ../settings.make
 
-all:   $(LIBTARGET)
+SCRIPTS=       fishdescriptor
+MODULES_23=    __init__ indonor
+MODULES_3=     fish
 
-$(LIBTARGET):  donate.o
-       $(CC) -shared -Wl,-soname -Wl,$(LIBCANON) -o $@ $< $(LIBS)
+py=py/fishdescriptor
+d2=$(python2dir)/fishdescriptor
+d3=$(python3dir)/fishdescriptor
 
-donate.o:                      donate.c
+all:
+
+install:
+               $(INSTALL_DIRECTORY) $(bindir) $(d2) $(d3)
+               set -e; for f in $(SCRIPTS); do \
+                       $(INSTALL_SCRIPT) $$f $(bindir)/$$f; done
+               set -e; for f in $(MODULES_3); do \
+                       $(INSTALL_SHARE) $(py)/$$f.py $(d3)/.; done
+               set -e; for f in $(MODULES_23); do \
+                       $(INSTALL_SHARE) $(py)/$$f.py $(d3)/.; \
+                       ln $(d3)/$$f.py $(d2)/.; done
+
+install-docs:
+
+install-examples:
+
+clean:
+               rm -f *~ ./#*#
+               find -name \*.pyc -print0 | xargs -0r rm --
+
+distclean realclean:   clean
index ff917b18392e26f16f2a26624e691f6461588ad8..495b2b3f855b47d716d59929186d61ee5079bdf4 100644 (file)
@@ -44,6 +44,8 @@ sbindir=$(prefix)/sbin
 sharedir=$(prefix)/share/$(us)
 perl5dir=$(prefix)/share/perl5
 txtdocdir=$(prefix)/share/doc/$(us)
+python2dir=$(prefix)/lib/python2.7/dist-packages
+python3dir=$(prefix)/lib/python3/dist-packages
 exampledir=$(txtdocdir)/examples
 vardir=$(varlib)/$(us)
 mandir=${prefix}/man