Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#74043 - [gitolite] missing dependency

Attached to Project: Community Packages
Opened by Y.G. (theYinYeti) - Sunday, 06 March 2022, 19:56 GMT
Last edited by Toolybird (Toolybird) - Thursday, 18 May 2023, 22:35 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Christian Hesse (eworm)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

_Not_ installing `inetutils` results in such warnings when initializing and running gitolite:

```
WARNING: Can't exec "hostname": No such file or directory at /usr/lib/gitolite/lib/Gitolite/Setup.pm line 160, <DATA> line 1.

WARNING: Use of uninitialized value in concatenation (.) or string at /usr/lib/gitolite/lib/Gitolite/Setup.pm line 160, <DATA> line 1.

WARNING: Can't exec "hostname": No such file or directory at /usr/lib/gitolite/lib/Gitolite/Setup.pm line 161.

WARNING: Use of uninitialized value in concatenation (.) or string at /usr/lib/gitolite/lib/Gitolite/Setup.pm line 161.
```

It does not _seem_ to keep gitolite from running. If inetutils does not become a hard dependency, I suggest it becomes at least a strong suggestion in the optional dependencies.

Additional info:
* local/gitolite 3.6.12-1
* Dockerfile: FROM docker.io/library/archlinux RUN pacman -Syu gitolite openssh

Steps to reproduce:
`su -c "gitolite setup -pk \"$PK\"" gitolite`
This task depends upon

Closed by  Toolybird (Toolybird)
Thursday, 18 May 2023, 22:35 GMT
Reason for closing:  Fixed
Additional comments about closing:  gitolite 3.6.12-2
Comment by loqs (loqs) - Sunday, 06 March 2022, 21:44 GMT
If you apply the attached patch, can you then execute the reproducer with expected results without inetutils installed?
Comment by Y.G. (theYinYeti) - Monday, 07 March 2022, 12:22 GMT
I took https://github.com/archlinux/svntogit-community/tree/packages/gitolite/trunk, and modified PKGBUILD like this:

```
source=("$pkgname-$pkgver.tar.gz::$url/archive/v${pkgver}.tar.gz"
'gitolite-sysusers.conf'
'gitolite-tmpfiles.conf'
'gitolite-perl-sys-hostname.patch')
sha256sums=('8c55976ed561b8eabf39097b7fcb9c6e8741c2ceea85ef4529a06b1adff850b6'
'5e4f3aaa406c25fcd88fffaee74ea4878cecf1dd8c777456e4416caf35292dbf'
'5682190c639618cd4744d3ae193425df1044dde4fb36acf03fc4d20423eeb10c'
'92dd54a024e418a5928db0a402e087c80050d3541e8d257159e5f1dc48aeb600')

prepare() {
cd $pkgname-$pkgver/src
echo "$pkgver" > VERSION
cd ..
patch -p1 <../gitolite-perl-sys-hostname.patch
}
```

The adapted container (with COPY this pkg.tar.zst, then RUN pacman -U, and without inetutils) seems to work well: I was able to run `ssh gitolite@hostname info`, and clone the gitolite-admin repository, all without any warning. I did not look further.

I notice, that the welcome message from gitolite says “hello yves, this is gitolite@1 running gitolite3 3.6.12 on git 2.35.1”, with “1” being the hostname, whereas I had a Podman hash (something like “50f5cc3b2056”) as a hostname when using inetutils. But this is very minor IMHO, provided there is no functional impact on gitolite.
Comment by Christian Hesse (eworm) - Monday, 07 March 2022, 14:00 GMT
loqs, want to send this upstream?
Comment by Christian Hesse (eworm) - Monday, 07 March 2022, 14:06 GMT
Well, the patch is bad... Hostname is always `1`.
Comment by Christian Hesse (eworm) - Monday, 07 March 2022, 14:13 GMT
We need first element of split only:

my $hn = (split /\./, hostname())[0];
Comment by Christian Hesse (eworm) - Monday, 07 March 2022, 14:19 GMT
Fixed in gitolite 3.6.12-2:
https://github.com/archlinux/svntogit-community/commit/344727c502c343d5d51b81266097190a42812f3b

Still... loqs, want to send this upstream?
Comment by loqs (loqs) - Monday, 07 March 2022, 17:10 GMT
@eworm I would prefer if you could. The project does not use github's issue or pull request features [1].

[1] https://github.com/sitaramc/gitolite/blob/master/CONTRIBUTING

Loading...