Difference between revisions of "Talk:Arch packaging standards"

From ArchWiki
Jump to: navigation, search
(Asking for details on adding system users and choosing their UID)
(17 intermediate revisions by 8 users not shown)
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)
 
 
 
==Suggestions==
 
==Suggestions==
* Shouldn't we suggest using SHA1 hash and not the already broken one (MD5)? [[User:Tomato|Tomato]] 15:47, 25 August 2010 (EDT)
+
Shouldn't we suggest using SHA1 hash and not the already broken one (MD5)? --[[User:Tomato|Tomato]] 15:47, 25 August 2010 (EDT)
* The section about custom variables ("_blah=blah") is misleading. Nowadays custom variables are a common practice since they can simplify and/or modularize the PKGBUILD a great deal. The parts where they are recommended to not to be used should be modified. --[[User:Det|Det]] 13:13, 14 September 2010 (EDT)
+
* I've recently found that packages that used bundles libraries tend to segfault. Should we suggest the removal of bundled libraries and instead use system libraries?
+
 
+
==Proposed revision (shouldn't this already be added...?)==
+
====Directories====
+
Is something like /usr/include/{pkg} allowed?
+
Is something like /usr/lib/{pkg}-{versionnumber} allowed? Same for /usr/share?
+
 
+
====Package Etiquette====
+
 
+
 
+
...<br>
+
file, or alternatively by exporting the PACKAGER environment variable before building packages with makepkg:
+
<b>$</b> export PACKAGER="John Doe@<b>email</b>"
+
 
+
====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====
+
 
+
 
+
*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====
+
----
 +
I've recently found that packages that used bundles libraries tend to segfault. Should we suggest the removal of bundled libraries and instead use system libraries? --[[User:Gadget3000|Gadget3000]] ([[User_talk:Gadget3000|talk]]) 02:13, 6 August 2011 (UTC)
  
<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>
+
----
 +
Some packages require the addition of system users. For them to be ignored by things such as lightdm, tthey have to be in the sub-1000 UID space. Looking at packages in ABS, these users are simply added with an <tt>useradd -u ...</tt>. However, there is no guideline or authoritative list that I can find which lists which UID is used for what, which is free, or how to register a UID for a specific system user. It would be nice to see a section about it here. --[[User:OlivierMehani|OlivierMehani]] 19:31, 13 October 2011 (EDT)
  
- I see no problem in repeating it here as regularly there are users not following that rule. [[User:Snowman|Snowman]]
+
:See [[DeveloperWiki:UID_/_GID_Database]].
  
 +
:I thinks it's a bit too specific to be listed here. --[[User:Snowman|Snowman]] 20:45, 13 October 2011 (EDT)
  
 +
----
 +
How about adding https://wiki.archlinux.org/index.php/Web_application_package_guidelines to the list? --[[User:Trontonic|Trontonic]] 11:18, 29 February 2012 (EST)
  
...<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...
+
Something more should be said about .install files. Mention that there are also examples in {{ic|/usr/share/pacman}} but it also needs some explanation on how they work. --[[User:Mauro2|Mauro2]] ([[User_talk:Mauro2|talk]]) 05:30, 15 October 2012 (UTC)
  
===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...
+
Please remove the {{ic|cd "$srcdir..."}} no-op from the examples on the page. See: https://bugs.archlinux.org/task/34314 --[[User:Graysky|Graysky]] ([[User talk:Graysky|talk]]) 20:55, 14 March 2013 (UTC)
  
===Package Releases===
+
----
Package releases are specific to Arch Linux packages. These allow users to differentiate between newer and older package builds. When a new package version is first released, the release count starts at 1. Then as fixes and optimizations are made, the package will be re-released to the Arch Linux public and the release number will increment. When a new version comes out, the release count resets to 1. Package release tags follow the same naming restrictions as version tags.
+
{{ic|makepkg -g}} has been superseded by {{ic|updpkgsums}} since [http://allanmcrae.com/2013/04/pacman-4-1-released/ pacman 4.1], which doesn't require redirection operators ({{ic|>>}}) or removing the earlier md5sums (with something like {{ic|sed -i "/md5sums/,/)/d" PKGBUILD}}). --[[User:Det|Det]] ([[User talk:Det|talk]]) 12:16, 7 April 2013 (UTC)
  
Examples of when to change the package release number:
+
== /usr/sbin -> /usr/bin merge ==
  
* Changing pkgdesc -> do NOT bump (unless it's severely wrong or something)
+
The Directories section needs to be updated to reflect the recent /bin, /sbin, /usr/sbin -> /usr/bin merge:
* Changing deps -> bump
+
* The /usr/sbin line should be removed and the description of the /usr/bin line should be changed to all binaries or something similar.
* Changing makedeps -> do NOT bump, ever
+
* /bin and /sbin should be added to the "Package should not contain following directories" list.
* Changing optdeps -> do NOT bump (unless very important functionality provided)
+
[[User:Kyrias|Kyrias]] ([[User talk:Kyrias|talk]]) 15:00, 6 June 2013 (UTC)
* Changing build stuff (i.e changing PKGBUILD but no change to resulting binary) -> do NOT bump
+
  
(based on aur-general discussion: http://mailman.archlinux.org/pipermail/aur-general/2011-April/014247.html)
 
  
===Adding system users===
+
== Punctuation in PKGBUILD ==
 +
What is the official guidance regarding ending a pkgdesc in a period or using commas and English prose punctuation in general?
  
Some packages require the addition of system users. For them to be ignored by things such as lightdm, tthey have to be in the sub-1000 UID space. Looking at packages in ABS, these users are simply added with an <tt>useradd -u ...</tt>. However, there is no guideline or authoritative list that I can find which lists which UID is used for what, which is free, or how to register a UID for a specific system user. It would be nice to see a section about it here.
+
[[https://bbs.archlinux.org/viewtopic.php?pid=1288063 Link]] to discussion thread.
  
--[[User:OlivierMehani|OlivierMehani]] 19:31, 13 October 2011 (EDT)
+
[[User:Graysky|Graysky]] ([[User talk:Graysky|talk]]) 15:17, 14 June 2013 (UTC)

Revision as of 15:30, 14 June 2013

Suggestions

Shouldn't we suggest using SHA1 hash and not the already broken one (MD5)? --Tomato 15:47, 25 August 2010 (EDT)


I've recently found that packages that used bundles libraries tend to segfault. Should we suggest the removal of bundled libraries and instead use system libraries? --Gadget3000 (talk) 02:13, 6 August 2011 (UTC)


Some packages require the addition of system users. For them to be ignored by things such as lightdm, tthey have to be in the sub-1000 UID space. Looking at packages in ABS, these users are simply added with an useradd -u .... However, there is no guideline or authoritative list that I can find which lists which UID is used for what, which is free, or how to register a UID for a specific system user. It would be nice to see a section about it here. --OlivierMehani 19:31, 13 October 2011 (EDT)

See DeveloperWiki:UID_/_GID_Database.
I thinks it's a bit too specific to be listed here. --Snowman 20:45, 13 October 2011 (EDT)

How about adding https://wiki.archlinux.org/index.php/Web_application_package_guidelines to the list? --Trontonic 11:18, 29 February 2012 (EST)


Something more should be said about .install files. Mention that there are also examples in /usr/share/pacman but it also needs some explanation on how they work. --Mauro2 (talk) 05:30, 15 October 2012 (UTC)


Please remove the cd "$srcdir..." no-op from the examples on the page. See: https://bugs.archlinux.org/task/34314 --Graysky (talk) 20:55, 14 March 2013 (UTC)


makepkg -g has been superseded by updpkgsums since pacman 4.1, which doesn't require redirection operators (>>) or removing the earlier md5sums (with something like sed -i "/md5sums/,/)/d" PKGBUILD). --Det (talk) 12:16, 7 April 2013 (UTC)

/usr/sbin -> /usr/bin merge

The Directories section needs to be updated to reflect the recent /bin, /sbin, /usr/sbin -> /usr/bin merge:

  • The /usr/sbin line should be removed and the description of the /usr/bin line should be changed to all binaries or something similar.
  • /bin and /sbin should be added to the "Package should not contain following directories" list.

Kyrias (talk) 15:00, 6 June 2013 (UTC)


Punctuation in PKGBUILD

What is the official guidance regarding ending a pkgdesc in a period or using commas and English prose punctuation in general?

[Link] to discussion thread.

Graysky (talk) 15:17, 14 June 2013 (UTC)