Difference between revisions of "AUR User Guidelines"

From ArchWiki
Jump to navigation Jump to search
m
Line 1: Line 1:
[[Category:Package management (Česky)]]
+
[[Category:Package management (English)]]
[[Category:About Arch (Česky)]]
+
[[Category:About Arch (English)]]
[[Category:Package development (Česky)]]
+
[[Category:Package development (English)]]
[[Category:Guidelines (Česky)]]
+
[[Category:Guidelines (English)]]
 
{{Article summary start}}
 
{{Article summary start}}
{{Article summary text|Vysvětlit jak přistupovat k AUR a jak jej používat.}}
+
{{Article summary text|Explains how to access and use the Arch User Repository}}
{{Article summary heading|Dostupné jazyky}}
+
{{Article summary heading|Available in languages}}
 
{{i18n_entry|Česky|:AUR - uživatelský průvodce (Česky)}}
 
{{i18n_entry|Česky|:AUR - uživatelský průvodce (Česky)}}
 
{{i18n_entry|English|:AUR_User_Guidelines}}
 
{{i18n_entry|English|:AUR_User_Guidelines}}
Line 11: Line 11:
 
{{i18n_entry|Русский|:AUR_руководство_пользователя}}
 
{{i18n_entry|Русский|:AUR_руководство_пользователя}}
 
{{i18n_entry|简体中文|:AUR用户指南}}
 
{{i18n_entry|简体中文|:AUR用户指南}}
{{Article summary heading|Souvisejicí články}}
+
{{Article summary heading|Related articles}}
 
{{Article summary wiki|AUR_Trusted_User_Guidelines}}
 
{{Article summary wiki|AUR_Trusted_User_Guidelines}}
 
{{Article summary wiki|AUR}}
 
{{Article summary wiki|AUR}}
Line 18: Line 18:
 
{{Article summary end}}
 
{{Article summary end}}
  
==Účel==
+
==Purpose==
  
[[ArchLinux User-community Repository (AUR)]] je komunitou spravovaný repozitář pro uživatele Arch Linuxu. Tato stránka ukazuje jak se může normální uživatel k AURu dostat a pracovat s ním.
+
The [[ArchLinux User-community Repository (AUR)]] is a community driven repository for Arch users. This document shows the normal user how to access AUR and work with it.  
  
==Uživatel a AUR==
+
==The User and the AUR==
  
Běžní uživatelé hrají v AURu podstatnou a nezbytnou roli, bez podpory, angažovanosti a přispívání širší komunity uživatelů by AUR nemohl plnit svůj účel. Život balíčku v AURu začíná i končí u uživatele a potřebuje přispívání uživatelů v několika směrech.
+
The normal user plays an essential role in the AUR and without the support, involvement and contribution of the wider user community the AUR cannot fulfill its potentialThe lifecycle of an AUR package starts and ends with the user and requires the user to contribute in several ways.
  
===Sdílení PKGBUILDů v UNSUPPORTED===
+
===Sharing PKGBUILDs in UNSUPPORTED===
Uživatelé mohou sdílet PKGBUILDy přes "UNSUPPORTED" oblast AURu. UNSUPPORTED neobsahuje žádné binární balíčky, ale umožňuje nahrát PKGBUILD, který si mohou stáhnout ostatní a pomocí něj vytvořit balíček který si nainstalují. Možnost komentování uživately umožňuje "zpětnou vazbu" formou návrhů pro správce PKGBUILDu, na úpravy/vylepšení. Nový "flagging" systém, který bude uveden, dovoluje TU uživatelům označit balíčky, které obsahují nebezpečný kód. Nicméně PKGBUILDy jsou neoficiální, měly by se používat s opatrností a vše je na vlastní nebezpečí.
+
Users can '''share PKGBUILDs''' 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.  A comments facility is provided that allows users to '''feedback improvements''' and suggestions to the PKGBUILD contributor. A new flagging system has been introduced that allows TUs to mark pkgs as checked for malicious code. However, these PKGBUILDs are completely unofficial and have not been thoroughly vetted, so they should be used at your own risk.
 +
 
 +
There is as yet no official mechanism for downloading build material from UNSUPPORTED but a few scripts can be found on the wiki.
  
 
===[community]===
 
