{"id":32230,"date":"2022-08-25T10:55:07","date_gmt":"2022-08-25T02:55:07","guid":{"rendered":"https:\/\/www.deepin.org\/?p=32230"},"modified":"2022-09-05T09:47:09","modified_gmt":"2022-09-05T01:47:09","slug":"why-we-create-linglong","status":"publish","type":"post","link":"https:\/\/www.deepin.org.cn\/en\/why-we-create-linglong\/","title":{"rendered":"An Insight into Linglong (I): Why we create Linglong?"},"content":{"rendered":"<span class=\"ql-author-126 ql-size-11\"><a href=\"https:\/\/www.deepin.org\/index\/en\">Deepin<\/a>\u00a0is the top Linux distribution from China, devoted to providing a beautiful, easy-to-use, safe, and reliable operating system for global users. (<\/span><a class=\"ql-link ql-author-126 ql-size-11\" href=\"https:\/\/distrowatch.com\/table.php?distribution=deepin\" target=\"_blank\" rel=\"noopener noreferrer nofollow\"><u>Global Ranking<\/u><\/a><span class=\"ql-author-126 ql-size-11\">)<\/span><\/p>\n<p class=\"ql-long-126\"><span class=\"ql-author-126\">In the previous article, we have\u00a0made a complete introduction to the birth and features of Linglong, which was shown for the first time.<\/span><\/p>\n<p><a href=\"https:\/\/www.deepin.org\/index\/en\" target=\"_blank\" rel=\"noopener\"><br \/>\n<button style=\"color: white;\">Start Use<\/button><br \/>\n<\/a><\/p>\n<p class=\"ql-long-126\"><span class=\"ql-author-126\">In the next articles in this series, we will display more\u00a0content about the Linglong package format. This article focuses on the problems of traditional package management, and how we create the \"Linglong solution\" based on the mainstream universal independent package formats.<\/span><\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-32188\" src=\"https:\/\/www.deepin.org\/wp-content\/uploads\/2022\/08\/\u73b2\u73d1\u82f1\u6587-1-300x128.jpg\" alt=\"\" width=\"300\" height=\"128\" srcset=\"https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2022\/08\/\u73b2\u73d1\u82f1\u6587-1-300x128.jpg 300w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2022\/08\/\u73b2\u73d1\u82f1\u6587-1-150x64.jpg 150w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2022\/08\/\u73b2\u73d1\u82f1\u6587-1-768x327.jpg 768w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2022\/08\/\u73b2\u73d1\u82f1\u6587-1-24x10.jpg 24w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2022\/08\/\u73b2\u73d1\u82f1\u6587-1-36x15.jpg 36w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2022\/08\/\u73b2\u73d1\u82f1\u6587-1-48x20.jpg 48w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2022\/08\/\u73b2\u73d1\u82f1\u6587-1.jpg 900w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<h2 class=\"ql-long-126\" data-header=\"2\" data-default-linespacing=\"100\"><span class=\"ql-author-126\">Problems with traditional package management<\/span><\/h2>\n<p class=\"ql-long-126\"><span class=\"ql-author-126\">First, the maintenance cost for different platforms is high. Since deb and rpm are two completely separate package formats, developers need to build and maintain packages separately.\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n<p class=\"ql-long-126\"><span class=\"ql-author-126\">Second, compatibility issues can hardly be solved. Both dpkg and rpm are strongly-dependent package management systems and allow complex cross dependencies (or circular dependencies) between components, which makes maintenance a matter of great expertise. A little carelessness will lead to a complete system failure that cannot be repaired. And system upgrades often result in broken dependencies, leading to compatibility issues.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p class=\"ql-long-126\"><span class=\"ql-author-126\">Third, security needs to be improved. The permissions of traditional package formats are loosely controlled. Apps may damage the system through the Hook system, which cannot be effectively managed and controlled.\u00a0<\/span><\/p>\n<p class=\"ql-long-126\"><span class=\"ql-author-126\">Fourth, they have insufficient reliability. There is no redundant recovery design and a lack of verification mechanism. Once the package management system fails, the system can hardly be repaired.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2 class=\"ql-long-126\" data-header=\"2\" data-default-linespacing=\"100\"><span class=\"ql-author-126 ql-font-microsoftyahei\">Existing solutions<\/span><\/h2>\n<p class=\"ql-long-126\"><span class=\"ql-author-126\">To solve the above problems, there is already a solution in the Linux industry - universal independent package formats, such as Flatpak and Snap, which are dedicated to achieving the aim that applications with one format can run on all Linux distributions. <\/span><\/p>\n<p>&nbsp;<\/p>\n<p class=\"ql-long-126\"><span class=\"ql-author-126\">To achieve this goal, applications are isolated from the system, running in an independent operating environment instead of that provided by the operating system. In addition, universal independent package formats are also trying to enhance security. Usually, they use a \"sandbox\" to isolate applications from host devices, preventing viruses carried by malicious programs from infecting the entire system.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p class=\"ql-long-126\"><span class=\"ql-author-126\">However, this solution also has some problems: to make applications independent of the operating system, dependencies are encapsulated into a separate operating environment, which inevitably leads to a larger system. And to ensure versatility, a larger operating environment is required, which occupies more disk space. This problem also exists for applications. Applications need to add unique dependencies to themself, which makes the package size larger than that of traditional package formats and degrades the performance. <\/span><\/p>\n<p>&nbsp;<\/p>\n<p class=\"ql-long-126\"><span class=\"ql-author-126\">In addition, its security and compatibility also need to be strengthened. For example, as new technical solutions such as user namespace are immature, \"sandbox\" has to be started with root privileges, which results in many security vulnerabilities.<\/span><\/p>\n<h2 class=\"ql-long-126\" data-header=\"2\" data-default-linespacing=\"100\"><span class=\"ql-author-126\">Linglong solution<\/span><\/h2>\n<p class=\"ql-long-126\"><span class=\"ql-author-126\">Linglong is born for better compatibility and security, dedicated to solving various compatibility problems caused by complex package formats and cross dependencies under Linux, as well as to reducing the security risks caused by decentralized control of permissions.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p class=\"ql-long-126\"><strong class=\"ql-author-126\">In terms of technical solutions<\/strong><span class=\"ql-author-126\">, taking the excellent ideas from the mainstream universal independent package formats, Linglong manages applications, runtime, and system environments in layers, separates running dependencies of apps, and builts a universal runtime. To support deep optimization of runtime in Linux distributions, it provides a complete mechanism as well, so as to avoid too large size and bad performance.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p class=\"ql-long-126\"><span class=\"ql-author-126\">What is more, the \"sandbox\" containerization mechanism is used to run applications, which isolates applications from the system to prevent system damage.<\/span><\/p>\n<p class=\"ql-long-126\"><span class=\"ql-author-126\">In addition, root privileges of the \"sandbox\" are restricted by default to prevent applications from getting root privileges and damaging the system and to avoid privilege elevation vulnerabilities from underlying.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p class=\"ql-long-126\"><strong class=\"ql-author-126\">In terms of software distribution<\/strong><span class=\"ql-author-126\">, Linglong supports incremental online distribution by using ostree as the underlying implementation mechanism, and supports offline distribution in a bundle format as well. <\/span><\/p>\n<p>&nbsp;<\/p>\n<p class=\"ql-long-126\"><span class=\"ql-author-126\">In the next two articles, we will further explain the Linglong components and its permission management mechanism, so stay tuned!<\/span><\/p>\n<article data-content=\"[{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;mE0C-1649915796927&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;style&quot;:{&quot;textIndent&quot;:28}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;jcdh-1654485403823&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;YouTube\uff1a\u00a0&quot;,&quot;marks&quot;:[]}]},{&quot;type&quot;:&quot;inline&quot;,&quot;id&quot;:&quot;hDey-1654485403825&quot;,&quot;name&quot;:&quot;link&quot;,&quot;data&quot;:{&quot;href&quot;:&quot;https:\/\/www.youtube.com\/channel\/UC-Gdjh0hQDeKHdqm4RrFPdw&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;vGFH-1654485403824&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;https:\/\/www.youtube.com\/channel\/UC-Gdjh0hQDeKHdqm4RrFPdw&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;K6bW-1654485403826&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;I47B-1649915799437&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;style&quot;:{&quot;textIndent&quot;:28}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;cYUo-1654485403827&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;Facebook\uff1a\u00a0&quot;,&quot;marks&quot;:[]}]},{&quot;type&quot;:&quot;inline&quot;,&quot;id&quot;:&quot;rhOS-1654485403829&quot;,&quot;name&quot;:&quot;link&quot;,&quot;data&quot;:{&quot;href&quot;:&quot;https:\/\/www.facebook.com\/deepinlinux&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;97bn-1654485403828&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;https:\/\/www.facebook.com\/deepinlinux&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;OwPO-1654485403830&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;81Fj-1652687924140&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;style&quot;:{&quot;textIndent&quot;:28}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;gRAP-1654485403831&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;Telegram\uff1a\u00a0&quot;,&quot;marks&quot;:[]}]},{&quot;type&quot;:&quot;inline&quot;,&quot;id&quot;:&quot;fIf4-1654485403833&quot;,&quot;name&quot;:&quot;link&quot;,&quot;data&quot;:{&quot;href&quot;:&quot;https:\/\/t.me\/deepin&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;HpKW-1654485403832&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;https:\/\/t.me\/deepin&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;orl2-1654485403834&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;Y0Sz-1649915697317&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;style&quot;:{&quot;textIndent&quot;:28}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;L5zk-1654485403835&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;Twitter\uff1a\u00a0&quot;,&quot;marks&quot;:[]}]},{&quot;type&quot;:&quot;inline&quot;,&quot;id&quot;:&quot;224H-1654485403837&quot;,&quot;name&quot;:&quot;link&quot;,&quot;data&quot;:{&quot;href&quot;:&quot;https:\/\/twitter.com\/linux_deepin\/&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;T6aa-1654485403836&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;https:\/\/twitter.com\/linux_deepin\/&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;WWp4-1654485403838&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;Zv8P-1649915720943&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;style&quot;:{&quot;textIndent&quot;:28}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;O3dT-1654485403839&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;Reddit\uff1a\u00a0&quot;,&quot;marks&quot;:[]}]},{&quot;type&quot;:&quot;inline&quot;,&quot;id&quot;:&quot;r6GV-1656309011686&quot;,&quot;name&quot;:&quot;link&quot;,&quot;data&quot;:{&quot;href&quot;:&quot;https:\/\/www.reddit.com\/r\/deepin\/&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;qH6o-1656309011685&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;https:\/\/www.reddit.com\/r\/deepin\/&quot;,&quot;marks&quot;:[]}]}]},{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;vRMW-1656309011696&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;&quot;,&quot;marks&quot;:[]}]}],&quot;state&quot;:{}},{&quot;type&quot;:&quot;block&quot;,&quot;id&quot;:&quot;q06K-1649915736615&quot;,&quot;name&quot;:&quot;paragraph&quot;,&quot;data&quot;:{&quot;style&quot;:{&quot;textIndent&quot;:28}},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;iRlY-1654485403843&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;Discord\uff1a&quot;,&quot;marks&quot;:[]}]},{&quot;type&quot;:&quot;inline&quot;,&quot;id&quot;:&quot;EdGg-1654485403846&quot;,&quot;name&quot;:&quot;link&quot;,&quot;data&quot;:{&quot;href&quot;:&quot;https:\/\/discord.gg\/xjjkcp6H2P&quot;},&quot;nodes&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;Oiyp-1654485403844&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;https:\/\/discord.gg\/xjjkcp6H2P&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:14}]}]}]},{&quot;type&quot;:&quot;text&quot;,&quot;id&quot;:&quot;h6cl-1654485403847&quot;,&quot;leaves&quot;:[{&quot;text&quot;:&quot;&quot;,&quot;marks&quot;:[{&quot;type&quot;:&quot;fontSize&quot;,&quot;value&quot;:14}]}]}],&quot;state&quot;:{}}]\">\n<div>YouTube\uff1a <a href=\"https:\/\/www.youtube.com\/channel\/UC-Gdjh0hQDeKHdqm4RrFPdw\">https:\/\/www.youtube.com\/channel\/UC-Gdjh0hQDeKHdqm4RrFPdw<\/a><\/div>\n<div>Facebook\uff1a <a href=\"https:\/\/www.facebook.com\/deepinlinux\">https:\/\/www.facebook.com\/deepinlinux<\/a><\/div>\n<div>Telegram\uff1a <a href=\"https:\/\/t.me\/deepin\">https:\/\/t.me\/deepin<\/a><\/div>\n<div>Twitter\uff1a <a href=\"https:\/\/twitter.com\/linux_deepin\/\">https:\/\/twitter.com\/linux_deepin\/<\/a><\/div>\n<div>Reddit\uff1a <a href=\"https:\/\/www.reddit.com\/r\/deepin\/\">https:\/\/www.reddit.com\/r\/deepin\/<\/a><\/div>\n<div>Discord\uff1a<a href=\"https:\/\/discord.gg\/xjjkcp6H2P\">https:\/\/discord.gg\/xjjkcp6H2P<\/a><\/div>\n<\/article>\n<p><a href=\"https:\/\/www.deepin.org\/index\/en\" target=\"_blank\" rel=\"noopener\"><br \/>\n<button style=\"color: white;\">Start Use<\/button><br \/>\n<\/a>","protected":false},"excerpt":{"rendered":"<p>In the previous article, we have\u00a0made a complete introduction to the birth and features of Linglong, which was shown for the first time.<\/p>\n","protected":false},"author":11164,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[155],"tags":[144,148,141,147,142],"_links":{"self":[{"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/posts\/32230"}],"collection":[{"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/users\/11164"}],"replies":[{"embeddable":true,"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/comments?post=32230"}],"version-history":[{"count":9,"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/posts\/32230\/revisions"}],"predecessor-version":[{"id":32310,"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/posts\/32230\/revisions\/32310"}],"wp:attachment":[{"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/media?parent=32230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/categories?post=32230"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/tags?post=32230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}