diff --git a/sources/tech/20210203 Paru - A New AUR Helper and Pacman Wrapper Based on Yay.md b/sources/tech/20210203 Paru - A New AUR Helper and Pacman Wrapper Based on Yay.md deleted file mode 100644 index 7be70e4de5..0000000000 --- a/sources/tech/20210203 Paru - A New AUR Helper and Pacman Wrapper Based on Yay.md +++ /dev/null @@ -1,155 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Paru – A New AUR Helper and Pacman Wrapper Based on Yay) -[#]: via: (https://itsfoss.com/paru-aur-helper/) -[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/) - -Paru – A New AUR Helper and Pacman Wrapper Based on Yay -====== - -One of the [main reasons that a user chooses Arch Linux][1] or an [Arch based Linux distribution][2] is the [Arch User repository (AUR)][3]. - -Unfortunately, [pacman][4], the package manager of Arch, can’t access the AUR in a similar way to the official repositories. The packages in AUR are in the form of [PKGBUILD][5] and require a manual process to be built. - -An AUR helper can automate this process. Without any doubt [yay][6] is one of the most popular and highly favoured AUR helper. - -Recently [Morganamilo][7], one of the two developers of yay, [announced][8] that is stepping away from maintaining yay and starting his own AUR helper called [paru][9]. Paru is written in [Rust][10] compared to yay that is written in [Go][11] and its design is based on yay. - -Please note that yay hasn’t reach the end of life and is still being actively maintained by [Jguer][12]. He also [commented][13] that paru may be suitable for users that looking for a feature rich AUR helper; thus I would recommend giving it a try. - -### Installing Paru AUR helper - -To install paru, open your terminal and type the following commands one by one. - -``` -sudo pacman -S --needed base-devel -git clone https://aur.archlinux.org/paru.git -cd paru -makepkg -si -``` - -Now that you have it installed, let’s see how to use it. - -### Essential commands to use Paru AUR helper - -In my opinion these are the most essential commands of paru. You can explore more on the official repository on [GitHub][9]. - - * **paru <userinput>** : Search and install <userinput>. - * **paru —** : Alias for paru -Syu - * **paru -Sua** : Upgrade AUR packages only - * **paru -Qua** : Print available AUR updates - * **paru -Gc <userinput>** : Print the AUR comments of <userinput> - - - -### Using Paru AUR helper to its full extent - -You can access the [changelog][14] of paru on GitHub for the full changelog history or you can see the changes from yay at the [first release][15]. - -#### Enable colour in Paru - -To enable colour in paru, you have to enable it first in pacman. All the [configuration files][16] are in /etc directory. In this example, I [use Nano text editor][17] but, you may use any [terminal-based text editor][18] of your choice. - -``` -sudo nano /etc/pacman.conf -``` - -Once you open the pacman configuration file, uncomment the “Color” to enable this feature. - -![][19] - -#### **Flip search order** - -The most relevant package according to your search term is normally displayed on the top of the search result. In paru, you can flip the search order to make your search easier. - -Similar to the previous example, open the paru configuration file: - -``` -sudo nano /etc/paru.conf -``` - -Uncomment the “BottomUp” term and save the file. - -![][20] - -As you can see the order is flipped and the first package appears on the bottom. - -![][21] - -#### **Edit PKGBUILDs** (For advanced user) - -If you are an experienced Linux user, you can edit AUR packages through paru. To do so, you need to enable the feature from the paru configuration file and set the file manager of your choice. - -In this example I will use the default in the configuration file i.e. the vifm file manager. If you haven’t used it you may need to install it. - -``` -sudo pacman -S vifm -sudo nano /etc/paru.conf -``` - -Open the configuration file and uncomment as shown below. - -![][22] - -Let’s go back to the [Google Calendar][23] AUR package and try to install it. You will be prompted to review the package. Type yes and click enter. - -![][24] - -Choose the PKGBUILD from the file manager and hit enter to view the package. - -![][25] - -Any change that you make will be permanent and the next time you upgrade the package, your changes will be merged with the upstream package. - -![][26] - -### Conclusion - -Paru is another interesting addition to the [AUR helpers family][27] with a promising future. At this point I wouldn’t suggest replacing yay as it is still maintained but definitely give paru a try. You can have both of them installed to your system and come to your own conclusions. - -To get the latest [Linux news][28], subscribe to our social media to be among the first to get them whilst they are fresh! - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/paru-aur-helper/ - -作者:[Dimitrios Savvopoulos][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/dimitrios/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/why-arch-linux/ -[2]: https://itsfoss.com/arch-based-linux-distros/ -[3]: https://itsfoss.com/aur-arch-linux/ -[4]: https://itsfoss.com/pacman-command/ -[5]: https://wiki.archlinux.org/index.php/PKGBUILD -[6]: https://news.itsfoss.com/qt-6-released/ -[7]: https://github.com/Morganamilo -[8]: https://www.reddit.com/r/archlinux/comments/jjn1c1/paru_v100_and_stepping_away_from_yay/ -[9]: https://github.com/Morganamilo/paru -[10]: https://www.rust-lang.org/ -[11]: https://golang.org/ -[12]: https://github.com/Jguer -[13]: https://aur.archlinux.org/packages/yay/#pinned-788241 -[14]: https://github.com/Morganamilo/paru/releases -[15]: https://github.com/Morganamilo/paru/releases/tag/v1.0.0 -[16]: https://linuxhandbook.com/linux-directory-structure/#-etc-configuration-files -[17]: https://itsfoss.com/nano-editor-guide/ -[18]: https://itsfoss.com/command-line-text-editors-linux/ -[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/01/pacman.conf-color.png?resize=800%2C480&ssl=1 -[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/01/paru.conf-bottomup.png?resize=800%2C480&ssl=1 -[21]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/01/paru.conf-bottomup-2.png?resize=800%2C480&ssl=1 -[22]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/01/paru.conf-vifm.png?resize=732%2C439&ssl=1 -[23]: https://aur.archlinux.org/packages/gcalcli/ -[24]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/01/paru-proceed-for-review.png?resize=800%2C480&ssl=1 -[25]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/01/paru-proceed-for-review-2.png?resize=800%2C480&ssl=1 -[26]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/01/paru-proceed-for-review-3.png?resize=800%2C480&ssl=1 -[27]: https://itsfoss.com/best-aur-helpers/ -[28]: https://news.itsfoss.com/ diff --git a/translated/tech/20210203 Paru - A New AUR Helper and Pacman Wrapper Based on Yay.md b/translated/tech/20210203 Paru - A New AUR Helper and Pacman Wrapper Based on Yay.md new file mode 100644 index 0000000000..5ad643b667 --- /dev/null +++ b/translated/tech/20210203 Paru - A New AUR Helper and Pacman Wrapper Based on Yay.md @@ -0,0 +1,155 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Paru – A New AUR Helper and Pacman Wrapper Based on Yay) +[#]: via: (https://itsfoss.com/paru-aur-helper/) +[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/) + +Paru – 基于 Yay 的新 AUR 助手及 Pacman 包装器 +====== + +[用户选择 Arch Linux][1] 或 [基于 Arch 的 Linux 发行版][2]的主要原因之一就是 [Arch 用户仓库(AUR)][3]。 + +遗憾的是,[pacman][4],也就是 Arch 的包管理器,不能以类似官方仓库的方式访问 AUR。AUR 中的包是以 [PKGBUILD][5] 的形式存在的,需要手动过程来构建。 + +AUR 助手可以自动完成这个过程。毫无疑问,[yay][6] 是最受欢迎和备受青睐的 AUR 助手之一。 + +最近,yay 的两位开发者之一的 [Morganamilo][7] [宣布][8]将退出 yay 的维护工作,以开始自己的 AUR 助手 [paru][9]。Paru 是用 [Rust][10] 编写的,而 yay 是用 [Go][11] 编写的,它的设计是基于 yay 的。 + +请注意,yay 还没有结束支持,它仍然由 [Jguer][12] 积极维护。他还[评论][13]说,paru 可能适合那些寻找丰富功能的 AUR 助手的用户。因此我推荐大家尝试一下。 + +### 安装 Paru AUR 助手 + +要安装 paru,打开你的终端,逐一输入以下命令。 + +``` +sudo pacman -S --needed base-devel +git clone https://aur.archlinux.org/paru.git +cd paru +makepkg -si +``` + +现在已经安装好了,让我们来看看如何使用它。 + +### 使用 Paru AUR 助手的基本命令 + +在我看来,这些都是 paru 最基本的命令。你可以在 [GitHub][9] 的官方仓库中探索更多。 + + * **paru <用户输入>**:搜索并安装<用户输入> + * **paru -**:paru -Syu 的别名 + * **paru -Sua** :仅升级 AUR 包。 + * **paru -Qua**:打印可用的 AUR 更新 + * **paru -Gc <用户输入>**:打印<用户输入>的 AUR 评论 + + + +### 充分使用 Paru AUR 助手 + +你可以在 GitHub 上访问 paru 的[更新日志][14]来查看完整的变更日志历史,或者你可以在[首次发布][15]中查看来自 yay 的更改。 + +#### 在 Paru 中启用颜色 + +要在 paru 中启用颜色,你必须先在 pacman 中启用它。所有的[配置文件][16]都在 /etc 目录下。在此例中,我[使用 Nano 文本编辑器][17],但是,你可以选择使用任何[基于终端的文本编辑器][18]。 + +``` +sudo nano /etc/pacman.conf +``` + +打开 pacman 配置文件后,取消 “Color” 的注释,即可启用此功能。 + +![][19] + +#### **反转搜索顺序** + +根据你的搜索条件,最相关的包通常会显示在搜索结果的顶部。在 paru 中,你可以反转搜索顺序,使你的搜索更容易。 + +与前面的例子类似,打开 paru 配置文件: + +``` +sudo nano /etc/paru.conf +``` + +取消注释 “BottomUp” 项,然后保存文件。 + +![][20] + +如你所见,顺序是反转的,第一个包出现在了底部。 + +![][21] + +#### **编辑 PKGBUILD** (对于高级用户) + +如果你是一个有经验的 Linux 用户,你可以通过 paru 编辑 AUR 包。要做到这一点,你需要在 paru 配置文件中启用该功能,并设置你所选择的文件管理器。 + +在此例中,我将使用配置文件中的默认值,即 vifm 文件管理器。如果你还没有使用过它,你可能需要安装它。 + +``` +sudo pacman -S vifm +sudo nano /etc/paru.conf +``` + +打开配置文件,如下所示取消注释。 + +![][22] + +让我们回到 [Google Calendar][23] 的 AUR 包,并尝试安装它。系统会提示你审查该软件包。输入 Y 并按下回车。 + +![][24] + +从文件管理器中选择 PKGBUILD,然后按下回车查看软件包。 + +![][25] + +你所做的任何改变都将是永久性的,下次升级软件包时,你的改变将与上游软件包合并。 + +![][26] + +### 总结 + +Paru 是 [AUR 助手家族][27]的又一个有趣的新成员,前途光明。此时,我不建议更换 yay,因为它还在维护,但一定要试试 paru。你可以把它们两个都安装到你的系统中,然后得出自己的结论。 + +要获得最新的 [Linux 新闻][28],请订阅我们的社交媒体,以便在第一时间获取新闻! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/paru-aur-helper/ + +作者:[Dimitrios Savvopoulos][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/dimitrios/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/why-arch-linux/ +[2]: https://itsfoss.com/arch-based-linux-distros/ +[3]: https://itsfoss.com/aur-arch-linux/ +[4]: https://itsfoss.com/pacman-command/ +[5]: https://wiki.archlinux.org/index.php/PKGBUILD +[6]: https://news.itsfoss.com/qt-6-released/ +[7]: https://github.com/Morganamilo +[8]: https://www.reddit.com/r/archlinux/comments/jjn1c1/paru_v100_and_stepping_away_from_yay/ +[9]: https://github.com/Morganamilo/paru +[10]: https://www.rust-lang.org/ +[11]: https://golang.org/ +[12]: https://github.com/Jguer +[13]: https://aur.archlinux.org/packages/yay/#pinned-788241 +[14]: https://github.com/Morganamilo/paru/releases +[15]: https://github.com/Morganamilo/paru/releases/tag/v1.0.0 +[16]: https://linuxhandbook.com/linux-directory-structure/#-etc-configuration-files +[17]: https://itsfoss.com/nano-editor-guide/ +[18]: https://itsfoss.com/command-line-text-editors-linux/ +[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/01/pacman.conf-color.png?resize=800%2C480&ssl=1 +[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/01/paru.conf-bottomup.png?resize=800%2C480&ssl=1 +[21]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/01/paru.conf-bottomup-2.png?resize=800%2C480&ssl=1 +[22]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/01/paru.conf-vifm.png?resize=732%2C439&ssl=1 +[23]: https://aur.archlinux.org/packages/gcalcli/ +[24]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/01/paru-proceed-for-review.png?resize=800%2C480&ssl=1 +[25]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/01/paru-proceed-for-review-2.png?resize=800%2C480&ssl=1 +[26]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/01/paru-proceed-for-review-3.png?resize=800%2C480&ssl=1 +[27]: https://itsfoss.com/best-aur-helpers/ +[28]: https://news.itsfoss.com/ \ No newline at end of file