#4838 Couple of fixes in pagure and the vagrant environment
Merged 3 years ago by pingou. Opened 3 years ago by pingou.

@@ -30,7 +30,7 @@ 

  PAGURE_ADMIN_USERS = []

  

  ### The URL at which the project is available.

- APP_URL = 'http://127.0.0.1:5000/'

+ APP_URL = 'http://127.0.0.1:5000'

  ### The URL at which the documentation of projects will be available

  ## This should be in a different domain to avoid XSS issues since we want

  ## to allow raw html to be displayed (different domain, ie not a sub-domain).

@@ -58,10 +58,17 @@ 

        - redhat-rpm-config

      state: latest

  

- - name: Install pagure for dev

-   command: pip3 install -e .

-   args:

-     chdir: "/srv/pagure/"

+ - name: Create symbolic link for pagure to be in the python path

+   file:

+     src: /srv/pagure

+     dest: /usr/local/lib/python3.7/site-packages/pagure

+     state: link

+ 

+ - name: Create symbolic link for python to be py3 by default

+   file:

+     src: /usr/bin/python3

+     dest: /usr/bin/python

+     state: link

  

  # Add various helpful configuration files

  - name: Install a custom bashrc

file modified
+2 -2
@@ -64,8 +64,8 @@ 

  if not gitdir.endswith(".git"):

      gitdir = gitdir + ".git"

  

- 

- url = "%s/pv/ssh/checkaccess/" % pagure_config["APP_URL"]

+ pagure_url = pagure_config["APP_URL"].rstrip("/")

+ url = "%s/pv/ssh/checkaccess/" % pagure_url

  data = {"gitdir": gitdir, "username": remoteuser}

  headers = {}

  if pagure_config.get("SSH_ADMIN_TOKEN"):

file modified
+2 -1
@@ -61,7 +61,8 @@ 

          sys.exit(0)

  

  

- url = "%s/pv/ssh/lookupkey/" % pagure_config["APP_URL"]

+ pagure_url = pagure_config["APP_URL"].rstrip("/")

+ url = "%s/pv/ssh/lookupkey/" % pagure_url

  data = {"search_key": fingerprint}

  if username_lookup:

      data["username"] = username