The document discusses research into improving free software distributions conducted at Irill. It focuses on developing advanced tools to aid both end users and distribution editors. On the user side, their work involves improving package managers to better handle installation issues. On the distribution editor side, their tools help identify problematic packages and predict repository conflicts to enhance software quality assurance.
Nell’iperspazio con Rocket: il Framework Web di Rust!
FOSS Research at Irill Highlights
1. Free Software Research at Irill
(highlights)
Roberto Di Cosmo
http://www.dicosmo.org
18/09/2014
Suse Labs Conference 2014
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 1 / 46
2. IRILL, a special place for FOSS
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 2 / 46
3. Who we are
Researchers that love FOSS ...
Vincent Balat Albert Cohen Julia Lawall Stefano Zacchiroli
... and like to collaborate!
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 3 / 46
4. Our focus: software quality
Some key examples:
Coccinelle
Beautiful work on semantic matching and pacthing; based on sophisticated
theoretical tools, and yet so intuitive and practical: see Julia's talks
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 4 / 46
5. Our focus: software quality
Some key examples:
Coccinelle
Beautiful work on semantic matching and pacthing; based on sophisticated
theoretical tools, and yet so intuitive and practical: see Julia's talks
GCC/LLVM
Long term work led by Albert Cohen to provide cutting edge polyhedral
optimisation for all of us
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 4 / 46
6. Our focus: software quality
Some key examples:
Coccinelle
Beautiful work on semantic matching and pacthing; based on sophisticated
theoretical tools, and yet so intuitive and practical: see Julia's talks
GCC/LLVM
Long term work led by Albert Cohen to provide cutting edge polyhedral
optimisation for all of us
GNU/Linux distributions our focus today
Many great tools for users and maintainers developed over almost ten years
to help distributions scale up, be released faster and have better QA
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 4 / 46
7. Credits: joint work with. . .
Pietro Abate Jaap Boender Yacine Boufkhad
Stefano Zacchiroli Ralf Treinen Jérôme Vouillon
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 5 / 46
8. Outline
1 GNU/Linux Distributions: industrialising Free Software
2 User side: improving package managers
3 Back to the server side : Package QA
Find uninstallable packages
Learning from the future of repositories
Find non co-installable packages
Find new non co-installable packages
Filter incoming packages
4 In conclusion
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 6 / 46
9. Free Software, industrialised: distributions
Idea from FOSS in the 1990s: distributions are intermediate software
vendors between FOSS developers and users, oering to share upstream
tracking, integration, testing and QA among all of us
Project 2
Project 1
Project 3
FOSS Bazaar
User
installations
Server
side
Client
side
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 7 / 46
10. Free Software, industrialised: distributions
Idea from FOSS in the 1990s: distributions are intermediate software
vendors between FOSS developers and users, oering to share upstream
tracking, integration, testing and QA among all of us
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 7 / 46
11. Distributions: a somehow successful idea . . .
Key notions: packages and package managers
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 8 / 46
12. Packages and their metadata
Package =
(
some les
some scripts
metadata
Identication
Inter-package rel.
I Dependencies
I Conicts
Feature declarations
Other
I Package maintainer
I Textual descriptions
I ...
Example (package metadata)
Package: aterm
Version: 0.4.2-11
Section: x11
Installed-Size: 280
Maintainer: Göran Weinholt ...
Architecture: i386
Depends: libc6 (= 2.3.2.ds1-4),
libice6 | xlibs ( 4.1.0), ...
Conflicts: suidmanager ( 0.50)
Provides: x-terminal-emulator
...
A package is the elemental component of modern distribution systems (not
FOSS-specic). A working system is deployed by installing a package set
( 2'000+ for modern FOSS distros)
. Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 9 / 46
13. Inter-package relationships get complex. . .
To play Backgammon. . .
Package: gnubg
Version: 0.14.3+20060923-4
Depends: gnubg-data, ttf-bitstream-vera,
libartsc0 (= 1.5.0-1), ..., libgl1-mesa-glx
| libgl1, ...
Conflicts: ...
. . . pull a few strings
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 10 / 46
14. Inter-package relationships get complex. . .
To play Backgammon. . .
Package: gnubg
Version: 0.14.3+20060923-4
Depends: gnubg-data, ttf-bitstream-vera,
libartsc0 (= 1.5.0-1), ..., libgl1-mesa-glx
| libgl1, ...
Conflicts: ...
. . . pull a few strings
Distributions grow superlinearly
Using and maintaining such large
software collections is becoming hard!
manual package review
semi-automated tools
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 10 / 46
15. Using and maintaining free software distributions is hard
We need advanced tools:
1 end user side package managers
I install packages and their dependencies, . . .
I . . . according to the user needs and policies
2 distribution editor side QA infrastructure
I nd broken packages (now easy!)
I nd packages which impact large parts of the distribution
I predict repository update woes
I identify compatibility issues
I . . .
At Irill, through the Mancoosi project1, we have made progress in both
areas.
Let's see some examples.
1http://www.mancoosi.org
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 11 / 46
16. Outline
1 GNU/Linux Distributions: industrialising Free Software
2 User side: improving package managers
3 Back to the server side : Package QA
Find uninstallable packages
Learning from the future of repositories
Find non co-installable packages
Find new non co-installable packages
Filter incoming packages
4 In conclusion
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 12 / 46
17. Installation woes: no solution
$ sudo apt-get install baobab
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 13 / 46
18. Installation woes: no solution
$ sudo apt-get install baobab
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
gnome-settings-daemon: Breaks: gnome-screensaver ( 2.28.0)
but 2.26.1-1 is to be installed
E: Broken packages
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 13 / 46
19. Installation woes: no solution
$ sudo apt-get install baobab
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
gnome-settings-daemon: Breaks: gnome-screensaver ( 2.28.0)
but 2.26.1-1 is to be installed
E: Broken packages
(whereas a solution did in fact exist)
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 13 / 46
20. Installation woes: debatable solution
$ sudo apt-get install debhelper
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 14 / 46
21. Installation woes: debatable solution
$ sudo apt-get install debhelper
Reading Package Lists... Done
Building Dependency Tree... Done
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 14 / 46
22. Installation woes: debatable solution
$ sudo apt-get install debhelper
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
armagetron armagetron-common autoconf bonobo-activation codebreaker debconf
debconf-i18n debconf-utils dialog esound-common fb-music-high fontconfig
frozen-bubble-data grepmail gv intltool-debian libaiksaurus-data
libaiksaurus0c102 libatk1.0-0 libatk1.0-dev libbonobo-activation4 libbonobo2-0
libbonobo2-common libdb3 libdbd-mysql-perl libdbi-perl libeel2-data libesd0
...
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 14 / 46
23. Installation woes: debatable solution
$ sudo apt-get install debhelper
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
armagetron armagetron-common autoconf bonobo-activation codebreaker debconf
debconf-i18n debconf-utils dialog esound-common fb-music-high fontconfig
frozen-bubble-data grepmail gv intltool-debian libaiksaurus-data
libaiksaurus0c102 libatk1.0-0 libatk1.0-dev libbonobo-activation4 libbonobo2-0
libbonobo2-common libdb3 libdbd-mysql-perl libdbi-perl libeel2-data libesd0
...
The following packages will be REMOVED:
autoconf2.13 frozen-bubble frozen-bubble-lib gconf2 gnomemeeting itk3.1-dev
libbonoboui2-0 libbonoboui2-common libdigest-md5-perl libforms0.89 libgconf2-4
libgnome2-0 libgnome2-common libgnomeui-0 libgnomevfs2-0 libgnomevfs2-common
libgtk1.2-dev libgtk2.0-0png3 libgtk2.0-dev libmime-base64-perl
libpango1.0-dev libsdl-mixer1.2-dev libsdl-perl libsdl-ttf1.2-dev
libsdl1.2-dev libsmpeg-dev libstorable-perl nautilus tk8.3-dev tktable-dev
x-window-system x-window-system-core xaw3dg-dev xlib6g xlib6g-dev xlibmesa-dev
xlibmesa3 xlibosmesa3 xlibs-dev xlibs-pic xpdf xpdf-reader
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 14 / 46
24. Installation woes: debatable solution
$ sudo apt-get install debhelper
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
armagetron armagetron-common autoconf bonobo-activation codebreaker debconf
debconf-i18n debconf-utils dialog esound-common fb-music-high fontconfig
frozen-bubble-data grepmail gv intltool-debian libaiksaurus-data
libaiksaurus0c102 libatk1.0-0 libatk1.0-dev libbonobo-activation4 libbonobo2-0
libbonobo2-common libdb3 libdbd-mysql-perl libdbi-perl libeel2-data libesd0
...
The following packages will be REMOVED:
autoconf2.13 frozen-bubble frozen-bubble-lib gconf2 gnomemeeting itk3.1-dev
libbonoboui2-0 libbonoboui2-common libdigest-md5-perl libforms0.89 libgconf2-4
libgnome2-0 libgnome2-common libgnomeui-0 libgnomevfs2-0 libgnomevfs2-common
libgtk1.2-dev libgtk2.0-0png3 libgtk2.0-dev libmime-base64-perl
libpango1.0-dev libsdl-mixer1.2-dev libsdl-perl libsdl-ttf1.2-dev
libsdl1.2-dev libsmpeg-dev libstorable-perl nautilus tk8.3-dev tktable-dev
x-window-system x-window-system-core xaw3dg-dev xlib6g xlib6g-dev xlibmesa-dev
xlibmesa3 xlibosmesa3 xlibs-dev xlibs-pic xpdf xpdf-reader
The following NEW packages will be installed:
armagetron-common debconf-i18n fb-music-high fontconfig intltool-debian
libaiksaurus-data libaiksaurus0c102 libeel2-data libfilehandle-unget-perl
libfontconfig1 libforms1 libgdbm3 libgnutls7 libgsf-1 libice-dev libice6
libidl0 liblzo1 libmagick5.5.7 libmail-mbox-messageparser-perl
libmysqlclient12 libncursesw5 libnet-daemon-perl libnewt0.51 libpaper1
libplrpc-perl libsdl-console ...
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 14 / 46
25. Installation woes: debatable solution
$ sudo apt-get install debhelper
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
armagetron armagetron-common autoconf bonobo-activation codebreaker debconf
debconf-i18n debconf-utils dialog esound-common fb-music-high fontconfig
frozen-bubble-data grepmail gv intltool-debian libaiksaurus-data
libaiksaurus0c102 libatk1.0-0 libatk1.0-dev libbonobo-activation4 libbonobo2-0
libbonobo2-common libdb3 libdbd-mysql-perl libdbi-perl libeel2-data libesd0
...
The following packages will be REMOVED:
autoconf2.13 frozen-bubble frozen-bubble-lib gconf2 gnomemeeting itk3.1-dev
libbonoboui2-0 libbonoboui2-common libdigest-md5-perl libforms0.89 libgconf2-4
libgnome2-0 libgnome2-common libgnomeui-0 libgnomevfs2-0 libgnomevfs2-common
libgtk1.2-dev libgtk2.0-0png3 libgtk2.0-dev libmime-base64-perl
libpango1.0-dev libsdl-mixer1.2-dev libsdl-perl libsdl-ttf1.2-dev
libsdl1.2-dev libsmpeg-dev libstorable-perl nautilus tk8.3-dev tktable-dev
x-window-system x-window-system-core xaw3dg-dev xlib6g xlib6g-dev xlibmesa-dev
xlibmesa3 xlibosmesa3 xlibs-dev xlibs-pic xpdf xpdf-reader
The following NEW packages will be installed:
armagetron-common debconf-i18n fb-music-high fontconfig intltool-debian
libaiksaurus-data libaiksaurus0c102 libeel2-data libfilehandle-unget-perl
libfontconfig1 libforms1 libgdbm3 libgnutls7 libgsf-1 libice-dev libice6
libidl0 liblzo1 libmagick5.5.7 libmail-mbox-messageparser-perl
libmysqlclient12 libncursesw5 libnet-daemon-perl libnewt0.51 libpaper1
libplrpc-perl libsdl-console ...
75 packages upgraded, 80 newly installed, 42 to remove and 858 not upgraded.
Need to get 67.1MB of archives. After unpacking 26.9MB will be used.
Do you want to continue? [Y/n]
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 14 / 46
26. Installation woes: debatable solution
$ sudo apt-get install debhelper
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
armagetron armagetron-common autoconf bonobo-activation codebreaker debconf
debconf-i18n debconf-utils dialog esound-common fb-music-high fontconfig
frozen-bubble-data grepmail gv intltool-debian libaiksaurus-data
libaiksaurus0c102 libatk1.0-0 libatk1.0-dev libbonobo-activation4 libbonobo2-0
libbonobo2-common libdb3 libdbd-mysql-perl libdbi-perl libeel2-data libesd0
...
The following packages will be REMOVED:
autoconf2.13 frozen-bubble frozen-bubble-lib gconf2 gnomemeeting itk3.1-dev
libbonoboui2-0 libbonoboui2-common libdigest-md5-perl libforms0.89 libgconf2-4
libgnome2-0 libgnome2-common libgnomeui-0 libgnomevfs2-0 libgnomevfs2-common
libgtk1.2-dev libgtk2.0-0png3 libgtk2.0-dev libmime-base64-perl
libpango1.0-dev libsdl-mixer1.2-dev libsdl-perl libsdl-ttf1.2-dev
libsdl1.2-dev libsmpeg-dev libstorable-perl nautilus tk8.3-dev tktable-dev
x-window-system x-window-system-core xaw3dg-dev xlib6g xlib6g-dev xlibmesa-dev
xlibmesa3 xlibosmesa3 xlibs-dev xlibs-pic xpdf xpdf-reader
The following NEW packages will be installed:
armagetron-common debconf-i18n fb-music-high fontconfig intltool-debian
libaiksaurus-data libaiksaurus0c102 libeel2-data libfilehandle-unget-perl
libfontconfig1 libforms1 libgdbm3 libgnutls7 libgsf-1 libice-dev libice6
libidl0 liblzo1 libmagick5.5.7 libmail-mbox-messageparser-perl
libmysqlclient12 libncursesw5 libnet-daemon-perl libnewt0.51 libpaper1
libplrpc-perl libsdl-console ...
75 packages upgraded, 80 newly installed, 42 to remove and 858 not upgraded.
Need to get 67.1MB of archives. After unpacking 26.9MB will be used.
Do you want to continue? [Y/n] Abort.
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 14 / 46
27. How dicult are package installation problems?
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 15 / 46
28. How dicult are package installation problems?
Theorem
The following problems are NP-complete:
installability of a single package
co-installability of a set of packages
Proof idea
Equivalence with boolean satisability.
Di Cosmo, Leroy, Treinen, Vouillon et al.
Managing the complexity of large free and open source package-based
software distributions.
ASE 2006: Automated Software Engineering.
Alternative proof of NP-hardness (Daniel Burrows, 2008)
Encode Sudoku solving as a package installation problem, left as exercise
for the public.
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 15 / 46
29. Install/upgrade: nding a needle in a haystack
Finding a solution is NP-complete, but installing and upgrading is more
demanding... how many ways are there to install a package?
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 16 / 46
30. Install/upgrade: nding a needle in a haystack
Finding a solution is NP-complete, but installing and upgrading is more
demanding... how many ways are there to install a package?
Too many upgrade candidates
Suppose we have components qi , for 1 i n, available in versions 1 and
2, all of which are installed in version 1 on the system.
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 16 / 46
31. Install/upgrade: nding a needle in a haystack
Finding a solution is NP-complete, but installing and upgrading is more
demanding... how many ways are there to install a package?
Too many upgrade candidates
Suppose we have components qi , for 1 i n, available in versions 1 and
2, all of which are installed in version 1 on the system.
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 16 / 46
32. Install/upgrade: nding a needle in a haystack
Finding a solution is NP-complete, but installing and upgrading is more
demanding... how many ways are there to install a package?
Too many upgrade candidates
Suppose we have components qi , for 1 i n, available in versions 1 and
2, all of which are installed in version 1 on the system.
We want to install a component p in version 1 that depends on all of
q1; : : : ; qn, any version.
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 16 / 46
33. Install/upgrade: nding a needle in a haystack
Finding a solution is NP-complete, but installing and upgrading is more
demanding... how many ways are there to install a package?
Too many upgrade candidates
Suppose we have components qi , for 1 i n, available in versions 1 and
2, all of which are installed in version 1 on the system.
We want to install a component p in version 1 that depends on all of
q1; : : : ; qn, any version.
Any of the 2n congurations f(p; 1)g [ f(qi ; i )ji 2 1 : : : n; 1 i 2g is a
solution.
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 16 / 46
34. Install/upgrade: nding a needle in a haystack
Finding a solution is NP-complete, but installing and upgrading is more
demanding... how many ways are there to install a package?
Too many upgrade candidates
Suppose we have components qi , for 1 i n, available in versions 1 and
2, all of which are installed in version 1 on the system.
We want to install a component p in version 1 that depends on all of
q1; : : : ; qn, any version.
Any of the 2n congurations f(p; 1)g [ f(qi ; i )ji 2 1 : : : n; 1 i 2g is a
solution.
Which one do we choose?
paranoid only install p
trendy install p and step up all qi 's to version 2
... and exponentially many in between!
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 16 / 46
35. For users, dependency solving is not (yet) good enough!
Main issues:
1 incompleteness of ad-hoc dependency solvers
2 poor expressivity
3 moving target
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 17 / 46
36. For users, dependency solving is not (yet) good enough!
Main issues:
1 incompleteness of ad-hoc dependency solvers
Example
package: a package: b
version: 2 version: 2
depends: b (= 1) depends: a (= 1)
package: a package: b
version: 1 version: 1
depends: b depends: a
# apt-get install a b fails
The need for real solvers starts spreading
Now ok for zypper, dnf, 0install, that use a SAT solver, but...
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 17 / 46
37. For users, dependency solving is not (yet) good enough!
Main issues:
1 incompleteness of ad-hoc dependency solvers
2 poor expressivity (AKA lack of user-level policies)
does your package manager enable you (sysadm) to:
1 minimize installed size cool for embedded
2 minimize download size 28.8 Kbps or mobile connections
3 prefer version aligned installations
4 minimise downgrades, or removals
5 mix and match releases with more exibility than pinning?
We need (measurable) solution quality, wrt user desiderata.
see http://www.dicosmo.org/Articles/usercriteria.pdf
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 17 / 46
38. For users, dependency solving is not (yet) good enough!
Main issues:
1 incompleteness of ad-hoc dependency solvers
2 poor expressivity
3 moving target (research problem)
I implementing a given state of the art solving strategy may be ne
today, . . .
I what if repositories grow ten times bigger? or add new features?
I package manager developers need to connect with research on solvers
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 17 / 46
39. For users, dependency solving is not (yet) good enough!
Main issues:
1 incompleteness of ad-hoc dependency solvers
2 poor expressivity
3 moving target
On the other hand. . .
Various research communities have powerful constraint solvers able to
address (some of) the above problems, and would love to validate them on
real world use cases.
We can close the gap!
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 17 / 46
40. Separation of concerns
Use a common format for installation/upgrade problems...
Figure: Common Upgradeability Description Format (CUDF)
See www.mancoosi.org/cudf, and the libcudf library by Stefano Zacchiroli
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 18 / 46
41. Separation of concerns (cont.)
Use a common format for installation/upgrade problems...
Figure: Modular component manager
See www.mancoosi.org/cudf, and the libcudf library by Stefano Zacchiroli
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 18 / 46
42. A language for user preferences
A preference expression is built from four basic ingredients:
package selectors denote in a proposed solution certain classes of packages
(the ones that changed, the ones that got removed, etc.)
measurements can be applied to a package selector to obtain an integer
value (the number of package selected, the number of
packages selected that are up-to-date, etc.)
maximisation/minimisation directives to ask the solver to nd a solution
that maximises or minimises the value of a measurement
aggregation combinations can be used to ask the solver to combine
criteria in lexicographical order
For full details, see
www.dicosmo.org/Articles/usercriteria.pdf
www.mancoosi.org/misc-2012/criteria/
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 19 / 46
43. Strategy to improve the state of the art
Distribution
editors
report failures
via DUDF
Users
Mancoosi
Distribution
editors
upgrade
install
verify reports
submit problems
via CUDF
interesting
problems
improved
algorithms
improved tools
Competition
Researchers
(Mancoosi project, 2008)
MISC competition http://www.mancoosi.org/misc/: 2010, 11, 12
1 make the solving community aware of distro needs
2 nd reusable common-ground dependency solvers
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 20 / 46
44. Stocktacking
Several CUDF solvers are available
$ apt-cache search cudf
aspcud - CUDF solver based on Answer Set Programming
mccs - multi-critera CUDF solver
packup - CUDF solver based on pseudo-Boolean constraints
aspcud supports sophisticated user preferences, e.g.:
aspcud sample.cudf sol.cudf
-count(down), -notuptodate(solution),
-aligned(solution,source,sourceversion),
-unsat_recommends(solution), -count(new)
P2OSGi provisioning platform for Eclipsespeaks CUDF
OPAMthe OCaml package managerprefers aspcud/CUDF
[your component manager here] ?
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 21 / 46
45. Improved tools, added bonus for CUDF adopters
Building systems
Minimal system size -sum(solution,installedsize),-count(solution)
Noah's ark +count(solution)
Noah's ark, fresh -notuptodate(solution),+count(solution)
Fast bootstrap -sum(solution,compiletime)
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 22 / 46
46. Improved tools, added bonus for CUDF adopters
Building systems
Minimal system size -sum(solution,installedsize),-count(solution)
Noah's ark +count(solution)
Noah's ark, fresh -notuptodate(solution),+count(solution)
Fast bootstrap -sum(solution,compiletime)
Repairing a broken system conguration
Use an empty request with
xup -count(changed),-count(down),-notuptodate(solution)
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 22 / 46
47. Improved tools, added bonus for CUDF adopters
Building systems
Minimal system size -sum(solution,installedsize),-count(solution)
Noah's ark +count(solution)
Noah's ark, fresh -notuptodate(solution),+count(solution)
Fast bootstrap -sum(solution,compiletime)
Repairing a broken system conguration
Use an empty request with
xup -count(changed),-count(down),-notuptodate(solution)
Kiss cool eect
All of this requires zero changes to the package manager code!
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 22 / 46
48. Improved tools, added bonus for CUDF adopters
Building systems
Minimal system size -sum(solution,installedsize),-count(solution)
Noah's ark +count(solution)
Noah's ark, fresh -notuptodate(solution),+count(solution)
Fast bootstrap -sum(solution,compiletime)
Repairing a broken system conguration
Use an empty request with
xup -count(changed),-count(down),-notuptodate(solution)
Kiss cool eect
All of this requires zero changes to the package manager code!
Can nd unexpected usages, like thinning virtual machines
https://github.com/rdicosmo/ami-thinner
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 22 / 46
49. Outline
1 GNU/Linux Distributions: industrialising Free Software
2 User side: improving package managers
3 Back to the server side : Package QA
Find uninstallable packages
Learning from the future of repositories
Find non co-installable packages
Find new non co-installable packages
Filter incoming packages
4 In conclusion
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 23 / 46
50. Working for the QA team
The QA team and the release manager need to track tens of thousands of
packages, their bugs, their incompatibilities, etc.
We want to catch automatically installation-related errors before they hit
the user and the BTS!
Static analysis of package dependencies
nd packages that cannot be installed at all, and...
I spot the ones that surely need to be xed (know who to blame)
I provide advance warning for future problems
nd the incompatibilities between packages
show how these incompatibilities evolve
automate package migration
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 24 / 46
51. QA 101: nd individually broken packages
The problem
In a repository R, nd all packages that cannot be installed at all
Solving tens of thousands of NP-complete problem?
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 25 / 46
52. QA 101: nd individually broken packages
The problem
In a repository R, nd all packages that cannot be installed at all
Solving tens of thousands of NP-complete problem?
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 25 / 46
53. QA 101: nd individually broken packages
The problem
In a repository R, nd all packages that cannot be installed at all
Solving tens of thousands of NP-complete problem?In practice:
explicit conicts between packages are not very frequent (without
conicts, dependencies are dual Horn clauses)
recent SAT solvers are able to handle current instances easily
A practical tool
rpmcheck/debcheck (Vouillon, 2006)
I List all packages that cannot be installed at all in a repository
I Provide short explanations
I fast: analyses 400000 (binary) packages in a few seconds on
commodity desktop hardware
Integrated in the dose3 as distcheck, with many improvements by
Pietro Abate et al. http://www.mancoosi.org/software/
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 25 / 46
54. Usage in Debian
https://qa.debian.org/dose/
Release goal: 0 non-installable packages
Also: Debian autobuilder network (check whether the Build-Deps can be
satised)
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 26 / 46
55. Usage in Debian (cont.)
Verify installability of packages before uploading them to the archive
I used daily by Emdebian
Check that build-dependencies are satisable before attempting a
package build
I life changing for porters (quote)
Generate test cases for nding errors occurring during package
installation
I le conicts, by Ralf Treinen
I 650 bugs reported over time, 10 outstanding
I https://qa.debian.org/dose/file-overwrites.html
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 27 / 46
56. QA 101, level 2: what can we say about the future?
Denition (outdated packages)
p is outdated if p is not installable, and it remains uninstallable no matter
how the other packages evolve (i.e. p's maintainer has no excuses)
Denition (challengers)
p challenges q if upgrading p forces to upgrade q
What they have in common:
properties that hold in all installations of any future evolution of the
repository
seems unfeasible, but we can eciently decide some properties of this
kind
Abate, Di Cosmo, Treinen, Zacchiroli
Learning from the Future of Component Repositories
CBSE 2012. Best paper award
Tools in the dose library now used in qa.debian.org/dose
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 28 / 46
57. Speculative analysis example
Outdated packages
110 outdated packages in Debian testing (Oct 2011)
60% because of ongoing transition Python 2.6 ! 2.7
20% because of kdebindings, broken as part of a large refactoring
process
20% outdated dependencies unknown to developers
I xed now thanks to our reports
Signicance
automatically distinguish between transiently and permanently
uninstallable packages; pinpoint actual responsibilities for xing
uninstallability issues!
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 29 / 46
58. Speculative analysis example (cont.)
Challengers (Debian Lenny)
Source Version Target Version Breaks
python-defaults 2.5.2-3 3 1079
python-defaults 2.5.2-3 2.6 . 3 1075
e2fsprogs 1.41.3-1 any 139
ghc6 6.8.2dfsg1-1 6.8.2+ 136
libio-compress-base-perl 2.012-1 2.012. 80
libcompress-raw-zlib-perl 2.012-1 2.012. 80
libio-compress-zlib-perl 2.012-1 2.012. 79
icedove 2.0.0.19-1 2.1-0 78
iceweasel 3.0.6-1 3.1 70
haskell-mtl 1.1.0.0-2 1.1.0.0+ 48
sip4-qt3 4.7.6-1 4.8 47
ghc6 6.8.2dfsg1-1 6.8.2dfsg1+ . 6.8.2+ 36
haskell-parsec 2.1.0.0-2 2.1.0.0+ 29
Signicance
provide a map of future uninstallability issues, sorted by severity, great
dashboard for a release manager
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 30 / 46
59. QA 201: Package Co-Installability
Next step: interaction between packages
Example: is there any package which cannot be installed
together with iceweasel? with kde-full?
Denition: a set of packages are co-installable if they can be installed
together.
all packages should be installable (individually!)
some package incompatibilities are expected
Can we summarise all incompatibility issues, and avoid browsing through
hundreds of hyperlinked pages?
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 31 / 46
60. Coinst
A simplication theory for repositories, based on the extraction of a
co-installability kernel, i.e. a repository much smaller than the original but
equivalent wrt co-installability.
Highlights:
reexive/transitive dependency closure
equivalent classes and quotients
machine-checked proofs (in Coq!)
In a word: tough maths at work!
A tool: coinst (packaged in Debian)
Vouillon, Di Cosmo
On Software Components Co-Installability
ESEC/FSE 2011: Foundations of Software Engineering.
Best Artifact Award.
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 32 / 46
65. QA 301: New Co-Installability Issues
Compare two versions of a repository
New issues are more likely to be bugs
Can report precisely what changes caused an issue
Example a b
p q
Many new issues between packages p and q due to a single
new conict between packages a and b.
Vouillon, Di Cosmo
Broken Sets in Software Repository Evolution
ICSE 2013
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 36 / 46
66. Finding New Co-Installability Issues
Tool coinst-upgrades http://coinst.irill.org/upgrades
graphs illustrating each new issue
context: other packages involved, package popularities (popcon)
The new version of unoconv depends on any version of python3-uno
unoconv python3-uno python-uno
The new version of tdsodbc conicts with any version of libiodbc2
tdsodbc libiodbc2
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 37 / 46
67. Finding New Co-Installability Issues
Tool coinst-upgrades http://coinst.irill.org/upgrades
graphs illustrating each new issue
context: other packages involved, package popularities (popcon)
The new version of unoconv depends on any version of python3-uno
unoconv python3-uno python-uno
The new version of tdsodbc conicts with any version of libiodbc2
tdsodbc libiodbc2
Package libiodbc2 had been unmaintained for years
Should not be a big issue if it gets removed, right?
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 37 / 46
69. QA 501: package migration
Unstable
Testing
Conicting goals
package should reach testing rapidly
keep testing as stable as possible
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 39 / 46
70. The comigrate tool
Supplement/Replace Britney
Generate hints that can be fed to Britney
Interactively investigate migration issues
Run it repeatedly, studying dierent scenarios
Report of issues preventing package migration
http://coinst.irill.org/report/
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 40 / 46
71. Tool Core: Computing Package Migrations
Tentative migration
Boolean solver
(Co-)installability
analysis
New constraints
Start with simple constraints
The Boolean solver generates a tentative migration
Check for (co-)installability issues; analyse these issues to generate
new constraints (package A cannot migrate, or package A cannot
migrate without package B)
Repeat until no more issue is found
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 41 / 46
72. Performance
Britney
Comigrate
(installability)
Comigrate
(co-installability)
Comigrate
(installability,
with caching)
Comigrate
(co-installability,
with caching)
3 5.5 10 18 30 55 100 180 300 550
Running time (seconds)
Data collected twice a day from 2013-06-24 to 2013-09-09
Missing datapoints: Britney can take more than 24 hours (Perl
transition)....
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 42 / 46
73. Outline
1 GNU/Linux Distributions: industrialising Free Software
2 User side: improving package managers
3 Back to the server side : Package QA
Find uninstallable packages
Learning from the future of repositories
Find non co-installable packages
Find new non co-installable packages
Filter incoming packages
4 In conclusion
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 43 / 46
74. A recurring pattern
In all examples above
identify a problem whose solution requires a research eort (discussion
with the maintainers)
work hard to nd a solution
implement a tool, validate it on real world cases
publish a research article
foster adoption
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 44 / 46
75. A recurring pattern
In all examples above
identify a problem whose solution requires a research eort (discussion
with the maintainers)
work hard to nd a solution
implement a tool, validate it on real world cases
publish a research article
foster adoption
In a picture
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 44 / 46
76. Conclusions
Free Software and Computer Science
Free Software is ubiquitous, its growth poses new challenges
many dicult issues with quality assurance in Free Software ...
are indeed interesting and deep problems in Computer Science,
and can be the basis for very fruitful collaborations
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 45 / 46
77. Conclusions
Free Software and Computer Science
Free Software is ubiquitous, its growth poses new challenges
many dicult issues with quality assurance in Free Software ...
are indeed interesting and deep problems in Computer Science,
and can be the basis for very fruitful collaborations
Collaborate with us at Irill, in general
Irill is a unique place: it hosts researchers that share the Free Software
values, love to solve problems, and build valuable tools.
We share a dream: make Free Software the best software in town.
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 45 / 46
78. Conclusions
Free Software and Computer Science
Free Software is ubiquitous, its growth poses new challenges
many dicult issues with quality assurance in Free Software ...
are indeed interesting and deep problems in Computer Science,
and can be the basis for very fruitful collaborations
Collaborate with us at Irill, in general
Irill is a unique place: it hosts researchers that share the Free Software
values, love to solve problems, and build valuable tools.
We share a dream: make Free Software the best software in town.
Collaborate with us at Irill, on distributions
We have built powerful tools for QA in GNU/Linux distributions...
some are already distribution neutral, thanks to CUDF; all can be ported.
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 45 / 46
79. Bibliography and tools excerpts
Di Cosmo, Leroy, Treinen, Vouillon et al
Managing the complexity of large free and open source
package-based software distributions.
ASE 2006: Automated Software Engineering.
Abate, Di Cosmo, Treinen, Zacchiroli
Learning from the Future of Component Repositories
CBSE 2012: Component Based Software Engineering.
Abate, Di Cosmo, Treinen, Zacchiroli
A modular package manager architecture.
Information and Software Technology, 2012.
Vouillon, Dogguy, Di Cosmo.
Easing software component repository evolution.
ICSE 2014.
Tools
Cudf library: http://gforge.inria.fr/projects/cudf/
Dose library: http://gforge.inria.fr/projects/dose/
Coinst suite: http://coinst.irill.org
Debian QA: http://qa.debian.org/dose
Learn more at
www.mancoosi.org and
www.irill.org
Questions?
roberto@dicosmo.org
@rdicosmo
Roberto Di Cosmo (Paris Diderot) FOSS Research at Irill Suse Labs 2014 46 / 46