1
0

README.rst 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. Pagure
  2. ======
  3. :Author: Pierre-Yves Chibon <pingou@pingoured.fr>
  4. Pagure is a git-centered forge, python based using pygit2.
  5. With pagure you can host your project with its documentation, let your users
  6. report issues or request enhancements using the ticketing system and build your
  7. community of contributors by allowing them to fork your projects and contribute
  8. to it via the now-popular pull-request mechanism.
  9. Homepage: https://pagure.io/pagure
  10. See it at work: https://pagure.io
  11. Playground version: https://stg.pagure.io
  12. Get it running
  13. ==============
  14. There are several options when it comes to a development environment. Vagrant
  15. will provide you with a virtual machine which you can develop on, or you can
  16. install it directly on your host machine.
  17. Vagrant
  18. ^^^^^^^
  19. For a more thorough introduction to Vagrant, see
  20. https://fedoraproject.org/wiki/Vagrant.
  21. An example Vagrantfile is provided as ``Vagrantfile.example``. To use it,
  22. just copy it and install Vagrant::
  23. $ cp Vagrantfile.example Vagrantfile
  24. $ sudo dnf install ansible libvirt vagrant-libvirt vagrant-sshfs vagrant-hostmanager
  25. $ vagrant up
  26. The default ``Vagrantfile`` forwards ports from the host to the guest,
  27. so you can interact with the application as if it were running on your
  28. host machine.
  29. .. note::
  30. ``vagrant-hostmanager`` will automatically maintain /etc/hosts for you so you
  31. can access the development environment from the host using its hostname, which
  32. by default is ``pagure-dev.example.com``. You can choose not to use this
  33. functionality by simply not installing the ``vagrant-hostmanager`` plugin, but
  34. if you want Pagure to provide valid URLs in the UI for git repositories, you
  35. will need to adjust Pagure's configuration found in ~/pagure.cfg on the guest.
  36. Manually
  37. ^^^^^^^^
  38. * Install the needed system libraries::
  39. sudo dnf install git python2-virtualenv libgit2-devel \
  40. libjpeg-devel gcc libffi-devel redhat-rpm-config
  41. .. note:: Do note the version of libgit2 that you install, for example
  42. in ``libgit2-0.23.4-1`` you need to keep in mind the ``0.23``
  43. .. note:: On Fedora 23 and earlier or on RHEL and derivative (CentOS,
  44. Scientific Linux) the package `python2-virtualenv` is named
  45. `python-virtualenv`
  46. * Retrieve the sources::
  47. git clone https://pagure.io/pagure.git
  48. cd pagure
  49. * Install dependencies
  50. * create the virtualenv::
  51. virtualenv pagure_env
  52. source ./pagure_env/bin/activate
  53. * Install the correct version of pygit2::
  54. pip install pygit2==<version of libgit2 found>.*
  55. So in our example::
  56. pip install pygit2==0.23.*
  57. * Install the rest of the dependencies::
  58. pip install -r requirements.txt
  59. * Create the folder that will receive the projects, forks, docs, requests and
  60. tickets' git repo::
  61. mkdir {repos,docs,forks,tickets,requests}
  62. * Create the inital database scheme::
  63. python createdb.py
  64. * Run it::
  65. ./runserver.py
  66. * To get some profiling information you can also run it as::
  67. ./runserver.py --profile
  68. This will launch the application at http://127.0.0.1:5000
  69. * To run unit-tests on pagure
  70. * Install the dependencies::
  71. pip install -r tests_requirements.txt
  72. * Run it::
  73. ./runtests.sh