Difference between revisions of "Talk:Arch packaging standards"

From ArchWiki
Jump to: navigation, search
(proposal)
Line 1: Line 1:
 +
==Comments==
 
What encoding (ascii ? UTF-8 ?) should be used for text files in submitted packages ? --[[User:Airbag|Airbag]] 13:43, 15 August 2006 (PDT)
 
What encoding (ascii ? UTF-8 ?) should be used for text files in submitted packages ? --[[User:Airbag|Airbag]] 13:43, 15 August 2006 (PDT)
  
 
+
----
 
I hope you didn't change my addition because you thought I was bullshitting the name of the document and section number I got that from, because it ''was'' quoted straight from a developer's documentation of that name, and from that section. Righto, carry on, just curious... --[[User:Neotuli|Neotuli]] 09:40, 15 Aug 2005 (EDT)
 
I hope you didn't change my addition because you thought I was bullshitting the name of the document and section number I got that from, because it ''was'' quoted straight from a developer's documentation of that name, and from that section. Righto, carry on, just curious... --[[User:Neotuli|Neotuli]] 09:40, 15 Aug 2005 (EDT)
  
Shouldn't the License section be updated to reflect that the licensing system is in place and ready for users? --[[User:WillySilly|WillySilly]] 14:52, 12 Apr 2006 (PST)
+
----
* Also, should the MIT license fall under the BSD exception? --[[User:WillySilly|WillySilly]]
+
Added PKGBUILD prototype from CVS. Apparently many people don't even know there's a template hence the varying substandard pkgbuilds being submitted to the AUR. Also moved the etiquette subsection to the top since it contains more important information. [[User:Tardo|tardo]] 22:32, 23 June 2007 (EDT)
 +
 
 +
----
 +
The only section currently NOT included in the [[Building Packages in Arch Linux]] entry is everything below 2. Additional Guidelines. That can easily be merged in. [[User:Rcoyner|Rcoyner]] 14:28, 26 Sept 2008 (EDT)
 +
 
 +
==Suggestions==
 +
Shouldn't the License section be updated to reflect that the licensing system is in place and ready for users? Also, should the MIT license fall under the BSD exception? --[[User:WillySilly|WillySilly]] 14:52, 12 Apr 2006 (PST)
 +
 
 +
----
 +
