Skip to content

Commit 37acc92

Browse files
bolinfestfacebook-github-bot
authored andcommitted
manually add git as a dependency to the .deb
Summary: For the `.deb`, we try to create the `Depends:` line by running `dpkg-shlibdeps` on the `hg` executable, but this doesn't catch the fact that we need to be able to shell out to `git`. This diff updates the logic in the `Makefile` to add `git` to `Depends:` as a special case. Reviewed By: DurhamG Differential Revision: D39162642 fbshipit-source-id: 64c7decf91f241fe9fd81dbfd51a0399becb0237
1 parent 11f0412 commit 37acc92

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

eden/scm/Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,20 @@ deb:
111111
# commands to work with Make inline.
112112
./packaging/debian/build_deb.sh
113113

114+
# Values of GIT_DEB_DEP below are based on running the following on "pristine"
115+
# Docker containers for the various versions of Ubuntu:
116+
#
117+
# apt update -y
118+
# apt install -y git
119+
# apt list --installed | grep -E '^git/'
120+
114121
deb-ubuntu-20.04:
115122
# For Ubuntu 20.04, target Python 3.8.
116-
PY_VERSION=38 make deb
123+
PY_VERSION=38 GIT_DEB_DEP="git (>= 1:2.25.1)" make deb
117124

118125
deb-ubuntu-22.04:
119126
# For Ubuntu 22.04, target Python 3.10.
120-
PY_VERSION=310 make deb
127+
PY_VERSION=310 GIT_DEB_DEP="git (>= 1:2.34.1)" make deb
121128

122129
rpm:
123130
rpmbuild \

eden/scm/packaging/debian/build_deb.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ mkdir -p install/debian
1212
cp packaging/debian/control install/debian
1313
cd install
1414
DEB_DEPS=$(dpkg-shlibdeps -O -e usr/local/bin/*)
15+
# dpkg-shlibdeps does not know about the runtime dependency on Git,
16+
# so it must be added explicitly.
17+
DEB_DEPS="${DEB_DEPS}, ${GIT_DEB_DEP}"
1518
cd ..
1619

1720
# In contrast to dpkg-shlibdeps, dpkg-deb requires the file to be named

0 commit comments

Comments
 (0)