Irc-Unix.net

Главная | Actual Topics | Обратная связь | Guest Book | В избранное | Сделать домашней
Категории
 System & Utilities
 Unix News
 OS Emulator
 Developing
 Learning/Education
 Games
 Humour
Каталог статей
Все статьи

Antispam
Статьи
Биллу Гейтсу тоже предлагают избавиться ...
Вымогательство в борьбе со спамом
Календарь

November, 2017
ПнВтСрЧтПтСбВс
12345
6789101112
13141516171819
20212223242526
27282930
Опросы
Какой из этих ОС Вы отдаете большее предпочтение?

QNX
FreeBSD
Linux(any)
Solaris
Mac OS
Windows XP
Windows 2003
Что такое ОС? :)


Результаты
Другие опросы

Всего голосов: 325
Комментарии: 0
Ссылки

Архив Новостей
 November 2017 (7)
 October 2017 (18)
 September 2017 (18)
 August 2017 (13)
 February 2017 (14)
 January 2017 (19)
 December 2016 (16)
 November 2016 (16)
 October 2016 (21)
 September 2016 (18)
 August 2016 (16)
 July 2016 (16)
 June 2016 (20)
 May 2016 (18)
 April 2016 (15)
 March 2016 (22)
 February 2016 (17)
 January 2016 (15)
 December 2015 (15)
 November 2015 (22)
 October 2015 (20)
 September 2015 (17)
 August 2015 (25)
 July 2015 (20)
 June 2015 (23)
 May 2015 (21)
 April 2015 (17)
 March 2015 (19)
 February 2015 (9)
 January 2015 (23)
 December 2014 (9)
 November 2014 (13)
 October 2014 (12)
 September 2014 (18)
 August 2014 (20)
 July 2014 (10)
 June 2014 (12)
 May 2014 (12)
 April 2014 (10)
 March 2014 (22)
 February 2014 (10)
 January 2014 (8)
 December 2013 (26)
 November 2013 (53)
 October 2013 (40)
 September 2013 (48)
 August 2013 (63)
 July 2013 (56)
 June 2013 (52)
 May 2013 (49)
 April 2013 (67)
 March 2013 (74)
 February 2013 (63)
 January 2013 (62)
 December 2012 (62)
 November 2012 (66)
 October 2012 (68)
 September 2012 (48)
 August 2012 (75)
 July 2012 (60)
 June 2012 (71)
 May 2012 (69)
 April 2012 (85)
 March 2012 (86)
 February 2012 (90)
 January 2012 (81)
 December 2011 (103)
 November 2011 (118)
 October 2011 (74)
 September 2011 (2)
 June 2011 (110)
 May 2011 (118)
 April 2011 (111)
 March 2011 (112)
 February 2011 (101)
 January 2011 (119)
 December 2010 (117)
 November 2010 (118)
 October 2010 (131)
 September 2010 (117)
 August 2010 (226)
 July 2010 (351)
 June 2010 (305)
 May 2010 (319)
 April 2010 (343)
 March 2010 (329)
 February 2010 (311)
 January 2010 (312)
 December 2009 (266)
 November 2009 (156)
 July 2009 (101)
 June 2009 (279)
 May 2009 (365)
 April 2009 (348)
 March 2009 (347)
 February 2009 (323)
 January 2009 (318)
 December 2008 (237)
 November 2008 (155)
 October 2008 (334)
 September 2008 (310)
 August 2008 (343)
 July 2008 (362)
 June 2008 (322)
 May 2008 (604)
 April 2008 (1276)
 March 2008 (1658)
 February 2008 (250)
 January 2008 (6)
 November 2007 (1)
 September 2007 (1)
 June 2007 (1)
 May 2007 (1)
 March 2007 (1)
 January 2007 (2)
 December 2006 (1)
 October 2006 (2)
 September 2006 (1)
 August 2006 (2)

KDE Framworks 5 Content Snap Techno

System & Utilities

In the previous post on Snapping KDE Applications we looked at the high-level implication and use of the KDE Frameworks 5 content snap to snapcraft snap bundles for binary distribution. Today I want to get a bit more technical and look at the actual building and inner workings of the content snap itself.

The KDE Frameworks 5 snap is a content snap. Content snaps are really just ordinary snaps that define a content interface. Namely, they expose part or all of their file tree for use by another snap but otherwise can be regular snaps and have their own applications etc.

KDE Frameworks 5’s snap is special in terms of size and scope. The whole set of KDE Frameworks 5, combined with Qt 5, combined with a large chunk of the graphic stack that is not part of the ubuntu-core snap. All in all just for the Qt5 and KF5 parts we are talking about close to 100 distinct source tarballs that need building to compose the full frameworks stack. KDE is in the fortunate position of already having builds of all these available through KDE neon. This allows us to simply repack existing work into the content snap. This is for the most part just as good as doing everything from scratch, but has the advantage of saving both maintenance effort and build resources.

