debian/0000755000000000000000000000000012257434113007170 5ustar debian/mccs.examples0000644000000000000000000000001312245320700011640 0ustar examples/* debian/mccs.10000644000000000000000000000606512245320700010177 0ustar .TH mccs 1 "9 May 2011" "" "Debian User's Manual" .SH NAME mccs \- package dependency solver .SH SYNOPSIS .B mccs .RI [ options ] .br .SH DESCRIPTION mccs (which stands for Multi Criteria CUDF Solver) is a solver for package dependency problems expressed in the CUDF format. By default, mccs reads a problem specification from standard input, and writes the solution to standard output. .SH OPTIONS FOR CONTROLLING INPUT/OUTPUT .TP .B \-i \fIfile\fR Read input from file \fIfile\fR instead of standard input. .TP .B \-o \fIfile\fR Write the solution to \fIfile\fR instead of standard output. .TP .B \-fo full solution output .TP .B \-v \fIn\fR set verbosity level to \fIn\fR. .TP .B \-h print this help .SH OPTIONS FOR SELECTING THE SOLVER ENGINE By default, mccs uses the cbc solving engine. .TP .B \-lpsolve use lpsolve solver .TP .B \-lp \fIlpsolver\fR specify a solving engine that takes the cplex input format. \fIlpsolver\fR is the path of a script that takes as input the file name containing the cplex input, and that produces the solution on standard output (an example for scip is given in /usr/share/doc/mccs/engines/sciplp). .TP .B \-pblib \fIpbsolver\fR use pseudo-Boolean solver \fIpbsolver\fR as solving engine. .TP .B \-nosolve do not solve the problem (for debugging) .SH OPTIONS FOR CONTROLLING CONSTRAINT GENERATION .TP .B \-noreduce do not reduce the initial problem .TP .B \-only-agregate-constraints generate only agregate constraints .TP .B \-only-desagregate-constraints generate only deagregate constraints (default) .TP .B \-all-constraints generate all kind of constraints (ensure redundancy) .SH OPTIONS FOR CONTROLLING OPTIMIZATION See the file /usr/share/doc/mccs/README.optimization-criteria for a full grammar of optimization criteria. .SH EXAMPLES An example input file can be found at /usr/share/doc/mccs/examples/legacy.cudf. mccs -i legacy.cudf calls mccs on examples/legacy.cudf and prints the solution on stdout. With such a call mccs will resort to the default underlying solver cbc and use a default criterion to solve the problem. mccs -i legacy.cudf -o sol -lexagregate[-removed,-changed]\\ -lpsolve Here, mccs puts the solution into the file "sol" and solves the problem using the lpsolve solver with the paranoid criterion, which consists of first minimizing the number of removed packaged, and then the number of packages that change installation status or installed version. mccs -i legacy.cudf -o sol \\ -lexsemiagregate[-removed,-notuptodate,\\ -nunsat[recommends:,true],-new] The criterion used here is the trendy criterion, which consists of first minimizing the number of package removals, then to minimize the number of installed packages that are installed in a version older the most recent available version, then to minimize the number of recommendations of installed packages that are not satisfied, and finally the number of newly installed packages. .SH AUTHOR mccs has been written by Claude Michel . The development of mccs has been partly supported by the European research project Mancoosi. debian/copyright0000644000000000000000000000354612245320700011124 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: mccs Upstream-Contact: Claude Michel Source: http://users.polytech.unice.fr/~cpjm/misc/mccs.html License: BSD-3-clause Files: * Copyright: 2009, 2010, 2011 Claude Michel I3S (UNSA-CNRS) License: BSD-3-clause Files: debian/* Copyright: 2011 Ralf Treinen License: BSD-3-clause License: BSD-3-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the I3S, UNS or CNRS nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/changelog0000644000000000000000000000567512257434070011061 0ustar mccs (1:1.1-3ubuntu1) trusty; urgency=medium * Rebuild for coinor-cbc soname bump. -- Matthias Klose Sat, 28 Dec 2013 03:31:54 +0100 mccs (1:1.1-3build1) trusty; urgency=medium * Rebuild for suitesparse 4.2.1. -- Colin Watson Mon, 23 Dec 2013 17:22:33 +0000 mccs (1:1.1-3) unstable; urgency=low * Migrate packaging to git: - drop debian/svn-deblayout, create debian/gbp.conf - update Vcs-* fields in debian/control. - debian/rules: create an empty objs directory since git does not track empty directories. * debhelper compat level 9; bump version in build-dependency on debhelper * Add patch hardening: pass $(LDFLAGS) to the compiler * Standards-Version 3.9.5 (no change) * Drop build-dependency on coinor solver which is unnecessary, replace binary dependency by coinor-cbc to prepare for the upcoming coinor transition. Thanks to Miles Lubin for the patch! (closes: #730323). * Add as-installed package test: - add DEP-8 style debian/tests/control - add debian/tests/legacy test script -- Ralf Treinen Tue, 26 Nov 2013 08:48:00 +0100 mccs (1:1.1-2) unstable; urgency=low * /usr/share/cudf/solvers/mccs-*: drop -lex[] wrapper from the optimisation criterion, in order to allow to use the full power of mccs. * standards-version 3.9.3: - complete migration to machine readable copyright format 1.0: add format line, fix spelling -- Ralf Treinen Wed, 23 May 2012 22:01:45 +0200 mccs (1:1.1-1) unstable; urgency=low * New upstream version. - updated patches calling-engines and cbc-default - epoch necessary due to the "01" madness in previous upstream version -- Ralf Treinen Thu, 25 Aug 2011 16:16:05 +0200 mccs (1.01.1-3) unstable; urgency=low * Drop wrapper scripts, use solver specifications with variable interpolation. -- Ralf Treinen Fri, 10 Jun 2011 22:02:24 +0200 mccs (1.01.1-2) unstable; urgency=low * Wrapper scripts: add -lex[..] around the third argument, as required by mccs. -- Ralf Treinen Mon, 06 Jun 2011 16:38:21 +0200 mccs (1.01.1-1) unstable; urgency=low * New upstream release (unfortunately, this release is still called 1.01 by upstream). -- Ralf Treinen Thu, 26 May 2011 02:28:15 +0200 mccs (1.01-1) unstable; urgency=low * New upstream release. This release should solve a bug which leads to wrong solutions in conjunction with the cbc engine. * Simplify debian/copyright: objs/cudf.tab.{c,h} are generated and not part of the source package. Thanks to Luca Falavigna for the hint. * Fix mistyped path name in man page (closes: #627548). -- Ralf Treinen Tue, 24 May 2011 15:26:40 +0200 mccs (1.0-1) unstable; urgency=low * Initial package (closes: #625636). -- Ralf Treinen Wed, 11 May 2011 19:47:48 +0200 debian/mccs.manpages0000644000000000000000000000001612245320700011620 0ustar debian/mccs.1 debian/solvers/0000755000000000000000000000000012245320700010656 5ustar debian/solvers/mccs-lpsolve0000644000000000000000000000023312245320700013206 0ustar description: CUDF solver based on the Mixed Integer Linear Programming solver lp_solve exec: /usr/bin/mccs -i $in -o $out -lpsolve $pref cudf-version: 2.0 debian/solvers/mccs-cbc0000644000000000000000000000021512245320700012251 0ustar description: CUDF solver based on the Mixed Integer Linear Programming solver Cbc exec: /usr/bin/mccs -i $in -o $out $pref cudf-version: 2.0 debian/mccs.docs0000644000000000000000000000004412245320700010756 0ustar debian/README.optimization-criteria debian/compat0000644000000000000000000000000212245320700010357 0ustar 9 debian/patches/0000755000000000000000000000000012245320700010610 5ustar debian/patches/cbc-default0000644000000000000000000000162512245320700012710 0ustar Author: Ralf Treinen Description: make cbc the default solver Index: mccs-1.1/sources/cudf.c =================================================================== --- mccs-1.1.orig/sources/cudf.c 2011-07-26 17:25:50.000000000 +0200 +++ mccs-1.1/sources/cudf.c 2011-08-25 16:14:16.000000000 +0200 @@ -628,19 +628,7 @@ // choose the solver if (solver == (abstract_solver *)NULL) -#ifdef USECPLEX - solver = new_cplex_solver(); -#else - #ifdef USEGLPK - solver = new_glpk_solver(false); - #else - #ifdef USELPSOLVE - solver = new_lpsolve_solver(); - #else - { fprintf(stderr, "ERROR: no solver defined\n"); exit(-1); } - #endif - #endif -#endif + solver = new_lp_solver("/usr/share/mccs/cbclp"); // check criteria properties for (vector::iterator icrit = criteria_with_property.begin(); icrit != criteria_with_property.end(); icrit++) debian/patches/calling-engines0000644000000000000000000000217412245320700013576 0ustar Author: Ralf Treinen Description: Fix calls of cbc of solving engines Index: mccs-1.0/cbclp =================================================================== --- mccs-1.0.orig/cbclp 2011-05-06 17:05:22.000000000 +0200 +++ mccs-1.0/cbclp 2011-05-08 17:22:02.000000000 +0200 @@ -2,4 +2,4 @@ ( echo "import $1" echo "solve" - echo "solution \$" ) | ../cbc/Cbc-2.6.4/build/bin/cbc + echo "solution \$" ) | /usr/bin/cbc Index: mccs-1.0/sciplp =================================================================== --- mccs-1.0.orig/sciplp 2011-05-08 17:22:31.000000000 +0200 +++ mccs-1.0/sciplp 2011-05-08 17:24:59.000000000 +0200 @@ -1,2 +1,4 @@ #!/bin/sh -../scip/scip-2.0.1.linux.x86_64.gnu.opt.spx -f $1 +SCIP-EXECUTABLE=scip-2.0.1.linux.x86.gnu.opt.spx + +$SCIP-EXECUTABLE -f $1 Index: mccs-1.0/wbopb =================================================================== --- mccs-1.0.orig/wbopb 2011-05-08 17:22:31.000000000 +0200 +++ mccs-1.0/wbopb 2011-05-08 17:24:50.000000000 +0200 @@ -1,2 +1,4 @@ #!/bin/sh -../PB/wbo-static -file-format=opb $* +WBO-EXECUTABLE=wbo-static + +$WBO-EXECUTABLE -file-format=opb $* debian/patches/hardening0000644000000000000000000000073612245320700012500 0ustar Author: Ralf Treinen Description: Pass $(LDFLAGS) to compiler so that he gets the hardening flags Index: mccs/make.local =================================================================== --- mccs.orig/make.local 2013-11-25 06:39:04.705743948 +0100 +++ mccs/make.local 2013-11-25 06:42:30.242406288 +0100 @@ -108,6 +108,6 @@ INC=-I$(OBJDIR) -I$(SRCDIR) -I$(SRCLIB) #CCCOPT=-g -Wall CCCOPT=-Wall -O6 -CCC=g++ $(CCCOPT) +CCC=g++ $(CCCOPT) $(LDFLAGS) debian/patches/series0000644000000000000000000000005612245320700012026 0ustar lpsolve calling-engines cbc-default hardening debian/patches/lpsolve0000644000000000000000000000160112245320700012215 0ustar Author: Ralf Treinen Description: Configure to use lpsolve as solving engine Index: mccs-1.0/make.local =================================================================== --- mccs-1.0.orig/make.local 2011-05-06 14:19:48.000000000 +0200 +++ mccs-1.0/make.local 2011-05-06 14:21:18.000000000 +0200 @@ -28,19 +28,19 @@ #====================================================== # if you want to use cplex uncomment next line (or use USELPSOLVE=1 as make parameter) -#USELPSOLVE=1 +USELPSOLVE=1 ifeq ($(USELPSOLVE),1) # Path to the LPSOLVE main dir -LPSOLVEDIR=$(PWD)/../lpsolve/dev +LPSOLVEDIR=/usr/lib # Path to the LPSOLVE include files -LPSOLVEINC=${LPSOLVEDIR} +LPSOLVEINC=/usr/include/lpsolve # LPSOLVE library path and options -LPSOLVELD=-L${LPSOLVEDIR} -llpsolve55 -Wl,-rpath,${LPSOLVEDIR} +LPSOLVELD=-L${LPSOLVEDIR} -llpsolve55 -ldl -lcolamd endif debian/README.optimization-criteria0000644000000000000000000000551012245320700014367 0ustar combining criteria: -lexicographic[{,}*] with ::= {+,-}leximax[{,}*] | {+,-}leximin[{,}*] | with ::= {+,-}agregate[{,}*]{[lambda]}? | {+,-}lexagregate[{,}*]{[lambda]}? | with ::= {+,-}removed{[lambda]}? | # number of removed packages {+,-}changed{[lambda]}? | # number of package with a modified version {+,-}notuptodate{[lambda]}? | # number of no uptodate packages {+,-}new{[lambda]}? | # number of newly installed packages {+,-}nunsat[,]{[lambda]}? | # number of unsatisfied dijunct in property (must be a vpkgformula) where is a property name of type vpkgformula and is a boolean (true or false) telling whether providers have to be taken into account {+,-}count[,]{[lambda]}? # count the property quantity (must be an int, posint or nat) where is a property name of type int, nat or posint and is a boolean (true or false) telling whether count applies only on newly installed packages eg.: -lexicographic[-removed,-notuptodate,-nunsat[recommends:,true],-new] eg.: -lexicographic[-lexagregate[-removed,-notuptodate],-lexagregate[-nunsat[recommends:,true],-new]] WARNING: spaces can not be used within a criteria combination. criteria combination shortcuts: -lex[{,}*] equivalent to -lexicographic[{,}*] -lexagregate[{,}*] equivalent to -lex[-lexagregate[{,}*]] -lexsemiagregate[{,}*] equivalent to -lex[-lexagregate[,],-lexagregate[,],...] -agregate[{,}*] equivalent to -lex[-agregate[{,}*]] -leximax[{,}*] equivalent to -lex[-leximax[{,}*]] -leximin[{,}*] equivalent to -lex[-lexmin[{,}*]] -lexleximax[{,}*] equivalent to -lex[,-leximax[{,}*]] -lexleximin[{,}*] equivalent to -lex[,-leximin[{,}*]] eg.: -agregate[-removed[100],-notuptodate[50],-nunsat[recommends:,true][10],-new] debian/control0000644000000000000000000000236012257434113010574 0ustar Source: mccs Section: admin Priority: extra Maintainer: Ralf Treinen Build-Depends: debhelper (>= 9), bison, flex, libsuitesparse-dev, liblpsolve55-dev Standards-Version: 3.9.5 Homepage: http://users.polytech.unice.fr/~cpjm/misc/mccs.html Vcs-Git: git://git.debian.org/git/collab-maint/mccs.git Vcs-Browser: http://git.debian.org/?p=collab-maint/mccs.git;a=summary Package: mccs Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends}, coinor-cbc Provides: cudf-solver Description: multi-critera CUDF solver mccs is a solver for package dependencies expressed in the CUDF format. It takes as input a CUDF problem and computes the best solution according to a combination of optimization criteria chosen by the user. Basic criteria to be maximized or minimized may be selected from a list of pre-defined criteria, and these can be combined using various aggregation operators. It relies on an Integer Programming solver or a Pseudo Boolean solver to achieve its task. The version of mccs distributed with this package can be used together with two different solving engines available in debian, that is lpsolve or cbc. Furthermore, mccs may also be used together with other solvers like Cplex, Gurobi, Glpk, SCIP or WBO. debian/tests/0000755000000000000000000000000012245320700010323 5ustar debian/tests/control0000644000000000000000000000004212245320700011722 0ustar Tests: legacy Depends: cudf-tools debian/tests/legacy0000755000000000000000000000060512245320700011516 0ustar #!/bin/sh set -e cudfin=examples/legacy.cudf cudfout=$TMPDIR/legacy.sol check=$TMPDIR/legacy.rep for solver in "" "-lpsolve" do mccs -i $cudfin -o $cudfout $solver cudf-check -cudf $cudfin -sol $cudfout > $check 2> /dev/null if [ `grep -c "is_solution: true" $check` -ne 1 ] then echo "Test \"legacy\" with options \"$solver\":" cat $check exit 1 fi done exit 0 debian/rules0000755000000000000000000000013512245320700010240 0ustar #!/usr/bin/make -f %: dh $@ override_dh_auto_configure: mkdir -p objs dh_auto_configure debian/mccs.dirs0000644000000000000000000000011112245320700010762 0ustar usr/bin usr/share/mccs usr/share/cudf/solvers usr/share/doc/mccs/engines debian/source/0000755000000000000000000000000012245320700010461 5ustar debian/source/format0000644000000000000000000000001412245320700011667 0ustar 3.0 (quilt) debian/gbp.conf0000644000000000000000000000003612245320700010577 0ustar [DEFAULT] pristine-tar = True debian/watch0000644000000000000000000000014512245320700010212 0ustar version=3 opts=uversionmangle=s/-srcs// \ http://users.polytech.unice.fr/~cpjm/misc/mccs-(.+)\.tgz debian/mccs.install0000644000000000000000000000022512245320700011475 0ustar mccs usr/bin cbclp usr/share/mccs sciplp usr/share/doc/mccs/engines wbopb usr/share/doc/mccs/engines debian/solvers/* usr/share/cudf/solvers