-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build python-click Debian package from version 6.7-4 source to fix CL…
…I autocomplete/suggest (#1824)
- Loading branch information
Showing
6 changed files
with
62 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# python-click package | ||
# | ||
# Python Click versions < 6.7 have a bug which causes bash completion | ||
# functionality to stop working after two sublevels. sonic-utilities depends | ||
# on this package, and the most recent version provided by Debian Jessie and | ||
# Stretch is v6.6. We build version 6.7 from source in order to fix this bug. | ||
# TODO: If we upgrade to a distro which provides a version >= 6.7 we will no | ||
# longer need to build this. | ||
|
||
PYTHON_CLICK_VERSION = 6.7-4 | ||
|
||
export PYTHON_CLICK_VERSION | ||
|
||
PYTHON_CLICK = python-click_$(PYTHON_CLICK_VERSION)_all.deb | ||
$(PYTHON_CLICK)_SRC_PATH = $(SRC_PATH)/python-click | ||
SONIC_MAKE_DEBS += $(PYTHON_CLICK) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
.ONESHELL: | ||
SHELL = /bin/bash | ||
.SHELLFLAGS += -e | ||
|
||
MAIN_TARGET = python-click_$(PYTHON_CLICK_VERSION)_all.deb | ||
|
||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : | ||
# Remove any stale files | ||
rm -rf ./python-click | ||
|
||
# Clone python-click Debian repo | ||
git clone https://salsa.debian.org/debian/python-click | ||
|
||
pushd ./python-click | ||
|
||
# Reset HEAD to the commit of the proper tag | ||
# NOTE: Using "git checkout <tag_name>" here detaches our HEAD, | ||
# which stg doesn't like, so we use this method instead | ||
git reset --hard debian/$(PYTHON_CLICK_VERSION) | ||
|
||
# Build source and Debian packages | ||
dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) | ||
popd | ||
|
||
# Move the newly-built .deb package to the destination directory | ||
mv $* $(DEST)/ |