User:Ganwell/mistakes: Difference between revisions

From Alpine Linux
(Created page with "# APKBUILD mistakes # ## Style ## 1. Use tabs 2. Order of functions: prepare, build, check, package (the order they are executed) 3. No empty variables 4. Set Contribu...")
 
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
# APKBUILD mistakes #
= Constrib mistakes =


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


1. Use tabs
== Style ==


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


3. No empty variables
* Order of functions: prepare, build, check, package (the order they are executed)


4. Set Contributor and Maintainer
* No empty variables


5. Commit message repo/package: X
* Set Contributor and Maintainer


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


X: upgrade to Y
* Shell: quote variables


X: [other changes]
* Rebase your changes


6. Shell: quote variables
== Packages ==


7. Rebase your changes
* Set pkgrel to 0 when when pkgver is increased


## Packages ##
* Else bump pkgrel to trigger rebuild


1. Set pkgrel to 0 when when pkgver is increased
* Only add very common or required dependencies


2. Else bump pkgrel to trigger rebuild
* Use post-install rarely, don't use it for anything that can be done during package()


3. Only add very common or required dependencies
* New packages go to testing first


4. Use post-install rarely, don't use it for anything that can be done during
* Use spdx license names: https://spdx.org/licenses/
  package()


5. New packages go to testing first
* Dependencies
** main pacakges may only depend on main packages
** community packages may only depend on main/community package


6. Use spdx license names: https://spdx.org/licenses/
== Testing ==


7. main pacakges may only depend on main packages
* Test APKBUILD against edge, not current


  community packages may only depend on main/community package
* Make sure the software actually works


## Testing ##
== Build ==


1. Test APKBUILD against edge, not current
* No downloads during build (is already prevented)


2. Make sure the software actually works
== Languages ==


## Build ##
* Don't use language-package managers (npm, pip, cabal): the build has to be reproducible
 
1. No downloads during build (is already prevented)
 
## Languages
 
1. Don't use language-package managers (npm, pip, cabal): the build has to be
  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