Bug 1692016
Summary: | Default Pagure configs not integrated to gitolite3 and rest of the system | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Avi Alkalay <avibrazil> | ||||||||
Component: | pagure | Assignee: | Neal Gompa <ngompa13> | ||||||||
Status: | CLOSED WORKSFORME | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||
Severity: | high | Docs Contact: | |||||||||
Priority: | unspecified | ||||||||||
Version: | 29 | CC: | bruno, ngompa13, pingou, vivekanand1101 | ||||||||
Target Milestone: | --- | Keywords: | Reopened | ||||||||
Target Release: | --- | ||||||||||
Hardware: | All | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | pagure-5.4-1.fc30 pagure-5.4-1.el7 pagure-5.4-1.fc29 | Doc Type: | If docs needed, set a value | ||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2019-04-09 13:13:08 UTC | Type: | Bug | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Attachments: |
|
Description
Avi Alkalay
2019-03-23 11:13:22 UTC
Here is my step-by-step setup on Fedora 29: dnf install pagure* mariadb-server redis* # Configure gitolite: UU=aviram cp "`getent passwd $UU | cut -f6 -d:`/.ssh/authorized_keys" ~gitolite3/$UU.pub chmod a+r ~gitolite3/$UU.pub su - gitolite3 -c "gitolite setup -pk ~/$UU.pub" mkdir -p ~gitolite3/remotes chown -R gitolite3. ~gitolite3/remotes setfacl -Rdm user:apache:rx ~gitolite3/ setfacl -Rm user:apache:rx ~gitolite3/ mkdir /var/www/releases chown gitolite3. /var/www/releases # Put correct user on service files: sed -i 's/=git$/=gitolite3/g; s/=mirror$/=gitolite3/g' /usr/lib/systemd/system/pagure* #### Patch or edit by hand /etc/pagure/alembic.ini /etc/pagure/pagure.cfg and /etc/httpd/conf.d/pagure.conf ... # Setup database: systemctl restart mysqld mysqladmin -u root -p drop pagure mysql -u root -p -e "CREATE DATABASE pagure; GRANT ALL PRIVILEGES ON pagure.* TO 'pagure'@'%' IDENTIFIED BY 'pagurepass'; FLUSH PRIVILEGES;" PAGURE_CONFIG=/etc/pagure/pagure.cfg python3 /usr/share/pagure/pagure_createdb.py # Enable services: systemctl enable /usr/lib/systemd/system/pagure_*.service /usr/lib/systemd/system/redis* systemctl restart redis* pagure* # Start Apache with Pagure: systemctl enable httpd systemctl restart httpd I also get this type of error message on /var/log/messages: 31927 Mar 23 06:57:13 student celery-3[29454]: 2019-03-23 06:57:13,653 [ERROR] celery.app.trace: Task pagure.lib.tasks.generate_gitolite_acls[bdea0922-0a91-4856-8a8b-6b44f0c5bcab] raised unexpected: TypeError("a bytes-like object is required, not 'str'") 31928 Mar 23 06:57:13 student celery-3[29454]: Traceback (most recent call last): 31929 Mar 23 06:57:13 student celery-3[29454]: File "/usr/lib/python3.7/site-packages/celery/app/trace.py", line 382, in trace_task 31930 Mar 23 06:57:13 student celery-3[29454]: R = retval = fun(*args, **kwargs) 31931 Mar 23 06:57:13 student celery-3[29454]: File "/usr/lib/python3.7/site-packages/celery/app/trace.py", line 641, in __protected_call__ 31932 Mar 23 06:57:13 student celery-3[29454]: return self.run(*args, **kwargs) 31933 Mar 23 06:57:13 student celery-3[29454]: File "/usr/lib/python3.7/site-packages/pagure/lib/tasks_utils.py", line 36, in decorated_function 31934 Mar 23 06:57:13 student celery-3[29454]: return function(self, session, *args, **kwargs) 31935 Mar 23 06:57:13 student celery-3[29454]: File "/usr/lib/python3.7/site-packages/pagure/lib/tasks.py", line 119, in generate_gitolite_acls 31936 Mar 23 06:57:13 student celery-3[29454]: helper.generate_acls(project=project, group=group_obj) 31937 Mar 23 06:57:13 student celery-3[29454]: File "/usr/lib/python3.7/site-packages/pagure/lib/git_auth.py", line 795, in generate_acls 31938 Mar 23 06:57:13 student celery-3[29454]: f.write(repo) 31939 Mar 23 06:57:13 student celery-3[29454]: File "/usr/lib64/python3.7/tempfile.py", line 481, in func_wrapper 31940 Mar 23 06:57:13 student celery-3[29454]: return func(*args, **kwargs) 31941 Mar 23 06:57:13 student celery-3[29454]: TypeError: a bytes-like object is required, not 'str' I get this type of error all the time on /var/log/httpd/error_log: [Fri Mar 22 23:18:31.527411 2019] [wsgi:error] [pid 29965:tid 139915157030656] [remote fd:900d:900d:0:d88f:5bf2:20f5:f090:61175] /usr/lib64/python3.7/site-packages/sqlalchemy/engine/default.py:536: Warning: (1265, "Data truncated for column 'date' at row 1") [Fri Mar 22 23:18:31.527449 2019] [wsgi:error] [pid 29965:tid 139915157030656] [remote fd:900d:900d:0:d88f:5bf2:20f5:f090:61175] cursor.execute(statement, parameters) And this: [Sat Mar 23 07:24:10.920982 2019] [wsgi:error] [pid 2027:tid 140364017178368] [remote 2804:14c:183:9855:91f:3d8c:8ea2:46f7:50347] 2019-03-23 07:24:10,920 [INFO] pagure.lib.notify: Sending blinker signal to: pagure - topic: issue.comment.added Exception ignored in: <function Connection.__del__ at 0x7fa909308d08> Traceback (most recent call last): File "/usr/lib/python3.7/site-packages/redis/connection.py", line 470, in __del__ NameError: name 'Exception' is not defined Exception ignored in: <function Connection.__del__ at 0x7fa909308d08> Traceback (most recent call last): File "/usr/lib/python3.7/site-packages/redis/connection.py", line 470, in __del__ NameError: name 'Exception' is not defined Even if Redis is running Created attachment 1547254 [details]
Patch/edits for /etc/httpd/conf.d/pagure.conf
Apply with:
patch -p0 /etc/httpd/conf.d/pagure.conf < pagure.httpd.conf.patch
Created attachment 1547255 [details]
Patch/edits for /etc/pagure/pagure.cfg
Apply with:
patch -p0 /etc/pagure/pagure.cfg < pagure.cfg.patch
Created attachment 1547256 [details]
Patch/edits for /etc/pagure/alembic.ini
Apply with:
patch -p0 /etc/pagure/alembic.ini < alembic.ini.patch
So in other distributions, there's a README file that describes post-install manual setup steps. Let me see if I can at least put together one for Fedora's package. (In reply to Neal Gompa from comment #7) > So in other distributions, there's a README file that describes post-install > manual setup steps. Let me see if I can at least put together one for > Fedora's package. Yes please add this post-install instructions. One that is tested and proven to work. You’ll see system files that were supposed to be read only, need changes to work. Any updates on this ? Anybody is working on this? Should I wait for a fix in the next days? Or should I move on to another solution ? Thank you in advance I'm working on this for the Pagure 5.4 update. I'll hopefully have that ready as an update in a day or two. Excellent! Can you share conclusions so far ? Please make sure there will be Fedora 29 packages for stable. Thank you very much ! pagure-5.4-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-e11eb7fa02 pagure-5.4-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-7fc1f4f099 pagure-5.4-1.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-c904f00e0d pagure-5.4-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-e11eb7fa02 pagure-5.4-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-c904f00e0d pagure-5.4-1.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-7fc1f4f099 pagure-5.4-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report. pagure-5.4-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report. pagure-5.4-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report. This still doesn't work. I created an alias user ID and group ID "git" to be the same as gitolite3 so I can follow your instructions. I can create repos through UI but they keep that "permissions on this repository are being updated" message forever. Creating repos as a mirror of another repo doesn't clone it. I also noticed that running as root "pagure-admin refresh-gitolite —all" messes some gitolite file permissions, specially ~/.ssh/authorized_keys, in a way that makes it stop working. The more Pagure's default configuration files are far from the underlying and essential gitolite and other system components, the more fiddling is necessary and increases the chance for it not to work. @Avi, You're supposed to create a new user for it, and give it a new home directory. Gitolite is executed by Pagure under that user. You're breaking it by trying to use the gitolite package defaults. |