package gitolite3 3.6.11-2 failed to install/upgrade: installed gitolite3 package post-installation script subprocess returned error exit status 1

Bug #1934735 reported by Todd Taft
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gitolite3 (Ubuntu)
New
Undecided
Unassigned

Bug Description

Attempt to install gitolite3 fails.
Directory path set in debconf for gitolite3/adminkey prior to install attempt.

ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: gitolite3 3.6.11-2
ProcVersionSignature: Ubuntu 5.10.0-1034.35-oem 5.10.41
Uname: Linux 5.10.0-1034-oem x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu27.18
Architecture: amd64
CasperMD5CheckMismatches: ./pool/main/l/linux-hwe-5.8/linux-modules-extra-5.8.0-59-generic_5.8.0-59.66~20.04.1_amd64.deb
CasperMD5CheckResult: fail
Date: Mon Jul 5 07:05:53 2021
ErrorMessage: installed gitolite3 package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2021-07-05 (0 days ago)
InstallationMedia: Ubuntu-Server 20.04.2 LTS "Focal Fossa" - Release amd64 (20210627)
PackageArchitecture: all
Python3Details: /usr/bin/python3.8, Python 3.8.10, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: N/A
RelatedPackageVersions:
 dpkg 1.19.7ubuntu3
 apt 2.0.6
SourcePackage: gitolite3
Title: package gitolite3 3.6.11-2 failed to install/upgrade: installed gitolite3 package post-installation script subprocess returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Todd Taft (taft) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Todd Taft (taft) wrote :

It looks like the root cause of this issue is that the post-install script uses the mktemp command when the current user is root and the default Ubuntu configuration sets $TMPDIR to /tmp/user/uid# so the temporary file that gets created is in /tmp/user/0. Later, the script switches to the gitolite3 user and tries to read the file that was created with mktemp (as the gitolite3 user, but that read fails because the gitolite3 user doesn't have permission to navigate the parent directories of the file. Changing permissions on the parent directories is a security problem, so the best solution is probably to set the $TMPDIR environment variable to some world-readable directory, such as /tmp, at the start of the post-install script. So, a one-line addition to the debian/postinst script probably fixes the issue.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.