Bug 26148 - gitolite needs to add git as an runtime dependency
Summary: gitolite needs to add git as an runtime dependency
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 7
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA7-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2020-01-29 20:47 CET by Mika Laitio
Modified: 2021-02-19 15:53 CET (History)
7 users (show)

See Also:
Source RPM: gitolite-3.6.11-1.mga7.src.rpm
CVE:
Status comment:


Attachments

Description Mika Laitio 2020-01-29 20:47:02 CET
Description of problem:

git is needed to be able to setup gitolite. ssh-server is also needed for cloning the repositories from gitolite.

if you just install gitolite with urpmi and then try to setup it, the setup will fail because there is no git available

To make things worse, it will let the gitolite setup on state where the setup will fail also after installing the git and then trying to run the setup again.
(to fix the problem user needs to remove certain files and dirs before attempting to setup gitolite again)

Once the git is also installed the gitolite clone commands will however work
if you do not also have ssh-server running. But as there may be multiple different ssh servers (openssh, dropbear, I am not sure whether to add ssh-server also as a hard dependency)

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. make sure git is not installed before installing gitolite
2. sudo urpmi gitolite
3. sudo useradd git
4. cp .ssh/id_rsa.pub /tmp/mykey.pub .
5. sudo su git
6. cd
7. gitolite setup -pk mykey.pub
error: git command not found. no install git
8. sudo urpmi git
9. gitolite setup -pk mykey.pub
error: fatal: not a git repository (or any of the parent directories): .git
10. rm -rf .gitolite .gitolite.rc repositories
11. now the gitolite setup will finally work with command
    gitolite setup -pk mykey.pub
David Walser 2020-01-29 21:04:20 CET

CC: (none) => bruno, ngompa13, shlomif
Assignee: bugsquad => pkg-bugs

Olav Vitters 2020-07-09 14:14:40 CEST

CC: (none) => olav

Comment 1 Bruno Cornec 2020-12-29 11:37:06 CET
Fixed in cauldron with 3.6.12-2

Status: NEW => ASSIGNED

Comment 2 Bruno Cornec 2020-12-29 11:41:16 CET
Fixed in mga7 with 3.6.11-1.1

Assignee: pkg-bugs => qa-bugs

Comment 3 Aurelien Oudelet 2020-12-29 13:46:23 CET
Thanks Bruno.

Suggested advisory:
=========================
Updated gitolite package fixes dependencies

The gitolite package has been fixed to include missing dependencies.


references:
 - https://bugs.mageia.org/show_bug.cgi?id=26148

=========================
in core/updates_testing:
gitolite-3.6.11-1.1.mga7.noarch.rpm

from SRPM:
gitolite-3.6.11-1.1.mga7

Version: Cauldron => 7
CC: (none) => ouaurelien

Aurelien Oudelet 2020-12-29 13:47:11 CET

Summary: gitolite needs to add git (and maybe openssh server) as an runtime dependency => gitolite needs to add git as an runtime dependency

Comment 4 Len Lawrence 2021-01-02 17:00:38 CET
mga7, x64

Removed git.
Installed gitolite
  gitolite                       3.6.11       1.mga7        noarch  
  perl-IO-Socket-Timeout         0.320.0      4.mga7        noarch  
  perl-PerlIO-via-Timeout        0.320.0      4.mga7        noarch  
  perl-Redis                     1.991.0      2.mga7        noarch  

$ sudo useradd git
$ cp .ssh/id_rsa.pub /tmp/mykey.pub 

As original user:
$ sudo chmod 644 mykey.pub
$ sudo su git

As user git:
Test diverges here.

$ gitolite setup -pk /tmp/mykey.pub
Initialized empty Git repository in /home/git/repositories/gitolite-admin.git/
Initialized empty Git repository in /home/git/repositories/testing.git/
WARNING: /home/git/.ssh missing; creating a new one
    (this is normal on a brand new install)
WARNING: /home/git/.ssh/authorized_keys missing; creating a new one
    (this is normal on a brand new install)
$ rpm -q git
package git is not installed

OpenSSH server is running.

$ gitolite setup -pk mykey.pub
Initialized empty Git repository in /home/git/repositories/gitolite-admin.git/
Initialized empty Git repository in /home/git/repositories/testing.git/

Trying again after removing gitolite, projects.list and the repositories tree.
Reinstalled gitolite but still cannot reproduce the problem.
git@difda:~ $ gitolite setup -pk mykey.pub
Initialized empty Git repository in /home/git/repositories/gitolite-admin.git/
Initialized empty Git repository in /home/git/repositories/testing.git/

Ceaned the git directory and started again.
Realized that the key should normally have user access only.
git@difda:~ $ chmod 600 mykey.pub
git@difda:~ $ gitolite setup -pk mykey.pub
Initialized empty Git repository in /home/git/repositories/gitolite-admin.git/
Initialized empty Git repository in /home/git/repositories/testing.git/
WARNING: /home/git/.ssh missing; creating a new one
    (this is normal on a brand new install)
WARNING: /home/git/.ssh/authorized_keys missing; creating a new one
    (this is normal on a brand new install)


So, still cannot reproduce the problem.

CC: (none) => tarazed25

Comment 5 Len Lawrence 2021-01-02 17:15:09 CET
Tried this again, making sure the git directory was properly clean (no .gitolite*) but the setup worked, before update and with no git installed.

Is this what is expected?
Comment 6 Bruno Cornec 2021-01-06 21:52:39 CET
(In reply to Len Lawrence from comment #4)
> mga7, x64
> 
> Removed git.
> Installed gitolite
>   gitolite                       3.6.11       1.mga7        noarch  

This is not the version I pushed to updates_testing Maybe an issue with repositories ?
Comment 7 Len Lawrence 2021-01-06 22:17:19 CET
Replying to Bruno Cornec in comment 6.
No, because I am trying to reproduce the problem before updating and testing again.  That is what we do in QA.
Thanks anyway Bruno.  I must have done something silly.  
That is what I do a lot of the time.
Comment 8 Aurelien Oudelet 2021-01-08 14:51:21 CET
@Mika Laition,

Can you ever reproduce the behaviour from Comment 0?
Same as Len, I can't reproduce the Comment 0 behaviour, which I should be done before.
Comment 9 Aurelien Oudelet 2021-02-04 14:19:14 CET
No response from reporter...

Reporter, could you please reply to the previous question? If you don't reply within two weeks from now, I will have to close this bug as OLD. Thank you.

Keywords: (none) => NEEDINFO

Aurelien Oudelet 2021-02-04 14:20:11 CET

Assignee: qa-bugs => ouaurelien

Comment 10 Aurelien Oudelet 2021-02-19 10:50:15 CET
No answers from reporter.
This make me sad.


Flushing out meanwhile.
Adding an explicit dependency is not harmful.

CC: (none) => sysadmin-bugs
Keywords: NEEDINFO => advisory, validated_update
Whiteboard: (none) => MGA7-64-OK
Assignee: ouaurelien => qa-bugs

Comment 11 Mageia Robot 2021-02-19 15:53:49 CET
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2021-0025.html

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.