From Mageia wiki
Jump to: navigation, search
Drakconf multiflag.png
Other languages

English ; Francais


This is a small list of Mageia-specific considerations for writing spec files. Sort of an FAQ:

  1. licensing: check licensing very carefully (on web AND on a source file) and doublecheck with the valid Mageia licenses : Fedora licensing page
  2. comments: read the comments in the spec file, there's a reason those are there, the author probably had something specific in mind.
  3. naming: if it's not in a specific policy, check how similars are named.
  4. %changelog: we do not put a changelog in the spec file; there is another way to keep history, except when importing new srpm.
  5. importing: before importing, check if it's already imported.
  6. filetriggers: mageia has filetriggers, don't put needless stuff in %post.
  7. updating: updating a package does odd things with %pre and %post.
  8. Source: try to have urls in sources as much as possible. if only for easier updating.
  9. repackaging: try to avoid repackaging upstream stuff.
  10. versioning: we use %mkrel for release versioning; when updating, please doublecheck how release numbers are increased.
  11. macros: check what macros you have (rpm --showrc lists them; rpm --eval <macro> evaluates(expands) them), there are some useful ones there (e.g.: %apply_patches ).
  12. %files: try not to own directories you shouldn't own (ie: delete when you uninstall ).
  13. %config: make sure config files aren't overwritten, don't put them in %doc .
  14. out-of-the-box: try to get your package to work out of the box, if upstream installs it differently, just move it after installing to the correct place.
  15. BuildRequire: doublecheck buildrequires by building it with the Build System.
  16. upstream: don't deviate too much from upstream, and push your own patches back to upstream.
  17. git-svn: if you work with lots of patches, you might be interested in using git-svn.
  18. LICENSES: last but not least: check licensing very carefully (on web AND on a source file) and doublecheck with the valid Mageia licenses.
  19. %description formatting see https://bugs.mageia.org/show_bug.cgi?id=27274#c15