SlideShare una empresa de Scribd logo
1 de 31
Descargar para leer sin conexión
FreeBSD package management system
Vsevolod Stakhov
vsevolod@FreeBSD.org

ruBSD conference December 14, 2013
Ports and packages

Ports is the comprehensive system of source packages.
Mature
Clear and well defined
Simple (sometimes not)
Configurable

http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

2 of 26
Ports before pkg
Packages
Makefile

Distfiles

Ports

Installed
Files

Patches

http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

3 of 26
Disadvantages of the old architecture

Make cannot handle complex packages relationships
Complicated upgrade procedure (hard to keep up-to-date)
Hard to migrate between releases
Long build time

http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

4 of 26
Planned ports and pkg interaction

Build Depends

Build

STAGE

Packages

Pkg

Instal

Run Depends

http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

5 of 26
Ports and packages

Ports are used to build packages
Dependencies are resolved by pkg, not make
Stable branch of ports has an appropriate stable branch of
packages
Encourage users to install software from binary packages
But do not prevent them from building custom packages from
the ports

http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

6 of 26
Repositories creation

Repo
Stable
ports

Build

Mirrors
Checksum
Checksum
Signature

Package
Checksum

Package
Checksum

http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

7 of 26
Pkg architecture

User

Request

Remote
Repos

Solver
FS

Mirrors

Jobs
fetch

http://highsecure.ru/pkg

Package

Install

+ Manifest
Checksum
Files...

Vsevolod Stakhov vsevolod@FreeBSD.org

PkgDB

8 of 26
The current problems with pkg

Legacy ports support (with no staging, for example)
Plain dependencies style
Naive solver

http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

9 of 26
The problems of the solver in pkg

Absence of conflicts resolving/handling
No alternatives support
Can perform merely a single task: install, upgrade or remove,
so install task cannot remove packages for example

http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

10 of 26
Existing systems

There are many examples of solvers used in different package
management systems, for example:
Zypper/SUSE - uses libsolv as the base
Yum/RedHat - migrating to libsolv
Apt/Debian - uses internal solver
Pacman/Archlinux - uses naive internal solver

http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

11 of 26
External solvers

To interact with an external solver we have chosen CUDF format
used in the Mancoosi research project http://mancoosi.org:
package: devel/libblah
version: 1
depends: x11/libfoo
package: security/blah
version: 2
depends: devel/libblah
conflicts: security/blah-devel

http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

12 of 26
We need an internal solver!
Alternatives:
Write own logic of dependencies and conflicts resolution?

http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

13 of 26
We need an internal solver!
Alternatives:
Write own logic of dependencies and conflicts resolution?
Use some existing solution?

http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

13 of 26
We need an internal solver!
Alternatives:
Write own logic of dependencies and conflicts resolution?
Use some existing solution?
Use some known algorithm?

http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

13 of 26
We need an internal solver!
Alternatives:
Write own logic of dependencies and conflicts resolution?
Use some existing solution?
Use some known algorithm?

Use SAT solver for packages management
SAT expression

(x1 ¬x2 x3 ) &(x3 ¬x1 )&(x2 )
Clause

http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

13 of 26
Making a SAT problem

Assign a variable to each package: package A → a1 , package
B → b1
Interpret a request as a set of unary clauses:
Install/Upgrade package A → (a1 )
Delete package B → (¬b1 )

Convert dependencies and conflicts to disjuncted clauses

http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

14 of 26
Converting dependencies and conflicts
If package A depends on package B (versions B1 and B2 ),
then we can either have package A not installed or any of B
installed:
(¬A B1 B2 )

http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

15 of 26
Converting dependencies and conflicts
If package A depends on package B (versions B1 and B2 ),
then we can either have package A not installed or any of B
installed:
(¬A B1 B2 )
If we have a conflict between versions of B (B1 , B2 and B3 )
then we ensure that merely one version is installed:
(¬B1 ¬B2 )&(¬B1 ¬B3 )&(¬B2 ¬B3 )
Conflicts chain

http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

15 of 26
The solving of SAT problem

