Paru 2.0 版本升级，为高级用户带来了新特性
AUR Paru
![](/data/attachment/album/202312/01/224300e5sire0nczj55sc8.jpg)



> 
> 经过了一段时间的等待，Paru 2.0 版本终于发布了。
> 
> 
> 


如果你不熟悉 Paru，它其实是一个 [AUR 帮助程序](https://wiki.archlinux.org/title/AUR_helpers)，可以自动完成手动构建 [PKGBUILD](https://wiki.archlinux.org/title/PKGBUILD) 的过程，方便在 Arch Linux 中安装软件包。


现新版 Paru 2.0 正式发布，此次更新中包含了一些重要的改进。


不过在深入了解之前，你需要确保自己知道如何解决在使用 AUR 帮助程序构建软件包时可能遇到的问题。如果你刚接触 Linux，我们建议你坚持使用你熟悉的包管理器。


### ? Paru 2.0: 有什么新变化？


![](/data/attachment/album/202312/01/224326gbobirmbubf6zbrb.png)


Paru 2.0 版本是一次重大更新，目标是带来一些主要的改变，尤其是为了满足高级用户的需求。


该版本距离上个重大版本的发布已经过去了一年多。开发者表示由于时间不足，需要完成的改变还有很多。


由于很长一段时间没有发布版本，所以开发者提到了这个版本的很多内容都没有经过严格的测试，可能随后会发布 .1 补丁。


现在，我们来看看 Paru 2.0 版本的重要改进点。


首先，现在你可以把非 AUR 的 `PKGBUILD` 集成到构建引擎中。你可以在你的 `paru.conf` 中加入其他的 pkgbuild 仓库，具体命令如下：



```
[repo_name]
Url = https://path/to/git/repo

```

然后运行下列命令，同步这个新加入的仓库：



```
paru -Sy --pkgbuilds

```

此外，你还可以指定一个本地路径，指向你的本地 pkgbuild 仓库。


这些新加入的仓库比 AUR 具有优先级，并且它们还允许包含 AUR 的依赖项。


而新加入的另一项特性就是一个名为 `.` 的新的自动 pkgbuild 仓库，这个新的仓库在 `paru.conf` 中是无法看到的。


这个新的特性允许执行 `paru -S ./foo` 命令，其中 `foo` 是当前目录下的某个包的名字。


这样你就能在同一个目录中管理一系列相互依赖的 pkgbuild，通过上面的命令，你可以构建其中任何一个pkgbuild。


当你开始构建它们时，Paru 将会自动解决和构建该路径下的 pkgbuild 包的依赖问题。


#### ?️ 其他的改变和优化


除了上述的改变，本次更新还带来了其他一些变动：


* 修复了在运行 `paru -Sc` 时没有 sudo 的问题。
* 日期现在会显示为你的系统的本地时区。
* 改进了搜索功能，现在默认是启用状态。
* 在最后的 Paru 确认后，无需再额外对 pacman 确认安装。
* `--chroot` 现在无需本地的仓库，当然，如果有的话它会工作得更好。


对于这个版本的更深入的了解，你可以参阅 [发布说明](https://github.com/Morganamilo/paru/releases/tag/v2.0.0)。


### ? 获取 Paru 2.0


如果你是从 AUR 安装的 Paru，你可以直接在 AUR 中升级到 2.0 版本。但如果你是自己构建的 Paru ，那可以试试使用 `-U` 命令进行更新，或者重新构建一次。


如果你是第一次安装 Paru ，你可以前往其 [GitHub 仓库](https://github.com/Morganamilo/paru/) ，按照里面的安装说明操作就可以了。



> 
> **[Paru 2.0（GitHub）](https://github.com/Morganamilo/paru/releases/tag/v2.0.0)**
> 
> 
> 


如果你想要了解更多关于 Paru 的信息，或者想学习如何安装 Paru，我强烈建议你浏览我们关于 [Paru AUR 帮助程序](https://itsfoss.com/paru-aur-helper/) 的文章：



> 
> **[Paru - 基于 Yay 的 AUR 助手和 Pacman 封装器](https://itsfoss.com/paru-aur-helper/)**
> 
> 
> 


? Arch 用户，你对这次的 Paru 版本升级感到兴奋吗？分享一下你的想法吧！




---


via: <https://news.itsfoss.com/aur-helper-paru-2-0/>


作者：[Sourav Rudra](https://news.itsfoss.com/author/sourav/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[ChatGPT](https://linux.cn/lctt/ChatGPT) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![](/assets/images/pikapods-banner-v3.webp)


![](/assets/images/pikapods-banner-v3.webp)

For those who are unfamiliar, Paru is an [AUR helper](https://wiki.archlinux.org/title/AUR_helpers?ref=news.itsfoss.com) that automates the tedious process of manually building [PKGBUILD](https://wiki.archlinux.org/title/PKGBUILD?ref=news.itsfoss.com)s for installing packages on Arch Linux.

It has gotten a new major release in the form of** Paru 2.0**, that has some important improvements.

Let's see what this release of Paru has to offer.

## 🆕 Paru 2.0: What's New?

![a screenshot of paru 2.0 being installed](https://news.itsfoss.com/content/images/2023/11/Paru_2.0.png)

Paru 2.0 release is **an update that aims to bring some major changes**, and is mostly aimed at power users.

This release comes more than a year after the last major release. The developer said that he didn't have enough spare time and there were many changes that needed to be done.

The developer also added that:

As there's not been a release in so long, consider a lot of the things here not battle tested, with a .1 patch to follow.

So, keeping that in mind, let's take a look at the **highlights of the Paru 2.0 release**.

It is now **possible to integrate non-AUR PKGBUILDs into the build engine**. You can add other “pkgbuild” repositories to your paru.conf by using the following command:

```
[repo_name]
Url = https://path/to/git/repo
```


Then syncing up the repo with:

`paru -Sy --pkgbuilds`


Moreover, you can specify a path to point to a local pkgbuild repo.

These repos have a **higher priority than AUR**, and also allow for the inclusion of AUR dependencies in them.

Another neat feature is the new **automatic pkgbuild repo** named " . ", which is invisible in the paru.conf.

This allows for executing a '*paru -S ./foo*' command, where 'foo' is the name of a package under the current directory.

What this results in is the ability to have a bunch of pkgbuilds in the same directory that depend on each other, and you can build any one of them using the aforementioned command.

When you build them, **Paru will take care of solving and building the dependencies from the pkgbuilds in the directory itself**.

### 🛠️ Other Changes and Improvements

Other than the ones mentioned above, here are some other changes:

- A fix for
*no sudo*when running*paru -Sc*. - Dates now use the local time zone from your system.
- Provide searching has been improved, and it now enabled by default.
- Removed confirmation for pacman install after final paru confirmation is done.
*--chroot*does not require local repos anymore, but it works better with those around.

For a more in-depth look into this release, you may go through the [release notes](https://github.com/Morganamilo/paru/releases/tag/v2.0.0?ref=news.itsfoss.com).

## 📥 Get Paru 2.0

If you installed Paru from AUR, then you can upgrade to the 2.0 release from there. But, if you built it, you could try the *-U* flag to update or build it again.

If you are installing it for the first time, head over to its [GitHub repo](https://github.com/Morganamilo/paru/?ref=news.itsfoss.com) and follow the installation instructions.

If you are eager to **know more about Paru**, or want to **learn how to install it**. I highly suggest you go through our article on [Paru AUR helper](https://itsfoss.com/paru-aur-helper/?ref=news.itsfoss.com):

[Paru - AUR Helper and Pacman Wrapper Based on YayParu is a new AUR helper based on Yay. It is written in Go and gives you a feature rich experience with AUR packages in Arch Linux.](https://itsfoss.com/paru-aur-helper/?ref=news.itsfoss.com)![](https://itsfoss.com/content/images/wordpress/2021/02/PARU-aur-helper.png)


![](https://itsfoss.com/content/images/wordpress/2021/02/PARU-aur-helper.png)

*💬 Arch users, are you hyped about this release of Paru? Let us know!*

## More from It's FOSS...

- Support us by opting for
[It's FOSS Plus](https://itsfoss.com/#/portal/signup)membership. - Join our
[community forum](https://itsfoss.community/). - 📩 Stay updated with the latest on Linux and Open Source. Get our
[weekly Newsletter](https://itsfoss.com/newsletter/).