К таким модулям относятся python-numpy, python-scipy, python-matplotlib. Scipy — набор свободных инстру-ментов для научной работы и специальных вычисле-ний.


Чтобы посмотреть этот PDF файл с форматированием и разметкой, скачайте его и откройте на своем компьютере.
Ñàíêò-Ïåòåðáóðãñêèéïîëèòåõíè÷åñêèéóíèâåðñèòåò
ÏåòðàÂåëèêîãî
Èíñòèòóòêîìïüþòåðíûõíàóêèòåõíîëîãèé
Âûñøàÿøêîëàïðîãðàììíîéèíæåíåðèè
Ðàáîòàäîïóùåíàêçàùèòå
È.î.äèðåêòîðàÂØÏÈ
Ï.Ä.Äðîáèíöåâ
¾
¿
ã.
ÂÛÏÓÑÊÍÀßÊÂÀËÈÔÈÊÀÖÈÎÍÍÀß
ÐÀÁÎÒÀÁÀÊÀËÀÂÐÀ
Òåìà:ÓíèâåðñàëüíûéïàêåòZephyToolsäëÿ
ðàçâ¼ðòûâàíèÿñïîìîùüþòåõíîëîãèèFlatpak
Íàïðàâëåíèå:09.03.01Èíôîðìàòèêàèâû÷èñëèòåëüíàÿ
òåõíèêà
Âûïîëíèëñòóäåíòãð.43504/21Þ.È.Àíäðååâ
ÐóêîâîäèòåëüÑ.À.Ô¼äîðîâ
Ñàíêò-Ïåòåðáóðã
2017
Ñàíêò-Ïåòåðáóðãñêèéïîëèòåõíè÷åñêèéóíèâåðñèòåò
ÏåòðàÂåëèêîãî
Èíñòèòóòêîìïüþòåðíûõíàóêèòåõíîëîãèé
Âûñøàÿøêîëàïðîãðàììíîéèíæåíåðèè
Ðàáîòàäîïóùåíàêçàùèòå
È.î.äèðåêòîðàÂØÏÈ
Ï.Ä.Äðîáèíöåâ
¾
¿
ã.
ÇÀÄÀÍÈÅ
êðàáîòåíàñîèñêàíèåñòåïåíèáàêàëàâà
Ñòóäåíòóãðóïïû:43504/21ÀíäðååâóÞðèþÈâàíîâè÷ó
1.
Òåìàðàáîòû:ÓíèâåðñàëüíûéïàêåòZephyTools
äëÿðàçâ¼ðòûâàíèÿñïîìîùüþòåõíîëîãèè
Flatpak(óòâåðæäåíàðàñïîðÿæåíèåìïîÈÊÍÒîò

2.
Ñðîêñäà÷èñòóäåíòîìîêîí÷åííîéðàáîòû:
3.
Èñõîäíûåäàííûåêðàáîòå:
ÀðõèâäëÿóñòàíîâêèZephyTools.
Îïèñàíèåñèñòåìûðàçâ¼ðòûâàíèÿêîíå÷íîãîïðî-
ãðàììíîãîïðîäóêòà.
4.
Ñîäåðæàíèåðàñ÷¼òíî-ïîÿñíèòåëüíîéçàïèñêè(ïå-
ðå÷åíüïîäëåæàùèõðàçðàáîòêåâîïðîñîâ)
4.1.
ÎáçîðòåõíîëîãèèFlatpakèèíôðàñòðóêòóðû
íàå¼îñíîâå.
4.2.
Ñîñòàâëåíèåòðåáîâàíèéêñèñòåìåèçàâèñè-
ìîñòåéäëÿZephyTools.
4.3.
ÐàçðàáîòêàñèñòåìûñáîðêèïàêåòàZephyTools
äëÿðàçâ¼ðòûâàíèÿñïîìîùüþòåõíîëîãèè
Flatpak.
4.4.
Âûðàáîòêàïåðñïåêòèâïîïîâûøåíèþýôôåê-
òèâíîñòèðàçâ¼ðòûâàíèÿÏÎâèíôðàñòðóêòó-
ðåFlatpak.
5.
Ïåðå÷åíüãðàôè÷åñêîãîìàòåðèàëà(ñòî÷íûìóêà-
çàíèåìîáÿçàòåëüíûõ÷åðòåæåé)
5.1.
ÄèàãðàììàâçàèìîäåéñòâèÿÏÎâýêîñèñòåìå
Flatpak.
5.2.
ÄèàãðàììàçàâèñèìîñòåéZephyTools.
6.
Êîíñóëüòàíòûïîïðîåêòó(ñóêàçàíèåìîòíîñÿùèõ-
ñÿêíèìðàäåëîâïðîåêòà,ðàáîòû)
7.
Äàòàâûäà÷èçàäàíèÿ
ÐóêîâîäèòåëüÔ¼äîðîâÑ.À.
Çàäàíèåïðèíÿëêèñïîëíåíèþ
(äàòà)
(ïîäïèñüñòóäåíòà)
Ðåôåðàò
Îò÷¼òñîäåðæèò108ñòðàíèö,9ðèñóíêîâ,2ïðèëî-
æåíèé,4ðàçäåëà,100èñòî÷íèêîâ.
FLATPAK,AUTOTOOLS,CMAKE,ÐÀÇÂœÐÒÛÂÀ-
ÍÈÅÏÎ,ÏÅÑÎ×ÍÈÖÀ,ZEPHYTOOLS,LINUX
Äàííàÿðàáîòàïîñâÿùåíàñîçäàíèþóíèâåðñàëüíî-
ãîïàêåòàZephyToolsäëÿðàçâ¼ðòûâàíèÿñïîìîùüþòåõ-
íîëîãèèFlatpak.
Ïðîèçâîäèòñÿîáçîðñóùåñòâóþùèõìåòîäèêðàñ-
ïðîñòðàíåíèÿèðàçâ¼ðòûâàíèÿÏÎ,îáðèñîâûâàåòñÿðîëü
Flatpakâäàííîéñôåðå.ÎïèñûâàåòñÿZephyToolsèíåîá-
õîäèìîñòüñîçäàíèÿFlatpak-ïàêåòàäëÿäàííîãîÏÎ.
Ïðîâîäèòñÿîïèñàíèåñîçäàíèÿäàííîãîïàêåòà
Flatpakñðåøåíèåìçàôèêñèðîâàííûõïðîáëåìèîáî-
çíà÷àþòñÿäàëüíåéøèåïåðñïåêòèâûðàçâèòèÿïàêåòà
ZephyTools.
Abstract
Thesiscontains108pages,9pictures,2appendices,4
chapters,100sources.
FLATPAK,AUTOTOOLS,CMAKE,SOFTWARE
DEPLOYMENT,SANDBOX,ZEPHYTOOLS,LINUX.
TheaimofthisthesisistodevelopauniversalFlatpak
packageofZephyToolssoftware.
Thisthesisfirstexaminesknownsoftwaredistribution
Ñîäåðæàíèe
Ââåäåíèå
13
Àêòóàëüíîñòü....................
13
Öåëüèçàäà÷èðàáîòû...............
17
Êðàòêîåñîäåðæàíèåðàáîòû...........
18
1ÎáçîðòåõíîëîãèèFlatpakèèíôðàñòðóêòóðû
íàå¼îñíîâå
19
1.1Îáùàÿèíôîðìàöèÿ.............
19
1.2Òåõíîëîãèè,èñïîëüçóåìûåFlatpak.....
21
1.2.1OSTreeðàñïðîñòðàíåíèåïðèëî-
æåíèé.................
21
1.2.2bubblewrapïåñî÷íèöàèáåçîïàñ-
íîñòü.................
22
1.2.3AppStreamôîðìàòõðàíåíèÿèí-
ôîðìàöèèîïðèëîæåíèè......
24
1.3Ñòðóêòóðàflatpak-ïðèëîæåíèÿ.......
24
1.4Ñîçäàíèåêîìïëåêòàïðîñòîãîïðèëîæåíèÿ
Flatpak.....................
26
1.5flatpak-builderàâòîìàòèçàöèÿñáîðêè...
30
1.5.1Ñòðóêòóðàìàíèôåñòà........
32
1.5.2Ñáîðêàìîäóëåéflatpak-builder-îì.
33
2Ñîñòàâëåíèåòðåáîâàíèéêñèñòåìåèçàâèñè-
ìîñòÿìäëÿZephyTools
40
2.1ÎïèñàíèåZephyTools............
40
2.2ÎáçîðçàâèñèìîñòåéZephyTools......
40
6
3Ðàçðàáîòêàñèñòåìûñáîðêèïàêåòà
ZephyToolsäëÿðàçâ¼ðòûâàíèÿñïîìîùüþ
òåõíîëîãèèFlatpak
45
3.1Îáùàÿèíôîðìàöèÿ.............
45
3.1.1Ñðàâíåíèåçàâèñèìîñòåéñðåäûâû-
ïîëíåíèÿèìåíåäæåðîâïàêåòîâ..
47
3.1.2Ìåòîäûñáîðêèìîäóëåéïîóìîë-
÷àíèþ.................
48
3.2Sphinx.....................
50
3.3Numpy,Scipy.................
53
3.3.1Îïèñàíèå...............
53
3.3.2Îñîáåííîñòèóñòàíîâêè.......
54
3.4Python,GTK+èOpenGL..........
59
3.4.1Îïèñàíèå...............
59
3.4.2Îñîáåííîñòèóñòàíîâêè.......
61
3.5Webkit.....................
64
3.5.1Îïèñàíèå...............
64
3.5.2Îñîáåííîñòèóñòàíîâêè.......
64
3.6Matplotlib...................
67
3.7OpenFOAM..................
70
3.7.1Îïèñàíèå...............
70
3.7.2Îñîáåííîñòèóñòàíîâêè.......
72
3.8Boto......................
77
3.9pySFTP....................
79
3.10ÏÎ,çàâèñèìîñòèêîòîðûõïîëíîñòüþ
óäâîëåòâîðÿþòñÿñðåäîéâûïîëíåíèÿ
GNOME3.24.................
81
3.11ZephyTools..................
83
7
4Âûðàáîòêàïåðñïåêòèâïîïîâûøåíèþýô-
ôåêòèâíîñòèðàçâ¼ðòûâàíèÿÏÎâèíôðà-
ñòðóêòóðåFlatpak
84
4.1Äîáàâëåíèåïîääåðæêèñîçäàíèÿîò÷¼òîâ
PDF......................
84
4.2Óâåëè÷åíèåýôôåêòèâíîñòèðàáîòûâû÷èñ-
ëèòåëüíûõáèáëèîòåê............
85
4.3Óëó÷øåíèåìàíèôåñòà,ïåðåäàâàåìîãî
flatpak-builder.................
87
Çàêëþ÷åíèå
89
Ñïèñîêèñïîëüçîâàííûõèñòî÷íèêîâ
92
Ïðèëîæåíèå1.Äèàãðàììàâçàèìîäåéñòâèÿ
ÏÎâýêîñèñòåìåFlatpak
107
Ïðèëîæåíèå2.Äèàãðàììàçàâèñèìîñòåé
ZephyTools
108
8
Îáîçíà÷åíèÿèñîêðàùåíèÿ
API
(ÀpplicationProgrammingInterface),ïðîãðàììíûé
èíòåðôåéñïðèëîæåíèÿ.
22
,
53
AWS
(AmazonWebServices),ïëàòôîðìà,äëÿïðåäî-
ñòàâëåíèÿðàçëè÷íûõâåá-ñåðâèñîâîòêîìïàíèè
Amazon.
77
,
78
BLAS
(BasicLinearAlgebraSubprograms),îïèñàíèåáà-
çîâîãîAPIäëÿâûïîëíåíèÿáàçîâûõîïåðàöèéëè-
íåéíîéàëãåáðû.
86
,
87
GPG
(GNUPrivacyGuard),ðåàëèçàöèÿñòàíäàðòààñèì-
ìåòðè÷íîãîøèôðîâàíèÿ,ïîçâîëÿþùàÿñîçäàâàòü
ýëåêòðîííóþöèôðîâóþïîäïèñü.
30
JSON
(JavaScriptObjectNotation),òåêñòîâûéôîðìàòîá-
ìåíàäàííûìè.
32
,
78
SDK
(SoftwareDevelopmentKit),ñðåäàâûïîëíåíèÿ,ñî-
äåðæàùàÿäàííûå,íåîáõîäèìûåäëÿñáîðêèïðèëî-
æåíèé.
26

28
,
46
9
SIMD
(SingleInstruction,MultipleData),îäíàèíñòðóê-
öèÿ,ìíîæåñòâîäàííûõïðèíöèïêîìïüþòåðíûõ
âû÷èñëåíèé,îáåñïå÷èâàþùèéïàðàëëåëüíîåâû-
ïîëíåíèåîäèíàêîâûõêîììàíäíàäðàçíûìíàáî-
ðîìäàííûõ.
86
,
91
ÎÑ
ÎïåðàöèîííàÿÑèñòåìà.
13
,
15
,
16
,
19
,
20
,
22
ÏÊ
ÏåðñîíàëüíûéÊîìïüþòåð.
13
ÏÎ
ÏðîãðàììíîåÎáåñïå÷åíèå.
13

17
,
21
,
27
,
33
,
34
,
37
,
39
ßÏ
ßçûêÏðîãðàììèðîâàíèÿ.
64
,
67
,
71
,
79
,
82
áàéò-êîä
(bytecode),ïðîìåæóòî÷íîåïðåäñòàâëåíèåïðî-
ãðàììû,íàáîðèíñòðóêöèé,ñîçäàííûéäëÿâûïîë-
íåíèÿèíòåðïðåòàòîðàìè.
40
çàâèñèìîñòè
(dependency),íàáîðáèáëèîòåêèïðî-
ãðàìì,êîòîðûåíåîáõîäèìîóñòàíîâèòüíàÎÑäëÿ
êîððåêòíîéðàáîòûÏÎ.
14
,
15
,
17

20
,
30
,
34
,
39
,
41

43
,
47
,
48
,
50
,
51
,
53
,
58
,
61
,
68
,
70
,
76
,
78

80
,
90
,
91
10
ïåðåìåííûåîêðóæåíèÿ
èìåíîâàííûåïåðåìåííûå,ñî-
äåðæàùèåòåêñòîâóþèíôîðìàöèþ,êîòîðóþìîãóò
èñïîëüçîâàòüçàïóñêàåìûåïðîãðàììû.
26
,
33
,
34
,
57
,
72
ïåðåíîñíàçàä
ïåðåíîñèçìåíåíèéèçíîâûõâåðñèéÏÎ
âñòàðûå,àäàïòàöèÿÏÎ,ñîäåðæàùåãîñÿâñâåæèõ
õðàíèëèùàõäèñòðèáóòèâîâ,ïîäèñïîëüçîâàíèåâ
äèñòðèáóòèâàõïðåäûäóùèõâåðñèé.
68
,
78
,
79
õåø-ñóììà
ðåçóëüòàòïðåîáðàçîâàíèÿâõîäíûõäàííûõ
ïðîèçâîëüíîéäëèííûâáèòîâóþñòðîêóôèêñèðî-
âàííîéäëèííû.Èñïîëüçóåòñÿäëÿïðîâåðêèöåëîñ-
íîñòèäàííûõïîñðåäñòâîìâû÷èñëåíèÿõåø-ñóììû
îòïîëó÷åííûõäàííûõèñðàâíåíèÿåãîñïðåäî-
ñòàâëåííîéõåø-ñóììîé.
38
õîñò
Ñèñòåìàíàêîòîðîéçàïóñêàþòñÿïðèëîæåíèÿ-
êîíòåéíåðû.Ìîæåòèñïîëüçîâàòüñÿêàêâêîíòåêñòå
ôèçè÷åñêîãîîáîðóäîâàíèÿ,òàêèâêîíòåêñòåÎÑ,
óñòàíîâëåííîéíàäàííîìîáîðóäîâàíèè.
19
,
20
,
25
,
27
,
87
11
ÿäðîÎÑ
(OSkernel),÷àñòüÎÑ,êîòîðàÿîðãàíèçóåòäî-
ñòóïêàïïàðàòíûìñðåäñòâàì÷åðåçàáñòðàêòíûé
âûñîêîóðîâíåâûéïðîãðàììíûéèíòåðôåéñ,àòàê-
æåñîäåðæèòäèñïåò÷åðïàìÿòè,äèñïåò÷åðïðîöåñ-
ñîâèäðóãèåíåîáõîäèìûåêîìïîíåíòû[
1
].
13
,
20
12
Ââåäåíèå
Àêòóàëüíîñòü
Âñîâðåìåííîììèðåðàçâèòèåèíôîðìàöèîííûõ
òåõíîëîãèéèóâåëè÷åíèåêîëè÷åñòâàïîëüçîâàòåëåé
ïåð-
ñîíàëüíûõêîìïüþòåðîâ(ÏÊ)
ïðèâåëîêñîçäàíèþíå
òîëüêîìíîæåñòâàïðèêëàäíûõïðîãðàìì,íîèòàêèõ
ôóíäàìåíòàëüíûõâåùåé,êàê
îïåðàöèîííûåñèñòåìû
(ÎÑ)
.Ñóùåñòâóþòêàêêîíöåïòóàëüíîðàçëè÷íûå
ÎÑ
(ïðèìåðîìÿâëÿþòñÿWindowsèGNU/Linux),òàêè
ÎÑ
,
ðàçâèâøèåñÿîòîáùåãî¾ïðåäêà¿,îäíàêî,âäàííûéìî-
ìåíòÿâëÿþùèåñÿíåñîâìåñòèìûìè(MacOS).Ñåìåé-
ñòâî
ÎÑ
GNU/Linuxõàðàêòåðèçèóåòñÿîáùèì
ÿäðîì
,âî-
êðóãêîòîðîãîïîñòðîåííîìíîæåñòâîðàçëè÷íûõäèñòðè-
áóòèâîâ
ÎÑ
,èñïîëüçóþùèõäàííîåÿäðî.Äàííîåðàç-
íîîáðàçèåóñëîæíÿåòðàñïðîñòðàíåíèÿîáû÷íîãî
ïðî-
ãðàììíîãîîáåñïå÷åíèÿ(ÏÎ)
.Íåîáõîäèìîó÷èòûâàòü
ñïåöèôèêóêàæäîé
ÎÑ
,ñîáèðàòü
ÏÎ
äëÿïàêåòíîãîìå-
íåäæåðàîïðåäåë¼ííîãîäèñòðèáóòèâà.
Íåîáõîäèìîñòüìåíåäæåðàïàêåòîâ(package
manager)âûçâàíàòðåáîâàíèÿìèñîâðåìåííîãî
ÏÎ
,
13
êîòîðîåïðèðàñïðîñòðàíåíèèòðåáóåòíàëè÷èÿâñè-
ñòåìåäðóãèõïðîãðàììèáèáëèîòåê.Íàëè÷èåäàííûõ
çàâèñèìîñòåé
âûçûâàåòäâåïðîáëåìû:

êîíå÷íûéïîëüçîâàòåëüâûíóæäåíóñòàíàâëèâàòü
æåëàåìîå
ÏÎ
èâñååãî
çàâèñèìîñòè
;

êîëëèçèè
çàâèñèìîñòåé
ñèòóàöèÿ,ïðèêîòîðîé
íåñêîëüêîïðîãðàììïîëüçîâàòåëÿòðåáóþòðàçíûå
âåðñèèîäíèõèòåõæå
çàâèñèìîñòåé
.Äàííàÿñèòó-
àöèÿïðèâîäèòêíåâîçìîæíîñòèêîððåêòíîéðàáîòû
îäíîéèçïðîãðàììïîëüçîâàòåëÿ;
Ïàêåòíûéìåíåäæåðïîçâîëÿåòóñòàíîâèòüïðîãðàììó
âìåñòåñîâñåìèå¼
çàâèñèìîñòÿìè
,àòàêæåïûòàåòñÿ
ðàçðåøèòüêîíôëèêòûâåðñèé
çàâèñèìîñòåé
.Ðàçðåøåíèå
êîíôëèêòîâïðîèñõîäèòñïîìîùüþïîïûòêèîáíîâëåíèÿ
èëèóäàëåíèÿ
ÏÎ
,âûçûâàþùåãîêîíôëèêòû.×àñòîäëÿ
ýòîãîòðåáóåòñÿâìåøàòåëüñòâîïîëüçîâàòåëÿ.Êñîæàëå-
íèþ,âîçìîæíàñèòóàöèÿ,âêîòîðîéóñòàíèòüêîëëèçèè
çàâèñèìîñòåé
íåâîçìîæíî.Êàêïðàâèëîïðèýòîéñèòóà-
öèèâñèñòåìåóñòàíîâëåíîòàêìíîãî
ÏÎ
,÷òîðàçîáðàòü-
ñÿâ
çàâèñèìîñòÿõ
ñòàíîâèòüñÿíåïîñèëüíîéçàäà÷åéäëÿ
14
÷åëîâåêà.Äàííàÿïðîáëåìàèìååòíàçâàíèå¾Dependency
hell¿.
Åù¼îäíèìñïîñîáîìðåøåíèÿïðîáëåìðàñïðîñòðà-
íåíèÿèóñòàíîâêèñòàëîðàçâèòèåòåõíîëîãèèâèðòóà-
ëèçàöèèíàóðîâíåîïåðàöèîííîéñèñòåìû.Äàííàÿòåõ-
íîëîãèÿïîçâîëÿåòñîçäàâàòü¾êîíòåéíåðû¿èíäèâèäó-
àëüíûåýêçåìïëÿðû
ÎÑ
íàêîòîðûåóñòàíîâëåíîêîíêðåò-
íîå
ÏÎ
ñîñâîèìè
çàâèñèìîñòÿìè
.Ðàñïðîñòðàíåíèå
ÏÎ
ñïîìîùüþêîíòåéíåðîââîçìîæíîíàëþáîìäèñòðèáó-
òèâå,ïîääåðæèâàþùåìäàííóþòåõíîëîãèþêîíòåéíåðè-
çàöèè.Ñîçäàíèåíîâîãîñëîÿàáñòðàêöèèïîçâîëÿåòîòâÿ-
çàòüñÿîòêîíêðåòíîãîäèñòðèáóòèâà,÷òîîáëåã÷àåòìàñ-
øòàáèðîâàíèåèîáíîâëåíèå
ÏÎ
âêîíòåéíåðå.Äàííàÿ
òåõíîëîãèÿâîñòðåáîâàíàâêîììåð÷åñêîéñðåäå.Èñïîëü-
çîâàíèåäàííîéòåõíîëîãèèïîçâîëÿåòñíèçèòüâëèÿíèå
àïïàðàòíûõïîëîìîê,óïðîñòèòüóâåëè÷åíèåìîùíîñòåé
óæåðàáîòàþùèõñèñòåì.Íàîñíîâàíèèýòîãîñòàëàïî-
ïóëÿðíàñèñòåìàâèðòóàëèçàöèèdocker.Êñîæàëåíèþèñ-
ïîëüçîâàíèådocker-à÷àñòîòðåáóåòïðàâàäìèíèñòðàòî-
ðà,÷òîíàðóøàåòáåçîïàñíîñòü.Âêîììåð÷åñêîéñôåðå
15
ðàáîòóññåðâåðàìèâåäóòêâàëèôèöèðîâàííûåñîòðóäíè-
êè,ñïîñîáíûåêîìïåíñèðîâàòüïðîáëåìûáåçîïàñíîñòè,
âûçâàííûåèñïîëüçîâàíèåìdocker-à.Îäíàêî,íàêîìïüþ-
òåðàõîáû÷íûõïîëüçîâàòåëåéèñïîëüçîâàíèåïðàâàäìè-
íèñòðàòîðàäëÿïîâñåäíåâíîéðàáîòûÿâëÿåòñÿíåæåëà-
òåëüíîéñèòóàöèåé.Âñâîþî÷åðåäüðàçðàáîò÷èêè
ÏÎ
Flatpakîðèåíòèðîâàëèñüíàðàñïðîñòðàíåíèåïðîãðàìì
íàêîìïüþòåðûîáû÷íûõïîëüçîâàòåëåé.Óñòàíîâêàèçà-
ïóñê
ÏÎ
,íàõîäÿùåãîñÿâèíôðàñòðóêòóðåFlatpak,íå
òðåáóåòèñïîëüçîâàíèÿïðàâàäìèíèñòðàòîðà,ýòîïîçâî-
ëÿåòïîâûñèòüçàùèòó
ÎÑ
ïîëüçîâàòåëÿ.Âðåçóëüòàòå
Flatpakìîæíîèñïîëüçîâàòüêàêâîáëàñòèêîììåð÷åñêèõ
ñåðâåðîâ,òàêèíàêîìïüþòåðàõîáû÷íûõïîëüçîâàòå-
ëåé.ÖåëåâûìïðèìåíåíèåìòåõíîëîãèèFlatpakìîæíî
íàçâàòü
ÏÎ
,íåñîäåðæàùååñÿâõðàíèëèùàõìåíåäæå-
ðîâïàêåòîâäèñòðèáóòèâîâ.ÑîçäàíèåêîìïëåêòàFlatpak
äàííîãî
ÏÎ
,ìîæåòèçáàâèòüïîëüçîâàòåëÿîòíåîáõî-
äèìîñòèðàçðåøàòüèóäâîëåòâîðÿòüìíîæåñòâîçàâèñè-
ìîñòåéñàìîñòîÿòåëüíîì.Ïðèìåðîìòàêîãî
ÏÎ
ÿâëÿåò-
ñÿZephyTools,èìåþùàÿïîðÿäêàøåñòèäåñÿòèïàêåòîâ-
16
çàâèñèìîñòåé,ïðèâÿçàííûõêêîíêðåòíîìóäèñòðèáóòèâó
GNU/LinuxUbuntu.
Öåëüèçàäà÷èðàáîòû
Öåëüþäàííîéðàáîòûÿâëÿåòñÿóíèâåðñàëüíûéïà-
êåòZephyToolsäëÿðàçâ¼ðòûâàíèÿñïîìîùüþòåõíîëî-
ãèèFlatpak.Âõîäåäàííîéðàáîòûíåîáõîäèìîðåøèòü
ñëåäóþøèåçàäà÷è:

èññëåäîâàòüàêòóàëüíîñòüðàçâ¼ðòûâàíèÿ
ÏÎ
ñïî-
ìîùüþòåõíîëîãèèFlatpak.

ïðîâåñòèîáçîðòåõíîëîãèèFlatpakèèíôðàñòðóê-
òóðûíàå¼îñíîâå.

ñîñòàâèòüòðåáîâàíèÿêñèñòåìåè
çàâèñèìîñòÿì
äëÿZephyTools.

ðàçðàáîòàòüñèñòåìóñáîðêèïàêåòàZephyToolsäëÿ
ðàçâ¼ðòûâàíèÿñïîìîùüþòåõíîëîãèèFlatpak.

îöåíèòüïåðñïåêòèâûïîïîâûøåíèþýôôåêòèâíî-
ñòèðàçâ¼ðòûâàíèÿ
ÏÎ
âèíôðàñòðóêòóðåFlatpak.
17
Êðàòêîåñîäåðæàíèåðàáîòû
Ðàáîòàñîäåðæèò4ãëàâû.Âïåðâîéãëàâåïðîâîäèò-
ñÿîáçîðòåõíîëîãèèFlatpak.Âòîðàÿãëàâàïîñâÿùåíàîá-
çîðó
çàâèñèìîñòåé
ZephyTools.Âòðåòüåéãëàâåðàññìàò-
ðèâàåòñÿïðîöåñññîçäàíèÿïàêåòàZephyTOOLSäëÿèí-
ôðàñòðóêòóðûFlatpak.Â÷åòâ¼ðòîéãëàâåïðåäëàãàþòñÿ
äàëüíåéøèåïåðñïåêòûðàçâèòèÿäàííîãîïðîåêòà.
18
1.
ÎáçîðòåõíîëîãèèFlatpakè
èíôðàñòðóêòóðûíàå¼îñíîâå
1.1.
Îáùàÿèíôîðìàöèÿ
Flatpakòåõíîëîãèÿ,ïîçâîëÿþùàÿñîáèðàòü,ðàñ-
ïðîñòðàíÿòü,óñòàíàâëèâàòüèçàïóñêàòüïðèëîæåíèÿâ
ÎÑ
GNU/Linux.ÃëàâíûåöåëèFlatpak:

ñäåëàòüâîçìîæíûìñòîðîííèìðàçðàáîò÷èêàìñî-
çäàâàòüèðàñïðîñòðàíÿòüïðèëîæåíèÿíàìíîæå-
ñòâîäèñòðèáóòèâîâ;

çàïóñêàòüïðèëîæåíèÿñìèíèìàëüíûìäîñòóïîìê
ñèñòåìå-
õîñòó
;
Ðàáîòàïðèëîæåíèÿ,çàïóùåííîãîâîFlatpak,îñíî-
âàíàíàñëåäóþùèõêîìïîíåíòàõ:

Ñðåäàâûïîëíåíèÿ(Runtime).Ñðåäàâûïîëíå-
íèÿÿâëÿåòñÿáàçîâûìíàáîðîì
çàâèñèìîñòåé
,êîòî-
ðûåìîãóòáûòüèñïîëüçîâàíûïðèëîæåíèÿìè.Äëÿ
ñáîðêèïðèëîæåíèÿíåîáõîäèìîóêàçûâàòü,íàêà-
êîéñðåäåâûïîëíåíèÿîíîáóäåòðàáîòàòü,èäëÿ
19
ïîñëåäóþùåãîçàïóñêàäàííîãîïðèëîæåíèÿïîëü-
çîâàòåëüäîëæåíóñòàíîâèòüäàííóþñðåäóâûïîë-
íåíèÿíàñâîþñèñòåìó.

Êîìïëåêòóåìûåáèáëèîòåêè(Bundledlibraries).
Åñëèñðåäàâûïîëíåíèÿíåïðåäîñòàâëÿåò
çàâèñè-
ìîñòeé
,íåîáõîäèìûõïðèëîæåíèþ,îíèñîáèðàþò-
ñÿââèäåêîìïëåêòóåìûõáèáëèîòåê.Ñáîðêàýòèõ
çàâèñèìîñòåéïðîèñõîäèòâìåñòåñîñáîðêîéñàìî-
ãîïðèëîæåíèÿ.

Ïåñî÷íèöà(Sandbox).Êàæäîåïðèëîæåíèåñîáè-
ðàåòñÿèçàïóñêàåòñÿâèçîëèðîâàííîéñðåäå.Ïî
óìîë÷àíèþóïðèëîæåíèÿèìååòñÿäîñòóïêäèðåê-
òîðèèñðåäûâûïîëíåíèÿ
/usr
èêäèðåêòîðèèñà-
ìîãîïðèëîæåíèÿèåãîêîìïëåêòóåìûõáèáëèîòåê
/app
.Äèðåêòîðèÿ
/usr
â
ÎÑ
GNU/Linuxïðåäíà-
çíà÷åíàäëÿõðàíåíèÿóñòàíîâëåííûõïàêåòîâïðî-
ãðàìì,äîêóìåíòàöèè,èñõîäíîãîêîäà
ÿäðîÎÑ
ÿäðà
èïðî÷èõñèñòåìíûõðåñóðñîâ.Äîñòóïêôàéëàì
õîñò
-ñèñòåìû,ñåòè,ãðàôèêå,ïîäñèñòåìàìíàøèíå
èóñòðîéñòâàìäîëæåíáûòüÿâíîçàäàí.
20
ÄèàãðàììàâçàèìîäåéñòâèÿÏÎâýêîñèñòåìå
Flatpakèçîáðàæåíàâïðèëîæåíèè1.ÒåõíîëîãèÿFlatpak
âíåäðåíàèèñïîëüçóåòñÿäëÿóñòàíîâêèñòîðîííåãî
ÏÎ
âäèñòðèáóòèâàõOSSolus[
2
]èEndlessOS[
3
].Òàê-
æåFlatpakïðåäîñòàâëÿåòñÿâîìíîæåñòâåäðóãèõïîïó-
ëÿðíûõäèñòðèáóòèâàõGNU/Linux:ArchLinux,Debian,
Fedora,OpenSUSEèäðóãèõ.
1.2.
Òåõíîëîãèè,èñïîëüçóåìûåFlatpak
1.2.1.
OSTreeðàñïðîñòðàíåíèåïðèëîæåíèé
OSTreeÿâëÿåòñÿñèñòåìîéêîíòðîëÿâåðñèéäâîè÷-
íûõôàéëîâ.Âöåëîìäàííóþòåõíîëîãèþìîæíîîïè-
ñàòüêàê¾gitäëÿäâî÷èíûõôàéëîâ¿.Ïðèîáíîâëåíèè
ïðèëîæåíèÿïðîèñõîäèòñîçäàíèåñòàòè÷åñêîéðàçíèöû
(static-delta)ðàçíèöûòåêóùåãîñîñòîÿíèÿïðèëîæåíèÿ
èîáíîâë¼ííîãî,ïîñëå÷åãîñêà÷èâàþòñÿèâíîñÿòñÿíåäî-
ñòàþùèå÷àñòèïðèëîæåíèÿ.Ëþáîåîáíîâëåíèåïðèëî-
æåíèÿâFlatpakïðîèñõîäèò÷åðåçñòàòè÷åñêóþðàçíèöó,
äàæåñàìàÿïåðâàÿçàãðóçêàýòîðåçóëüòàòñðàâíåíèÿïðè-
ëîæåíèÿñïóñòîéäèðåêòîðèåé.ÈñïîëüçîâàíèåOSTree
21
ãàðàíòèðóåòàòîìàðíîñòüîáíîâëåíèé,ýòîïîçâîëÿåòçà-
ùèòèòüïðèëîæåíèÿîòïîâðåæäåíèéïðèîøèáêåîáíîâ-
ëåíèÿ.Äàííûåãàðàíòèèïîçâîëÿþòîáíîâëÿòüïðèëîæå-
íèåäàæåâîâðåìÿåãîðàáîòû.
1.2.2.
bubblewrapïåñî÷íèöàèáåçîïàñíîñòü
bubblewrap[
4
]óòèëèòàèç
ÎÑ
ProjectAtomic
[
5
],ïîçâîëÿþùàÿóñòàíàâëèâàòüèçàïóñêàòüêîíòåéíå-
ðûíåïðåâèëèãèðîâàííûìïîëüçîâàòåëÿì.Èìåííîäàí-
íàÿóòèëèòàçàïóñêàåòêîíòåéíåðûâïåñî÷íèöå.Êðî-
ìåÿâíîãîîïèñàíèÿäîñòóïàêðåñóðñàìñèñòåìûðàçðà-
áîò÷èêèFlatpakñîçäàëèPortals(ïîðòàëû)-
Application
ProgrammingInterface(API)
âûñîêîãîóðîâíÿäëÿäîñòóïà
êðåñóðñàìñèñòåìû.Èñïîëüçîâàíèåïîðòàëîâïîäðàçó-
ìåâàåòðàçðåøåíèåèëèçàïðåòïîëüçîâàòåëþíàèñïîëü-
çîâàíèåðåñóðñà,êîòîðîåïîëüçîâàòåëüâûáåðåòñïîìî-
ùüþäèàëîãîâîãîîêíà.Âêà÷åñòâåäîñòóïêàêãðàôè÷å-
ñêîéîáîëî÷êåõîñòàâîçìîæíûäâàâàðèàíòà:

X11(XWindowsSystem).îêîííàÿñèñòåìàX
îáåñïå÷èâàþùàÿñòàíäàðòíûåèíñòðóìåíòûèïðî-
22
òîêîëûäëÿïîñòðîåíèÿãðàôè÷åñêîãîèíòåðôåéñà
ïîëüçîâàòåëÿ.Áûëàñîçäàíàâ1984ã.,àîäèííà-
äöàòàÿâåðñèÿáûëàâûïóùåíàâ1987ã.Ïîääåðæ-
êàðàñøèðåíèéïîìîãëàäàííîìóïðîòîêîëóïðîñó-
ùåñòâîâàòüòàêäîëãî,îäíàêîåãîàõðèòåêòóðà,ñå-
òåâîéïîäõîäâîðãàíèçàöèèâçàèìîäåéñòâèÿÿâëÿ-
åòñÿóñòàðåâøèì.Âäàííûéìîìåíòäàííûéïðî-
òîêîëÿâëÿåòñÿãðîìîçäêèìèñëîæíûìäëÿïîíè-
ìàíèÿ.ÒàêæåèñïîëüçîâàíèåX11âëå÷¼òïðîáëå-
ìûáåçîïàñíîñòè,ñâÿçàííûåñîòñóòñòâèåìèçîëÿ-
öèèìåæäóçàïóùåííûìèïðèëîæåíèÿìè,ïîòåíöè-
àëüíîìóäîñòóïóêïðàâàìñóïåðïîëüçîâàòåëÿ÷åðåç
ãðàôè÷åñêèåäðàéâåðà.

Waylandïðîòîêîëäëÿîðãàíèçàöèèãðàôè÷åñêî-
ãîñåðâåðà.Ïåðâûéâûïóñêáûëïðîèçâåä¼íâ2008
ãîäó.Âäàííûéìîìåíòÿâëÿåòñÿãëàâíûìïðåòåí-
äåíòîìíàçàìåíóXWindowsSystem.Ðåøàåòìíî-
ãèåïðîáëåìûX11,ÿâëÿåòñÿíåèçáûòî÷íûìèñàìî-
äîñòàòî÷íûì,èçîëèðóåòçàïóùåííûåïðèëîæåíèÿ
äðóãîòäðóãàè.ò.ä.
23
Ðàçðàáîò÷èêèFlatpakðåêîìåíäóþòèñïîëüçîâàòü
wayland,ïîñêîëüêóîáåñïå÷èòüïîëíóþáåçîïàñíîñòüx11
íåâîçìîæíî.
1.2.3.
AppStreamôîðìàòõðàíåíèÿèíôîðìàöèèî
ïðèëîæåíèè
AppStream[
6
]ôîðìàòõðàíåíèÿèíôîðìàöèè
îïðèëîæåíèè,èñïîëüçóåìûéãðàôè÷åñêèìèöåíòðàìè
óñòàíîâêèïðèëîæåíèé(òàêèìèêàêGNOMESoftware
Center)äëÿ÷òåíèÿèíôîðìàöèèîïðèëîæåíèè.Ãðàôè÷å-
ñêèåöåíòðûóñòàíîâêèïðèëîæåíèéèñïîëüçóþòýòèäàí-
íûåäëÿñîçäàíèÿ¾ñòðàíèöûïðèëîæåíèÿ¿,íàêîòîðîé
áóäóòîòîáðàæàòüñÿèêîíêà,îïèñàíèåïðèëîæåíèÿ,ñíèì-
êèýêðàíîâèïðî÷àÿèíôîðìàöèÿ.
1.3.
Ñòðóêòóðàflatpak-ïðèëîæåíèÿ
ÄèðåêòîðèÿñFlatpakïðèëîæåíèåìñîñòîèòèçñëå-
äóþùèõýëåìåíòîâ:
24

/files
äèðåêòîðèÿ,ñîäåðæàùàÿâñåôàéëûïðè-
ëîæåíèÿ,êîòîðàÿâîâðåìÿðàáîòûïðèëîæåíèÿïîä-
êëþ÷àåòñÿêàê
/app
.

/export
äèðåêòîðèÿ,ñîäåðæàùàÿôàéëû,äîñòóï
êêîòîðûìíåîáõîäèìñèñòåìå-
õîñòó
.

1
[Application]
2
name=org.gnome.gedit
3
runtime=org.gnome.Platform/x86_64/3.22
4
sdk=org.gnome.Sdk/x86_64/3.22
5
command=gedit
6
[Context]
7
8
9
devices=dri;
10
filesystems=host;
11
[Environment]
12
GEDIT_FOO=bar
13
[SessionBusPolicy]
14
org.extra.name=talk
15
org.other.name=own
Ëèñòèíã1.1:
Ïðèìåðîïðåäåëÿåòèìÿïðèëîæåíèÿ,ñðåäóâûïîë-
íåíèÿ,êîìàíäó,êîòîðàÿáóäåòçàïóùåíàïðèçàïóñêåïðè-
ëîæåíèÿ.Òàêæåóêàçàíûäîñòóïûêôàéëàìèóñòðîé-
ñòâàì,óñòàíàâëèâàþòñÿ
ïåðåìåííûåîêðóæåíèÿ
,êîòîðûå
áóäóòâèäíûòîëüêîâíóòðèïåñî÷íèöû.
1.4.
Ñîçäàíèåêîìïëåêòàïðîñòîãîïðèëîæåíèÿ
Flatpak
Ñîçäàíèåïðèëîæåíèÿñîñòîèòèçòð¼õýòàïîâ:
1.
Èíèöèàëèçàöèÿóñòàíîâêè,âõîäåêîòîðîéóêàçûâà-
þòñÿ:

Èìÿäèðåêòîðèè,ñîäåðæàùåéïðèëîæåíèå.

Èìÿïðèëîæåíèÿ,èñïîëüçóåìîåïðèìåæïðî-
öåññîðíîìâçàèìîäåéñòâèèñïîìîùüþòåõíî-
ëîãèèD-Bus.

SDK
íàîñíîâàíèèêîòîðîãîáóäåòïðîèñõî-
äèòüñáîðêàïðèëîæåíèÿ.

Ñðåäàâûïîëíåíèÿïðèëîæåíèÿ.

Âåðñèè
SDK
èñðåäûâûïîëíåíèÿ.
26
2.
Ñáîðêàïðèëîæåíèÿ.Äëÿñáîðêèïðèëîæåíèÿèñ-
ïîëüçóåòñÿêîìàíäà
flatpakbuild
,êîòîðîéíåîá-
õîäèìîóêàçàòüäèðåêòîðèþïðèëîæåíèÿèäåé-
ñòâèÿ,êîòîðûåäîëæíûáûòüñîâåðøåíûäëÿóñòà-
íîâêè.Èñïîëüçîâàíèå
flatpakbuild
ïðîèçâîäèò
ñáîðêó
ÏÎ
âïåñî÷íèöå,çàïóùåííîéíàîñíîâå
SDK
.
3.
Çàâåðøåíèåñîçäàíèÿïàêåòà.Íàäàííîìýòàïå
îïðåäåëÿþòñÿïàðàìåòðûäîñòóïàïðèëîæåíèÿê
ñèñòåìå-
õîñòó
èêîìàíäà,êîòîðàÿáóäåòèñïîëíåíà
ïðèçàïóñêåïðèëîæåíèÿ.
Äëÿîáåñïå÷åíèÿâîçìîæíîñòèïîñëåäóùåãîîáíîâ-
ëåíèÿêîìïëåêòûFlatpak(Flatpakbundles)ïîìåùàþòñÿâ
õðàíèëèùà,÷åðåçêîòîðûåèîñóùåñòâëÿåòñÿèõóñòàíîâ-
êà.Äëÿïðîñìîòðàäîñòóïíûõïðèëîæåíèÿõâïîäêëþ÷¼í-
íîìõðàíèëèùåíåîáõîäèìîââåñòèêîììàíäó
flatpak
remote-lsrepo_name
.
Íèæåáóäåòðàññìîòðåíïðèìåðñáîðêèèóñòàíîâêè
ïðèëîæåíèÿDictionary.Âñåçàâèñèìîñòè,íåîáõîäèìûå
äàííîìóïðèëîæåíèþ,ñîäåðæàòñÿâñðåäåèñïîëíåíèÿ,
27
ïîýòîìóíåîáõîäèìîóñòàíîâèòüëèøüîäèíDictionary
áåçêîìïëåêòóìûõáèáëèîòåê.Ïðîöåññóñòàíîâêèïðèâå-
ä¼ííàëèñòèíãå1.2.
1
#initializebuilding
2
$flatpakbuild-initdictionaryorg.gnome.Dictionaryorg.
gnome.Sdkorg.gnome.Platform3.22
3
/3.20/gnome-dictionary-3.20.0.tar.xz
4
$tarxvfgnome-dictionary-3.20.0.tar.xz
5
$
cd
gnome-dictionary-3.20.0/
6
#buildintoinitializedirectory
7
$flatpakbuild../dictionary./configure--prefix=/app
8
$flatpakbuild../dictionarymake
9
$flatpakbuild../dictionarymakeinstall
Ëèñòèíã1.2:
ÑáîðêàïðèëîæåíèÿDictionaryñïîìîùüþ
Flatpak
Âäàííîìñëó÷àåïðîèñõîäèòèíèöèàëèçàöèÿñîñëåäóþ-
ùèìèïàðàìåòðàìè.

Ñáîðêàâäèðåêòîðèè
dictionary
.

Èìÿïðîãðàììûorg.gnome.Dictionary.

Ñðåäàâûïîëíåíèÿè
SDK
GNOMEâåðñèè3.24.
Ïîñëå÷åãîñêà÷èâàåòñÿèñõîäíûéêîäèïðîèç-
âîäèòñÿóñòàíîâêàïðîãðàììûDictionary.Ñòàíäàðòíàÿ
28
óñòàíîâêàïðîãðàìì,îñíîâàííûõíàñèñòåìåñáîðêè
GNUAutotools,ïðîèñõîäèòâòðèýòàïà:
1.
Íàñòðîéêàîêðóæåíèÿäëÿñáîðêè.(Âïðèìåðåâî
âðåìÿêîíôèãóðàöèèïðîèñõîäèòóêàçàíèåäèðåêòî-
ðèèóñòàíîâêè-
(/app)
2.
Ñáîðêàïðîãðàììû.
3.
Óñòàíîâêàïðîãðàììûâñèñòåìy.
Çàâåðøåíèåóñòàíîâêèèçàïóñêïðîãðàììûïîêàçàí
íàëèñòèíãå1.3.
1
#buildfinish
2
3
#exportinrepositoryandinstall
4
$flatpakbuild-
export
repodictionary
5
$flatpak--userremote-add--no-gpg-verify--
if
-not-
existstutorial-reporepo
6
$flatpak--userinstalltutorial-repoorg.gnome.
Dictionary
7
$flatpakrunorg.gnome.Dictionary
Ëèñòèíã1.3:
ÓñòàíîâêàèçàïóñêïðèëîæåíèÿDictionary
Ïîñëåçàâðøåíèÿñáîðêèóïðèëîæåíèÿåñòüäîñòóï
êx11èñåòè.Êîììàíäà,êîòîðàÿáóäåòââåäåíàïðèçà-
29
ïóñêå,
gnome-dictionary
.Äàëååèä¼òâûãðóçêàèç
äèðåêòîðèèóñòàíîâêèâõðàíèëèùåèäîáàâëåíèåýòî-
ãîõðàíèëèùàâñïèñîêäîñòóïíûõõðàíèëèùêëèåíòñêîé
ïðîãðàììûFlatpakñïîñëåäóþùåéóñòàíîâêîéèçíåãî
org.gnome.Dictionary
.Ïàðàìåòðû,èñïîëüçóåìûåïðè
óñòàíîâêå:

user
óñòàíîâêàòîëüêîäëÿêîíêðåòíîãîïîëüçîâà-
òåëÿ.

no-gpg-verify
îòêëþ÷åíèåâåðèôèêàöèèñïî-
ìîùüþòåõíîëîãèè
GPG
.

if-not-exist
íè÷åãîíåäåëàòü,åñëèõðàíèëèùå
óæåñóùåñòâóåò.
1.5.
flatpak-builderàâòîìàòèçàöèÿñáîðêè
Ìíîæåñòâîïðèëîæåíèéèìåþò
çàâèñèìîñòè
,êîòî-
ðûåíåïðåäîñòàâëÿþòñÿñðåäîéâûïîëíåíèÿ.Íåîáõîäè-
ìîâêëþ÷àòüíåäîñòàþùèåïðèëîæåíèÿèáèáëèîòåêèâ
êîìïëåêòFlatpak.Âðåçóëüòàòåïðîöåññóñòàíîâêèñòà-
íîâèòüñÿãðîìîçäêèì,àâñëó÷àåîøèáêèïðèä¼òñÿåãî
íà÷èíàòüçàíîâî.Äëÿàâòîìàòèçàöèèïðîöåññàóñòàíîâêè
30
ñóùåñòâóåòèíñòðóìåíòêîìàíäíîéñòðîêèflatpak-builder.
Äàííûéèíñòðóìåíòâûïîëíÿåòñëåäóþùèåøàãè.

Ñêà÷èâàíèåâñåõèñòî÷íèêîâïðèëîæåíèé,êîòîðûå
áóäóòóñòàíîâëåíû.

Èíèöèàëèçàöèÿäèðåêòîðèèóñòàíîâêèêîìàíäîé
flatpakbuild-init
.

Ñáîðêàèóñòàíîâêàâñåõìîäóëåéñïîìîùüþ
flatpakbuild
.

Óäàëåíèåíåíóæíûõôàéëîâ,îñòàâøèõñÿïîñëå
óñòàíîâêè,òàêèõêàêäîêóìåíòàöèÿèëèïðèìåðû
íåêîòîðûõïðîãðàìì.

Çàâåðøåíèåóñòàíîâêèñïîìîùüþ
flatpak
build-finish
.
Ïðèìåðèñïîëüçîâàíèÿflatpak-builderïîêàçàííà
ëèñòèíãå1.4.
1
flatpak-builder--repo=repodictionaryorg.example.
Dictionary.json
Ëèñòèíã1.4:
óñòàíîâêàïðèëîæåíèÿdictionarycïîìîùüþ
flatpak-builder
31
Ðàáîòàflatpak-builder-àñòðîèòñÿíàîñíîâåôàéëàñ
íàñòðîéêàìè,íàçûâàåìîãîìàíèôåñòîì.Ìàíèôåñòÿâëÿ-
åòñÿ
ôàéëîìJSON
.Ïðèìåðìàíèôåñòàáóäåòïðèâåä¼íâ
ëèñòèíãàõäàëåå.
1.5.1.
Ñòðóêòóðàìàíèôåñòà
Ìàíèôåñòóñëîâíîìîæíîðàçäåëèòüíàäâå÷àñòè
çàãîëîâîêèáëîêñìîäóëÿìè.Âçàãîëîâêåïðîèçâîäèòñÿ
îïèñàíèåêîìïëåêòàFlatpak.Ïîñóòèýòîïàðàìåòðû,ïå-
ðåäàâàåìûåâîâðåìÿâûïîëíåíèÿêîììàíä
build-init
è
build-finish
.
1
{
"app-id"
:
"org.gnome.Dictionary"
,
2
"runtime"
:
"org.gnome.Platform"
,
3
"runtime-version"
:
"
3
.
2
2
"
,
4
"sdk"
:
"org.gnome.Sdk"
,
5
"command"
:
"gnome-dictionary"
,
6
"finish-args"
:
[
7
Ëèñòèíã1.5:
Çàãîëîâîêìàíèôåñòàïðèëîæåíèÿdictionary
Êðîìåòîãîâçàãîëîâêåïîïàðàìåòðó
cleanup
óêàçûâàþòñÿïóòèäîäèðåêòîðèéèôàéëîâ,êîòîðûå
32
íåáõîäèìîóäàëèòü.Ïîñëåçàãîëîâêàèä¼òáëîê
build-
options
,âêîòîðîììîæíîíàñòðîèòüïàðàìåòðûêîìïè-
ëÿöèèè
ïåðåìåííûåîêðóæåíèÿ
,äåéñòâóþùèåâòå÷åíèè
ñáîðêèâñåõìîäóëåé.
1.5.2.
Ñáîðêàìîäóëåéflatpak-builder-îì
Äèðåêòîðèþ,ÿâëÿþùóþñÿðåçóëüòàòîìñáîðêèêîì-
ïëåêòàFlatpak,ìîæíîîõàðàêòåðèçîâàòüêàê¾ëîêàëüíûé
/usr
¿.Âäàííóþäèðåêòîðèþìîæåòáûòüóñòàíîâëåíî
ìíîæåñòâîïðèëîæåíèéèòî,÷òîáóäåòçàïóñêàòüñÿæå
áóäåòçàïóñêàòüñÿïðèçàïóñêåïðèëîæåíèÿFlatpak,îïðå-
äåëÿåòñÿëèøüïàðàìåòðîì,êîòîðûéáóäåòââåä¼íâïî-
ëå
command
.Êàæäûéìîäóëüâîñïðèíèìàåòñÿêàêîòäåëü-
íûéïðîãðàììíûéïðîäóêò,êîòîðûéäîëæåíîñíîâûâàòü-
ñÿíàîïðåäåë¼ííîéñèñòåìåñáîðêè.Âäàííûéìîìåíò
ïîääåðæèâàþòñÿòðèñèñòåìûñáîðêè,ïðåäñòàâëåííûõ
íèæå.

ÑèñòåìàñáîðêèGNUAutotoolsíàáîðïðîãðàìì-
íûõñðåäñòâ,ïðåäíàçíà÷åííûéäëÿñáîðêèêîäà
ÏÎ
ïîäðàçëè÷íûåñèñòåìûPOSIX.Ñáîðêà
ÏÎ
33
ïðîèñõîäèòñïîìîùüþïîñëåäîâàòåëüíîñòèêî-
ìàíä
./configure&&make&&makeinstall
.
Ïîóìîë÷àíèþflatpak-builderèñïîëüçóåòäàííóþ
ñèñòåìóñáîðêèèîæèäàåòíàëè÷èåôàéëîâäàí-
íîéñèñòåìûâêîðíåäèðåêòîðèèñèñõîäíûìêî-
äîìóñòàíàâëèâàåìîãîìîäóëÿ.Âîçìîæíîóïðîù¼í-
íîåèñïîëüçîâàíèåäàííîéñèñòåìû,êîòîðîåòðåáó-
åòíàëè÷èÿëèøüMakefileñöåëÿìè
all
è
install
.

CMake-êðîñïëàòôîðìåííàÿñèñòåìààâòîìàòèçà-
öèèñáîðêè
ÏÎ
.Äëÿå¼èñïîëüçîâàíèÿíåîáõîäèì
ôàéë
CMakeLists.txt
,ñîäåðæàùèéèíôîðìàöèþ
îñáîðêå.

Meson-íîâàÿñèñòåìàñáîðêè,ïîÿâèâøàÿñÿâ2013
ãîäó.Âõîäåäàííîéðàáîòûíèîäèíïðîåêòíåáûë
îñíîâàííàäàííîéñèñòåìå.
Ñáîðêàìîäóëåéèä¼òïîïîðÿäêóèõîïèñàíèÿ,òà-
êèìîáðàçîìñíà÷àëàíåîáõîäèìîîïèñûâàòüìîäóëè
ÏÎ
,
ÿâëÿþùåãîñÿ
çàâèñèìîñòÿìè
äëÿèäóùèõñëåäîì.Êàæ-
äîåîïèñàíèåìîäóëÿìîæåòñîäåðæàòüâñåáåêîíêðåòíûå
íàñòðîéêèñáîðêèïðèëîæåíèÿ,
ïåðåìåííûåîêðóæåíèÿ
,
34
äèðåêòîðèèäëÿóäàëåíèÿ.Ñèñòåìàñáîðêèóêàçûâàåòñÿ
ââèäåïàðàìåòðà
buildsystem
èëè
no-autogen
âñëó-
÷àåèñïîëüçîâàíèÿóïðîù¼ííîéñèñòåìûñáîðêèGNU.Â
ïàðàìåòðå
sources
ïåðå÷èñëÿþòñÿèñòî÷íèêèôàéëîâè
äàííûõäëÿñáîðêè.Âäàííîéðàáîòåáûëèèñïîëüçîâàíû
ñëåäóþùèåèñòî÷íèêè:

archive
àðõèâôîðìàòà
*.tar*.zip
,÷àùåâñå-
ãîñîäåðæàùèéèñõîäíûéêîäïðèëîæåíèÿ.

git
ðàñïðåäåë¼ííàÿñèñòåìàêîíòðîëÿâåðñèé,
ñîçäàííàÿËèíóñîìÒîðâàëüäñîìâ2005ãîäó.Ïðåä-
íàçíà÷åííàäëÿîòñëåæèâàíèÿøèóïðàâëåíèÿçàèç-
ìåíåíèÿìèâäîêóìåíòàõ,êîìïüþòåðíûõïðîãðàì-
ìàõèäðóãèõíàáîðàõèíôîðìàöèè.Ðàñïðåäåë¼í-
íîñòüîçíà÷àåò,÷òîêàæäûéïîëüçîâàòåëüñèñòåìû
õðàíèòóñåáÿîòäåëüíîåõðàíèëèùåèïîíåîáõîäè-
ìîñòèñîãëàñóåòåãîñóäàë¼ííûìñîñòîÿíèåìäðó-
ãèõõðàíèëèù.Ìíîæåñòâîïðîãðàììíûõïðîäóêòîâ
ñòðîèòñÿíàîñíîâåýòîéñèñòåìû,ïîýòîéïðè÷èíå
flatpak-builderïîääåðæèâàåòõðàíèëèùgitêàêèñ-
òî÷íèêèñõîäíûõêîäîâìîäóëÿ.Ïðèèñïîëüçîâàíè-
35
èèäàííîãîèñòî÷íèêàðåêîìåíäóåòñÿóêàçàòüïàðà-
ìåòð
branch
.Ïîóìîë÷àíèþäàííûéïàðàìåòðíà-
õîäèòñÿâñîñòîÿíèèmaster.Ýòîïîäðàçóìåâàåòñà-
ìîåñâåæååñîñòîÿíèåïðèëîæåíèÿ,êîòîðîå÷àñòî
èçìåíÿåòñÿèìîæåòáûòüíåñòàáèëüíî.×àñòîåèç-
ìåíåíèå¾âåòêè¿masterìîæåòïðîèçâîäèòüêðåãó-
ëÿðíîéïåðåñáîðêåìîäóëÿèâñåõìîäóëåé,êîòîðûå
îïèñàíûïîñëåíåãî.

file
ïóòüäîîäíîãîôàéëà.

script/shell
åñëèïðèïîäãîòîâêåäàííûõ
íåîáõîäèìîâûïîëíèòüîïðåäåë¼ííîåêîëè÷åñòâî
êîìàíäîáîëî÷êè,îíèìîãóòáûòüóêàçàíûëèáîâ
ïðÿìîìâèäåñïîìîùüþïàðàìåòðà
shell
èëèìî-
æåòáûòüóêàçàíïóòüäî
*.sh
ñöåíàðèÿïàðàìåòðîì
script

patch
ñïîìîùüþóòèëèòûdiffìîæíîñðàâ-
íèâàòüäâàôàéëàèëèäàæåäâåäèðåêòîðèè.Ðå-
çóëüòàòñðàâíåíèÿ,êàêïðàâèëî,çàïèñûâàåìûéâ
ôàéë
*.patch
,ìîæåòáûòüèñïîëüçîâàíäëÿèçìå-
íåíèÿñîñòîÿíèÿôàéëîâ.Âäàííîéðàáîòåèñõîä-
íûåêîäûàðõèâîâïîìåùàëèñüâäèðåêòîðèè
/a
è
36
/b
,ïîñëå÷åãîñîâåðøàëèñüèçìåíåíèÿâäèðåêòî-
ðèè
/b
èâûçûâàëàñüêîìàíäà
diff-urNab�
%programmName%.patch
.Êëþ÷-uóêàçûâàåòïðî-
ãðàììådiffâûäàâàòüðàçíèöóâóíèôèöèðîâàííîì
ôîðìàòå.Êëþ÷-róêàçûâàåòíàíåîáõîäèìîñòüñðàâ-
íèâàòüôàéëûðåêóðñèâíîïîâñåìïîääèðåêòîðè-
ÿì,à-Nñ÷èòàåòîòñóòñòâóþùèåôàéëûâîðèãè-
íàëüíîéäèðåêòîðèèïðèñóòñòâóþùèìè,íîïóñòû-
ìè.Èñïîëüçîâàíèåäàííîãîïàðàìåòðàïîëåçíîâ
ñèòóàöèèñìåíûàðõèâà
ÏÎ
,âêîòîðîìíåîáõîäèìî
ïðîâåñòèèçìåíåíèÿ.Êàêïðàâèëî,ñòðóêòóðàìíî-
ãèõôàéëîâèäèðåêòîðèéîñòà¼òñÿïðåæíåé,÷òî
ïîçâîëÿåòïðèìåíÿòüîäèíèòîòæåôàéë
*.patch
êðàçíûìâåðñèÿì
ÏÎ
.
Óêàçàíèåèñòî÷íèêîâ-ôàéëîâèëèèñòî÷íèêîâ-
àðõèâîâìîæåòáûòüïðîèçâåäåíîäâóìÿñïîñîáàìè:

path
äàííûéïàðàìåòðóêàçûâàåòïóòüäîäàí-
íûõ,ðàñïîëîæåííûõíàëîêàëüíîìäèñêåêîìïüþ-
òåðà.
37

url
äàííûéïàðàìåòðóêàçûâàåòïóòüäîäàíûõ,
êîòîðûåáóäóòñêà÷èâàòüñÿèçñåòè.Íåîáõîäèìîñòü
èñïîëüçîâàòüñåòüíåãàðàíòèðóåòíàä¼æíîñòèñêà-
÷àííûõäàííûõ,ïîýòîìóíåîáõîäèìàïðîâåðêàöå-
ëîñíîñòè.Èñïîëüçîâàíèåäàííîãîïàðàìåòðàòðåáó-
åòââîäàïàðàìåòðà
sha256
,ÿâëÿþùåãîñÿðåçóëü-
òàòîìâû÷èñëåíèÿ
õåøñóììû
îòôàéëàèëèàðõè-
âà.×àñòîàðõèâûèñõîäíèêîâìîãóòñîïðîâîæäàòü-
ñÿäàííîéèíôîðìàöèåé,îäíàêîâñëó÷àåå¼îòñóò-
ñòâèåíåîáõîäèìîñàìîìóñêà÷àòüäàííûåèïðîèç-
âåñòèâû÷èñëåíèå
õåø-ñóììû
ñïîìîùüþóòèëèòû
sha256sum
.
Âñëó÷àåíåîáõîäèìîñòèïåðåìåùåíèÿèñòî÷íèêàèç
êîðíåâîéäèðåêòîðèèóñòàíîâêèâäðóãóþèñïîëüçóåòñÿ
ïàðàìåòð
dest
.Äëÿïåðåèìåíîâûâàíèÿôàéëàïîñëåïî-
ìåùåíèÿåãîâäèðåêòîðèþóñòàíîâêèèñïîëüçóåòñÿïàðà-
ìåòð
dest-filename
.ÄëÿïðèëîæåíèÿDictionaryíåîá-
õîäèìîñîáðàòüëèøüîäèíìîäóëüñàìîïðèëîæåíèå
Dictionary,êîòîðîåñîáèðàåòñÿñèñòåìîéñáîðêèGNU.
38
Ýòîäåëàåòáëîêìîäóëÿâìàíèôåñòåäàííîãîêîìïëåê-
òàFlatpakòðèâèàëüíûì:
1
2
"modules"
:
[
3
{
"name"
:
"gnome-dictionary"
,
4
"sources"
:
[
{
"type"
:
"archive"
,
5
"url"
:
"https
:
//download.gnome.org/sources/gnome
-dictionary/
3
.
2
0
/gnome-dictionary-
3
.
2
0
.
0
.tar.xz"
,
6
"sha
2
5
6
"
:
"efb
3
6
3
7
7
d
4
6
eff
9
2
9
1
d
3
b
8
fec
3
7
baab
2
3
5
5
f
9
dc
8
bc
7
edb
7
9
1
b
6
a
6
2
5
5
7
4
7
1
6
1
2
1
"
}
]
}
]
}
Ëèñòèíã1.6:
ÌîäóëèìàíèôåñòàêîìïëåêòàFlatpakdictionary
Îäíàêîìíîæåñòâîäðóãèõïðèëîæåíèéîáëàäàþò
áîëüøèìêîëè÷åñòâîì
çàâèñèìîñòeé
,êîòîðûåíåîáõîäè-
ìîâêëþ÷àòüâêîìïëåêò
ÏÎ
èóíèõîïèñàíèåìîäóëåé
çàíèìàåòãîðàçäîáîëüøåìåñòà,÷åìçàãîëîâîê.[
7

9
]
39
2.
Ñîñòàâëåíèåòðåáîâàíèéêñèñòåìåè
çàâèñèìîñòÿìäëÿZephyTools
2.1.
ÎïèñàíèåZephyTools
ZephyTools[
10
]ýòîîòêðûòîåÏÎïîïðîåêòè-
ðîâàíèþâåòðîâûõýëåêòðîñòàíöèé.ÄàííîåÏÎðàñïðî-
ñòðàíÿåòñÿñïîìîùüþàðõèâîâ
ZIP
,ñîäåðæàùèõ
áàéò-
êîä
PythonäàííîãîÏÎèïðî÷èìèíåîáõîäèìûìèäàí-
íûìè.Óñòàíîâêàïðèëîæåíèÿïðîèçâîäèòñÿñïîìîùüþ
ñöåíàðèÿ
óñòàíîâêèìîæåòçíà÷èòåëüíîîòëè÷àòüñÿîòîïèñàííîãî
âèíñòðóêöèè.
ÂñâîåéðàáîòåZephyTOOLSèñïîëüçóåò:

PyGTKäëÿïîñòðîåíèÿèíòåðôåéñàïîëüçîâàòåëÿñ
ïîìîùüþGTK+2.

Ãðàôè÷åñêóþáèáëèîòåêóMatplotlibäëÿïîñòðîå-
íèÿðàçëè÷íûõîòîáðàæåíèé.

Ãåíåðàòîððàñ÷¼òíîéñåòêègmsh.

OpenFOAMäëÿäîñòóïàêõàðàêòåðèñòèêàìâåòðî-
âûõïîòîêîâïîñðåäñòâîìàâòîìàòèçèðîâàííûõ3D-
ðàñ÷¼òîââû÷èñëèòåëüíîéàýðîãèäðîäèíàìèèêè.
Çàâèñèìîñòè
ZephyToolsìîæíîðàçäåëèòüíà
íåñêîëüêîêëàññîâ:

ÎòäåëüíûåPython-ìîäóëè,èñïîëüçóåìûåïðîãðàì-
ìîé.Êòàêèììîäóëÿìîòíîñÿòñÿ
python-numpy,
python-scipy,python-matplotlib
.

Ïðèëîæåíèÿ,íàïèñàííûåíàäðóãèõÿçûêàõ
ïðîãðàììèðîâàíèÿ,íåîáõîäèìûåäëÿðàáîòû
41
ZephyTools,òàêèõêàê
imagemagick,webkit,
ffmpeg
.

ÍàáîðñâÿçóþùèõPython-ìîäóëåé,íåîáõîäèìûõ
äëÿðàáîòûñÎÑèëèñòîðîííèìèïðèëîæåíèÿìè
ñïîìîùüþPython.Ïðèìåðîììîæåòáûòü
PyGtk,
python-webkit
.
Âèíñòðóêöèèäàííàÿóñòàíîâêàïðîèçâîäèòñÿñïî-

webkitíåîáõîäèì,äëÿîòîáðàæåíèÿîò÷¼òîâèäî-
êóìåíòàöèèââèäåâåá-ñòðàíèö.
Âðåçóëüòàòåâêà÷åñòâå
çàâèñèìîñòeé
ZephyTools
òðåáóåòóñòàíîâêèïîëüçîâàòåëåìïîðÿäêà26ïàêå-
òîâ,ñîñòîÿùèõêàêèçíåáîëüøèõPython-ìîäóëåé,
òàêèèçñëîæíûõäâèæêîâäëÿîòîáðàæåíèÿâåá-
ñòðàíèöèëèïëàòôîðìäëÿíàó÷íûõâû÷èñëåíèé
èìîäåëèðîâàíèÿ.Óñòàíîâêàçàâèñèìîñòåéñïî-
ìîùüþìåíåäæåðàïàêåòîâaptitudeáóäåòâûãëÿ-
äåòüñëåäóþùèìîáðàçîì:
$aptitudeinstall
binfmt-supportbisonbuild-essentialcmake
flexgnuplotimagemagickinxilibboost-all-
devlibboost-system-devlibboost-thread-
devlibcanberra-gtk-modulelibcgal-dev
libncurses5-devlibopenmpi-devlibreadline-
devlibscotch-devlibxt-devopenmpi-bin
paraview-pythonpython-gdalpython-glade2
python-gtk2-devpython-gtkglext1python-
gtksourceview2python-matplotlibpython-
numpypython-pippython-psiutilpython-scipy
43
3.
Ðàçðàáîòêàñèñòåìûñáîðêèïàêåòà
ZephyToolsäëÿðàçâ¼ðòûâàíèÿñ
ïîìîùüþòåõíîëîãèèFlatpak
3.1.
Îáùàÿèíôîðìàöèÿ
ÏîñêîëüêóZephyToolsèñïîëüçóåòGTK+áûëîïðè-
íÿòîðåøåíèåèñïîëüçîâàòüñðåäóâûïîëíåíèÿGNOME.
[
12
]
Åñëèñðàâíèòüäàííóþñáîðêóñîñáîðêîéñðåäû
ðàçðàáîòêèMonoDevelop[
9
],îñíîâàííóþíàñðåäåâû-
ïîëíåíèÿfreedesktop[
12
],òîìîæíîïðåäïîëîæèòü,÷òî
èñïîëüçîâàíèåñðåäûâûïîëíåíèÿGNOMEïîçâîëèòèç-
áåæàòüóñòàíîâêèòàêîãîÏÎêàê:

dbus-glib
ñèñòåìàìåæïðîöåññíîãîîáìåíàñî-
îáùåíèÿìè,íàîñíîâåðàñøèðåííîéáèáëèîòåêè
ÿçûêàÑ.

atk
(AccessibilityToolkit),íàáîðèíòåðôåé-
ñîâ,ïîçâîëÿþùèéèñïîëüçîâàòüèíñòðóìåíòàðèé
GNOME,ñîçäàííûéäëÿïîìîùèîòîáðàæåíèÿèí-
ôîðìàöèèäëÿôèçè÷åñêèîãðàíè÷åííûõëþäåé.
45

pango
áèáëèîòåêàäëÿîòîáðàæåíèÿòåêñòàââû-
ñîêîìêà÷åñòâå.

gtk2
2-àÿâåðñèÿêðîññïëàòôîðìåííîéáèáëèîòå-
êèýëåìåíòîâãðàôè÷åñêîãîèíòåðôåéñà.

gvfs
âèðòóàëüíàÿôàéëîâàÿñèñòåìà,ðàáîòàþ-
ùàÿâíóòðèïåñî÷íèöû.
Íàìîìåíòíà÷àëàðàáîòûàêòóàëüíîéâåðñèåéñðå-
äûâûïîëíåíèÿGNOMEáûëà3.24.Êñîæàëåíèþ,2âåð-
ñèÿGTK+,íàîñíîâåêîòîðîéñòðîèòñÿîòîáðàæåíèåãðà-
ôè÷åñêîãîèíòåðôåéñàZephyTools,ÿâëÿåòñÿóñòàðåâàþ-
ùåé(â2011ãîäóâûøëàGTK+3,àâìàðòå2017ã.GTK+
3.90)[
13
]Ýòîìîæåòâûçûâàòüíåîáõîäèìîcòüóñòàíàâëè-
âàòüáîëååñòàðûåâåðñèèÏÎ,ïðèñóòñòâóþùåãîâñðåäå
âûïîëíåíèÿ.Âêà÷åñòâå
SDK
òàêæåáûëâûáðàíGNOME
3.24.ÏîñêîëüêóñáîðêàêîìïëåêòàFlatpakòàêæåïðîèñ-
õîäèòâïåñî÷íèöå,íåîáõîäèìàóñòàíîâêàèíñòðóìåíòîâ
ñáîðêèèêîìïèëÿöèè,îòñóòñòâóþùèõâ
SDK
.
46
3.1.1.
Ñðàâíåíèåçàâèñèìîñòåéñðåäûâûïîëíåíèÿè
ìåíåäæåðîâïàêåòîâ
Èíñòðóêöèÿïîóñòàíîâêåñîäåðæèòñïèñîêïàêåòîâ,
êîòîðûåíåîáõîäèìîóñòàíîâèòüêîìàíäîé
ðèñ.3.1.è3.2.)Ïîñëå÷åãîâåä¼òñÿïîèñêèñáîðêàçà-
âèñèìîñòåé.Äàííàÿïðîöåäóðàðåêóðñèâíîïîâòîðÿåòñÿ
äîìîìåíòàóñïåøíîéñáîðêèÏÎ,îïèñàííîãîâêà÷åñòâå
çàâèñèìîñòè
ZephyTools.
Ðèñ.3.1.:
ÎøèáêàçàâèñèìîñòèïðèóñòàíîâêåPython-ìîäóëÿ
Ðèñ.3.2.:
Îøèáêàçàâèñèìîñòèïðèóñòàíîâêåñïîìîùüþautotools
3.1.2.
Ìåòîäûñáîðêèìîäóëåéïîóìîë÷àíèþ
Áîëüøèíñòâîìîäóëåé-çàâèñèìîñòåéäëÿ
ZephyTOOLS,èìåþùèõíåïîääåðæèâàåìóþñèñòåìó
ñáîðêèÿâëÿþòñÿ,Python-ìîäóëÿìè.Âèñòî÷íèêèêòàêèì
48
ìîäóëÿìäîáàâëÿåòñÿMakefile,ïðèâåä¼ííûéíàëèñòèíãå
3.1,èóñòàíàâëèâàåòñÿïàðàìåòð
"no-autogen":true
1
all:
2
3
install:
4
Ëèñòèíã3.1:
ÑòàíäàðòíûéMakefileíåîáõîäèìûéäëÿ
óñòàíîâêèPython-ìîäóëÿ
Âí¼ìïðîèñõîäèòêîíôèãóðàöèÿñóêàçàíèåììåñòàóñòà-
íîâêèäèðåêòîðèè
/app
óñòàíîâêà.Ïðèìåðñòàíäàðò-
íîãîPython-ìîäóëÿïðèâåä¼ííàëèñòèíãå3.2.
1
{
2
"name"
:
"ipaddress"
,
3
"no-autogen"
:
true
,
4
"sources"
:
[
5
{
6
"type"
:
"git"
,
7
"url"
:
"git
:
//github.com/phihag/ipaddress"
8
}
,
9
{
10
"type"
:
"file"
,
11
"path"
:
"./makefiles/simplePy-Makefile"
,
12
"dest-filename"
:
"Makefile"
13
}
14
]
15
}
,
49
Ëèñòèíã3.2:
ÎïèñàíèåPython-ìîäóëÿipaddress
Âñëó÷àå,êîãäàñáîðêàâäèðåêòîðèèñèñõîäíûìêî-
äîìçàïðåùåíà,âîïèñàíèèìîäóëÿíåîáõîäèìîäîáàâèòü
ïàðàìåòð
"builddir":true
.
3.2.
Sphinx
Sphinx[
14
]èíñòðóìåíò,ïîçâîëÿþùèéñîçäàâàòü
òåêñòîâûåäîêóìåíòûèïðåîáðàçîâûâàòüèõâðàçëè÷íûå
ôîðìàòû.Äëÿðàáîòûýòîãîìîäóëÿ,òðåáóåòñÿóñòàíîâêà
ñëåäóþùèõ
çàâèñèìîñòåé
.

requestsáèáëèîòåêà,ïîçâîëÿþùàÿñîâåðøàòü
HTTP-çàïðîñû.[
15
]

imagesizeáèáëèîòåêà,îïðåäåëÿþùàÿðàçìåðôàé-
ëîâèçîáðàæåíèé,àíàëèçèðóÿèõçàãîëîâêè.[
16
]

alabasteròåìàîôîðìëåíèÿäëÿäîêóìåíòàöèè,ñî-
çäàííîéSphinx.[
17
]

babeláèáëèîòåêà,îáëåã÷àþùàÿèíòåðíàöèîíàëè-
çàöèþèëîêàëèçàöèþïðèëîæåíèéPython.[
18
]
50

pytzáèáëèîòåêà,ïîçâîëÿþùàÿïðåîáðàçîâûâàòü
âðåìÿîòíîñèòåëüíî÷àñîâîãîïîÿñà.[
19
]

snowballstemmeráèáèëèîòåêà,ïðåäîñòàâëÿþùàÿ
àëãîðèòìûÿçûêàäëÿòåêñòîâîéîáðàáîòêèSnowball
[
20
],èñïîëüçóåìûåäëÿâûäåëåíèÿîñíîâûñëîâ.
[
21
]

docutilsñèñòåìàîáðàáîòêèäîêóìåíòàöèè.[
22
]

pygmentsáèáëèîòåêà,ïðåäîñòàâëÿþùàÿâîçìîæ-
íîñòèïîäñâåòêèñèíòàêñèñà.[
23
]

Jinja2áèáëèîòåêà,ïîðîæäàþùàÿñòðàíèöó
HTMLíàîñíîâåøàáëîíà.[
24
]

MarkupSafeáèáëèîòåêà,äîáàâëÿþùàÿïîääåðæêó
äîïîëíèòåëüíîéêîäèðîâêèäëÿêîððåêòíîãîîòîá-
ðàæåíèÿHTML.[
25
]

sixáèáëèîòåêà,ïîçâîëÿþùàÿñîçäàâàòüÏÎ,ñïî-
ñîáíîåçàïóñêàòüñÿíàâåðñèÿõPython2è3.[
26
]
Ñõåìà
çàâèñèìîñòåé
èçîáðàæåíàíàðèñ.3.3.
51
Ðèñ.3.3.:
ÄèàãðàììàçàâèñèìîñòåéìîäóëÿSphinx
52
3.3.
Numpy,Scipy
3.3.1.
Îïèñàíèå
Numpyìîäóëü,ïðåäîñòàâëÿþùèéâîçìîæíîñòü
ïðîèçâîäèòüýôôåêòèâíûåîïåðàöèèíàäîäíîðîäíûìè
ìàññèâàìèäàííûõ.Scipyíàáîðñâîáîäíûõèíñòðó-
ìåíòîâäëÿíàó÷íîéðàáîòûèñïåöèàëüíûõâû÷èñëå-
íèé.Ïðèìåðèñïîëüçîâàíèÿ-ðåøåíèåäèôôåðåíöèàëü-
íûõóðàâíåíèé,èèíòåãðèðîâàíèå.Scipyñòðîèòñÿíàîñ-
íîâåNumpy,íîíåêîòîðûìïðîåêòàììîæåòáûòüäîñòà-
òî÷íîôóíêöèîíàëüíîñòèNumpy,ïîýòîéïðè÷èíåîíè
ðàçäåëåíû.[
27
]Ìîäóëè,óñòàíîâëåííûåäëÿóäâîëåòâî-
ðåíèÿ
çàâèñèìîñòåé
NumpyèScipy:[
28
]

cythonðàñøèðåíèåÿçûêàïðîãðàììèðîâàíèÿ
Python,óïðîùàþùååïðèâÿçêóìîäóëåé,íàïèñàí-
íûõíàC/C++,êPython.[
29
]

OpenBLASðåàëèçàöèÿ
API
,ïðåäîñòàâëÿþùåãî
äîñòóïêáàçîâûìîïåðàöèÿìëèíåéíîéàëãåáðû.
[
30
]
53

gfortranêîìïèëÿòîðêîëëåêöèèGCCäëÿÿçêà
Fortran,èñïîëüçóåìûéäëÿñáîðêèOpenBLAS.[
31
]
3.3.2.
Îñîáåííîñòèóñòàíîâêè
GNUFortranÿâëÿåòñÿ÷àñòüþGCC,ïîýòîìóåãî
óñòàíîâêàïðîèñõîäèòêàêóñòàíîâêàGCCñïåðåäà÷åé
îïðåäåë¼ííîãîïàðàìåòðà.ÄëÿñáîðêèGCCòðåáóåòñÿ
ñëåäóþùèåäîïîëíèòåëüíûåáèáëèîòåêè:

GMP(GNUMulti-PrecisionLibrary)áèáëèîòå-
êàäëÿðàáîòûñ÷èñëàìè,ïîääåðæèâàþùàÿïðîèç-
âîëüíóþòî÷íîñòü.

MPFR(GNUMultiplePrecisionFloating-Point
Reliably)GMPäëÿ÷èñåëñïëàâàþùåéçàïÿòîé.

MPCáèáëèîòåêà,ïîääåðæèâàþùàÿïðîèçâîëü-
íóþòî÷íîñòüäëÿêîìïëåêñíûõ÷èñåë.
Îäíàêîâìåñòîóñòàíîâêèäàííûõáèáëèî-
òåêâñèñòåìó,ìîæíîâîñïîëüçîâàòüñÿñöåíàðèåì
./contrib/download_prerequisites
,[
32
]êîòîðûé
ñêà÷èâàåòèðàñïàêîâûâàåòèõâäèðåêòîðèþ,ãäåáó-
äåòïðîâîäèòüñÿñáîðêà.Ïîñêîëüêóñáîðêàêîìïëåêòà
54
Flatpakïðîèñõîäèòâïåñî÷íèöåñâûêëþ÷åííûìäî-
ñòóïîìêñåòè,áûëñîçäàíàðõèâñóæåñêà÷åííûìè
áèáëèîòåêàìè.Äëÿóñòàíîâêègfortranâîâðåìÿêîíôè-
ãóðàöèèíåîáõîäèìîóñòàíîâèòüïàðàìåòðêîíôèãóðàöèè
enable-languages=fortran
.Ñáîðêàïðîèñõîäèò
íàñèñòåìåñ64-áèòíîéàðõèòåêòóðîé,òîãäàêàêgcc
ïðîèçâîäèòñáîðêóèäëÿ32-áèòíîé.Cáîðêàáèáëèîòåê
îáåèõâåðñèéíåâîçìîæíà,ïîñêîëüêóíèçêîóðîâíå-
âûåáèáëèîòèåêè64-áèòíûå.Äëÿóñòàíîâêèòîëüêî
64-áèòíîéâåðñèèGCCíåîáõîäèìîóêàçàòüïàðàìåòð
êîíôèãóðàöèè
disable-multilib
.Âàæíîåïîñëåä-
ñòâèåäàííîãîèçìåíåíèÿóñòàíîâêàáèáëèîòåêâ
äèðåêòîðèþ
%prefix%/lib64/
.Ïåðåìåííàÿîêðóæåíèÿ
LD_LIBRARY_PATH
,óêàçûâàþùàÿíàìåñòîïîëîæåíèå
áèáëèîòåêäëÿêîìïîíîâêèðàçëè÷íûõìîäóëåéïðî-
ãðàìì,óêàçûâàåòòîëüêîíà
%prefix%/lib/
[
33
]ýòî
ïðèâîäèòêâîçìîæíîñòèêîìïèëÿöèèñèñïîëüçîâàíèåì
gfortran(âåäüäàííûéèñïîëíÿåìûéôàéëóñïåøíî
íàõîäèòñÿñèñòåìîéâäèðåêòîðèè
%prefix%/bin/
),
íîîøèáêàìïðèêîìïîíîâêå,ïîñêîëüêóêîìïîíîâùèê
íåìîæåòíàéòèìîäóëèáèáëèîòåêFortran.Äëÿèñ-
55
ïðàâëåíèÿäàííîéïðîáëåìûâçàãîëîâîêìàíèôåñòà
áûëîäîáàâëåíîîïèñàíèåñáîðêèñïðàâèëüíîéâåðñèåé
LD_LIBRARY_PATH
(ëèñòèíã3.3.)
1
"build-options"
:
{
2
"env"
:
{
3
"LD_LIBRARY_PATH"
:
"/app/lib/
:
/app/lib
6
4
"
4
}
5
}
,
Ëèñòèíã3.3:
ïàðàìåòðûäåéñòâóþùèåâîâðåìÿñáîðêèâñåõ
ìîäóëåé
ÊîìàíäàóñòàíîâêèNumpyñîäåðæèòäîïîëíèòåëü-
íûåïàðàìåòðûñáîðêè:
1
[openblas]
2
libraries=openblas
3
library_dirs=/app/opt/OpenBLAS/lib
4
include_dirs=/app/opt/OpenBLAS/include
5
runtime_library_dirs=/app/opt/OpenBLAS/lib
56
Ëèñòèíã3.4:
ÏàðàìåòðûèñïîëüçóåìûåïðèñáîðêåNumpy
ÏðèóñòàíîâêåScipyíåíóæíîóêàçûâàòüïðèâÿçêó
êáèáëèîòåêàìëèíåéíîéàëãåáðû,ïîñêîëüêóáóäóòèñ-
ïîëüçîâàíûòåæåíàñòðîéêè,÷òîèóNumpy.[
28
]Âîâðå-
ìÿóñòàíîâêèScipyáûëàâñòðå÷åíàîøèáêàêîìïîíîâêè,
ïðèâåä¼ííàÿíàëèñòèíãå3.5.
1
/lib/crt1.o:In
function
`\_start':
2
/srv/sdkbuilder/work/build/x86\_64/freedesktop-sdk-base
-1-4/build/x86\_64/tmp-glibc/work/x86\_64-unknown-
linux/glibc/2.22-r0/git/csu/../sysdeps/x86\_64/start.
S:114:undefinedreferenceto`main'
3
Ëèñòèíã3.5:
Îøèáêàêîìïîíîâêèâîçíèêøàÿïðèñáîðêå
Scipy
Èñïðàâëåíèåäàííîéîøèáêèïðîèçâîäèòñÿóñòà-
íîâêîé
ïåðåìåííîéîêðóæåíèÿ
LDFLAGS
â
-shared
[
34
].
Óñòàíîâêàäàííîãîïàðàìåòðàóêàçûâàåòñÿâîïèñàíèè
ìîäóëÿ,îïèñàííîãîíàëèñòèíãå3.6.
1
"build-options"
:
{
2
"env"
:
{
57
3
"LD_LIBRARY_PATH"
:
"/app/lib/
:
/app/lib
6
4
"
,
4
"LDFLAGS"
:
"-shared"
5
}
}
,
Ëèñòèíã3.6:
Íàñòðîéêàïåðåìåííûõîêðóæåíèÿäëÿìîäóëÿ
Scipy
Äèàãðàììà
çàâèñèìîñòåé
èçîáðàæåíàíàÐèñ.3.4.
Ðèñ.3.4.:
Äèàãðàììàçàâèñèìîñòåéscipyènumpy
58
3.4.
Python,GTK+èOpenGL
3.4.1.
Îïèñàíèå
GTK+[
35
]íàáîðáèáëèîòåêäëÿñîçäàíèÿãðàôè-
÷åñêîãîèíòåðôåéñà,íàîñíîâåêîòîðîãîñîçäà¼òñÿèíòåð-
ôåéñZephyTools.Äëÿèñïîëüçîâàíèÿäàííîéáèáëèîòåêè
âÿçûêåïðîãðàììèðîâàíèÿPythoníåîáõîäèìàóñòàíîâêà
íåñêîëüêèõìîäóëåé-ïðèâÿçîê.Âèíñòðóêöèè,ïðåäîñòàâ-
ëåííîéäëÿóñòàíîâêè,óêàçàíîòðèïàêåòà

python-gtksourceview2Python-ïðèâÿçêàäëÿ
GtkSourceView.

python-gtk2-devPython-ïðèâÿçêàäëÿýëåìåíòîâ
ãðàôè÷åñêîãîèíòåðôåéñàGtk.

python-gtkglext1Python-ïðèâÿçêàäëÿðàáîòûñ
OpenGLâGtk.
GtkSourceViewÿâëÿåòñÿðàñøèðåíèåìäëÿòåêñòî-
âûõôóíêöèéGTK+,äîáàâëÿþùàÿïîäñâåòêóñèíòàêñèñà.
GtkGlExtðàñøèðåíèåäëÿGTK+,ïîçâîëÿþùååîáðàáà-
òûâàòü2D-è3D-ãðàôèêóñïîìîùüþáèáëèîòåê,ïîä-
59
äåðæèâàþùèõñïåöèôèêàöèþAPIOpenGL.Äëÿðàáîòû
cGTK+áûëèóñòàíîâëåíûñëåäóþùèåìîäóëè:

gtksourceviewìîäóëü,ðàñøèðÿþùèéòåêñòîâûå
ôóíêöèèGtk[
36
];

gladeèíñòðóìåíòäëÿãðàôè÷åñêîãîïðîåêòèðîâà-
íèÿèíòåðôåéñîâïîëüçîâàòåëÿ[
37
];

pycairoñðåäàâûïîëíåíèÿñîäåðæèòâñåáåáèá-
ëèîòåêóäëÿîòðèñîâêèâåêòîðíîéãðàôèêècairo,îä-
íàêîäëÿðàáîòûñäàííîéáèáëèîòåêîéíåîáõîäèìî
óñòàíîâèòüìîäóëü-ïðèâÿçêóäëÿÿçûêàPython[
38
];

pygobjectìîäóëü-ïðèâÿçêàêGObject,êêîäó,íà-
ïèñàííîìóïîñîãëàøåíèÿìGObjectC[
39
];

GLUáèáëèîòåêàèíñòðóìåíòàðèÿOpenGL,ðåà-
ëèçîâàííîãîïðîåêòîìMesa[
40
];

pangoxïîääåðæêàpangoâãðàôè÷åñêîìñåðâåðå
X[
41
];

gtkglextïîääåðæêàîòðèñîâêèOpenGL-ãðàôèêèâ
GTK+[
42
];
60

pygtk,pygtksourceview,pyopengl,pygtkglex1
ìîäóëè-ïðèâÿçêèêGTK+èGTKSourceView,
OpenGL,GTKGlExtñîîòâåòñòâåííî[
42

44
];
3.4.2.
Îñîáåííîñòèóñòàíîâêè
ÏîñêîëüêóZephyToolsèñïîëüçóåòPython2.5,áû-
ëàóñòàíîâëåíàïðèâÿçêàêCairoèìåííîäëÿýòîéâåð-
ñèè.ÎäíàêîïðèïîïûòêåóñòàíîâèòüPyGObject3âåðñèè
âîçíèêàëàîøèáêà
çàâèñèìîñòè
,ïðèâåä¼ííàÿíàëèñòèíãå
3.7.
1
checking
for
CAIRO...yes
2
checking
for
PYCAIRO...no
3
configure:error:Packagerequirements(py3cairo�=1.11.1
4
5
Requested'py3cairo�=1.11.1'butversionofPycairois
1.10.0
Ëèñòèíã3.7:
îøèáêàçàâèñèìîñòèïðèóñòàíîâêåPyGObject
Äàííàÿîøèáêà,íàâîäèòíàìûñëü,÷òîäëÿPython2
íåîáõîäèìîóñòàíàâëèâàòüPyGObject2,îäíàêîâîâðåìÿ
óñòàíîâêèâîçíèêàëàîøèáêàêîìïèëÿöèè,ïðèâåä¼ííàÿ
íàëèñòèíãå3.8.
61
1
pygi-info.c:In
function
`'pygi_g_struct_info_is_simple:
2
pygi-info.c:744:26:error:`'GI_INFO_TYPE_ERROR_DOMAIN
undeclared(firstuse
in
this
function
)
3
case
GI_INFO_TYPE_ERROR_DOMAIN:
Ëèñòèíã3.8:
îøèáêàçàâèñèìîñòèïðèóñòàíîâêåPyGObject
Äàííûåîøèáêèïîÿâëÿëèñüïðèêîìïèëÿöèèâñåõ
èñõîäíûõêîäîâ,ñêà÷àííûõñîôèöèàëüíîãîõðàíèëè-
ùà.Îäíàêî,áûëîíàéäåíîõðàíèëèùåGit
debian-
pygobject
,[
45
]ñîäåðæàùååèñõîäíûéêîääàííîãîÏÎ,
èçìåí¼ííûéäëÿñîâìåñòèìîñòèñäèñòðèáóòèâîìDebian.
Ñáîðêàäàííûõèñõîäíûõêîäîâïðîøëàóñïåøíî.
ÏðèêîíôèãóðàöèèPyGtkGlExtâûâîäèëàñüîøèáêà
configure:error:GtkGLExtnotfound
,õîòÿìî-
äóëüGtkGlExtïðèñóòñòâîâàëâñèñòåìå.Ïîïûòêèìåíÿòü
âåðñèèýòèõìîäóëåéíåïðèâîäèëèêóñïåõó.Âîçìîæíî,
ïðîáëåìàâòîì,÷òîñàìàÿñâåæàÿâåðñèÿèñõîäíûõêîäîâ
äîñòóïíàÿíàîôèöèàëüíîìñàéòåäàòèðóåòñÿ2006ãîäîì,
òîãäàêàêñðåäàâûïîëíåíèÿîáëàäàåòáèáëèîòåêàìè,àê-
òóàëüíûìèíà2016ãîä.ÍîåñëèäàííîåÏÎäîñòóïíî
äëÿóñòàíîâêèñïîìîùüþìåíåäæåðàïàêåòîâ,ýòîìîæåò
62
îçíà÷àòü,÷òîïàêåòûäàííîãîÏÎ,èñïîëüçóþùèåñÿìåíå-
äæåðàìèïàêåòîâ,èçìåíåíûäëÿñîâìåñòèìîñòèññîâðå-
ìåííûìèäèñòðèáóòèâàìè.Ïîýòîìóáûëèñêà÷åíûèñõîä-
íèêèèçõðàíèëèùàäèñòðèáóòèâàDebianèèñïîëüçîâàíû
êàêëîêàëüíûåàðõèâû.Èñïîëüçîâàíèåäàííûõèñõîäíè-
êîâïîçâîëèëîóñòàíîâèòüîáàìîäóëÿ.
Äèàãðàììàçàâèñèìîñòèèçîáðàæåíàíàðèñ.3.5.
Ðèñ.3.5.:
Äèàãðàììàçàâèñèìîñòåéìîäóëåé,èñïîëüçóþùèõñÿäëÿ
ðàáîòûñGtk
63
3.5.
Webkit
3.5.1.
Îïèñàíèå
WebkitÏÎ,íåîáõîäèìîåäëÿîòðèñîâêèñòðàíèö
HTML.Âåá-ñòðàíèöàïðåäñòàâëÿåòèçñåáÿìíîæåñòâî
ñâÿçàííûõôàéëîâ,ñîäåðæàùèõêàêðàçìåòêóòåêñòàâ
ôàéëàõ
html
,òàêèèíôîðìàöèþîôîðìàòèðîâàíèèñòðà-
íèöûâôàéëàõ
css
,òàêæåíàñòðàíèöàõìîæåòïðèñóò-
ñòâîâàòüêîä,íàïèñàííûéíà
ÿçûêåïðîãðàììèðîâàíèÿ
(ßÏ)
JavaScript,èíòåðïðåòàöèÿêîòîðîãîòàêæåâåä¼òñÿ
ñïîìîùüþWebkit.
3.5.2.
Îñîáåííîñòèóñòàíîâêè
ZephyToolsèñïîëüçóåòWebkitGTK+[
46
],êîòîðûé
èíòåãðèðîâàíñãðàôè÷åñêèìèèíòåðôåéñàìèGTK+.Â
2010ãîäóïðîèçîøëîãëîáàëüíîåîáíîâëåíèåWebkit,â
õîäåêîòîðîãîáûëèçìåí¼íAPIðàáîòûñäàííûìïðî-
åêòîì,àïðîåêòWebkitGtkñìîãïåðåõîäèòüíàïîääåðæ-
êóGTK+3.Òàêèìîáðàçîìèñõîäíûéêîäíà÷àëñîäåð-
æàòüêàêñòàðóþâåðñèþWebkit,òàêèíîâóþWebkit2,
64
âåäüíåâñåïðîåêòûïåðåøëèíàWebkit2.Îäíàêîñâû-
õîäîìWebkitGTK+2.5.1áûëïðîèçâåä¼íïåðåõîäíàñè-
ñòåìóñáîðêèCmakeèîêîí÷àòåëüíîóäàëåíàñáîðêàïåð-
âîéâåðñèèWebkit.[
47
]ÏîñêîëüêóZephyToolsèñïîëüçó-
åòGTK+2íåîáõîäèìîóñòàíàâëèâàòüWebkit.Äëÿóñòà-
íîâêèáûëàâûáðàíàïîñëåäíÿÿâåðñèÿ,îñíîâàííàÿíàñè-
ñòåìåñáîðêèAutotools.Îïèñàíèåìîäóëÿèçîáðàæåíîíà
ëèñòèíãå3.9.
1
{
"name"
:
"WebKitGtk"
,
2
"disabled"
:
true
,
3
"config-opts"
:
[
"--prefix=/app"
,
4
"--with-gtk=
2
.
0
"
,
5
"--enable-webkit
2
=no"
,
6
"--enable-gtk-doc-html=no"
,
7
"--enable-geolocation=no"
]
,
8
"sources"
:
[
9
{
"type"
:
"archive"
,
10
"path"
:
"source/webkitgtk-
2
.
4
.
1
0
.tar.gz"
}
]
11
}
,
Ëèñòèíã3.9:
îïèñàíèåìîäóëÿWebkitGtK
Ïðèêîíôèãóðàöèèóñòàíàâëèâàþòñÿñëåäóþùèå
ïàðàìåòðû:

cáîðêàïîäGTK+2.
65

íåñîáèðàòüwebkit2.

íåñîçäàâàòüäîêóìåíòàöèþ.

îòêëþ÷èòüñèñòåìóãåîëîêàöèè.
Ïðèñáîðêåäàííîãîìîäóëÿáûëàïîëó÷åíàîøèáêà,
ïðèâåä¼ííàÿíàëèñòèíãå3.10.
1
Source/WebCore/platform/gtk/GtkClickCounter.cpp:89:62:
error:callofoverloaded`abs(gdouble)'isambiguous
2
&&�(abs(buttonEvent-y-m_previousClickPoint
.y())doubleClickDistance)
Ëèñòèíã3.10:
îøèáêàçàâèñèìîñòèïðèóñòàíîâêåPyGObject
Äàííàÿîøèáêàñâÿçàíàñîïðåäåëåíèììåòîäà
abs
,
ïîñêîëüêóêîìïèëÿòîðíåçíàåòêàêîéòèïäîëæåíáûòüó
âîçâðàùàåìîãîçíà÷åíèÿ.Äàííàÿïðîáëåìàðåøåíàââå-
äåíèåìâñòàíäàðòÑ++11ìåòîäà
fabs
,âñåãäàâîçâðàùà-
þùèìçíà÷åíèåòèïà
double
.Âðåçóëüòàòåáûëñîçäàí
ñîáñòâåííûéàðõèâñèçìåí¼ííûìèñõîäíûìêîäîì.Èç-
ìåíåíèÿèçîáðàæåíûíàëèñòèíãå3.11.
1
||�((abs(buttonEvent-x-m_previousClickPoint.x()
)doubleClickDistance)
2
-&&�(abs(buttonEvent-y-m_previousClickPoint
.y())doubleClickDistance)
66
3
+||�((fabs(buttonEvent-x-m_previousClickPoint.x
())doubleClickDistance)
4
+&&�(fabs(buttonEvent-y-
m_previousClickPoint.y())doubleClickDistance)
5
6
-intseconds=&#xint0;static_castint(abs(time));
7
+intseconds=&#xint0;static_castint(fabs(time));
Ëèñòèíã3.11:
ðåçóëüòàòñðàâíåíèÿîðèãèíàëüíîéäèðåêòîðèè
ñèçìåí¼ííîé
3.6.
Matplotlib
Matplotlibÿâëÿåòñÿáèáëèîòåêîéíà
ßÏ
Python,ñî-
çäàííîéäëÿâèçóàëèçàöèèíàó÷íûõäàííûõ.Óñòàíîâêà
Matplotlibïîòðåáîâàëàóñòàíîâêèñëåäóþùèõäîïîëíè-
òåëüíûõìîäóëåé:


PillowPython-ìîäóëüäëÿðàáîòûñðàñòðîâîéãðà-
ôèêîé[
52
];

ImageMagickíàáîðÏÎäëÿðàáîòûñôàéëàìè
ìíîæåñòâàãðàôè÷åñêèõôîðìàòîâ[
53
];

dateutilPython-ìîäóëü,ðàñøèðÿþùèéâîçìîæíî-
ñòèðàáîòûñäàòîéèâðåìåíåì[
54
];

subprocess32,functool32
ïåðåíåñ¼ííûåíàçàä
ìî-
äóëèèçPython3,èñïîëüçóåìûåäëÿðàáîòûñ
ïðîöåññàìèèôóíêöèîíàëüíîãîïðîãðàììèðîâàíèÿ
[
55
,
56
];

cyclerPython-ìîäóëü,ïîìîãàþùèéMatplotlibðà-
áîòàòüñîñòèëÿìèñîçäàíèÿãðàôèêîâ[
57
];

ffmpegáèáëèîòåêàäëÿðàáîòûñìóëüòèìåäèà-
äàííûìè[
58
];

libaváèáëèîòåêàäëÿêîäèðîâàíèÿàóäèîäàííûõ
[
59
];

six,pytz,Numpy,pygtkñì.âûøå.
Äèàãðàììà
çàâèñèìîñòåé
MatplotlibïðèâåäåíàíàÐèñ
3.6.
68
Ðèñ.3.6.:
ÄèàãðàììàçàâèñèìîñòåéìîäóëåéMatplotlib
69
Åäèíñòâåííàÿñëîæíîñòüâóñòàíîâêåäàííîãîìîäó-
ëÿáîëüøîåêîëè÷åñòâî
çàâèñèìîñòåé
,íåâñåèçêîòî-
ðûõÿâëÿþòñÿíåîáõîäèìûìè,èç-çà÷åãîïðèõîäèòñÿêîí-
òðîëèðîâàòüïîðÿäîêñáîðêè.
3.7.
OpenFOAM
3.7.1.
Îïèñàíèå
OpenFOAMOpenSourceFieldOperationAnd
ManipulationComputationalFluidDynamicsToolBox.Ñâî-
áîäíîðàñïðîñòðàíÿåìûéèíñòðóìåíòàðèé,èñïîëüçóå-
ìûéäëÿìîäåëèðîâàíèÿïîâåäåíèÿìíîæåñòâàôèçè÷å-
ñêèõïðîöåññîâ.ÇàâèñèìîñòèOpenFOAMòåñíîñíèì
ñâÿçàíûèïîñòàâëÿþòñÿâìåñòåñíèìââèäåàðõèâà
ThirdParty-4.x-version-4.0.tar.gz
,àèíñòðóêöèÿ
ïîóñòàíîâêåâêëþ÷àåòâñåáÿèóñòàíîâêó
çàâèñèìîñòåé
,
â÷èñëîêîòîðûõâõîäèò:[
?
]

FLEXfastlexicalanalyser,èñïîëüçóåòñÿäëÿëåê-
ñè÷åñêîãîàíàëèçàñòîðîííèõïðèëîæåíèé[
60
];
70

help2manïðîãðàììàäëÿàâòîìàòè÷åñêîãîïîðîæ-
äåíèÿñòðàíèöMAN,íåîáõîäèìàäëÿóñòàíîâêè
FLEX[
61
];

OpenMPIîòêðûòàÿðåàëèçàöèÿèíòåðôåéñàïåðå-
äà÷èñîîáùåíèé,èñïîëüçóåìàÿäëÿðàñïðåäåë¼ííî-
ãîïðîãðàììèðîâàíèÿ[
62
];

Scotch/PT-Scotchèíñòðóìåíòäëÿýôôåêòèâíîé
ðàáîòûñãðàôàìè[
63
];

CGALáèáëèîòåêà,ñîäåðæàùàÿâñåáåýôôåêòèâ-
íûåèíàä¼æíûåàëãîðèòìûâû÷èñëèòåëüíîéãåî-
ìåòðèè[
64
];

boostèçâåñòíûéíàáîðáèáëèîòåêäëÿ
ßÏ
Ñ++,
íåîáõîäèìûéäëÿêîìïèëÿöèèCGAL[
65
];

MPFRíåîáõîäèì,äëÿêîìïèëÿöèèCGAL;

Qt5èíñòðóìåíòàðèéäëÿðàçðàáîòêèÏÎíà
ßÏ
Ñ++[
66
];

ParaViewïàêåòäëÿâèçóàëèçàöèèïðîöåññîâ,ìî-
äåëèðóþùèõñÿñïîìîùüþOpenFOAM[
67
];
71
3.7.2.
Îñîáåííîñòèóñòàíîâêè
OpenFOAMñîñòîèòèçìíîæåñòâàïîäïðîãðàìì,
êàæäàÿèçêîòîðûõèìååòñâî¼îïèñàíèåäëÿñèñòåìû
ñáîðêè(êàêïðàâèëîCmake).Äëëÿóïðîùåíèÿóñòàíîâ-
êèâàðõèâñèñõîäíûìêîäîìäîáàâëåííàáîðñöåíàðèåâ
¾wmake¿,êîòîðûéèíòåãðèðóåòñÿâêîììàíäíóþîáîëî÷-
êóèàâòîìàòè÷åñêèïðîèçâîäèòìíîãèåäåéñòâèÿ,íåîáõî-
äèìûåäëÿóñòàíîâêè.Ñïîìîùüþäàííîãîíàáîðàñöåíà-
ðèåâîïðåäåëÿþòñÿìíîãèå
ïåðåìåííûåîêðóæåíèÿ
,äè-
ðåêòîðèÿ,âêîòîðîéáóäåòóñòàíîâëåíOpenFOAM,ïðî-
èñõîäèòçàïóñêñáîðêèâñåõïîäïðîãðàìì,âõîäÿùèõâ
OpenFOAM.Åñòåñòâåííî,äàííûé¾èíñòðóìåíòñáîðêè¿,
íåïîääåðæèâàåòñÿñïîìîùüþflatpak-builder.Makefile,
îïèñûâàþùèéñáîðêó,ïðèâåä¼ííàëèñòèíãå3.12.
1
all:
2
mkdir-p/app/opt/OpenFOAM/OpenFOAM-4.0
3
mkdir/app/opt/OpenFOAM/ThirdParty-4.0
4
cp-rf./OpenFOAM/*/app/opt/OpenFOAM/OpenFOAM-4.0/
5
cp-rf./ThirdParty/*/app/opt/OpenFOAM/ThirdParty-4.0/
6
cd
/app/opt/OpenFOAM;\
7
8
cd
/app/opt/OpenFOAM/ThirdParty-4.0;\
9
./makeParaView;\
72
10
wmRefresh;\
11
cd
/app/opt/OpenFOAM/OpenFOAM-4.0/;\
12
./Allwmake-j
13
install:
Ëèñòèíã3.12:
ðåçóëüòàòñðàâíåíèÿîðèãèíàëüíîéäèðåêòîðèè
ñèçìåí¼ííîé
Ñîãëàñíîèíñòðóêöèèïîñáîðêå[
68
]íåîáõîäèìî
ðàñïàêîâàòüàðõèâûâäèðåêòîðèþ,âêîòîðîéáóäåòóñòà-
íîâëåíOpenFOAM.Íàçâàíèÿäèðåêòîðèéäîëæíûèìåòü
îêîí÷àíèåââèäåâåðíîéâåðñèèÏÎ,âíàøåìñëó÷àå4.0.
Äàëååíåîáõîäèìîèíòåãðèðîâàòüwmakeâêîììàíäíóþ
îáîëî÷êó.Äëÿýòîãîèçäèðåêòîðèè,âêîòîðîéáóäåòóñòà-
íîâëåíOpenFOAM,íåîáõîäèìîâûçâàòüêîìàíäósource
(äëÿå¼âûçîâàíåîáõîäèìîïðîñòîíàïèñàòü¾.¿),óêàçàâ
åéìåñòîïîëîæåíèåôàéëà
bashrc
.Äàííàÿêîìàíäàâû-
ïîëíèòèíñòðóêöèèâòåêóùåéêîìàíäíîéîáîëî÷êå.Ïî-
ñëå÷åãîïðîèñõîäèòçàïóñêóñòàíîâêèñòîðîííèõïðèëî-
æåíèéèñàìîãîOpenFOAM.
ÂîïèñàíèèíåîáõîäèìîãîÏÎäëÿñáîðêèòðåáóåòñÿ
Qt¾âåðñèè4.8èëèâûøå¿,ïîýòîéïðè÷èíåáûëóñòàíîâ-
ëåíàïîñëåäíÿÿäîñòóïíàÿâåðñèÿQt5.8.Êñîæàëåíèþ,
73
ïðèêîíôèãóðàöèèñáîðêèParaViewïðîèñõîäèëàîøèá-
êà,ïðèâåä¼ííàÿíàëèñòèíãå3.13.
1
CMakeErrorat/usr/share/cmake-3.3/Modules/FindQt4.cmake
:1327(message):
2
FoundunsuitableQtversion"5.8.0"from/app/bin/qmake,
thiscoderequiresQt4.x
Ëèñòèíã3.13:
îøèáêàêîíôèãóðàöèèParaView
Èçó÷åíèåCMake-ôàéëîâParaView,ïîêà-
çàëî,÷òîäëÿñáîðêèìîæåòáûòüèñïîëüçîâà-
íàQt5.x.ÄëÿóêàçàíèÿñáîðêèñïîìîùüþQt
5áûëèçìåí¼íôàéë
ThirdParty/ParaView-
5.0.1/CMake/ParaViewQtVersion.cmake
(ñì.ëè-
ñòèíã3.14)
1
version")
2
version")
Ëèñòèíã3.14:
èçìåíåíèÿâíåñ¼ííûåâôàéë
ParaViewQtVersion.cmake
ÏðèñáîðêåCGALïðîèçîøëàîøèáêàïîèñêàáèá-
ëèîòåêèboost.Èíñòðóêöèèñáîðêèïîääåðæèâàþòâîç-
74
ìîæíîñòüóñòàíîâêèîòäåëüíîñêà÷åííûõèñõîäíûõêî-
äîâ.Äëÿäàííîãîòèïàóñòàíîâêèíåîáõîäèìîñêà÷àòü
èïîìåñòèòüèñõîäíûéêîäCGALâåðñèè4.8âäèðåê-
òîðèþ
ThirdParty/CGDAL-4.8.
,ïîñëå÷åãîðàñêîì-
ìåíòèðîâàòüñòðî÷êó
cgal_version=CGAL-4.8
âôàéëå
1
-boostInc="/usr/include"
2
+boostInc="/app/include"
3
4
5
#64-bitneedslib64,but32-bitneedslib(notlib32
)
6
if
["$WM_ARCH_OPTION"=64]
7
then
8
-boostLib="/usr/lib$WM_ARCH_OPTION"
9
+boostLib="/app/lib$WM_ARCH_OPTION"
10
else
11
-boostLib="/usr/lib"
12
+boostLib="/app/lib"
13
fi
Ëèñòèíã3.15:
èçìåíåíèÿâíåñ¼ííûåâôàéëmakeParaView
75
Äàííûåèçìåíåíèÿìåíÿþòäèðåêòîðèþ,âêîòîðîé
CGALáóäåòèñêàòüáèáëèîòåêèèçàãîëîâî÷íûåôàéëû
boost.
ÏåðåõîäíàQt5âûçâàëïðîáëåìûïðèóñòàíîâêå
ñàìîãîOpenFOAMâCMake-êîíôèãóðàöèÿõåãîìîäó-
ëÿïðèñóòñòâóåòìàêðîñ
QT4_WRAP_CPP
.Äëÿêîððåêòíîé
ñáîðêèñïîìîùüþQt5äàííûéìàêðîñáûëèçìåí¼ííà
qt5_wrap_cpp
âôàéëàõ
OpenFOAM/applications
/utilities/postProcessing/graphics
/PVReaders/PVFoamReader/PVFoamReader
/CMakeLists.txt
,
OpenFOAM/applications
/utilities/postProcessing/graphics
/PVReaders/PVFoamReader/PVFoamReader
/CMakeLists.txt
.Äèàãðàììà
çàâèñèìîñòåé
OpenFOAMèçîáðàæåíàíàðèñ3.7.
76
Ðèñ.3.7.:
ÄèàãðàììàçàâèñèìîñòåéìîäóëåéOpenFoam
3.8.
Boto
BotoPython-ìîäóëü,ïðåäîñòàâëÿþùèéâîçìîæ-
íîñòüðàáîòàòüñ
AWS
.
77
Ñïèñîêåãî
çàâèñèìîñòåé
:

s3transferPython-ìîäóëü,óïðàâëÿþùèéïåðåäà-
÷åéäàííûõèçîáëà÷íîãîõðàíèëèùàAmazon[
69
];

futures
ïåðåíîñíàçàä
ïàêåòàäëÿïàðàëëåëüíîãî
ïðîãðàììèðîâàíèÿèçPython3.2[
70
];

botocoreèíòåðôåéñíèçêîãîóðîâíÿäëÿðàáîòûñ
AWS
[
71
];

jmespathèíñòðóìåíò,äëÿèçâëå÷åíèÿäàííûõèç
ôàéëîâ
JSON
[
72
];

docutils,dateutils,sixñì.âûøå.
Äèàãðàììà
çàâèñèìîñòåé
èçîáðàæåíàíàðèñ3.8.
Ðèñ.3.8.:
Äèàãðàììàçàâèñèìîñòåéìîäóëåéboto
78
3.9.
pySFTP
pySFTPÿâëÿåòñÿPython-ìîäóëåì,ïðåäíàçíà÷åíûì
äëÿðàáîòûñäàííûìèïîïðîòîêîëóSFTPâ
ßÏ
Python.
Ñïèñîê
çàâèñèìîñòåé
:

paramikoðàáîòàñïðîòîêîëîìSSH[
73
];

pyasn1,asn1cryptoðàáîòàñÿçûêîìäëÿîïèñàíèÿ
àáñòðàêòíîãîñèòàêñèñàäàííûõ[
74
,
75
];

cryptographyìîäóëü,ïðåäîñòàâëÿþùèéìíîæå-
ñòâîøàáëîíîâäëÿïåðåäà÷èçàøèôðîâàííûõäàí-
íûõ[
76
];

cffiïîääåðæêàâûçîâàêîäà,íàïèñàííîãîíà
ßÏ
Ñ,èçPython[
77
];

ipaddressìîäóëü,äëÿðàáîòûñIP-àäðåñàìè[
78
];

enum34
ïåðåíîñíàçàä
ìîäóëÿïåðå÷åñëåíèéèç
Python3.4[
79
];

packagingîñíîâíûåóòèëèòûäëÿðàáîòûñ
Python-ïàêåòàìèäëÿìåíåäæåðàïàêåòîâpip[
80
];

idnaïîääåðæêàäîìåííûõèì¼í,ñîäåðæàùèõ
ñèìâîëûíàöèîíàëüíûõàëôàâèòîâ[
81
];
79

pyparsingñèíòàêñè÷åñêèéàíàëèç,ïðåäñòàâëåíèå
òåêñòàââèäåîïðåäåë¼ííîéñòðóêòóðûäàííûõ[
82
];

sixñì.âûøå.
Äèàãðàììà
çàâèñèìîñòåé
äëÿìîäóëÿpySFTPèçîáðàæåíà
íàðèñ3.9.
80
Ðèñ.3.9.:
ÄèàãðàììàçàâèñèìîñòåéìîäóëåépySFTP
3.10.
ÏÎ,çàâèñèìîñòèêîòîðûõïîëíîñòüþóäâîëåòâî-
ðÿþòñÿñðåäîéâûïîëíåíèÿGNOME3.24

psutiláèáëèîòåêà,ïîçâîëÿþùàÿïîëó÷àòüèíôîð-
ìàöèþîñèñòåìå[
83
];

GDAL�-PyGDALáèáëèîòåêàäëÿðàáîòûñãåî-
ïðîñòðàíñòâåííûìèäàííûìèèPython-ïðèâÿçêàê
íåé[
84
];
81

GEOSáèáëèîòåêàC++äëÿðàáîòûñãåîìåòðè÷å-
ñêèìèîáúåêòàìè[
85
];

ShapelyPython-áèáëèîòåêàäëÿîáðàáîòêèèàíà-
ëèçàãåîìåòðè÷åñêèõîáúåêòîâíàïëîñêîñòè,ðàáî-
òàþùàÿíàîñíîâåGEOS[
86
];

3.11.
ZephyTools
ÄèàãðàììàçàâèñèìîñòåéZephyToolsèçîáðàæåíàâ
ïðèëîæåíèè2.
ÂîâðåìÿñîçäàíèÿêîìïëåêòàFlatpakñïîìîùüþ
flatpak-builder-àìîæåòïðîèñõîäèòüñáîðêàÏÎ.Ôàéëû,
êîòîðûåñîçäàþòñÿâîâðåìÿñáîðêè,íåîáÿçàòåëüíîíåîá-
õîäèìûäëÿðàáîòûñîáèðàåìîãîÏÎ.Ïîýòîéïðè÷èíå
flatpak-builderñòàðàåòñÿóäàëèòüôàéëûïîäîáíîãîòè-
ïàïåðåäïîäòâåðæäåíèåìóñïåøíîéñáîðêèÏÎ.Âñëó-
÷àåóñòàíîâêèPython-ìîäóëÿìóñîðíûìèôàéëàìèìîãóò
áûòüñòàðûå
*.pyc
ôàéëû.Íåîáõîäèìîñòü
*.pyc
ôàé-
ëîâîïðåäåëÿåòñÿñîïîñòàâëåíèåìñóùåñòâóþùèõ
*.pyc
ôàéëîâc
*.py
ôàéëàìè.Åñëè
*.py
ôàéëñóùåñòâó-
åò,òîó
*.pyc
ôàéëàèçìåíÿåòñÿâðåìåííîéçàãîëî-
âîê,ïîñëå÷åãîïðîèñõîäèòóäàëåíèåâñåõ
*.pyc
ôàéëîâ
ñíåâåðíûìâðåìåííûìçàãîëîâêîì.Äàííûéàëãîðèòì
ïðèâîäèòêóäàëåíèþâñåõ
*.pyc
ôàéëîâZephyTools-
à,ïîýòîìóïåðåäçàâåðøåíèåìñîçäàíèÿïàêåòàíåîáõî-
äèìîâðó÷íóþêîïèðîâàòüäàííûåôàéëûâäèðåêòîðèþ
ZephyTOOLS_16.08/APPLI/BIN/
.
83
4.
Âûðàáîòêàïåðñïåêòèâïîïîâûøåíèþ
ýôôåêòèâíîñòèðàçâ¼ðòûâàíèÿÏÎâ
èíôðàñòðóêòóðåFlatpak
4.1.
Äîáàâëåíèåïîääåðæêèñîçäàíèÿîò÷¼òîâPDF
ZephyToolsèñïîëüçóåòïàêåòtexlive-fulläëÿñîçäà-
íèÿPDF-îò÷¼òîâèçL
A
T
E
X-ôàéëîâ.Äàííàÿñèñòåìàîïðå-
äåëÿåòñòðóêòóðóäîêóìåíòàñïîìîùüþñïåöèàëüíîãî
ÿçûêàðàçìåòêè,äàííûéïîäõîäÿâëÿåòñÿàëüòåðíàòèâîé
áåçäàííûõìîäóëåéZephyToolsñìîæåòðàáîòàòü,òåðÿÿ
ëèøü÷àñòüñâîåéôóíêöèîíàëüíîñòè.
ÂáóäóùåìíåîáõîäèìîðàçîáðàòüñÿñîñáîðêîéTeX
Live[
94
],äîáàâëåíèåìíîâûõïàêåòîââñèñòåìóTeXLive
[
95
]èñáîðêîéäîïîëíèòåëüíûõóòèëèò[
96
],èäîáàâèòü
âñ¼íåîáõîäèìîÏÎ,ñîîòâåòñòâóþùååóñòàíîâëåííîìó
ïàêåòótexlive-full,âêîìïëåêòFlatpakäëÿZephyTOOLS.
4.2.
Óâåëè÷åíèåýôôåêòèâíîñòèðàáîòûâû÷èñëè-
òåëüíûõáèáëèîòåê
ÐàáîòàNumpyèScipyîñíîâûâàåòñÿíàáèáëèîòå-
êàõ,âûïîëíÿþùèõáàçîâûåîïåðàöèèëèíåéíîéàëãåáðû.
ÈñïîëüçîâàíèåâäàííîéðàáîòåáèáëèîòåêèOpenBLAS
ïðîäèêòîâàíîñêîðååâûáîðîìÏÎñíàèáîëååóäîáíûì
ñïîñîáîìóñòàíîâêèâèíôðàñòðóêòóðåFlatpak,÷åìëó÷-
øèìâûáîðîìñòî÷êèçðåíèÿïðîèçâîäèòåëüíîñòè.Âî
âðåìÿñîçäàíèÿïàêåòàáûëèòàêæåðàññìîòðåíû:

lapackîðèãèíàëüíûéïàêåòäëÿðàáîòûñëèíåé-
íîéàëãåáðîé[
97
];
85

ATLASóëó÷øåííàÿâåðñèÿðåàëèçàöèèèíòåð-
ôåéñà
BLAS
,âîâðåìÿóñòàíîâêèïðîèçâîäèòðå-
ãóëèðîâêóïàðàìåòðîâ,âëèÿþùèõíàñêîðîñòüâû-
ïîëíåíèÿîïåðàöèéëèíåéíîéàëãåáðû[
98
];

MKLIntelMathKernelLibrary,áèáëèîòåêà,âêëþ-
÷àþùàÿâñåáÿðåàëèçàöèþèíòåðôåéñà
BLAS
,îï-
òèìèçèðîâàííàÿïîäïðîöåññîðûñåìåéñòâàIntel
[
99
];

ACMLAMDCoreMathLibrary,ðåàëèçàöèÿ
BLAS
,îïòèìèçèðîâàííàÿïîäïðîöåññîðûAMD
[
100
];
Âäàííûéìîìåíòìàíèôåñòñîäåðæèòîïèñàíèåîò-
êëþ÷¼ííûõìîäóëåélapackèATLAS.Íåîáõîäèìîðàç-
ðàáîòàòüìåòîäèêóòåñòèðîâàíèÿïðîèçâîäèòåëüíîñòèè
ïîäîáðàòüáîëååýôôåêòèâíóþðåàëèçàöèþèíòåðôåéñà
BLAS
.
Äàííûåáèáëèîòåêèìîãóòýôôåêòèâíîèñïîëüçî-
âàòüäîïîëíèòåëüíûåèíñòðóêöèè
SIMD
ïðîöåññîðà.Îä-
íàêîïðèâÿçêàêàïïàðàòíîìóîáåñïå÷åíèþìîæåòîò-
ðèöàòåëüíîñêàçàòüñÿíàë¼ãêîñòèðàñïðîñòðàíåíèÿêîì-
86
ïëåêòàFlatpak.Àáñîëþòíîáåññìûñëåííîòðàòèòü12÷à-
ñîâíàñáîðêóèíàñòðîéêóáèáëèîòåêèATLAS,ïîñêîëüêó
îíàáóäåòýôôåêòèâíàòîëüêîíààïïàðàòíûõïàðàìåòðàõ
õîñòà
.Òàêèìîáðàçîìïðèâûáîðåëó÷øåéáèáëèîòåêè
BLAS
ñòîèòòàêæåðàññìàòðèâàòüâîïðîñïåðåíîñèìîñòè,
è,âîçìîæíî,ñäåëàòüäàííûéêðèòåðèéáîëååïðèîðèòåò-
íûì.
4.3.
Óëó÷øåíèåìàíèôåñòà,ïåðåäàâàåìîãîflatpak-
builder
Âäàííîéðàáîòåèñïîëüçîâàëñÿflatpak-builderâåð-
ñèè0.8.5,âîïèñàíèèìîäóëåéäàííîéâåðñèèíåîáõî-
äèìîóêàçûâàòüîäíóèçñèñòåìñáîðêè.Òàêèìîáðàçîì
äëÿìîäóëåé,èñïîëüçóþùèõíåïîääåðæèâàåìóþñèñòå-
ìóñáîðêèáûëîíåîáõîäèìîñîçäàâàòüñïåöèàëüíûåñöå-
íàðèèMakefileèäîáàâëÿòüèõâäèðåêòîðèþóñòàíîâêè.
ÈñïîëüçîâàíèåMakefile-îâòîëüêîäëÿóñòàíîâêèìîäóëÿ
âêîìïëåêòFlatpakÿâëÿåòñÿîáõîäíûìðåøåíèåì.Îäíà-
êîñâåðñèè0.9.xâîïèñàíèèìîäóëÿèñòî÷íèêàìîæíî
óêàçàòüïàðàìåòð
"buildsystem":"simple"
.Èñïîëüçî-
âàíèåäàííîéñèñòåìûñáîðêèïîçâîëèòóêàçûâàòüíàáîð
87
êîìàíäóñòàíîâêèââèäåìàññèâàñòðîê,óêàçûâàåìîãî
âïàðàìåòðå
build-commands
.Òàêèìîáðàçîìïåðåõîä
íàíîâóþâåðñèþflatpak-builderìîæåòïîçâîëèòüèçìå-
íèòüìàíèôåñò,ÿâíîïðîïèñàâêîìàíäûóñòàíîâêèâîïè-
ñàíèèìîäóëÿ,èèçáàâèòñÿîòèñïîëüçîâàíèÿñöåíàðèåâ
Makefileââèäåîáõîäíîãîðåøåíèÿäàííîéïðîáëåìû.
88
Çàêëþ÷åíèå
Âäàííîéðàáîòåáûëàïðîèçâåäåíàðàçðàáîòêàóíè-
âåðñàëüíîãîïàêåòàZephyToolsäëÿðàçâ¼ðòûâàíèÿñïî-
ìîùüþòåõíîëîãèèFlatpak.
Áûëàèññëåäîâàíààêòóàëüíîñòüðàçâ¼ðòûâàíèÿÏÎ
ñïîìîùüþòåõíîëîãèèFlatpak,âõîäåêîòîðîéáûëà
îáíàðóæåíàíåîáõîäèìîñòüðàñïðîñòðàíåíèÿïîëüçîâà-
òåëüñêèõïðèëîæåíèéââèäåîäíîãîïàêåòàíàìíîæå-
ñòâîäèñòðèáóòèâîâGNU/Linuxèçàïóñêäàííûõïðè-
ëîæåíèéâïåñî÷íèöå(sandbox).Äàííûéïîäõîäÿâëÿ-
åòñÿàêòèâíîðàçâèâàþùåéñÿàëüòåðíàòèâîéðàñïðîñòðà-
íåíèÿÏÎñïîìîùüþïàêåòîâ,ïðåäîñòàâëÿÿðàçðàáîò-
÷èêàìêàêïëàòôîðìóäëÿðàçðàáîòêèÏÎ,òàêèàâòî-
ìàòèçàöèþñîçäàíèÿèîáíîâëåíèÿêîìïëåêòàÏÎñïî-
ñëåäóþùèìðàñïðîñòðàíåíèåìïîëüçîâàòåëÿì.Ïåñî÷íè-
öàïðåäîñòàâëÿåòäîïîëíèòåëüíóþçàùèòóäëÿíåíàä¼æ-
íûõÏÎ,÷òîìîæåòáûòüîñîáåííîàêòóàëüíîïðèèñïîëü-
çîâàíèèâåá-îáîçðåâàòåëåé,ïîñêîëüêóñóùåñòâóåòìíî-
æåñòâîâåá-ñòðàíèöñîäåðæàùèõâñåáåâðåäîíîñíûéêîä.
Ðàñïðîñòðàíåíèåïðèëîæåíèÿâìåñòåñêîìïëåêòóåìûìè
89
áèáëèîòåêàìèèïðîãðàììàìèïîçâîëèòçàïóñêàòüñòàðûå
âåðñèèÏÎíàñîâðåìåííûõÎÑáåçêîíôëèêòîâ
çàâèñè-
ìîñòåé
.
Áûëñîâåðø¼íîáçîðÏÎZephyToolsñèññëåäîâà-
íèåìåãî
çàâèñèìîñòåé
.ÄàííîåÏÎíåâîçìîæíîóñòà-
íîâèòüñïîìîùüþìåíåäæåðàïàêåòîâ,àèíñòðóêöèÿ
ïîóñòàíîâêåïðèñóòñòâóåòòîëüêîäëÿîäíîãîäèñòðè-
áóòèâàGNU/Linux(Ubuntu).Ýòîóñëîæíÿåòóñòàíîâêó
ZephyToolsíàäðóãèåäèñòðèáóòèâû.Âñâîåéðàáîòå
ZephyTOOLSGTK+2,÷òîâëå÷¼òçàñîáîéèñïîëüçîâà-
íèåÏÎ,ïîääåðæêàêîòîðîãîëèáîóæåîêîí÷åíà(Webkit),
èëèìîæåòáûòüîêîí÷åíàâáóäóùåì.Ñîçäàíèåêîì-
ïëåêòàFlatpakïîçâîëèòçíà÷èòåëüíîóïðîñòèòüóñòàíîâ-
êóZephyToolsáîëåå,÷åìíà10-òèäèñòðèáóòèâàõ.Ïðè
ýòîìîáùåäîñòóïíîñòüèñõîäíîãîêîäàFlatpakïîçâîëÿåò
ïîòåíöèàëüíîèñïîëüçîâàòüflatpak-ïàêåòíàëþáîéñèñòå-
ìåGNU/Linux.
ÏðèñîçäàíèèêîìïëåêòàFlatpakáûëàîñâîåíàñè-
ñòåìàflatpak-builder,àâòîìàòèçèðóþùàÿìíîæåñòâîøà-
ãîâñáîðêè.Ðàññìîòðåíûñïîñîáûîòñëåæèâàíèÿ
çàâèñè-
90
ìîñòåé
èèñïðàâëåíèÿîøèáîêñáîðêè.Âõîäåñîçäàíèÿ
êîìïëåêòàFlatpakáûëàîáíàðóæåíàïîâûøåííàÿñëîæ-
íîñòüñáîðêèÏÎ,îñíîâàííîãîíàíåñòàíäàðòíîéñèñòåìå
ñáîðêè,êàêíàïðèìåðwmakeóOpenFOAM.Äëÿóäâîëå-
òâîðåíèÿ
çàâèñèìîñòåé
áûëîóñòàíîâëåíîáîëåå60ìîäó-
ëåé,áîëüøèíñòâîèçêîòîðûõÿâëÿþòñÿäîñòàòî÷íîëåã-
êîâåñíûìèPython-áèáëèîòåêàìè,îäíàêîïðèñóòñòâèåòà-
êèõ
çàâèñèìîñòåé
êàêgfortran,WebKitGtk,OpenFOAM
çíà÷èòåëüíîóâåëè÷èâàåòâðåìÿèñëîæíîñòüñáîðêè.
ÄàëüíåéøååðàçâèòèåêîìïëåêòàFlatpakìîæåò
áûòüñâÿçàíîñâûõîäîìíîâîéâåðñèèflatpak-builder,ïîç-
âîëÿþùåéèñïîëüçîâàòüâêà÷åñòâåñèñòåìûóñòàíîâêè
ïðîñòûåèíñòðóêöèèêîììàíäíîéîáîëî÷êè,÷òîïîçâîëèò
ñäåëàòüìàíèôåñò,îïèñûâàþùèéñáîðêóáîëååïîíÿò-
íûì.Òàêæåíåðåø¼ííîéïðîáëåìîéîñòà¼òñÿèñïîëüçî-
âàíèåÏÎ,çàâèñÿùåãîîòàïïàðàòíûõîñîáåííîñòåéÏÊ.
ÂZephyToolsòàêèìÏÎÿâëÿþòñÿáèáëèîòåêèäëÿâû-
ïîëíåíèÿîïåðàöèéëèíåéíîéàëãåáðû.Ïðèñâîåéðàáî-
òåäàííûåáèáëèîòåêèìîãóòýôôåêòèâíîèñïîëüçîâàòü
íàáîðû
SIMD
-èíñòðóêöèé,èíôîðìàöèÿîäîñòóïíûõèí-
91
ñòðóêöèÿõèÿäðàõïðîöåññîðàñîáèðàåòñÿâîâðåìÿñáîð-
êè.Ýòîîçíà÷àåò,÷òîçàïóñêïðèëîæåíèÿâèíôðàñòðóêòó-
ðåFlatpakíàäðóãîéàïïàðàòíîéïëàòôîðìåìîæåòïðèâå-
ñòèêíåýôôåêòèâíîìóèñïîëüçîâàíèþðåñóðñîâäàííîé
ïëàòôîðìû.Âáóäóùåìíåîáõîäèìîèññëåäîâàòüäàííîå
ïîâåäåíèåè,âîçìîæíî,ñîçäàòüíåñêîëüêîïàêåòîâñðàç-
íûìèâåðñèÿìèÏÎ,çàâèñÿùåãîîòàïïàðàòíûõîñîáåííî-
ñòåé.Òåìíåìåíåå,ZephyTOOLSîáû÷íîðàçâ¼ðòûâàþò
íàñåðâåðàõ,ïîýòîìóíåñîñòàâëÿåòòðóäàïðåäóñìîòðåòü
îïöèèñáîðêèêîìïëåêòàFlatpakäëÿZephyTOOLS,ó÷è-
òûâàþùèõîñîáåííîñòèöåëåâîéàðõèòåêòóðû.
92
Ñïèñîêèñïîëüçîâàííûõèñòî÷íèêîâ
1.
UnixèLinuxðóêîâîäñòâîñèñòåìíîãîàäìèíèñòðà-
òîðà/ÝâèÍåìåò,ÃàðòÑíàéäåð,ÒðåíòÕåéí[èäð.].
ã.Ìîñêâà,óë.Ëåñíàÿ,ä.43,ñòð.1:Âèëüÿìñ,2012.
1312ñ.
2.
DohertyI.AdoptingFlatpakToReassembleThird
PartyApplications.2017.URL:https://solus-
project.com/2017/01/18/adopting-flatpak-to-
reassemble-third-party-applications/`(äàòà
îáðàùåíèÿ:30.02.2017).
3.
ChayA.What'sFlatpak?2017.
URL:https://support.endlessm.com/hc/en-
us/articles/115001980483-What-s-Flatpak-(äàòà
îáðàùåíèÿ:20.05.2017).
4.
Unprivilegedsandboxingtool.2017.
URL:https://github.com/projectatomic/bubblewrap
(äàòàîáðàùåíèÿ:10.12.2016).
5.
BrockmeierJ.AnnouncingProjectAtom-
ic:AnOperatingSystemConceptfor
RunningDockerContainers.2014.
URL:http://www.projectatomic.io/blog/2014/04/announcing-
project-atomic/(äàòàîáðàùåíèÿ:27.05.2017).
6.
7.
BonsHylke.SparkleShareFlatpakspecification.2016.
URL:https://github.com/hbons/org.sparkleshare.
SparkleShare/blob/master/org.sparkleshare.SparkleShare.json
(äàòàîáðàùåíèÿ:20.03.2017).
8.
ShieldsJ.AquickintroductiontoFlatpak.2016.
URL:http://apebox.org/wordpress/linux/1184(äàòà
îáðàùåíèÿ:28.02.2017).
9.
ShieldsJo.monodevelop-flatpak.2017.
URL:https://github.com/mono/monodevelop-
flatpak/blob/master/com.xamarin.MonoDevelop.json
(äàòàîáðàùåíèÿ:27.03.2017).
10.
WhatisZephyTOOLS?2012.URL:http://www.zephy-
science.com/index.php?p=zephytools/zephytools(äàòà
îáðàùåíèÿ:14.11.2016).
11.
INSTALLATIONPROCESS.
2016.URL:http://www.zephy-
science.com/ZephyDOC/INSTALL/index.html(äàòà
îáðàùåíèÿ:20.02.2017).
12.
Availableruntimes.2016.
URL:http://flatpak.org/runtimes.html(äàòà
îáðàùåíèÿ:02.03.2017).
13.
GTK+3.0Released.2011.
URL:https://blog.gtk.org/2011/02/10/gtk-3-0-released/
(äàòàîáðàùåíèÿ:05.03.2017).
94
14.
BrandlG.IntroductioninSphinx.2017.
URL:http://www.sphinx-doc.org/en/stable/intro.html
(äàòàîáðàùåíèÿ:16.03.2017).
15.
ReitzK.Requests:HTTPforHumans.2017.
URL:http://docs.python-requests.org/en/master/(äàòà
îáðàùåíèÿ:16.03.2017).
16.
ShibukawaY.imagesize0.7.1.2017.
URL:https://pypi.python.org/pypi/imagesize(äàòà
îáðàùåíèÿ:16.03.2017).
17.
ForcieriJ.WhatisAlabaster?2017.
URL:http://alabaster.readthedocs.io/en/latest/(äàòà
îáðàùåíèÿ:16.03.2017).
18.
Introduction.2017.
URL:http://babel.pocoo.org/en/latest/intro.html
(äàòàîáðàùåíèÿ:16.03.2017).
19.
BishopS.pytz-WorldTimezoneDefinitionsfor
Python.2008.URL:http://pythonhosted.org/pytz/
(äàòàîáðàùåíèÿ:16.03.2017).
20.
Credits.2017.URL:http://snowballstem.org/credits.html
(äàòàîáðàùåíèÿ:17.03.2017).
21.
ShibukawaY.snowballstemmer1.2.1.2017.
URL:https://pypi.python.org/pypi/snowballstemmer
(äàòàîáðàùåíèÿ:17.03.2017).
95
22.
Docutils:DocumentationUtilities.2016.
29.
BradshawR.AboutCython.2017.
URL:http://cython.org/#about(äàòàîáðàùåíèÿ:
22.03.2017).
30.
XianyiZ.OpenBLASWiki.2015.
URL:https://github.com/xianyi/OpenBLAS/wiki
(äàòàîáðàùåíèÿ:22.03.2017).
31.
LisleJ.gfortrantheGNUFortrancompiler,partof
GCC.2017.URL:https://gcc.gnu.org/wiki/GFortran
(äàòàîáðàùåíèÿ:25.05.2017).
32.
InstallingGCC.2017.
URL:https://gcc.gnu.org/install/download.html(äàòà
îáðàùåíèÿ:25.05.2017).
33.
ClasenM.ThecurrentFlatpaksandbox.2017.
URL:https://github.com/flatpak/flatpak/wiki/Sandbox
(äàòàîáðàùåíèÿ:5.04.2017).
34.
SeemannT.scipyfailedtoinstall-/lib/../lib64/crt1.o:
undefinedreferenceto`main'.2015.
URL:https://github.com/Homebrew/homebrew-
python/issues/233(äàòàîáðàùåíèÿ:26.03.2017).
35.
WhatisGTK+,andhowcanIuseit?2017.
URL:https://www.gtk.org/(äàòàîáðàùåíèÿ:
29.03.2017).
36.
37.
WhatisGlade?2014.
URL:https://glade.gnome.org/index.html(äàòà
îáðàùåíèÿ:29.03.2017).
38.
Pycairo.2014.URL:https://cairographics.org/pycairo/
(äàòàîáðàùåíèÿ:30.03.2017).
39.
Howdoesitwork?2017.
URL:https://pygobject.readthedocs.io/en/latest/
(äàòàîáðàùåíèÿ:30.03.2017).
40.
Introduction.2017.
URL:https://www.mesa3d.org/intro.html(äàòà
îáðàùåíèÿ:30.03.2017).
41.
EsfahbodB.Introduction.2012.
URL:http://www.pango.org/(äàòàîáðàùåíèÿ:
29.03.2017).
42.
Overview.2010.URL:https://projects.gnome.org/gtk-
glext/index.html(äàòàîáðàùåíèÿ:29.03.2017).
43.
AboutPyGTK.2009.
URL:http://www.pygtk.org/about.html(äàòà
îáðàùåíèÿ:29.03.2017).
44.
AboutPyOpenGL.2010.
45.
debian-pygobject.2010.
URL:https://github.com/ystk/debian-pygobject(äàòà
îáðàùåíèÿ:26.03.2017).
46.
WebKitGTK+.2017.
URL:https://trac.webkit.org/wiki/WebKitGTK(äàòà
îáðàùåíèÿ:3.04.2017).
47.
CamposC.G.WebKitGTK+2.5.1:
GoodbyeWebKit1.2014.
URL:https://blogs.igalia.com/carlosgc/2014/08/01/webkitgtk-
2-5-1-good-bye-webkit1/(äàòàîáðàùåíèÿ:
3.04.2017).
48.
52.
ClarkA.Pillow.2017.
URL:https://pillow.readthedocs.io/en/4.1.x/(äàòà
îáðàùåíèÿ:8.04.2017).
53.
ExamplesofImageMagickUsage.2012.
URL:http://www.imagemagick.org/Usage/(äàòà
îáðàùåíèÿ:8.04.2017).
54.
60.
TheFastLexicalAnalyzer.2016.
URL:https://github.com/westes/flex(äàòàîáðàùåíèÿ:
15.05.2017).
61.
`help2man'ReferenceManual.2014.
URL:https://www.gnu.org/software/help2man/(äàòà
îáðàùåíèÿ:15.05.2017).
62.
GeneralinformationabouttheOpenMPIProject.2016.
URL:https://www.open-mpi.org/faq/?category=general
(äàòàîáðàùåíèÿ:16.05.2017).
63.
PellegriniF.Softwarepackageandlibrariesfor
sequentialandparallelgraphpartitioning,stat-
icmappingandclustering,sequentialmesh
andhypergraphpartitioning,andsequentialand
parallelsparsematrixblockordering.2016.
URL:http://www.labri.fr/perso/pelegrin/scotch/(äàòà
îáðàùåíèÿ:16.05.2017).
64.
67.
LargeDataVisualizationMadeEasier.2017.
URL:https://www.paraview.org/overview/(äàòà
îáðàùåíèÿ:17.05.2017).
68.
GreenshieldsC.Downloadv4.0|SourcePack.2016.
URL:https://openfoam.org/download/4-0-source/(äàòà
îáðàùåíèÿ:15.05.2017).
69.
s3transfer0.1.10.2016.
URL:https://pypi.python.org/pypi/s3transfer(äàòà
îáðàùåíèÿ:20.05.2017).
70.
GronholmA.futures3.1.1.2017.
URL:https://pypi.python.org/pypi/futures(äàòà
îáðàùåíèÿ:20.05.2017).
71.
GarnaatM.Welcometobotocore.2013.
URL:https://botocore.readthedocs.io/en/latest/(äàòà
îáðàùåíèÿ:20.05.2017).
72.
SaryerwinnieJ.jmespath0.9.3
JSONMatchingExpressions.2017.
URL:https://pypi.python.org/pypi/jmespath(äàòà
îáðàùåíèÿ:20.05.2017).
73.
ForcierJ.WelcometoParamiko!2017.
URL:http://www.paramiko.org/(äàòàîáðàùåíèÿ:
23.05.2017).
74.
75.
asn1crypto0.22.0.2017.
URL:https://pypi.python.org/pypi/asn1crypto(äàòà
îáðàùåíèÿ:23.05.2017).
76.
Welcometo
pyca/cryptography
.2017.
URL:https://cryptography.io/en/latest/(äàòà
îáðàùåíèÿ:23.05.2017).
77.
RigoA.CFFIdocumentation.2015.
URL:http://cffi.readthedocs.io/en/latest/(äàòà
îáðàùåíèÿ:23.05.2017).
78.
HagemeisterP.ipaddress1.0.18.2017.
URL:https://pypi.python.org/pypi/ipaddress(äàòà
îáðàùåíèÿ:3.03.2017).
79.
FurmanE.enum341.1.6.2016.
URL:https://pypi.python.org/pypi/enum34(äàòà
îáðàùåíèÿ:23.05.2017).
80.
StufftD.Welcometopackaging.2014.
URL:https://packaging.pypa.io/en/latest/(äàòà
îáðàùåíèÿ:23.05.2017).
81.
DaviesK.idna2.5InternationalizedDo-
mainNamesinApplications(IDNA).2017.
URL:https://pypi.python.org/pypi/idna(äàòà
îáðàùåíèÿ:23.05.2017).
82.
McGuireP.PyParsingA
PythonParsingModule.2017.
103
URL:https://pypi.python.org/pypi/pyparsing/2.2.0
(äàòàîáðàùåíèÿ:23.05.2017).
83.
RodolaG.psutildocumentation.2017.
URL:http://pythonhosted.org/psutil/(äàòàîáðàùåíèÿ:
20.03.2017).
84.
GDAL-GeospatialDataAbstractionLibrary.2016.
URL:http://www.gdal.org/index_ru.html(äàòàîáðà-
ùåíèÿ:18.04.2017).
85.
URL:https://www.kernel.org/doc/Documentation/admin-
guide/binfmt-misc.rst(äàòàîáðàùåíèÿ:23.04.2017).
91.
GeuzaineC.,RemacleJ.-F.Gmsh:athree-
dimensionalfiniteelementmeshgeneratorwith
built-inpre-andpost-processingfacilities.2009.
URL:http://gmsh.info/doc/preprints/gmsh_paper_preprint.pdf
(äàòàîáðàùåíèÿ:23.04.2017).
92.
WelcometoOpenSSL!2016.
URL:https://www.openssl.org/(äàòàîáðàùåíèÿ:
25.04.2017).
93.
inxi::afullfeaturedsysteminformationscript.2015.
URL:http://smxi.org/docs/inxi.htm(äàòàîáðàùåíèÿ:
30.05.2017).
94.
TeXLivebuildprocedure.2017.
URL:http://www.tug.org/texlive/build.html(äàòà
îáðàùåíèÿ:1.06.2017).
95.
LaTeX/InstallingExtraPackages.2016.
URL:https://en.wikibooks.org/wiki/
LaTeX/Installing_Extra_Packages(äàòàîáðàùåíèÿ:
1.06.2017).
96.
Biber:ABibTeXreplacementforusersofBibLaTeX.
97.
BaiZ.LAPACK,CRCHandbookon
LinearAlgebra,SecondEdition.2014.
îáðàùåíèÿ:3.06.2017).
106

Приложенные файлы

  • pdf 36136796
    Размер файла: 593 kB Загрузок: 0

Добавить комментарий