Some rules to follow to speed up SAT problem solving.
Trivial propagation - solve unary clauses
Unit propagation - solve clauses with only a single unsolved
variable
Conflicts learning - if we assign some free variable and detect
a conflict during unit propagation, we can fallback and learn
that this variable must be negated
Package specific assumptions.

http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

16 of 26
SAT problem propagation

Trivial propagation - direct install or delete rules
(¬A B)& (A) & (¬C ) &(¬A ¬D)
true

http://highsecure.ru/pkg

false

Vsevolod Stakhov vsevolod@FreeBSD.org

17 of 26
SAT problem propagation

Trivial propagation - direct install or delete rules
(¬A B)& (A) & (¬C ) &(¬A ¬D)
true

false

Unit propagation - simple depends and conflicts
Dependency

true

false

Conflict

(¬A B) & (A) & (¬C ) & (¬A ¬D)
B→true

http://highsecure.ru/pkg

D→false

Vsevolod Stakhov vsevolod@FreeBSD.org

17 of 26
Conflicts driven learning

To handle alternatives it is required to test all variables unassigned:
1. full depth-first enumeration of possible values
2. fallback if a conflict found
3. remember which assignment caused conflict
4. make negative assignment for the learned variable and go to
the first step

http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

18 of 26
Package specific assumptions

Pure SAT solvers cannot deal with package management as they
do not consider several packages peculiarities:
try to keep installed packages (if no direct conflicts)
do not install packages if they are not needed
prefer high priority packages and repositories over low priority
ones
These options also improve SAT performance providing a good
initial assignment.

http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

19 of 26
Packages universe
We convert all packages involved to a packages universe of the
following structure:
Conflict
Depend

Name
N1

Version

N2

N3

Nn

V1

V1

V1

V1

V2

V2

V2
Conflicts Chain

V3
http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

20 of 26
Package management task

A request is splitted to install/upgrade and delete requests
which could be passed simultaneously to the solver
A conflicts between packages are detected with a repository
creation
All depends, reverse and conflicts of the requested packages
are analyzed and the package universe is created
Each package is defined by its name and the digest of
significant fields (version, options and so on)

http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

21 of 26
Solvers and Pkg

Pkg may pass the formed universe to an external CUDF
solver:
convert versions
format request
parse output

Alternatively the internal SAT solver may be used:
convert the universe to SAT problem
formulate request
???
PROFIT

http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

22 of 26
Perspectives

Using pkg solver for ports management
Better support of multiple repositories
Test different solvers algorithms using CUDF
New dependencies and conflicts format
Provides and alternatives

http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

23 of 26
New dependencies format
libblah >= 1.0 + option1 , +option2 libfoo! = 1.1
Can depend on normal packages and virtual packages
(provides)
Easy to define the concrete dependency versions
Alternative dependencies
P3
Or

P1

Depends

P2

>

Vx

Vy

Vz

!

Conflict

http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

24 of 26
Alternatives
Used to organize packages with the same functionality (e.g.
web-browser)
May be used to implement virtual dependencies
(provides/requires)
Alternatives

Text Editor

http://highsecure.ru/pkg

Depends

Package

Vsevolod Stakhov vsevolod@FreeBSD.org

25 of 26
Thank you for your attention!
Questions?
vsevolod@FreeBSD.org

http://highsecure.ru/pkg

Vsevolod Stakhov vsevolod@FreeBSD.org

26 of 26

Más contenido relacionado

Similar a Всеволод Стахов: Новое в Pkg и перспективы развития системы пакетов в FreeBSD

Composer (PHP Usergroup Karlsruhe)
Composer (PHP Usergroup Karlsruhe)Composer (PHP Usergroup Karlsruhe)
Composer (PHP Usergroup Karlsruhe)Nils Adermann
 
You're Off the Hook: Blinding Security Software
You're Off the Hook: Blinding Security SoftwareYou're Off the Hook: Blinding Security Software
You're Off the Hook: Blinding Security SoftwareCylance
 
L2/L3 für Fortgeschrittene - Helle und dunkle Magie im Linux-Netzwerkstack
L2/L3 für Fortgeschrittene - Helle und dunkle Magie im Linux-NetzwerkstackL2/L3 für Fortgeschrittene - Helle und dunkle Magie im Linux-Netzwerkstack
L2/L3 für Fortgeschrittene - Helle und dunkle Magie im Linux-NetzwerkstackMaximilan Wilhelm
 
