https://wiki.archlinux.org/api.php?action=feedcontributions&user=Mar77i&feedformat=atomArchWiki - User contributions [en]2024-03-28T11:00:02ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Firefox&diff=480056Firefox2017-06-18T10:35:58Z<p>Mar77i: /* Multimedia playback */ Don't use "in case" twice in the new paragraph.</p>
<hr />
<div>[[Category:Web browser]]<br />
[[ar:Firefox]]<br />
[[cs:Firefox]]<br />
[[de:Firefox]]<br />
[[es:Firefox]]<br />
[[fr:Firefox]]<br />
[[it:Firefox]]<br />
[[ja:Firefox]]<br />
[[ko:Firefox]]<br />
[[ru:Firefox]]<br />
[[zh-hans:Firefox]]<br />
{{Related articles start}}<br />
{{Related|Browser plugins}}<br />
{{Related|Firefox/Tweaks}}<br />
{{Related|Firefox/Privacy}}<br />
{{Related|Chromium}}<br />
{{Related|Opera}}<br />
{{Related articles end}}<br />
[https://www.mozilla.org/firefox Firefox] is a popular open-source graphical web browser from [https://www.mozilla.org Mozilla].<br />
<br />
== Installing ==<br />
<br />
Firefox can be [[installed]] with the {{Pkg|firefox}} package. For printing support, install {{Pkg|gtk3-print-backends}}, which is an optional dependency of {{Pkg|gtk3}}.<br />
<br />
Other alternatives include:<br />
<br />
* {{App|Firefox Extended Support Release|long-term supported version|https://www.mozilla.org/firefox/organizations/|{{AUR|firefox-esr}} or {{AUR|firefox-esr-bin}}}}<br />
* {{App|Firefox Beta|cutting-edge version|https://www.mozilla.org/firefox/channel/desktop/#beta|{{AUR|firefox-beta}} or {{AUR|firefox-beta-bin}}}}<br />
* {{App|Firefox Developer Edition|for developers|https://www.mozilla.org/firefox/developer/|{{AUR|firefox-developer}}}}<br />
* {{App|Firefox Nightly|nightly builds for testing ([https://developer.mozilla.org/Firefox/Experimental_features experimental features])|https://www.mozilla.org/firefox/channel/desktop/#nightly|{{AUR|firefox-nightly}}}} <br />
* {{App|Firefox KDE|Version of Firefox that incorporates an OpenSUSE patch for better KDE integration than is possible through simple Firefox plugins.|https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox|{{AUR|firefox-kde-opensuse}}}}<br />
* On top of the different Mozilla build channels, a number of forks exist with more or less special features; see [[List of applications#Gecko-based]].<br />
<br />
Here you can find an overview of Mozilla's [https://wiki.mozilla.org/Releases releases].<br />
<br />
There are a number of language packs available for Firefox, other than the standard English. Language packs are usually named as {{ic|firefox-i18n-''languagecode''}} (where {{ic|''languagecode''}} can be any language code, such as '''de''', '''ja''', '''fr''', etc.). For a list of available language packs see [https://www.archlinux.org/packages/?sort=&q=firefox-i18n&maintainer=&last_update=&flagged=&limit=100 this].<br />
<br />
== Add-ons ==<br />
<br />
Firefox is well known for its large library of add-ons which can be used to add new features or modify the behavior of existing features of Firefox. You can find new add-ons or manage installed add-ons with Firefox's "Add-ons Manager."<br />
<br />
For a list of popular add-ons, see [https://addons.mozilla.org/firefox/extensions/?sort=popular Mozilla's add-on list sorted by popularity]. See also [[Wikipedia:List of Firefox extensions|List of Firefox extensions]] on Wikipedia.<br />
<br />
=== Adding search engines ===<br />
<br />
Search engines can be added to Firefox through normal add-ons, see [https://addons.mozilla.org/firefox/search-tools/ this page] for a list of available search engines.<br />
<br />
A very extensive list of search engines can be found at the [http://mycroftproject.com/ Mycroft Project].<br />
<br />
Also, you can use the [https://firefox.maltekraus.de/extensions/add-to-search-bar add-to-searchbar] extension to add a search to your search bar from any web site, by simply right clicking on the site's search field and selecting ''Add to Search Bar...''<br />
<br />
==== arch-firefox-search ====<br />
<br />
Install the {{Pkg|arch-firefox-search}} package to add Arch-specific searches (AUR, wiki, forum, etc, as specified by user) to the Firefox search toolbar.<br />
<br />
== Configuration ==<br />
<br />
Firefox exposes a number of configuration options. To examine them, enter:<br />
<br />
about:config<br />
<br />
in the Firefox address bar.<br />
<br />
Once set, these affect the user's current profile, and may be synchronized across all devices via [https://www.mozilla.org/firefox/sync/ Firefox Sync]. Please note that only a subset of the {{ic|about:config}} entries are synchronized by this method, and the exact subset may be found by searching for {{ic|services.sync.prefs}} in {{ic|about:config}}. Additional preferences and 3rd party preferences may be synchronized by creating new boolean entries prepending the config value with {{ic|services.sync.prefs.sync}} ([https://developer.mozilla.org/en-US/docs/Archive/Mozilla/Firefox_Sync/Syncing_custom_preferences documentation] is still applicable.) To synchronize the whitelist for the extension [https://addons.mozilla.org/firefox/addon/noscript/ NoScript]:<br />
<br />
services.sync.prefs.sync.capability.policy.maonoscript.sites<br />
<br />
The boolean {{ic|noscript.sync.enabled}} must be set to {{ic|true}} to synchronize the remainder of NoScript's preferences via Firefox Sync.<br />
<br />
Firefox also allows configuration for a profile via a {{ic|user.js}} file: [http://kb.mozillazine.org/User.js_file user.js] kept in the profile folder, usually {{ic|~/.mozilla/firefox/''xxxxxxxx''.default/}}. For a useful starting point, see e.g [https://github.com/pyllyukko/user.js custom user.js] which is targeted at privacy/security conscious users.<br />
<br />
One drawback of the above approach is that it is not applied system-wide. Furthermore, this is not useful as a "pre-configuration", since the profile directory is created after first launch of the browser. You can, however, let ''firefox'' create a new profile and, after closing it again, [https://support.mozilla.org/en-US/kb/back-and-restore-information-firefox-profiles#w_restoring-a-profile-backup copy the contents] of an already created profile folder into it. <br />
<br />
Sometimes it may be desired to lock certain settings, a feature useful in widespread deployments of customized Firefox. In order to create a system-wide configuration, follow the steps outlined in [http://kb.mozillazine.org/Locking_preferences Locking preferences]:<br />
<br />
1. Create {{ic|/usr/lib/firefox/defaults/pref/local-settings.js}}:<br />
<br />
pref("general.config.obscure_value", 0);<br />
pref("general.config.filename", "mozilla.cfg");<br />
<br />
2. Create {{ic|/usr/lib/firefox/mozilla.cfg}} (this stores the actual configuration):<br />
<br />
//<br />
//...your settings...<br />
// e.g to disable Pocket, uncomment the following line<br />
// lockPref("browser.pocket.enabled", false);<br />
<br />
Please note that the first line must contain exactly {{ic|//}}. The syntax of the file is similar to that of {{ic|user.js}}.<br />
<br />
=== Multimedia playback ===<br />
<br />
Firefox uses [[FFmpeg]] for playing multimedia inside HTML5 {{ic|<audio>}} and {{ic|<video>}} elements. Go to [https://www.youtube.com/html5 YouTube's HTML5 page], [https://www.quirksmode.org/html5/tests/video.html video-test page] or [https://hpr.dogphilosophy.net/test/ audio-test page] to check which formats are actually supported.<br />
<br />
HTML5 DRM playback is supported by the Google Widevine CDM, it is however not enabled by default. See ''Preferences > Content > DRM content'' if you want to learn more.<br />
<br />
See [[Firefox tweaks#Enable additional media codecs]] for advanced configuration and enabling support for Widevine (Netflix, Amazon Video, etc.).<br />
<br />
Starting with version 54, Firefox uses [[PulseAudio]] for audio playback and capture. For sound to work, you need to install the {{Pkg|pulseaudio}} package.<br />
<br />
In case, for whatver reason, [[PulseAudio]] is not an option for you, you can use {{AUR|apulse}} instead. To make this work, it is necessary to exclude {{ic|/dev/snd/}} from Firebox' sandboxing by adding it to the comma-separated list in {{ic|about:config}}:<br />
<br />
security.sandbox.content.write_path_whitelist<br />
<br />
=== Dictionaries for spell checking ===<br />
<br />
To enable spell checking for a specific language right click on any text field and check the ''Check Spelling'' box. To select a language for spell checking to you have right click again and select your language from the ''Languages'' sub-menu.<br />
<br />
To get more languages just click ''Add Dictionaries...'' and select the dictionary you want to install from the list.<br />
<br />
Alternatively, you can install the {{Pkg|hunspell}} package. You also need to install dictionaries for your language, such as {{Pkg|hunspell-fr}} (for the French language) or {{Pkg|hunspell-he}} (for Hebrew).<br />
<br />
By default, Firefox will try to symlink all your hunspell dictionaries in {{ic|/usr/lib/firefox/dictionaries}}. If you want to have less dictionaries offered to you in Firefox, you can remove some of those links. Be aware that it may not stand an upgrade of Firefox.<br />
<br />
When your default language choice does not stick, see [[#Firefox does not remember default spell check language]].<br />
<br />
=== KDE/GNOME integration ===<br />
<br />
* To bring the [[KDE]] look to GTK apps (including Firefox), install {{Pkg|breeze-gtk}} and {{Pkg|kde-gtk-config}}. Afterwards, go to ''System Settings > Application Style > GTK''. Be sure to choose 'Breeze' in 'Select a GTK2/GTK3 Theme' and check 'Show icons in GTK buttons' and 'Show icons in GTK'.<br />
<br />
* For integration with KDE’s mime type system and file dialogs, one can use {{AUR|firefox-kde-opensuse}} variant from AUR with OpenSUSE’s patches applied.<br />
<br />
* Add-ons may provide some integration, such as [https://addons.mozilla.org/firefox/addon/kde5-wallet-password-integrati/ KWallet integration], [https://addons.mozilla.org/firefox/addon/gnotifier/ GNotifier], [https://addons.mozilla.org/firefox/addon/unityfox-revived/ Unityfox Revived] (or e10s compatible {{AUR|firefox-extension-unity-launcher-api-e10s}}), and [https://addons.mozilla.org/firefox/addon/plasmanotify/ Plasma notifications].<br />
<br />
* Install {{AUR|mozilla-extension-gnome-keyring-git}} (all-JavaScript implementation) to integrate Firefox with [[GNOME Keyring]]. To make firefox-gnome-keyring use your login keychain, set extensions.gnome-keyring.keyringName to "login" (without the double quotes) in about:config. Note the lowercase 'l' despite the the keychain name having an uppercase 'L' in Seahorse.<br />
<br />
* To make the left mouse button warp the scrollbar instead of the middle one on KDE, go to ''System Settings > Application Style > GTK'' and set the checkbox for "Left mouse button warps scrollbar".<br />
<br />
== Plugins ==<br />
<br />
{{Note|Firefox [https://support.mozilla.org/en-US/kb/npapi-plugins has removed support] for [[w:NPAPI|NPAPI]] plugins, except for Flash. Firefox ESR will support plugins until 2018.}}<br />
<br />
See the main article: [[Browser plugins]]<br />
<br />
To find out what plugins are installed/enabled, enter:<br />
<br />
about:plugins<br />
<br />
in the Firefox address bar or go to the ''Add-ons'' entry in the Firefox Menu and select the ''Plugins'' tab.<br />
<br />
== Tips and tricks ==<br />
<br />
For general enhancements see [[Firefox/Tweaks]], for privacy related enhancements see [[Firefox/Privacy]].<br />
<br />
=== Screenshot of webpage ===<br />
<br />
To use Firefox to take a screenshot of a webpage open the developer console using {{ic|Shift+F2}}. Then type in:<br />
<br />
screenshot ''filename''<br />
<br />
where ''filename'' is optional.<br />
<br />
To take a screenshot of the entire page, not just the section displayed on the screen, use the {{ic|--fullpage}} option:<br />
<br />
screenshot --fullpage ''filename''<br />
<br />
== Troubleshooting ==<br />
<br />
=== Firefox startup takes very long ===<br />
<br />
If Firefox takes much longer to start up than other browsers, it may be due to lacking configuration of the localhost in {{ic|/etc/hosts}}. See [[Network configuration#Local network hostname resolution]] on how to set it up. <br />
<br />
=== Font troubleshooting ===<br />
<br />
See [[Font configuration]].<br />
<br />
Firefox has a setting which determines how many replacements it will allow from fontconfig. To allow it to use all your replacement-rules, change {{ic|gfx.font_rendering.fontconfig.max_generic_substitutions}} to {{ic|127}} (the highest possible value).<br />
<br />
=== Setting an email client ===<br />
<br />
Inside the browser, {{ic|mailto}} links by default are opened by a web application such as Gmail or Yahoo Mail. To set an external email program, go to ''Preferences > Applications'' and modify the ''action'' corresponding to the {{ic|mailto}} content type; the file path will need to be designated (e.g. {{ic|/usr/bin/kmail}} for Kmail).<br />
<br />
Outside the browser, {{ic|mailto}} links are handled by the {{ic|x-scheme-handler/mailto}} mime type, which can be easily configured with [[xdg-mime]]. See [[Default applications]] for details and alternatives.<br />
<br />
=== File association ===<br />
<br />
See [[Default applications]].<br />
<br />
=== Firefox keeps creating ~/Desktop even when this is not desired ===<br />
<br />
Firefox uses {{ic|~/Desktop}} as the default place for download and upload files. To change it to another folder, set the {{ic|XDG_DESKTOP_DIR}} option as explained in [[XDG user directories]].<br />
<br />
=== Make plugins respect blocked pop-ups ===<br />
<br />
Some plugins can misbehave and bypass the default settings, such as the Flash plugin. You can prevent this by doing the following:<br />
<br />
# Type {{ic|about:config}} into the address bar.<br />
# Right-click on the page and select ''New > Integer''.<br />
# Name it {{ic|privacy.popups.disable_from_plugins}}.<br />
# Set the value to {{ic|2}}.<br />
<br />
The possible values are:<br />
<br />
* {{ic|'''0'''}}: Allow all popups from plugins.<br />
* {{ic|'''1'''}}: Allow popups, but limit them to {{ic|dom.popup_maximum}}.<br />
* {{ic|'''2'''}}: Block popups from plugins.<br />
* {{ic|'''3'''}}: Block popups from plugins, even on whitelisted sites.<br />
<br />
=== Middle-click errors ===<br />
<br />
A common error message you can get while using the middle mouse button in Firefox is:<br />
<br />
The URL is not valid and cannot be loaded.<br />
<br />
Another symptom is that middle-clicking results in unexpected behavior, like accessing a random web page.<br />
<br />
The reason stems from the use of the middle mouse buttons in UNIX-like operating systems. The middle mouse button is used to paste whatever text has been highlighted/added to the clipboard. Then there is the possibly conflicting feature in Firefox, which defaults to loading the URL of the corresponding text when the button is depressed. This can be easily disabled by going to {{ic|about:config}} and setting the {{ic|middlemouse.contentLoadURL}} option to {{ic|false}}.<br />
<br />
Alternatively, having the traditional scroll cursor on middle-click (default behavior on Windows browsers) can be achieved by searching for {{ic|general.autoScroll}} and setting it to {{ic|true}}.<br />
<br />
=== Backspace does not work as the 'Back' button ===<br />
<br />
As per [https://embraceubuntu.com/2006/12/21/fix-firefox-backspace-to-take-you-to-the-previous-page/ this article], the feature has been removed in order to fix a bug. To re-introduce the original behavior go to {{ic|about:config}} and set the {{ic|browser.backspace_action}} option to {{ic|0}} (zero).<br />
<br />
=== Firefox does not remember login information ===<br />
<br />
It may be due to a corrupted {{ic|cookies.sqlite}} file in [https://support.mozilla.org/t5/Firefox/Profiles-Where-Firefox-stores-your-bookmarks-passwords-and-other/ta-p/4608#w_how-do-i-find-my-profile Firefox's profile] folder. In order to fix this, just rename or remove {{ic|cookie.sqlite}} while Firefox is not running.<br />
<br />
Open a terminal of choice and type the following:<br />
<br />
$ rm -f ~/.mozilla/firefox/''xxxxxxxx''.default/cookies.sqlite<br />
<br />
{{Note|''xxxxxxxx'' represents a random string of 8 characters.}}<br />
<br />
Restart Firefox and see if it solved the problem.<br />
<br />
=== Unreadable input fields with dark GTK+ themes ===<br />
<br />
{{Merge|Firefox tweaks#Appearance|Anything on that page might be in troubleshooting section as well, so let us keep the info in one place.}}<br />
<br />
When using a dark [[GTK+]] theme, one might encounter Internet pages with unreadable input and text fields (e.g. Amazon can have white text on white background). This can happen because the site only sets either background or text color, and Firefox takes the other one from the theme. The extension [https://addons.mozilla.org/firefox/addon/text-contrast-for-dark-themes/ Text Contrast for Dark Themes] sets the other color as needed to maintain contrast.<br />
<br />
Another workaround is to explicitly setting standard colors for all web pages in {{ic|~/.mozilla/firefox/''xxxxxxxx''.default/chrome/userContent.css}} or using [https://addons.mozilla.org/firefox/addon/stylish/ stylish add-on].<br />
<br />
The following sets input fields to standard black text / white background; both can be overridden by the displayed site, so that colors are seen as intended:<br />
<br />
{{Note|If you want {{ic|urlbar}} and {{ic|searchbar}} to be {{ic|white}} remove the two first {{ic|:not}} css selectors.}}<br />
<br />
{{bc|1=<br />
input:not(.urlbar-input):not(.textbox-input):not(.form-control):not([type='checkbox']) {<br />
-moz-appearance: none !important;<br />
background-color: white;<br />
color: black;<br />
}<br />
<br />
#downloads-indicator-counter {<br />
color: white;<br />
}<br />
<br />
textarea {<br />
-moz-appearance: none !important;<br />
background-color: white;<br />
color: black;<br />
}<br />
<br />
select {<br />
-moz-appearance: none !important;<br />
background-color: white;<br />
color: black;<br />
}<br />
}}<br />
<br />
Alternatively, force Firefox to use a light theme (e.g. "Adwaita:light"):<br />
<br />
# Copy {{ic|/usr/share/applications/firefox.desktop}} to {{ic|~/.local/share/applications/firefox.desktop}} and replace all occurrences of {{ic|1=Exec=firefox}} with {{ic|1=Exec=env GTK_THEME=Adwaita:light firefox}}.<br />
# Close all running instances of Firefox and restart your window manager/desktop environment.<br />
<br />
=== "Do you want Firefox to save your tabs for the next time it starts?" dialog does not appear ===<br />
<br />
From the [https://support.mozilla.com/en-US/questions/767751 Mozilla support] site:<br />
<br />
# Type {{ic|about:config}} in the address bar.<br />
# Set {{ic|browser.warnOnQuit}} to {{ic|true}}.<br />
# Set {{ic|browser.showQuitWarning}} to {{ic|true}}.<br />
<br />
=== Silently fails when installing desktop apps from marketplace ===<br />
<br />
Installation of apps from Firefox OS Marketplace will silently fail if there is no {{ic|~/.local/share/applications}} folder.<br />
<br />
=== Firefox detects the wrong version of my plugin ===<br />
<br />
When you close Firefox, the latter saves the current timestamp and version of your plugins inside {{ic|pluginreg.dat}} located in your profile folder, typically in {{ic|~/.mozilla/firefox/''xxxxxxxx''.default/}}.<br />
<br />
If you upgraded your plugin when Firefox was still running, you will thus have the wrong information inside that file. The next time you will restart Firefox you will get that message {{ic|Firefox has prevented the outdated plugin "XXXX" from running on ...}} when you will be trying to open content dedicated to that plugin on the web. This problem often appears with the official [[Browser plugins#Flash Player|Adobe Flash Player plugin]] which has been upgraded while Firefox was still running.<br />
<br />
The solution is to remove the file {{ic|pluginreg.dat}} from your profile and that is it. Firefox will not complain about the missing file as it will be recreated the next time Firefox will be closed. [https://bugzilla.mozilla.org/show_bug.cgi?id=1109795#c16]<br />
<br />
=== Javascript context menu does not appear on some sites ===<br />
<br />
In {{ic|about:config}}, unset the {{ic|dom.w3c_touch_events.enabled}} setting.<br />
<br />
=== Firefox does not remember default spell check language ===<br />
<br />
The default spell checking language can be set as follows:<br />
<br />
# Type {{ic|about:config}} in the address bar.<br />
# Set {{ic|spellchecker.dictionary}} to your language of choice, for instance {{ic|en_GB}}.<br />
# Notice that the for dictionaries installed as a Firefox plugin the notation is {{ic|en-GB}}, and for {{Pkg|hunspell}} dictionaries the notation is {{ic|en_GB}}.<br />
<br />
When you only have system wide dictionaries installed with {{Pkg|hunspell}}, Firefox might not remember your default dictionary language settings. This can be fixed by having at least one [https://addons.mozilla.org/firefox/language-tools/ dictionary] installed as a Firefox plugin. Notice that now you will also have a tab '''Dictionaries''' in '''add-ons'''.<br />
<br />
Related questions on the '''StackExchange''' platform: [https://stackoverflow.com/questions/26936792/change-firefox-spell-check-default-language/29446115], [https://stackoverflow.com/questions/21542515/change-default-language-on-firefox/29446353], [https://askubuntu.com/questions/184300/how-can-i-change-firefoxs-default-dictionary/576877]<br />
<br />
Related bug reports: [https://bugzilla.mozilla.org/show_bug.cgi?id=776028 Bugzilla 776028], [https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1026869 Ubuntu bug 1026869]<br />
<br />
=== Some MathML symbols are missing ===<br />
<br />
You need some Math fonts, namely Latin Modern Math and STIX (see this MDN page: [https://developer.mozilla.org/en-US/docs/Mozilla/MathML_Project/Fonts#Linux]), to display MathML correctly.<br />
<br />
In Arch Linux, these fonts are provided by {{Pkg|texlive-core}} '''and''' {{Pkg|texlive-fontsextra}}, but they are not available to fontconfig by default. See [[TeX Live#Fonts]] for details. You can also try other [[Fonts#Math|Math fonts]].<br />
<br />
=== Picture flickers while scrolling ===<br />
<br />
{{Accuracy|Most likely a driver issue, useless without reference}}<br />
{{Note|Problem available in some MATE desktops}}<br />
<br />
Uncheck the "Use smooth scrolling" setting in ''Edit > Settings > Advanced > General''.<br />
<br />
=== Tearing video in fullscreen mode ===<br />
<br />
If you are using the Xorg Intel or Nouveau drivers and experience tearing video in fullscreen mode, try [[Firefox tweaks#Enable OpenGL Off-Main-Thread Compositing (OMTC)]].<br />
<br />
=== Firefox looks bad with GTK+ >=3.20 ===<br />
<br />
{{Note|Firefox has removed GTK2 support in version 53 and will support an ESR 52 version until mid 2018.}}<br />
<br />
Firefox (as of version 47) [https://bugzilla.mozilla.org/show_bug.cgi?id=1264079 does not support] GTK+ >=3.20 and may look unsightly as a result. A possible resolution is compiling Firefox against GTK2 instead, see {{AUR|firefox-esr-gtk2}}. Alternatively, you may use [[Unofficial_user_repositories#markzz|markzz's repository]] or [[Unofficial_user_repositories#archlinuxcn|archlinuxcn's]] (x86_64 only) for pre-built GTK2 Firefox packages.<br />
<br />
=== Firefox WebRTC module cannot detect a microphone ===<br />
<br />
WebRTC applications for instance [https://mozilla.github.io/webrtc-landing/gum_test.html Firefox WebRTC getUserMedia test page] say that microphone cannot be found. Issue is reproducible for both ALSA or Pulseaudio setup. Firefox debug logs show the following error:<br />
<br />
{{hc|1=$ NSPR_LOG_MODULES=MediaManager:5,GetUserMedia:5 firefox|2=<br />
...<br />
[Unnamed thread 0x7fd7c0654340]: D/GetUserMedia VoEHardware:GetRecordingDeviceName: Failed 1<br />
}}<br />
<br />
You can try setting {{ic|media.navigator.audio.full_duplex}} property to {{ic|false}} at {{ic|about:config}} Firefox page and restart Firefox.<br />
<br />
This can also help if you are using the PulseAudio [[PulseAudio/Troubleshooting#Enable Echo/Noise-Cancelation|module-echo-cancel]], and Firefox does not recognise the virtual echo canceling source.<br />
<br />
=== Make Firefox 54 use more than one "Web content" process ===<br />
<br />
{{Move|Firefox/Tweaks|Not a troubleshooting. Explain why 4 is better than 1 along the way.}}<br />
<br />
Firefox 54 supports multiple "Web Content" processes but the default installation uses only one. To solve that, go to {{ic|about:config}} and set {{ic|dom.ipc.processCount}} to {{ic|4}}. The recommended maximum is four, but you can set up to seven. [https://arstechnica.com/information-technology/2017/06/firefox-multiple-content-processes/] [https://support.mozilla.org/en-US/kb/performance-settings]<br />
<br />
With {{ic|dom.ipc.processCount}} set to {{ic|1}} (Default):<br />
<br />
{{hc|# ps -e {{!}} grep 'Web Content'|<br />
13421 tty1 00:00:14 Web Content<br />
}}<br />
<br />
With {{ic|dom.ipc.processCount}} set to {{ic|4}}:<br />
<br />
{{hc|# ps -e {{!}} grep 'Web Content'|<br />
13991 tty1 00:00:04 Web Content<br />
14027 tty1 00:00:09 Web Content<br />
14031 tty1 00:00:20 Web Content<br />
14040 tty1 00:00:26 Web Content<br />
}}<br />
<br />
== See also ==<br />
<br />
* [https://www.mozilla.org/firefox/ Official website]<br />
* [https://www.mozilla.org/ Mozilla Foundation]<br />
* [https://wiki.mozilla.org/Firefox Firefox wiki]<br />
* [https://addons.mozilla.org/ Firefox Add-ons]<br />
* [https://addons.mozilla.org/firefox/themes/ Firefox themes]</div>Mar77ihttps://wiki.archlinux.org/index.php?title=Firefox&diff=480051Firefox2017-06-18T10:06:45Z<p>Mar77i: /* Multimedia playback */ Add additional steps to make audio with apulse work</p>
<hr />
<div>[[Category:Web browser]]<br />
[[ar:Firefox]]<br />
[[cs:Firefox]]<br />
[[de:Firefox]]<br />
[[es:Firefox]]<br />
[[fr:Firefox]]<br />
[[it:Firefox]]<br />
[[ja:Firefox]]<br />
[[ko:Firefox]]<br />
[[ru:Firefox]]<br />
[[zh-hans:Firefox]]<br />
{{Related articles start}}<br />
{{Related|Browser plugins}}<br />
{{Related|Firefox/Tweaks}}<br />
{{Related|Firefox/Privacy}}<br />
{{Related|Chromium}}<br />
{{Related|Opera}}<br />
{{Related articles end}}<br />
[https://www.mozilla.org/firefox Firefox] is a popular open-source graphical web browser from [https://www.mozilla.org Mozilla].<br />
<br />
== Installing ==<br />
<br />
Firefox can be [[installed]] with the {{Pkg|firefox}} package. For printing support, install {{Pkg|gtk3-print-backends}}, which is an optional dependency of {{Pkg|gtk3}}.<br />
<br />
Other alternatives include:<br />
<br />
* {{App|Firefox Extended Support Release|long-term supported version|https://www.mozilla.org/firefox/organizations/|{{AUR|firefox-esr}} or {{AUR|firefox-esr-bin}}}}<br />
* {{App|Firefox Beta|cutting-edge version|https://www.mozilla.org/firefox/channel/desktop/#beta|{{AUR|firefox-beta}} or {{AUR|firefox-beta-bin}}}}<br />
* {{App|Firefox Developer Edition|for developers|https://www.mozilla.org/firefox/developer/|{{AUR|firefox-developer}}}}<br />
* {{App|Firefox Nightly|nightly builds for testing ([https://developer.mozilla.org/Firefox/Experimental_features experimental features])|https://www.mozilla.org/firefox/channel/desktop/#nightly|{{AUR|firefox-nightly}}}} <br />
* {{App|Firefox KDE|Version of Firefox that incorporates an OpenSUSE patch for better KDE integration than is possible through simple Firefox plugins.|https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox|{{AUR|firefox-kde-opensuse}}}}<br />
* On top of the different Mozilla build channels, a number of forks exist with more or less special features; see [[List of applications#Gecko-based]].<br />
<br />
Here you can find an overview of Mozilla's [https://wiki.mozilla.org/Releases releases].<br />
<br />
There are a number of language packs available for Firefox, other than the standard English. Language packs are usually named as {{ic|firefox-i18n-''languagecode''}} (where {{ic|''languagecode''}} can be any language code, such as '''de''', '''ja''', '''fr''', etc.). For a list of available language packs see [https://www.archlinux.org/packages/?sort=&q=firefox-i18n&maintainer=&last_update=&flagged=&limit=100 this].<br />
<br />
== Add-ons ==<br />
<br />
Firefox is well known for its large library of add-ons which can be used to add new features or modify the behavior of existing features of Firefox. You can find new add-ons or manage installed add-ons with Firefox's "Add-ons Manager."<br />
<br />
For a list of popular add-ons, see [https://addons.mozilla.org/firefox/extensions/?sort=popular Mozilla's add-on list sorted by popularity]. See also [[Wikipedia:List of Firefox extensions|List of Firefox extensions]] on Wikipedia.<br />
<br />
=== Adding search engines ===<br />
<br />
Search engines can be added to Firefox through normal add-ons, see [https://addons.mozilla.org/firefox/search-tools/ this page] for a list of available search engines.<br />
<br />
A very extensive list of search engines can be found at the [http://mycroftproject.com/ Mycroft Project].<br />
<br />
Also, you can use the [https://firefox.maltekraus.de/extensions/add-to-search-bar add-to-searchbar] extension to add a search to your search bar from any web site, by simply right clicking on the site's search field and selecting ''Add to Search Bar...''<br />
<br />
==== arch-firefox-search ====<br />
<br />
Install the {{Pkg|arch-firefox-search}} package to add Arch-specific searches (AUR, wiki, forum, etc, as specified by user) to the Firefox search toolbar.<br />
<br />
== Configuration ==<br />
<br />
Firefox exposes a number of configuration options. To examine them, enter:<br />
<br />
about:config<br />
<br />
in the Firefox address bar.<br />
<br />
Once set, these affect the user's current profile, and may be synchronized across all devices via [https://www.mozilla.org/firefox/sync/ Firefox Sync]. Please note that only a subset of the {{ic|about:config}} entries are synchronized by this method, and the exact subset may be found by searching for {{ic|services.sync.prefs}} in {{ic|about:config}}. Additional preferences and 3rd party preferences may be synchronized by creating new boolean entries prepending the config value with {{ic|services.sync.prefs.sync}} ([https://developer.mozilla.org/en-US/docs/Archive/Mozilla/Firefox_Sync/Syncing_custom_preferences documentation] is still applicable.) To synchronize the whitelist for the extension [https://addons.mozilla.org/firefox/addon/noscript/ NoScript]:<br />
<br />
services.sync.prefs.sync.capability.policy.maonoscript.sites<br />
<br />
The boolean {{ic|noscript.sync.enabled}} must be set to {{ic|true}} to synchronize the remainder of NoScript's preferences via Firefox Sync.<br />
<br />
Firefox also allows configuration for a profile via a {{ic|user.js}} file: [http://kb.mozillazine.org/User.js_file user.js] kept in the profile folder, usually {{ic|~/.mozilla/firefox/''xxxxxxxx''.default/}}. For a useful starting point, see e.g [https://github.com/pyllyukko/user.js custom user.js] which is targeted at privacy/security conscious users.<br />
<br />
One drawback of the above approach is that it is not applied system-wide. Furthermore, this is not useful as a "pre-configuration", since the profile directory is created after first launch of the browser. You can, however, let ''firefox'' create a new profile and, after closing it again, [https://support.mozilla.org/en-US/kb/back-and-restore-information-firefox-profiles#w_restoring-a-profile-backup copy the contents] of an already created profile folder into it. <br />
<br />
Sometimes it may be desired to lock certain settings, a feature useful in widespread deployments of customized Firefox. In order to create a system-wide configuration, follow the steps outlined in [http://kb.mozillazine.org/Locking_preferences Locking preferences]:<br />
<br />
1. Create {{ic|/usr/lib/firefox/defaults/pref/local-settings.js}}:<br />
<br />
pref("general.config.obscure_value", 0);<br />
pref("general.config.filename", "mozilla.cfg");<br />
<br />
2. Create {{ic|/usr/lib/firefox/mozilla.cfg}} (this stores the actual configuration):<br />
<br />
//<br />
//...your settings...<br />
// e.g to disable Pocket, uncomment the following line<br />
// lockPref("browser.pocket.enabled", false);<br />
<br />
Please note that the first line must contain exactly {{ic|//}}. The syntax of the file is similar to that of {{ic|user.js}}.<br />
<br />
=== Multimedia playback ===<br />
<br />
Firefox uses [[FFmpeg]] for playing multimedia inside HTML5 {{ic|<audio>}} and {{ic|<video>}} elements. Go to [https://www.youtube.com/html5 YouTube's HTML5 page], [https://www.quirksmode.org/html5/tests/video.html video-test page] or [https://hpr.dogphilosophy.net/test/ audio-test page] to check which formats are actually supported.<br />
<br />
HTML5 DRM playback is supported by the Google Widevine CDM, it is however not enabled by default. See ''Preferences > Content > DRM content'' if you want to learn more.<br />
<br />
See [[Firefox tweaks#Enable additional media codecs]] for advanced configuration and enabling support for Widevine (Netflix, Amazon Video, etc.).<br />
<br />
Starting with version 54, Firefox uses [[PulseAudio]] for audio playback and capture. For sound to work, you need to install the {{Pkg|pulseaudio}} package.<br />
<br />
In case, for whatver reason, [[PulseAudio]] is not an option for you, you can use {{AUR|apulse}} instead. In that case, it is necessary to exclude {{ic|/dev/snd/}} from Firebox' sandboxing by adding it to the comma-separated list in {{ic|about:config}}:<br />
<br />
security.sandbox.content.write_path_whitelist<br />
<br />
=== Dictionaries for spell checking ===<br />
<br />
To enable spell checking for a specific language right click on any text field and check the ''Check Spelling'' box. To select a language for spell checking to you have right click again and select your language from the ''Languages'' sub-menu.<br />
<br />
To get more languages just click ''Add Dictionaries...'' and select the dictionary you want to install from the list.<br />
<br />
Alternatively, you can install the {{Pkg|hunspell}} package. You also need to install dictionaries for your language, such as {{Pkg|hunspell-fr}} (for the French language) or {{Pkg|hunspell-he}} (for Hebrew).<br />
<br />
By default, Firefox will try to symlink all your hunspell dictionaries in {{ic|/usr/lib/firefox/dictionaries}}. If you want to have less dictionaries offered to you in Firefox, you can remove some of those links. Be aware that it may not stand an upgrade of Firefox.<br />
<br />
When your default language choice does not stick, see [[#Firefox does not remember default spell check language]].<br />
<br />
=== KDE/GNOME integration ===<br />
<br />
* To bring the [[KDE]] look to GTK apps (including Firefox), install {{Pkg|breeze-gtk}} and {{Pkg|kde-gtk-config}}. Afterwards, go to ''System Settings > Application Style > GTK''. Be sure to choose 'Breeze' in 'Select a GTK2/GTK3 Theme' and check 'Show icons in GTK buttons' and 'Show icons in GTK'.<br />
<br />
* For integration with KDE’s mime type system and file dialogs, one can use {{AUR|firefox-kde-opensuse}} variant from AUR with OpenSUSE’s patches applied.<br />
<br />
* Add-ons may provide some integration, such as [https://addons.mozilla.org/firefox/addon/kde5-wallet-password-integrati/ KWallet integration], [https://addons.mozilla.org/firefox/addon/gnotifier/ GNotifier], [https://addons.mozilla.org/firefox/addon/unityfox-revived/ Unityfox Revived] (or e10s compatible {{AUR|firefox-extension-unity-launcher-api-e10s}}), and [https://addons.mozilla.org/firefox/addon/plasmanotify/ Plasma notifications].<br />
<br />
* Install {{AUR|mozilla-extension-gnome-keyring-git}} (all-JavaScript implementation) to integrate Firefox with [[GNOME Keyring]]. To make firefox-gnome-keyring use your login keychain, set extensions.gnome-keyring.keyringName to "login" (without the double quotes) in about:config. Note the lowercase 'l' despite the the keychain name having an uppercase 'L' in Seahorse.<br />
<br />
* To make the left mouse button warp the scrollbar instead of the middle one on KDE, go to ''System Settings > Application Style > GTK'' and set the checkbox for "Left mouse button warps scrollbar".<br />
<br />
== Plugins ==<br />
<br />
{{Note|Firefox [https://support.mozilla.org/en-US/kb/npapi-plugins has removed support] for [[w:NPAPI|NPAPI]] plugins, except for Flash. Firefox ESR will support plugins until 2018.}}<br />
<br />
See the main article: [[Browser plugins]]<br />
<br />
To find out what plugins are installed/enabled, enter:<br />
<br />
about:plugins<br />
<br />
in the Firefox address bar or go to the ''Add-ons'' entry in the Firefox Menu and select the ''Plugins'' tab.<br />
<br />
== Tips and tricks ==<br />
<br />
For general enhancements see [[Firefox/Tweaks]], for privacy related enhancements see [[Firefox/Privacy]].<br />
<br />
=== Screenshot of webpage ===<br />
<br />
To use Firefox to take a screenshot of a webpage open the developer console using {{ic|Shift+F2}}. Then type in:<br />
<br />
screenshot ''filename''<br />
<br />
where ''filename'' is optional.<br />
<br />
To take a screenshot of the entire page, not just the section displayed on the screen, use the {{ic|--fullpage}} option:<br />
<br />
screenshot --fullpage ''filename''<br />
<br />
== Troubleshooting ==<br />
<br />
=== Firefox startup takes very long ===<br />
<br />
If Firefox takes much longer to start up than other browsers, it may be due to lacking configuration of the localhost in {{ic|/etc/hosts}}. See [[Network configuration#Local network hostname resolution]] on how to set it up. <br />
<br />
=== Font troubleshooting ===<br />
<br />
See [[Font configuration]].<br />
<br />
Firefox has a setting which determines how many replacements it will allow from fontconfig. To allow it to use all your replacement-rules, change {{ic|gfx.font_rendering.fontconfig.max_generic_substitutions}} to {{ic|127}} (the highest possible value).<br />
<br />
=== Setting an email client ===<br />
<br />
Inside the browser, {{ic|mailto}} links by default are opened by a web application such as Gmail or Yahoo Mail. To set an external email program, go to ''Preferences > Applications'' and modify the ''action'' corresponding to the {{ic|mailto}} content type; the file path will need to be designated (e.g. {{ic|/usr/bin/kmail}} for Kmail).<br />
<br />
Outside the browser, {{ic|mailto}} links are handled by the {{ic|x-scheme-handler/mailto}} mime type, which can be easily configured with [[xdg-mime]]. See [[Default applications]] for details and alternatives.<br />
<br />
=== File association ===<br />
<br />
See [[Default applications]].<br />
<br />
=== Firefox keeps creating ~/Desktop even when this is not desired ===<br />
<br />
Firefox uses {{ic|~/Desktop}} as the default place for download and upload files. To change it to another folder, set the {{ic|XDG_DESKTOP_DIR}} option as explained in [[XDG user directories]].<br />
<br />
=== Make plugins respect blocked pop-ups ===<br />
<br />
Some plugins can misbehave and bypass the default settings, such as the Flash plugin. You can prevent this by doing the following:<br />
<br />
# Type {{ic|about:config}} into the address bar.<br />
# Right-click on the page and select ''New > Integer''.<br />
# Name it {{ic|privacy.popups.disable_from_plugins}}.<br />
# Set the value to {{ic|2}}.<br />
<br />
The possible values are:<br />
<br />
* {{ic|'''0'''}}: Allow all popups from plugins.<br />
* {{ic|'''1'''}}: Allow popups, but limit them to {{ic|dom.popup_maximum}}.<br />
* {{ic|'''2'''}}: Block popups from plugins.<br />
* {{ic|'''3'''}}: Block popups from plugins, even on whitelisted sites.<br />
<br />
=== Middle-click errors ===<br />
<br />
A common error message you can get while using the middle mouse button in Firefox is:<br />
<br />
The URL is not valid and cannot be loaded.<br />
<br />
Another symptom is that middle-clicking results in unexpected behavior, like accessing a random web page.<br />
<br />
The reason stems from the use of the middle mouse buttons in UNIX-like operating systems. The middle mouse button is used to paste whatever text has been highlighted/added to the clipboard. Then there is the possibly conflicting feature in Firefox, which defaults to loading the URL of the corresponding text when the button is depressed. This can be easily disabled by going to {{ic|about:config}} and setting the {{ic|middlemouse.contentLoadURL}} option to {{ic|false}}.<br />
<br />
Alternatively, having the traditional scroll cursor on middle-click (default behavior on Windows browsers) can be achieved by searching for {{ic|general.autoScroll}} and setting it to {{ic|true}}.<br />
<br />
=== Backspace does not work as the 'Back' button ===<br />
<br />
As per [https://embraceubuntu.com/2006/12/21/fix-firefox-backspace-to-take-you-to-the-previous-page/ this article], the feature has been removed in order to fix a bug. To re-introduce the original behavior go to {{ic|about:config}} and set the {{ic|browser.backspace_action}} option to {{ic|0}} (zero).<br />
<br />
=== Firefox does not remember login information ===<br />
<br />
It may be due to a corrupted {{ic|cookies.sqlite}} file in [https://support.mozilla.org/t5/Firefox/Profiles-Where-Firefox-stores-your-bookmarks-passwords-and-other/ta-p/4608#w_how-do-i-find-my-profile Firefox's profile] folder. In order to fix this, just rename or remove {{ic|cookie.sqlite}} while Firefox is not running.<br />
<br />
Open a terminal of choice and type the following:<br />
<br />
$ rm -f ~/.mozilla/firefox/''xxxxxxxx''.default/cookies.sqlite<br />
<br />
{{Note|''xxxxxxxx'' represents a random string of 8 characters.}}<br />
<br />
Restart Firefox and see if it solved the problem.<br />
<br />
=== Unreadable input fields with dark GTK+ themes ===<br />
<br />
{{Merge|Firefox tweaks#Appearance|Anything on that page might be in troubleshooting section as well, so let us keep the info in one place.}}<br />
<br />
When using a dark [[GTK+]] theme, one might encounter Internet pages with unreadable input and text fields (e.g. Amazon can have white text on white background). This can happen because the site only sets either background or text color, and Firefox takes the other one from the theme. The extension [https://addons.mozilla.org/firefox/addon/text-contrast-for-dark-themes/ Text Contrast for Dark Themes] sets the other color as needed to maintain contrast.<br />
<br />
Another workaround is to explicitly setting standard colors for all web pages in {{ic|~/.mozilla/firefox/''xxxxxxxx''.default/chrome/userContent.css}} or using [https://addons.mozilla.org/firefox/addon/stylish/ stylish add-on].<br />
<br />
The following sets input fields to standard black text / white background; both can be overridden by the displayed site, so that colors are seen as intended:<br />
<br />
{{Note|If you want {{ic|urlbar}} and {{ic|searchbar}} to be {{ic|white}} remove the two first {{ic|:not}} css selectors.}}<br />
<br />
{{bc|1=<br />
input:not(.urlbar-input):not(.textbox-input):not(.form-control):not([type='checkbox']) {<br />
-moz-appearance: none !important;<br />
background-color: white;<br />
color: black;<br />
}<br />
<br />
#downloads-indicator-counter {<br />
color: white;<br />
}<br />
<br />
textarea {<br />
-moz-appearance: none !important;<br />
background-color: white;<br />
color: black;<br />
}<br />
<br />
select {<br />
-moz-appearance: none !important;<br />
background-color: white;<br />
color: black;<br />
}<br />
}}<br />
<br />
Alternatively, force Firefox to use a light theme (e.g. "Adwaita:light"):<br />
<br />
# Copy {{ic|/usr/share/applications/firefox.desktop}} to {{ic|~/.local/share/applications/firefox.desktop}} and replace all occurrences of {{ic|1=Exec=firefox}} with {{ic|1=Exec=env GTK_THEME=Adwaita:light firefox}}.<br />
# Close all running instances of Firefox and restart your window manager/desktop environment.<br />
<br />
=== "Do you want Firefox to save your tabs for the next time it starts?" dialog does not appear ===<br />
<br />
From the [https://support.mozilla.com/en-US/questions/767751 Mozilla support] site:<br />
<br />
# Type {{ic|about:config}} in the address bar.<br />
# Set {{ic|browser.warnOnQuit}} to {{ic|true}}.<br />
# Set {{ic|browser.showQuitWarning}} to {{ic|true}}.<br />
<br />
=== Silently fails when installing desktop apps from marketplace ===<br />
<br />
Installation of apps from Firefox OS Marketplace will silently fail if there is no {{ic|~/.local/share/applications}} folder.<br />
<br />
=== Firefox detects the wrong version of my plugin ===<br />
<br />
When you close Firefox, the latter saves the current timestamp and version of your plugins inside {{ic|pluginreg.dat}} located in your profile folder, typically in {{ic|~/.mozilla/firefox/''xxxxxxxx''.default/}}.<br />
<br />
If you upgraded your plugin when Firefox was still running, you will thus have the wrong information inside that file. The next time you will restart Firefox you will get that message {{ic|Firefox has prevented the outdated plugin "XXXX" from running on ...}} when you will be trying to open content dedicated to that plugin on the web. This problem often appears with the official [[Browser plugins#Flash Player|Adobe Flash Player plugin]] which has been upgraded while Firefox was still running.<br />
<br />
The solution is to remove the file {{ic|pluginreg.dat}} from your profile and that is it. Firefox will not complain about the missing file as it will be recreated the next time Firefox will be closed. [https://bugzilla.mozilla.org/show_bug.cgi?id=1109795#c16]<br />
<br />
=== Javascript context menu does not appear on some sites ===<br />
<br />
In {{ic|about:config}}, unset the {{ic|dom.w3c_touch_events.enabled}} setting.<br />
<br />
=== Firefox does not remember default spell check language ===<br />
<br />
The default spell checking language can be set as follows:<br />
<br />
# Type {{ic|about:config}} in the address bar.<br />
# Set {{ic|spellchecker.dictionary}} to your language of choice, for instance {{ic|en_GB}}.<br />
# Notice that the for dictionaries installed as a Firefox plugin the notation is {{ic|en-GB}}, and for {{Pkg|hunspell}} dictionaries the notation is {{ic|en_GB}}.<br />
<br />
When you only have system wide dictionaries installed with {{Pkg|hunspell}}, Firefox might not remember your default dictionary language settings. This can be fixed by having at least one [https://addons.mozilla.org/firefox/language-tools/ dictionary] installed as a Firefox plugin. Notice that now you will also have a tab '''Dictionaries''' in '''add-ons'''.<br />
<br />
Related questions on the '''StackExchange''' platform: [https://stackoverflow.com/questions/26936792/change-firefox-spell-check-default-language/29446115], [https://stackoverflow.com/questions/21542515/change-default-language-on-firefox/29446353], [https://askubuntu.com/questions/184300/how-can-i-change-firefoxs-default-dictionary/576877]<br />
<br />
Related bug reports: [https://bugzilla.mozilla.org/show_bug.cgi?id=776028 Bugzilla 776028], [https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1026869 Ubuntu bug 1026869]<br />
<br />
=== Some MathML symbols are missing ===<br />
<br />
You need some Math fonts, namely Latin Modern Math and STIX (see this MDN page: [https://developer.mozilla.org/en-US/docs/Mozilla/MathML_Project/Fonts#Linux]), to display MathML correctly.<br />
<br />
In Arch Linux, these fonts are provided by {{Pkg|texlive-core}} '''and''' {{Pkg|texlive-fontsextra}}, but they are not available to fontconfig by default. See [[TeX Live#Fonts]] for details. You can also try other [[Fonts#Math|Math fonts]].<br />
<br />
=== Picture flickers while scrolling ===<br />
<br />
{{Accuracy|Most likely a driver issue, useless without reference}}<br />
{{Note|Problem available in some MATE desktops}}<br />
<br />
Uncheck the "Use smooth scrolling" setting in ''Edit > Settings > Advanced > General''.<br />
<br />
=== Tearing video in fullscreen mode ===<br />
<br />
If you are using the Xorg Intel or Nouveau drivers and experience tearing video in fullscreen mode, try [[Firefox tweaks#Enable OpenGL Off-Main-Thread Compositing (OMTC)]].<br />
<br />
=== Firefox looks bad with GTK+ >=3.20 ===<br />
<br />
{{Note|Firefox has removed GTK2 support in version 53 and will support an ESR 52 version until mid 2018.}}<br />
<br />
Firefox (as of version 47) [https://bugzilla.mozilla.org/show_bug.cgi?id=1264079 does not support] GTK+ >=3.20 and may look unsightly as a result. A possible resolution is compiling Firefox against GTK2 instead, see {{AUR|firefox-esr-gtk2}}. Alternatively, you may use [[Unofficial_user_repositories#markzz|markzz's repository]] or [[Unofficial_user_repositories#archlinuxcn|archlinuxcn's]] (x86_64 only) for pre-built GTK2 Firefox packages.<br />
<br />
=== Firefox WebRTC module cannot detect a microphone ===<br />
<br />
WebRTC applications for instance [https://mozilla.github.io/webrtc-landing/gum_test.html Firefox WebRTC getUserMedia test page] say that microphone cannot be found. Issue is reproducible for both ALSA or Pulseaudio setup. Firefox debug logs show the following error:<br />
<br />
{{hc|1=$ NSPR_LOG_MODULES=MediaManager:5,GetUserMedia:5 firefox|2=<br />
...<br />
[Unnamed thread 0x7fd7c0654340]: D/GetUserMedia VoEHardware:GetRecordingDeviceName: Failed 1<br />
}}<br />
<br />
You can try setting {{ic|media.navigator.audio.full_duplex}} property to {{ic|false}} at {{ic|about:config}} Firefox page and restart Firefox.<br />
<br />
This can also help if you are using the PulseAudio [[PulseAudio/Troubleshooting#Enable Echo/Noise-Cancelation|module-echo-cancel]], and Firefox does not recognise the virtual echo canceling source.<br />
<br />
=== Make Firefox 54 use more than one "Web content" process ===<br />
<br />
{{Move|Firefox/Tweaks|Not a troubleshooting. Explain why 4 is better than 1 along the way.}}<br />
<br />
Firefox 54 supports multiple "Web Content" processes but the default installation uses only one. To solve that, go to {{ic|about:config}} and set {{ic|dom.ipc.processCount}} to {{ic|4}}. The recommended maximum is four, but you can set up to seven. [https://arstechnica.com/information-technology/2017/06/firefox-multiple-content-processes/] [https://support.mozilla.org/en-US/kb/performance-settings]<br />
<br />
With {{ic|dom.ipc.processCount}} set to {{ic|1}} (Default):<br />
<br />
{{hc|# ps -e {{!}} grep 'Web Content'|<br />
13421 tty1 00:00:14 Web Content<br />
}}<br />
<br />
With {{ic|dom.ipc.processCount}} set to {{ic|4}}:<br />
<br />
{{hc|# ps -e {{!}} grep 'Web Content'|<br />
13991 tty1 00:00:04 Web Content<br />
14027 tty1 00:00:09 Web Content<br />
14031 tty1 00:00:20 Web Content<br />
14040 tty1 00:00:26 Web Content<br />
}}<br />
<br />
== See also ==<br />
<br />
* [https://www.mozilla.org/firefox/ Official website]<br />
* [https://www.mozilla.org/ Mozilla Foundation]<br />
* [https://wiki.mozilla.org/Firefox Firefox wiki]<br />
* [https://addons.mozilla.org/ Firefox Add-ons]<br />
* [https://addons.mozilla.org/firefox/themes/ Firefox themes]</div>Mar77ihttps://wiki.archlinux.org/index.php?title=Arch_User_Repository&diff=171635Arch User Repository2011-11-29T18:30:24Z<p>Mar77i: /* Other requests */ more grammar and clarity fixes</p>
<hr />
<div>[[Category:Arch User Repository (English)]]<br />
[[Category:About Arch (English)]]<br />
[[Category:Package development (English)]]<br />
[[Category:Package management (English)]]<br />
[[Category:Arch development (English)]]<br />
{{i18n|Arch User Repository}}<br />
[[fr:AUR]]<br />
{{Article summary start}}<br />
{{Article summary text|The Arch User Repository is a collection of user-submitted PKGBUILDs that supplement software available from the official repositories. This article describes how to build ''unsupported'' software packages from the AUR.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Package management overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|AUR Helpers}}<br />
{{Article summary wiki|AUR Trusted User Guidelines}}<br />
{{Article summary heading|Resources}}<br />
{{Article summary link|AUR Web Interface|http://aur.archlinux.org}}<br />
{{Article summary link|AUR Mailing List|http://www.archlinux.org/mailman/listinfo/aur-general}}<br />
{{Article summary 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]]. The AUR was created to organize and share new packages from the community and to help expedite popular packages' inclusion into the [[#.5Bcommunity.5D|[community]]] 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 (PKGBUILD and related files). The AUR community has the ability to vote for or against 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 [community] repository (directly accessible by {{ic|pacman}} or {{ic|abs}}).<br />
<br />
==Getting started==<br />
<br />
Users can search and download [[PKGBUILD]]s from the [http://aur.archlinux.org AUR Web Interface]. These PKGBUILDs can be built into installable packages using [[makepkg]], then installed using [[pacman]]. <br />
<br />
* Read the remainder of this article for more info and a short tutorial on installing AUR packages.<br />
* Visit the [http://aur.archlinux.org AUR Web Interface] to inform yourself on updates and happenings. There you will also find statistics and an up-to-date list of newest available packages available in AUR.<br />
* Glance over the [[#FAQ]] for answers to the most common questions.<br />
* You may wish to adjust {{ic|/etc/makepkg.conf}} to better optimize for your processor prior to building packages from the AUR. A significant improvement in compile times can be realized on systems with multi-core processors by adjusting the MAKEFLAGS variable. Users can also enable hardware-specific optimizations in GCC via the CFLAGS variable. See [[makepkg.conf]] for more information.<br />
* Install "base-devel" ({{ic|pacman -S base-devel}}), because members of this group are not explicitly required by AUR packages which may not build without them (more info in [http://bbs.archlinux.org/viewtopic.php?pid=632355 this thread]).<br />
<br />
==History==<br />
The following items are listed for historical purposes only. They have since been superseded by the AUR and are no longer available.<br />
<br />
At 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 />
==Searching==<br />
The AUR web interface can be found [http://aur.archlinux.org/ here], and an interface suitable for accessing the AUR from a script (for example) can be found [http://aur.archlinux.org/rpc.php here]<br />
<br />
Queries search package names and descriptions via a MySQL LIKE comparison. This allows for more flexible search criteria (e.g. try searching for 'tool%like%grep' instead of 'tool like grep'). If you need to search for a description that contains '%', escape it with '\%'.<br />
<br />
==Installing packages==<br />
Installing packages from the AUR (aka the [unsupported] repository) is a relatively simple process. Essentially:<br />
# Acquire the tarball which contains the [[PKGBUILD]] and possibly other required files<br />
# Extract the tarball (preferably in a folder set aside just for builds from the AUR)<br />
# Run [[makepkg]] in the directory where the files are saved ("makepkg -s" will auto-resolve dependencies with [[pacman]])<br />
# Install the resulting package with [[pacman]]<br />
<br />
# pacman -U /path/to/pkg.tar.xz<br />
<br />
[[AUR Helpers]] add seamless access to the AUR. They vary in their features, but can ease in searching, fetching, building, and installing from PKGBUILDs found in the AUR. All of these scripts can be found in UNSUPPORTED. <br />
<br />
{{Note|There is not and will never be an ''official'' mechanism for installing build material from UNSUPPORTED. All users should be familiar with the build process.}}<br />
<br />
What follows is a detailed example of installation of a package called "foo".<br />
<br />
===Prerequisites===<br />
First ensure that the necessary tools are installed. The package group "base-devel" should be sufficient; it includes ''make'' and other tools needed for compiling from source.<br />
<br />
{{Warning|Packages in the AUR assume "base-devel" is installed, and will not list members of this group as dependencies even if the package cannot be built without them. Please ensure this group is installed before complaining about failed builds.}}<br />
<br />
# pacman -S base-devel<br />
<br />
Next choose an appropriate build directory. A build directory is simply a directory where the package will be made or "built" and can be any directory. Examples of commonly used directories are:<br />
<br />
~/builds<br />
<br />
or if using ABS (the [[Arch Build System]]):<br />
<br />
/var/abs/local<br />
<br />
For more information on ABS read the [[Arch Build System]] article. The example will use {{ic|~/builds}} as the build directory.<br />
<br />
===Acquire build files===<br />
Locate the package in the AUR. This is done using the search feature (text field at the top of the [http://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 />
Download the necessary build files. From the package's information page download the build files by clicking the "Tarball" link on the left-hand side near the end of the package details. This file should be saved to the build directory or otherwise copied to the directory after downloading. In this example, the file is called "foo.tar.gz" (standard format is <pkgname>.tar.gz, if it has been properly submitted).<br />
<br />
===Build the package===<br />
Extract the tarball. Change directories to the build directory if not already there and extract the build files.<br />
<br />
$ cd ~/builds<br />
$ tar -xvzf foo.tar.gz<br />
<br />
This should create a new directory called "foo" in the build directory.<br />
<br />
{{Warning|'''Carefully check all files.''' {{ic|cd}} to the newly created directory and carefully check the {{ic|PKGBUILD}} and any {{ic|.install}} file for malicious commands. {{ic|[[PKGBUILD]]}}s are bash scripts containing functions to be executed by {{ic|makepkg}}: these functions can contain ''any'' valid commands or bash syntax, so it is totally possible for a {{ic|PKGBUILD}} to contain dangerous commands through malice or ignorance on the part of the author. Since {{ic|makepkg}} uses fakeroot (and should never be run as root), there is some level of protection but you should never count on it. If in doubt, do not build the package and seek advice on the forums or mailing list.}}<br />
<br />
$ cd foo<br />
$ nano PKGBUILD<br />
$ nano foo.install<br />
<br />
Make the package. After manually confirming the integrity of the files, run [[makepkg]] as a normal user in the build directory.<br />
<br />
$ makepkg -s<br />
<br />
The {{ic|-s}} switch will use [[sudo]] to install any needed dependencies. If the use of sudo is undesirable, manually install required dependencies beforehand and exclude the {{ic|-s}} in the above command.<br />
<br />
===Install the package===<br />
Install the package using [[pacman]]. A tarball should have been created named:<br />
<br />
<application name>-<application version number>-<package revision number>-<architecture>.pkg.tar.xz<br />
<br />
This package can be installed using [[pacman]]'s "upgrade" command:<br />
<br />
# pacman -U foo-0.1-1-i686.pkg.tar.xz <br />
<br />
{{Note|The above example is only a brief summary of the package building process. A visit to the [[makepkg]] and [[ABS]] pages will provide more detail and is highly recommended (particularly for first-time users).}}<br />
<br />
==Feedback==<br />
The [http://aur.archlinux.org AUR Web Interface] has a comments facility that allows users to provide suggestions and feedback on improvements to the PKGBUILD contributor. Avoid pasting patches or PKGBUILDs 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 Clients|pastebin]].<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 [community], and the vote count is one of the considerations in that process; it is in everyone's interest to vote!<br />
<br />
==Sharing packages==<br />
The user plays an essential role in the AUR, which cannot fulfill its potential without the support, involvement, and contribution of the wider user community. The life-cycle of an AUR package starts and ends with the user and requires the user to contribute in several ways.<br />
<br />
Users can '''share''' [[PKGBUILD]]s using the UNSUPPORTED area in the AUR. UNSUPPORTED does not contain any binary packages but allows users to upload PKGBUILDs that can be downloaded by others. These PKGBUILDs are completely unofficial and have not been thoroughly vetted, so they should be used at your own risk.<br />
<br />
===Submitting packages===<br />
After logging in to the AUR web interface, a user can [http://aur.archlinux.org/pkgsubmit.php submit] a gzipped tarball ({{ic|.tar.gz}}) of a directory containing build files for a package. The directory inside the tarball should contain a {{ic|PKGBUILD}}, any {{ic|.install}} files, patches, etc. (ABSOLUTELY no binaries). Examples of what such a directory should look like can be seen inside {{ic|/var/abs}} if [[ABS]] was installed.<br />
<br />
The tarball can be created with the following command:<br />
$ makepkg --source <br />
<br />
Note that this is a gzipped tarball; assuming you are uploading a package called ''libfoo'', when you create the file it should look similar to this:<br />
<br />
# List contents of tarball.<br />
$ tar tf libfoo-0.1-1.src.tar.gz<br />
libfoo/<br />
libfoo/PKGBUILD<br />
libfoo/libfoo.install<br />
<br />
When submitting a package, observe the following rules: <br />
* Check [core], [extra], and [community] for the package. If it is inside any of those repositories in ANY form, DO NOT submit the package (if the current package is broken or is lacking an included feature then please file a bug report in [http://bugs.archlinux.org/ FlySpray]).<br />
* Check AUR for the package. If it is currently maintained, changes can be submitted in a comment for the maintainer's attention. If it is unmaintained, the package can be adopted and updated as required.<br />
* Verify carefully that what you are uploading is correct. All contributors must read and adhere to the [[Arch Packaging Standards]] when writing PKGBUILDs. This is essential to the smooth running and general success of the AUR. Remember you are not going to earn any credit or respect from your peers by wasting their time with a bad PKGBUILD.<br />
* Packages that contain binaries or that are very poorly written may be deleted without warning.<br />
* If you are unsure about the package (or the build/submission process) in any way, submit the PKGBUILD to the [http://mailman.archlinux.org/mailman/listinfo/ AUR Mailing List] or the [https://bbs.archlinux.org/viewforum.php?id=4 AUR boards] on the forum for public review before adding it to the AUR.<br />
* Make sure the package is useful. Will anyone else want to use this package? Is it extremely specialized? If more than a few people would find this package useful, it is appropriate for submission.<br />
* Gain some experience before submitting packages. Build a few packages to learn the process and then submit.<br />
* If you submit a {{ic|package.tar.gz}} with a file named '{{ic|package}}' in it you'll get an error: 'Could not change to directory {{ic|/home/aur/unsupported/package/package}}'. To resolve this, rename the file named '{{ic|package}}' to something else, for example, '{{ic|package.rc}}'. When it is installed in the {{ic|pkg}} directory you may rename it back to '{{ic|package}}'.<br />
<br />
===Maintaining packages===<br />
* If you maintain a package and want to update the PKGBUILD for your package just resubmit it.<br />
* Check for feedback and comments from other users and try to incorporate any improvements they suggest; consider it a learning process!<br />
* Please DO NOT just submit and forget about packages! While in UNSUPPORTED, it is the user's job to maintain the package by checking for updates and improving the PKGBUILD.<br />
* If you do not want to continue to maintain the package for some reason, {{ic|disown}} the package using the AUR web interface and/or post a message to the AUR Mailing List.<br />
<br />
===Other requests===<br />
* Disownment requests and removal requests go to the aur-general mailing list for TUs and other users to decide upon.<br />
* '''Include package name and URL to AUR page''', preferably with a footnote [1].<br />
* Disownment requests will be granted two weeks after the current maintainer has been contacted by email and did not react.<br />
* '''Package merging has been implemented''', users still have to resubmit a package under a new name and may request merging of the old version's comments and votes on the mailing list<br />
* Removal requests require the following information:<br />
** Package name and URL to AUR page<br />
** Reason for deletion, at least a short note <br> '''Notice:''' A package's comments does not sufficiently point out the reasons why a package is up for deletion. Because as soon as a TU takes action, the only place where such information can be obtained is the aur-general mailing list.<br />
** Include supporting details, like when a package is provided by another package, if you are the maintainer yourself, it's renamed and the original owner agreed, etc.<br />
<br />
Removal requests can be disapproved, in which case you'll likely be advised to disown the package for a future packager's reference.<br />
<br />
==[community]==<br />
The [community] repository, maintained by [[Trusted Users]], contains the most popular packages from AUR. It is enabled by default in {{ic|pacman.conf}}. If disabled/removed, it can be enabled by uncommenting/adding these two lines: <br />
<br />
{{hc<br />
|/etc/pacman.conf<br />
|<nowiki><br />
...<br />
[community]<br />
Include = /etc/pacman.d/mirrorlist<br />
...<br />
</nowiki>}}<br />
<br />
[community], unlike AUR, contains binary packages that can be installed directly with [[pacman]] and the build files can also be accessed with [[ABS]]. Some of these packages may eventually make the transition to the [core] or [extra] repositories as the developers consider them crucial to the distribution.<br />
<br />
Users can also access the [community] build files by editing {{ic|/etc/abs.conf}} and enabling the community repository in the {{ic|REPOS}} array.<br />
<br />
==Git Repo==<br />
A Git Repo of the AUR is maintained by Thomas Dziedzic providing package history among other things. It is updated at least once a day. To clone the repository (several hundred MB):<br />
<br />
$ git clone git://pkgbuild.com/aur.git<br />
<br />
[http://pkgbuild.com/git/aur.git/ Web interface], [http://pkgbuild.com/~td123/readme Readme], [http://bbs.archlinux.org/viewtopic.php?id=113099 Forum thread]<br />
<br />
==FAQ==<br />
<br />
{{FAQ<br />
|question=What is the AUR?<br />
|answer=The AUR (Arch User Repository) is a place where the Arch Linux community can upload [[PKGBUILD]]s of applications, libraries, etc., and share them with the entire community. Fellow users can then vote for their favorites to be moved into the [community] repository to be shared with Arch Linux users in binary form.}}<br />
<br />
{{FAQ<br />
|question=What kind of packages are permitted on the AUR?<br />
|answer=The packages on the AUR are merely "build scripts", i.e recipes to build binaries for pacman. For most cases, everything is permitted, as long as you are in compliance with the licensing terms of the software. 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 users to already have the restricted source in the build directory prior to building the package. Piracy is frowned upon, so "warez" is absolutely not permitted. When in doubt, ask.}}<br />
<br />
{{FAQ<br />
|question=What is a TU?<br />
|answer=A [[AUR Trusted User Guidelines|TU (Trusted User)]] is a person who is chosen to oversee AUR and the [community] repository. They're the ones who maintain popular PKGBUILDs in [community], and overall keep the AUR running.}}<br />
<br />
{{FAQ<br />
|question=What's the difference between [unsupported] and [community]?<br />
|answer=[unsupported] is where all PKGBUILDs that users submit are stored, and must be built manually with [[makepkg]]. When PKGBUILDs receive enough votes, they are moved into the [community] repository, where the TUs maintain binary packages that can be installed with [[pacman]].}}<br />
<br />
{{FAQ<br />
|question=How many votes does it take to get a PKGBUILD into [community]?<br />
|answer=Usually, at least 10 votes are required for something to move into [community]. However, if a TU wants to support a package, it will often be found in the repository.}}<br />
<br />
{{FAQ<br />
|question=How do I make a PKGBUILD?<br />
|answer=The best resource is [[Creating Packages]]. Remember to look in AUR before creating the PKGBUILD as to not duplicate efforts.}}<br />
<br />
{{FAQ<br />
|question=I'm trying to do {{ic|pacman -S foo}}; it isn't working but I know it's in [community]<br />
|answer=You probably haven't enabled [community] in your {{ic|/etc/pacman.conf}}. Just uncomment the relevant lines.<br />
If [community] is enabled in your {{ic|/etc/pacman.conf}} try running {{ic|pacman -S -y}} first to synchronize the pkgcache before trying your package again.}}<br />
<br />
{{FAQ<br />
|question=Foo in AUR is outdated; what do I do?<br />
|answer=For starters, you can flag packages out-of-date. If it stays out-of-date for an extended amount of time, the best thing to do is email the maintainer. If there is no response from the maintainer, you could mail to the aur-general mailing list to have a TU orphan the PKGBUILD if you're willing to maintain it yourself.}}<br />
<br />
{{FAQ<br />
|question=I have a PKGBUILD I would like to submit; can someone check it to see if there are any errors?<br />
|answer=If you would like to have your PKGBUILD critiqued, post it on the aur-general mailing list to get feedback from the TUs and fellow AUR members. You could also get help from the [[ArchChannel|IRC channel]], #archlinux on irc.freenode.net. You can also<br />
use [[namcap]] to check your PKGBUILD and the resulting package for errors.}}<br />
<br />
{{FAQ<br />
|question=Foo in AUR doesn't compile when I do {{ic|makepkg}}; what should I do?<br />
|answer=You are probably missing something trivial.<br />
<br />
# Run {{ic|pacman -Syyu}} before compiling anything with {{ic|makepkg}} as the problem may be that your system is not up-to-date.<br />
# Ensure you have both "base" and "base-devel" groups installed.<br />
# Try using the "{{ic|-s}}" option with {{ic|makepkg}} to check and install all the dependencies needed before starting the build process.<br />
<br />
The reason might not be trivial after all. Custom CFLAGS, LDFLAGS and MAKEFLAGS can cause failures. It's also possible that the PKGBUILD is broken for everyone. If you can't figure it out on your own, just report it to the maintainer.}}<br />
<br />
{{FAQ<br />
|question=How can I speed up repeated build processes?<br />
|answer=If you frequently compile code that uses gcc - say, a git or SVN package - you may find [[ccache]], short for "compiler cache", useful.}}<br />
<br />
{{FAQ<br />
|question=How do I access unsupported packages?<br />
|answer=See [[#Installing packages]]}}<br />
<br />
{{FAQ<br />
|question=How can I upload to AUR without using the web interface?<br />
|answer=You can use [https://aur.archlinux.org/packages.php?ID=23393 aurploader] or [https://aur.archlinux.org/packages.php?ID=37216 burp] -- both with command-line interfaces.}}</div>Mar77ihttps://wiki.archlinux.org/index.php?title=Arch_User_Repository&diff=171634Arch User Repository2011-11-29T18:25:05Z<p>Mar77i: /* Other requests */ fix a typo, update renaming</p>
<hr />
<div>[[Category:Arch User Repository (English)]]<br />
[[Category:About Arch (English)]]<br />
[[Category:Package development (English)]]<br />
[[Category:Package management (English)]]<br />
[[Category:Arch development (English)]]<br />
{{i18n|Arch User Repository}}<br />
[[fr:AUR]]<br />
{{Article summary start}}<br />
{{Article summary text|The Arch User Repository is a collection of user-submitted PKGBUILDs that supplement software available from the official repositories. This article describes how to build ''unsupported'' software packages from the AUR.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Package management overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|AUR Helpers}}<br />
{{Article summary wiki|AUR Trusted User Guidelines}}<br />
{{Article summary heading|Resources}}<br />
{{Article summary link|AUR Web Interface|http://aur.archlinux.org}}<br />
{{Article summary link|AUR Mailing List|http://www.archlinux.org/mailman/listinfo/aur-general}}<br />
{{Article summary 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]]. The AUR was created to organize and share new packages from the community and to help expedite popular packages' inclusion into the [[#.5Bcommunity.5D|[community]]] 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 (PKGBUILD and related files). The AUR community has the ability to vote for or against 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 [community] repository (directly accessible by {{ic|pacman}} or {{ic|abs}}).<br />
<br />
==Getting started==<br />
<br />
Users can search and download [[PKGBUILD]]s from the [http://aur.archlinux.org AUR Web Interface]. These PKGBUILDs can be built into installable packages using [[makepkg]], then installed using [[pacman]]. <br />
<br />
* Read the remainder of this article for more info and a short tutorial on installing AUR packages.<br />
* Visit the [http://aur.archlinux.org AUR Web Interface] to inform yourself on updates and happenings. There you will also find statistics and an up-to-date list of newest available packages available in AUR.<br />
* Glance over the [[#FAQ]] for answers to the most common questions.<br />
* You may wish to adjust {{ic|/etc/makepkg.conf}} to better optimize for your processor prior to building packages from the AUR. A significant improvement in compile times can be realized on systems with multi-core processors by adjusting the MAKEFLAGS variable. Users can also enable hardware-specific optimizations in GCC via the CFLAGS variable. See [[makepkg.conf]] for more information.<br />
* Install "base-devel" ({{ic|pacman -S base-devel}}), because members of this group are not explicitly required by AUR packages which may not build without them (more info in [http://bbs.archlinux.org/viewtopic.php?pid=632355 this thread]).<br />
<br />
==History==<br />
The following items are listed for historical purposes only. They have since been superseded by the AUR and are no longer available.<br />
<br />
At 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 />
==Searching==<br />
The AUR web interface can be found [http://aur.archlinux.org/ here], and an interface suitable for accessing the AUR from a script (for example) can be found [http://aur.archlinux.org/rpc.php here]<br />
<br />
Queries search package names and descriptions via a MySQL LIKE comparison. This allows for more flexible search criteria (e.g. try searching for 'tool%like%grep' instead of 'tool like grep'). If you need to search for a description that contains '%', escape it with '\%'.<br />
<br />
==Installing packages==<br />
Installing packages from the AUR (aka the [unsupported] repository) is a relatively simple process. Essentially:<br />
# Acquire the tarball which contains the [[PKGBUILD]] and possibly other required files<br />
# Extract the tarball (preferably in a folder set aside just for builds from the AUR)<br />
# Run [[makepkg]] in the directory where the files are saved ("makepkg -s" will auto-resolve dependencies with [[pacman]])<br />
# Install the resulting package with [[pacman]]<br />
<br />
# pacman -U /path/to/pkg.tar.xz<br />
<br />
[[AUR Helpers]] add seamless access to the AUR. They vary in their features, but can ease in searching, fetching, building, and installing from PKGBUILDs found in the AUR. All of these scripts can be found in UNSUPPORTED. <br />
<br />
{{Note|There is not and will never be an ''official'' mechanism for installing build material from UNSUPPORTED. All users should be familiar with the build process.}}<br />
<br />
What follows is a detailed example of installation of a package called "foo".<br />
<br />
===Prerequisites===<br />
First ensure that the necessary tools are installed. The package group "base-devel" should be sufficient; it includes ''make'' and other tools needed for compiling from source.<br />
<br />
{{Warning|Packages in the AUR assume "base-devel" is installed, and will not list members of this group as dependencies even if the package cannot be built without them. Please ensure this group is installed before complaining about failed builds.}}<br />
<br />
# pacman -S base-devel<br />
<br />
Next choose an appropriate build directory. A build directory is simply a directory where the package will be made or "built" and can be any directory. Examples of commonly used directories are:<br />
<br />
~/builds<br />
<br />
or if using ABS (the [[Arch Build System]]):<br />
<br />
/var/abs/local<br />
<br />
For more information on ABS read the [[Arch Build System]] article. The example will use {{ic|~/builds}} as the build directory.<br />
<br />
===Acquire build files===<br />
Locate the package in the AUR. This is done using the search feature (text field at the top of the [http://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 />
Download the necessary build files. From the package's information page download the build files by clicking the "Tarball" link on the left-hand side near the end of the package details. This file should be saved to the build directory or otherwise copied to the directory after downloading. In this example, the file is called "foo.tar.gz" (standard format is <pkgname>.tar.gz, if it has been properly submitted).<br />
<br />
===Build the package===<br />
Extract the tarball. Change directories to the build directory if not already there and extract the build files.<br />
<br />
$ cd ~/builds<br />
$ tar -xvzf foo.tar.gz<br />
<br />
This should create a new directory called "foo" in the build directory.<br />
<br />
{{Warning|'''Carefully check all files.''' {{ic|cd}} to the newly created directory and carefully check the {{ic|PKGBUILD}} and any {{ic|.install}} file for malicious commands. {{ic|[[PKGBUILD]]}}s are bash scripts containing functions to be executed by {{ic|makepkg}}: these functions can contain ''any'' valid commands or bash syntax, so it is totally possible for a {{ic|PKGBUILD}} to contain dangerous commands through malice or ignorance on the part of the author. Since {{ic|makepkg}} uses fakeroot (and should never be run as root), there is some level of protection but you should never count on it. If in doubt, do not build the package and seek advice on the forums or mailing list.}}<br />
<br />
$ cd foo<br />
$ nano PKGBUILD<br />
$ nano foo.install<br />
<br />
Make the package. After manually confirming the integrity of the files, run [[makepkg]] as a normal user in the build directory.<br />
<br />
$ makepkg -s<br />
<br />
The {{ic|-s}} switch will use [[sudo]] to install any needed dependencies. If the use of sudo is undesirable, manually install required dependencies beforehand and exclude the {{ic|-s}} in the above command.<br />
<br />
===Install the package===<br />
Install the package using [[pacman]]. A tarball should have been created named:<br />
<br />
<application name>-<application version number>-<package revision number>-<architecture>.pkg.tar.xz<br />
<br />
This package can be installed using [[pacman]]'s "upgrade" command:<br />
<br />
# pacman -U foo-0.1-1-i686.pkg.tar.xz <br />
<br />
{{Note|The above example is only a brief summary of the package building process. A visit to the [[makepkg]] and [[ABS]] pages will provide more detail and is highly recommended (particularly for first-time users).}}<br />
<br />
==Feedback==<br />
The [http://aur.archlinux.org AUR Web Interface] has a comments facility that allows users to provide suggestions and feedback on improvements to the PKGBUILD contributor. Avoid pasting patches or PKGBUILDs 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 Clients|pastebin]].<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 [community], and the vote count is one of the considerations in that process; it is in everyone's interest to vote!<br />
<br />
==Sharing packages==<br />
The user plays an essential role in the AUR, which cannot fulfill its potential without the support, involvement, and contribution of the wider user community. The life-cycle of an AUR package starts and ends with the user and requires the user to contribute in several ways.<br />
<br />
Users can '''share''' [[PKGBUILD]]s using the UNSUPPORTED area in the AUR. UNSUPPORTED does not contain any binary packages but allows users to upload PKGBUILDs that can be downloaded by others. These PKGBUILDs are completely unofficial and have not been thoroughly vetted, so they should be used at your own risk.<br />
<br />
===Submitting packages===<br />
After logging in to the AUR web interface, a user can [http://aur.archlinux.org/pkgsubmit.php submit] a gzipped tarball ({{ic|.tar.gz}}) of a directory containing build files for a package. The directory inside the tarball should contain a {{ic|PKGBUILD}}, any {{ic|.install}} files, patches, etc. (ABSOLUTELY no binaries). Examples of what such a directory should look like can be seen inside {{ic|/var/abs}} if [[ABS]] was installed.<br />
<br />
The tarball can be created with the following command:<br />
$ makepkg --source <br />
<br />
Note that this is a gzipped tarball; assuming you are uploading a package called ''libfoo'', when you create the file it should look similar to this:<br />
<br />
# List contents of tarball.<br />
$ tar tf libfoo-0.1-1.src.tar.gz<br />
libfoo/<br />
libfoo/PKGBUILD<br />
libfoo/libfoo.install<br />
<br />
When submitting a package, observe the following rules: <br />
* Check [core], [extra], and [community] for the package. If it is inside any of those repositories in ANY form, DO NOT submit the package (if the current package is broken or is lacking an included feature then please file a bug report in [http://bugs.archlinux.org/ FlySpray]).<br />
* Check AUR for the package. If it is currently maintained, changes can be submitted in a comment for the maintainer's attention. If it is unmaintained, the package can be adopted and updated as required.<br />
* Verify carefully that what you are uploading is correct. All contributors must read and adhere to the [[Arch Packaging Standards]] when writing PKGBUILDs. This is essential to the smooth running and general success of the AUR. Remember you are not going to earn any credit or respect from your peers by wasting their time with a bad PKGBUILD.<br />
* Packages that contain binaries or that are very poorly written may be deleted without warning.<br />
* If you are unsure about the package (or the build/submission process) in any way, submit the PKGBUILD to the [http://mailman.archlinux.org/mailman/listinfo/ AUR Mailing List] or the [https://bbs.archlinux.org/viewforum.php?id=4 AUR boards] on the forum for public review before adding it to the AUR.<br />
* Make sure the package is useful. Will anyone else want to use this package? Is it extremely specialized? If more than a few people would find this package useful, it is appropriate for submission.<br />
* Gain some experience before submitting packages. Build a few packages to learn the process and then submit.<br />
* If you submit a {{ic|package.tar.gz}} with a file named '{{ic|package}}' in it you'll get an error: 'Could not change to directory {{ic|/home/aur/unsupported/package/package}}'. To resolve this, rename the file named '{{ic|package}}' to something else, for example, '{{ic|package.rc}}'. When it is installed in the {{ic|pkg}} directory you may rename it back to '{{ic|package}}'.<br />
<br />
===Maintaining packages===<br />
* If you maintain a package and want to update the PKGBUILD for your package just resubmit it.<br />
* Check for feedback and comments from other users and try to incorporate any improvements they suggest; consider it a learning process!<br />
* Please DO NOT just submit and forget about packages! While in UNSUPPORTED, it is the user's job to maintain the package by checking for updates and improving the PKGBUILD.<br />
* If you do not want to continue to maintain the package for some reason, {{ic|disown}} the package using the AUR web interface and/or post a message to the AUR Mailing List.<br />
<br />
===Other requests===<br />
* Disownment requests and removal requests go to the aur-general mailing list for TUs and other users to decide upon.<br />
* '''Include package name and URL to AUR page''', preferably with a footnote [1].<br />
* Disownment requests will be granted two weeks after the current maintainer has been contacted by email and did not react.<br />
* '''Package merging has been implemented''', users still have to resubmit a package under a new name and may request merging of the old version's comments and votes on the mailing list<br />
* Removal requests require the following information:<br />
** Package name and URL to AUR page<br />
** Reason for deletion, at least a short note <br> '''Notice:''' Although a package's comments can sufficiently point out the reasons why a package is up for deletion. As soon as a TU takes action, the only place where such information can be obtained is the aur-general mailing list.<br />
** Include supporting details, like if the package is included somewhere else, if are you the maintainer yourself, it's renamed and the original owner agreed, etc.<br />
<br />
Removal requests can be disapproved, in which case you'll probably advised to disown the package for future reference.<br />
<br />
==[community]==<br />
The [community] repository, maintained by [[Trusted Users]], contains the most popular packages from AUR. It is enabled by default in {{ic|pacman.conf}}. If disabled/removed, it can be enabled by uncommenting/adding these two lines: <br />
<br />
{{hc<br />
|/etc/pacman.conf<br />
|<nowiki><br />
...<br />
[community]<br />
Include = /etc/pacman.d/mirrorlist<br />
...<br />
</nowiki>}}<br />
<br />
[community], unlike AUR, contains binary packages that can be installed directly with [[pacman]] and the build files can also be accessed with [[ABS]]. Some of these packages may eventually make the transition to the [core] or [extra] repositories as the developers consider them crucial to the distribution.<br />
<br />
Users can also access the [community] build files by editing {{ic|/etc/abs.conf}} and enabling the community repository in the {{ic|REPOS}} array.<br />
<br />
==Git Repo==<br />
A Git Repo of the AUR is maintained by Thomas Dziedzic providing package history among other things. It is updated at least once a day. To clone the repository (several hundred MB):<br />
<br />
$ git clone git://pkgbuild.com/aur.git<br />
<br />
[http://pkgbuild.com/git/aur.git/ Web interface], [http://pkgbuild.com/~td123/readme Readme], [http://bbs.archlinux.org/viewtopic.php?id=113099 Forum thread]<br />
<br />
==FAQ==<br />
<br />
{{FAQ<br />
|question=What is the AUR?<br />
|answer=The AUR (Arch User Repository) is a place where the Arch Linux community can upload [[PKGBUILD]]s of applications, libraries, etc., and share them with the entire community. Fellow users can then vote for their favorites to be moved into the [community] repository to be shared with Arch Linux users in binary form.}}<br />
<br />
{{FAQ<br />
|question=What kind of packages are permitted on the AUR?<br />
|answer=The packages on the AUR are merely "build scripts", i.e recipes to build binaries for pacman. For most cases, everything is permitted, as long as you are in compliance with the licensing terms of the software. 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 users to already have the restricted source in the build directory prior to building the package. Piracy is frowned upon, so "warez" is absolutely not permitted. When in doubt, ask.}}<br />
<br />
{{FAQ<br />
|question=What is a TU?<br />
|answer=A [[AUR Trusted User Guidelines|TU (Trusted User)]] is a person who is chosen to oversee AUR and the [community] repository. They're the ones who maintain popular PKGBUILDs in [community], and overall keep the AUR running.}}<br />
<br />
{{FAQ<br />
|question=What's the difference between [unsupported] and [community]?<br />
|answer=[unsupported] is where all PKGBUILDs that users submit are stored, and must be built manually with [[makepkg]]. When PKGBUILDs receive enough votes, they are moved into the [community] repository, where the TUs maintain binary packages that can be installed with [[pacman]].}}<br />
<br />
{{FAQ<br />
|question=How many votes does it take to get a PKGBUILD into [community]?<br />
|answer=Usually, at least 10 votes are required for something to move into [community]. However, if a TU wants to support a package, it will often be found in the repository.}}<br />
<br />
{{FAQ<br />
|question=How do I make a PKGBUILD?<br />
|answer=The best resource is [[Creating Packages]]. Remember to look in AUR before creating the PKGBUILD as to not duplicate efforts.}}<br />
<br />
{{FAQ<br />
|question=I'm trying to do {{ic|pacman -S foo}}; it isn't working but I know it's in [community]<br />
|answer=You probably haven't enabled [community] in your {{ic|/etc/pacman.conf}}. Just uncomment the relevant lines.<br />
If [community] is enabled in your {{ic|/etc/pacman.conf}} try running {{ic|pacman -S -y}} first to synchronize the pkgcache before trying your package again.}}<br />
<br />
{{FAQ<br />
|question=Foo in AUR is outdated; what do I do?<br />
|answer=For starters, you can flag packages out-of-date. If it stays out-of-date for an extended amount of time, the best thing to do is email the maintainer. If there is no response from the maintainer, you could mail to the aur-general mailing list to have a TU orphan the PKGBUILD if you're willing to maintain it yourself.}}<br />
<br />
{{FAQ<br />
|question=I have a PKGBUILD I would like to submit; can someone check it to see if there are any errors?<br />
|answer=If you would like to have your PKGBUILD critiqued, post it on the aur-general mailing list to get feedback from the TUs and fellow AUR members. You could also get help from the [[ArchChannel|IRC channel]], #archlinux on irc.freenode.net. You can also<br />
use [[namcap]] to check your PKGBUILD and the resulting package for errors.}}<br />
<br />
{{FAQ<br />
|question=Foo in AUR doesn't compile when I do {{ic|makepkg}}; what should I do?<br />
|answer=You are probably missing something trivial.<br />
<br />
# Run {{ic|pacman -Syyu}} before compiling anything with {{ic|makepkg}} as the problem may be that your system is not up-to-date.<br />
# Ensure you have both "base" and "base-devel" groups installed.<br />
# Try using the "{{ic|-s}}" option with {{ic|makepkg}} to check and install all the dependencies needed before starting the build process.<br />
<br />
The reason might not be trivial after all. Custom CFLAGS, LDFLAGS and MAKEFLAGS can cause failures. It's also possible that the PKGBUILD is broken for everyone. If you can't figure it out on your own, just report it to the maintainer.}}<br />
<br />
{{FAQ<br />
|question=How can I speed up repeated build processes?<br />
|answer=If you frequently compile code that uses gcc - say, a git or SVN package - you may find [[ccache]], short for "compiler cache", useful.}}<br />
<br />
{{FAQ<br />
|question=How do I access unsupported packages?<br />
|answer=See [[#Installing packages]]}}<br />
<br />
{{FAQ<br />
|question=How can I upload to AUR without using the web interface?<br />
|answer=You can use [https://aur.archlinux.org/packages.php?ID=23393 aurploader] or [https://aur.archlinux.org/packages.php?ID=37216 burp] -- both with command-line interfaces.}}</div>Mar77ihttps://wiki.archlinux.org/index.php?title=Arch_User_Repository&diff=146859Arch User Repository2011-06-21T12:37:15Z<p>Mar77i: /* Other requests */ added a short section about why reasons should be mentioned.</p>
<hr />
<div>[[Category:AUR (English)]]<br />
[[Category:About Arch (English)]]<br />
[[Category:Package development (English)]]<br />
[[Category:Package management (English)]]<br />
[[Category:Arch development (English)]]<br />
{{i18n|Arch User Repository}}<br />
[[fr:AUR]]<br />
{{Article summary start}}<br />
{{Article summary text|The Arch User Repository is a collection of user-submitted PKGBUILDs that supplement software available from the official repositories. This article describes how to build ''unsupported'' software packages from the AUR.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Package management overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|AUR Helpers}}<br />
{{Article summary wiki|AUR Trusted User Guidelines}}<br />
{{Article summary heading|Resources}}<br />
{{Article summary link|AUR Web Interface|http://aur.archlinux.org}}<br />
{{Article summary link|AUR Mailing List|http://www.archlinux.org/mailman/listinfo/aur-general}}<br />
{{Article summary 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]]. The AUR was created to organize and share new packages from the community and to help expedite popular packages' inclusion into the [[#.5Bcommunity.5D|[community]]] 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 (PKGBUILD and related files). The AUR community has the ability to vote for or against 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 [community] repository (directly accessible by <tt>pacman</tt> or <tt>abs</tt>).<br />
<br />
==Getting started==<br />
<br />
Users can search and download [[PKGBUILD]]s from the [http://aur.archlinux.org AUR Web Interface]. These PKGBUILDs can be built into installable packages using [[makepkg]], then installed using [[pacman]]. <br />
<br />
* Read the remainder of this article for more info and a short tutorial on installing AUR packages.<br />
* Visit the [http://aur.archlinux.org AUR Web Interface] to inform yourself on updates and happenings. There you will also find statistics and an up-to-date list of newest available packages available in AUR.<br />
* Glance over the [[#FAQ]] for answers to the most common questions.<br />
* You may wish to adjust {{Filename|/etc/makepkg.conf}} to better optimize for your processor prior to building packages from the AUR. A significant improvement in compile times can be realized on systems with multi-core processors by adjusting the MAKEFLAGS variable. Users can also enable hardware-specific optimizations in GCC via the CFLAGS variable. See [[makepkg.conf]] for more information.<br />
* Install "base-devel" ({{Codeline|pacman -S base-devel}}), because members of this group are not explicitly required by AUR packages which may not build without them (more info in [http://bbs.archlinux.org/viewtopic.php?pid=632355 this thread]).<br />
<br />
==History==<br />
The following items are listed for historical purposes only. They have since been superseded by the AUR and are no longer available.<br />
<br />
At the beginning, there was <tt><nowiki>ftp://ftp.archlinux.org/incoming</nowiki></tt>, 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 />
==Searching==<br />
The AUR web interface can be found [http://aur.archlinux.org/ here], and an interface suitable for accessing the AUR from a script (for example) can be found [http://aur.archlinux.org/rpc.php here]<br />
<br />
Queries search package names and descriptions via a MySQL LIKE comparison. This allows for more flexible search criteria (e.g. try searching for 'tool%like%grep' instead of 'tool like grep'). If you need to search for a description that contains '%', escape it with '\%'.<br />
<br />
==Installing packages==<br />
Installing packages from the AUR (aka the [unsupported] repository) is a relatively simple process. Essentially:<br />
# Acquire the tarball which contains the [[PKGBUILD]] and possibly other required files<br />
# Extract the tarball (preferably in a folder set aside just for builds from the AUR)<br />
# Run [[makepkg]] in the directory where the files are saved ("makepkg -s" will auto-resolve dependencies with [[pacman]])<br />
# Install the resulting package with [[pacman]]<br />
<br />
# pacman -U /path/to/pkg.tar.xz<br />
<br />
[[AUR Helpers]] add seamless access to the AUR. They vary in their features, but can ease in searching, fetching, building, and installing from PKGBUILDs found in the AUR. All of these scripts can be found in UNSUPPORTED. <br />
<br />
{{Note|There is not and will never be an ''official'' mechanism for installing build material from UNSUPPORTED. All users should be familiar with the build process.}}<br />
<br />
What follows is a detailed example of installation of a package called "foo".<br />
<br />
===Prerequisites===<br />
First ensure that the necessary tools are installed. The package group "base-devel" should be sufficient; it includes ''make'' and other tools needed for compiling from source.<br />
<br />
{{Warning|Packages in the AUR assume "base-devel" is installed, and will not list members of this group as dependencies even if the package cannot be built without them. Please ensure this group is installed before complaining about failed builds.}}<br />
<br />
# pacman -S base-devel<br />
<br />
Next choose an appropriate build directory. A build directory is simply a directory where the package will be made or "built" and can be any directory. Examples of commonly used directories are:<br />
<br />
~/builds<br />
<br />
or if using ABS (the [[Arch Build System]]):<br />
<br />
/var/abs/local<br />
<br />
For more information on ABS read the [[Arch Build System]] article. The example will use {{Filename|~/builds}} as the build directory.<br />
<br />
===Acquire build files===<br />
Locate the package in the AUR. This is done using the search feature (text field at the top of the [http://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 />
Download the necessary build files. From the package's information page download the build files by clicking the "Tarball" link on the left-hand side near the end of the package details. This file should be saved to the build directory or otherwise copied to the directory after downloading. In this example, the file is called "foo.tar.gz" (standard format is <pkgname>.tar.gz, if it has been properly submitted).<br />
<br />
===Build the package===<br />
Extract the tarball. Change directories to the build directory if not already there and extract the build files.<br />
<br />
$ cd ~/builds<br />
$ tar -xvzf foo.tar.gz<br />
<br />
This should create a new directory called "foo" in the build directory.<br />
<br />
{{Warning|'''Carefully check all files.''' Change directories to the newly created directory and carefully check the {{Filename|PKGBUILD}} and any {{Filename|.install}} file for malicious commands. If in doubt, do NOT build the package and seek advice on the forums or mailing list.}}<br />
<br />
$ cd foo<br />
$ nano PKGBUILD<br />
$ nano foo.install<br />
<br />
Make the package. After manually confirming the integrity of the files, run [[makepkg]] as a normal user in the build directory.<br />
<br />
$ makepkg -s<br />
<br />
The {{Codeline|-s}} switch will use [[sudo]] to install any needed dependencies. If the use of sudo is undesirable, manually install required dependencies beforehand and exclude the {{Codeline|-s}} in the above command.<br />
<br />
===Install the package===<br />
Install the package using [[pacman]]. A tarball should have been created named:<br />
<br />
<application name>-<application version number>-<package revision number>-<architecture>.pkg.tar.xz<br />
<br />
This package can be installed using [[pacman]]'s "upgrade" command:<br />
<br />
# pacman -U foo-0.1-1-i686.pkg.tar.xz <br />
<br />
{{Note|The above example is only a brief summary of the package building process. A visit to the [[makepkg]] and [[ABS]] pages will provide more detail and is highly recommended (particularly for first-time users).}}<br />
<br />
==Sharing packages==<br />
The user plays an essential role in the AUR, which cannot fulfill its potential without the support, involvement, and contribution of the wider user community. The life-cycle of an AUR package starts and ends with the user and requires the user to contribute in several ways.<br />
<br />
Users can '''share''' [[PKGBUILD]]s using the UNSUPPORTED area in the AUR. UNSUPPORTED does not contain any binary packages but allows users to upload PKGBUILDs that can be downloaded by others. These PKGBUILDs are completely unofficial and have not been thoroughly vetted, so they should be used at your own risk.<br />
<br />
===Feedback===<br />
A comments facility allows users to provide suggestions and feedback on improvements to the PKGBUILD contributor. Avoid pasting patches or PKGBUILDs 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 Clients|pastebin]].<br />
<br />
One of the easiest activities for '''all''' Arch users is to browse the AUR and '''vote''' for their favorite packages using the online interface. All packages are eligible for adoption by a TU for inclusion in [community], and the vote count is one of the considerations in that process; it is in everyone's interest to vote!<br />
<br />
===Submitting packages===<br />
After logging in to the AUR web interface, a user can [http://aur.archlinux.org/pkgsubmit.php submit] a gzipped tarball ({{Filename|.tar.gz}}) of a directory containing build files for a package. The directory inside the tarball should contain a {{Filename|PKGBUILD}}, any {{Filename|.install}} files, patches, etc. (ABSOLUTELY no binaries). Examples of what such a directory should look like can be seen inside {{Filename|/var/abs}} if [[ABS]] was installed.<br />
<br />
The tarball can be created with the following command:<br />
$ makepkg --source <br />
<br />
Note that this is a gzipped tarball; assuming you are uploading a package called ''libfoo'', when you create the file it should look similar to this:<br />
<br />
# List contents of tarball.<br />
$ tar tf libfoo-0.1-1.src.tar.gz<br />
libfoo/<br />
libfoo/PKGBUILD<br />
libfoo/libfoo.install<br />
<br />
When submitting a package, observe the following rules: <br />
* Check [core], [extra], and [community] for the package. If it is inside any of those repositories in ANY form, DO NOT submit the package (if the current package is broken or is lacking an included feature then please file a bug report in [http://bugs.archlinux.org/ FlySpray]).<br />
* Check AUR for the package. If it is currently maintained, changes can be submitted in a comment for the maintainer's attention. If it is unmaintained, the package can be adopted and updated as required.<br />
* Verify carefully that what you are uploading is correct. All contributors must read and adhere to the [[Arch Packaging Standards]] when writing PKGBUILDs. This is essential to the smooth running and general success of the AUR. Remember you are not going to earn any credit or respect from your peers by wasting their time with a bad PKGBUILD.<br />
* Packages that contain binaries or that are very poorly written may be deleted without warning.<br />
* If you are unsure about the package (or the build/submission process) in any way, submit the PKGBUILD to the [http://mailman.archlinux.org/mailman/listinfo/ AUR Mailing List] or the [https://bbs.archlinux.org/viewforum.php?id=4 AUR boards] on the forum for public review before adding it to the AUR.<br />
* Make sure the package is useful. Will anyone else want to use this package? Is it extremely specialized? If more than a few people would find this package useful, it is appropriate for submission.<br />
* Gain some experience before submitting packages. Build a few packages to learn the process and then submit.<br />
* If you submit a {{Filename|package.tar.gz}} with a file named '{{Filename|package}}' in it you'll get an error: 'Could not change to directory {{Filename|/home/aur/unsupported/package/package}}'. To resolve this, rename the file named '{{Filename|package}}' to something else, for example, '{{Filename|package.rc}}'. When it is installed in the {{Filename|pkg}} directory you may rename it back to '{{Filename|package}}'.<br />
<br />
===Maintaining packages===<br />
* If you maintain a package and want to update the PKGBUILD for your package just resubmit it.<br />
* Check for feedback and comments from other users and try to incorporate any improvements they suggest; consider it a learning process!<br />
* Please DO NOT just submit and forget about packages! While in UNSUPPORTED, it is the user's job to maintain the package by checking for updates and improving the PKGBUILD.<br />
* If you do not want to continue to maintain the package for some reason, <tt>disown</tt> the package using the AUR web interface and/or post a message to the AUR Mailing List.<br />
<br />
===Other requests===<br />
* Disownment requests and removal reuqests go to the aur-general mailing list for TUs and other users to decide upon.<br />
* '''Include package name and URL to AUR page''', preferably with a footnote [1].<br />
* Disownment requests will be granted two weeks after the current maintainer has been contacted by email and did not react.<br />
* '''Package renaming is not implemented yet''', so users have to resubmit a package under a new name and request removal of the old version on the mailing list<br />
* Removal requests require the following information:<br />
** Package name and URL to AUR page<br />
** Reason for deletion, at least a short note <br> '''Notice:''' Although a package's comments can sufficiently point out the reasons why a package is up for deletion. As soon as a TU takes action, the only place where such information can be obtained is the aur-general mailing list.<br />
** Include supporting details, like if the package is included somewhere else, if are you the maintainer yourself, it's renamed and the original owner agreed, etc.<br />
<br />
Removal requests can be disapproved, in which case you'll probably advised to disown the package for future reference.<br />
<br />
==[community]==<br />
The [community] repository, maintained by [[Trusted Users]], contains the most popular packages from AUR. It is enabled by default in {{Filename|pacman.conf}}. If disabled/removed, it can be enabled by uncommenting/adding these two lines: <br />
<br />
{{File<br />
|name=/etc/pacman.conf<br />
|content=<nowiki><br />
...<br />
[community]<br />
Include = /etc/pacman.d/mirrorlist<br />
...<br />
</nowiki>}}<br />
<br />
[community], unlike AUR, contains binary packages that can be installed directly with [[pacman]] and the build files can also be accessed with [[ABS]]. Some of these packages may eventually make the transition to the [core] or [extra] repositories as the developers consider them crucial to the distribution.<br />
<br />
Users can also access the [community] build files by editing {{Filename|/etc/abs.conf}} and enabling the community repository in the {{Codeline|REPOS}} array.<br />
<br />
==Git Repo==<br />
A Git Repo of the AUR is maintained by Thomas Dziedzic providing package history among other things. It is updated at least once a day. To clone the repository (several hundred MB):<br />
<br />
$ git clone git://pkgbuild.com/aur.git<br />
<br />
[http://pkgbuild.com/git/aur.git/ Web interface], [http://pkgbuild.com/~td123/readme Readme], [http://bbs.archlinux.org/viewtopic.php?id=113099 Forum thread]<br />
<br />
==FAQ==<br />
<br />
{{FAQ<br />
|question=What is the AUR?<br />
|answer=The AUR (Arch User Repository) is a place where the Arch Linux community can upload [[PKGBUILD]]s of applications, libraries, etc., and share them with the entire community. Fellow users can then vote for their favorites to be moved into the [community] repository to be shared with Arch Linux users in binary form.}}<br />
<br />
{{FAQ<br />
|question=What is a TU?<br />
|answer=A [[AUR Trusted User Guidelines|TU (Trusted User)]] is a person who is chosen to oversee AUR and the [community] repository. They're the ones who maintain popular PKGBUILDs in [community], and overall keep the AUR running.}}<br />
<br />
{{FAQ<br />
|question=What's the difference between [unsupported] and [community]?<br />
|answer=[unsupported] is where all PKGBUILDs that users submit are stored, and must be built manually with [makepkg]. When PKGBUILDs receive enough votes, they are moved into the [community] repository, where the TUs maintain binary packages that can be installed with [[pacman]].}}<br />
<br />
{{FAQ<br />
|question=How many votes does it take to get a PKGBUILD into [community]?<br />
|answer=Usually, at least 10 votes are required for something to move into [community]. However, if a TU wants to support a package, it will often be found in the repository.}}<br />
<br />
{{FAQ<br />
|question=How do I make a PKGBUILD?<br />
|answer=The best resource is [[Creating Packages]]. Remember to look in AUR before creating the PKGBUILD as to not duplicate efforts.}}<br />
<br />
{{FAQ<br />
|question=I'm trying to do {{Codeline|pacman -S foo}}; it isn't working but I know it's in [community]<br />
|answer=You probably haven't enabled [community] in your {{Filename|/etc/pacman.conf}}. Just uncomment the relevant lines.<br />
If [community] is enabled in your {{Filename|/etc/pacman.conf}} try running {{Codeline|pacman -S -y}} first to synchronize the pkgcache before trying your package again.}}<br />
<br />
{{FAQ<br />
|question=Foo in AUR is outdated; what do I do?<br />
|answer=For starters, you can flag packages out-of-date. If it stays out-of-date for an extended amount of time, the best thing to do is email the maintainer. If there is no response from the maintainer, you could mail to the aur-general mailing list to have a TU orphan the PKGBUILD if you're willing to maintain it yourself.}}<br />
<br />
{{FAQ<br />
|question=I have a PKGBUILD I would like to submit; can someone check it to see if there are any errors?<br />
|answer=If you would like to have your PKGBUILD critiqued, post it on the aur-general mailing list to get feedback from the TUs and fellow AUR members. You could also get help from the [[ArchChannel|IRC channel]], #archlinux on irc.freenode.net. You can also<br />
use [[namcap]] to check your PKGBUILD and the resulting package for errors.}}<br />
<br />
{{FAQ<br />
|question=Foo in AUR doesn't compile when I do {{Codeline|makepkg}}; what should I do?<br />
|answer=You are probably missing something trivial.<br />
<br />
# Run {{Codeline|pacman -Syyu}} before compiling anything with {{Codeline|makepkg}} as the problem may be that your system is not up-to-date.<br />
# Ensure you have both "base" and "base-devel" groups installed.<br />
# Try using the "{{Codeline|-s}}" option with {{Codeline|makepkg}} to check and install all the dependencies needed before starting the build process.<br />
<br />
The reason might not be trivial after all. Custom CFLAGS, LDFLAGS and MAKEFLAGS can cause failures. It's also possible that the PKGBUILD is broken for everyone. If you can't figure it out on your own, just report it to the maintainer.}}<br />
<br />
{{FAQ<br />
|question=How can I speed up repeated build processes?<br />
|answer=If you frequently compile code that uses gcc - say, a git or SVN package - you may find [[ccache]], short for "compiler cache", useful.}}<br />
<br />
{{FAQ<br />
|question=How do I access unsupported packages?<br />
|answer=See [[#Installing packages]]}}<br />
<br />
{{FAQ<br />
|question=How can I upload to AUR without using the web interface?<br />
|answer=You can use [http://aur.archlinux.org/packages.php?ID=23393 aurploader] or [http://aur.archlinux.org/packages.php?ID=37216 burp] -- both with command-line interfaces.}}</div>Mar77ihttps://wiki.archlinux.org/index.php?title=Arch_User_Repository&diff=146463Arch User Repository2011-06-16T22:24:15Z<p>Mar77i: /* Other requests */ ...finally.</p>
<hr />
<div>[[Category:AUR (English)]]<br />
[[Category:About Arch (English)]]<br />
[[Category:Package development (English)]]<br />
[[Category:Package management (English)]]<br />
[[Category:Arch development (English)]]<br />
{{i18n|Arch User Repository}}<br />
[[fr:AUR]]<br />
{{Article summary start}}<br />
{{Article summary text|The Arch User Repository is a collection of user-submitted PKGBUILDs that supplement software available from the official repositories. This article describes how to build ''unsupported'' software packages from the AUR.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Package management overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|AUR Helpers}}<br />
{{Article summary wiki|AUR Trusted User Guidelines}}<br />
{{Article summary heading|Resources}}<br />
{{Article summary link|AUR Web Interface|http://aur.archlinux.org}}<br />
{{Article summary link|AUR Mailing List|http://www.archlinux.org/mailman/listinfo/aur-general}}<br />
{{Article summary 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]]. The AUR was created to organize and share new packages from the community and to help expedite popular packages' inclusion into the [[#.5Bcommunity.5D|[community]]] 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 (PKGBUILD and related files). The AUR community has the ability to vote for or against 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 [community] repository (directly accessible by <tt>pacman</tt> or <tt>abs</tt>).<br />
<br />
==Getting started==<br />
<br />
Users can search and download [[PKGBUILD]]s from the [http://aur.archlinux.org AUR Web Interface]. These PKGBUILDs can be built into installable packages using [[makepkg]], then installed using [[pacman]]. <br />
<br />
* Read the remainder of this article for more info and a short tutorial on installing AUR packages.<br />
* Visit the [http://aur.archlinux.org AUR Web Interface] to inform yourself on updates and happenings. There you will also find statistics and an up-to-date list of newest available packages available in AUR.<br />
* Glance over the [[#FAQ]] for answers to the most common questions.<br />
* You may wish to adjust {{Filename|/etc/makepkg.conf}} to better optimize for your processor prior to building packages from the AUR. A significant improvement in compile times can be realized on systems with multi-core processors by adjusting the MAKEFLAGS variable. Users can also enable hardware-specific optimizations in GCC via the CFLAGS variable. See [[makepkg.conf]] for more information.<br />
* Install "base-devel" ({{Codeline|pacman -S base-devel}}), because members of this group are not explicitly required by AUR packages which may not build without them (more info in [http://bbs.archlinux.org/viewtopic.php?pid=632355 this thread]).<br />
<br />
==History==<br />
The following items are listed for historical purposes only. They have since been superseded by the AUR and are no longer available.<br />
<br />
At the beginning, there was <tt><nowiki>ftp://ftp.archlinux.org/incoming</nowiki></tt>, 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 />
==Searching==<br />
The AUR web interface can be found [http://aur.archlinux.org/ here], and an interface suitable for accessing the AUR from a script (for example) can be found [http://aur.archlinux.org/rpc.php here]<br />
<br />
Queries search package names and descriptions via a MySQL LIKE comparison. This allows for more flexible search criteria (e.g. try searching for 'tool%like%grep' instead of 'tool like grep'). If you need to search for a description that contains '%', escape it with '\%'.<br />
<br />
==Installing packages==<br />
Installing packages from the AUR (aka the [unsupported] repository) is a relatively simple process. Essentially:<br />
# Acquire the tarball which contains the [[PKGBUILD]] and possibly other required files<br />
# Extract the tarball (preferably in a folder set aside just for builds from the AUR)<br />
# Run [[makepkg]] in the directory where the files are saved ("makepkg -s" will auto-resolve dependencies with [[pacman]])<br />
# Install the resulting package with [[pacman]]<br />
<br />
# pacman -U /path/to/pkg.tar.xz<br />
<br />
[[AUR Helpers]] add seamless access to the AUR. They vary in their features, but can ease in searching, fetching, building, and installing from PKGBUILDs found in the AUR. All of these scripts can be found in UNSUPPORTED. <br />
<br />
{{Note|There is not and will never be an ''official'' mechanism for installing build material from UNSUPPORTED. All users should be familiar with the build process.}}<br />
<br />
What follows is a detailed example of installation of a package called "foo".<br />
<br />
===Prerequisites===<br />
First ensure that the necessary tools are installed. The package group "base-devel" should be sufficient; it includes ''make'' and other tools needed for compiling from source.<br />
<br />
{{Warning|Packages in the AUR assume "base-devel" is installed, and will not list members of this group as dependencies even if the package cannot be built without them. Please ensure this group is installed before complaining about failed builds.}}<br />
<br />
# pacman -S base-devel<br />
<br />
Next choose an appropriate build directory. A build directory is simply a directory where the package will be made or "built" and can be any directory. Examples of commonly used directories are:<br />
<br />
~/builds<br />
<br />
or if using ABS (the [[Arch Build System]]):<br />
<br />
/var/abs/local<br />
<br />
For more information on ABS read the [[Arch Build System]] article. The example will use {{Filename|~/builds}} as the build directory.<br />
<br />
===Acquire build files===<br />
Locate the package in the AUR. This is done using the search feature (text field at the top of the [http://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 />
Download the necessary build files. From the package's information page download the build files by clicking the "Tarball" link on the left-hand side near the end of the package details. This file should be saved to the build directory or otherwise copied to the directory after downloading. In this example, the file is called "foo.tar.gz" (standard format is <pkgname>.tar.gz, if it has been properly submitted).<br />
<br />
===Build the package===<br />
Extract the tarball. Change directories to the build directory if not already there and extract the build files.<br />
<br />
$ cd ~/builds<br />
$ tar -xvzf foo.tar.gz<br />
<br />
This should create a new directory called "foo" in the build directory.<br />
<br />
{{Warning|'''Carefully check all files.''' Change directories to the newly created directory and carefully check the {{Filename|PKGBUILD}} and any {{Filename|.install}} file for malicious commands. If in doubt, do NOT build the package and seek advice on the forums or mailing list.}}<br />
<br />
$ cd foo<br />
$ nano PKGBUILD<br />
$ nano foo.install<br />
<br />
Make the package. After manually confirming the integrity of the files, run [[makepkg]] as a normal user in the build directory.<br />
<br />
$ makepkg -s<br />
<br />
The {{Codeline|-s}} switch will use [[sudo]] to install any needed dependencies. If the use of sudo is undesirable, manually install required dependencies beforehand and exclude the {{Codeline|-s}} in the above command.<br />
<br />
===Install the package===<br />
Install the package using [[pacman]]. A tarball should have been created named:<br />
<br />
<application name>-<application version number>-<package revision number>-<architecture>.pkg.tar.xz<br />
<br />
This package can be installed using [[pacman]]'s "upgrade" command:<br />
<br />
# pacman -U foo-0.1-1-i686.pkg.tar.xz <br />
<br />
{{Note|The above example is only a brief summary of the package building process. A visit to the [[makepkg]] and [[ABS]] pages will provide more detail and is highly recommended (particularly for first-time users).}}<br />
<br />
==Sharing packages==<br />
The user plays an essential role in the AUR, which cannot fulfill its potential without the support, involvement, and contribution of the wider user community. The life-cycle of an AUR package starts and ends with the user and requires the user to contribute in several ways.<br />
<br />
Users can '''share''' [[PKGBUILD]]s using the UNSUPPORTED area in the AUR. UNSUPPORTED does not contain any binary packages but allows users to upload PKGBUILDs that can be downloaded by others. These PKGBUILDs are completely unofficial and have not been thoroughly vetted, so they should be used at your own risk.<br />
<br />
===Feedback===<br />
A comments facility allows users to provide suggestions and feedback on improvements to the PKGBUILD contributor. Avoid pasting patches or PKGBUILDs 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 Clients|pastebin]].<br />
<br />
One of the easiest activities for '''all''' Arch users is to browse the AUR and '''vote''' for their favorite packages using the online interface. All packages are eligible for adoption by a TU for inclusion in [community], and the vote count is one of the considerations in that process; it is in everyone's interest to vote!<br />
<br />
===Submitting packages===<br />
After logging in to the AUR web interface, a user can [http://aur.archlinux.org/pkgsubmit.php submit] a gzipped tarball ({{Filename|.tar.gz}}) of a directory containing build files for a package. The directory inside the tarball should contain a {{Filename|PKGBUILD}}, any {{Filename|.install}} files, patches, etc. (ABSOLUTELY no binaries). Examples of what such a directory should look like can be seen inside {{Filename|/var/abs}} if [[ABS]] was installed.<br />
<br />
The tarball can be created with the following command:<br />
$ makepkg --source <br />
<br />
Note that this is a gzipped tarball; assuming you are uploading a package called ''libfoo'', when you create the file it should look similar to this:<br />
<br />
# List contents of tarball.<br />
$ tar tf libfoo-0.1-1.src.tar.gz<br />
libfoo/<br />
libfoo/PKGBUILD<br />
libfoo/libfoo.install<br />
<br />
When submitting a package, observe the following rules: <br />
* Check [core], [extra], and [community] for the package. If it is inside any of those repositories in ANY form, DO NOT submit the package (if the current package is broken or is lacking an included feature then please file a bug report in [http://bugs.archlinux.org/ FlySpray]).<br />
* Check AUR for the package. If it is currently maintained, changes can be submitted in a comment for the maintainer's attention. If it is unmaintained, the package can be adopted and updated as required.<br />
* Verify carefully that what you are uploading is correct. All contributors must read and adhere to the [[Arch Packaging Standards]] when writing PKGBUILDs. This is essential to the smooth running and general success of the AUR. Remember you are not going to earn any credit or respect from your peers by wasting their time with a bad PKGBUILD.<br />
* Packages that contain binaries or that are very poorly written may be deleted without warning.<br />
* If you are unsure about the package (or the build/submission process) in any way, submit the PKGBUILD to the [http://mailman.archlinux.org/mailman/listinfo/ AUR Mailing List] or the [https://bbs.archlinux.org/viewforum.php?id=4 AUR boards] on the forum for public review before adding it to the AUR.<br />
* Make sure the package is useful. Will anyone else want to use this package? Is it extremely specialized? If more than a few people would find this package useful, it is appropriate for submission.<br />
* Gain some experience before submitting packages. Build a few packages to learn the process and then submit.<br />
* If you submit a {{Filename|package.tar.gz}} with a file named '{{Filename|package}}' in it you'll get an error: 'Could not change to directory {{Filename|/home/aur/unsupported/package/package}}'. To resolve this, rename the file named '{{Filename|package}}' to something else, for example, '{{Filename|package.rc}}'. When it is installed in the {{Filename|pkg}} directory you may rename it back to '{{Filename|package}}'.<br />
<br />
===Maintaining packages===<br />
* If you maintain a package and want to update the PKGBUILD for your package just resubmit it.<br />
* Check for feedback and comments from other users and try to incorporate any improvements they suggest; consider it a learning process!<br />
* Please DO NOT just submit and forget about packages! While in UNSUPPORTED, it is the user's job to maintain the package by checking for updates and improving the PKGBUILD.<br />
* If you do not want to continue to maintain the package for some reason, <tt>disown</tt> the package using the AUR web interface and/or post a message to the AUR Mailing List.<br />
<br />
===Other requests===<br />
* Disownment requests and removal reuqests go to the aur-general mailing list for TUs and other users to decide upon.<br />
* '''Include package name and URL to AUR page''', preferably with a footnote [1].<br />
* Disownment requests will be granted two weeks after the current maintainer has been contacted by email and did not react.<br />
* Package renaming isn't implemented yet, so users have to resubmit a package under a new name and request removal of the old version on the mailing list<br />
* Removal requests require the following information:<br />
** Package name and URL to AUR page<br />
** Reason for deletion<br />
** Include supporting details, like if the package is included somewhere else, if are you the maintainer yourself, it's renamed and the original owner agreed, etc.<br />
Removal requests can be disapproved, in which case you'll probably advised to disown the package for future reference.<br />
<br />
==[community]==<br />
The [community] repository, maintained by [[Trusted Users]], contains the most popular packages from AUR. It is enabled by default in {{Filename|pacman.conf}}. If disabled/removed, it can be enabled by uncommenting/adding these two lines: <br />
<br />
{{File<br />
|name=/etc/pacman.conf<br />
|content=<nowiki><br />
...<br />
[community]<br />
Include = /etc/pacman.d/mirrorlist<br />
...<br />
</nowiki>}}<br />
<br />
[community], unlike AUR, contains binary packages that can be installed directly with [[pacman]] and the build files can also be accessed with [[ABS]]. Some of these packages may eventually make the transition to the [core] or [extra] repositories as the developers consider them crucial to the distribution.<br />
<br />
Users can also access the [community] build files by editing {{Filename|/etc/abs.conf}} and enabling the community repository in the {{Codeline|REPOS}} array.<br />
<br />
==Git Repo==<br />
A Git Repo of the AUR is maintained by Thomas Dziedzic providing package history among other things. It is updated at least once a day. To clone the repository (several hundred MB):<br />
<br />
$ git clone git://pkgbuild.com/aur.git<br />
<br />
[http://pkgbuild.com/git/aur.git/ Web interface], [http://pkgbuild.com/~td123/readme Readme], [http://bbs.archlinux.org/viewtopic.php?id=113099 Forum thread]<br />
<br />
==FAQ==<br />
<br />
{{FAQ<br />
|question=What is the AUR?<br />
|answer=The AUR (Arch User Repository) is a place where the Arch Linux community can upload [[PKGBUILD]]s of applications, libraries, etc., and share them with the entire community. Fellow users can then vote for their favorites to be moved into the [community] repository to be shared with Arch Linux users in binary form.}}<br />
<br />
{{FAQ<br />
|question=What is a TU?<br />
|answer=A [[AUR Trusted User Guidelines|TU (Trusted User)]] is a person who is chosen to oversee AUR and the [community] repository. They're the ones who maintain popular PKGBUILDs in [community], and overall keep the AUR running.}}<br />
<br />
{{FAQ<br />
|question=What's the difference between [unsupported] and [community]?<br />
|answer=[unsupported] is where all PKGBUILDs that users submit are stored, and must be built manually with [makepkg]. When PKGBUILDs receive enough votes, they are moved into the [community] repository, where the TUs maintain binary packages that can be installed with [[pacman]].}}<br />
<br />
{{FAQ<br />
|question=How many votes does it take to get a PKGBUILD into [community]?<br />
|answer=Usually, at least 10 votes are required for something to move into [community]. However, if a TU wants to support a package, it will often be found in the repository.}}<br />
<br />
{{FAQ<br />
|question=How do I make a PKGBUILD?<br />
|answer=The best resource is [[Creating Packages]]. Remember to look in AUR before creating the PKGBUILD as to not duplicate efforts.}}<br />
<br />
{{FAQ<br />
|question=I'm trying to do {{Codeline|pacman -S foo}}; it isn't working but I know it's in [community]<br />
|answer=You probably haven't enabled [community] in your {{Filename|/etc/pacman.conf}}. Just uncomment the relevant lines.<br />
If [community] is enabled in your {{Filename|/etc/pacman.conf}} try running {{Codeline|pacman -S -y}} first to synchronize the pkgcache before trying your package again.}}<br />
<br />
{{FAQ<br />
|question=Foo in AUR is outdated; what do I do?<br />
|answer=For starters, you can flag packages out-of-date. If it stays out-of-date for an extended amount of time, the best thing to do is email the maintainer. If there is no response from the maintainer, you could mail to the aur-general mailing list to have a TU orphan the PKGBUILD if you're willing to maintain it yourself.}}<br />
<br />
{{FAQ<br />
|question=I have a PKGBUILD I would like to submit; can someone check it to see if there are any errors?<br />
|answer=If you would like to have your PKGBUILD critiqued, post it on the aur-general mailing list to get feedback from the TUs and fellow AUR members. You could also get help from the [[ArchChannel|IRC channel]], #archlinux on irc.freenode.net. You can also<br />
use [[namcap]] to check your PKGBUILD and the resulting package for errors.}}<br />
<br />
{{FAQ<br />
|question=Foo in AUR doesn't compile when I do {{Codeline|makepkg}}; what should I do?<br />
|answer=You are probably missing something trivial.<br />
<br />
# Run {{Codeline|pacman -Syyu}} before compiling anything with {{Codeline|makepkg}} as the problem may be that your system is not up-to-date.<br />
# Ensure you have both "base" and "base-devel" groups installed.<br />
# Try using the "{{Codeline|-s}}" option with {{Codeline|makepkg}} to check and install all the dependencies needed before starting the build process.<br />
<br />
The reason might not be trivial after all. Custom CFLAGS, LDFLAGS and MAKEFLAGS can cause failures. It's also possible that the PKGBUILD is broken for everyone. If you can't figure it out on your own, just report it to the maintainer.}}<br />
<br />
{{FAQ<br />
|question=How can I speed up repeated build processes?<br />
|answer=If you frequently compile code that uses gcc - say, a git or SVN package - you may find [[ccache]], short for "compiler cache", useful.}}<br />
<br />
{{FAQ<br />
|question=How do I access unsupported packages?<br />
|answer=See [[#Installing packages]]}}<br />
<br />
{{FAQ<br />
|question=How can I upload to AUR without using the web interface?<br />
|answer=You can use [http://aur.archlinux.org/packages.php?ID=23393 aurploader] or [http://aur.archlinux.org/packages.php?ID=37216 burp] -- both with command-line interfaces.}}</div>Mar77ihttps://wiki.archlinux.org/index.php?title=Arch_User_Repository&diff=146462Arch User Repository2011-06-16T22:22:49Z<p>Mar77i: /* Other requests */ ...mailing list protocol, eh, fuss.</p>
<hr />
<div>[[Category:AUR (English)]]<br />
[[Category:About Arch (English)]]<br />
[[Category:Package development (English)]]<br />
[[Category:Package management (English)]]<br />
[[Category:Arch development (English)]]<br />
{{i18n|Arch User Repository}}<br />
[[fr:AUR]]<br />
{{Article summary start}}<br />
{{Article summary text|The Arch User Repository is a collection of user-submitted PKGBUILDs that supplement software available from the official repositories. This article describes how to build ''unsupported'' software packages from the AUR.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Package management overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|AUR Helpers}}<br />
{{Article summary wiki|AUR Trusted User Guidelines}}<br />
{{Article summary heading|Resources}}<br />
{{Article summary link|AUR Web Interface|http://aur.archlinux.org}}<br />
{{Article summary link|AUR Mailing List|http://www.archlinux.org/mailman/listinfo/aur-general}}<br />
{{Article summary 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]]. The AUR was created to organize and share new packages from the community and to help expedite popular packages' inclusion into the [[#.5Bcommunity.5D|[community]]] 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 (PKGBUILD and related files). The AUR community has the ability to vote for or against 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 [community] repository (directly accessible by <tt>pacman</tt> or <tt>abs</tt>).<br />
<br />
==Getting started==<br />
<br />
Users can search and download [[PKGBUILD]]s from the [http://aur.archlinux.org AUR Web Interface]. These PKGBUILDs can be built into installable packages using [[makepkg]], then installed using [[pacman]]. <br />
<br />
* Read the remainder of this article for more info and a short tutorial on installing AUR packages.<br />
* Visit the [http://aur.archlinux.org AUR Web Interface] to inform yourself on updates and happenings. There you will also find statistics and an up-to-date list of newest available packages available in AUR.<br />
* Glance over the [[#FAQ]] for answers to the most common questions.<br />
* You may wish to adjust {{Filename|/etc/makepkg.conf}} to better optimize for your processor prior to building packages from the AUR. A significant improvement in compile times can be realized on systems with multi-core processors by adjusting the MAKEFLAGS variable. Users can also enable hardware-specific optimizations in GCC via the CFLAGS variable. See [[makepkg.conf]] for more information.<br />
* Install "base-devel" ({{Codeline|pacman -S base-devel}}), because members of this group are not explicitly required by AUR packages which may not build without them (more info in [http://bbs.archlinux.org/viewtopic.php?pid=632355 this thread]).<br />
<br />
==History==<br />
The following items are listed for historical purposes only. They have since been superseded by the AUR and are no longer available.<br />
<br />
At the beginning, there was <tt><nowiki>ftp://ftp.archlinux.org/incoming</nowiki></tt>, 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 />
==Searching==<br />
The AUR web interface can be found [http://aur.archlinux.org/ here], and an interface suitable for accessing the AUR from a script (for example) can be found [http://aur.archlinux.org/rpc.php here]<br />
<br />
Queries search package names and descriptions via a MySQL LIKE comparison. This allows for more flexible search criteria (e.g. try searching for 'tool%like%grep' instead of 'tool like grep'). If you need to search for a description that contains '%', escape it with '\%'.<br />
<br />
==Installing packages==<br />
Installing packages from the AUR (aka the [unsupported] repository) is a relatively simple process. Essentially:<br />
# Acquire the tarball which contains the [[PKGBUILD]] and possibly other required files<br />
# Extract the tarball (preferably in a folder set aside just for builds from the AUR)<br />
# Run [[makepkg]] in the directory where the files are saved ("makepkg -s" will auto-resolve dependencies with [[pacman]])<br />
# Install the resulting package with [[pacman]]<br />
<br />
# pacman -U /path/to/pkg.tar.xz<br />
<br />
[[AUR Helpers]] add seamless access to the AUR. They vary in their features, but can ease in searching, fetching, building, and installing from PKGBUILDs found in the AUR. All of these scripts can be found in UNSUPPORTED. <br />
<br />
{{Note|There is not and will never be an ''official'' mechanism for installing build material from UNSUPPORTED. All users should be familiar with the build process.}}<br />
<br />
What follows is a detailed example of installation of a package called "foo".<br />
<br />
===Prerequisites===<br />
First ensure that the necessary tools are installed. The package group "base-devel" should be sufficient; it includes ''make'' and other tools needed for compiling from source.<br />
<br />
{{Warning|Packages in the AUR assume "base-devel" is installed, and will not list members of this group as dependencies even if the package cannot be built without them. Please ensure this group is installed before complaining about failed builds.}}<br />
<br />
# pacman -S base-devel<br />
<br />
Next choose an appropriate build directory. A build directory is simply a directory where the package will be made or "built" and can be any directory. Examples of commonly used directories are:<br />
<br />
~/builds<br />
<br />
or if using ABS (the [[Arch Build System]]):<br />
<br />
/var/abs/local<br />
<br />
For more information on ABS read the [[Arch Build System]] article. The example will use {{Filename|~/builds}} as the build directory.<br />
<br />
===Acquire build files===<br />
Locate the package in the AUR. This is done using the search feature (text field at the top of the [http://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 />
Download the necessary build files. From the package's information page download the build files by clicking the "Tarball" link on the left-hand side near the end of the package details. This file should be saved to the build directory or otherwise copied to the directory after downloading. In this example, the file is called "foo.tar.gz" (standard format is <pkgname>.tar.gz, if it has been properly submitted).<br />
<br />
===Build the package===<br />
Extract the tarball. Change directories to the build directory if not already there and extract the build files.<br />
<br />
$ cd ~/builds<br />
$ tar -xvzf foo.tar.gz<br />
<br />
This should create a new directory called "foo" in the build directory.<br />
<br />
{{Warning|'''Carefully check all files.''' Change directories to the newly created directory and carefully check the {{Filename|PKGBUILD}} and any {{Filename|.install}} file for malicious commands. If in doubt, do NOT build the package and seek advice on the forums or mailing list.}}<br />
<br />
$ cd foo<br />
$ nano PKGBUILD<br />
$ nano foo.install<br />
<br />
Make the package. After manually confirming the integrity of the files, run [[makepkg]] as a normal user in the build directory.<br />
<br />
$ makepkg -s<br />
<br />
The {{Codeline|-s}} switch will use [[sudo]] to install any needed dependencies. If the use of sudo is undesirable, manually install required dependencies beforehand and exclude the {{Codeline|-s}} in the above command.<br />
<br />
===Install the package===<br />
Install the package using [[pacman]]. A tarball should have been created named:<br />
<br />
<application name>-<application version number>-<package revision number>-<architecture>.pkg.tar.xz<br />
<br />
This package can be installed using [[pacman]]'s "upgrade" command:<br />
<br />
# pacman -U foo-0.1-1-i686.pkg.tar.xz <br />
<br />
{{Note|The above example is only a brief summary of the package building process. A visit to the [[makepkg]] and [[ABS]] pages will provide more detail and is highly recommended (particularly for first-time users).}}<br />
<br />
==Sharing packages==<br />
The user plays an essential role in the AUR, which cannot fulfill its potential without the support, involvement, and contribution of the wider user community. The life-cycle of an AUR package starts and ends with the user and requires the user to contribute in several ways.<br />
<br />
Users can '''share''' [[PKGBUILD]]s using the UNSUPPORTED area in the AUR. UNSUPPORTED does not contain any binary packages but allows users to upload PKGBUILDs that can be downloaded by others. These PKGBUILDs are completely unofficial and have not been thoroughly vetted, so they should be used at your own risk.<br />
<br />
===Feedback===<br />
A comments facility allows users to provide suggestions and feedback on improvements to the PKGBUILD contributor. Avoid pasting patches or PKGBUILDs 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 Clients|pastebin]].<br />
<br />
One of the easiest activities for '''all''' Arch users is to browse the AUR and '''vote''' for their favorite packages using the online interface. All packages are eligible for adoption by a TU for inclusion in [community], and the vote count is one of the considerations in that process; it is in everyone's interest to vote!<br />
<br />
===Submitting packages===<br />
After logging in to the AUR web interface, a user can [http://aur.archlinux.org/pkgsubmit.php submit] a gzipped tarball ({{Filename|.tar.gz}}) of a directory containing build files for a package. The directory inside the tarball should contain a {{Filename|PKGBUILD}}, any {{Filename|.install}} files, patches, etc. (ABSOLUTELY no binaries). Examples of what such a directory should look like can be seen inside {{Filename|/var/abs}} if [[ABS]] was installed.<br />
<br />
The tarball can be created with the following command:<br />
$ makepkg --source <br />
<br />
Note that this is a gzipped tarball; assuming you are uploading a package called ''libfoo'', when you create the file it should look similar to this:<br />
<br />
# List contents of tarball.<br />
$ tar tf libfoo-0.1-1.src.tar.gz<br />
libfoo/<br />
libfoo/PKGBUILD<br />
libfoo/libfoo.install<br />
<br />
When submitting a package, observe the following rules: <br />
* Check [core], [extra], and [community] for the package. If it is inside any of those repositories in ANY form, DO NOT submit the package (if the current package is broken or is lacking an included feature then please file a bug report in [http://bugs.archlinux.org/ FlySpray]).<br />
* Check AUR for the package. If it is currently maintained, changes can be submitted in a comment for the maintainer's attention. If it is unmaintained, the package can be adopted and updated as required.<br />
* Verify carefully that what you are uploading is correct. All contributors must read and adhere to the [[Arch Packaging Standards]] when writing PKGBUILDs. This is essential to the smooth running and general success of the AUR. Remember you are not going to earn any credit or respect from your peers by wasting their time with a bad PKGBUILD.<br />
* Packages that contain binaries or that are very poorly written may be deleted without warning.<br />
* If you are unsure about the package (or the build/submission process) in any way, submit the PKGBUILD to the [http://mailman.archlinux.org/mailman/listinfo/ AUR Mailing List] or the [https://bbs.archlinux.org/viewforum.php?id=4 AUR boards] on the forum for public review before adding it to the AUR.<br />
* Make sure the package is useful. Will anyone else want to use this package? Is it extremely specialized? If more than a few people would find this package useful, it is appropriate for submission.<br />
* Gain some experience before submitting packages. Build a few packages to learn the process and then submit.<br />
* If you submit a {{Filename|package.tar.gz}} with a file named '{{Filename|package}}' in it you'll get an error: 'Could not change to directory {{Filename|/home/aur/unsupported/package/package}}'. To resolve this, rename the file named '{{Filename|package}}' to something else, for example, '{{Filename|package.rc}}'. When it is installed in the {{Filename|pkg}} directory you may rename it back to '{{Filename|package}}'.<br />
<br />
===Maintaining packages===<br />
* If you maintain a package and want to update the PKGBUILD for your package just resubmit it.<br />
* Check for feedback and comments from other users and try to incorporate any improvements they suggest; consider it a learning process!<br />
* Please DO NOT just submit and forget about packages! While in UNSUPPORTED, it is the user's job to maintain the package by checking for updates and improving the PKGBUILD.<br />
* If you do not want to continue to maintain the package for some reason, <tt>disown</tt> the package using the AUR web interface and/or post a message to the AUR Mailing List.<br />
<br />
===Other requests===<br />
* Disownment requests and removal reuqests go to the aur-general mailing list for TUs and other users to decide upon.<br />
* '''Include package name and URL to AUR page''', preferably with a footnote [1].<br />
* Disownment requests will be granted two weeks after the current maintainer has been contacted by email and did not react.<br />
* Package renaming isn't implemented yet, so users have to resubmit a package under a new name and request removal of the old version on the mailing list<br />
* Removal requests require the following information:<br />
** Package name<br />
** URL to aur page<br />
** Reason for deletion<br />
** Supporting details, like if the package is included somewhere else, if are you the maintainer yourself, it's renamed and the original owner agreed, etc.<br />
Removal requests can be disapproved, in which case you'll probably advised to disown the package for future reference.<br />
<br />
==[community]==<br />
The [community] repository, maintained by [[Trusted Users]], contains the most popular packages from AUR. It is enabled by default in {{Filename|pacman.conf}}. If disabled/removed, it can be enabled by uncommenting/adding these two lines: <br />
<br />
{{File<br />
|name=/etc/pacman.conf<br />
|content=<nowiki><br />
...<br />
[community]<br />
Include = /etc/pacman.d/mirrorlist<br />
...<br />
</nowiki>}}<br />
<br />
[community], unlike AUR, contains binary packages that can be installed directly with [[pacman]] and the build files can also be accessed with [[ABS]]. Some of these packages may eventually make the transition to the [core] or [extra] repositories as the developers consider them crucial to the distribution.<br />
<br />
Users can also access the [community] build files by editing {{Filename|/etc/abs.conf}} and enabling the community repository in the {{Codeline|REPOS}} array.<br />
<br />
==Git Repo==<br />
A Git Repo of the AUR is maintained by Thomas Dziedzic providing package history among other things. It is updated at least once a day. To clone the repository (several hundred MB):<br />
<br />
$ git clone git://pkgbuild.com/aur.git<br />
<br />
[http://pkgbuild.com/git/aur.git/ Web interface], [http://pkgbuild.com/~td123/readme Readme], [http://bbs.archlinux.org/viewtopic.php?id=113099 Forum thread]<br />
<br />
==FAQ==<br />
<br />
{{FAQ<br />
|question=What is the AUR?<br />
|answer=The AUR (Arch User Repository) is a place where the Arch Linux community can upload [[PKGBUILD]]s of applications, libraries, etc., and share them with the entire community. Fellow users can then vote for their favorites to be moved into the [community] repository to be shared with Arch Linux users in binary form.}}<br />
<br />
{{FAQ<br />
|question=What is a TU?<br />
|answer=A [[AUR Trusted User Guidelines|TU (Trusted User)]] is a person who is chosen to oversee AUR and the [community] repository. They're the ones who maintain popular PKGBUILDs in [community], and overall keep the AUR running.}}<br />
<br />
{{FAQ<br />
|question=What's the difference between [unsupported] and [community]?<br />
|answer=[unsupported] is where all PKGBUILDs that users submit are stored, and must be built manually with [makepkg]. When PKGBUILDs receive enough votes, they are moved into the [community] repository, where the TUs maintain binary packages that can be installed with [[pacman]].}}<br />
<br />
{{FAQ<br />
|question=How many votes does it take to get a PKGBUILD into [community]?<br />
|answer=Usually, at least 10 votes are required for something to move into [community]. However, if a TU wants to support a package, it will often be found in the repository.}}<br />
<br />
{{FAQ<br />
|question=How do I make a PKGBUILD?<br />
|answer=The best resource is [[Creating Packages]]. Remember to look in AUR before creating the PKGBUILD as to not duplicate efforts.}}<br />
<br />
{{FAQ<br />
|question=I'm trying to do {{Codeline|pacman -S foo}}; it isn't working but I know it's in [community]<br />
|answer=You probably haven't enabled [community] in your {{Filename|/etc/pacman.conf}}. Just uncomment the relevant lines.<br />
If [community] is enabled in your {{Filename|/etc/pacman.conf}} try running {{Codeline|pacman -S -y}} first to synchronize the pkgcache before trying your package again.}}<br />
<br />
{{FAQ<br />
|question=Foo in AUR is outdated; what do I do?<br />
|answer=For starters, you can flag packages out-of-date. If it stays out-of-date for an extended amount of time, the best thing to do is email the maintainer. If there is no response from the maintainer, you could mail to the aur-general mailing list to have a TU orphan the PKGBUILD if you're willing to maintain it yourself.}}<br />
<br />
{{FAQ<br />
|question=I have a PKGBUILD I would like to submit; can someone check it to see if there are any errors?<br />
|answer=If you would like to have your PKGBUILD critiqued, post it on the aur-general mailing list to get feedback from the TUs and fellow AUR members. You could also get help from the [[ArchChannel|IRC channel]], #archlinux on irc.freenode.net. You can also<br />
use [[namcap]] to check your PKGBUILD and the resulting package for errors.}}<br />
<br />
{{FAQ<br />
|question=Foo in AUR doesn't compile when I do {{Codeline|makepkg}}; what should I do?<br />
|answer=You are probably missing something trivial.<br />
<br />
# Run {{Codeline|pacman -Syyu}} before compiling anything with {{Codeline|makepkg}} as the problem may be that your system is not up-to-date.<br />
# Ensure you have both "base" and "base-devel" groups installed.<br />
# Try using the "{{Codeline|-s}}" option with {{Codeline|makepkg}} to check and install all the dependencies needed before starting the build process.<br />
<br />
The reason might not be trivial after all. Custom CFLAGS, LDFLAGS and MAKEFLAGS can cause failures. It's also possible that the PKGBUILD is broken for everyone. If you can't figure it out on your own, just report it to the maintainer.}}<br />
<br />
{{FAQ<br />
|question=How can I speed up repeated build processes?<br />
|answer=If you frequently compile code that uses gcc - say, a git or SVN package - you may find [[ccache]], short for "compiler cache", useful.}}<br />
<br />
{{FAQ<br />
|question=How do I access unsupported packages?<br />
|answer=See [[#Installing packages]]}}<br />
<br />
{{FAQ<br />
|question=How can I upload to AUR without using the web interface?<br />
|answer=You can use [http://aur.archlinux.org/packages.php?ID=23393 aurploader] or [http://aur.archlinux.org/packages.php?ID=37216 burp] -- both with command-line interfaces.}}</div>Mar77ihttps://wiki.archlinux.org/index.php?title=Arch_User_Repository&diff=146460Arch User Repository2011-06-16T22:20:44Z<p>Mar77i: Added section "other requests" for most important mailing list.</p>
<hr />
<div>[[Category:AUR (English)]]<br />
[[Category:About Arch (English)]]<br />
[[Category:Package development (English)]]<br />
[[Category:Package management (English)]]<br />
[[Category:Arch development (English)]]<br />
{{i18n|Arch User Repository}}<br />
[[fr:AUR]]<br />
{{Article summary start}}<br />
{{Article summary text|The Arch User Repository is a collection of user-submitted PKGBUILDs that supplement software available from the official repositories. This article describes how to build ''unsupported'' software packages from the AUR.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Package management overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|AUR Helpers}}<br />
{{Article summary wiki|AUR Trusted User Guidelines}}<br />
{{Article summary heading|Resources}}<br />
{{Article summary link|AUR Web Interface|http://aur.archlinux.org}}<br />
{{Article summary link|AUR Mailing List|http://www.archlinux.org/mailman/listinfo/aur-general}}<br />
{{Article summary 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]]. The AUR was created to organize and share new packages from the community and to help expedite popular packages' inclusion into the [[#.5Bcommunity.5D|[community]]] 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 (PKGBUILD and related files). The AUR community has the ability to vote for or against 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 [community] repository (directly accessible by <tt>pacman</tt> or <tt>abs</tt>).<br />
<br />
==Getting started==<br />
<br />
Users can search and download [[PKGBUILD]]s from the [http://aur.archlinux.org AUR Web Interface]. These PKGBUILDs can be built into installable packages using [[makepkg]], then installed using [[pacman]]. <br />
<br />
* Read the remainder of this article for more info and a short tutorial on installing AUR packages.<br />
* Visit the [http://aur.archlinux.org AUR Web Interface] to inform yourself on updates and happenings. There you will also find statistics and an up-to-date list of newest available packages available in AUR.<br />
* Glance over the [[#FAQ]] for answers to the most common questions.<br />
* You may wish to adjust {{Filename|/etc/makepkg.conf}} to better optimize for your processor prior to building packages from the AUR. A significant improvement in compile times can be realized on systems with multi-core processors by adjusting the MAKEFLAGS variable. Users can also enable hardware-specific optimizations in GCC via the CFLAGS variable. See [[makepkg.conf]] for more information.<br />
* Install "base-devel" ({{Codeline|pacman -S base-devel}}), because members of this group are not explicitly required by AUR packages which may not build without them (more info in [http://bbs.archlinux.org/viewtopic.php?pid=632355 this thread]).<br />
<br />
==History==<br />
The following items are listed for historical purposes only. They have since been superseded by the AUR and are no longer available.<br />
<br />
At the beginning, there was <tt><nowiki>ftp://ftp.archlinux.org/incoming</nowiki></tt>, 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 />
==Searching==<br />
The AUR web interface can be found [http://aur.archlinux.org/ here], and an interface suitable for accessing the AUR from a script (for example) can be found [http://aur.archlinux.org/rpc.php here]<br />
<br />
Queries search package names and descriptions via a MySQL LIKE comparison. This allows for more flexible search criteria (e.g. try searching for 'tool%like%grep' instead of 'tool like grep'). If you need to search for a description that contains '%', escape it with '\%'.<br />
<br />
==Installing packages==<br />
Installing packages from the AUR (aka the [unsupported] repository) is a relatively simple process. Essentially:<br />
# Acquire the tarball which contains the [[PKGBUILD]] and possibly other required files<br />
# Extract the tarball (preferably in a folder set aside just for builds from the AUR)<br />
# Run [[makepkg]] in the directory where the files are saved ("makepkg -s" will auto-resolve dependencies with [[pacman]])<br />
# Install the resulting package with [[pacman]]<br />
<br />
# pacman -U /path/to/pkg.tar.xz<br />
<br />
[[AUR Helpers]] add seamless access to the AUR. They vary in their features, but can ease in searching, fetching, building, and installing from PKGBUILDs found in the AUR. All of these scripts can be found in UNSUPPORTED. <br />
<br />
{{Note|There is not and will never be an ''official'' mechanism for installing build material from UNSUPPORTED. All users should be familiar with the build process.}}<br />
<br />
What follows is a detailed example of installation of a package called "foo".<br />
<br />
===Prerequisites===<br />
First ensure that the necessary tools are installed. The package group "base-devel" should be sufficient; it includes ''make'' and other tools needed for compiling from source.<br />
<br />
{{Warning|Packages in the AUR assume "base-devel" is installed, and will not list members of this group as dependencies even if the package cannot be built without them. Please ensure this group is installed before complaining about failed builds.}}<br />
<br />
# pacman -S base-devel<br />
<br />
Next choose an appropriate build directory. A build directory is simply a directory where the package will be made or "built" and can be any directory. Examples of commonly used directories are:<br />
<br />
~/builds<br />
<br />
or if using ABS (the [[Arch Build System]]):<br />
<br />
/var/abs/local<br />
<br />
For more information on ABS read the [[Arch Build System]] article. The example will use {{Filename|~/builds}} as the build directory.<br />
<br />
===Acquire build files===<br />
Locate the package in the AUR. This is done using the search feature (text field at the top of the [http://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 />
Download the necessary build files. From the package's information page download the build files by clicking the "Tarball" link on the left-hand side near the end of the package details. This file should be saved to the build directory or otherwise copied to the directory after downloading. In this example, the file is called "foo.tar.gz" (standard format is <pkgname>.tar.gz, if it has been properly submitted).<br />
<br />
===Build the package===<br />
Extract the tarball. Change directories to the build directory if not already there and extract the build files.<br />
<br />
$ cd ~/builds<br />
$ tar -xvzf foo.tar.gz<br />
<br />
This should create a new directory called "foo" in the build directory.<br />
<br />
{{Warning|'''Carefully check all files.''' Change directories to the newly created directory and carefully check the {{Filename|PKGBUILD}} and any {{Filename|.install}} file for malicious commands. If in doubt, do NOT build the package and seek advice on the forums or mailing list.}}<br />
<br />
$ cd foo<br />
$ nano PKGBUILD<br />
$ nano foo.install<br />
<br />
Make the package. After manually confirming the integrity of the files, run [[makepkg]] as a normal user in the build directory.<br />
<br />
$ makepkg -s<br />
<br />
The {{Codeline|-s}} switch will use [[sudo]] to install any needed dependencies. If the use of sudo is undesirable, manually install required dependencies beforehand and exclude the {{Codeline|-s}} in the above command.<br />
<br />
===Install the package===<br />
Install the package using [[pacman]]. A tarball should have been created named:<br />
<br />
<application name>-<application version number>-<package revision number>-<architecture>.pkg.tar.xz<br />
<br />
This package can be installed using [[pacman]]'s "upgrade" command:<br />
<br />
# pacman -U foo-0.1-1-i686.pkg.tar.xz <br />
<br />
{{Note|The above example is only a brief summary of the package building process. A visit to the [[makepkg]] and [[ABS]] pages will provide more detail and is highly recommended (particularly for first-time users).}}<br />
<br />
==Sharing packages==<br />
The user plays an essential role in the AUR, which cannot fulfill its potential without the support, involvement, and contribution of the wider user community. The life-cycle of an AUR package starts and ends with the user and requires the user to contribute in several ways.<br />
<br />
Users can '''share''' [[PKGBUILD]]s using the UNSUPPORTED area in the AUR. UNSUPPORTED does not contain any binary packages but allows users to upload PKGBUILDs that can be downloaded by others. These PKGBUILDs are completely unofficial and have not been thoroughly vetted, so they should be used at your own risk.<br />
<br />
===Feedback===<br />
A comments facility allows users to provide suggestions and feedback on improvements to the PKGBUILD contributor. Avoid pasting patches or PKGBUILDs 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 Clients|pastebin]].<br />
<br />
One of the easiest activities for '''all''' Arch users is to browse the AUR and '''vote''' for their favorite packages using the online interface. All packages are eligible for adoption by a TU for inclusion in [community], and the vote count is one of the considerations in that process; it is in everyone's interest to vote!<br />
<br />
===Submitting packages===<br />
After logging in to the AUR web interface, a user can [http://aur.archlinux.org/pkgsubmit.php submit] a gzipped tarball ({{Filename|.tar.gz}}) of a directory containing build files for a package. The directory inside the tarball should contain a {{Filename|PKGBUILD}}, any {{Filename|.install}} files, patches, etc. (ABSOLUTELY no binaries). Examples of what such a directory should look like can be seen inside {{Filename|/var/abs}} if [[ABS]] was installed.<br />
<br />
The tarball can be created with the following command:<br />
$ makepkg --source <br />
<br />
Note that this is a gzipped tarball; assuming you are uploading a package called ''libfoo'', when you create the file it should look similar to this:<br />
<br />
# List contents of tarball.<br />
$ tar tf libfoo-0.1-1.src.tar.gz<br />
libfoo/<br />
libfoo/PKGBUILD<br />
libfoo/libfoo.install<br />
<br />
When submitting a package, observe the following rules: <br />
* Check [core], [extra], and [community] for the package. If it is inside any of those repositories in ANY form, DO NOT submit the package (if the current package is broken or is lacking an included feature then please file a bug report in [http://bugs.archlinux.org/ FlySpray]).<br />
* Check AUR for the package. If it is currently maintained, changes can be submitted in a comment for the maintainer's attention. If it is unmaintained, the package can be adopted and updated as required.<br />
* Verify carefully that what you are uploading is correct. All contributors must read and adhere to the [[Arch Packaging Standards]] when writing PKGBUILDs. This is essential to the smooth running and general success of the AUR. Remember you are not going to earn any credit or respect from your peers by wasting their time with a bad PKGBUILD.<br />
* Packages that contain binaries or that are very poorly written may be deleted without warning.<br />
* If you are unsure about the package (or the build/submission process) in any way, submit the PKGBUILD to the [http://mailman.archlinux.org/mailman/listinfo/ AUR Mailing List] or the [https://bbs.archlinux.org/viewforum.php?id=4 AUR boards] on the forum for public review before adding it to the AUR.<br />
* Make sure the package is useful. Will anyone else want to use this package? Is it extremely specialized? If more than a few people would find this package useful, it is appropriate for submission.<br />
* Gain some experience before submitting packages. Build a few packages to learn the process and then submit.<br />
* If you submit a {{Filename|package.tar.gz}} with a file named '{{Filename|package}}' in it you'll get an error: 'Could not change to directory {{Filename|/home/aur/unsupported/package/package}}'. To resolve this, rename the file named '{{Filename|package}}' to something else, for example, '{{Filename|package.rc}}'. When it is installed in the {{Filename|pkg}} directory you may rename it back to '{{Filename|package}}'.<br />
<br />
===Maintaining packages===<br />
* If you maintain a package and want to update the PKGBUILD for your package just resubmit it.<br />
* Check for feedback and comments from other users and try to incorporate any improvements they suggest; consider it a learning process!<br />
* Please DO NOT just submit and forget about packages! While in UNSUPPORTED, it is the user's job to maintain the package by checking for updates and improving the PKGBUILD.<br />
* If you do not want to continue to maintain the package for some reason, <tt>disown</tt> the package using the AUR web interface and/or post a message to the AUR Mailing List.<br />
<br />
===Other requests===<br />
* Disownment requests and removal reuqests go to the aur-general mailing list for TUs and other users to decide upon.<br />
* '''Include the package names and a URL to AUR page''', preferably with a footnote [1].<br />
* Disownment requests will be granted two weeks after the current maintainer has been contacted by email and did not react.<br />
* Package renaming isn't implemented yet, so users have to resubmit a package under a new name and request removal of the old version on the mailing list<br />
* Removal requests require the following information:<br />
** Package name<br />
** URL to aur page<br />
** Reason for deletion<br />
** Supporting details, like if the package is included somewhere else, if are you the maintainer yourself, it's renamed and the original owner agreed, etc.<br />
Removal requests can be disapproved, in which case you'll probably advised to disown the package for future reference.<br />
<br />
==[community]==<br />
The [community] repository, maintained by [[Trusted Users]], contains the most popular packages from AUR. It is enabled by default in {{Filename|pacman.conf}}. If disabled/removed, it can be enabled by uncommenting/adding these two lines: <br />
<br />
{{File<br />
|name=/etc/pacman.conf<br />
|content=<nowiki><br />
...<br />
[community]<br />
Include = /etc/pacman.d/mirrorlist<br />
...<br />
</nowiki>}}<br />
<br />
[community], unlike AUR, contains binary packages that can be installed directly with [[pacman]] and the build files can also be accessed with [[ABS]]. Some of these packages may eventually make the transition to the [core] or [extra] repositories as the developers consider them crucial to the distribution.<br />
<br />
Users can also access the [community] build files by editing {{Filename|/etc/abs.conf}} and enabling the community repository in the {{Codeline|REPOS}} array.<br />
<br />
==Git Repo==<br />
A Git Repo of the AUR is maintained by Thomas Dziedzic providing package history among other things. It is updated at least once a day. To clone the repository (several hundred MB):<br />
<br />
$ git clone git://pkgbuild.com/aur.git<br />
<br />
[http://pkgbuild.com/git/aur.git/ Web interface], [http://pkgbuild.com/~td123/readme Readme], [http://bbs.archlinux.org/viewtopic.php?id=113099 Forum thread]<br />
<br />
==FAQ==<br />
<br />
{{FAQ<br />
|question=What is the AUR?<br />
|answer=The AUR (Arch User Repository) is a place where the Arch Linux community can upload [[PKGBUILD]]s of applications, libraries, etc., and share them with the entire community. Fellow users can then vote for their favorites to be moved into the [community] repository to be shared with Arch Linux users in binary form.}}<br />
<br />
{{FAQ<br />
|question=What is a TU?<br />
|answer=A [[AUR Trusted User Guidelines|TU (Trusted User)]] is a person who is chosen to oversee AUR and the [community] repository. They're the ones who maintain popular PKGBUILDs in [community], and overall keep the AUR running.}}<br />
<br />
{{FAQ<br />
|question=What's the difference between [unsupported] and [community]?<br />
|answer=[unsupported] is where all PKGBUILDs that users submit are stored, and must be built manually with [makepkg]. When PKGBUILDs receive enough votes, they are moved into the [community] repository, where the TUs maintain binary packages that can be installed with [[pacman]].}}<br />
<br />
{{FAQ<br />
|question=How many votes does it take to get a PKGBUILD into [community]?<br />
|answer=Usually, at least 10 votes are required for something to move into [community]. However, if a TU wants to support a package, it will often be found in the repository.}}<br />
<br />
{{FAQ<br />
|question=How do I make a PKGBUILD?<br />
|answer=The best resource is [[Creating Packages]]. Remember to look in AUR before creating the PKGBUILD as to not duplicate efforts.}}<br />
<br />
{{FAQ<br />
|question=I'm trying to do {{Codeline|pacman -S foo}}; it isn't working but I know it's in [community]<br />
|answer=You probably haven't enabled [community] in your {{Filename|/etc/pacman.conf}}. Just uncomment the relevant lines.<br />
If [community] is enabled in your {{Filename|/etc/pacman.conf}} try running {{Codeline|pacman -S -y}} first to synchronize the pkgcache before trying your package again.}}<br />
<br />
{{FAQ<br />
|question=Foo in AUR is outdated; what do I do?<br />
|answer=For starters, you can flag packages out-of-date. If it stays out-of-date for an extended amount of time, the best thing to do is email the maintainer. If there is no response from the maintainer, you could mail to the aur-general mailing list to have a TU orphan the PKGBUILD if you're willing to maintain it yourself.}}<br />
<br />
{{FAQ<br />
|question=I have a PKGBUILD I would like to submit; can someone check it to see if there are any errors?<br />
|answer=If you would like to have your PKGBUILD critiqued, post it on the aur-general mailing list to get feedback from the TUs and fellow AUR members. You could also get help from the [[ArchChannel|IRC channel]], #archlinux on irc.freenode.net. You can also<br />
use [[namcap]] to check your PKGBUILD and the resulting package for errors.}}<br />
<br />
{{FAQ<br />
|question=Foo in AUR doesn't compile when I do {{Codeline|makepkg}}; what should I do?<br />
|answer=You are probably missing something trivial.<br />
<br />
# Run {{Codeline|pacman -Syyu}} before compiling anything with {{Codeline|makepkg}} as the problem may be that your system is not up-to-date.<br />
# Ensure you have both "base" and "base-devel" groups installed.<br />
# Try using the "{{Codeline|-s}}" option with {{Codeline|makepkg}} to check and install all the dependencies needed before starting the build process.<br />
<br />
The reason might not be trivial after all. Custom CFLAGS, LDFLAGS and MAKEFLAGS can cause failures. It's also possible that the PKGBUILD is broken for everyone. If you can't figure it out on your own, just report it to the maintainer.}}<br />
<br />
{{FAQ<br />
|question=How can I speed up repeated build processes?<br />
|answer=If you frequently compile code that uses gcc - say, a git or SVN package - you may find [[ccache]], short for "compiler cache", useful.}}<br />
<br />
{{FAQ<br />
|question=How do I access unsupported packages?<br />
|answer=See [[#Installing packages]]}}<br />
<br />
{{FAQ<br />
|question=How can I upload to AUR without using the web interface?<br />
|answer=You can use [http://aur.archlinux.org/packages.php?ID=23393 aurploader] or [http://aur.archlinux.org/packages.php?ID=37216 burp] -- both with command-line interfaces.}}</div>Mar77ihttps://wiki.archlinux.org/index.php?title=PKGBUILD&diff=140112PKGBUILD2011-05-06T11:07:11Z<p>Mar77i: Mention license=(unknown) option as PKGBUILD.proto suggests</p>
<hr />
<div>[[Category:About Arch (English)]]<br />
[[Category:Package development (English)]]<br />
[[Category:Guidelines (English)]]<br />
{{i18n|PKGBUILD}}<br />
[[fr:PKGBUILD]]<br />
<br />
{{Article summary start}}<br />
{{Article summary text|A PKGBUILD is a script that describes how software is to be compiled and packaged. This article provides an explanation of PKGBUILD variables used when [[Creating Packages]].}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Package management overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Creating Packages}}<br />
{{Article summary wiki|Custom local repository}}<br />
{{Article summary wiki|pacman Tips}}<br />
{{Article summary heading|Resources}}<br />
{{Article summary link|PKGBUILD(5) Manual Page|http://www.archlinux.org/pacman/PKGBUILD.5.html}}<br />
{{Article summary end}}<br />
<br />
A {{Filename|PKGBUILD}} is an Arch Linux package build description file used when [[Creating Packages|creating packages]]. This article describes possible {{Filename|PKGBUILD}} variables.<br />
<br />
==Building packages==<br />
<br />
Packages in Arch Linux are built using the [[makepkg]] utility and information stored in a {{Filename|PKGBUILD}} file. When {{Codeline|makepkg}} is run, it searches for a {{Filename|PKGBUILD}} in the current directory and follows the instructions therein to either compile or otherwise acquire the required files to be packaged within a package file ({{Filename|pkgname.pkg.tar.xz}}). The resulting package contains binary files and installation instructions; readily installed with [[pacman]].<br />
<br />
See:<br />
:* [[Creating Packages]] for more information on creating packages; and<br />
:* [[Custom local repository]] for information on using them after they have been created.<br />
<br />
==Variables==<br />
<br />
The following are variables that can be filled out in the {{Filename|PKGBUILD}} file:<br />
<br />
; {{Codeline|pkgname}} : The name of the package. It should consist of '''alphanumeric characters and dashes ('-')''' and all letters should be '''lowercase'''. For the sake of consistency, {{Codeline|pkgname}} should match the name of the source tarball of the software you are packaging. For instance, if the software is in {{Filename|foobar-2.5.tar.gz}}, the {{Codeline|pkgname}} value should be ''foobar''. The present working directory the {{Filename|PKGBUILD}} file is in should also match the {{Codeline|pkgname}}.<br />
<br />
; {{Codeline|pkgver}} : The version of the package. The value should be the same as the version released by the author of the package. It can contain letters, numbers and periods but '''CANNOT''' contain a hyphen. If the author of the package uses a hyphen in their version numbering scheme, replace it with an underscore. For instance, if the version is ''0.99-10'', it should be changed to ''0.99_10''. If the pkgver variable is used later in the PKGBUILD then the underscore can easily be substituted for a dash on usage e.g.:<br />
source=($pkgname-${pkgver//_/-}.tar.gz)<br />
<br />
; {{Codeline|pkgrel}} : The release number of the package specific to Arch Linux. This value allows users to differentiate between consecutive builds of the same version of a package. When a new package version is first released, the '''release number starts at 1'''. As fixes and optimizations are made to the {{Filename|PKGBUILD}} file, the package will be '''re-released''' and the '''release number''' will increment by 1. When a new version of the package comes out, the release number resets to 1.<br />
<br />
; {{Codeline|epoch}} : An integer value, specific to Arch Linux, representing what 'lifetime' to compare version numbers against. This value allows overrides of the normal version comparison rules for packages that have inconsistent version numbering, require a downgrade, change numbering schemes, etc. By default, packages are assumed to have an epoch value of ''0''. Do not use this unless you know what you are doing.<br />
<br />
; {{Codeline|pkgdesc}} : The description of the package. The description should be about 80 characters or less and should not include the package name in a self-referencing way. For instance, "Nedit is a text editor for X11" should be written as "A text editor for X11."<br />
<br />
; {{Codeline|arch}} : An array of architectures that the {{Filename|PKGBUILD}} file is known to build and work on. Currently, it should contain '''i686''' and/or '''x86_64''', {{Codeline|<nowiki>arch=('i686' 'x86_64')</nowiki>}}. The value '''any''' can also be used for architechture-independent packages. You can access this value with the variable {{Codeline|$CARCH}} during the build.<br />
<br />
; {{Codeline|url}} : The URL of the official site of the software being packaged.<br />
<br />
; {{Codeline|license}} : The license under which the software is distributed. A {{Package Official|licenses}} package has been created in {{Codeline|[core]}} that stores common licenses in {{Filename|/usr/share/licenses/common}}, i.e. {{Filename|/usr/share/licenses/common/GPL}}. If a package is licensed under one of these licenses, the value should be set to the directory name, e.g. {{Codeline|<nowiki>license=('GPL')</nowiki>}}. If the appropriate license is not included in the official {{Package Official|licenses}} package, several things must be done:<br />
:# The license file(s) should be included in: {{Filename|/usr/share/licenses/'''pkgname'''/}}, e.g. {{Filename|/usr/share/licenses/foobar/LICENSE}}.<br />
:# If the source tarball does '''NOT''' contain the license details and the license is only displayed elsewhere, e.g. a website, then you need to copy the license to a file and include it.<br />
:# Add '''custom''' to the {{Codeline|license}} array. Optionally, you can replace '''custom''' with '''custom:name of license'''. Once a license is used in two or more packages in an official repository (including {{Codeline|[community]}}), it becomes a part of the {{Package Official|licenses}} package.<br />
:* The [[Wikipedia:BSD License|BSD]], [[Wikipedia:MIT License|MIT]], [[Wikipedia:ZLIB license|zlib/png]] and [[Wikipedia:Python License|Python]] licenses are special cases and could not be included in the {{Package Official|licenses}} package. For the sake of the {{Codeline|license}} array, it is treated as a common license ({{Codeline|<nowiki>license=('BSD')</nowiki>}}, {{Codeline|<nowiki>license=('MIT')</nowiki>}}, {{Codeline|<nowiki>license=('ZLIB')</nowiki>}} and {{Codeline|<nowiki>license=('Python')</nowiki>}}) but technically each one is a custom license because each one has its own copyright line. Any packages licensed under these four should have its own unique license stored in {{Filename|/usr/share/licenses/'''pkgname'''}}. Some packages may not be covered by a single license. In these cases, multiple entries may be made in the license array, e.g. {{Codeline|<nowiki>license=('GPL' 'custom:name of license')</nowiki>}}.<br />
:* Additionally, the (L)GPL has many versions and permutations of those versions. For (L)GPL software, the convention is:<br />
:** (L)GPL - (L)GPLv2 or any later version<br />
:** (L)GPL2 - (L)GPL2 only<br />
:** (L)GPL3 - (L)GPL3 or any later version<br />
:* If after researching the issue no license can be determined, {{Codeline|PKGBUILD.proto}} suggests using {{Codeline|unknown}}. However upstream should be contacted about the conditions under which the software is (and is not) available.<br />
<br />
; {{Codeline|groups}} : The group the package belongs in. For instance, when you install the {{Package Official|kdebase}} package, it installs all packages that belong in the ''kde'' group.<br />
<br />
; {{Codeline|depends}} : An array of package names that must be installed before this software can be run. If a software requires a minimum version of a dependency, the '''>=''' operator should be used to point this out, e.g. {{Codeline|<nowiki>depends=('foobar>=1.8.0')</nowiki>}}. You do not need to list packages that your software depends on if other packages your software depends on already have those packages listed in their dependency. For instance, ''gtk2'' depends on ''glib2'' and ''glibc''. However, ''glibc'' does not need to be listed as a dependency for ''gtk2'' because it is a dependency for ''glib2''.<br />
<br />
; {{Codeline|makedepends}} : An array of package names that must be installed to build the software but unnecessary for using the software after installation. You can specify the minimum version dependency of the packages in the same format as the {{Codeline|depends}} array.<br />
<br />
: {{Warning| The group "base-devel" is assumed already installed when building with makepkg . Members of "base-devel" '''should not''' be included in makedepends arrays.}}<br />
<br />
; {{Codeline|optdepends}} : An array of package names that are not needed for the software to function but provides additional features. A short description of what each package provides should also be noted. An {{Codeline|optdepends}} may look like this:<br />
optdepends=('cups: printing support'<br />
'sane: scanners support'<br />
'libgphoto2: digital cameras support'<br />
'alsa-lib: sound support'<br />
'giflib: GIF images support'<br />
'libjpeg: JPEG images support'<br />
'libpng: PNG images support')<br />
<br />
; {{Codeline|provides}} : An array of package names that this package provides the features of (or a virtual package such as ''cron'' or ''sh''). If you use this variable, you should add the version ({{Codeline|pkgver}} and perhaps the {{Codeline|pkgrel}}) that this package will provide if dependencies may be affected by it. For instance, if you are providing a modified ''qt'' package named ''qt-foobar'' version 3.3.8 which provides ''qt'' then the {{Codeline|provides}} array should look like {{Codeline|<nowiki>provides=('qt=3.3.8')</nowiki>}}. Putting {{Codeline|<nowiki>provides=('qt')</nowiki>}} will cause to fail those dependencies that require a specific version of ''qt''. Do not add {{Codeline|pkgname}} to your provides array, this is done automatically.<br />
<br />
; {{Codeline|conflicts}} : An array of package names that may cause problems with this package if installed. You can also specify the version properties of the conflicting packages in the same format as the {{Codeline|depends}} array.<br />
<br />
; {{Codeline|replaces}} : An array of obsolete package names that are replaced by this package, e.g. {{Codeline|<nowiki>replaces=('ethereal')</nowiki>}} for the {{Package Official|wireshark}} package. After syncing with {{Codeline|pacman -Sy}}, it will immediately replace an installed package upon encountering another package with the matching {{Codeline|replaces}} in the repositories. If you are providing an alternate version of an already existing package, use the {{Codeline|conflicts}} variable which is only evaluated when actually installing the conflicting package.<br />
<br />
; {{Codeline|backup}} : An array of files to be backed up as {{Filename|file.pacsave}} when the package is removed. This is commonly used for packages placing configuration files in {{Filename|/etc}}. The file paths in this array should be relative paths (e.g. {{Filename|etc/pacman.conf}}) not absolute paths (e.g. {{Filename|/etc/pacman.conf}}).<br />
<br />
; {{Codeline|options}} : This array allows you to override some of the default behavior of {{Codeline|makepkg}}. To set an option, include the option name in the array. To reverse the default behavior, place an '''!''' at the front of the option. The following options may be placed in the array:<br />
:* '''''strip''''' - Strips symbols from binaries and libraries.<br />
:* '''''docs''''' - Save {{Filename|/doc}} directories.<br />
:* '''''libtool''''' - Leave ''libtool'' ({{Filename|.la}}) files in packages.<br />
:* '''''emptydirs''''' - Leave empty directories in packages.<br />
:* '''''zipman''''' - Compress ''man'' and ''info'' pages with ''gzip''.<br />
:* '''''ccache''''' - Allow the use of {{Codeline|ccache}} during build. More useful in its negative form {{Codeline|!ccache}} with select packages that have problems building with {{Codeline|ccache}}.<br />
:* '''''distcc''''' - Allow the use of {{Codeline|distcc}} during build. More useful in its negative form {{Codeline|!distcc}} with select packages that have problems building with {{Codeline|distcc}}.<br />
:* '''''makeflags''''' - Allow the use of user-specific {{Codeline|makeflags}} during build. More useful in its negative form {{Codeline|!makeflags}} with select packages that have problems building with custom {{Codeline|makeflags}}.<br />
<br />
; {{Codeline|install}} : The name of the {{Filename|.install}} script to be included in the package. ''pacman'' has the ability to store and execute a package-specific script when it installs, removes or upgrades a package. The script contains the following functions which run at different times:<br />
:* '''''pre_install''''' - The script is run right before files are extracted. One argument is passed: new package version.<br />
:* '''''post_install''''' - The script is run right after files are extracted. One argument is passed: new package version.<br />
:* '''''pre_upgrade''''' - The script is run right before files are extracted. Two arguments are passed in the following order: new package version, old package version.<br />
:* '''''post_upgrade''''' - The script is run after files are extracted. Two arguments are passed in the following order: new package version, old package version.<br />
:* '''''pre_remove''''' - The script is run right before files are removed. One argument is passed: old package version.<br />
:* '''''post_remove''''' - The script is run right after files are removed. One argument is passed: old package version.<br />
<br />
: Each function is run chrooted inside the pacman install directory. See [https://bbs.archlinux.org/viewtopic.php?pid=913891 this thread].<br />
<br />
: {{Tip|A prototype {{Filename|.install}} is provided at {{Filename|/usr/share/pacman/proto.install}}.}}<br />
<br />
; {{Codeline|source}} : An array of files which are needed to build the package. It must contain the location of the software source, which in most cases is a full HTTP or FTP URL. The previously set variables {{Codeline|pkgname}} and {{Codeline|pkgver}} can be used effectively here (e.g. {{Codeline|<nowiki>source=(http://example.com/$pkgname-$pkgver.tar.gz)</nowiki>}})<br />
<br />
: {{Note|If you need to supply files which are not downloadable on the fly, e.g. self-made patches, you simply put those into the same directory where your {{Filename|PKGBUILD}} file is in and add the filename to this array. Any paths you add here are resolved relative to the directory where the {{Filename|PKGBUILD}} lies. Before the actual build process is started, all of the files referenced in this array will be downloaded or checked for existence, and {{Codeline|makepkg}} will not proceed if any are missing.}}<br />
<br />
: {{Note|You can specify a different name for the downloaded file - if the downloaded file has a different name for some reason like the url had a GET parameter - using the following syntax: <filename>::<fileuri>, do not include the '<' and '>' characters}}<br />
<br />
; {{Codeline|noextract}} : An array of files listed under the {{Codeline|source}} array which should not be extracted from their archive format by {{Codeline|makepkg}}. This most commonly applies to certain zip files which cannot be handled by ''bsdtar'' because ''libarchive'' processes all files as streams rather than random access as ''unzip'' does. In these situations ''unzip'' should be added in the {{Codeline|makedepends}} array and the first line of the {{Codeline|build()}} function should contain:<br />
cd $srcdir/$pkgname-$pkgver<br />
unzip [source].zip<br />
<br />
; {{Codeline|md5sums}} : An array of MD5 checksums of the files listed in the {{Codeline|source}} array. Once all files in the {{Codeline|source}} array are available, an MD5 hash of each file will be automatically generated and compared with the values of this array in the same order they appear in the {{Codeline|source}} array. While the order of the source files itself does not matter, it is important that it matches the order of this array since {{Codeline|makepkg}} cannot guess which checksum belongs to what source file. You can generate this array quickly and easily using the command {{Codeline|makepkg -g}} in the directory that contains the {{Filename|PKGBUILD}} file. Note that the MD5 algorithm is known to have weaknesses, so you should consider using a stronger alternative.<br />
<br />
; {{Codeline|sha1sums}} : An array of SHA-1 160-bit checksums. This is an alternative to md5sums described above, but is also known to have weaknesses, so you should consider using a stronger alternative. To enable use and generation of these checksums, be sure to set up the INTEGRITY_CHECK option in makepkg.conf. See man makepkg.conf.<br />
<br />
; {{Codeline|sha256sums, sha384sums, sha512sums}} : An array of SHA-2 checksums with digest sizes 256, 384 and 512 bits respectively. These are alternatives to md5sums described above and are generally believed to be stronger. To enable use and generation of these checksums, be sure to set up the INTEGRITY_CHECK option in makepkg.conf. See man makepkg.conf.<br />
<br />
It is common practice to preserve the order of the {{Filename|PKGBUILD}} variables as shown above. However, this is not mandatory, as the only requirement in this context is correct [[Wikipedia:Bash|Bash]] syntax.<br />
<br />
==See also==<br />
*[http://pastebin.com/MeXiLDV9 Example PKGBUILD file]<br />
*[http://seberm.pastebin.com/gP0tBqvs Example .install file]<br />
*[[Arch_Packaging_Standards|Arch Packaging Standards]] for various guidelines</div>Mar77ihttps://wiki.archlinux.org/index.php?title=Pacman&diff=99120Pacman2010-03-06T01:10:33Z<p>Mar77i: Added an FAQ entry about special pacman tasks.</p>
<hr />
<div>[[Category:Package management (English)]]<br />
[[Category:Utilities (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|pacman}}<br />
{{DISPLAYTITLE:pacman}}<br />
{{Article summary start}}<br />
{{Article summary text|An overview of Arch Linux's package manager.}}<br />
{{Article summary heading|Related articles}}<br />
{{Article summary wiki|Arch Build System}}<br />
{{Article summary wiki|Arch User Repository}}<br />
{{Article summary wiki|Downgrading Packages}}<br />
{{Article summary wiki|Improve Pacman Performance}}<br />
{{Article summary wiki|Mirrors}}<br />
{{Article summary wiki|pacman GUI Frontends}}<br />
{{Article summary wiki|pacman Rosetta}}<br />
{{Article summary wiki|pacman Tips}}<br />
{{Article summary heading|Manual pages}}<br />
{{Article summary link|libalpm(3)|http://www.archlinux.org/pacman/libalpm.3.html}}<br />
{{Article summary link|makepkg(8)|http://www.archlinux.org/pacman/makepkg.8.html}}<br />
{{Article summary link|makepkg.conf(5)|http://www.archlinux.org/pacman/makepkg.conf.5.html}}<br />
{{Article summary link|pacman(8)|http://www.archlinux.org/pacman/pacman.8.html}}<br />
{{Article summary link|pacman.conf(5)|http://www.archlinux.org/pacman/pacman.conf.5.html}}<br />
{{Article summary link|PKGBUILD(5)|http://www.archlinux.org/pacman/PKGBUILD.5.html}}<br />
{{Article summary link|repo-add(8)|http://www.archlinux.org/pacman/repo-add.8.html}}<br />
{{Article summary end}}<br />
The '''[http://archlinux.org/pacman/ pacman]''' package manager is one of the main features of Arch Linux. It combines a simple binary package format with an easy-to-use build system (see [[makepkg]] and [[Arch Build System]]). The goal of pacman is to make it possible to easily manage packages, whether they are from the official Arch repositories or the user's own builds.<br />
<br />
pacman keeps the system up to date by synchronizing package lists with the master server. This server/client model also allows you to download/install packages with a simple command, complete with all required dependencies.<br />
<br />
pacman is written in the C programming language. It uses the .tar.gz package format, in an effort to further enhance its speed; Gzipped tarballs, though slightly larger, are decompressed much faster than their Bzipped counterparts, and are therefore generally installed more expediently.<br />
<br />
==Configuration==<br />
pacman configuration is located in {{Filename|/etc/pacman.conf}}. This is the place where the user configures the program to work in the desired manner. In depth information about the configuration file can be found in [http://www.archlinux.org/pacman/pacman.conf.5.html man pacman.conf].<br />
<br />
===General options===<br />
General options are in the {{Codeline|[options]}} section. Read the man page or look in the default {{Filename|pacman.conf}} for information on what can be done here.<br />
<br />
====Skip package from being upgraded====<br />
To skip upgrading a specific package, add it to the pertinent section:<br />
IgnorePkg=kernel26<br />
<br />
====Skip package group from being upgraded====<br />
As with packages, skipping a whole package group is also possible:<br />
IgnoreGroup=gnome<br />
<br />
===Repositories===<br />
This section defines which repositories to use, as referred to in {{Filename|pacman.conf}}. They can be stated here directly, or included from another file.<br />
<br />
All official repositories use the same {{Filename|/etc/pacman.d/mirrorlist}} file which contains a variable, '{{Codeline|$repo}}', making it a requisite to maintain only one list.<br />
<br />
The following is an example for the official repositories which have numerous [[mirrors]]. Avoid using ftp.archlinux.org as it is [http://www.archlinux.org/news/302/ throttled].<br />
<pre><br />
[core]<br />
# Add your preferred servers here, they will be used first<br />
Include=/etc/pacman.d/mirrorlist<br />
<br />
[extra]<br />
# Add your preferred servers here, they will be used first<br />
Include=/etc/pacman.d/mirrorlist<br />
<br />
[community]<br />
# Add your preferred servers here, they will be used first<br />
Include=/etc/pacman.d/mirrorlist<br />
</pre><br />
{{Note|Care should be taken when using the {{Codeline|[testing]}} repository. It is in active development and updating may cause some packages to stop working. People who use the {{Codeline|[testing]}} repository are encouraged to subscribe to the [http://mailman.archlinux.org/mailman/listinfo/arch-dev-public arch-dev-public mailing list] for current information.}}<br />
<br />
==Usage==<br />
To read other examples of what pacman can do, refer to [http://archlinux.org/pacman/pacman.8.html man pacman]. The examples below are just a small sample of operations that can be performed.<br />
<br />
===Installing packages===<br />
To install a single package or list of packages (including dependencies), issue the following command:<br />
# pacman -S package_name1 package_name2<br />
<br />
Sometimes there are multiple versions of a package in different repositories (e.g. extra and testing). Specify which one to install:<br />
# pacman -S extra/package_name<br />
# pacman -S testing/package_name<br />
<br />
{{Note|1=Do '''not''' refresh the package list when installing packages (i.e. {{Codeline|pacman -Sy package_name}}); this can lead to dependency issues.[http://bbs.archlinux.org/viewtopic.php?id=89328] [[#Upgrading packages|Upgrade]] explicitly first; before installing new packages.}}<br />
<br />
===Removing packages===<br />
To remove a single package, leaving all of its dependencies installed:<br />
# pacman -R package_name<br />
<br />
To remove a package's dependencies which are not required by any other installed package:<br />
# pacman -Rs package_name<br />
<br />
pacman saves important configuration files when removing certain applications and names them with the extension: {{Filename|.pacsave}}. To delete these backup files use the -n option:<br />
# pacman -Rn package_name<br />
# pacman -Rns package_name<br />
<br />
{{Note|pacman will not remove configurations that the application itself creates (for example {{Filename|.dot}} files in the home folder).}}<br />
<br />
===Upgrading packages===<br />
pacman can update all packages on the system with just one command. This could take quite a while depending on how up-to-date the system is. The best option is to synchronize the repository databases ''and'' update the system in one go, with the following:<br />
# pacman -Syu<br />
<br />
{{Note|As a rolling-release distribution, updating your Arch Linux system is not always as straightforward as with other fixed-release distributions. Furthermore, pacman is not a "fire-and-forget" package manager. As a result, properly maintaining an Arch Linux system with pacman tends to confuse new users (as recurring forum discussions would indicate).<br />
<br />
Please read the following section ''thoroughly'' before continuing.}}<br />
<br />
pacman is a powerful package management tool, but it does not attempt to "do everything", as it were. Read [[The Arch Way]] if this confuses you. Rather, users must be vigilant and take responsibility for maintaining their own system. When performing a system update ({{Codeline|pacman -Syu}}), for example, '''it is essential that users read all information output by pacman and use common sense.'''<br />
<br />
For example, if {{Codeline|kernel26}} is to be updated to a new minor version, the cautious user immediately recognizes that packages that include kernel modules (such as {{Codeline|catalyst}} and {{Codeline|virtualbox-modules}}) must be updated/rebuilt as well. If a {{Codeline|kernel26}} update is available, but no updates are yet available for {{Codeline|catalyst}}, it is not recommended to update {{Codeline|kernel26}} unless willing to deal with {{Codeline|catalyst}} breaking!<br />
<br />
This is not a problem unique to Arch Linux, per se; kernel modules must be built against the running kernel. However, fixed-release distributions usually ensure that kernel updates are accompanied with updates to all "affected" packages. As a cutting-edge rolling-release distribution, kernel updates are available immediately in Arch Linux. "Affected" packages are usually updated within a matter of hours of a kernel update, but may not be available until your repositories are synced. '''Always use common sense!'''<br />
<br />
Another example: during an update, pacman indicates that a new version of {{Codeline|xorg-server}} is available. The update changes input device handling -- X will not start afterwards without user intervention; changes to {{Filename|xorg.conf}} are necessary. However, without fail, dozens of forum threads are opened after the update is released by users unable to start X. <br />
<br />
Instead of immediately updating as soon as updates are available, users must recognize that an update to {{Codeline|xorg-server}} may cause X not to start afterwards. This means that is not wise to update {{Codeline|xorg-server}} if one is about to deliver an important presentation, for example. Rather, update during free time and be prepared to deal with any problems that may arise due to the update.<br />
<br />
Next, a visit to the [http://archlinux.org/ Arch Linux home page] is always warranted. In this example, a news item was posted regarding the update which linked to a ArchWiki page that described how to reconfigure X. Often when updates to "critical" packages require user intervention, an appropriate update to http://archlinux.org will be made. Normally there will be forum posts describing the very same issue shortly after the update becomes available across the mirrors, detailing the solution any "problems". <br />
<br />
When the actual update is performed, be sure to read the messages printed out by pacman. Packagers often describe the changes and the expected problems, and direct the users to the appropriate ArchWiki page. '''Always read all information output by pacman!'''<br />
<br />
===Querying package databases===<br />
pacman queries the local package database with the -Q flag; see:<br />
$ pacman -Q --help<br />
<br />
and queries the sync databases with the -S flag; see:<br />
$ pacman -S --help<br />
<br />
pacman can search for packages in the database, searching both in packages' names and descriptions:<br />
$ pacman -Ss package<br />
<br />
To search for already installed packages:<br />
$ pacman -Qs package<br />
<br />
To display extensive information about a given package:<br />
$ pacman -Si package<br />
for locally installed packages:<br />
$ pacman -Qi package<br />
<br />
To retrieve a list of the files installed by a package:<br />
$ pacman -Ql package<br />
<br />
One can also query the database to know which package a file on the file system belongs to.<br />
$ pacman -Qo /path/to/a/file<br />
<br />
To list all packages no longer required as dependencies (orphans):<br />
$ pacman -Qdt<br />
<br />
===Additional commands===<br />
Download a package without installing it:<br />
# pacman -Sw package<br />
<br />
Install a 'local' package that is not from a repository:<br />
# pacman -U /path/to/package/package_name-version.pkg.tar.gz<br />
<br />
Install a 'remote' package (not from a repository):<br />
# pacman -U http://www.examplepackage/repo/examplepkg.tar.gz<br />
<br />
Clean the package cache of packages that are not currently installed (/var/cache/pacman/pkg):<br />
# pacman -Sc<br />
<br />
Clean the entire package cache:<br />
{{Warning|Only do this when certain that [[Downgrading Packages]] will not be a necessity, as pacman -Scc removes ''all'' packages from the cache.}}<br />
# pacman -Scc<br />
<br />
==Troubleshooting==<br />
{{FAQ<br />
|question=An update to package XYZ broke my system!<br />
|answer=Arch Linux is a rolling-release cutting-edge distribution. Package updates are available as soon as they are deemed stable enough for general use. However, updates sometimes require user intervention: configuration files may need to be updated, optional dependencies may change, etc.<br />
<br />
The most important tip to remember is to not "blindly" update your system. Always read the list of packages to be updated. Note whether "critical" packages are going to be updated ({{Codeline|kernel26}}, {{Codeline|xorg-server}}, {{Codeline|klibc}}, and so on). If so, it is usually a good idea to check for any news at http://archlinux.org and scan recent forum posts to see if people are experiencing problems as a result of an update.<br />
<br />
If a package update is expected/known to cause problems, packagers will ensure that pacman displays an appropriate message when the package is updated. If experiencing trouble after an update, always double-check your pacman logs ({{Filename|/var/log/pacman.log}}) for related messages. <br />
<br />
At this point, '''only after ensuring there is no information available through pacman, there is no relative news on http://archlinux.org, and there are no forum posts regarding the update''', you should consider seeking help on the forum, over [[IRC Channel|IRC]], or [[Downgrading Packages|downgrading the offending package]].<br />
<br />
Re-read the last paragraph.}}<br />
<br />
{{FAQ<br />
|question=I know an update to package ABC was released, but pacman says my system is up to date!<br />
|answer=pacman mirrors are not synced immediately. It may take over 24 hours before an update is available to you. <br />
<br />
The only options are be patient or use another mirror.}}<br />
<br />
{{FAQ<br />
|question=I get an error when updating: "file exists in filesystem"!<br />
|answer=ASIDE: ''Taken from http://bbs.archlinux.org/viewtopic.php?id=56373 by Misfit138.''<br />
<br />
error: could not prepare transaction<br />
error: failed to commit transaction (conflicting files)<br />
package: /path/to/file exists in filesystem<br />
Errors occurred, no packages were upgraded.<br />
<br />
Why this is happening: pacman has detected a file conflict, and by design, will not overwrite files for you. This is a design feature, not a flaw.<br />
<br />
It is the user's responsibility to maintain their system, not the package manager's. ({{Codeline|pacman -Qo}} may be invoked to query which package owns the file, if any.)<br />
<br />
The issue is usually trivial to solve. A safe way is to first check if another package owns the file ({{Codeline|pacman -Qo /path/to/file}}). If the file is owned by another package, [[Reporting Bug Guidelines|file a bug report]]. If the file is not owned by another package, rename the file which 'exists in filesystem' and re-issue the update command. If all goes well, the file may then be removed.}}<br />
<br />
{{FAQ<br />
|question=I get an error when installing a package: "not found in sync db"<br />
|answer=Firstly, ensure the package actually exists (and watch out for typos!) If certain the package exists, your package list may be out-of-date or your repositories may be incorrectly configured. Try running {{Codeline|pacman -Syy}} to force a refresh of all package lists.}}<br />
<br />
{{FAQ<br />
|question=pacman is repeatedly upgrading the same package!<br />
|answer=This is due to duplicate entries in {{Filename|/var/lib/pacman/local/}}, such as two {{Codeline|kernel26}} instances. {{Codeline|pacman -Qi}} outputs the correct version, but {{Codeline|pacman -Qu}} recognizes the old version and therefore will attempt to upgrade.<br />
<br />
Solution: delete the offending entry in {{Filename|/var/lib/pacman/local/}}.<br />
<br />
{{Note|pacman version 3.4 should display an error in case of duplicate entries, which should make this note obsolete.}}}}<br />
<br />
{{FAQ<br />
|question=pacman crashes during an upgrade!<br />
|answer=In the case that pacman crashes with a "database write" error whilst removing packages, and reinstalling or upgrading packages fails:<br />
#Boot using the Arch live CD<br />
#Mount your root filesystem<br />
#Update the pacman database via {{Codeline|pacman -Syy}}<br />
#Reinstall the broken package via {{Codeline|pacman -r /path/to/root -S package}}}}<br />
<br />
{{FAQ<br />
|question=I have installed something with {{Codeline|make install}} and now some files on my system don't belong to any pacman package.<br />
|answer=Pacman will overwrite software you have installed manually automatically if you supply {{Codeline|pacman -Sf}}. If you installed stuff to /usr/local, you can check /usr/local for files of which pacman is aware with <pre>find /usr/local -exec bash -c 'file={}; pacman -Qo "$file" 2>/dev/null' \;<br />
</pre><br />
If you want to look for all files that aren't part of any package you can:<pre># find / -xdev -exec bash -c 'file={}; [[ "$file" =~ ^/root || \<br />
"$file" =~ ^/boot/(grub|kernel) || "$file" =~ ^/usr/(include|lib) ]] || \<br />
pacman -Qo "$file" &>/dev/null || echo "$file"' \;<br />
</pre>}}</div>Mar77ihttps://wiki.archlinux.org/index.php?title=Talk:Install_bundled_32-bit_system_in_64-bit_system&diff=64936Talk:Install bundled 32-bit system in 64-bit system2009-03-13T09:42:41Z<p>Mar77i: </p>
<hr />
<div>*Why a C++ program in the "Execute 32bit apps" section for firefox?? Why not just a plain bash script??<br />
<br />
*Which commands should be run as root and which as user? Confusing.... for example xhost is not sane as root.<br />
<br />
*pppoe users should also link the /etc/ppp/resolv.conf:<br />
sudo ln -f /etc/ppp/resolv.conf /opt/arch32/etc/ppp<br />
<br />
*Why invoke xhost, anyway?<br />
<br />
*The "edit your mirrorlist" part seems quite a dangerous thing to do, while you can have <code>pacman --config /point/somewhere/else</code></div>Mar77ihttps://wiki.archlinux.org/index.php?title=Talk:Install_bundled_32-bit_system_in_64-bit_system&diff=64935Talk:Install bundled 32-bit system in 64-bit system2009-03-13T09:41:38Z<p>Mar77i: </p>
<hr />
<div>*Why a C++ program in the "Execute 32bit apps" section for firefox?? Why not just a plain bash script??<br />
<br />
*Which commands should be run as root and which as user? Confusing.... for example xhost is not sane as root.<br />
<br />
*pppoe users should also link the /etc/ppp/resolv.conf:<br />
sudo ln -f /etc/ppp/resolv.conf /opt/arch32/etc/ppp<br />
<br />
*Why invoke xhost, anyway?<br />
<br />
*The "edit your mirrorlist" part seems quite a dangerous thing to do, while you can launch pacman having --config /point/somewhere/else</div>Mar77i