From 89f923d78db01c467bb14c8099fc69b087b5acda Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jun 13 2017 20:13:23 +0000 Subject: [PATCH 1/4] Ensure the right version of pygit2 is installed in the venv on vagrant --- diff --git a/ansible/roles/pagure-dev/tasks/main.yml b/ansible/roles/pagure-dev/tasks/main.yml index 89d668b..d408704 100644 --- a/ansible/roles/pagure-dev/tasks/main.yml +++ b/ansible/roles/pagure-dev/tasks/main.yml @@ -56,6 +56,10 @@ - python3-devel - redhat-rpm-config +- name: register the libgit2 version installed + shell: rpm -q libgit2|cut -d \- -f 2| cut -d \. -f 1,2 + register: libgit2_version + # Add various helpful configuration files - name: Install a custom bashrc become_user: "{{ ansible_env.SUDO_USER }}" @@ -66,6 +70,15 @@ # Install Pagure inside a virtualenv and configure it +- name: Install pygit2 in the virtualenv + become_user: "{{ ansible_env.SUDO_USER }}" + pip: + name: "{{ item }}" + virtualenv: /home/{{ ansible_env.SUDO_USER }}/.virtualenvs/python2-pagure/ + virtualenv_python: python2 + with_items: + - "pygit2=={{ libgit2_version.stdout_lines[0] }}.*" + - name: Install Pagure Python dependencies into a virtualenv become_user: "{{ ansible_env.SUDO_USER }}" pip: From a29cbb89ed7395439969718fa824e5232122be5a Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jun 13 2017 20:13:23 +0000 Subject: [PATCH 2/4] Port the vagrant development machine to F25 --- diff --git a/Vagrantfile.example b/Vagrantfile.example index 2173e26..8a181f5 100644 --- a/Vagrantfile.example +++ b/Vagrantfile.example @@ -4,7 +4,9 @@ VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| - config.vm.box = "fedora/24-cloud-base" + config.vm.box_url = "https://download.fedoraproject.org/pub/fedora/linux/releases/25/CloudImages/x86_64/images/Fedora-Cloud-Base-Vagrant-25-1.3.x86_64.vagrant-libvirt.box" + config.vm.box = "f25-cloud-libvirt" + # Forward traffic on the host to the development server on the guest config.vm.network "forwarded_port", guest: 5000, host: 5000 @@ -24,13 +26,17 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # If you would prefer to use NFS to share the directory uncomment this and configure NFS # config.vm.synced_folder ".", "/vagrant", type: "nfs", nfs_version: 4, nfs_udp: false config.vm.synced_folder ".", "/vagrant", disabled: true - config.vm.synced_folder ".", "/home/vagrant/devel", type: "sshfs", sshfs_opts_append: "-o nonempty" + config.vm.synced_folder ".", "/home/vagrant/devel", + type: "sshfs", + sshfs_opts_append: "-o nonempty" # To cache update packages (which is helpful if frequently doing `vagrant destroy && vagrant up`) # you can create a local directory and share it to the guest's DNF cache. The directory needs to # exist, so create it before you uncomment the line below. - # - # config.vm.synced_folder ".dnf-cache", "/var/cache/dnf", type: "sshfs", sshfs_opts_append: "-o nonempty" + #Dir.mkdir('.dnf-cache') unless File.exists?('.dnf-cache') + #config.vm.synced_folder ".dnf-cache", "/var/cache/dnf", + # type: "sshfs", + # sshfs_opts_append: "-o nonempty" # Comment this line if you would like to disable the automatic update during provisioning config.vm.provision "shell", inline: "sudo dnf upgrade -y" From c852fa77d6d2c5bfcd01f63bdf0c60d419573b6c Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jun 13 2017 20:13:24 +0000 Subject: [PATCH 3/4] Get python2-eventlet installed system-wide on the vagrant host --- diff --git a/ansible/roles/pagure-dev/tasks/main.yml b/ansible/roles/pagure-dev/tasks/main.yml index d408704..64799fb 100644 --- a/ansible/roles/pagure-dev/tasks/main.yml +++ b/ansible/roles/pagure-dev/tasks/main.yml @@ -34,6 +34,7 @@ - python-cryptography - python-docutils - python-enum34 + - python2-eventlet - python-fedora-flask - python-flask - python-flask-wtf From 9aaa589cd0333720f47faabcf1ea6613cdde89fe Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jun 13 2017 20:13:24 +0000 Subject: [PATCH 4/4] Limit the requests version as it conflicts with our chardet requirement --- diff --git a/requirements.txt b/requirements.txt index ca55b0d..217112b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -23,6 +23,7 @@ python-openid python-openid-cla python-openid-teams redis +requests < 2.16.0 six sqlalchemy >= 0.8 straight.plugin >= 1.4.0-post-1