Lukas Macura - Employing Zabbix to monitor OpenWrt (Beesip) devices with Uciprov
Lukas Macura - Employing Zabbix to monitor OpenWrt (Beesip) devices with UciprovLukas Macura - Employing Zabbix to monitor OpenWrt (Beesip) devices with Uciprov
Lukas Macura - Employing Zabbix to monitor OpenWrt (Beesip) devices with UciprovZabbix
 
JavaEdge 2008: Your next version control system
JavaEdge 2008: Your next version control systemJavaEdge 2008: Your next version control system
JavaEdge 2008: Your next version control systemGilad Garon
 
Usage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on LinuxUsage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on LinuxWilliam Lee
 
Erp 2.50 openbravo environment installation openbravo-wiki
Erp 2.50 openbravo environment installation   openbravo-wikiErp 2.50 openbravo environment installation   openbravo-wiki
Erp 2.50 openbravo environment installation openbravo-wikiyaranusa
 
Security of Go Modules and Vulnerability Scanning in GoCenter and VS Code
Security of Go Modules and Vulnerability Scanning in GoCenter and VS CodeSecurity of Go Modules and Vulnerability Scanning in GoCenter and VS Code
Security of Go Modules and Vulnerability Scanning in GoCenter and VS CodeDeep Datta
 
Direction of building ns2 using cygwin under windows system
Direction of building ns2 using cygwin under windows systemDirection of building ns2 using cygwin under windows system
Direction of building ns2 using cygwin under windows systemyahyaoui hamdi
 
Sbt, idea and eclipse
Sbt, idea and eclipseSbt, idea and eclipse
Sbt, idea and eclipseMike Slinn
 
Introduction to the Java bytecode - So@t - 20130924
Introduction to the Java bytecode - So@t - 20130924Introduction to the Java bytecode - So@t - 20130924
Introduction to the Java bytecode - So@t - 20130924yohanbeschi
 
From Zero to Application Delivery with NixOS
From Zero to Application Delivery with NixOSFrom Zero to Application Delivery with NixOS
From Zero to Application Delivery with NixOSSusan Potter
 
Core Java- An advanced review of features
Core Java- An advanced review of featuresCore Java- An advanced review of features
Core Java- An advanced review of featuresvidyamittal
 
Java9 and the impact on Maven Projects (JFall 2016)
Java9 and the impact on Maven Projects (JFall 2016)Java9 and the impact on Maven Projects (JFall 2016)
Java9 and the impact on Maven Projects (JFall 2016)Robert Scholte
 
Recipe to build open splice dds 6.3.xxx Hello World example over Qt 5.2
 Recipe to build open splice dds 6.3.xxx Hello World example over Qt 5.2   Recipe to build open splice dds 6.3.xxx Hello World example over Qt 5.2
Recipe to build open splice dds 6.3.xxx Hello World example over Qt 5.2 Adil Khan
 

Similar a Всеволод Стахов: Новое в Pkg и перспективы развития системы пакетов в FreeBSD (20)

Composer
ComposerComposer
Composer
 
tools.ppt
tools.ppttools.ppt
tools.ppt
 
Composer (PHP Usergroup Karlsruhe)
Composer (PHP Usergroup Karlsruhe)Composer (PHP Usergroup Karlsruhe)
Composer (PHP Usergroup Karlsruhe)
 
You're Off the Hook: Blinding Security Software
You're Off the Hook: Blinding Security SoftwareYou're Off the Hook: Blinding Security Software
You're Off the Hook: Blinding Security Software
 
Intro To OSGi
Intro To OSGiIntro To OSGi
Intro To OSGi
 
L2/L3 für Fortgeschrittene - Helle und dunkle Magie im Linux-Netzwerkstack
L2/L3 für Fortgeschrittene - Helle und dunkle Magie im Linux-NetzwerkstackL2/L3 für Fortgeschrittene - Helle und dunkle Magie im Linux-Netzwerkstack
L2/L3 für Fortgeschrittene - Helle und dunkle Magie im Linux-Netzwerkstack
 
