Skip to content

Commit

Permalink
sync docs automatically.
Browse files Browse the repository at this point in the history
  • Loading branch information
ComixHe authored and black-desk committed May 15, 2024
1 parent 0447bfd commit b1a3712
Show file tree
Hide file tree
Showing 34 changed files with 1,053 additions and 172 deletions.
28 changes: 7 additions & 21 deletions en/guide/debug/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,73 +9,59 @@ SPDX-License-Identifier: LGPL-3.0-or-later
1. When the application runs to read the application installation resource file under `/usr/share`, why does the reading fail?

Linglong applications run in a container, and the application data will be mounted to `/opt/apps/<appid>`/. Only system data will exist in the `/usr/share` directory, and there will be no application-related data. Therefore, reading directly from `/usr/share` will fail. Suggested processing: Use the `XDG_DATA_DIRS` environment variable to read resources, and `/opt/apps/<appid>/files/share` will exist in this environment variable search path.

2. The font library file cannot be found when the application is running. Why can the corresponding font library be read when the `deb` package is installed?

When the `deb` package is installed, it will depend on the corresponding font library file. The Linglong package format adopts a self-sufficient packaging format. Except for the basic system library, `qt` library and `dtk` library files provided in `runtime`, do not need to be provided by yourself, other dependent data files need to be provided by yourself. It is recommended to put the corresponding data file under `files/share`, and use the environment variable `XDG_DATA_DIRS` to read the path.

3. What is in the Linglong application `runtime`? Can you add some library files to it?

At present, the `runtime` that Linglong application depends on provides the `qt` library and the `dtk` library. Because `runtime` has a strict size limit, adding additional library files to `runtime` is currently not allowed.

4. The application runs in the container. Can a configuration file be created in any path of the container during the running process?

This is not allowed. The file system in the container is a read-only file system and configuration files are not allowed to be created under arbitrary paths.

5. Where is app data saved? Where can I find it outside the container?

Because Linglong applications follow the principle of non-interference, the `XDG_DATA_HOME`, `XDG_CONFIG_HOME`, `XDG_CACHE_HOME` environment variables are defined in the corresponding path of the host machine, `~/.linglong/<appid>`/. So the user application data will be saved under this path. When writing data while the application is running, it should also be able to read the corresponding environment variable to write the data. Mutual configuration calls between applications are prohibited.

6. The application provides the `dbus service` file, where do I place it? What does the `Exec` segment write?

When the application provides the `dbus service` file, it needs to be placed in the `entries/dbus-1/services` directory. If `Exec` executes the binary in the Linglong package, use the `--exec` option parameter to execute the corresponding binary.

7. Can the application download files to the `$HOME` directory by default? I downloaded the file, why can't I find it on the host machine?

Linglong specification does not allow files and directories to be created in the `$HOME` directory.

8. Why does the desktop shortcut icon appear as a gear or blank? How are the icon files placed?

If the gear shaped icon is displayed, the icon has not been obtained. You need to confirm whether the `Icon` path name is correct. When the icon is empty, the `tryExec` field exists. When the command does not exist, it will cause the shortcut to display improperly. Place the application icon in the `icons` directory. The directory structure should be consistent with the system `icons` directory structure. The recommended path is `icons/hicolor/scalable/apps/org.desktopspec.demo.svg`. Use `svg` format icons. Refer to the icon file format specification. If you use a non-vector format, please place the icon according to the resolution. Note that the `desktop` file should not write the icon path, but directly write the icon name.

If the gear shaped icon is displayed, the icon has not been obtained. You need to confirm whether the `Icon` path name is correct. When the icon is empty, the `tryExec` field exists. When the command does not exist, it will cause the shortcut to display improperly. Place the application icon in the `icons` directory. The directory structure should be consistent with the system `icons` directory structure. The recommended path is `icons/hicolor/scalable/apps/org.desktopspec.demo.svg`. Use `svg` format icons. Refer to the icon file format specification. If you use a non-vector format, please place the icon according to the resolution. Note that the `desktop` file should not write the icon path, but directly write the icon name.
9. Why do `xdg-open` and `xdg-email` that come with the application fail?

