From 2b8b19f00e66cfbb1f6081595f3f00d3bad7351c Mon Sep 17 00:00:00 2001 From: Malte Janduda Date: Fri, 23 Jun 2023 03:18:27 +0200 Subject: [PATCH] [buildsystem] Fix hiredis package version: 0.14.1-1 (#15461) (#15569) - Why I did it To fix hiredis compilation - How I did it Changed package version: 0.14.0-3~bpo9+1 -> 0.14.1-1 - How to verify it make configure PLATFORM=mellanox make target/sonic-mellanox.bin Signed-off-by: Nazarii Hnydyn Co-authored-by: Nazarii Hnydyn --- rules/hiredis.mk | 7 ++++--- src/hiredis/Makefile | 17 +++++++++-------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/rules/hiredis.mk b/rules/hiredis.mk index 71a18a1d6..a97e0bf1b 100644 --- a/rules/hiredis.mk +++ b/rules/hiredis.mk @@ -1,7 +1,7 @@ # libhiredis package -HIREDIS_VERSION = 0.14.0 -HIREDIS_VERSION_FULL = $(HIREDIS_VERSION)-3~bpo9+1 +HIREDIS_VERSION = 0.14.1 +HIREDIS_VERSION_FULL = ${HIREDIS_VERSION}-1 export HIREDIS_VERSION HIREDIS_VERSION_FULL @@ -12,6 +12,7 @@ SONIC_MAKE_DEBS += $(LIBHIREDIS) LIBHIREDIS_DEV = libhiredis-dev_$(HIREDIS_VERSION_FULL)_$(CONFIGURED_ARCH).deb $(eval $(call add_derived_package,$(LIBHIREDIS),$(LIBHIREDIS_DEV))) -LIBHIREDIS_DBG = libhiredis-dbg_$(HIREDIS_VERSION_FULL)_$(CONFIGURED_ARCH).deb LIBHIREDIS_DBG = libhiredis0.14-dbgsym_$(HIREDIS_VERSION_FULL)_$(CONFIGURED_ARCH).deb $(eval $(call add_derived_package,$(LIBHIREDIS),$(LIBHIREDIS_DBG))) + +export LIBHIREDIS LIBHIREDIS_DEV LIBHIREDIS_DBG diff --git a/src/hiredis/Makefile b/src/hiredis/Makefile index ab257e5e0..7e94e2c09 100644 --- a/src/hiredis/Makefile +++ b/src/hiredis/Makefile @@ -2,18 +2,18 @@ SHELL = /bin/bash .SHELLFLAGS += -e -MAIN_TARGET = libhiredis0.14_$(HIREDIS_VERSION_FULL)_$(CONFIGURED_ARCH).deb -DERIVED_TARGETS = libhiredis0.14-dbgsym_$(HIREDIS_VERSION_FULL)_$(CONFIGURED_ARCH).deb libhiredis-dev_$(HIREDIS_VERSION_FULL)_$(CONFIGURED_ARCH).deb +MAIN_TARGET = $(LIBHIREDIS) +DERIVED_TARGETS = $(LIBHIREDIS_DBG) $(LIBHIREDIS_DEV) $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : - rm -rf hiredis-$(HIREDIS_VERSION) + # Remove any stale files + rm -rf ./hiredis-$(HIREDIS_VERSION) - wget -O hiredis_$(HIREDIS_VERSION).orig.tar.gz http://http.debian.net/debian/pool/main/h/hiredis/hiredis_$(HIREDIS_VERSION).orig.tar.gz - wget -O hiredis_$(HIREDIS_VERSION_FULL).debian.tar.xz http://http.debian.net/debian/pool/main/h/hiredis/hiredis_$(HIREDIS_VERSION_FULL).debian.tar.xz - wget -O hiredis_$(HIREDIS_VERSION_FULL).dsc http://http.debian.net/debian/pool/main/h/hiredis/hiredis_$(HIREDIS_VERSION_FULL).dsc + # Get hiredis release, debian files + dget -u http://http.debian.net/debian/pool/main/h/hiredis/hiredis_$(HIREDIS_VERSION_FULL).dsc - dpkg-source -x hiredis_$(HIREDIS_VERSION_FULL).dsc - pushd hiredis-$(HIREDIS_VERSION) + # Build source and Debian packages + pushd ./hiredis-$(HIREDIS_VERSION) ifeq ($(CROSS_BUILD_ENVIRON), y) dpkg-buildpackage -rfakeroot -d -b -us -uc -a$(CONFIGURED_ARCH) -Pcross,nocheck -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR) else @@ -21,6 +21,7 @@ else endif popd + # Move the newly-built .deb packages to the destination directory mv $* $(DERIVED_TARGETS) $(DEST)/ $(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET)