[Pkg-ocaml-maint-commits] [SCM] dose3 packaging branch, master, updated. debian/2.9.4-2-8-g8d93afe

2011-06-10 Thread Stefano Zacchiroli
The following commit has been merged in the master branch:
commit ba6c568dbf738d2c26932d6ab6e80658d91ab67b
Author: Stefano Zacchiroli z...@upsilon.cc
Date:   Fri Jun 10 15:46:56 2011 +0200

new upstream release (SVN snapshot)

diff --git a/debian/changelog b/debian/changelog
index b5cbd0b..2997096 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+dose3 (2.9.7+r2696-1) UNRELEASED; urgency=low
+
+  [ Stefano Zacchiroli ]
+  * Imported Upstream version 2.9.7+r2696
+- upstream SVN snapshot, release 2696
+- contains apt-cudf
+
+ -- Stefano Zacchiroli z...@debian.org  Fri, 10 Jun 2011 15:45:43 +0200
+
 dose3 (2.9.4-2) experimental; urgency=low
 
   * Attempt to install algo.{a,o} only when they exist. This should fix

-- 
dose3 packaging

___
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits


[Pkg-ocaml-maint-commits] [SCM] dose3 packaging branch, master, updated. debian/2.9.4-2-8-g8d93afe

2011-06-10 Thread Stefano Zacchiroli
The following commit has been merged in the master branch:
commit 4cd1ab847e13c932e0b2db1ea7142a13fa7b24c9
Author: Stefano Zacchiroli z...@upsilon.cc
Date:   Fri Jun 10 17:39:46 2011 +0200

apt-cudf packaging

still missing: trigger that monitors /usr/share/cudf/solvers/