Lukas Macura - Employing Zabbix to monitor OpenWrt (Beesip) devices with Uciprov
Lukas Macura - Employing Zabbix to monitor OpenWrt (Beesip) devices with UciprovLukas Macura - Employing Zabbix to monitor OpenWrt (Beesip) devices with Uciprov
Lukas Macura - Employing Zabbix to monitor OpenWrt (Beesip) devices with Uciprov
 
JavaEdge 2008: Your next version control system
JavaEdge 2008: Your next version control systemJavaEdge 2008: Your next version control system
JavaEdge 2008: Your next version control system
 
Usage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on LinuxUsage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on Linux
 
Erp 2.50 openbravo environment installation openbravo-wiki
Erp 2.50 openbravo environment installation   openbravo-wikiErp 2.50 openbravo environment installation   openbravo-wiki
Erp 2.50 openbravo environment installation openbravo-wiki
 
Security of Go Modules and Vulnerability Scanning in GoCenter and VS Code
Security of Go Modules and Vulnerability Scanning in GoCenter and VS CodeSecurity of Go Modules and Vulnerability Scanning in GoCenter and VS Code
Security of Go Modules and Vulnerability Scanning in GoCenter and VS Code
 
Go 1.8 Release Party
Go 1.8 Release PartyGo 1.8 Release Party
Go 1.8 Release Party
 
Direction of building ns2 using cygwin under windows system
Direction of building ns2 using cygwin under windows systemDirection of building ns2 using cygwin under windows system
Direction of building ns2 using cygwin under windows system
 
Native Hadoop with prebuilt spark
Native Hadoop with prebuilt sparkNative Hadoop with prebuilt spark
Native Hadoop with prebuilt spark
 
Sbt, idea and eclipse
Sbt, idea and eclipseSbt, idea and eclipse
Sbt, idea and eclipse
 
Introduction to the Java bytecode - So@t - 20130924
Introduction to the Java bytecode - So@t - 20130924Introduction to the Java bytecode - So@t - 20130924
Introduction to the Java bytecode - So@t - 20130924
 
From Zero to Application Delivery with NixOS
From Zero to Application Delivery with NixOSFrom Zero to Application Delivery with NixOS
From Zero to Application Delivery with NixOS
 
Core Java- An advanced review of features
Core Java- An advanced review of featuresCore Java- An advanced review of features
Core Java- An advanced review of features
 
Java9 and the impact on Maven Projects (JFall 2016)
Java9 and the impact on Maven Projects (JFall 2016)Java9 and the impact on Maven Projects (JFall 2016)
Java9 and the impact on Maven Projects (JFall 2016)
 
Recipe to build open splice dds 6.3.xxx Hello World example over Qt 5.2
 Recipe to build open splice dds 6.3.xxx Hello World example over Qt 5.2   Recipe to build open splice dds 6.3.xxx Hello World example over Qt 5.2
Recipe to build open splice dds 6.3.xxx Hello World example over Qt 5.2
 

Más de Yandex

Предсказание оттока игроков из World of Tanks
Предсказание оттока игроков из World of TanksПредсказание оттока игроков из World of Tanks
Предсказание оттока игроков из World of TanksYandex
 
Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...
Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...
Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...Yandex
 
Структурированные данные, Юлия Тихоход, лекция в Школе вебмастеров Яндекса
Структурированные данные, Юлия Тихоход, лекция в Школе вебмастеров ЯндексаСтруктурированные данные, Юлия Тихоход, лекция в Школе вебмастеров Яндекса
Структурированные данные, Юлия Тихоход, лекция в Школе вебмастеров ЯндексаYandex
 
Представление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров Яндекса
Представление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров ЯндексаПредставление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров Яндекса
Представление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров ЯндексаYandex
 
Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...
Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...
Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...Yandex
 
Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...
Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...
Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...Yandex
 
Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...
Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...
Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...Yandex
 
Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...
Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...
Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...Yandex
 
Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...
Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...
Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...Yandex
 
Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...
Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...
Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...Yandex
 
Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...
Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...
Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...Yandex
 
Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...
Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...
Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...Yandex
 
