README 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. README (English)
  2. ##################################################
  3. Launchpad Package tools
  4. ##################################################
  5. This directory contains files to explain how to publish
  6. a package onto LaunchPad
  7. # This is standard command to work on RPM packaging:
  8. #
  9. # To install all packagers tools:
  10. # sudo apt-get install bzr-builder bzr dpatch pbuilder debootstrap devscripts
  11. # Init local working env
  12. #----------------------------------
  13. - Create account on launchpad.org
  14. - Create Project
  15. - Link project to official SCM server
  16. - Upload SSH public key onto account
  17. - Upload you GPG sign key
  18. - Run from command line:
  19. bzr launchpad-login yourlogin
  20. bzr whoami "Your Name <email@email.com>"
  21. bzr whoami
  22. - Edit file ~/.bashrc to add
  23. DEBFULLNAME="<Your name>"
  24. DEBEMAIL="<Your email address>"
  25. - Create a Bazaar directory
  26. mkdir bzr
  27. If you want to build/test package locally:
  28. - Create a file ~/.pbuilderrc with content
  29. COMPONENTS="main universe multiverse restricted"
  30. - Create chroot ubuntu env
  31. sudo pbuilder create [--distribution sid|squeeze]
  32. # Push/declare Dolibarr sources to Launchpad
  33. #----------------------------------
  34. - From Launchpad project (https://launchpad.net/dolibarr), register a series:
  35. Call it 'trunk' or 'stable'
  36. Use branch (dev):
  37. https://launchpad.net/~eldy/dolibarr/develop
  38. https://launchpad.net/~eldy/dolibarr/stable
  39. or
  40. Use URL pattern (stable):
  41. For stable: http://www.dolibarr.org/files/lastbuild/package_debian-ubuntu/dolibarr_x.z.*.tar.gz
  42. - For Dev, you can also add link serie to GIT HEAD.
  43. - For stable, you can init from command line
  44. cd bzr/dolibarr-stable
  45. bzr init
  46. bzr add
  47. bzr commit -m "Init"
  48. bzr push lp:~yourlogin/dolibarr/stable
  49. - List of series are visible here: https://launchpad.net/dolibarr/+series
  50. # To update Dolibarr into launchpad (when remote repository for sources already exists)
  51. #----------------------------------
  52. # create local repository
  53. cd bzr
  54. bzr branch lp:~yourlogin/dolibarr/[develop|stable] dolibarr-[dev|stable]
  55. cd dolibarr-[dev|stable]
  56. # Update
  57. bzr update
  58. -- Update files here: Remove all (except .bzr dir) and overwrite --
  59. bzr status
  60. bzr add *
  61. bzr commit -m "Upstream version x.y"
  62. bzr push
  63. # Init debian dir repository into launchpad (when repository for sources does not exist)
  64. #----------------------------------
  65. - Create debian directory and upload it onto bzr branch lp:~yourlogin/+junk/debian-[dev|stable]
  66. cd bzr
  67. mkdir debian
  68. cd debian
  69. cp -pr dolibarr_root/debian bzr/debian
  70. bzr init
  71. bzr add
  72. bzr commit -m "Init control files"
  73. bzr push lp:~yourlogin/+junk/debian-[dev|stable] (put here any branch name or just bzr push if into a known branch)
  74. - or download it from launchpad bazaar:
  75. cd bzr
  76. bzr branch lp:~yourlogin/+junk/debian-[dev|stable]
  77. # Get debian dir repository from launchpad (when repository for sources already exists)
  78. #----------------------------------
  79. cd bzr
  80. bzr branch lp:~yourlogin/+junk/debian-[dev|stable]
  81. # To update debian dir into launchpad (when repository for sources already exists)
  82. #----------------------------------
  83. cd bzr
  84. bzr branch lp:~yourlogin/+junk/debian-[dev|stable]
  85. cd debian-[dev|stable]
  86. bzr status
  87. -- Update files here: Remove all (except .bzr dir) and overwrite. Restore version into the file changelog --
  88. bzr commit -m "Description of change"
  89. bzr push lp:~yourlogin/+junk/debian-[dev|stable]
  90. # Define a recipe into launchpad (a rule to build packages into a PPA)
  91. #----------------------------------
  92. - Create a file dolibarr-[beta|stable].recipe with content
  93. cd bzr
  94. vi dolibarr-[beta|stable].recipe
  95. For beta/dev:
  96. # bzr-builder format 0.3 deb-version {debupstream}-0~{revno}
  97. lp:dolibarr
  98. merge packaging lp:~yourlogin/+junk/debian-dev
  99. For stable:
  100. # bzr-builder format 0.3 deb-version {debupstream}-2~{revno}
  101. lp:dolibarr/stable
  102. merge packaging lp:~yourlogin/+junk/debian-stable
  103. - Run command
  104. cd bzr
  105. bzr dailydeb dolibarr-[beta|stable].recipe working-dir
  106. This will create a directory "working-dir" with dolibarr sources and will add sources from ~yourlogin/+junk/debian-[dev|stable]
  107. - Test package sources
  108. sudo pbuilder build <working-dir>/<project>_<version>.dsc
  109. List of recipes created
  110. https://code.launchpad.net/~eldy/+recipe/dolibarr-dev
  111. https://code.launchpad.net/~eldy/+recipe/dolibarr-stable
  112. # To get/download package from PPA:
  113. #----------------------------------
  114. - Add signing key of the Launchpad repository:
  115. > gpg --keyserver keyserver.ubuntu.com --recv-key A38BF8FD
  116. > sudo apt-key add ~/.gnupg/pubring.gpg
  117. - Add Dolibarr Launchpad repository to your system setup by adding the two lines to /etc/apt/sources.list
  118. For the development snapshot version:
  119. deb http://ppa.launchpad.net/yourlogin/dolibarr-dev/ubuntu precise main
  120. deb-src http://ppa.launchpad.net/yourlogin/dolibarr-dev/ubuntu precise main
  121. For the stable version:
  122. deb http://ppa.launchpad.net/yourlogin/dolibarr-stable/ubuntu precise main
  123. deb-src http://ppa.launchpad.net/yourlogin/dolibarr-stable/ubuntu precise main
  124. - Update your package cache:
  125. > apt-get update
  126. - Install Dolibarr:
  127. > apt-get install dolibarr