https://wiki.archlinux.org/api.php?action=feedcontributions&user=Harrigan&feedformat=atomArchWiki - User contributions [en]2024-03-28T20:25:46ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Clover&diff=791714Clover2023-11-02T23:01:57Z<p>Harrigan: Change OS X to macOS</p>
<hr />
<div>[[Category:Boot loaders]]<br />
[[ja:Clover]]<br />
[[pt:Clover]]<br />
[[zh-hans:Clover]]<br />
{{Related articles start}}<br />
{{Related|Arch boot process}}<br />
{{Related|Unified Extensible Firmware Interface}}<br />
{{Related|EFISTUB}}<br />
{{Related articles end}}<br />
<br />
[https://github.com/CloverHackyColor/CloverBootloader Clover EFI] is a boot loader developed to boot macOS ([[Wikipedia:en:Hackintosh|Hackintoshes]]), Windows and Linux in legacy or UEFI mode.<br />
<br />
The main advantages of Clover are:<br />
* Emulate UEFI on legacy BIOS systems<br />
* Boot Linux kernels with [[EFISTUB]] support<br />
* Supports native resolution GUI on wide screens people commonly use today<br />
* Easy to use<br />
* Easily customizable<br />
<br />
== Installation ==<br />
<br />
As Clover emulates a UEFI environment on BIOS systems, the steps for each type of system are similar.<br />
<br />
=== UEFI Systems ===<br />
<br />
Mount [[EFI system partition]] to {{ic|/boot}}. This is the preferred method when directly booting an [[EFISTUB]] kernel from UEFI.<br />
<br />
Generate initial ramdisk environment with [[mkinitcpio]]<br />
<br />
Download Clover Bootable ISO from [https://github.com/CloverHackyColor/CloverBootloader/releases here].<br />
<br />
Extract the archive {{ic|Clover-*-X64.iso.7z}} and find the {{ic|Clover-*-X64.iso}} file, mount it to a directory like {{ic|/mnt/iso}}. It should be noted all file/folder names will be displayed in lower case in Linux, which is different from Windows and Mac OS. <br />
<br />
Copy the whole {{ic|/mnt/iso/efi}} folder to your [[EFI system partition]]. The tree for {{ic|/boot}} should look likes the following<br />
<br />
/boot/EFI<br />
/boot/EFI/BOOT<br />
/boot/EFI/CLOVER<br />
/boot/initramfs-linux-fallback.img<br />
/boot/initramfs-linux.img<br />
/boot/vmlinuz-linux<br />
<br />
=== BIOS Systems ===<br />
<br />
{{Note|Even though this is Legacy BIOS, the [[Partitioning#UEFI/GPT layout example|UEFI/GPT]] partitioning layout is required. The only difference is the "Legacy BIOS bootable" flag needs to be set on the [[EFI system partition]].}}<br />
<br />
Download the [https://github.com/CloverHackyColor/CloverBootloader/releases Clover Bootable ISO].<br />
<br />
Extract the archive {{ic|Clover-*-X64.iso.7z}} and find the {{ic|Clover-*-X64.iso}} file, mount it to directory like {{ic|/mnt/iso}}.<br />
<br />
Merge Clover code with current Master and ''P''artition ''B''oot ''R''ecords (assuming ESP is partition 1 of {{ic|/dev/sda}}, change if necessary):<br />
<br />
{{bc|1=<br />
# dd if=/dev/sda1 of=/tmp/''original_PBR'' bs=512 count=1 conv=notrunc<br />
# cp /mnt/iso/usr/standalone/i386/boot1f32 /tmp/''new_PBR''<br />
# dd if=/tmp/''original_PBR'' of=/tmp/''new_PBR'' skip=3 seek=3 bs=1 count=87 conv=notrunc<br />
# dd if=/tmp/''new_PBR'' of=/dev/sda1 bs=512 count=1 conv=notrunc<br />
# dd if=/mnt/iso/usr/standalone/i386/boot0ss of=/dev/sda bs=440 count=1 conv=notrunc<br />
}}<br />
<br />
Mount the [[EFI system partition]] to {{ic|/boot}}.<br />
<br />
Copy the whole {{ic|/mnt/iso/efi}} folder to your [[EFI system partition]].<br />
<br />
Copy the legacy bootloader to the [[EFI system partition]]:<br />
<br />
{{bc|# cp /mnt/iso/usr/standalone/i386/x64/boot6 /boot/boot}}<br />
<br />
== Configuration ==<br />
<br />
Configuration is done through an XML file {{ic|config.plist}} under path {{ic|EFI/CLOVER}} from the [[EFI system partition]].<br />
<br />
A tool is now available to easily edit your {{ic|config.plist}} in any OS: [https://cloudclovereditor.altervista.org/cce/index.php Cloud Clover Editor (CCE)]<br />
<br />
For the meaning of each key, please reference [https://sourceforge.net/p/cloverefiboot/wiki/GUI/#custom-entries their wiki for custom entries]. The key {{ic|Volume}} should be the [[PARTUUID]] of the EFI system partition and must be in uppercase. The minimal initramfs {{ic|initramfs-linux.img}} in {{ic|Arguments}}and the Linux kernel executable {{ic|vmlinuz-linux}} in {{ic|Path}} are relative to the EFI system partition. Backslashes should be used in accordance with EFI standards. For other arguments in {{ic|Arguments}}, please reference [[EFISTUB]] and [[Kernel parameters#Parameter list]]. <br />
<br />
In this example, the initramfs and kernel files are placed at the root of the EFI system partition, at the same level as the {{ic|efi}} directory. The EFI system partition is mounted at {{ic|/boot}}<br />
<br />
{{hc|/boot/EFI/CLOVER/config.plist|2=<br />
<?xml version="1.0" encoding="UTF-8"?><br />
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd"><br />
<plist version="1.0"><br />
<dict><br />
<key>GUI</key><br />
<dict><br />
<key>Custom</key><br />
<dict><br />
<key>Entries</key><br />
<array><br />
<dict><br />
<key>Arguments</key><br />
<string>initrd=\initramfs-linux.img root=PARTUUID=d5d0fceb-c58e-c745-a7ff-f2f1b2824e66 rw add_efi_memmap</string><br />
<key>Path</key><br />
<string>\vmlinuz-linux</string><br />
<key>Title</key><br />
<string>Arch Linux</string><br />
<key>Type</key><br />
<string>Linux</string><br />
<key>Volume</key><br />
<string>33BA6C23-4772-294D-9053-72A49FCAEF39</string><br />
<key>VolumeType</key><br />
<string>Internal</string><br />
</dict><br />
<dict><br />
<key>Arguments</key><br />
<string>initrd=\initramfs-linux-fallback.img root=PARTUUID=d5d0fceb-c58e-c745-a7ff-f2f1b2824e66 rw debug add_efi_memmap</string><br />
<key>Path</key><br />
<string>\vmlinuz-linux</string><br />
<key>Title</key><br />
<string>Arch Linux Rescue Mode</string><br />
<key>Type</key><br />
<string>Linux</string><br />
<key>Volume</key><br />
<string>33BA6C23-4772-294D-9053-72A49FCAEF39</string><br />
<key>VolumeType</key><br />
<string>Internal</string><br />
</dict><br />
</array><br />
</dict><br />
</dict><br />
</dict><br />
</plist>}}<br />
<br />
=== chainload systemd-boot ===<br />
<br />
If you need a bootloader for BIOS systems that follows [https://uapi-group.org/specifications/specs/boot_loader_specification/ The Boot Loader Specification], then systemd-boot can be pressed into service on BIOS systems. This is the configuration file needed make [[Clover]] chainload systemd-boot.<br />
<br />
{{hc|/boot/EFI/CLOVER/config.plist|2=<br />
<?xml version="1.0" encoding="UTF-8"?><br />
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd"><br />
<plist version="1.0"><br />
<dict><br />
<key>Boot</key><br />
<dict><br />
<key>DefaultVolume</key><br />
<string>EFI</string><br />
<key>DefaultLoader</key><br />
<string>\EFI\systemd\systemd-bootx64.efi</string><br />
<key>Fast</key><br />
<true/><br />
</dict><br />
<key>GUI</key><br />
<dict><br />
<key>Custom</key><br />
<dict><br />
<key>Entries</key><br />
<array><br />
<dict><br />
<key>Hidden</key><br />
<false/><br />
<key>Disabled</key><br />
<false/><br />
<key>Image</key><br />
<string>os_arch</string><br />
<key>Volume</key><br />
<string>EFI</string><br />
<key>Path</key><br />
<string>\EFI\systemd\systemd-bootx64.efi</string><br />
<key>Title</key><br />
<string>Arch Linux</string><br />
<key>Type</key><br />
<string>Linux</string><br />
</dict><br />
</array><br />
</dict><br />
</dict><br />
</dict><br />
</plist>}}<br />
<br />
== See also ==<br />
<br />
* [https://sourceforge.net/projects/cloverefiboot/ Project homepage]<br />
* [https://sourceforge.net/p/cloverefiboot/wiki/Home/ Clover Wiki]</div>Harriganhttps://wiki.archlinux.org/index.php?title=Minecraft/Java_Edition_server&diff=791713Minecraft/Java Edition server2023-11-02T22:57:46Z<p>Harrigan: Minor typos</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Servers]]<br />
Minecraft is a [[w:Multiplayer video game|multiplayer game]]. It uses the [[w:Client-server model|client-server model]] in which the game itself is a client which can be played standalone, or can be played with other players when the client connects to a public server.<br />
<br />
{{Note|Minecraft servers are ran by third parties. You should read their privacy policies to learn about how they process your data. Some servers require third party accounts to login, and some servers support microtransactions allowing you to pay for items on the server, although this could break the [https://www.minecraft.net/en-us/eula Minecraft EULA] depending on what the server is selling.}}<br />
<br />
== Installation ==<br />
<br />
The Java Edition Minecraft server can be installed via the {{aur|minecraft-server}} package. It provides additional [[systemd]] unit files and includes a small control script.<br />
<br />
Also see [[#Alternatives]] for an overview of alternative programs to host Minecraft.<br />
<br />
== Configuration ==<br />
<br />
In the installation process, the {{ic|minecraft}} user and group are created. Establishing a Minecraft-specific user is recommended for security reasons. By running Minecraft under an unprivileged user account, anyone who successfully exploits your Minecraft server will only get access to that user account, and not yours.<br />
However, you may safely add your user to the {{ic|minecraft}} group and add group write permission to the directory {{ic|/srv/minecraft}} (default) to modify Minecraft server settings. Make sure that all files in the {{ic|/srv/minecraft}} directory are either owned by the {{ic|minecraft}} user, or that the user has by other means read and write permissions. The server will error out if it is unable to access certain files and might even have insufficient rights to write an according error message to the log.<br />
<br />
The package provides a systemd service and timer to take automatic backups. By default, the backups are located in the {{ic|backup}} folder under the server root directory. Though to keep the disk footprint small only the 10 most recent backups are preserved (configurable via {{ic|KEEP_BACKUPS}}). The related systemd files are {{ic|minecraftd-backup.timer}} and {{ic|minecraftd-backup.service}}. They may easily be [[edit|adapted]] to your liking, e.g. to follow a custom backup interval.<br />
<br />
=== Starting the server ===<br />
<br />
To start the server, you may either use systemd or run it directly from the command line. Either way, the server is encapsulated in a [[tmux]] session which is owned by the {{ic|minecraft}} user. Using systemd, you may [[start/enable]] the included {{ic|minecraftd.service}}. Alternatively, run<br />
<br />
# minecraftd start<br />
<br />
=== Accepting the EULA ===<br />
<br />
In order to run the Minecraft server, you must accept the ''E''nd ''U''ser ''L''icense ''A''greement. This only needs to happen once after installation. The [[Wikipedia:EULA|EULA]] file resides under {{ic|/srv/minecraft/eula.txt}} after being created by the package. You will need to edit this file to state that you have agreed to the contract in order to run the server. All you need to do is change:<br />
<br />
eula=false<br />
<br />
to the value {{ic|true}}. Here is an example of an accepted EULA: <br />
<br />
{{hc|/srv/minecraft/eula.txt|2=<br />
#By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).<br />
#Sat Sep 11 11:11:11 PDT 2011<br />
eula=true<br />
}}<br />
<br />
=== Firewall configuration ===<br />
<br />
There are three settings in the {{ic|server.properties}} which determine ports that your server will use.<br />
<br />
{{ic|server-port}} determines the {{ic|TCP}} port at which the server will listen for incoming connections. The default port is {{ic|25565}}.<br />
<br />
{{ic|query.port}} determines the {{ic|UDP}} port at which the server will share game info/advertising information. The default port is {{ic|25565}}. Note that since the server and query ports are TCP and UDP, they can share the same port. To enable query, you also have to specify {{ic|1=enable-query=true}}.<br />
<br />
{{ic|rcon.port}} determines the {{ic|TCP}} port if you choose to allow remote access to admin console. The default port is {{ic|25575}}. To enable rcon, you also have to specify {{ic|1=enable-rcon=true}} and {{ic|1=rcon.password=...}}.<br />
<br />
You will need to allow incoming connections at least on the {{ic|server-port}}. It is advisable to allow query and its {{ic|query.port}}. On the other hand, enabling remote console access is a security risk, and you should be careful of allowing it.<br />
<br />
The above information is for the official Minecraft server. If you are using an alternative server, please see its documentation for details about its configuration.<br />
<br />
See [https://minecraft.wiki/Tutorials/Setting_up_a_server] and [https://minecraft.wiki/Server.properties] for more information.<br />
<br />
=== Server management script ===<br />
<br />
To easily control the server, you may use the provided {{ic|minecraftd}} script. It is capable of doing basic commands like {{ic|start}}, {{ic|stop}}, {{ic|restart}} or attaching to the session with {{ic|console}}. Moreover, it may be used to display status information with {{ic|status}}, backup the server world directory with {{ic|backup}}, restore world data from backups with {{ic|restore}} or run single commands in the server console with {{ic|command ''do-something''}}.<br />
<br />
{{Note|Regarding the server console (reachable via {{ic|minecraftd console}}), remember that you can exit any [[tmux]] session with {{ic|ctrl+b}} {{ic|d}}.}}<br />
<br />
=== Tweaking ===<br />
<br />
To tweak the default settings (e.g. the maximum RAM, number of threads etc.), edit the file {{ic|/etc/conf.d/minecraft}}.<br />
<br />
For example, more advanced users may wish to enable {{ic|IDLE_SERVER}} by setting it to {{ic|true}}. This will enable the management script to suspend the server if no player was online for at least {{ic|IDLE_IF_TIME}} (defaults to 20 minutes). When the server is suspended, an {{ic|idle_server}} will listen on the Minecraft port using {{man|1|ncat}} from {{Pkg|nmap}} (or any other implementation of [[netcat]]) and will immediately start the server at the first incoming connection. Though this obviously delays joining for the first time after suspension, it significantly decreases the CPU and memory usage leading to more reasonable resource and power consumption levels.<br />
{{Note|If running for the first time with this option enabled, the {{ic|/srv/minecraft/eula.txt}} file will not get created. You need to disable it to initially start.}}<br />
<br />
== Alternatives ==<br />
<br />
=== Spigot (respectively Craftbukkit) ===<br />
<br />
[https://www.spigotmc.org/ Spigot] is the most widely-used '''modded''' Minecraft server in the world. It can be installed with the {{AUR|spigot}} package. The spigot PKGBUILD builds on top of the files from the {{AUR|minecraft-server}} package. This means that the spigot server provides its own systemd unit files, spigot script and corresponding script configuration file. The binary is called {{ic|spigot}} and is capable of fulfilling the same commands as {{ic|minecraftd}}. The configuration file resides under {{ic|/etc/conf.d/spigot}}.<br />
<br />
Be sure to read [[#Configuration]] and replace {{ic|minecraftd}} with {{ic|spigot}} wherever you encounter it.<br />
<br />
It is somewhat affiliated with [https://bukkit.org/ Bukkit] and has grown in popularity since Bukkit's demise.<br />
<br />
=== Cuberite ===<br />
<br />
[https://cuberite.org/ Cuberite] is a highly efficient and extensively moddable Minecraft server, written in C++ and Lua. It achieves much better performances than the vanilla Minecraft server, but it is not fully compatible with the latest Minecraft client (some game aspects might be missing or not working).<br />
<br />
The Cuberite Minecraft server can be installed as a {{AUR|cuberite}} package, which provides a simple web interface by default at port {{ic|8080}} with which most server operations can easily be done through the browser. The cuberite PKGBUILD builds on top of the files from the {{AUR|minecraft-server}} package. This means that the cuberite server provides its own systemd unit files, cuberite script and corresponding script configuration file. The binary is called {{ic|cuberite}} and is capable of fulfilling the same commands as {{ic|minecraftd}}. The configuration file resides under {{ic|/etc/conf.d/cuberite}}.<br />
<br />
Be sure to read [[#Configuration]] and replace {{ic|minecraftd}} with {{ic|cuberite}} wherever you encounter it.<br />
<br />
=== PaperMC ===<br />
<br />
[https://papermc.io PaperMC] is a Minecraft server, compatible with Spigot plugins which aims to offer better performance. It can be installed via {{AUR|papermc}}.<br />
<br />
Be sure to read [[#Configuration]] and replace {{ic|minecraftd}} with {{ic|papermc}} wherever you encounter it.<br />
<br />
=== Forge ===<br />
<br />
[https://minecraftforge.net Forge] is a widely used Minecraft modding API. The following server packages are available:<br />
<br />
* {{AUR|forge-server}} for the latest Minecraft version (1.19.x)<br />
* {{AUR|forge-server-1.15.2}} for Minecraft 1.15.2<br />
* {{AUR|forge-server-1.14.4}} for Minecraft 1.14.4<br />
* {{AUR|forge-server-1.12.2}} for Minecraft 1.12.2<br />
* {{AUR|forge-server-1.11.2}} for Minecraft 1.11.2<br />
* {{AUR|forge-server-1.10.2}} for Minecraft 1.10.2<br />
* {{AUR|forge-server-1.9.4}} for Minecraft 1.9.4<br />
* {{AUR|forge-server-1.8.9}} for Minecraft 1.8.9<br />
* {{AUR|forge-server-1.7.10}} for Minecraft 1.7.10<br />
* {{AUR|forge-server-1.6.4}} for Minecraft 1.6.4<br />
<br />
Be sure to read [[#Configuration]] and replace {{ic|minecraftd}} with {{ic|forged}} ({{ic|forge-x.x.xd}} for legacy versions) wherever you encounter it.<br />
<br />
=== Fabric ===<br />
<br />
[https://fabricmc.net/ Fabric] is a lightweight, experimental modding toolchain for Minecraft. The server package can be installed via {{AUR|fabric-server}}.<br />
<br />
Be sure to read [[#Configuration]] and replace {{ic|minecraftd}} with {{ic|fabricd}} wherever you encounter it.<br />
<br />
=== Quilt ===<br />
<br />
[https://quiltmc.org/ Quilt] is an open-source, community-driven modding toolchain designed primarily for Minecraft. The server package can be installed via {{AUR|quilt-server}}.<br />
<br />
Be sure to read [[#Configuration]] and replace {{ic|minecraftd}} with {{ic|quiltd}} wherever you encounter it.<br />
<br />
It is originally forked from Fabric, meaning it is mostly backwards compatible with Fabric mods.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Minecraft server port ===<br />
<br />
{{Expansion|Document SRV record support to allow the use of a non-default port without needing to specify the port when using domain names}}<br />
<br />
By default Minecraft servers run on port {{ic|25565}}, this port is assumed if an address is entered without a port specified.<br />
<br />
Most Minecraft server providers will charge a premium for a server with the default minecraft port, therefore if your port differs from {{ic|25565}} you must specify the port by appending a colon (''':''') to the end of the hostname or address followed by the port which was allocated to your server, for example if you address was {{ic|43.12.122.96}} and port was {{ic|28543}} you would connect to {{ic|43.12.122.96:28543}}.<br />
<br />
== See also ==<br />
<br />
* There are several server wrappers available providing everything from automatic backup to managing dozens of servers in parallel; refer to [https://minecraftservers.gamepedia.com/Server_wrappers Server Wrappers] for more information. However, the management script provided by the [[AUR]] packages should suffice most needs.<br />
* You might want to set up a [[systemd timer]] with e.g. [https://minecraft.wiki/wiki/Programs_and_editors#Mappers mapper] to generate periodic maps of your world.<br />
* Be sure to take periodic backups e.g. using the provided management script (see [[#Configuration]]) or plain [[rsync]].</div>Harriganhttps://wiki.archlinux.org/index.php?title=Arch_User_Repository&diff=787146Arch User Repository2023-09-07T14:55:24Z<p>Harrigan: Clarify that AUR SSH authentication needs to be set up</p>
<hr />
<div>[[Category:About Arch]]<br />
[[Category:Package development]]<br />
[[Category:Package management]]<br />
[[de:Arch User Repository]]<br />
[[es:Arch User Repository]]<br />
[[fr:Arch User Repository]]<br />
[[ja:Arch User Repository]]<br />
[[pt:Arch User Repository]]<br />
[[ru:Arch User Repository]]<br />
[[uk:Arch User Repository]]<br />
[[zh-hans:Arch User Repository]]<br />
{{Related articles start}}<br />
{{Related|makepkg}}<br />
{{Related|pacman}}<br />
{{Related|PKGBUILD}}<br />
{{Related|.SRCINFO}}<br />
{{Related|Aurweb RPC interface}}<br />
{{Related|AUR submission guidelines}}<br />
{{Related|AUR Trusted User Guidelines}}<br />
{{Related|Official repositories}}<br />
{{Related|Arch build system}}<br />
{{Related|Creating packages}}<br />
{{Related|AUR helpers}}<br />
{{Related|AUR Cleanup Day}}<br />
{{Related articles end}}<br />
<br />
The Arch User Repository (AUR) is a community-driven repository for Arch users. It contains package descriptions ([[PKGBUILD]]s) that allow you to compile a package from source with [[makepkg]] and then install it via [[pacman#Additional commands|pacman]]. The AUR was created to organize and share new packages from the community and to help expedite popular packages' inclusion into the [[extra repository]]. This document explains how users can access and utilize the AUR.<br />
<br />
A good number of new packages that enter the official repositories start in the AUR. In the AUR, users are able to contribute their own package builds ({{ic|PKGBUILD}} and related files). The AUR community has the ability to vote for packages in the AUR. If a package becomes popular enough — provided it has a compatible license and good packaging technique — it may be entered into the ''extra'' repository (directly accessible by ''pacman'' or [[abs]]).<br />
<br />
{{Warning|AUR packages are user-produced content. These {{ic|PKGBUILD}}s are completely unofficial and have not been thoroughly vetted. Any use of the provided files is at your own risk.}}<br />
<br />
== Getting started ==<br />
<br />
Users can search and download [[PKGBUILD]]s from the [https://aur.archlinux.org AUR Web Interface]. These {{ic|PKGBUILD}}s can be built into installable packages using ''makepkg'', then installed using ''pacman''.<br />
<br />
* Ensure {{Pkg|base-devel}} is [[install]]ed.<br />
* Glance over the [[#Frequently asked questions]] for answers to the most common questions.<br />
* You may wish to adjust {{ic|/etc/makepkg.conf}} to optimize the build process to your system prior to building packages from the AUR. A significant improvement in package build times can be realized on systems with multi-core processors by adjusting the {{ic|MAKEFLAGS}} variable, by using multiple cores for compression, or by using different compression algorithm. Users can also enable hardware-specific compiler optimizations via the {{ic|CFLAGS}} variable. See [[makepkg#Tips and tricks]] for more information.<br />
<br />
if you have set up [[AUR submission guidelines#Authentication|AUR SSH authentication]] then it is also possible to interact with the AUR through SSH: type {{ic|ssh aur@aur.archlinux.org help}} for a list of available commands.<br />
<br />
== Installing and upgrading packages ==<br />
<br />
Installing packages from the AUR is a relatively simple process. Essentially:<br />
<br />
# Acquire the build files, including the [[PKGBUILD]] and possibly other required files, like [[systemd]] units and patches (often not the actual code).<br />
# Verify that the {{ic|PKGBUILD}} and accompanying files are not malicious or untrustworthy.<br />
# Run {{ic|makepkg}} in the directory where the files are saved. This will download the code, compile it, and package it.<br />
# Run {{ic|pacman -U ''package_file''}} to install the package onto your system.<br />
<br />
=== Prerequisites ===<br />
<br />
First, ensure that the necessary tools are [[install]]ed by installing {{Pkg|base-devel}}; this [[meta package]] has {{pkg|make}} and other tools needed for compiling from source, listed as dependencies.<br />
<br />
{{Note|Packages in the AUR assume that {{Pkg|base-devel}} is installed in the build environment.}}<br />
<br />
Next, choose an appropriate build directory. A build directory is simply a directory where the package will be made or "built" from source, and can be any directory. The examples in the following sections will use {{ic|~/builds}} as the build directory.<br />
<br />
=== Acquire build files ===<br />
<br />
Locate the package in the AUR. This is done using the search field at the top of the [https://aur.archlinux.org/ AUR home page]. Clicking the application's name in the search list brings up an information page on the package. Read through the description to confirm that this is the desired package, note when the package was last updated, and read any comments.<br />
<br />
There are several methods for acquiring the build files for a package:<br />
<br />
* Clone its [[git]] repository, labeled "Git Clone URL" in the "Package Details" on its AUR page. This is the preferred method, an advantage of which is that you can easily get updates to the package via {{ic|git pull}}. <br />
: {{bc|$ git clone <nowiki>https://aur.archlinux.org/</nowiki>''package_name''.git}}<br />
* Download a snapshot, either by clicking the "Download snapshot" link under "Package Actions" on the right hand side of its AUR page, or in a terminal: <br />
: {{bc|$ curl -L -O <nowiki>https://aur.archlinux.org/cgit/aur.git/snapshot/</nowiki>''package_name''.tar.gz}} <br />
: {{Note|The snapshot file is compressed, and must be extracted (preferably in a directory set aside for AUR builds): {{ic|tar -xvf ''package_name''.tar.gz}}}}<br />
* Use the read-only mirror [https://github.com/archlinux/aur archlinux/aur on GitHub], where every package is located in a branch. It is recommended to clone only a single branch (the whole repository is too big and performance would be low). You can do this with one of the following two methods:<br />
** Use {{ic|1=git clone --single-branch}}: {{bc|$ git clone --branch ''package_name'' --single-branch <nowiki>https://github.com/archlinux/aur.git</nowiki>}}<br />
** Do a [[Git#Partially fetching the repository|partial clone]] of this repository ({{ic|1=git clone --depth=1}}) and [[Git#Getting other branches|add branches]] selectively: <br />
:: {{bc|<nowiki>$ git clone --depth=1 https://github.com/archlinux/aur.git;</nowiki> cd aur<br>$ git remote set-branches --add origin ''package_name''<br>$ git fetch<br>$ git checkout ''package_name''}}<br />
<br />
=== Acquire a PGP public key if needed ===<br />
<br />
Check if a signature file in the form of ''.sig'' or ''.asc'' is part of the [[PKGBUILD]] source array. If that is the case, then acquire one of the public keys listed in the PKGBUILD [[PKGBUILD#validpgpkeys|validpgpkeys]] array. Refer to [[makepkg#Signature checking]] for more information.<br />
<br />
=== Build the package ===<br />
<br />
Change directories to the directory containing the package's [[PKGBUILD]].<br />
<br />
$ cd ''package_name''<br />
<br />
{{Warning|Carefully check the {{ic|PKGBUILD}}, any ''.install'' files, and any other files in the package's git repository for malicious or dangerous commands. If in doubt, do not build the package, and [[General troubleshooting#Additional support|seek advice]] on the forums or mailing list. Malicious code has been found in packages before. [https://lists.archlinux.org/archives/list/aur-general@lists.archlinux.org/thread/FFCMZGL4UQODYKZGUY7KTN3UBF3XN66P/]}}<br />
<br />
View the contents of all provided files. For example, to use the pager ''less'' to view {{ic|PKGBUILD}}, do:<br />
<br />
$ less PKGBUILD<br />
<br />
{{Tip|If you are updating a package, you may want to look at the changes since the last commit.<br />
* To view changes since the last git commit, you can use {{ic|git show}}.<br />
* To view changes since the last commit using ''vimdiff'', do {{ic|git difftool @~..@ vimdiff}}. The advantage of ''vimdiff'' is that you view the entire contents of each file along with indicators on what has changed.}}<br />
<br />
Make the package. After manually confirming the contents of the files, run [[makepkg]] as a normal user. Some helpful flags:<br />
<br />
* {{ic|-s}}/{{ic|--syncdeps}} automatically resolves and installs any dependencies with [[pacman]] before building. If the package depends on other AUR packages, you will need to manually install them first.<br />
* {{ic|-i}}/{{ic|--install}} installs the package if it is built successfully. This lets you skip the next step that is usually done manually.<br />
* {{ic|-r}}/{{ic|--rmdeps}} removes build-time dependencies after the build, as they are no longer needed. However, these dependencies may need to be reinstalled the next time the package is updated.<br />
* {{ic|-c}}/{{ic|--clean}} cleans up temporary build files after the build, as they are no longer needed. These files are usually needed only when debugging the build process.<br />
<br />
{{Tip|Use {{ic| git clean -dfx}} to delete all files that are not tracked by git, thus deleting all previously built package files.}}<br />
<br />
=== Install the package ===<br />
<br />
The package can now be installed with pacman:<br />
<br />
# pacman -U ''package_name''-''version''-''architecture''.pkg.tar.zst<br />
<br />
{{Note|<br />
* If you have changed your {{ic|PKGEXT}} in {{ic|makepkg.conf}}, the name of the package file may be slightly different.<br />
* The above example is only a brief summary of the build process. It is '''highly''' recommended to read the [[makepkg]] and [[ABS]] articles for more details.<br />
}}<br />
<br />
=== Upgrading packages ===<br />
<br />
In the directory containing the package's [[PKGBUILD]], you must first update the files and changes by using the command <br />
<br />
$ git pull<br />
<br />
then follow the previous build and install instructions.<br />
<br />
=== Updating packages ===<br />
<br />
The AUR is unsupported, so any packages you install are ''your responsibility'' to update, not pacman's. If packages in the official repositories are updated, you will need to rebuild any AUR packages that depend on those libraries.<br />
<br />
== Account status ==<br />
<br />
=== Suspension ===<br />
<br />
When editing a user as a Trusted User, the Suspended field can be set, which suspends the target user. '''When a user is suspended, they cannot:'''<br />
<br />
* Login to https://aur.archlinux.org<br />
* Receive notifications<br />
* Interact with the git interface<br />
<br />
=== Inactivity ===<br />
<br />
When editing your own account or another as a Trusted User, the Inactive field can be set. Inactive accounts are used for two reasons:<br />
<br />
* Display the date someone was marked inactive on their account page<br />
* Generate a current count of active Trusted Users based on their inactivity for new proposals<br />
<br />
== Feedback ==<br />
<br />
=== Commenting on packages ===<br />
<br />
The [https://aur.archlinux.org AUR Web Interface] has a comments facility that allows users to provide suggestions and feedback on improvements to the [[PKGBUILD]] contributor.<br />
<br />
{{Tip|Avoid pasting patches or {{ic|PKGBUILD}}s into the comments section: they quickly become obsolete and just end up needlessly taking up lots of space. Instead, email those files to the maintainer, or even use a [[pastebin]].}}<br />
<br />
[https://python-markdown.github.io/ Python-Markdown] provides basic [[Wikipedia:Markdown|Markdown]] syntax to format comments.<br />
<br />
{{Note|<br />
* This implementation has some occasional [https://python-markdown.github.io/#differences differences] with the official [https://daringfireball.net/projects/markdown/syntax syntax rules].<br />
* Commit hashes to the [[Git]] repository of the package and references to [[Flyspray]] tickets are converted to links automatically.<br />
* Long comments are collapsed and can be expanded on demand.<br />
}}<br />
<br />
=== Voting for packages ===<br />
<br />
One of the easiest activities for '''all''' Arch users is to browse the AUR and '''vote''' for their favourite packages using the online interface. All packages are eligible for adoption by a TU for inclusion in the [[extra repository]], and the vote count is one of the considerations in that process; it is in everyone's interest to vote!<br />
<br />
Sign up on the [https://aur.archlinux.org/ AUR website] to get a "Vote for this package" option while browsing packages. After signing up, it is also possible to vote from the commandline with {{AUR|aurvote}}, {{AUR|aurvote-git}} or {{AUR|aur-auto-vote-git}}.<br />
<br />
Alternatively, if you have set up [[AUR submission guidelines#Authentication|AUR SSH authentication]], you can directly vote from the command line using your ssh key. This means that you will not need to save or type in your AUR password.<br />
<br />
$ ssh aur@aur.archlinux.org vote ''package_name''<br />
<br />
=== Flagging packages out-of-date ===<br />
<br />
First, you should flag the package ''out-of-date'' indicating details on why the package is outdated, preferably including links to the release announcement or the new release [[Archiving and compression#Archiving only|tarball]].<br />
<br />
You should also try to reach out to the maintainer directly by email. If there is no response from the maintainer after ''two weeks'', you can file an ''orphan'' request. See [[AUR submission guidelines#Requests]] for details.<br />
<br />
{{Note|[[VCS package guidelines|VCS packages]] are not considered out of date when the {{ic|pkgver}} changes; do not flag them as the maintainer will merely unflag the package and ignore you. AUR maintainers should not commit mere {{ic|pkgver}} bumps.}}<br />
<br />
== Debugging the package build process ==<br />
<br />
# Ensure your build environment is up-to-date by [[Pacman#Upgrading packages|upgrading]] before building anything.<br />
# Ensure you have {{Pkg|base-devel}} installed.<br />
# Use the {{ic|-s}} option with {{ic|makepkg}} to check and install all dependencies needed before starting the build process.<br />
# Try the default [https://gitlab.archlinux.org/archlinux/packaging/packages/pacman/-/blob/main/makepkg.conf makepkg configuration].<br />
# See [[Makepkg#Troubleshooting]] for common issues.<br />
<br />
If you are having trouble building a package, first read its [[PKGBUILD]] and the comments on its AUR page.<br />
<br />
It is possible that a {{ic|PKGBUILD}} is broken for everyone. If you cannot figure it out on your own, report it to the maintainer (e.g. by [[#Commenting on packages|posting the errors you are getting in the comments on the AUR page]]). You may also seek help in the [https://bbs.archlinux.org/viewforum.php?id=38 AUR Issues, Discussion & PKGBUILD Requests forum].<br />
<br />
The reason might not be trivial after all. Custom {{ic|CFLAGS}}, {{ic|LDFLAGS}} and {{ic|MAKEFLAGS}} can cause failures. To avoid problems caused by your particular system configuration, build packages in a [[DeveloperWiki:Building in a clean chroot|clean chroot]]. If the build process still fails in a clean chroot, the issue is probably with the {{ic|PKGBUILD}}.<br />
<br />
See [[Creating packages#Checking package sanity]] about using {{ic|namcap}}. If you would like to have a {{ic|PKGBUILD}} reviewed, post it on the [https://lists.archlinux.org/mailman3/lists/aur-general.lists.archlinux.org/ aur-general mailing list] to get feedback from the TUs and fellow AUR members, or the [https://bbs.archlinux.org/viewforum.php?id=4 Creating & Modifying Packages forum]. You could also seek help in the [[IRC channel]] [ircs://irc.libera.chat/archlinux-aur #archlinux-aur] on the [https://libera.chat Libera Chat] network.<br />
<br />
== Submitting packages ==<br />
<br />
Users can share [[PKGBUILD]]s using the Arch User Repository. See [[AUR submission guidelines]] for details.<br />
<br />
== Web interface translation ==<br />
<br />
See [https://gitlab.archlinux.org/archlinux/aurweb/-/blob/master/doc/i18n.txt i18n.txt] in the AUR source tree for information about creating and maintaining translation of the [https://aur.archlinux.org AUR Web Interface].<br />
<br />
== History ==<br />
<br />
In the beginning, there was {{ic|<nowiki>ftp://ftp.archlinux.org/incoming</nowiki>}}, and people contributed by simply uploading the [[PKGBUILD]], the needed supplementary files, and the built package itself to the server. The package and associated files remained there until a [[Package Maintainer]] saw the program and adopted it.<br />
<br />
Then the Trusted User Repositories were born. Certain individuals in the community were allowed to host their own repositories for anyone to use. The AUR expanded on this basis, with the aim of making it both more flexible and more usable. In fact, the AUR maintainers are still referred to as TUs (Trusted Users).<br />
<br />
Between 2015-06-08 and 2015-08-08, the AUR transitioned from version 3.5.1 to 4.0.0, introducing the use of Git repositories for publishing the {{ic|PKGBUILD}}s.<br />
Existing packages were dropped unless manually migrated to the new infrastructure by their maintainers.<br />
<br />
=== Git repositories for AUR3 packages ===<br />
<br />
The [https://github.com/aur-archive AUR Archive] on GitHub has a repository for every package that was in AUR 3 at the time of the migration.<br />
Alternatively, there is the [https://github.com/felixonmars/aur3-mirror/ aur3-mirror] repository which provides the same.<br />
<br />
== Frequently asked questions ==<br />
<br />
=== What kind of packages are permitted on the AUR? ===<br />
<br />
The packages on the AUR are merely "build scripts", i.e. recipes to build binaries for [[pacman]]. For most cases, everything is permitted, subject to [[AUR submission guidelines#Rules of submission|usefulness and scope guidelines]], as long as you are in compliance with the licensing terms of the content. For other cases, where it is mentioned that "you may not link" to downloads, i.e. contents that are not redistributable, you may only use the file name itself as the source. This means and requires that users already have the restricted source in the build directory prior to building the package. When in doubt, ask.<br />
<br />
=== How can I vote for packages in the AUR? ===<br />
<br />
See [[#Voting for packages]].<br />
<br />
=== What is a Trusted User / TU? ===<br />
<br />
A [[AUR Trusted User guidelines|Trusted User]], in short TU, is a person who is chosen to oversee AUR and the [[extra repository]]. They are the ones who maintain popular [[PKGBUILD]]s in ''extra'', and overall keep the AUR running.<br />
<br />
=== What is the difference between the Arch User Repository and the extra repository? ===<br />
<br />
The Arch User Repository is where all [[PKGBUILD]]s that users submit are stored, and must be built manually with [[makepkg]]. When {{ic|PKGBUILD}}s receive enough community interest and the support of a TU, they are moved into the [[extra repository]] (maintained by the TUs), where the binary packages can be installed with [[pacman]].<br />
<br />
=== Foo in the AUR is outdated; what should I do? ===<br />
<br />
See [[#Flagging packages out-of-date]].<br />
<br />
In the meantime, you can try updating the package yourself by editing the [[PKGBUILD]] locally. Sometimes, updates do not require changes to the build or package process, in which case simply updating the {{ic|pkgver}} or {{ic|source}} array is sufficient.<br />
<br />
=== Foo in the AUR does not compile when I run makepkg; what should I do? ===<br />
<br />
You are probably missing something trivial; see [[#Debugging the package build process]].<br />
<br />
=== ERROR: One or more PGP signatures could not be verified!; what should I do? ===<br />
<br />
Most likely, you do not have the required public key(s) in your personal keyring to verify downloaded files. See [[Makepkg#Signature checking]] for details.<br />
<br />
=== How do I create a PKGBUILD? ===<br />
<br />
Consult the [[AUR submission guidelines#Rules of submission]], then see [[creating packages]].<br />
<br />
=== I have a PKGBUILD I would like to submit; can someone check it to see if there are any errors? ===<br />
<br />
There are several channels available to submit your package for review; see [[#Debugging the package build process]].<br />
<br />
=== How to get a PKGBUILD into the extra repository? ===<br />
<br />
Usually, at least 10 votes are required for something to move into [[extra repository|extra]]. However, if a [[TU]] wants to support a package, it will often be found in the repository.<br />
<br />
Reaching the required minimum of votes is not the only requirement; there has to be a TU willing to maintain the package. TUs are not required to move a package into the ''extra'' repository even if it has thousands of votes.<br />
<br />
Usually, when a very popular package stays in the AUR, it is because:<br />
<br />
* Arch Linux already has another version of a package in the repositories<br />
* Its license prohibits redistribution<br />
* It helps retrieve user-submitted [[PKGBUILD]]s. [[AUR helpers]] are [https://bbs.archlinux.org/viewtopic.php?pid=828310#p828310 unsupported] by definition.<br />
<br />
See also [[AUR Trusted User guidelines#Rules for packages entering the extra repository|Rules for Packages Entering the extra repository]]<br />
<br />
=== How can I speed up repeated build processes? ===<br />
<br />
See [[Makepkg#Improving build times]].<br />
<br />
=== What is the difference between foo and foo-git packages? ===<br />
<br />
Many AUR packages come in "stable" release and "unstable" development versions. Development packages usually have a [[VCS package guidelines#Guidelines|suffix]] denoting their [[Version Control System]] and are not intended for regular use, but may offer new features or bugfixes. Because these packages only download the latest available source when you execute {{ic|makepkg}}, their {{ic|pkgver()}} in the AUR does not reflect upstream changes. Likewise, these packages cannot perform an authenticity checksum on any [[VCS package guidelines#VCS sources|VCS source]].<br />
<br />
See also [[System maintenance#Use proven software packages]].<br />
<br />
=== Why has foo disappeared from the AUR? ===<br />
<br />
It is possible the package has been adopted by a [[TU]] and is now in the [[extra repository]].<br />
<br />
Packages may be deleted if they did not fulfil the [[AUR submission guidelines#Rules of submission|rules of submission]]. See the [https://lists.archlinux.org/archives/list/aur-requests@lists.archlinux.org/ aur-requests archives] for the reason for deletion.<br />
<br />
{{Note|The git repository for a deleted package typically remains available. See [[AUR submission guidelines#Requests]] for details.}}<br />
<br />
=== How do I find out if any of my installed packages disappeared from AUR? ===<br />
<br />
The simplest way is to check the HTTP status of the package's AUR page:<br />
<br />
$ comm -23 <(pacman -Qqm | sort) <(curl https://aur.archlinux.org/packages.gz | gzip -cd | sort)<br />
<br />
=== How can I obtain a list of all AUR packages? ===<br />
<br />
* https://aur.archlinux.org/packages.gz<br />
* Use {{ic|aurpkglist}} from {{AUR|python3-aur}}<br />
<br />
== See also ==<br />
<br />
* [https://aur.archlinux.org AUR Web Interface]<br />
* [https://lists.archlinux.org/mailman3/lists/aur-general.lists.archlinux.org/ AUR Mailing List]</div>Harriganhttps://wiki.archlinux.org/index.php?title=Tiny_Tiny_RSS&diff=773482Tiny Tiny RSS2023-03-22T16:16:22Z<p>Harrigan: Fix typo.</p>
<hr />
<div>[[Category:News aggregators]]<br />
[[Category:Web applications]]<br />
[[es:TT-RSS]]<br />
[[ja:TT-RSS]]<br />
[https://tt-rss.org/ Tiny Tiny RSS] is an open source web-based news feed (RSS/Atom) aggregator, designed to allow you to read news from any location, while feeling as close to a real desktop application as possible.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{pkg|tt-rss}} package.<br />
<br />
If you plan on using PostgreSQL, install {{pkg|php-pgsql}}.<br />
<br />
tt-rss is installed into {{ic|/usr/share/webapps/tt-rss/}}. You will need to make this directory available from your web server. The simplest way is to do:<br />
<br />
* With [[Apache HTTP Server]] :<br />
: {{bc|# ln -s /usr/share/webapps/tt-rss /srv/http/tt-rss}}<br />
<br />
* With [[Nginx]] :<br />
: {{bc|# ln -s /usr/share/webapps/tt-rss /usr/share/nginx/html/tt-rss}}<br />
<br />
You will need to recursively chown {{ic|/usr/share/webapps/tt-rss}} to {{ic|http:http}}.<br />
<br />
== Configuration ==<br />
<br />
=== Set up PHP and database ===<br />
<br />
You will need to set up a database, either [[MySQL]] or [[PostgreSQL]].<br />
<br />
Create a ttrss user and database. In MySQL, for example:<br />
<br />
$ mysql -p -u root<br />
mysql> CREATE USER 'ttrss'@'localhost' IDENTIFIED BY 'somepassword';<br />
mysql> CREATE DATABASE ttrss;<br />
mysql> GRANT ALL PRIVILEGES ON ttrss.* TO "ttrss"@"localhost" IDENTIFIED BY 'somepassword';<br />
<br />
Or in PostgreSQL, for example:<br />
<br />
[postgres]$ createuser --createdb ttrss<br />
[postgres]$ createdb -U ttrss ttrss<br />
<br />
In {{ic|/etc/php/php.ini}}, enable the following modules:<br />
<br />
extension=curl<br />
extension=iconv<br />
extension=intl<br />
extension=mysqli ; for MySQL<br />
extension=pdo_mysql ; for MySQL<br />
extension=pdo_pgsql ; for PostgreSQL<br />
extension=pgsql ; for legacy PostgreSQL plugins (still required by default)<br />
extension=soap<br />
<br />
''If'' {{ic|open_basedir}} is set in {{ic|/etc/php/php.ini}} (it is not by default), add {{ic|/var/lib/tt-rss:/usr/share/webapps/tt-rss:/etc/webapps/tt-rss}} to it.<br />
<br />
Application initialization can be done either automatically or manually.<br />
<br />
Automatic way:<br />
* remove default configuration file {{ic|/etc/webapps/tt-rss/config.php}}, without this file tt-rss webapp enters installation wizard.<br />
* navigate to (your-servers-root)/tt-rss/ and proceed with the installer.<br />
* save generated configuration file to {{ic|/etc/webapps/tt-rss/config.php}}.<br />
<br />
Manual way:<br />
* edit tt-rss configuration file {{ic|/etc/webapps/tt-rss/config.php}} and update database settings.<br />
* re-create database from {{ic|/usr/share/webapps/tt-rss/schema/ttrss_schema_TYPE.sql}}. With MySQL run:<br />
$ mysql --user ttrss --password=<PASSWORD> ttrss < /usr/share/webapps/tt-rss/schema/ttrss_schema_mysql.sql<br />
<br />
With PostgreSQL run:<br />
$ psql ttrss -U ttrss -f /usr/share/webapps/tt-rss/schema/ttrss_schema_pgsql.sql<br />
<br />
At the end the {{ic|/etc/webapps/tt-rss/config.php}} file will look like this:<br />
<br />
<?php<br />
putenv('TTRSS_DB_TYPE=mysql');<br />
putenv('TTRSS_DB_HOST=localhost');<br />
putenv('TTRSS_DB_USER=ttrss');<br />
putenv('TTRSS_DB_NAME=ttrss');<br />
putenv('TTRSS_DB_PASS=foobar');<br />
putenv('TTRSS_SELF_URL_PATH=http://myserver/tt-rss/');<br />
<br />
=== FastCGI ===<br />
<br />
Install and configure [[Nginx#PHP implementation|FastCGI]] for your server<br />
<br />
=== Pacman hook ===<br />
<br />
To do tt-rss database upgrades automatically you may set up pacman post upgrade hook based on following example:<br />
<br />
[Trigger]<br />
Operation = Install<br />
Operation = Upgrade<br />
Type = Package<br />
Target = tt-rss<br />
<br />
[Action]<br />
Description = Updating TT-RSS Database<br />
When = PostTransaction<br />
Exec = /usr/bin/runuser -u http -- /usr/bin/php /usr/share/webapps/tt-rss/update.php --update-schema=force-yes<br />
<br />
You need to put it into /etc/pacman.d/hooks/tt-rss.hook if you did not customize HookDir in pacman.conf.<br />
<br />
See also [[Pacman#Hooks]]<br />
<br />
=== Set up an update daemon ===<br />
<br />
See https://tt-rss.org/wiki/UpdatingFeeds<nowiki/>—however, simply [[enabling]] the {{ic|tt-rss}} service should suffice. Check the service's [[unit status]] to verify that it is running fine.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Integrity constraint violation: 1062 Duplicate entry '1' for key 'ttrss_feeds_feed_url_owner_uid_key' ===<br />
<br />
If you update tt-rss database to schema 137 you might see the error ''Duplicate entry '1' for key 'ttrss_feeds_feed_url_owner_uid_key'''. To fix the issue please start database shell, e.g.:<br />
$ mysql -u ttrss -p<br />
$ use tt-rss;<br />
<br />
And then run [https://discourse.tt-rss.org/t/potential-problems-when-upgrading-to-schema-137/2122 query from official forum] that drops duplicated database entries.<br />
<br />
=== PHP UConverter class is missing, it's provided by the Internationalization (intl) module. ===<br />
<br />
{{Accuracy|{{ic|1=extension=intl}} is added in [[#Set up php and database]] and {{ic|/etc/php/php.ini}} is owned by {{Pkg|php}}. Thus, this configuration file should not get overridden when upgrading {{Pkg|tt-rss}} unless {{Pkg|php}} is also upgraded. Even then, it is still doubtful that previous changes to {{ic|/etc/php/php.ini}} are completely overridden when upgrading (if [[Pacnew and Pacsave files]] are properly handled).}}<br />
<br />
If you see this error after upgrading ''tt-rss'', add {{ic|1=extension=intl}} to {{ic|/etc/php/php.ini}} and [[restart]] the {{ic|php-fpm}} service.</div>Harriganhttps://wiki.archlinux.org/index.php?title=Network_UPS_Tools&diff=740677Network UPS Tools2022-08-08T16:56:40Z<p>Harrigan: Fix typo.</p>
<hr />
<div>[[Category:Power management]]<br />
[[ja:Network UPS Tools]]<br />
[[ru:Network UPS Tools]]<br />
{{Related articles start}}<br />
{{Related|APC UPS}}<br />
{{Related articles end}}<br />
This document describes how to install the [https://networkupstools.org/ Network UPS Tools (NUT)]. Network UPS Tools is compatible with thousands of models of UPS. You can check the [https://networkupstools.org/stable-hcl.html Hardware Compatibility List] to see if your UPS is supported.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|nut}} package.<br />
<br />
== Configuration ==<br />
<br />
NUT has 3 daemons associated with it:<br />
<br />
* The driver which communicates with the UPS.<br />
* A server (upsd) which uses the driver to report the status of the UPS.<br />
* A monitoring daemon (upsmon) which monitors the upsd server and takes action based on information it receives.<br />
<br />
The idea is that if you have multiple systems connected to the UPS, one can communicate the status of the UPS over the network and the others can monitor that status by running their own upsmon services. NUT has [https://networkupstools.org/docs/user-manual.chunked/ar01s06.html#_configuring_and_using extensive documentation on the configuration] however this is going to walk through a simple setup of a USB UPS and the associated server and monitor all in one system (common desktop configuration).<br />
<br />
=== Driver configuration ===<br />
<br />
The configuration here will depend on the type of UPS you have. Consult the previously mentioned Hardware Compatibility List to find what driver will likely work for your UPS. You can run the tool {{man|8|nut-scanner}} which will detect NUT-compatible devices attached to your system.<br />
<br />
For many UPS connected by USB, use the {{man|8|usbhid-ups}} driver. For UPS with serial port, use {{ic|1=port=/dev/ttySX}}, where X is the number of serial port (Example: {{ic|/dev/ttyS1}}). For UPS with USB port, use {{ic|1=port=auto}}.<br />
<br />
{{hc|/etc/nut/ups.conf|2=<br />
...<br />
[''upsname'']<br />
driver = usbhid-ups<br />
port = auto<br />
}}<br />
<br />
You can name the UPS device whatever you like. {{man|5|ups.conf}}<br />
<br />
Start the driver as root with {{ic|upsdrvctl start}}. If there are no errors, you should see a message like this one for the driver {{ic|usbhid-ups}}:<br />
<br />
Network UPS Tools - Generic HID driver 0.34 (2.4.1)<br />
USB communication driver 0.31<br />
Using subdriver: MGE HID 1.12<br />
Detected EATON - Ellipse MAX 1100 [ADKK22008]<br />
<br />
If the driver does not start cleanly, make sure you have picked the right one for your hardware. You might need to try other drivers by changing the {{ic|1=driver=}} value in {{ic|ups.conf}}.<br />
<br />
At this point you should be able to [[start/enable]] {{ic|nut-driver-enumerator.service}} which will automatically create nut-driver@<ups name> systemd service instance and start it.<br />
<br />
==== Can't claim USB device error ====<br />
<br />
If you receive an error message like this one:<br />
<br />
Can't claim USB device [''XXXX:YYYY'']: could not detach kernel driver from<br />
interface 0: Operation not permitted<br />
Driver failed to start (exit status=1)<br />
<br />
Or a less specific one:<br />
<br />
USB communication driver 0.33<br />
No matching HID UPS found<br />
Driver failed to start (exit status=1)<br />
<br />
It is most likely a problem with permissions for accessing the device. You can fix that by specifying an [[udev]] rule that sets the correct group:<br />
<br />
{{hc|/etc/udev/rules.d/50-ups.rules|2=<br />
SUBSYSTEM=="usb", ATTR{idVendor}=="''XXXX''", ATTR{idProduct}=="''YYYY''", GROUP="nut"<br />
}}<br />
<br />
Where {{ic|''XXXX''}} and {{ic|''YYYY''}} are the device manufacturer and product IDs. You can see these either in the error output ({{ic|[''XXXX:YYYY'']}}) or by using {{ic|lsusb}}.<br />
<br />
{{Note|The {{ic|nut}} group is added by the {{Pkg|nut}} package. If you used different installation method, you may need to correct the group.}}<br />
<br />
After this is done, reload and retrigger udev rules by running:<br />
<br />
# udevadm control --reload-rules<br />
# udevadm trigger<br />
<br />
=== upsd configuration ===<br />
<br />
By default upsd listens only on localhost and this is fine for our purpose. Though it is not necessary for following this guide, you can configure upsd beyond the defaults by editing {{ic|/etc/nut/upsd.conf}}. See {{man|5|upsd.conf}}.<br />
<br />
You will need to add a user for a monitor to connect to the server and issue commands. See {{man|5|upsd.users}}.<br />
<br />
{{hc|/etc/nut/upsd.users|2=<br />
...<br />
[''upsuser'']<br />
password = ''password''<br />
upsmon primary<br />
actions = SET<br />
instcmds = ALL<br />
}}<br />
<br />
At this point you should be able to [[start/enable]] {{ic|nut-server.service}}.<br />
<br />
If it has started successfully, you can run {{ic|upsc ''upsname''}} to get information from the UPS. Example output from the command:<br />
<br />
{{bc|<br />
battery.charge: 100<br />
battery.charge.low: 10<br />
battery.charge.warning: 20<br />
battery.mfr.date: CPS<br />
battery.runtime: 5550<br />
battery.runtime.low: 300<br />
battery.type: PbAcid<br />
battery.voltage: 13.5<br />
battery.voltage.nominal: 12<br />
device.mfr: CPS<br />
device.model: UPS CP1000AVRLCD<br />
device.type: ups<br />
driver.name: usbhid-ups<br />
driver.parameter.pollfreq: 30<br />
driver.parameter.pollinterval: 2<br />
driver.parameter.port: auto<br />
driver.parameter.synchronous: no<br />
driver.version: 2.7.4<br />
driver.version.data: CyberPower HID 0.4<br />
driver.version.internal: 0.41<br />
input.transfer.high: 140<br />
input.transfer.low: 90<br />
input.voltage: 122.0<br />
input.voltage.nominal: 120<br />
output.voltage: 122.0<br />
ups.beeper.status: disabled<br />
ups.delay.shutdown: 20<br />
ups.delay.start: 30<br />
ups.load: 0<br />
ups.mfr: CPS<br />
ups.model: UPS CP1000AVRLCD<br />
ups.productid: 0501<br />
ups.realpower.nominal: 600<br />
ups.status: OL<br />
ups.test.result: Done and passed<br />
ups.timer.shutdown: -60<br />
ups.timer.start: 0<br />
ups.vendorid: 0764<br />
}}<br />
<br />
=== upsmon configuration ===<br />
<br />
The last step is to configure upsmon to listen to upsd and take action on events.<br />
<br />
Add the following line to {{ic|/etc/nut/upsmon.conf}}:<br />
<br />
MONITOR ''upsname''@localhost 1 ''upsduser'' ''password'' primary<br />
<br />
Here ''upsname'' is the name of the UPS, and ''upsduser'' and ''password'' is the user and its password you set in {{ic|/etc/nut/upsd.users}}.<br />
<br />
You can also configure what alerts are sent, where they are sent, what action is taken when the battery is low, and more. See {{man|5|upsmon.conf}}.<br />
<br />
Then [[start/enable]] {{ic|nut-monitor.service}}.<br />
<br />
Your logs should show upsmon starting and monitoring the UPS.<br />
<br />
== NUT-Monitor ==<br />
<br />
[https://networkupstools.org/projects.html#_a_href_http_www_lestat_st_en_informatique_projets_nut_monitor_nut_monitor_a NUT-Monitor] is a graphical user interface to monitor and manage devices connected to the Network UPS Tools server.<br />
<br />
You can [[install]] nut-monitor with the {{AUR|nut-monitor}} package.<br />
<br />
== Troubleshooting ==<br />
<br />
=== CyberPower UPS keeps disconnecting/reconnecting ===<br />
<br />
Some CyberPower UPS products are known to keep disconnecting/reconnecting until the driver successfully attaches to it [https://alioth-lists.debian.net/pipermail/nut-upsuser/2011-June/006871.html]. Once the disconnect/reconnect loop starts, it can be difficult for {{ic|upsd}} to establish connection to the UPS using default configuration (which appears to impact the proprietary driver {{AUR|powerpanel}} as well).<br />
<br />
To mitigate this issue, [[edit]] {{ic|nut-driver@.service}}, add the following configuration, then [[start/enable]] {{ic|nut-driver@cyberpower.service}}.<br />
<br />
{{hc|/etc/systemd/system/nut-driver@.service.d/override.conf|2=<br />
[Unit]<br />
StopWhenUnneeded=no<br />
<br />
[Service]<br />
PIDFile=/run/nut/usbhid-ups-cyberpower.pid<br />
Group=nut<br />
User=nut<br />
RestartSec=10s<br />
}}<br />
<br />
Additionally, consider using {{ic|maxretry}} in UPS configuration:<br />
<br />
{{hc|/etc/nut/ups.conf|2=<br />
maxretry = 5<br />
<br />
[cyberpower]<br />
driver = "usbhid-ups"<br />
port = "auto"<br />
...<br />
}}<br />
<br />
=== EATON 5E650iUSB fails to start driver ===<br />
<br />
According to an [https://github.com/networkupstools/nut/issues/630 issue on GitHub], there is a bug in the kernel and the following [[kernel parameter]] can be used as a workaround:<br />
<br />
usbhid.quirks=0x0463:0xffff:0x08<br />
<br />
== See also ==<br />
<br />
* [https://forums.unraid.net/topic/93341-tutorial-networked-nut-for-cyberpower-ups/ Tutorial on networked NUT for Cyberpower UPS]</div>Harriganhttps://wiki.archlinux.org/index.php?title=Install_Arch_Linux_on_a_removable_medium&diff=632046Install Arch Linux on a removable medium2020-08-16T10:05:57Z<p>Harrigan: OS X to macOS</p>
<hr />
<div>[[Category:Installation process]]<br />
[[es:Install Arch Linux on a removable medium]]<br />
[[it:Install Arch Linux on a removable medium]]<br />
[[ja:USB キーに Arch Linux をインストール]]<br />
[[lt:Install Arch Linux on a removable medium]]<br />
[[pt:Install Arch Linux on a removable medium]]<br />
[[zh-hans:Install Arch Linux on a removable medium]]<br />
{{Related articles start}}<br />
{{Related|Installation guide}}<br />
{{Related|General recommendations}}<br />
{{Related|General troubleshooting}}<br />
{{Related|Install Arch Linux from VirtualBox}}<br />
{{Related|Solid State Drives}}<br />
{{Related articles end}}<br />
This page explains how to perform a regular Arch installation onto removable media (e.g. a USB flash drive). In contrast to having a LiveUSB as covered in [[USB flash installation media]], the result will be a persistent installation identical to normal installation to HDD.<br />
<br />
== Installation ==<br />
<br />
{{Note|At least 2 GiB of storage space is recommended. A modest set of packages will fit, leaving a little free space for storage.}}<br />
<br />
There are various ways of installing Arch on removable media, depending on the operating system you have available:<br />
<br />
* If you have another Linux computer available (it need not be Arch), you can follow the instructions at [[Install from existing Linux]].<br />
* An Arch Linux CD/USB can be used to install Arch onto the removable medium, via booting the CD/USB and following the [[installation guide]]. If booting from a Live USB, the installation cannot be made to the same removable medium you are booting from.<br />
* If you run Windows or macOS, download VirtualBox, install VirtualBox Extensions, attach your removable medium to a virtual machine running Linux (either already installed or via a live ISO), and point the installation into the now attached drive while using the instructions at the [[Installation guide]].<br />
<br />
=== Installation tweaks ===<br />
<br />
* Before [[mkinitcpio#Image creation and activation|creating the initial RAM disk]], in {{ic|/etc/mkinitcpio.conf}} move the {{ic|block}} and {{ic|keyboard}} hooks before the {{ic|autodetect}} hook. This is necessary to allow booting on multiple systems each requiring different modules in early userspace.<br />
* If you have chosen to install Arch onto a USB mass storage device and want to be able to continue to use it as a cross-platform removable drive, this can be accomplished by creating a partition housing an appropriate file system (most likely NTFS or exFAT). Note that the data partition may need to be the first partition on the device, as Windows assumes that there can only be one partition on a removable device, and will happily automount an EFI system partition otherwise. Remember to install {{Pkg|dosfstools}} and {{Pkg|ntfs-3g}}. Some tools are available online that may allow you to flip the Removable Medium Bit (RMB) on your USB mass storage device. This would trick operating systems into treating your USB mass storage device as an external hard disk and allow you to use whichever partitioning scheme you choose.<br />
<br />
{{Warning|It is not possible to flip the Removable Medium Bit (RMB) on every USB mass storage device and attempting to use software that is incompatible with your device may damage it. Attempting to flip the RMB is '''not''' recommended.}}<br />
<br />
== Configuration ==<br />
<br />
* Make sure that {{ic|/etc/fstab}} includes the correct partition information for {{ic|/}}, and for any other partitions on the disk. If the drive is to be booted on several machines, it is quite likely that devices and number of available hard disks vary. So it is advised to use [[UUID]] or label.<br />
<br />
To get the proper UUIDs for your partitions use ''lsblk'' of ''blkid''. See [[Persistent block device naming#by-uuid]] for more information.<br />
<br />
{{Note|<br />
* When GRUB is installed on the disk, the disk will always be {{ic|hd0,0}}.<br />
* It seems that current versions of GRUB will automatically default to using uuid. The following directions are for GRUB legacy.<br />
}}<br />
<br />
=== GRUB legacy ===<br />
<br />
{{ic|menu.lst}}, the GRUB legacy configuration file, should be edited to (loosely) match the following.<br />
<br />
When using file system labels your {{ic|menu.lst}} should look like this:<br />
<br />
root (hd0,0)<br />
kernel /boot/vmlinuz-linux root=/dev/disk/by-label/'''Arch''' rw<br />
initrd /boot/initramfs-linux.img<br />
<br />
And for UUID, it should be like this:<br />
<br />
root (hd0,0)<br />
kernel /boot/vmlinuz-linux root=/dev/disk/by-uuid/3a9f8929-627b-4667-9db4-388c4eaaf9fa rw<br />
initrd /boot/initramfs-linux.img<br />
<br />
=== GRUB ===<br />
<br />
On GPT with UEFI installations, make sure you follow the instructions on [[GRUB#UEFI systems]] and include the {{ic|--removable}} option as doing otherwise may break existing GRUB installations, as in the below command:<br />
<br />
# grub-install --target=x86_64-efi --efi-directory=''esp'' '''--removable''' --recheck<br />
<br />
=== Syslinux ===<br />
<br />
Using your UUID:<br />
<br />
LABEL Arch<br />
MENU LABEL Arch Linux<br />
LINUX ../vmlinuz-linux<br />
APPEND root=UUID=3a9f8929-627b-4667-9db4-388c4eaaf9fa rw<br />
INITRD ../initramfs-linux.img<br />
<br />
== Tips ==<br />
<br />
=== Using your portable install on multiple machines ===<br />
<br />
==== Video drivers ====<br />
<br />
{{Note|The use of proprietary video drivers is '''not''' recommended for this type of installation.}}<br />
<br />
To support most common GPUs, install {{Pkg|xf86-video-vesa}}, {{Pkg|xf86-video-ati}}, {{Pkg|xf86-video-intel}}, {{Pkg|xf86-video-amdgpu}}, and {{Pkg|xf86-video-nouveau}}.<br />
<br />
==== Persistent block device naming ====<br />
<br />
It is recommended to use [[UUID]] in both [[fstab]] and boot loader configuration. See [[Persistent block device naming]] for details.<br />
<br />
Alternatively, you may create udev rule to create custom symlink for your disk. Then use this symlink in [[fstab]] and boot loader configuration. See [[udev#Setting static device names]] for details.<br />
<br />
==== Kernel parameters ====<br />
<br />
You may want to disable KMS for various reasons, such as getting a blank screen or a "no signal" error from the display, when using some Intel video cards, etc. To disable KMS, add {{ic|nomodeset}} as a kernel parameter. See [[Kernel parameters]] for more info.<br />
<br />
{{Warning|Some [[Xorg]] drivers will not work with KMS disabled. See the wiki page on your specific driver for details. Nouveau in particular needs KMS to determine the correct display resolution. If you add {{ic|nomodeset}} as a kernel parameter as a preemptive measure you may have to adjust the display resolution manually when using machines with Nvidia video cards. See [[Xrandr]] for more info.}}<br />
<br />
=== Compatibility ===<br />
<br />
The fallback image should be used for maximum compatibility.<br />
<br />
=== Minimizing disk access ===<br />
<br />
If you are running Arch on a USB drive, SD card, or other devices with slow I/O or limited writes, you will want to minimize unneeded writes for maximum performance and longevity<br />
<br />
* It is highly recommended to review the [[Improving performance#Reduce disk reads/writes]] article prior to selecting a file system. To sum it up, for flash-based media such as USB flash drives or SD cards, [https://fenidik.blogspot.com/2010/03/ext4-disable-journal.html ext4 without a journal] should be fine, which can be created with {{ic|mkfs.ext4 -O "^has_journal" /dev/sdXX}}. The obvious drawback of using a file system with journaling disabled is data loss as a result of an ungraceful dismount. Recognize that flash has a limited number of writes, and a journaling file system will take some of these as the journal is updated. For this same reason, it is best to forget the swap partition. Note that this does not affect installing onto a portable hard drive.<br />
* You may want to configure [[systemd journal]] to store its journals in RAM, e.g. by creating a custom configuration file:<br />
<br />
{{hc|/etc/systemd/journald.conf.d/usbstick.conf|2=<br />
[Journal]<br />
Storage=volatile<br />
RuntimeMaxUse=30M<br />
}}<br />
<br />
* To disable {{ic|fsync}} and related system calls in web browsers and other applications that do not write essential data, use the {{ic|eatmydata}} command from {{Pkg|libeatmydata}} to avoid such system calls:<br />
<br />
$ eatmydata firefox<br />
<br />
== See also ==<br />
<br />
* [https://github.com/r-darwish/alma ALMA] - A utility written in Rust to automatically create persistent Arch Linux Live USB installations.<br />
* [https://magyar.urown.cloud/arch-usb.html ArchLinux USB] - c-magyar's excellent writeup on creating a persistent Live USB installation.<br />
* [https://github.com/laurent85v/archuseriso archuseriso] - Templates for building Arch Linux Live ISO images. Live USB creation tool featuring Persistent Storage & Encryption.</div>Harrigan