From e1e8cdf16a816913206b339c91c1e9cd43a17e65 Mon Sep 17 00:00:00 2001 From: Pau Rodriguez-Estivill Date: Tue, 14 Mar 2023 20:17:05 +0100 Subject: [PATCH] Update snap documentation --- README.md | 1 + doc/snap.md | 51 ++++++++++++++++++++++++++++----------------------- 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index d5c6726169..73c860bf77 100644 --- a/README.md +++ b/README.md @@ -173,6 +173,7 @@ Game Boy (Advance), Nintendo DS ROMs and Nintendo 3DS FIRMs, various filesystems ## Packaging Status +* [![Snap package](https://snapcraft.io/radare2/badge.svg)](https://snapcraft.io/radare2) * [![Termux package](https://repology.org/badge/version-for-repo/termux/radare2.svg)](https://repology.org/project/radare2/versions) * [![Alpine Linux Edge package](https://repology.org/badge/version-for-repo/alpine_edge/radare2.svg)](https://repology.org/project/radare2/versions) [![Alpine Linux 3.13 package](https://repology.org/badge/version-for-repo/alpine_3_13/radare2.svg)](https://repology.org/project/radare2/versions) [![Alpine Linux 3.12 package](https://repology.org/badge/version-for-repo/alpine_3_12/radare2.svg)](https://repology.org/project/radare2/versions) * [![Arch package](https://repology.org/badge/version-for-repo/arch/radare2.svg)](https://repology.org/project/radare2/versions) [![AUR package](https://repology.org/badge/version-for-repo/aur/radare2.svg)](https://repology.org/project/radare2/versions) diff --git a/doc/snap.md b/doc/snap.md index f165a1fac6..b3627972ec 100644 --- a/doc/snap.md +++ b/doc/snap.md @@ -4,25 +4,29 @@ radare2 is also available as a snap package and can be installed on a system tha Status of snap package support ------------------------------ -Currently, radare2 is available as a _beta_ snap package that works in _devmode_ security confinement (developer mode). Refer back to this section for updated instructions when radare2 is out of _beta/devmode_. +Currently, radare2 is available as a snap package that works in _classic_ security confinement. Currently, you need to prepend `radare2.` to each command you want to run. For example, use `radare2.rabin2` to run `rabin2`. -Snap packages that work in _devmode_ security confinement do not appear in search results, when you search for them in the Snap Store. To find information about this snap package, run `snap info radare2`. See the section below on this. +[![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-black.svg)](https://snapcraft.io/radare2) + +To find information about this snap package, run `snap info radare2`. See the section below on this. Installing radare2 ----------------- -This command installs the `radare2` snap package from the _beta_ channel, using the _devmode_ (developer mode) security confinement type. The _devmode_ security confinement disables any restrictions that are applied to typical snap packages. _devmode_ makes a package to work similar to APT and RPM packages. +This command installs the `radare2` snap package using the _classic_ security confinement type. The _classic_ security confinement disables some restrictions that are applied to typical snap packages. _classic_ makes a package to work similar to APT and RPM packages. - $ sudo snap install radare2 --channel=beta --devmode + $ sudo snap install radare2 --classic Running commands ---------------- Currently, the radare2 commands can be invoked with the following names: -- `radare2` or `radare2.radare2`: The `r2`/`radare2` command. +- `radare2` or `radare2.r2` or `radare2.radare2`: The `r2`/`radare2` command. +- `radare2.r2p` : The `r2p` command. - `radare2.r2pm` : The `r2pm` command. +- `radare2.r2r` : The `r2r` command. - `radare2.r2agent` : The `r2agent` command. - `radare2.rafind2` : The `rafind2` command. - `radare2.rahash2` : The `rahash2` command. @@ -31,13 +35,14 @@ Currently, the radare2 commands can be invoked with the following names: - `radare2.radiff2` : The `radiff2` command. - `radare2.ragg2` : The `ragg2` command. - `radare2.rarun2` : The `rarun2` command. +- `radare2.ravc2` : The `ravc2` command. - `radare2.rax2` : The `rax2` command. - `radare2.rasign2` : The `rasign2` command. Getting info about the radare2 snap package ------------------------------------------- -Run the following command to get info about the radare2 snap package. You can see the list of available commands and how to invoke them. There are packages in the `beta` and `edge` channels, currently with radare2 4.5.0. The build number in this example is 5, and is an ascending number that characterises each new build. We have installed radare 4.5.0 from build 5, using the _devmode_ security confinement. We are _tracking_ the `beta` channel. Since the installed build number is the same as the build number in the channel that we are tracking, we are already running the latest available version. +Run the following command to get info about the radare2 snap package. You can see the list of available commands and how to invoke them. There will always be packages in the `stable` channel and sometimes in the `edge` channel. As an example, the following capture exposes that we have installed radare 4.5.0 (from build 5), using the _devmode_ security confinement and _tracking_ from the `edge` channel. ``` $ snap info radare2 @@ -52,10 +57,13 @@ description: | and operating systems. commands: + - radare2.r2 - radare2.r2agent + - radare2.r2p - radare2.r2pm + - radare2.r2r - radare2.rabin2 - - radare2.radare2 + - radare2 - radare2.radiff2 - radare2.rafind2 - radare2.ragg2 @@ -63,50 +71,47 @@ commands: - radare2.rarun2 - radare2.rasign2 - radare2.rasm2 + - radare2.ravc2 - radare2.rax2 snap-id: ceuTRkmV5T8oTHt2psXxLRma25xfBrfS -tracking: latest/beta +tracking: latest/edge refresh-date: today at 12:51 EEST channels: - latest/stable: – - latest/candidate: – - latest/beta: 4.5.0 2020-07-23 (5) 15MB devmode - latest/edge: 4.5.0 2020-07-23 (5) 15MB devmode + latest/stable: 5.8.2 2023-03-14 (2367) 145MB classic + latest/candidate: ↑ + latest/beta: ↑ + latest/edge: ↑ installed: 4.5.0 (5) 15MB devmode ``` Updating radare2 ---------------- -The snap packages that are installed in _devmode_ are not updated automatically. -You can update manually: +The snap packages are updated automatically when the installed version is not in _devmode_. +If you installed radare2 snap in the past when it was only avaiable as _devmode_ and you wish to update, you can switch to the new stable channel and get the updates by running this command: - $ sudo snap refresh radare2 + $ sudo snap refresh radare2 --stable --classic -See the section above on how to get info about the radare2 snap package and how to determine whether there is an updated version available. +See the section above on how to get info about the radare2 snap package and how to determine whether you have installed from `edge` or `beta` channels as _devmode_ or the latest from the `stable` channel as _classic_ confinement (only this last one has automatic updates). Uninstalling radare2 -------------------- Run the following command to uninstall the snap package of radare2: - $ sudo snap remove radare2 + $ sudo snap remove --purge radare2 Supported architectures ======================= The radare2 snap package is currently available for the following architectures: 1. `amd64` -1. `i386` 1. `arm64` 1. `armhf` -1. `ppc64el` -1. `s390x` Troubleshooting --------------- -- _error: snap "radare2" is not available on stable_: When installing the snap package of radare2, you currently need to specify the _beta_ channel. Append `--channel=beta` on the installation command line. -- _error: The publisher of snap "radare2" has indicated that they do not consider this revision to be of production quality_: When installing the snap package of radare2, you currently need to specify the _devmode_ confinement. Append `--devmode` on the installation command line. -- _How can I download the snap package for offline use?_: Use the command `snap download radare2 --channel=beta`. You can then run `sudo snap install` to install the `.snap` package that was just downloaded. +- _error: This revision of snap "radare2" was published using classic confinement..._: When installing the snap package of radare2, you need to specify the _classic_ confinement. Append `--classic` on the installation command line. +- _How can I download the snap package for offline use?_: Use the command `snap download radare2`. You can then run `sudo snap install` to install the `.snap` package that was just downloaded. - _Do I need to use "sudo" with snap commands?_: You need to prepend `sudo` when you run most snap commands that perform privileged actions. However, if you log in into the Snap Store using `sudo snap login`, then you do not need anymore to prepend `sudo`.