I do love automation, so the content snap is built by some rather stringy proof of concept code that automatically translates the needed sources into a working snapcraft.yaml that repacks the relevant KDE neon debs into the content snap.

Looking at this snapcraft.yaml we’ll find some fancy stuff.

After the regular snap attributes the actual content-interface is defined. It’s fairly straight forward and simply exposes the entire snap tree as kde-frameworks-5-all content. This is then used on the application snap side to find a suitable content snap so it can access the exposed content (i.e. in our case the entire file tree).


slots:
kde-frameworks-5-slot:
content: kde-frameworks-5-all
interface: content
read:
- "."

The parts of the snap itself are where the most interesting things happen. To make things easier to read and follow I’ll only show the relevant excerpts.

The content snap consists of the following parts: kf5, kf5-dev, breeze, plasma-integration.

The kf5 part is the meat of the snap. It tells snapcraft to stage the binary runtime packages of KDE Frameworks 5 and Qt 5. This effectively makes snapcraft pack the named debs along with necessary dependencies into our snap.


kf5:
plugin: nil
stage-packages:
- libkf5coreaddons5
...

The kf5-dev part looks almost like the kf5 part but has entirely different functionality. Instead of staging the runtime packages it stages the buildtime packages (i.e. the -dev packages). It additionally has a tricky snap rule which excludes everything from actually ending up in the snap. This is a very cool tricky, this effectively means that the buildtime packages will be in the stage and we can build other parts against them, but we won’t have any of them end up in the final snap. After all, they would be entirely useless there.


kf5-dev:
after:
- kf5
plugin: nil
stage-packages:
- libkf5coreaddons-dev
....
snap:
- "-*"

Besides those two we also build two runtime integration parts entirely from scratch breeze and plasma-integration. They aren’t actually needed, but ensure sane functionality in terms of icon theme selection etc. These are ordinary build parts that simply rely on the kf5 and kf5-dev parts to provide the necessary dependencies.

An important question to ask here is how one is meant to build against this now. There is this kf5-dev part, but it does not end up in the final snap where it would be entirely useless anyway as snaps are not used at buildtime. The answer lies in one of the rigging scripts around this. In the snapcraft.yaml we configured the kf5-dev part to stage packages but then excluded everything from being snapped. However, knowing how snapcraft actually goes about its business we can “abuse” its inner workings to make use of the part after all. Before the actual snap is created snapcraft “primes” the snap, this effectively means that all installed trees (i.e. the stages) are combined into one tree (i.e. the primed tree), the exclusion rule of the kf5-dev part is then applied on this tree. Or in other words: the primed tree is the snap before exclusion was applied. Meaning the primed tree is everything from all parts, including the development headers and CMake configs. We pack this tree in a development tarball which we then use on the application side to stage a development environment for the KDE Frameworks 5 snap.

Specifically on the application-side we use a boilerplate part that employs the same trick of stage-everything but snap-nothing to provide the build dependencies while not having anything end up in the final snap.


kde-frameworks-5-dev:
plugin: dump
snap: [-*]
source: http://build.neon.kde.org/job/kde-frameworks-5-release_amd64.snap/lastSuccessfulBuild/artifact/kde-frameworks-5-dev_amd64.tar.xz

Using the KDE Framworks 5 content snap KDE can create application snaps that are a fraction of the size they would be if they contained all dependencies themselves. While this does give up optimization potential by aggregating requirements in a more central fashion it quickly starts paying off given we are saving upwards of 70 MiB per snap.

Application snaps can of course still add more stuff on top or even override things if needed.

Finally, as we approach the end of the year, we begin the season of giving. What would suit the holidays better than giving to the entire world by supporting KDE with a small donation?
postcard02





  


Разместил: Planet KDE | Дата: 05.12.2016 | Прочитано: 215 | Раздел: System & Utilities   

Рейтинг статьи

Средняя оценка: 0.00/0Средняя оценка: 0Всего голосов:0

Отлично
Хорошо Нормально Пойдёт Плохо


Смотрите также связанные темы

