User:Ganwell/mistakes: Difference between revisions

From Alpine Linux
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
= APKBUILD mistakes =
= Constrib mistakes =


These are just my note. Please read the official guidelines.
! These are just my notes. Please read the official guidelines.


== Style ==
== Style ==


1. Use tabs
* Use tabs


2. Order of functions: prepare, build, check, package (the order they are
* Order of functions: prepare, build, check, package (the order they are executed)
executed)


3. No empty variables
* No empty variables


4. Set Contributor and Maintainer
* Set Contributor and Maintainer


5. Commit message repo/package: X
* Commit message repo/package: X
** X: new apk
** X: upgrade to Y
** X: [other changes]


X: new apk
* Shell: quote variables


X: upgrade to Y
* Rebase your changes
 
X: [other changes]
 
6. Shell: quote variables
 
7. Rebase your changes


== Packages ==
== Packages ==


1. Set pkgrel to 0 when when pkgver is increased
* Set pkgrel to 0 when when pkgver is increased
 
2. Else bump pkgrel to trigger rebuild


3. Only add very common or required dependencies
* Else bump pkgrel to trigger rebuild


4. Use post-install rarely, don't use it for anything that can be done during
* Only add very common or required dependencies
  package()


5. New packages go to testing first
* Use post-install rarely, don't use it for anything that can be done during package()


6. Use spdx license names: https://spdx.org/licenses/
* New packages go to testing first


7. main pacakges may only depend on main packages
* Use spdx license names: https://spdx.org/licenses/


  community packages may only depend on main/community package
* Dependencies
** main pacakges may only depend on main packages
** community packages may only depend on main/community package


== Testing ==
== Testing ==


1. Test APKBUILD against edge, not current
* Test APKBUILD against edge, not current


2. Make sure the software actually works
* Make sure the software actually works


== Build ==
== Build ==


1. No downloads during build (is already prevented)
* No downloads during build (is already prevented)


== Languages ==
== Languages ==


1. Don't use language-package managers (npm, pip, cabal): the build has to be
* Don't use language-package managers (npm, pip, cabal): the build has to be reproducible
  reproducible

Latest revision as of 21:44, 5 September 2018

Constrib mistakes

! These are just my notes. Please read the official guidelines.

Style

  • Use tabs
  • Order of functions: prepare, build, check, package (the order they are executed)
  • No empty variables
  • Set Contributor and Maintainer
  • Commit message repo/package: X
    • X: new apk
    • X: upgrade to Y
    • X: [other changes]
  • Shell: quote variables
  • Rebase your changes

Packages

  • Set pkgrel to 0 when when pkgver is increased
  • Else bump pkgrel to trigger rebuild
  • Only add very common or required dependencies
  • Use post-install rarely, don't use it for anything that can be done during package()
  • New packages go to testing first
  • Dependencies
    • main pacakges may only depend on main packages
    • community packages may only depend on main/community package

Testing

  • Test APKBUILD against edge, not current
  • Make sure the software actually works

Build

  • No downloads during build (is already prevented)

Languages

  • Don't use language-package managers (npm, pip, cabal): the build has to be reproducible