Как защитить свой сайт, Пётр Волков, лекция в Школе вебмастеров
Как защитить свой сайт, Пётр Волков, лекция в Школе вебмастеровКак защитить свой сайт, Пётр Волков, лекция в Школе вебмастеров
Как защитить свой сайт, Пётр Волков, лекция в Школе вебмастеровYandex
 
Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...
Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...
Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...Yandex
 
Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...
Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...
Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...Yandex
 
Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...
Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...
Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...Yandex
 
Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...
Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...
Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...Yandex
 
Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...
Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...
Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...Yandex
 
Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...
Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...
Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...Yandex
 
Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...
Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...
Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...Yandex
 

Más de Yandex (20)

Предсказание оттока игроков из World of Tanks
Предсказание оттока игроков из World of TanksПредсказание оттока игроков из World of Tanks
Предсказание оттока игроков из World of Tanks
 
Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...
Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...
Как принять/организовать работу по поисковой оптимизации сайта, Сергей Царик,...
 
Структурированные данные, Юлия Тихоход, лекция в Школе вебмастеров Яндекса
Структурированные данные, Юлия Тихоход, лекция в Школе вебмастеров ЯндексаСтруктурированные данные, Юлия Тихоход, лекция в Школе вебмастеров Яндекса
Структурированные данные, Юлия Тихоход, лекция в Школе вебмастеров Яндекса
 
Представление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров Яндекса
Представление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров ЯндексаПредставление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров Яндекса
Представление сайта в поиске, Сергей Лысенко, лекция в Школе вебмастеров Яндекса
 
Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...
Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...
Плохие методы продвижения сайта, Екатерины Гладких, лекция в Школе вебмастеро...
 
Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...
Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...
Основные принципы ранжирования, Сергей Царик и Антон Роменский, лекция в Школ...
 
Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...
Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...
Основные принципы индексирования сайта, Александр Смирнов, лекция в Школе веб...
 
Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...
Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...
Мобильное приложение: как и зачем, Александр Лукин, лекция в Школе вебмастеро...
 
Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...
Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...
Сайты на мобильных устройствах, Олег Ножичкин, лекция в Школе вебмастеров Янд...
 
Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...
Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...
Качественная аналитика сайта, Юрий Батиевский, лекция в Школе вебмастеров Янд...
 
Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...
Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...
Что можно и что нужно измерять на сайте, Петр Аброськин, лекция в Школе вебма...
 
Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...
Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...
Как правильно поставить ТЗ на создание сайта, Алексей Бородкин, лекция в Школ...
 
Как защитить свой сайт, Пётр Волков, лекция в Школе вебмастеров
Как защитить свой сайт, Пётр Волков, лекция в Школе вебмастеровКак защитить свой сайт, Пётр Волков, лекция в Школе вебмастеров
Как защитить свой сайт, Пётр Волков, лекция в Школе вебмастеров
 
Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...
Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...
Как правильно составить структуру сайта, Дмитрий Сатин, лекция в Школе вебмас...
 
Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...
Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...
Технические особенности создания сайта, Дмитрий Васильева, лекция в Школе веб...
 
Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...
Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...
Конструкторы для отдельных элементов сайта, Елена Першина, лекция в Школе веб...
 
Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...
Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...
Контент для интернет-магазинов, Катерина Ерошина, лекция в Школе вебмастеров ...
 
Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...
Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...
Как написать хороший текст для сайта, Катерина Ерошина, лекция в Школе вебмас...
 
Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...
Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...
Usability и дизайн - как не помешать пользователю, Алексей Иванов, лекция в Ш...
 
Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...
Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...
Cайт. Зачем он и каким должен быть, Алексей Иванов, лекция в Школе вебмастеро...
 

Último

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 

Último (20)

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 