Linglong specially handles `xdg-open` and `xdg-email` in `runtime`, so the application is forbidden to execute the executable file or script of `xdg-open` and `xdg-email` that it carries.

Linglong specially handles `xdg-open` and `xdg-email` in `runtime`, so the application is forbidden to execute the executable file or script of `xdg-open` and `xdg-email` that it carries.
10. Why doesn't the system environment variable used by the application take effect?

When using environment variables, you need to confirm whether there are corresponding environment variables in the container. If not, you need to contact the Linglong team for processing.

11. The library files required for the application to run were not found. How can I provide them?

The resource files that the application needs to use and the library files both need to be provided by the application itself. The library files are placed in the `files/lib` path.

The resource files that the application needs to use and the library files both need to be provided by the application itself. The library files are placed in the `$PREFIX/lib` path.
12. Where can I choose the application download directory?

Currently Linglong users can only choose the `Desktop`, `Documents`, `Downloads`, `Music`, `Pictures`, `Videos`, `Public`, and `Templates` directories under the user's home directory, and cannot be downloaded to other directories.

13. Why has the `QTWebEngine` rendering process crashed when the application is running?

Due to the system upgrade of `glibc`, the application fails to use the built-in browser, and the application needs to be re-adapted. A temporary solution is to set the environment variable: `export QTWEBENGINE_DISABLE_container=1`.

14. When the application is running, the `libqxcb.so` library cannot be found or the `qtwebengine` error is reported. What can I do?

When a `qt.conf` file exists, you need to configure the correct path in the file or use the `QTWEBENGINEPROCESS_PATH`, `QTWEBENGINERESOURCE_PATH`, `QT_QPA_PLATFORM_PLUGIN_PATH`, and `QT_PLUGIN_PATH` environment variables to configure the search path.

15. The application running error message `gpu_data_manager_impl_private`, how can I solve it?

The current temporary solution is to add `--no-container`.

Reference: <https://github.com/Automattic/simplenote-electron/issues/3044>

