如意玲珑支持发行版再添新成员,openEuler安装使用如意玲珑操作指南
创始人
2024-09-25 14:55:28
0

 查看原文

如意玲珑(Linyaps)项目已与开放原子开源基金会完成捐赠协议签署,目前如意玲珑已成为基金会的正式孵化期项目。

如意玲珑是开源软件包格式,用于替代 deb、rpm等包管理工具,实现应用包管理、分发、容器、集成开发工具等功能。作为一种新型的独立包管理工具集,如意玲珑主要提供分层与隔离的运行环境,来解决传统包管理系统强依赖导致的兼容性问题,以及权限松散导致的安全问题。减少不同操作系统下分发时的打包次数,做到“一个架构,一次构建”,为Linux生态发展提供了坚实的基础。

如意玲珑发行版适配进展

  • 在openEuler系统上如意玲珑已集成到Eur仓库,添加该仓库后,用户手动安装使用;
  • 在UOS 1070系统上添加如意玲珑外网仓库到系统仓库后,用户手动安装使用;
  • 如意玲珑已集成到deepin V23系统,用户可直接使用;
  • 目前适配了openKylin、麒麟专业版、Ubuntu 24.04和Debian 12。对于即将发布的1.6版本,将提供各发行版的独立仓库,用户可以手动添加使用。

近日,如意玲珑官网使用手册新增openEuler添加如意玲珑仓库源介绍,诚邀您抢先体验。

openEuler安装如意玲珑

本文适用于1.5.6版本, 请使用 ll-cli --version 检查您的如意玲珑程序版本。 

1、如意玲珑组成

  • ll-builder 用来构建和调试如意玲珑应用,由 linglong-builder 提供; 

  • ll-box 沙箱容器,由 linglong-box 提供; 

  • ll-cli 管理和运行如意玲珑应用,由 linglong-bin 提供。 

2、openEuler添加如意玲珑仓库源并更新仓库信息

sudo curl -o /etc/yum.repos.d/linglong.repo -L https://eur.openEuler.openatom.cn/coprs/kamiyadm/linglong/repo/openEuler-24.03_LTS/kamiyadm-linglong-openEuler-24.03_LTS.repo  sudo dnf update

3、安装玲珑环境

sudo dnf install linglong-builder linglong-box linglong-bin

4、安装桌面环境(可选) 

如果想运行gui类型应用,需要安装桌面环境,仅运行终端类型应用不需要安装桌面环境。这里以安装DDE为例,也支持在其他桌面环境下使用,如KDE,GNOME。

sudo dnf install dde  sudo systemctl set-default graphical.target

5、重启系统 

sudo reboot

openEuler使用如意玲珑

1、使用构建工具ll-builder 

1.1创建项目 

创建如意玲珑项目命令:

ll-builder create

查看 ll-builder create 命令的帮助信息:

ll-builder create --help

ll-builder create 命令的帮助信息如下:

Usage: ll-builder [options] create    Options:   -v, --verbose  show detail log   -h, --help     Displays help on commandline options.   --help-all     Displays help including Qt specific options.   Arguments:   create         create build template project   name           project name

ll-builder create命令根据输入的项目名称,在当前目录创建对应的文件夹,同时生成构建所需的 linglong.yaml模板文件。示例:

ll-builder create org.deepin.hello

命令输出如下:

org.deepin.hello/  └── linglong.yaml

1.2 编辑linglong.yaml

linglong.yaml 文件语法的版本:version: "1"

软件包元信息配置:

package: id: org.deepin.hello name: hello version: 0.0.0.1 kind: app description: / simple  demo.

基础环境,最小的根文件系统:

base: org.deepin.foundation/23.0.0

如意玲珑应用的启动命令:

command: [echo, -e, hello world]

在容器内构建项目需要的命令:

build: / echo 'hello' #some operation to build this project

完整的linglong.yaml配置内容如下:

version: "1"  package: id: org.deepin.hello name: your name #set your application name version: 0.0.0.1 #set your version kind: app description: / your description #set a brief text to introduce your application.  command: [echo, -e, hello world] #the commands that your application need to run.  base: org.deepin.foundation/23.0.0 #set the base environment, this can be changed.  #set the runtime environment if you need, a example of setting deepin runtime is as follows. #runtime: #org.deepin.Runtime/23.0.1  #set the source if you need, a simple example of git is as follows. #sources: #  - kind: git #    url: https://github.com/linuxdeepin/linglong-builder-demo.git #    version: master\n #    commit: a3b89c3aa34c1aff8d7f823f0f4a87d5da8d4dc0  build: / echo 'hello' #some operation to build this project

1.3 构建应用

ll-builder build命令用来构建如意玲珑应用。

查看ll-builder build命令的帮助信息:

ll-builder build --help

ll-builder build命令的帮助信息如下:

 --exec       run exec than build script    --offline             only use local files. This implies --skip-fetch-source                          and --skip-pull-depend    --skip-fetch-source   skip fetch sources    --skip-pull-depend    skip pull dependency    --skip-run-container  skip run container. This implies skip-commit-output    --skip-commit-output  skip commit build output    --arch          set the build arch    Arguments:  build                 build project