===[community]===
[community] repozitář doplňuje k [extra] a [current] repozitářům nejpopulárnější balíčky z UNSUPPORTED, je udržován důvěryhodnými uživateli ( Trusted users). [community], narozdíl od UNSUPPORTED, obsahuje binární balíčky, které se dají instalovat přímo přes pacmana,  "build" soubory jsou dostupné pomocí [[ABS]]. Některé z těchto balíčků mohou přejít do [current] nebo [extra] repozitáře, pokud vývojáři usoudí, že jsou zásadní pro distribuci.
+
The [community] repo is a supplement to the [extra] and [current] repositories where the most popular packages from UNSUPPORTED are maintained by the Trusted Users group on behalf of the users. [community], unlike UNSUPPORTED, 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 [current] or [extra] repositories as the developers consider them crucial to the distribution.
  
Uživatelé se do  AUR [community] repo dostanou přidáním/odkomentováním toho řádku v /etc/pacman.conf:
+
Users can access the AUR [community] repo by adding/uncommenting this line in their pacman.conf file:
 
  Include = /etc/pacman.d/community
 
  Include = /etc/pacman.d/community
Pokud soubor <code>/etc/pacman.d/community</code> neexistuje, vytvořte jej, a vložte do něj následující:
+
If <code>/etc/pacman.d/community</code> does not exist then it should be created and contain the following:
 
<pre>[community]
 
<pre>[community]
 
Server = ftp://ftp.archlinux.org/community/os/i686/</pre>
 
Server = ftp://ftp.archlinux.org/community/os/i686/</pre>
  
Pro přístup k [community] build souborům editujte <code>/etc/abs/abs.conf</code> do této podoby:
+
Users can also access the [community] build files by editing <code>/etc/abs/abs.conf</code> as follows:
 
<pre>SUPFILES=(arch extra !unstable community)</pre>
 
<pre>SUPFILES=(arch extra !unstable community)</pre>
  
===Hlasování===
+
===Voting===
Jedna z nejsnažších aktivit pro všechny uživatele Archu je brouzdání po AURu, pomocí webového rozhraní a  hlasování pro jejich oblíbené balíčkyKterýkoli balíček může být přezvat Trusted userem - důvěryhodným uživatelem pro zahrnutí do [community], a počet hlasů je jedna z věcí, která se při tomto posuzuje - takže hlasujte pro své oblíbence !
+
One of the easiest activities for '''all''' Arch users is to browse the AUR and '''vote''' for their favorite packages using the online interfaceAll packages are eligible for adoption by a TU for inclusion in [community], and the vote count is one of the considerations in that process - so it is in everyone's interest to vote!
  
==Jak používat AUR==
+
==How to use the AUR==
  