Reference: [https://github.com/Automattic/simplenote-electron/issues/3044](https://github.com/Automattic/simplenote-electron/issues/3044)
16. Can the application carry the database file by itself and write data to the database during operation?

The file system in the container is a read-only file system and does not allow data to be written to application resource files.

17. Why does the execution of binary with `suid` and `guid` permissions fail?

In order to ensure system security, Linglong container prohibits the execution of such permission binaries in the container.

18. Can the input method of uab offline package format not be used under Debian and Ubuntu?

It is recommended to install the `fictx` input method to experience it.
19. How can I know which packages are installed in a container environment?

Enter the container environment using the command `ll-builder run --exec bash`. To view the pre-installed packages, utilize the command `cat /var/lib/dpkg/status | grep "^Package: "`. Additionally, for libraries compiled from source code, you can inspect them using `cat /runtime/packages.list`.
4 changes: 2 additions & 2 deletions en/guide/ll-builder/manifests.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ cd org.deepin.foundation
bash build_base.sh eagle amd64
```

该项目用来构建玲珑使用的根文件系统。eagle 指发行版代号,amd64 指架构。
The project is designed to construct the root filesystem utilized by Linglong, with "eagle" referring to the codename of the distribution and "amd64" indicating the architecture.

| Distribution version | Arch |
| -------------------- | ------------------------- |
| eagle (uos 20) | amd64、arm64、loongarch64 |
| eagle (UOS 20) | amd64、arm64、loongarch64 |
| beige (deepin 23) | amd64、arm64 |

### Build runtime
Expand Down
14 changes: 14 additions & 0 deletions en/guide/ll-cli/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,17 @@ message: install org.deepin.calculator, version:5.7.21.4 success
```

After the application is installed, the installation result will be displayed.

The layer files we export using the `ll-builder export` command can be installed using the `ll-cli install` command.

```bash
ll-cli install ./com.baidu.baidunetdisk_4.17.7.0_x86_64_runtime.layer
```

You can use the command `ll-cli list | grep com.baidu.baidunetdisk` to check if it has been installed successfully.

Run the application using the following command.

```bash
ll-cli run com.baidu.baidunetdisk
```
6 changes: 6 additions & 0 deletions en/guide/ll-cli/query.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,9 @@ appId name version
org.deepin.calculator deepin-calculator 5.5.23 x86_64 linglong runtime Calculator for UOS
org.deepin.calculator deepin-calculator 5.7.1 x86_64 linglong runtime Calculator for UOS
```

If you need to look up Base and Runtime, you can use the following command:

```bash
ll-cli search . --type=runtime
```
35 changes: 35 additions & 0 deletions en/guide/ll-pica/adep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## Add dependency

Linglong applications may lack package dependencies, which can currently
be addressed by adding the corresponding package dependencies in the `linglong.yaml` file.

The `ll-pica adep` command is used to add package dependencies to the `linglong.yaml` file.

View the help information for the `ll-cli adep` command:

```bash
ll-pica adep --help
```

Here is the output:

```bash
Add dependency packages to linglong.yaml

Usage:
ll-pica adep [flags]

Flags:
-d, --deps string dependencies to be added, separator is ','
-h, --help help for adep
-p, --path string path to linglong.yaml (default "linglong.yaml")

Global Flags:
-V, --verbose verbose output
```

```bash
ll-builder adep -d "dep1,dep2" -p /path/to/linglong.yaml
```

If executing within the same path where the `linglong.yaml` file resides, there is no need to include the `-p` parameter.
72 changes: 72 additions & 0 deletions en/guide/ll-pica/convert.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
## Conversion application

The `ll-pica convert` command is used to generate the `linglong.yaml` file required by Linglong.

View the help information for the `ll-cli convert` command:

```bash
ll-pica convert --help
```

Here is the output:

```bash
Convert deb to uab

Usage:
ll-pica convert [flags]

Flags:
-b, --build build linglong
-c, --config string config file
-h, --help help for convert
--pi string package id
--pn string package name
-t, --type string get app type (default "local")
-w, --workdir string work directory

Global Flags:
-V, --verbose verbose output
```

Translation: After executing the `ll-pica init -w w --pi com.baidu.baidunetdisk --pn com.baidu.baidunetdisk -t repo` command

We only need to execute the command `ll-pica convert -w w -b` to convert the Linglong application. Here, we will use the `apt download` command to download the deb package named `com.baidu.baidunetdisk`.

```bash
ll-pica convert -c com.baidu.baidunetdisk_4.17.7_amd64.deb -w work -b
```

:::tip
Here, the `apt download` command is used to download the deb package; however, the process may fail due to
the deb package being excessively large or issues with obtaining the link. It is recommended to use the following command instead. If you use the following command directly, there is no need to execute the command `ll-pica init -w w --pi com.baidu.baidunetdisk --pn com.baidu.baidunetdisk -t repo`.
:::

```bash
apt download com.baidu.baidunetdisk
```

```bash
ll-pica convert -c com.baidu.baidunetdisk_4.17.7_amd64.deb -w w -b
```

- -w working directory。
- -c The configuration method employed here utilizes deb files.
- -b It indicates that a build is required; without adding this parameter, neither building nor exporting the layer file will take place.

The constructed products are as follows:

```bash
├── package
│ └── com.baidu.baidunetdisk
│ └── amd64
│ ├── com.baidu.baidunetdisk_4.17.7.0_x86_64_develop.layer
│ ├── com.baidu.baidunetdisk_4.17.7.0_x86_64_runtime.layer
│ ├── linglong
│ └── linglong.yaml
└── package.yaml
```

Layer files are divided into two categories: `runtime` and `develop`. The `runtime` includes the application's execution environment, while the `develop` layer, built upon the `runtime`, retains the debugging environment.

Installing Layer Files and Running the Application Reference:[Install Linglong Apps](../ll-cli/install.md)
11 changes: 11 additions & 0 deletions en/guide/ll-pica/faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# FAQ

1. Where is the default configuration located for the `linglong.yaml` file generated by `ll-pica`?

The configuration file for `ll-pica` is located at `~/.pica/config.json`.
2. Does ll-pica fail to convert software such as Wine, Android apps, input methods, or security applications?

Linglong applications currently do not support this type of application, and consequently, ll-pica cannot convert them either.
3. Why is there no sound from software that requires audio?

Prompt "libpulsecommon-12.2.so not found" can be addressed by adding a line in the `build` section of the linglong.yaml file: `mv $PREFIX/lib/$TRIPLET/pulseaudio/* $PREFIX/lib/$TRIPLET`.
79 changes: 79 additions & 0 deletions en/guide/ll-pica/init.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Initialization configuration

The `ll-pica init` command is used to initialize the configuration information for the conversion package.

View the help information for the `ll-cli init` command:

```bash
ll-pica init --help
```

Here is the output:

```bash
init config template

Usage:
ll-pica init [flags]

Flags:
-a, --arch string runtime arch
-c, --config string config file
--dv string distribution Version
-h, --help help for init
--pi string package id
--pn string package name
-s, --source string runtime source
-t, --type string get type
-v, --version string runtime version
-w, --workdir string work directory

Global Flags:
-V, --verbose verbose output
```

The specific command as follows:

```bash
ll-pica init -w w --pi com.baidu.baidunetdisk --pn com.baidu.baidunetdisk -t repo
```

- -w working directory
- --pi specifies the appid used by the Linglong application.
- --pn specifies the correct package name that apt can search for.
- -t specifies the type to retrieve, `repo` fetches from the apt repository.

The specific configuration is as follows:

```bash
runtime:
version: 23.0.1
base_version: 23.0.0
source: https://community-packages.deepin.com/beige/
distro_version: beige
arch: amd64
file:
deb:
- type: repo
id: com.baidu.baidunetdisk
name: com.baidu.baidunetdisk
```

Detailed Field Reference: [Manifests](../manifests.md)

:::tip
The default configuration file `~/.pica/config.json`
is set to use Deepin v23. If you need to specify UOS 20 as the BASE and
RUNTIME, modify the default configuration using the following command.
Please update the link below, [https://professional-packages.chinauos.com/desktop-professional](https://professional-packages.chinauos.com/desktop-professional), to a version that does not require authentication.
:::

```bash
ll-pica init --rv "20.0.0" --bv "20.0.0" -s "https://professional-packages.chinauos.com/desktop-professional" --dv "eagle/1070"
```

If it needs to be used on arm64, the default architecture needs to be modified.

```bash
ll-pica init -a "arm64"
```
35 changes: 35 additions & 0 deletions en/guide/ll-pica/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# ll-pica Introduction

This tool currently provides the capability to convert DEB packages into Linglong packages. Only software packages that comply with the app store packaging standards are supported for conversion. Packages related to Wine, Android emulators, input methods, and security software cannot be converted at this time.

View the help information for the `ll-pica` command:

```bash
ll-pica --help
```

Here is the output:

```bash
Convert the deb to uab. For example:
Simple:
ll-pica init -c package -w work-dir
ll-pica convert -c package.yaml -w work-dir
ll-pica help

Usage:
ll-pica [command]

Available Commands:
adep Add dependency packages to linglong.yaml
convert Convert deb to uab
help Help about any command
init init config template

Flags:
-h, --help help for ll-pica
-V, --verbose verbose output
-v, --version version for ll-pica

Use "ll-pica [command] --help" for more information about a command.
```
Loading

0 comments on commit b1a3712

Please sign in to comment.