[[Arch_Packaging Standards#PKGBUILD Prototype]]
 +
Shouldn't the url be prepended to the package name? Does not work for me without.--[[User:Tantalum|Tantalum]] 17:17, 24 September 2009 (EDT)
 +
 
 +
==Proposed revision==
 +
A couple of grammar problems/formality (and one occassion where a ''command shouldn't be used as root''):
 +
__NOTOC__
 +
*Changes in bold, subs. in strike.
 +
 
 +
*Ignore the rest of the markup/heading changes.
 +
 
 +
Also, no abbrev. suggested (it's=it is), and less bold fonts.
 +
===Packaging Standards===
 +
The submitted PKGBUILDs <b>must not</b> build applications already in any of the official binary repositories under any circumstances. Exception to this strict rule may only be packages having extra features enabled and/or patches in compar<b>ison with the</b> official ones. In such <s>an</s> occasion, the pkgname array should be different <s>to express that difference</s>.
 +
 
 +
When building packages for <b>the AUR</b>, <s>you should </s> adhere to the package guidelines below, especially if <s>you would like</s> <b>the intention is</b> to contribute <b>a</b> <s>your new</s> package to Arch Linux.
 +
 
 +
...
 +
====PKGBUILD Prototype====
 +
# Contributor: <s>Your</s> Name <b>email</b> at domain dot com> (disguise <s>your</s> email...
 +
 
 +
====Package Etiquette====
 +
 
 +
...<br>
 +
Do not introduce new variables into <s>your</s> PKGBUILD build scripts ...
 +
 
 +
The AUR cannot detect the use of custom variables and so canno ... This can most often be seen in the source array<b>, e.g.:</b>
 +
 
 +
...<br>
 +
file, or alternatively by exporting the PACKAGER environment variable before building packages with makepkg:
 +
<b>$</b> export PACKAGER="John Doe@<b>email</b>"
 +
 
 +
...<br>
 +
The above example is taken from the wine package in extra. The optdepends information will automatically be printed out on installation/upgrade<b>.</b><s> from pacman 3.2.1, so one should not keep this kind of information in .install files any longer.</s>
 +
 
 +
...
 +
====Package Naming====
 +
 
 +
...<br>
 +
Version tags may not include hyphens<b>.</b> Letters, numbers, and periods only.
 +
 
 +
...<br>
 +
the package will be re-released to the AL <b>(???)</b> public and
 +
 
 +
...
 +
====Directories====
 +
 
 +
...<br>
 +
Use /etc/{pkgname}/  where {pkgname} is the name of <b>the</b> package
 +
 
 +
...
 +
====Makepkg Duties====
 +
 
 +
...<br>
 +
When makepkg <b>is used</b> to build a package <s>for you</s>, it does the following automatically:
 +
 
 +
...
 +
====Architectures====
 +
 
 +
...<br>
 +
depending on which architectures it can be built on. <s>You can also use</s> <b>State</b> 'any' for architecture independent packages.
 +
 
 +
...
 +
====Licenses====
 +
 
 +
...<br>
 +
The license array is being implemented little by little in the official repos, and it <b>should</b> be used in <b>AUR</b> packages as well. <s>You can </s> <b>U</b>se it as follows:
 +
 
 +
*If the source tarball does <b>not</b> contain the license details and the license is only displayed on a website for example, then <s>you need to</s> copy the licen...
 +
 
 +
*Add 'custom' to the licenses array.  Optionally, <s>you can</s> replace 'custom' with 'custom:"name of license"'.
 +
 
 +
...<br>
 +
When pacman gets the ability to filter on licenses (<b>i.e., make pacman download only GPL and BSD licensed software"</b>) dual (or more) licenses will be treated by pacman using ''''or'''', rather than ''''and'''' logic, thus pacman will consider ...
 +
 
 +
====Submitting Packages to the AUR====
 +
 
 +
<s>The submitted PKGBUILDs MUST NOT build applications already in any of the official binary repositories under any circumstances. Exception to this strict rule may only be packages having extra features enabled and/or patches in compare to the official ones. In such an occasion the pkgname array should be different to express that difference.</s> <i>This gets repeated word for word in [[#Packaging Standards]]</i>
 +
 
 +
...<br>
 +
To ensure the security of pkgs submitted to the AUR please ensure that <b>the md5sum values</b> have <b>been</b> correctly filled.  The md5sum's can b...
  
 +
...<br>
 +
Please add a comment line to the top of <b>the</b> PKGBUILD file that follows this format. Remembe...
  
* Added PKGBUILD prototype from CVS. Apparently many people don't even know there's a template hence the varying substandard pkgbuilds being submitted to the AUR. Also moved the etiquette subsection to the top since it contains more important information. [[User:Tardo|tardo]] 22:32, 23 June 2007 (EDT)
+
...
 +
# Contributor: <s>Your</s> Name <address at domain dot com></pre>
 +
 +
recommend the use of the namcap <b>package</b>, written by Jason Chu (jason@archlinux.org), to analyze the sanity of <s>your</s> packages. namcap will <s>tell you</s> <b>warn</b> about bad permissions, missing dependencies, un-needed dependencies, and other common mistakes. <s>You can install the namcap package</s> by...
  
* The only section currently NOT included in the [[Building Packages in Arch Linux]] entry is everything below 2. Additional Guidelines. That can easily be merged in. [[User:Rcoyner|Rcoyner]] 14:28, 26 Sept 2008 (EDT)
+
...<br>
 +
Don't use replaces in <b>a</b> PKGBUILD unless <b>the package is to be renamed</b>, for example when ''Ethereal'' became ''Wireshark''. If <b>the package is</b> an alternate version of an already existing package, use conflicts (and provides if that package is required by others). The main difference is: after syncing (-Sy) pacman immediately wants to replace an installed, 'offending' package upon encountering a package with the matching replaces anywhere in its repositories; conflicts on the other hand is only evaluated when actually installing the package, which is <b>usually</b> the desired behavior because <b>it is less invasive.</b>
  
 +
...<br>
 +
<b>One</b> can easily build a tarball containing all the required files by using makepkg --source. This
 +
makes a tarball named $pkgname-$pkgver-$pkgrel.src.tar.gz, which <s>you</s> can then <b>be</b> upload<b>ed</b> to the AUR.
  
[[Arch_Packaging_Standards#PKGBUILD_Prototype|PKGBUILD_Prototype]]
+
...
* Shouldn't the url be prepended to the package name? Does not work for me without.--[[User:Tantalum|Tantalum]] 17:17, 24 September 2009 (EDT)
+
===Additional Guidelines===
 +
Be sure to read the above guidelines first'''--''' important points are listed on this page that will not be repeated in the following guideline pages...

Revision as of 07:22, 13 November 2009

Comments

What encoding (ascii ? UTF-8 ?) should be used for text files in submitted packages ? --Airbag 13:43, 15 August 2006 (PDT)


I hope you didn't change my addition because you thought I was bullshitting the name of the document and section number I got that from, because it was quoted straight from a developer's documentation of that name, and from that section. Righto, carry on, just curious... --Neotuli 09:40, 15 Aug 2005 (EDT)


Added PKGBUILD prototype from CVS. Apparently many people don't even know there's a template hence the varying substandard pkgbuilds being submitted to the AUR. Also moved the etiquette subsection to the top since it contains more important information. tardo 22:32, 23 June 2007 (EDT)


The only section currently NOT included in the Building Packages in Arch Linux entry is everything below 2. Additional Guidelines. That can easily be merged in. Rcoyner 14:28, 26 Sept 2008 (EDT)

Suggestions

Shouldn't the License section be updated to reflect that the licensing system is in place and ready for users? Also, should the MIT license fall under the BSD exception? --WillySilly 14:52, 12 Apr 2006 (PST)


Arch_Packaging Standards#PKGBUILD Prototype Shouldn't the url be prepended to the package name? Does not work for me without.--Tantalum 17:17, 24 September 2009 (EDT)

Proposed revision

A couple of grammar problems/formality (and one occassion where a command shouldn't be used as root):

  • Changes in bold, subs. in strike.
  • Ignore the rest of the markup/heading changes.

Also, no abbrev. suggested (it's=it is), and less bold fonts.

Packaging Standards

The submitted PKGBUILDs must not build applications already in any of the official binary repositories under any circumstances. Exception to this strict rule may only be packages having extra features enabled and/or patches in comparison with the official ones. In such an occasion, the pkgname array should be different to express that difference.

When building packages for the AUR, you should adhere to the package guidelines below, especially if you would like the intention is to contribute a your new package to Arch Linux.

...

PKGBUILD Prototype

# Contributor: Your Name email at domain dot com> (disguise your email...

Package Etiquette

...
Do not introduce new variables into your PKGBUILD build scripts ...

The AUR cannot detect the use of custom variables and so canno ... This can most often be seen in the source array, e.g.:

...
file, or alternatively by exporting the PACKAGER environment variable before building packages with makepkg:

$ export PACKAGER="John Doe@email"

...
The above example is taken from the wine package in extra. The optdepends information will automatically be printed out on installation/upgrade. from pacman 3.2.1, so one should not keep this kind of information in .install files any longer.

...

Package Naming

...
Version tags may not include hyphens. Letters, numbers, and periods only.

...
the package will be re-released to the AL (???) public and

...

Directories

...
Use /etc/{pkgname}/ where {pkgname} is the name of the package

...

Makepkg Duties

...
When makepkg is used to build a package for you, it does the following automatically:

...

Architectures

...
depending on which architectures it can be built on. You can also use State 'any' for architecture independent packages.

...

Licenses

...
The license array is being implemented little by little in the official repos, and it should be used in AUR packages as well. You can Use it as follows:

  • If the source tarball does not contain the license details and the license is only displayed on a website for example, then you need to copy the licen...
  • Add 'custom' to the licenses array. Optionally, you can replace 'custom' with 'custom:"name of license"'.

...
When pacman gets the ability to filter on licenses (i.e., make pacman download only GPL and BSD licensed software") dual (or more) licenses will be treated by pacman using 'or', rather than 'and' logic, thus pacman will consider ...

Submitting Packages to the AUR

The submitted PKGBUILDs MUST NOT build applications already in any of the official binary repositories under any circumstances. Exception to this strict rule may only be packages having extra features enabled and/or patches in compare to the official ones. In such an occasion the pkgname array should be different to express that difference. This gets repeated word for word in #Packaging Standards

...
To ensure the security of pkgs submitted to the AUR please ensure that the md5sum values have been correctly filled. The md5sum's can b...

...
Please add a comment line to the top of the PKGBUILD file that follows this format. Remembe...

...

# Contributor: Your Name <address at domain dot com></pre>

recommend the use of the namcap package, written by Jason Chu (jason@archlinux.org), to analyze the sanity of your packages. namcap will tell you warn about bad permissions, missing dependencies, un-needed dependencies, and other common mistakes. You can install the namcap package by...

...
Don't use replaces in a PKGBUILD unless the package is to be renamed, for example when Ethereal became Wireshark. If the package is an alternate version of an already existing package, use conflicts (and provides if that package is required by others). The main difference is: after syncing (-Sy) pacman immediately wants to replace an installed, 'offending' package upon encountering a package with the matching replaces anywhere in its repositories; conflicts on the other hand is only evaluated when actually installing the package, which is usually the desired behavior because it is less invasive.

...
One can easily build a tarball containing all the required files by using makepkg --source. This makes a tarball named $pkgname-$pkgver-$pkgrel.src.tar.gz, which you can then be uploaded to the AUR.

...

Additional Guidelines

Be sure to read the above guidelines first-- important points are listed on this page that will not be repeated in the following guideline pages...