===Jak na balíček z UNSUPPORTED===
+
===Using Packages from UNSUPPORTED===
Instalace balíčku z UNSUPPORTED sestává z těchto kroků :
+
To install a pkg from UNSUPPORTED you should follow these steps:
* vyhledání aplikace v AURu pomocí [http://aur.archlinux.org/packages.php vyhledávače] (v našem příkladě budeme chtít nainstalovat balíček "foo") a kliknutí na jméno balíčku ve výsledku vyhledáváníTímto se dostaneme na stránku s informacemi o balíčkuNa levé straně vidíme vedle sebe dva odkazy:
+
* locate the application in the AUR using the [http://aur.archlinux.org/packages.php search feature] (we'll use foo as an example pkg name here) and click the package name in the list of resultsThis will bring up the information page for that pkgOn the left side you can see two links side by side:
 
<pre> Tarball :: Files </pre>
 
<pre> Tarball :: Files </pre>
* Kliknutím na <code>Tarball</code> stáhneme nezbytné build soubory na diskV našem vzorovém případě se soubor jmenuje <code>foo.tar.gz</code>.
+
* Click <code>Tarball</code> to download the necessary build files to your hard driveThis should be called <code>foo.tar.gz</code>, for example, if it has been properly submitted.
* Zkopírujeme <code>foo.tar.gz</code> tarball do "build" adresáře, například <code>/var/abs/local</code> a rozbalíme jejTímto se vytvoří nový adresář, <code>/var/abs/local/foo</code> ve kterém jsou všechny soubory, potřebné k vytvoření požadovaného balíčku.
+
* Copy the <code>foo.tar.gz</code> tarball to a build directory e.g. <code>/var/abs/local</code> or <code>~/builds</code>, and extract itThis should create a new directory, <code>/var/abs/local/foo</code> or <code>~/builds/foo</code> that contains all the files necessary to build the pkg.
* '''DŮLEŽITÉ''': otevřete nově vytvořený adresář a pečlivě zkontrolujte PKGBUILD a ostatní .install soubory, zda neobsahují nebezpečný kód - pokud máte jakékoli pochybnosti, NEVYTVÁŘEJTE balíček a pošlete oznámení o problému na fórum nebo mailing list.
+
* '''IMPORTANT''': cd to the newly created directory and carefully check the PKGBUILD and any .install file for malicious commands - if in any doubt DO NOT build the pkg and seek advice on the forums or mailing list.
* Pro vytváření balíčků je vhodné využít <code>fakeroot</code> (čtěte níže), zdrojový soubor by měl být stažen, zkontrolován a vytvořen pomocí normálního uživatele, to umožní fakeroot.
+
* It is suggested you use <code>fakeroot</code> to build pkgs (see below), so having manually confirmed the integrity of the files simply run <code>makepkg</code> as a normal user in the build dir. The source files will be downloaded, verified and built as normal.
* makepkg vytvoří tarball pojmenovaný foo.pkg.tar.gz který se dá normálně instalovat pomocí pacmana, například:
+
* makepkg should create an tarball named foo.pkg.tar.gz that can be installed with pacman. e.g.
 
   <code>pacman -U foo.pkg.tar.gz</code>
 
   <code>pacman -U foo.pkg.tar.gz</code>
  
===Použití <code>fakeroot</code>===
+
'''Please note''': the above is a brief summary of the package building process. A visit to the [[ABS]] page will provide full details, and is highly recommended, particularly for first-time packagers.
<code>fakeroot</code> dává běžnému uživateli nezbytná oprávnení roota, pro vytvoření balíčku, avšak nedovolí modifikaci jiných souborů systému. Pokud se build proces pokusí o modifikaci souborů mimo build rozhraní, dojde k chybě a build selže - to je velmi užitečné pro ověřování kvality/bezpečnosti/integrity PKGBUILDů. Standardně <code>export USE_FAKEROOT="y"</code> najdete v
+
 
/etc/makepkg.conf takže pokud jste nenastavili jinak, je fakeroot již povolený.
+
===Using <code>fakeroot</code>===
 +
<code>fakeroot</code> simply allows a normal user the necessary root permissions to create pkgs in the build environment without being able to alter the wider system. If the build process attempts to alter files outside of the build environment then errors are produced and the build fails - this is very useful for checking the quality/safety/integrity of PKGBUILDs for distribution. By default <code>export USE_FAKEROOT="y"</code> is included in <code>/etc/makepkg.conf</code>, so unless you have switched it off it is already enabled.
  
===Odeslání balíčku do UNSUPPORTED===
+
===Submitting Packages to UNSUPPORTED===
Po příhlášení do webového rozhraní AURu, může uživatel [http://aur.archlinux.org/pkgsubmit.php odeslat] tarball (tar.gz) adresáře, se soubory pro vytvoření balíčku. Adresář by tedy měl obsahovat PKGBUILD, nebo nějaký .install soubor, patche, atd. ROZHODNĚ NE binárky ! Příklad jak takovýto adresář může vypadat najdete v /var/abs.
+
After logging in to the AUR web interface, a user can [http://aur.archlinux.org/pkgsubmit.php submit] a tarball (tar.gz) of a directory containing build files for a package. The directory inside the tarball should contain a PKGBUILD, any .install files, patches, etc (ABSOLUTELY no binaries). Examples of what such a directory should look like can be seen inside /var/abs.  
  
Když odesíláte balíček, dodržujte následující pravidla:
+
When submitting a package, observe the following rules:  
* Zkontrolujte [extra], [current], [unstable], UNSUPPORTED, a [community] zda-li už tam balíček není. Pokud ho v jakékoli formě v některých z repozitářů najdete, NEODESÍLEJTE JEJ (pokud je stávající balíček poškozen, nebo chybí nějaká vlastnost, zašlete bug-report do [http://bugs.archlinux.org/ FlySpray]).
+
* Check [extra], [current], [unstable], UNSUPPORTED, 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]).
* Zkontrolujte pečlivě, zda to co posíláte je správně. Všichni přispívající si musí přečíst a dodržovat [[Arch Packaging Standards]] když píší PKGBUILDyTo je podstatné pro hladký běh a celkovou úspěšnost AURuVytvářením špatných PKGBUILDů plýtváte časem uživatelů a žádnou slávu či respekt si takto neuděláte.
+
* Verify carefully that what you are uploading is correct. All contributors must read and adhere to the [[Arch Packaging Standards]] when writing PKGBUILDsThis is essential to the smooth running and general success of the AURRemember you are not going to earn any credit or respect from your peers by wasting their time with a bad PKGBUILD.
* Balíčky obsahující binárky nebo jsou velice mizerně napsány, jsou mazány bez varování.
+
* Packages that contain binaries or that are very poorly written may be deleted without warning.
* Pokud jste si balíčkem jakkoli nejistí, odešlete nejdříve PKGBUILD do AUR Mailing List nebo AUR fóra, kde se na něj podívají ostatní, opraví se chyby a může se přidat do AURu.
+
* If you are unsure about the package (or the build/submission process) in any way, submit the PKGBUILD to the AUR Mailing List or the AUR boards on the forum for public review before adding it to the AUR.
 +
* 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.
 +
* Gain some experience before submitting packages. Build a few packages to learn the process and then submit.
  
===Údržba balíčků v UNSUPPORTED===
+
===Maintaining Packages in UNSUPPORTED===
* Kontrolujte komentáře ostatních uživatelů,snažte se zabudovat vylepšení které vám navrhují; učíte se tím nové věci!
+
* Check for feedback and comments from other users and try to incorporate any improvements they suggest; consider it a learning process!
* Prosím po odeslání NEZAPOMÍNEJTE na váš balíček ! Pokud je v UNSUPPORTED, je uživatelova práce kontrolovat updaty balíčku a provádět následné úpravy PKGBUILDu.
+
* 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.
*Pokud nechcete pokračovat v udržování balíčku, <code>disown - zřekněte se</code> balíčku použitím webového rozhraní AURu a/nebo odešlete zprávu do AUR Mailing List.
+
* If you do not want to continue to maintain the package for some reason, <code>disown</code> the pkg using the AUR web interface and/or post a message to the AUR Mailing List.
  
==AUR-DMS (scripty pro stahování a správu)==
+
==AUR-DMS (downloading and management scripts)==
  
=== Seznam AUR-DMS ===
+
=== List of AUR-DMS ===
#aur-sync (Perl) - pro stáhnutí všech  AUR tarballs
+
#aur-sync (Perl) - for downloading all AUR tarballs
 
#aur-install (bash)
 
#aur-install (bash)
#aurup (bash) - pro upload balíčku do AURu
+
#aurup (bash) - for uploading packages to AUR
 
#aurscripts (bash):
 
#aurscripts (bash):
##aurcreate - vytvoří čístý balík připravený pro upload do AURu
+
##aurcreate - create clean packages prepared for upload to AUR
##aurdownload - stáhnutí a rozbalení balíčku z AURu
+
##aurdownload - download and extract packages from AUR
##aurupdate - updatování balíčku a md5sum
+
##aurupdate - update package versions (if specified) and md5sums
#autoaur (bash, závisí na aurscripts, automaticky updatuje všechny vaše balíčky instalované z AURu)  
+
#autoaur (bash, depends on aurscripts, will automatically update all of your packages installed from AUR)  
#yaourt (bash, wrapper pro srcpac s podporou AURu )
+
#yaourt (bash, a wrapper for srcpac with aur support and more)
#[[aurbuild]] (Python, nejvíce hlasovaný)
+
#[[aurbuild]] (Python, most voted)
#[[aurbuild | qpkg]] (Python, pracuje taky s ne-AUR-aplikacemi, druhý nejhlasovanější)  
+
#[[aurbuild | qpkg]] (Python, works with non-AUR-apps too, second voted, but most advanced?)
 +
#autarchy (bash) - to create a tarball including all files required by the PKGBUILD (better than aurcreate)
 
   
 
   
  
Všechny z těchto skriptů najdete v  UNSUPPORTED.
+
All of these scripts can be found in UNSUPPORTED.

Revision as of 03:13, 25 April 2007

Template:Article summary start Template:Article summary text Template:Article summary heading Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary end

Purpose

The ArchLinux User-community Repository (AUR) is a community driven repository for Arch users. This document shows the normal user how to access AUR and work with it.

The User and the AUR

The normal user plays an essential role in the AUR and without the support, involvement and contribution of the wider user community the AUR cannot fulfill its potential. The lifecycle of an AUR package starts and ends with the user and requires the user to contribute in several ways.

Sharing PKGBUILDs in UNSUPPORTED

Users can share PKGBUILDs 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. A comments facility is provided that allows users to feedback improvements and suggestions to the PKGBUILD contributor. A new flagging system has been introduced that allows TUs to mark pkgs as checked for malicious code. However, these PKGBUILDs are completely unofficial and have not been thoroughly vetted, so they should be used at your own risk.

There is as yet no official mechanism for downloading build material from UNSUPPORTED but a few scripts can be found on the wiki.

[community]

The [community] repo is a supplement to the [extra] and [current] repositories where the most popular packages from UNSUPPORTED are maintained by the Trusted Users group on behalf of the users. [community], unlike UNSUPPORTED, 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 [current] or [extra] repositories as the developers consider them crucial to the distribution.

Users can access the AUR [community] repo by adding/uncommenting this line in their pacman.conf file:

Include = /etc/pacman.d/community

If /etc/pacman.d/community does not exist then it should be created and contain the following:

[community]
Server = ftp://ftp.archlinux.org/community/os/i686/

Users can also access the [community] build files by editing /etc/abs/abs.conf as follows:

SUPFILES=(arch extra !unstable community)

Voting

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 - so it is in everyone's interest to vote!

How to use the AUR

Using Packages from UNSUPPORTED

To install a pkg from UNSUPPORTED you should follow these steps:

  • locate the application in the AUR using the search feature (we'll use foo as an example pkg name here) and click the package name in the list of results. This will bring up the information page for that pkg. On the left side you can see two links side by side:
 Tarball :: Files 
  • Click Tarball to download the necessary build files to your hard drive. This should be called foo.tar.gz, for example, if it has been properly submitted.
  • Copy the foo.tar.gz tarball to a build directory e.g. /var/abs/local or ~/builds, and extract it. This should create a new directory, /var/abs/local/foo or ~/builds/foo that contains all the files necessary to build the pkg.
  • IMPORTANT: cd to the newly created directory and carefully check the PKGBUILD and any .install file for malicious commands - if in any doubt DO NOT build the pkg and seek advice on the forums or mailing list.
  • It is suggested you use fakeroot to build pkgs (see below), so having manually confirmed the integrity of the files simply run makepkg as a normal user in the build dir. The source files will be downloaded, verified and built as normal.
  • makepkg should create an tarball named foo.pkg.tar.gz that can be installed with pacman. e.g.
 pacman -U foo.pkg.tar.gz

Please note: the above is a brief summary of the package building process. A visit to the ABS page will provide full details, and is highly recommended, particularly for first-time packagers.

Using fakeroot

fakeroot simply allows a normal user the necessary root permissions to create pkgs in the build environment without being able to alter the wider system. If the build process attempts to alter files outside of the build environment then errors are produced and the build fails - this is very useful for checking the quality/safety/integrity of PKGBUILDs for distribution. By default export USE_FAKEROOT="y" is included in /etc/makepkg.conf, so unless you have switched it off it is already enabled.

Submitting Packages to UNSUPPORTED

After logging in to the AUR web interface, a user can submit a tarball (tar.gz) of a directory containing build files for a package. The directory inside the tarball should contain a PKGBUILD, any .install files, patches, etc (ABSOLUTELY no binaries). Examples of what such a directory should look like can be seen inside /var/abs.

When submitting a package, observe the following rules:

  • Check [extra], [current], [unstable], UNSUPPORTED, 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 FlySpray).
  • 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.
  • Packages that contain binaries or that are very poorly written may be deleted without warning.
  • If you are unsure about the package (or the build/submission process) in any way, submit the PKGBUILD to the AUR Mailing List or the AUR boards on the forum for public review before adding it to the AUR.
  • 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.
  • Gain some experience before submitting packages. Build a few packages to learn the process and then submit.

Maintaining Packages in UNSUPPORTED

  • Check for feedback and comments from other users and try to incorporate any improvements they suggest; consider it a learning process!
  • 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.
  • If you do not want to continue to maintain the package for some reason, disown the pkg using the AUR web interface and/or post a message to the AUR Mailing List.

AUR-DMS (downloading and management scripts)

List of AUR-DMS

  1. aur-sync (Perl) - for downloading all AUR tarballs
  2. aur-install (bash)
  3. aurup (bash) - for uploading packages to AUR
  4. aurscripts (bash):
    1. aurcreate - create clean packages prepared for upload to AUR
    2. aurdownload - download and extract packages from AUR
    3. aurupdate - update package versions (if specified) and md5sums
  5. autoaur (bash, depends on aurscripts, will automatically update all of your packages installed from AUR)
  6. yaourt (bash, a wrapper for srcpac with aur support and more)
  7. aurbuild (Python, most voted)
  8. qpkg (Python, works with non-AUR-apps too, second voted, but most advanced?)
  9. autarchy (bash) - to create a tarball including all files required by the PKGBUILD (better than aurcreate)


All of these scripts can be found in UNSUPPORTED.