ll-builder build命令必须运行在工程的根目录,即 linglong.yaml文件所在位置。以如意玲珑项目 org.deepin.demo为例,构建如意玲珑应用主要步骤如下:

● 进入到 org.deepin.demo项目工程目录:

cd org.deepin.demo

● 执行 ll-builder build命令将开始构建如意玲珑应用:

ll-builder build

构建完成后,构建内容将自动提交到本地ostree缓存中。

1.4 验证应用

ll-builder run命令用来运行验证应用。

查看ll-builder run命令的帮助信息:

ll-builder run --help

ll-builder run命令的帮助信息如下:

Usage: ll-builder [options] run    Options:    -v, --verbose  show detail log    -h, --help     Displays this help.    --exec   run exec than build script    Arguments:  run            run project

在linglong.yaml文件所在位置,执行ll-builder run即可运行该应用。

示例项目org.deepin.demo运行结果如下:

hello

也可从构建缓存中导出成离线文件,通过客户端工具ll-cli安装使用。

1.5导出离线文件

ll-builder提供了子命令export来导出离线文件(.uab/.layer)。

查看ll-builder export命令的帮助信息:

ll-builder export --help

ll-builder export命令的帮助信息如下:

Usage: ll-builder [options]    Options:    -v, --verbose      show detail log (deprecated, use QT_LOGGING_RULES)    -h, --help         Displays help on commandline options.    --help-all         Displays help including Qt specific options.    -f, --file   file path of the linglong.yaml (default is ./linglong.yaml)    -i, --icon   uab icon (optional)    -l, --layer        export layer file

在linglong.yaml文件所在位置,执行以下命令即可将构建缓存导出离线文件:

ll-builder export --layer

执行成功后,将在当前目录下,生成两个以.layer结尾的文件:

org.deepin.demo_0.0.0.1_x86_64_develop.layer   org.deepin.demo_0.0.0.1_x86_64_binary.layer

包含binary(此前这部分名为runtime)的部分为应用的主要运行内容,develop 在 binary 的基础上保留调试环境(如调试符号)。

2、使用客户端ll-cli

2.1 安装玲珑应用

2.1.1使用ll-cli install安装

首先查看ll-cli install命令的帮助信息:

ll-cli install --help

ll-cli install命令的帮助信息如下:

linglong CLI A CLI program to run application and manage linglong pagoda and tiers.  Usage: ll-cli [--json] --version ll-cli [--json] run APP [--no-dbus-proxy] [--dbus-proxy-cfg=PATH] ( [--file=FILE] | [--url=URL] ) [--] [COMMAND...] ll-cli [--json] ps ll-cli [--json] exec PAGODA [--working-directory=PATH] [--] COMMAND... ll-cli [--json] enter PAGODA [--working-directory=PATH] [--] [COMMAND...] ll-cli [--json] kill PAGODA ll-cli [--json] [--no-dbus] install TIER ll-cli [--json] uninstall TIER [--all] [--prune] ll-cli [--json] upgrade TIER ll-cli [--json] search [--type=TYPE] [--dev] TEXT ll-cli [--json] [--no-dbus] list [--type=TYPE] ll-cli [--json] repo modify [--name=REPO] URL ll-cli [--json] repo show ll-cli [--json] info TIER ll-cli [--json] content APP  Arguments: APP     Specify the application. PAGODA  Specify the pagodas (container). TIER    Specify the tier (container layer). URL     Specify the new repo URL. TEXT    The text used to search tiers.  Options: -h --help                 Show help information of ll-cli. --version                 Show version. --json                    Use json to output command result, you can get the description of the output refer to linglong api documentation(/usr/share/linglong/api/api.json). --no-dbus                 Use peer to peer DBus, this is used only in case that DBus daemon is not available. --no-dbus-proxy           Do not enable linglong-dbus-proxy. --dbus-proxy-cfg=PATH     Path of config of linglong-dbus-proxy. --file=FILE               you can refer to https://linglong.dev/guide/ll-cli/run.html to use this parameter. --url=URL                 you can refer to https://linglong.dev/guide/ll-cli/run.html to use this parameter. --working-directory=PATH  Specify working directory. --type=TYPE               Filter result with tiers type. One of "runtime", "app" or "all". [default: app] --state=STATE             Filter result with the tiers install state. Should be "local" or "remote". [default: local] --prune                   Remove application data if the tier is an application and all version of that application has been removed. --dev                     include develop tiers in result.  Subcommands: run        Run an application. ps         List all pagodas. exec       Execute command in a pagoda. enter      Enter a pagoda. kill       Stop applications and remove the pagoda. install    Install tier(s). uninstall  Uninstall tier(s). upgrade    Upgrade tier(s). search     Search for tiers. list       List known tiers. repo       Display or modify information of the repository currently using. info       Display the information of layer content    Display the exported files of application

从玲珑仓库安装玲珑应用,以百度网盘为例:

ll-cli install com.baidu.baidunetdisk

ll-cli install命令需要输入应用完整的id,若仓库有多个版本则会默认安装最高版本。安装指定版本需在 appid后附加对应版本号:

