如何在 Arch Linux 中查詢已安裝的專有軟體包?

Sk發表於2018-07-10

你是狂熱的自由軟體支持者嗎?你目前在使用任何基於 Arch 的 Linux 發行版嗎?我有一個小小的提示送給你!現在,你可以輕鬆地在 Arch Linux 及其變體(如 Antergos、Manjaro Linux 等)中找到已安裝的專有軟體包。你無需在已安裝軟體包的網站中參考其許可細節,也無需使用任何其它外部工具來查明軟體包是自由的還是專有的。(LCTT 譯註:其實下面還是藉助了一個外部程式)

在 Arch Linux 中查詢已安裝的專有軟體包

一位開發人員開發了一個名為 “Absolutely Proprietary” 的實用程式,它是一種用於基於 Arch 發行版的專有軟體包檢測器。它將基於 Arch 系統中的所有安裝包與 Parabola 的軟體包 blacklist aur-blacklist 進行比較,然後顯示出你的斯托曼自由指數Stallman Freedom Index(“自由/總計”比分)。此外,你可以將該列表儲存到檔案中,並與其他系統/使用者共享或比較。

在安裝之前,確保你安裝了 Python 和 Git。

然後,git clone 倉庫:

git clone https://github.com/vmavromatis/absolutely-proprietary.git

這條命令將會下載所有內容到你當前工作目錄中的 absolutely-proprietary 目錄。

進入此目錄:

cd absolutely-proprietary

接著,使用以下命令查詢已安裝的專有軟體:

python main.py

這條命令將會下載 blacklist.txtaur-blacklist.txt,並將本地已安裝的軟體包與遠端軟體包進行比較並顯示其指數。

以下是在我的 Arch Linux 桌面的示例輸出:

Retrieving local packages (including AUR)...
Downloading https://git.parabola.nu/blacklist.git/plain/blacklist.txt
Downloading https://git.parabola.nu/blacklist.git/plain/aur-blacklist.txt
Comparing local packages to remote...
=============================================
47 ABSOLUTELY PROPRIETARY PACKAGES INSTALLED
=============================================

Your GNU/Linux is infected with 47 proprietary packages out of 1370 total installed.
Your Stallman Freedom Index is 96.57

+------------------------|---------|--------------------|---------------------------------------------------------------------------------------------+
| Name | Status | Libre Alternatives | Description |
+------------------------|---------|--------------------|---------------------------------------------------------------------------------------------+
| chromium-pepper-flash | nonfree | | proprietary Google Chrome EULA, missing sources |
+------------------------|---------|--------------------|---------------------------------------------------------------------------------------------+
| faac | nonfree | | [FIXME:description] is a GPL'ed package, but has non free code that can't be distributed und|
+------------------------|---------|--------------------|---------------------------------------------------------------------------------------------+
| libunrar | nonfree | | part of nonfree unrar, Issue442 |
+------------------------|---------|--------------------|---------------------------------------------------------------------------------------------+
| opera | nonfree | | nonfree, nondistributable, built from binary installers, etc |
+------------------------|---------|--------------------|---------------------------------------------------------------------------------------------+
| shutter | nonfree | | need registered user to download (and access website) the source code and depends perl-net-d|
+------------------------|---------|--------------------|---------------------------------------------------------------------------------------------+
| ttf-ms-fonts | nonfree | | |
+------------------------|---------|--------------------|---------------------------------------------------------------------------------------------+
| ttf-ubuntu-font-family | nonfree | | Ubuntu font license considered non-free by DFSG and Fedora |
+------------------------|---------|--------------------|---------------------------------------------------------------------------------------------+
| unace | nonfree | | license forbids making competing ACE archivers from unace |
+------------------------|---------|--------------------|---------------------------------------------------------------------------------------------+
| unrar | nonfree | unar | |
| | | fsf | |
| | | unrar | |
+------------------------|---------|--------------------|---------------------------------------------------------------------------------------------+
| virtualbox | nonfree | | contains BIOS which needs a nonfree compiler to build from source (OpenWatcom compiler), doe|
+------------------------|---------|--------------------|---------------------------------------------------------------------------------------------+
| wordnet | nonfree | | |
+------------------------|---------|--------------------|---------------------------------------------------------------------------------------------+


Save list to file? (Y/n)

如你所見,我的系統中有 47 個專有軟體包。就像我說的那樣,我們可以將它儲存到檔案中稍後檢視。為此,當提示你將列表儲存在檔案時,請按 y。然後按 y 接受預設值,或按 n 以你喜歡的格式和位置來儲存它。

Save list to file? (Y/n) y
Save as markdown table? (Y/n) y
Save it to (/tmp/tmpkuky_082.md): y
The list is saved at /home/sk/absolutely-proprietary/y.md

You can review it from the command line
using the "less -S /home/sk/absolutely-proprietary/y.md"
or, if installed, the "most /home/sk/absolutely-proprietary/y.md" commands

你可能已經注意到,我只有 nonfree 包。它還會顯示另外兩種型別的軟體包,例如 semifree、 uses-nonfree。

  • nonfree:這個軟體包是公然的非自由軟體。
  • semifree:這個軟體包大部分是自由的,但包含一些非自由軟體。
  • uses-nonfree:這個軟體包依賴、推薦或不恰當地與其他自由軟體或服務整合。

該使用程式的另一個顯著特點是它不僅顯示了專有軟體包,而且還顯示這些包的替代品。

希望這有些幫助。我很快就會在這裡提供另一份有用的指南。敬請關注!

乾杯!

資源:


via: https://www.ostechnix.com/find-installed-proprietary-packages-arch-linux/

作者:SK 譯者:MjSeven 校對:wxy

本文由 LCTT 原創編譯,Linux中國 榮譽推出

相關文章