--- syslog-ocaml-1.4.orig/debian/compat +++ syslog-ocaml-1.4/debian/compat @@ -0,0 +1 @@ +5 --- syslog-ocaml-1.4.orig/debian/changelog +++ syslog-ocaml-1.4/debian/changelog @@ -0,0 +1,119 @@ +syslog-ocaml (1.4-1build1) intrepid; urgency=low + + * Rebuild with OCaml 3.10.2. + + -- Michael Bienia Tue, 27 May 2008 22:46:39 +0200 + +syslog-ocaml (1.4-1) unstable; urgency=low + + [ Eric Cooper ] + * New upstream release + * Added DM-Upload-Allowed to debian/control + * Updated standards version + + [ Stefano Zacchiroli ] + * fix vcs-svn field to point just above the debian/ dir + + -- Eric Cooper Mon, 04 Feb 2008 11:37:29 -0500 + +syslog-ocaml (1.3-7) unstable; urgency=low + + * promote Homepage to a real debian/control field + + -- Stefano Zacchiroli Fri, 21 Sep 2007 09:57:40 +0200 + +syslog-ocaml (1.3-6) unstable; urgency=low + + * Use support for ocamldoc in OCaml cdbs class + + -- Eric Cooper Mon, 03 Sep 2007 17:22:49 -0400 + +syslog-ocaml (1.3-5) unstable; urgency=low + + * Create libsyslog-ocaml as well as libsyslog-ocaml-dev + since there is now a stub library for bytecode client programs + + -- Eric Cooper Tue, 12 Jun 2007 16:51:37 -0400 + +syslog-ocaml (1.3-4) unstable; urgency=low + + * Use send(2) with MSG_NOSIGNAL flag instead of write(2), + to avoid a SIGPIPE signal when syslog-ng closes its connection + (closes: #395469) + + -- Eric Cooper Sat, 09 Jun 2007 15:26:38 -0400 + +syslog-ocaml (1.3-3) unstable; urgency=low + + * Changed dependency on ocaml-tools to ocamlmakefile. + * Added myself to Uploaders. + + -- Ralf Treinen Sun, 03 Jun 2007 22:10:35 +0200 + +syslog-ocaml (1.3-2) unstable; urgency=low + + * Use OCaml cdbs class + + -- Eric Cooper Tue, 24 Apr 2007 21:23:41 -0400 + +syslog-ocaml (1.3-1) unstable; urgency=low + + * New upstream release (closes: #379459) + * Don't install cmx file + * Update version in META file + * Modify copyright file to eliminate lintian warnings + * Removed debian/control.in per OCaml packaging policy + + -- Eric Cooper Thu, 31 Aug 2006 10:10:35 -0400 + +syslog-ocaml (1.2-4) unstable; urgency=low + + * Transition to OCaml 3.09.1 + + -- Eric Cooper Mon, 9 Jan 2006 15:40:32 -0500 + +syslog-ocaml (1.2-3.1) unstable; urgency=medium + + * Non-maintainer upload. + * No changes, just build and upload to get changes from -2 and -3 into + unstable. + + -- Jordi Mallach Tue, 27 Dec 2005 10:46:15 +0100 + +syslog-ocaml (1.2-3) unstable; urgency=low + + * Added debian/control.in and a rule to generate debian/control from it + + -- Eric Cooper Sun, 13 Nov 2005 13:32:25 -0500 + +syslog-ocaml (1.2-2) unstable; urgency=low + + * Updated debian/control for ocaml version 3.09.0 + + -- Eric Cooper Tue, 1 Nov 2005 17:27:40 -0500 + +syslog-ocaml (1.2-1) unstable; urgency=low + + * New upstream release incorporating syslog-ng support + * Only build byte-code version on architectures with no ocamlopt + + -- Eric Cooper Sat, 30 Apr 2005 15:50:47 -0400 + +syslog-ocaml (1.0-3) unstable; urgency=low + + * Support SOCK_STREAM log sockets for syslog-ng (closes: #305019) + + -- Eric Cooper Sun, 17 Apr 2005 12:31:25 -0400 + +syslog-ocaml (1.0-2) unstable; urgency=low + + * Removed trunk/ directory layer. + * Added Build-Depends on dpatch (closes: #303760) + + -- Eric Cooper Fri, 8 Apr 2005 14:04:48 -0400 + +syslog-ocaml (1.0-1) unstable; urgency=low + + * Initial release. + + -- Sven Luther Sat, 2 Apr 2005 09:28:38 +0200 --- syslog-ocaml-1.4.orig/debian/watch +++ syslog-ocaml-1.4/debian/watch @@ -0,0 +1,3 @@ +version=3 + +http://homepage.mac.com/letaris/syslog-(.*)\.tar\.gz --- syslog-ocaml-1.4.orig/debian/copyright +++ syslog-ocaml-1.4/debian/copyright @@ -0,0 +1,29 @@ +syslog(3) routines for ocaml + +Packaged for Debian by Eric Cooper on Wed, 30 Apr 2005 + +Downloaded from http://homepage.mac.com/letaris/ + +This library is based on Shawn Wagner's original syslog +library as included in annexlib, with significant modifications +by Eric Stokes . + +Copyright (C) 2002 Shawn Wagner +Copyright (C) 2005 Eric Stokes + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library 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 +Lesser General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian GNU/Linux systems, the complete text of the GNU Lesser +General Public License can be found in /usr/share/common-licenses/LGPL. --- syslog-ocaml-1.4.orig/debian/rules +++ syslog-ocaml-1.4/debian/rules @@ -0,0 +1,13 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/makefile.mk +include /usr/share/cdbs/1/rules/dpatch.mk +include /usr/share/cdbs/1/class/ocaml.mk + +OCAML_OCAMLDOC_PACKAGES = $(OCAML_LIBDEV_PACKAGES) + +DEB_MAKE_BUILD_TARGET = byte-code-library +ifeq ($(OCAML_HAVE_OCAMLOPT),yes) + DEB_MAKE_BUILD_TARGET += native-code-library +endif --- syslog-ocaml-1.4.orig/debian/control +++ syslog-ocaml-1.4/debian/control @@ -0,0 +1,30 @@ +Source: syslog-ocaml +Section: devel +Priority: optional +Maintainer: Debian OCaml Maintainers +Uploaders: Eric Cooper , Ralf Treinen +DM-Upload-Allowed: yes +Build-Depends: debhelper (>= 5.0), cdbs, dpatch, ocaml-nox (>= 3.10), ocamlmakefile, ocaml-findlib +Standards-Version: 3.7.3 +Homepage: http://homepage.mac.com/letaris +Vcs-Svn: svn://svn.debian.org/svn/pkg-ocaml-maint/trunk/packages/syslog-ocaml/trunk +Vcs-Browser: http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/packages/syslog-ocaml/trunk/ + +Package: libsyslog-ocaml +Architecture: any +Section: libs +Depends: ocaml-base-nox-${F:OCamlABI}, ${shlibs:Depends} +Description: syslog routines for OCaml + This library implements a syslog client in Objective Caml. + . + This package contains the shared runtime stub libraries. + +Package: libsyslog-ocaml-dev +Architecture: any +Section: libdevel +Depends: ocaml-nox-${F:OCamlABI}, libsyslog-ocaml (= ${binary:Version}) +Description: syslog routines for OCaml + This library implements a syslog client in Objective Caml. + . + This package contains the files needed to compile OCaml programs + that use the syslog library. --- syslog-ocaml-1.4.orig/debian/libsyslog-ocaml-dev.install.in +++ syslog-ocaml-1.4/debian/libsyslog-ocaml-dev.install.in @@ -0,0 +1 @@ +{META,*.mli,*.cmi,*.cm*a,*.a} @OCamlStdlibDir@/syslog --- syslog-ocaml-1.4.orig/debian/svn-deblayout +++ syslog-ocaml-1.4/debian/svn-deblayout @@ -0,0 +1,3 @@ +origDir=../upstream +origUrl=svn+ssh://svn.debian.org/svn/pkg-ocaml-maint/trunk/packages/syslog-ocaml/upstream +tagsUrl=svn+ssh://svn.debian.org/svn/pkg-ocaml-maint/tags/packages/syslog-ocaml --- syslog-ocaml-1.4.orig/debian/libsyslog-ocaml.install.in +++ syslog-ocaml-1.4/debian/libsyslog-ocaml.install.in @@ -0,0 +1 @@ +dllsyslog_stubs.so @OCamlStdlibDir@/stublibs --- syslog-ocaml-1.4.orig/debian/patches/00list +++ syslog-ocaml-1.4/debian/patches/00list @@ -0,0 +1,2 @@ +Makefile.dpatch +aux.dpatch --- syslog-ocaml-1.4.orig/debian/patches/aux.dpatch +++ syslog-ocaml-1.4/debian/patches/aux.dpatch @@ -0,0 +1,94 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## aux.dpatch by Eric Cooper +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: patch to add wrapper for send(2) with MSG_NOSIGNAL option + +@DPATCH@ +diff -urNad syslog-ocaml-1.4~/Makefile syslog-ocaml-1.4/Makefile +--- syslog-ocaml-1.4~/Makefile 2007-11-01 15:42:18.000000000 -0400 ++++ syslog-ocaml-1.4/Makefile 2007-11-01 15:42:18.000000000 -0400 +@@ -1,8 +1,9 @@ + OCAMLMAKEFILE = /usr/share/ocamlmakefile/OCamlMakefile + DESTDIR = $(shell ocamlc -where | sed s:/usr/lib/:/usr/local/lib/:) + OCAMLFIND_INSTFLAGS = -destdir $(DESTDIR) ++NO_CUSTOM = yes + +-SOURCES=syslog.mli syslog.ml ++SOURCES=syslog.mli aux.ml syslog.ml aux_stubs.c + RESULT=syslog + PACKS=unix + +diff -urNad syslog-ocaml-1.4~/aux.ml syslog-ocaml-1.4/aux.ml +--- syslog-ocaml-1.4~/aux.ml 1969-12-31 19:00:00.000000000 -0500 ++++ syslog-ocaml-1.4/aux.ml 2007-11-01 15:42:18.000000000 -0400 +@@ -0,0 +1,14 @@ ++type msg_flag = ++ MSG_OOB ++ | MSG_DONTROUTE ++ | MSG_PEEK ++ | MSG_NOSIGNAL ++ ++external unsafe_send : ++ Unix.file_descr -> string -> int -> int -> msg_flag list -> int ++ = "aux_send" ++ ++let send fd buf ofs len flags = ++ if ofs < 0 || len < 0 || ofs > String.length buf - len ++ then invalid_arg "Unix.send" ++ else unsafe_send fd buf ofs len flags +diff -urNad syslog-ocaml-1.4~/aux_stubs.c syslog-ocaml-1.4/aux_stubs.c +--- syslog-ocaml-1.4~/aux_stubs.c 1969-12-31 19:00:00.000000000 -0500 ++++ syslog-ocaml-1.4/aux_stubs.c 2007-11-01 15:42:18.000000000 -0400 +@@ -0,0 +1,31 @@ ++#include ++#include ++#include ++#include ++#include ++ ++// These are from .../otherlibs/unix/unixsupport.h ++#define UNIX_BUFFER_SIZE 16384 ++extern void uerror (char * cmdname, value arg) Noreturn; ++ ++static int msg_flag_table[] = { ++ MSG_OOB, MSG_DONTROUTE, MSG_PEEK, MSG_NOSIGNAL ++}; ++ ++CAMLprim value aux_send(value sock, value buff, value ofs, value len, ++ value flags) ++{ ++ int ret, cv_flags; ++ long numbytes; ++ char iobuf[UNIX_BUFFER_SIZE]; ++ ++ cv_flags = convert_flag_list(flags, msg_flag_table); ++ numbytes = Long_val(len); ++ if (numbytes > UNIX_BUFFER_SIZE) numbytes = UNIX_BUFFER_SIZE; ++ memmove(iobuf, &Byte(buff, Long_val(ofs)), numbytes); ++ enter_blocking_section(); ++ ret = send(Int_val(sock), iobuf, (int) numbytes, cv_flags); ++ leave_blocking_section(); ++ if (ret == -1) uerror("send", (value) 0); ++ return Val_int(ret); ++} +diff -urNad syslog-ocaml-1.4~/syslog.ml syslog-ocaml-1.4/syslog.ml +--- syslog-ocaml-1.4~/syslog.ml 2007-11-01 15:42:17.000000000 -0400 ++++ syslog-ocaml-1.4/syslog.ml 2007-11-01 15:51:55.000000000 -0400 +@@ -191,14 +191,11 @@ + (try open_connection loginfo with _ -> ()); + if List.mem `LOG_CONS loginfo.flags then log_console str + in +- let prev = Sys.signal Sys.sigpipe (Sys.Signal_handle fallback) in + try +- ignore (write loginfo.fd str 0 (String.length str)); +- Sys.set_signal Sys.sigpipe prev ++ ignore (Aux.send loginfo.fd str 0 (String.length str) [Aux.MSG_NOSIGNAL]) + with Unix_error (_, _, _) -> + (* on error, attempt to reconnect *) +- fallback (); +- Sys.set_signal Sys.sigpipe prev ++ fallback () + + let syslog ?fac loginfo lev str = + let msg = Buffer.create 64 in --- syslog-ocaml-1.4.orig/debian/patches/Makefile.dpatch +++ syslog-ocaml-1.4/debian/patches/Makefile.dpatch @@ -0,0 +1,29 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## Makefile.dpatch by Eric Cooper +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Makefile patches + +@DPATCH@ +--- syslog-1.3/Makefile 2005-02-16 18:31:49.000000000 -0500 ++++ syslog-ocaml/Makefile 2006-07-19 14:13:13.000000000 -0400 +@@ -1,10 +1,12 @@ +--include Makefile.conf ++OCAMLMAKEFILE = /usr/share/ocamlmakefile/OCamlMakefile ++DESTDIR = $(shell ocamlc -where | sed s:/usr/lib/:/usr/local/lib/:) ++OCAMLFIND_INSTFLAGS = -destdir $(DESTDIR) + + SOURCES=syslog.mli syslog.ml + RESULT=syslog + PACKS=unix + + LIBINSTALL_FILES=$(wildcard *.mli *.cmi *.cma *.cmx *.cmxa *.a *.so) + + all: byte-code-library + opt: native-code-library +@@ -13,4 +15,4 @@ + uninstall: libuninstall + doc: htdoc + +--include OCamlMakefile ++include $(OCAMLMAKEFILE)