20.06.2016 [Linux и BSD]: новости, статьи, свежий софт от LinuxRSP.RU #447
+ Вышел RhodeCode 4.1 + Snap-пакеты из Ubuntu теперь работают и в других дистрибутивах + Выпущена Восьмая платформа BaseALT + Состоялся релиз открытой аппаратной платформы icoBoard 1.0 + Релиз компилятора SDCC 3.6.0 + Релиз Qt 5.7.0 и Qt Creator 4.0.2 + Первый релиз Nextcloud, форка ownCloud + Релиз LibreCAD 2.1.0. Команде разработчиков нужна помощь! + До конца года состоится выход российских смартфонов на ОС Sailfish + Программа PyCon Russia 2016 готова + Haskell: GHC 8.0.1 + Доступен i2pd 2.7.0, клиент анонимной сети I2P, написанный на языке C++ + Вышла версия 0.7 beta QMole - порт Linux на ...
05.12.2016 Canonical предложила пользователям Ubuntu Linux коммерческую поддержку Docker
На прошлой неделе компания Canonical, стоящая за Linux-дистрибутивом Ubuntu, объявила о сотрудничестве с Docker для возможности предоставления коммерческой технической поддержки по одноимённому продукту для Linux-контейнеров. В рамках достигнутого соглашения Docker Inc будет публиковать и обновлять новые версии Docker в виде snap-пакетов для Ubuntu, а Canonical — предлагать техническую поддержку двух уровней (Level 1 и Level 2) для коммерческой версии Docker Engine (Commercially…
11.03.2008 Производительность BIND'а в разных ОС
Gentoo Linux показал наибольшую производительность в тестировании ISC сервера BIND версии 9.4.1-P1. Top10: Linux Gentoo 2.6.20.7 Linux Fedora Core 2.6.20.7 FreeBSD-7-CURRENT 200708 FreeBSD-6-stable 200708 FreeBSD 6.2-RELEASE Solaris-10 DevelExpr 5/07 NetBSD-4.0-Beta 200708 OpenBSD 4.1-snap-20070427 Windows 2003 Server Windows XP Pro64 5.2.3790 SP2
19.03.2008 net-im/imspector - 0.5
IMSpector is an Instant Messenger transparent proxy with monitoring, blocking, and content-filtering capabilities. WWW: http://www.imspector.org/ - Dejs Ilja ilja.dejs@gmail.com PR: ports/121778 Submitted by: Ilja Dejs <ilja.dejs at gmail.com>
20.03.2008 NetBSD исполнилось 15 лет
первые коммиты в репозиторий были сделаны 21 марта 1993 года http://www.netbsd.org/about/history.h...
07.04.2008 Вышел nlkt 0.2.2.1
Всем любителям попробовать что-то новое и покритиковать представляется нелинейный клавиатурный тренажёр nlkt, текущая версия - 0.2.2.1. Тулкит - Qt4. Возможности: упражнения не заданы изначально, они формируются динамически; в качестве части упражнений использованы "фортунки", они же fortunes; несколько профилей для одного пользователя; поддержка разных раскладок для набора (пока что есть русская и английская); возможность просмотра подробной статистики в виде таблиц и графиков; визуальная клавиатура с подсказками по ходу упражнения; языки интерфейса - русский, украинский, английский. Програм...
16.07.2008 Update to VI3 Security Hardening Guide | VMware Security Blog
Link: VMware: VMware Security Blog: Update to VI3 Security Hardening Guide. Update to VI3 Security Hardening Guide We have recently released an update to the VI3 Security Hardening guide. The main changes are: new content for ESX 3.5 and VirtualCenter...
01.08.2008 List of RSS Readers Available in Ubuntu
RSS is a family of Web feed formats used to publish frequently updated content such as blog entries, news headlines, and podcasts in a standardized format.
21.08.2008 KDE3TO4 0.0.4 (Default)
KDE3TO4 — это визард, состоящий из комплекса модульных bash-скриптов, облегчающих жизнь желающим мигрировать из KDE3 на KDE4. Визард достаточно просто переносит настройки различных приложений из каталога KDE3 в каталог настроек KDE4. Модульная конструкция позволяет легко добавить поддержку для любого приложения. http://silentcoder.co.za/content/kde3...
23.09.2008 VMware @ Oracle OpenWorld
Just back from VMworld, and we're at Oracle OpenWorld this week. Here's the schedule of presentations in our booth. Here are a few sessions that look good and give you an idea of the content, but we're going all day,...
Нет комментариев. Почему бы Вам не оставить свой?
Вы не можете отправить комментарий анонимно, пожалуйста зарегистрируйтесь.
Google Search
Google

Web irc-unix.net

Топ Новостей
1: KDE Community announces fully open source Plasma Mobile
Hot NEWS!
Просмотров - 575


2: KWallet5 can be auto-unlocked during login again
Просмотров - 514

3: Interview with Laura
Просмотров - 489

4: Use ownCloud provided Packages, then VM, then Zip, no distro packages.
Просмотров - 485

5: Plasma Components on Android: Accelerating Subsurface Mobile Development
Просмотров - 478

6: VMware Workstation 11 and kwin - hangs and hiccups (solved?)
Просмотров - 452

7: Plasma 5 Powers KaOS Productivity
Просмотров - 443

8: KWrite on Mac – Application Bundle
Просмотров - 437

9: New Year Calligra Words Sprint
Просмотров - 415

10: FOSDEM Desktops DevRoom 2016 Call for Participation
Просмотров - 412

11: digiKam 5.0.0-beta2 is released
Просмотров - 410

12: Interview with Pierre Geier
Просмотров - 401

13: back in the habit
Просмотров - 394

14: Kexi 3
Просмотров - 393

15: Amarok is slowly catching up
Просмотров - 386

Google 120X240
Ссылки

Главная | Actual Topics | Статьи | Обратная связь | Guest Book
Генерация: 0.977 сек. и 13 запросов к базе данных за 0.917 сек.
Powered by SLAED CMS © 2005-2007 SLAED. All rights reserved.