ll-cli install com.baidu.baidunetdisk/4.17.7.0

应用安装完成后,客户端会显示安装结果。

2.1.2从本地通过离线文件安装应用

以构建示例org.deepin.demo为例:

安装.layer 文件:

ll-cli install ./org.deepin.demo_0.0.0.1_x86_64_binary.layer

查看安装是否成功命令:

ll-cli list | grep org.deepin.demo

2.2 运行玲珑应用

如果有桌面环境的情况下,可以通过双击启动器下的图标运行应用,或通过终端命令行运行,使用run命令运行应用:

ll-cli run org.deepin.demo

 如意玲珑生态共建

已有数十家企业、数十位个人开发者参与如意玲珑应用生态贡献,目前已成功适配超过2000款玲珑应用,这些应用将逐步上架至如意玲珑网页版商店、deepin以及统信应用商店,为广大用户提供更丰富的选择和更便捷的体验。诚挚邀请广大伙伴及用户加入如意玲珑生态共建,携手推动Linux生态的进步和发展。

附录:

(1)deepin 历史版本镜像(含 deepin V15)

(2)如意玲珑社区官网

(3)如意玲珑代码仓库

相关内容

热门资讯

安卓系统为什么不封闭,揭秘安卓... 你有没有想过,为什么安卓系统那么开放,却不像苹果iOS那样封闭呢?这背后可是有着不少有趣的故事和原因...
安卓系统更新包多大,解析不同版... 你有没有发现,每次安卓系统更新,手机里都会多出那么几个G的文件?这可真是让人好奇,安卓系统更新包究竟...
安卓手机安装双系统吗,安卓手机... 你有没有想过,你的安卓手机是不是也能像电脑一样,装上两个系统,一个用来工作,一个用来娱乐?没错,这就...
oppo会升级安卓系统,畅享最... 你知道吗?最近有个大消息在手机圈里炸开了锅,那就是OPPO要升级安卓系统啦!这可不是什么小打小闹的更...
安卓系统上安装windows,... 你有没有想过,在安卓手机上安装Windows系统?听起来是不是有点不可思议?但你知道吗,这竟然是可能...
安卓系统怎么进运行框,安卓系统... 你有没有想过,你的安卓手机里有一个超级实用的功能,那就是运行框!它就像是一个小助手,帮你快速找到正在...
安卓系统电视无图像设置,安卓电... 你家的安卓系统电视突然没图像了?别急,让我来给你支个招,让你轻松解决这个问题!一、检查电源和连接线首...
安卓机建议升级系统吗,提升性能 你有没有发现,你的安卓手机最近有点儿慢吞吞的?是不是在犹豫要不要升级系统呢?别急,让我来给你好好分析...
升级不了安卓系统升级,探寻升级... 你有没有遇到过这种情况?手机里的安卓系统突然告诉你,它需要升级,但你左等右等,就是升不上去。这可真是...
备用安卓系统手机推荐,盘点热门... 你有没有想过,如果你的手机突然罢工了,你会怎么办?别担心,今天我就要给你安利几款备用安卓系统手机,让...
旧安卓系统ipad无法更新系统... 你有没有遇到过这种情况?你的旧安卓系统iPad突然告诉你,它无法更新系统了!是不是瞬间感觉心里有点小...
运行安卓6系统命令大全,全面掌... 你有没有想过,你的安卓手机里隐藏着无数强大的功能,只等着你去发现和探索呢?今天,就让我带你走进安卓6...
安卓系统简笔画教程下载,轻松绘... 你有没有想过,用简单的线条就能把复杂的安卓系统画出来?没错,就是那种一看就懂,一画就上手的感觉!今天...
华为如何鸿蒙转安卓系统,轻松实... 你知道吗?最近华为的大动作可是让整个科技圈都沸腾了!他们竟然把鸿蒙系统转到了安卓系统上,这可真是让人...
安卓10系统的问题,安卓10系... 你有没有发现,自从你的手机升级到安卓10系统后,好像有点不对劲呢?别急,让我来给你细细道来,看看安卓...
安卓系统苹果搞笑视频,苹果搞笑... 你知道吗?在互联网的世界里,搞笑视频可是个永恒的热门话题。尤其是那些结合了安卓系统和苹果手机的搞笑片...
卡片机改造安卓系统,探索改造之... 你有没有想过,那些曾经陪伴我们记录美好时光的卡片机,现在竟然也能焕发第二春呢?没错,就是那些小巧便携...
装安卓系统倒车出不来,智能科技... 你有没有遇到过这样的事情:手机装了个安卓系统,结果倒车的时候出不来啦?这可不是闹着玩的,简直让人抓狂...
定制安卓系统哪家好点儿,哪家服... 你有没有想过,手机系统就像是个人的衣服,每个人都需要找到最适合自己的那一款?今天,咱们就来聊聊定制安...
台电用回安卓系统吗,开启智能新... 最近有个话题在科技圈里炒得挺热的,那就是台电是不是要用回安卓系统了?你有没有想过,这个小小的决定背后...