diff --git a/debian/apt-cudf.README.Debian b/debian/apt-cudf.README.Debian
new file mode 100644
index 000..85046bf
--- /dev/null
+++ b/debian/apt-cudf.README.Debian
@@ -0,0 +1,67 @@
+Packaging CUDF solvers in Debian
+
+
+Each CUDF solver should ship a CUDF solver specification file under
+`/usr/share/cudf/solvers/`, describing how to invoke the solver and its
+compatibility level with the CUDF standard.
+
+A precise description of the (very simple) CUDF solver specification format can
+be found in the `README.cudf-solvers` file in the apt-cudf package.
+
+
+Integration with APT
+
+
+APT can talk to external solvers by the means of the External Dependency Solver
+Protocol (EDSP). To reduce the burden on APT implementors and dependencies over
+specific features of the CUDF standard, the EDSP protocol is closer to typical
+APT syntaxes than to CUDF. Therefore, some plumbing is needed to use native
+CUDF solvers as external (EDSP-based) solvers for APT. The apt-cudf package
+provides such plumbing.
+
+The architecture is as follows:
+
+EDSP  CUDF
+APT    apt-cudf    CUDF solver
+
+APT invokes apt-cudf as its external solver, which in turns invoke a proper
+CUDF solver. In such pipeline, apt-cudf plays man in the middle and performs
+the needed translations.
+
+The default directories where APT and apt-cudf look for solvers are as follows:
+
+- APT   looks for (EDSP) solver *executables* into 
`/usr/lib/apt/solvers/`
+- apt-cudf  looks for (CUDF) solver *specifications* into  
`/usr/share/cudf/solvers/`
+
+CUDF solvers can reside anywhere they please, as long as there is a CUDF solver
+specification pointing to them under `/usr/share/cudf/solvers/` (see Section
+above).
+
+For each CUDF solver that should be used as an external APT solver a (symbolic)
+link pointing to `/usr/bin/apt-cudf` must exist under `/usr/lib/apt/solvers/`.
+Upon invocation, apt-cudf will use the link name to lookup the corresponding
+CUDF solver specification.
+
+
+Trigger
+---
+
+The apt-cudf package comes with a trigger that monitors the
+`/usr/share/cudf/solvers/` directory for the installation of CUDF solver
+specifications. Upon activation, the trigger creates a symbolic link under
+`/usr/lib/apt/solvers`. Therefore:
+
+- If you are packaging a CUDF solver and would like it to be used as an
+  external solver for APT, you don't have to do anything special (besides
+  installing a proper CUDF solver specification for it under
+  `/usr/share/cudf/solvers/`).
+
+  Please note however that it will be usable as an external solver for APT only
+  upon installation of the apt-cudf package. If your CUDF solver is
+  specifically meant for apt, consider a Depends or a Recommends on apt-cudf.
+
+- If you want to use a CUDF solver as an external solver for APT, you just have
+  to install the apt-cudf package.
+
+
+ -- Stefano Zacchiroli z...@debian.org, Fri, 10 Jun 2011 17:30:30 +0200
diff --git a/debian/apt-cudf.docs b/debian/apt-cudf.docs
new file mode 100644
index 000..3749b52
--- /dev/null
+++ b/debian/apt-cudf.docs
@@ -0,0 +1 @@
+doc/apt-cudf/*
diff --git a/debian/apt-cudf.install b/debian/apt-cudf.install
new file mode 100644
index 000..0d62735
--- /dev/null
+++ b/debian/apt-cudf.install
@@ -0,0 +1 @@
+usr/bin/apt-cudf
diff --git a/debian/changelog b/debian/changelog
index 2997096..7025957 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,7 @@
-dose3 (2.9.7+r2696-1) UNRELEASED; urgency=low
+dose3 (2.9.4+r2696-1) UNRELEASED; urgency=low
 
   [ Stefano Zacchiroli ]
-  * Imported Upstream version 2.9.7+r2696
+  * Imported Upstream version 2.9.4+r2696
 - upstream SVN snapshot, release 2696
 - contains apt-cudf
 
diff --git a/debian/control b/debian/control
index e75065f..22f7101 100644
--- a/debian/control
+++ b/debian/control
@@ -106,3 +106,25 @@ Description: Parses package dependencies as set of 
constraints
   * dot/Graphviz
   * CNF (formula in conjunctive normal form)
   * DIMACS format of propositional formula
+
+Package: apt-cudf
+Section: admin
+Architecture: any
+Depends: cudf-solver,
+ ${ocaml:Depends}, ${misc:Depends}, ${shlibs:Depends}
+Description: CUDF solver integration for APT
+ apt-cudf provides integration among the APT package manager and CUDF solvers,
+ allowing APT to rely on external (CUDF-based) dependency solvers to plan
+ package installation, upgrade, and removal.
+ .
+ CUDF is a distribution-independent, standard format to describe dependency
+ solving scenarios, as faced by package managers in popular package-based
+ GNU/Linux distributions. APT is a well-known package manager for 

[Pkg-ocaml-maint-commits] [SCM] dose3 packaging branch, master, updated. debian/2.9.4-2-8-g8d93afe

2011-06-10 Thread Stefano Zacchiroli
The following commit has been merged in the master branch:
commit b172c9a7d3cb3689c4fd64d57c8cd43d96aa4ddd
Merge: 4cd1ab847e13c932e0b2db1ea7142a13fa7b24c9 
441a8564ec993b77c9b4d99a27d1240231e7cf38
Author: Stefano Zacchiroli z...@upsilon.cc
Date:   Fri Jun 10 17:40:11 2011 +0200

Merge commit 'upstream/2.9.4+r2696'


-- 
dose3 packaging

___
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits


[Pkg-ocaml-maint-commits] [SCM] dose3 packaging branch, master, updated. debian/2.9.4-2-8-g8d93afe

2011-06-10 Thread Stefano Zacchiroli
The following commit has been merged in the master branch:
commit 8d93afe960920015bbcd51349682cb508ea19fc5
Author: Stefano Zacchiroli z...@upsilon.cc
Date:   Fri Jun 10 22:30:24 2011 +0200

new binary package: apt-cudf

- provide glue among CUDF solvers and EDSP (i.e. APT's native)
  external solvers
- new helper update-cudf-solvers, to be invoked at each new
  installation of CUDF solvers, to bind them to APT

diff --git a/debian/apt-cudf.install b/debian/apt-cudf.install
index 0d62735..5e81ca4 100644
--- a/debian/apt-cudf.install
+++ b/debian/apt-cudf.install
@@ -1 +1,2 @@
 usr/bin/apt-cudf
+debian/update-cudf-solvers usr/sbin
diff --git a/debian/changelog b/debian/changelog
index 7025957..a654c7e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,11 @@ dose3 (2.9.4+r2696-1) UNRELEASED; urgency=low
   * Imported Upstream version 2.9.4+r2696
 - upstream SVN snapshot, release 2696
 - contains apt-cudf
+  * new binary package: apt-cudf
+- provides glue among CUDF solvers and EDSP (i.e. APT's native)
+  external solvers
+- new helper update-cudf-solvers, to be invoked at each new
+  installation of CUDF solvers, to bind them to APT
 
  -- Stefano Zacchiroli z...@debian.org  Fri, 10 Jun 2011 15:45:43 +0200
 
diff --git a/debian/update-cudf-solvers b/debian/update-cudf-solvers
new file mode 100755
index 000..4f88067
--- /dev/null
+++ b/debian/update-cudf-solvers
@@ -0,0 +1,62 @@
+#!/usr/bin/perl -w
+#
+# update-cudf-solvers: register available CUDF solvers and bind them to APT
+#
+# Copyright (C) Stefano Zacchiroli 2011 z...@debian.org
+# License: GNU Lesser General Public License, version 3 or above
+
+use strict;
+use File::Basename;
+
+my $cudf_dir = /usr/share/cudf/solvers;
+my $edsp_dir = /usr/lib/apt/solvers;
+my $apt_cudf = /usr/bin/apt-cudf;
+
+my $debug = 0;
+
+sub shallow_find($$) {
+my ($dir, $pred) = @_;
+my @found = ();
+foreach my $f (`find $dir -maxdepth 1 $pred`) {
+   chomp $f;
+   push @found, basename $f;
+}
+return @found;
+}
+
+sub warning($) { my ($msg) = @_; print STDERR update-cudf-solvers: W: 
$msg\n; }
+sub debug($) { my ($msg) = @_; print STDERR update-cudf-solvers: I: $msg\n 
if $debug; }
+
+my @cudf_solvers = shallow_find($cudf_dir, -type f); # current CUDF solvers
+my @edsp_solvers = shallow_find($edsp_dir, -type l); # current EDSP solvers
+
+foreach my $s (@cudf_solvers) { debug found cudf solver: $s; }
+foreach my $s (@edsp_solvers) { debug found edsp solver: $s; }
+
+# install: act on new CUDF solvers; make them available as EDSP solvers
+foreach my $cudf_name (@cudf_solvers) {
+my $edsp_solver = $edsp_dir/$cudf_name;
+unless (-l $edsp_solver  readlink($edsp_solver) eq $apt_cudf) {
+   if (-e $edsp_solver || -l $edsp_solver) {
+   # either existing non CUDF solver or dangling symlink
+   warning refuse to overwrite $edsp_solver with a symlink to 
$apt_cudf, skipping;
+   } else {# file exists, but doesn't point to apt-cudf
+   debug symlink $edsp_solver to $apt_cudf;
+   symlink $apt_cudf, $edsp_solver
+   or warning cannot symlink $edsp_solver to $apt_cudf, skipping;
+   }
+}
+}
+
+# garbage collection: act on old EDSP solvers; get rid of them
+foreach my $edsp_name (@edsp_solvers) {
+my $edsp_solver = $edsp_dir/$edsp_name;
+if (-l $edsp_solver  readlink($edsp_solver) eq $apt_cudf) {
+   if (! grep {$_ eq $edsp_name} @cudf_solvers) {  
+   # EDSP  CUDF solver, no longer existing
+   debug unlink (gone) $edsp_solver;
+   unlink $edsp_solver
+   or warning cannot unlink $edsp_solver, skipping;
+   }
+}
+}

-- 
dose3 packaging

___
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits


[Pkg-ocaml-maint-commits] [SCM] dose3 packaging branch, master, updated. debian/2.9.4-2-8-g8d93afe

2011-06-10 Thread Stefano Zacchiroli
The following commit has been merged in the master branch:
commit a79c20dc4a65780d967f44739508bc51b3a84b6a
Merge: 57a5cc4aa9e6eceffa29612a5ea744858e4371df 
7a6cc47998cf18b055e8d84f5ca88848034e954d
Author: Stefano Zacchiroli z...@upsilon.cc
Date:   Fri Jun 10 15:45:19 2011 +0200

Merge commit 'upstream/2.9.7+r2696'

diff --combined applications/distcheck.ml
index da856da,a5915f0..8ed9038
--- a/applications/distcheck.ml
+++ b/applications/distcheck.ml
@@@ -13,6 -13,7 +13,7 @@@
  open ExtLib
  open Debian
  open Common
+ open Algo
  open Diagnostic
  
  module Options = struct
@@@ -61,10 -62,10 +62,10 @@@ let main () 
let posargs =
  let args = OptParse.OptParser.parse_argv Options.options in
  match Filename.basename(Sys.argv.(0)),args with
 -|(debcheck|edos-debcheck),[] - [deb://-]
 -|(debcheck|edos-debcheck),l - List.map ((^) deb://) l
 +|(debcheck|dose3-debcheck),[] - [deb://-]
 +|(debcheck|dose3-debcheck),l - List.map ((^) deb://) l
  |eclipsecheck,l - List.map ((^) eclipse://) l
 -|(rpmcheck|edos-rpmcheck),l - List.map ((^) synth://) l
 +|(rpmcheck|dose3-rpmcheck),l - List.map ((^) synth://) l
  |_,_ - args
in
Boilerplate.enable_debug (OptParse.Opt.get Options.verbose);

-- 
dose3 packaging

___
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits