diff -Nru cudf-0.7/ChangeLog cudf-0.9/ChangeLog --- cudf-0.7/ChangeLog 2014-04-29 18:52:44.000000000 +0000 +++ cudf-0.9/ChangeLog 2017-03-21 14:39:23.000000000 +0000 @@ -1,3 +1,16 @@ +2017-03-21 Stefano Zacchiroli + * ALL release 0.9 + * Build: remove spurious dependencies on no longer used camlp4 + * Makefile: fix build issues on Windows + +2015-03-31 Stefano Zacchiroli + * ALL release 0.8 + * Cudf: performance improvement by allocating larger hashtbl + * Cudf: expose empty_universe + (Thanks to Pietro Abate for the above 2 patches) + * Makefile: inhibit parallel build (thanks to Roberto Di Cosmo) + * Cudf_parser: prevent in_channel leaks when using from_file + 2014-04-29 Stefano Zacchiroli * ALL release 0.7 * Cudf_checker: do not report as multi-upgrade error a package diff -Nru cudf-0.7/c-lib/Makefile cudf-0.9/c-lib/Makefile --- cudf-0.7/c-lib/Makefile 2014-04-29 18:52:44.000000000 +0000 +++ cudf-0.9/c-lib/Makefile 2017-03-21 14:39:23.000000000 +0000 @@ -3,6 +3,10 @@ opt: libcudf-opt.a c-test-opt include Makefile.variants +ifneq ($(DESTDIR),) +DESTDIR:=$(DESTDIR)/ +endif + NULL = CFLAGS = -Wall -DG_LOG_DOMAIN=\"libCUDF\" PROG_CFLAGS = -Wall @@ -60,22 +64,22 @@ rm -f cudf.pc install: cudf.pc - test -d $(DESTDIR)/$(LIBDIR) || mkdir -p $(DESTDIR)/$(LIBDIR) - test -d $(DESTDIR)/$(INCDIR) || mkdir -p $(DESTDIR)/$(INCDIR) - test -d $(DESTDIR)/$(PCDIR) || mkdir -p $(DESTDIR)/$(PCDIR) + test -d $(DESTDIR)$(LIBDIR) || mkdir -p $(DESTDIR)$(LIBDIR) + test -d $(DESTDIR)$(INCDIR) || mkdir -p $(DESTDIR)$(INCDIR) + test -d $(DESTDIR)$(PCDIR) || mkdir -p $(DESTDIR)$(PCDIR) if [ -f libcudf-opt.a ] ; then \ - cp libcudf-opt.a $(DESTDIR)/$(LIBDIR)/libcudf.a ; \ + cp libcudf-opt.a $(DESTDIR)$(LIBDIR)/libcudf.a ; \ else \ - cp libcudf.a $(DESTDIR)/$(LIBDIR)/libcudf.a ; \ + cp libcudf.a $(DESTDIR)$(LIBDIR)/libcudf.a ; \ fi - cp libcudf.a $(DESTDIR)/$(LIBDIR) - cp cudf.h $(DESTDIR)/$(INCDIR) - cp cudf.pc $(DESTDIR)/$(PCDIR) + cp libcudf.a $(DESTDIR)$(LIBDIR) + cp cudf.h $(DESTDIR)$(INCDIR) + cp cudf.pc $(DESTDIR)$(PCDIR) uninstall: - rm $(DESTDIR)/$(LIBDIR)/libcudf.a - rm $(DESTDIR)/$(INCDIR)/cudf.h - rm $(DESTDIR)/$(PCDIR)/cudf.pc - -rmdir -p $(DESTDIR)/$(LIBDIR) $(DESTDIR)/$(INCDIR) $(DESTDIR)/$(PCDIR) + rm $(DESTDIR)$(LIBDIR)/libcudf.a + rm $(DESTDIR)$(INCDIR)/cudf.h + rm $(DESTDIR)$(PCDIR)/cudf.pc + -rmdir -p $(DESTDIR)$(LIBDIR) $(DESTDIR)$(INCDIR) $(DESTDIR)$(PCDIR) .PHONY: all opt clean test install uninstall diff -Nru cudf-0.7/cudf.ml cudf-0.9/cudf.ml --- cudf-0.7/cudf.ml 2014-04-29 18:52:44.000000000 +0000 +++ cudf-0.9/cudf.ml 2017-03-21 14:39:23.000000000 +0000 @@ -106,12 +106,12 @@ req_extra = [] ; } -let empty_universe () = - { id2pkg = Hashtbl.create 1023 ; - uid2pkgs = Hashtbl.create 1023; - id2uid = Hashtbl.create 1023; - name2pkgs = Hashtbl.create 1023 ; - features = Hashtbl.create 1023 ; +let empty_universe ?(size=1023) () = + { id2pkg = Hashtbl.create size ; + uid2pkgs = Hashtbl.create size; + id2uid = Hashtbl.create size; + name2pkgs = Hashtbl.create size; + features = Hashtbl.create size; univ_size = 0 ; inst_size = 0 ; } @@ -184,7 +184,8 @@ end let load_universe pkgs = - let univ = empty_universe () in + let size = List.length pkgs in + let univ = empty_universe ~size () in let uid = ref 0 in List.iter (fun pkg -> diff -Nru cudf-0.7/cudf.mli cudf-0.9/cudf.mli --- cudf-0.7/cudf.mli 2014-04-29 18:52:44.000000000 +0000 +++ cudf-0.9/cudf.mli 2017-03-21 14:39:23.000000000 +0000 @@ -98,6 +98,11 @@ status *) type solution = preamble * universe +(** return an empty universe. + + @param size represents the initial size of the universe (default: 1023) *) +val empty_universe : ?size:int -> unit -> universe + (** @raise Constraint_violation when a global CUDF constraint is violated in the given package list *) val load_universe : package list -> universe diff -Nru cudf-0.7/cudf_parser.ml cudf-0.9/cudf_parser.ml --- cudf-0.7/cudf_parser.ml 2014-04-29 18:52:44.000000000 +0000 +++ cudf-0.9/cudf_parser.ml 2017-03-21 14:39:23.000000000 +0000 @@ -1,6 +1,6 @@ (*****************************************************************************) (* libCUDF - CUDF (Common Upgrade Description Format) manipulation library *) -(* Copyright (C) 2009-2012 Stefano Zacchiroli *) +(* Copyright (C) 2009-2015 Stefano Zacchiroli *) (* *) (* This library is free software: you can redistribute it and/or modify *) (* it under the terms of the GNU Lesser General Public License as *) @@ -20,6 +20,10 @@ lexbuf: Lexing.lexbuf ; fname: string ; mutable typedecl: Cudf_conf.stanza_typedecl ; + priv_in_chan: in_channel option; + (* in_channel to be closed upon close() invocation, to avoid leaving up to + OCaml GC when to close it. Will be set only if it is Cudf_parser itself + who has created the in_channel, e.g., upon Cudf_parser.from_file *) } type loc_map = (string * loc) list @@ -31,6 +35,7 @@ { lexbuf = Lexing.from_channel ic ; typedecl = typedecl ; fname = "" ; + priv_in_chan = None ; } let from_IO_in_channel ?(typedecl=Cudf_conf.stanza_typedecl) ic = @@ -38,18 +43,24 @@ { lexbuf = Lexing.from_function f; typedecl = typedecl ; fname = "" ; + priv_in_chan = None ; } let from_file ?(typedecl=Cudf_conf.stanza_typedecl) fname = (* Syntax error with OCaml 3.10.2: * { from_in_channel ?typedecl (open_in fname) * with fname = fname } *) - { lexbuf = Lexing.from_channel (open_in fname) ; + let ic = open_in fname in + { lexbuf = Lexing.from_channel ic ; typedecl = typedecl ; fname = fname ; + priv_in_chan = Some ic ; } -let close p = () +let close p = + match p.priv_in_chan with + | None -> () + | Some ic -> close_in ic let parse_stanza p = try diff -Nru cudf-0.7/cudf.spec cudf-0.9/cudf.spec --- cudf-0.7/cudf.spec 2014-04-29 18:52:44.000000000 +0000 +++ cudf-0.9/cudf.spec 2017-03-21 14:39:23.000000000 +0000 @@ -6,7 +6,7 @@ URL: http://www.mancoosi.org/cudf/ License: LGPL Group: Development/Libraries -BuildRequires: ocaml ocaml-findlib ocaml-camlp4-devel ocaml-extlib-devel +BuildRequires: ocaml ocaml-findlib ocaml-extlib-devel BuildRoot: %{_tmppath}/%{name}-root %description diff -Nru cudf-0.7/debian/changelog cudf-0.9/debian/changelog --- cudf-0.7/debian/changelog 2020-07-15 20:41:35.000000000 +0000 +++ cudf-0.9/debian/changelog 2020-11-03 15:28:08.000000000 +0000 @@ -1,26 +1,18 @@ -cudf (0.7-5build4) groovy; urgency=medium +cudf (0.9-1build1) hirsute; urgency=medium - * Rebuild against new OCAML ABI. + * No-change rebuild for ocaml abi changes. - -- Gianfranco Costamagna Wed, 15 Jul 2020 22:41:35 +0200 + -- Matthias Klose Tue, 03 Nov 2020 16:28:08 +0100 -cudf (0.7-5build3) focal; urgency=medium +cudf (0.9-1) unstable; urgency=medium - * No-change rebuild against ocaml-nox-4.08.1 + * New upstream release. + * Removed zack from Uploaders on his request + * Debhelper compatibility level 13 + * Standards-Version 4.5.0 (no change) + * Set Rules-Requires-Root=no - -- Steve Langasek Fri, 21 Feb 2020 07:21:42 +0000 - -cudf (0.7-5build2) eoan; urgency=medium - - * Rebuild against new OCAML ABIs. - - -- Gianfranco Costamagna Thu, 22 Aug 2019 18:47:05 +0200 - -cudf (0.7-5build1) eoan; urgency=medium - - * Rebuild against new OCAML ABIs. - - -- Gianfranco Costamagna Mon, 12 Aug 2019 08:21:54 +0200 + -- Ralf Treinen Fri, 09 Oct 2020 01:43:49 +0200 cudf (0.7-5) unstable; urgency=medium diff -Nru cudf-0.7/debian/control cudf-0.9/debian/control --- cudf-0.7/debian/control 2020-02-21 07:21:42.000000000 +0000 +++ cudf-0.9/debian/control 2020-10-08 23:43:49.000000000 +0000 @@ -1,12 +1,10 @@ Source: cudf Section: devel Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Debian OCaml Maintainers -Uploaders: Stefano Zacchiroli , - Ralf Treinen +Maintainer: Debian OCaml Maintainers +Uploaders: Ralf Treinen Build-Depends: - debhelper-compat (=12), + debhelper-compat (=13), dh-ocaml (>= 0.9), ocaml-nox, camlp4, @@ -16,7 +14,8 @@ libounit-ocaml-dev, libglib2.0-dev, perl -Standards-Version: 4.4.0 +Standards-Version: 4.5.0 +Rules-Requires-Root: no Vcs-Git: https://salsa.debian.org/ocaml-team/cudf.git Vcs-Browser: https://salsa.debian.org/ocaml-team/cudf Homepage: http://www.mancoosi.org/cudf/ @@ -105,4 +104,3 @@ related documents. In particular it contains cudf-check, which enables checking of document properties such as installation consistency and matching of problems with their solutions. - diff -Nru cudf-0.7/INSTALL cudf-0.9/INSTALL --- cudf-0.7/INSTALL 2014-04-29 18:52:44.000000000 +0000 +++ cudf-0.9/INSTALL 2017-03-21 14:39:23.000000000 +0000 @@ -4,7 +4,6 @@ Build dependencies: - ocaml >= 3.10.2 (Debian package: "ocaml-nox", RPM: "ocaml") -- camlp4 (RPM: "camlp4") - findlib (Debian package: "ocaml-findlib", RPM: "ocaml-findlib") - extlib (Debian package: "libextlib-ocaml-dev", RPM: "ocaml-extlib-devel") diff -Nru cudf-0.7/Makefile cudf-0.9/Makefile --- cudf-0.7/Makefile 2014-04-29 18:52:44.000000000 +0000 +++ cudf-0.9/Makefile 2017-03-21 14:39:23.000000000 +0000 @@ -2,6 +2,13 @@ NAME = cudf +ifeq ("$(shell (ocamlc -config 2>/dev/null || ocamlopt -config) | fgrep os_type)","os_type: Win32") +EXE=.exe +OCAMLLIBDIR := $(shell cygpath $(OCAMLLIBDIR)) +else +EXE= +endif + LIBS = _build/cudf.cma LIBS_OPT = _build/cudf.cmxa PROGS = _build/main_cudf_check _build/main_cudf_parse_822 @@ -22,8 +29,9 @@ INSTALL = $(OCAMLFIND) install UNINSTALL = $(OCAMLFIND) remove else -INSTALL = $(OCAMLFIND) install -destdir $(DESTDIR)/$(OCAMLLIBDIR) -UNINSTALL = $(OCAMLFIND) remove -destdir $(DESTDIR)/$(OCAMLLIBDIR) +DESTDIR:=$(DESTDIR)/ +INSTALL = $(OCAMLFIND) install -destdir $(DESTDIR)$(OCAMLLIBDIR) +UNINSTALL = $(OCAMLFIND) remove -destdir $(DESTDIR)$(OCAMLLIBDIR) endif DIST_DIR = $(NAME)-$(VERSION) @@ -79,17 +87,17 @@ INSTALL_STUFF += $(wildcard _build/cudf.o _build/cudf.cmx _build/cudf.cmi) install: - test -d $(DESTDIR)/$(OCAMLLIBDIR) || mkdir -p $(DESTDIR)/$(OCAMLLIBDIR) + test -d $(DESTDIR)$(OCAMLLIBDIR) || mkdir -p $(DESTDIR)$(OCAMLLIBDIR) $(INSTALL) -patch-version $(VERSION) $(NAME) $(INSTALL_STUFF) - test -d $(DESTDIR)/$(BINDIR) || mkdir -p $(DESTDIR)/$(BINDIR) + test -d $(DESTDIR)$(BINDIR) || mkdir -p $(DESTDIR)$(BINDIR) for p in $(notdir $(PROGS)) ; do \ - tgt=`echo $$p | sed -e 's/^main.//' -e 's/_/-/g'` ; \ + tgt=`echo $$p | sed -e 's/^main.//' -e 's/_/-/g'`$(EXE) ; \ if [ -f _build/$$p.native ] ; then \ - cp _build/$$p.native $(DESTDIR)/$(BINDIR)/$$tgt ; \ + cp _build/$$p.native $(DESTDIR)$(BINDIR)/$$tgt ; \ else \ - cp _build/$$p.byte $(DESTDIR)/$(BINDIR)/$$tgt ; \ + cp _build/$$p.byte $(DESTDIR)$(BINDIR)/$$tgt ; \ fi ; \ - echo "Installed $(DESTDIR)/$(BINDIR)/$$tgt" ; \ + echo "Installed $(DESTDIR)$(BINDIR)/$$tgt" ; \ done if [ -f $(C_LIB_DIR)/cudf.o ] ; then \ $(MAKE) -C c-lib/ -e install ; \ @@ -98,13 +106,13 @@ uninstall: $(UNINSTALL) $(NAME) for p in $(notdir $(PROGS)) ; do \ - tgt=`echo $$p | sed -e 's/^main.//' -e 's/_/-/g'` ; \ - if [ -f $(DESTDIR)/$(BINDIR)/$$tgt ] ; then \ - rm $(DESTDIR)/$(BINDIR)/$$tgt ; \ + tgt=`echo $$p | sed -e 's/^main.//' -e 's/_/-/g'`$(EXE) ; \ + if [ -f $(DESTDIR)$(BINDIR)/$$tgt ] ; then \ + rm $(DESTDIR)$(BINDIR)/$$tgt ; \ fi ; \ - echo "Removed $(DESTDIR)/$(BINDIR)/$$tgt" ; \ + echo "Removed $(DESTDIR)$(BINDIR)/$$tgt" ; \ done - -rmdir -p $(DESTDIR)/$(OCAMLLIBDIR) $(DESTDIR)/$(BINDIR) + -rmdir -p $(DESTDIR)$(OCAMLLIBDIR) $(DESTDIR)$(BINDIR) dist: ./$(DIST_TARBALL) ./$(DIST_TARBALL): @@ -130,3 +138,4 @@ .PHONY: all opt world clean top-level headers test tags install uninstall .PHONY: dep rpm c-lib c-lib-opt dist doc +.NOTPARALLEL: diff -Nru cudf-0.7/Makefile.config cudf-0.9/Makefile.config --- cudf-0.7/Makefile.config 2014-04-29 18:52:44.000000000 +0000 +++ cudf-0.9/Makefile.config 2017-03-21 14:39:23.000000000 +0000 @@ -1,4 +1,4 @@ -VERSION = 0.7 +VERSION = 0.9 export DESTDIR = diff -Nru cudf-0.7/myocamlbuild.ml cudf-0.9/myocamlbuild.ml --- cudf-0.7/myocamlbuild.ml 2014-04-29 18:52:44.000000000 +0000 +++ cudf-0.9/myocamlbuild.ml 2017-03-21 14:39:23.000000000 +0000 @@ -38,10 +38,6 @@ let find_packages () = List.map before_space (split_nl & run_and_read "ocamlfind list") -(* this is supposed to list available syntaxes, but I don't know how - to do it. *) -let find_syntaxes () = ["camlp4o"; "camlp4r"] - (* ocamlfind command *) let ocamlfind x = S[A"ocamlfind"; x] @@ -74,14 +70,6 @@ flag ["ocaml"; "link"; "pkg_"^pkg] & S[A"-package"; A pkg]; end (find_packages ()); - (* Like -package but for extensions syntax. Morover -syntax is - useless when linking. *) - List.iter begin fun syntax -> - flag ["ocaml"; "compile"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; - flag ["ocaml"; "ocamldep"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; - flag ["ocaml"; "doc"; "syntax_"^syntax] & S[A"-syntax"; A syntax]; - end (find_syntaxes ()); - (* The default "thread" tag is not compatible with ocamlfind. Indeed, the default rules add the "threads.cma" or "threads.cmxa" options when using this tag. When using the diff -Nru cudf-0.7/_tags cudf-0.9/_tags --- cudf-0.7/_tags 2014-04-29 18:52:44.000000000 +0000 +++ cudf-0.9/_tags 2017-03-21 14:39:23.000000000 +0000 @@ -1,7 +1,7 @@ or : pkg_oUnit or : pkg_oUnit -<*.ml> or <*.mli> : pkg_extlib, pp(camlp4o) +<*.ml> or <*.mli> : pkg_extlib <*.byte> or <*.native> : pkg_extlib