Всеволод Стахов: Новое в Pkg и перспективы развития системы пакетов в FreeBSD

  • 1. FreeBSD package management system Vsevolod Stakhov vsevolod@FreeBSD.org ruBSD conference December 14, 2013
  • 2. Ports and packages Ports is the comprehensive system of source packages. Mature Clear and well defined Simple (sometimes not) Configurable http://highsecure.ru/pkg Vsevolod Stakhov vsevolod@FreeBSD.org 2 of 26
  • 4. Disadvantages of the old architecture Make cannot handle complex packages relationships Complicated upgrade procedure (hard to keep up-to-date) Hard to migrate between releases Long build time http://highsecure.ru/pkg Vsevolod Stakhov vsevolod@FreeBSD.org 4 of 26
  • 5. Planned ports and pkg interaction Build Depends Build STAGE Packages Pkg Instal Run Depends http://highsecure.ru/pkg Vsevolod Stakhov vsevolod@FreeBSD.org 5 of 26
  • 6. Ports and packages Ports are used to build packages Dependencies are resolved by pkg, not make Stable branch of ports has an appropriate stable branch of packages Encourage users to install software from binary packages But do not prevent them from building custom packages from the ports http://highsecure.ru/pkg Vsevolod Stakhov vsevolod@FreeBSD.org 6 of 26
  • 9. The current problems with pkg Legacy ports support (with no staging, for example) Plain dependencies style Naive solver http://highsecure.ru/pkg Vsevolod Stakhov vsevolod@FreeBSD.org 9 of 26
  • 10. The problems of the solver in pkg Absence of conflicts resolving/handling No alternatives support Can perform merely a single task: install, upgrade or remove, so install task cannot remove packages for example http://highsecure.ru/pkg Vsevolod Stakhov vsevolod@FreeBSD.org 10 of 26
  • 11. Existing systems There are many examples of solvers used in different package management systems, for example: Zypper/SUSE - uses libsolv as the base Yum/RedHat - migrating to libsolv Apt/Debian - uses internal solver Pacman/Archlinux - uses naive internal solver http://highsecure.ru/pkg Vsevolod Stakhov vsevolod@FreeBSD.org 11 of 26
  • 12. External solvers To interact with an external solver we have chosen CUDF format used in the Mancoosi research project http://mancoosi.org: package: devel/libblah version: 1 depends: x11/libfoo package: security/blah version: 2 depends: devel/libblah conflicts: security/blah-devel http://highsecure.ru/pkg Vsevolod Stakhov vsevolod@FreeBSD.org 12 of 26
  • 13. We need an internal solver! Alternatives: Write own logic of dependencies and conflicts resolution? http://highsecure.ru/pkg Vsevolod Stakhov vsevolod@FreeBSD.org 13 of 26
  • 14. We need an internal solver! Alternatives: Write own logic of dependencies and conflicts resolution? Use some existing solution? http://highsecure.ru/pkg Vsevolod Stakhov vsevolod@FreeBSD.org 13 of 26
  • 15. We need an internal solver! Alternatives: Write own logic of dependencies and conflicts resolution? Use some existing solution? Use some known algorithm? http://highsecure.ru/pkg Vsevolod Stakhov vsevolod@FreeBSD.org 13 of 26
  • 16. We need an internal solver! Alternatives: Write own logic of dependencies and conflicts resolution? Use some existing solution? Use some known algorithm? Use SAT solver for packages management SAT expression (x1 ¬x2 x3 ) &(x3 ¬x1 )&(x2 ) Clause http://highsecure.ru/pkg Vsevolod Stakhov vsevolod@FreeBSD.org 13 of 26
  • 17. Making a SAT problem Assign a variable to each package: package A → a1 , package B → b1 Interpret a request as a set of unary clauses: Install/Upgrade package A → (a1 ) Delete package B → (¬b1 ) Convert dependencies and conflicts to disjuncted clauses http://highsecure.ru/pkg Vsevolod Stakhov vsevolod@FreeBSD.org 14 of 26
  • 18. Converting dependencies and conflicts If package A depends on package B (versions B1 and B2 ), then we can either have package A not installed or any of B installed: (¬A B1 B2 ) http://highsecure.ru/pkg Vsevolod Stakhov vsevolod@FreeBSD.org 15 of 26
  • 19. Converting dependencies and conflicts If package A depends on package B (versions B1 and B2 ), then we can either have package A not installed or any of B installed: (¬A B1 B2 ) If we have a conflict between versions of B (B1 , B2 and B3 ) then we ensure that merely one version is installed: (¬B1 ¬B2 )&(¬B1 ¬B3 )&(¬B2 ¬B3 ) Conflicts chain http://highsecure.ru/pkg Vsevolod Stakhov vsevolod@FreeBSD.org 15 of 26
  • 20. The solving of SAT problem Some rules to follow to speed up SAT problem solving. Trivial propagation - solve unary clauses Unit propagation - solve clauses with only a single unsolved variable Conflicts learning - if we assign some free variable and detect a conflict during unit propagation, we can fallback and learn that this variable must be negated Package specific assumptions. http://highsecure.ru/pkg Vsevolod Stakhov vsevolod@FreeBSD.org 16 of 26
  • 21. SAT problem propagation Trivial propagation - direct install or delete rules (¬A B)& (A) & (¬C ) &(¬A ¬D) true http://highsecure.ru/pkg false Vsevolod Stakhov vsevolod@FreeBSD.org 17 of 26
  • 22. SAT problem propagation Trivial propagation - direct install or delete rules (¬A B)& (A) & (¬C ) &(¬A ¬D) true false Unit propagation - simple depends and conflicts Dependency true false Conflict (¬A B) & (A) & (¬C ) & (¬A ¬D) B→true http://highsecure.ru/pkg D→false Vsevolod Stakhov vsevolod@FreeBSD.org 17 of 26
  • 23. Conflicts driven learning To handle alternatives it is required to test all variables unassigned: 1. full depth-first enumeration of possible values 2. fallback if a conflict found 3. remember which assignment caused conflict 4. make negative assignment for the learned variable and go to the first step http://highsecure.ru/pkg Vsevolod Stakhov vsevolod@FreeBSD.org 18 of 26
  • 24. Package specific assumptions Pure SAT solvers cannot deal with package management as they do not consider several packages peculiarities: try to keep installed packages (if no direct conflicts) do not install packages if they are not needed prefer high priority packages and repositories over low priority ones These options also improve SAT performance providing a good initial assignment. http://highsecure.ru/pkg Vsevolod Stakhov vsevolod@FreeBSD.org 19 of 26
  • 25. Packages universe We convert all packages involved to a packages universe of the following structure: Conflict Depend Name N1 Version N2 N3 Nn V1 V1 V1 V1 V2 V2 V2 Conflicts Chain V3 http://highsecure.ru/pkg Vsevolod Stakhov vsevolod@FreeBSD.org 20 of 26
  • 26. Package management task A request is splitted to install/upgrade and delete requests which could be passed simultaneously to the solver A conflicts between packages are detected with a repository creation All depends, reverse and conflicts of the requested packages are analyzed and the package universe is created Each package is defined by its name and the digest of significant fields (version, options and so on) http://highsecure.ru/pkg Vsevolod Stakhov vsevolod@FreeBSD.org 21 of 26
  • 27. Solvers and Pkg Pkg may pass the formed universe to an external CUDF solver: convert versions format request parse output Alternatively the internal SAT solver may be used: convert the universe to SAT problem formulate request ??? PROFIT http://highsecure.ru/pkg Vsevolod Stakhov vsevolod@FreeBSD.org 22 of 26
  • 28. Perspectives Using pkg solver for ports management Better support of multiple repositories Test different solvers algorithms using CUDF New dependencies and conflicts format Provides and alternatives http://highsecure.ru/pkg Vsevolod Stakhov vsevolod@FreeBSD.org 23 of 26
  • 29. New dependencies format libblah >= 1.0 + option1 , +option2 libfoo! = 1.1 Can depend on normal packages and virtual packages (provides) Easy to define the concrete dependency versions Alternative dependencies P3 Or P1 Depends P2 > Vx Vy Vz ! Conflict http://highsecure.ru/pkg Vsevolod Stakhov vsevolod@FreeBSD.org 24 of 26
  • 30. Alternatives Used to organize packages with the same functionality (e.g. web-browser) May be used to implement virtual dependencies (provides/requires) Alternatives Text Editor http://highsecure.ru/pkg Depends Package Vsevolod Stakhov vsevolod@FreeBSD.org 25 of 26
  • 31. Thank you for your attention! Questions? vsevolod@FreeBSD.org http://highsecure.ru/pkg Vsevolod Stakhov vsevolod@FreeBSD.org 26 of 26