-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ipmitool bookworm: Fix and patch enterprise-numbers URL #17878
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
98ec693
SNC-31522 Fix IANA error: Include locally patched-built ipmitool deb
rajib-dutta1 fe3a9f2
SNC-31522 Fix IANA error: Include locally patched-built ipmitool deb
rajib-dutta1 f9c57d0
SNC-31522 Fix IANA error: Include locally patched-built ipmitool deb
rajib-dutta1 f9584fe
SNC-31522 Fix IANA error: Include locally patched-built ipmitool deb
rajib-dutta1 42cffae
SNC-31522 Fix IANA error: Include locally patched-built ipmitool deb
rajib-dutta1 18318e4
SNC-31522 Fix IANA error: Include locally patched-built ipmitool deb
rajib-dutta1 5a7facb
[dhcp_server] Fix parse_dpus error (#17870)
yaqiangz c74baf9
[dhcp_server] Remove dependency in port-name-alias-map.txt.j2 (#17858)
yaqiangz 89104d5
Merge branch 'master' of https://github.com/rajib-dutta1/sonic-buildi…
rajib-dutta1 584423e
Merge branch 'master' of https://github.com/rajib-dutta1/sonic-buildi…
rajib-dutta1 0e7203d
Ipmitool bookworm
rajib-dutta1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,11 @@ | ||
|
||
SPATH := $($(IPMITOOL)_SRC_PATH) | ||
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/ipmitool.mk rules/ipmitool.dep | ||
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) | ||
DEP_FILES += $(shell git ls-files $(SPATH)) | ||
|
||
$(IPMITOOL)_CACHE_MODE := GIT_CONTENT_SHA | ||
$(IPMITOOL)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) | ||
$(IPMITOOL)_DEP_FILES := $(DEP_FILES) | ||
|
||
|
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,17 @@ | ||
# ipmitool packages | ||
IPMITOOL_VERSION = 1.8.19 | ||
IPMITOOL_VERSION_SUFFIX = 4 | ||
IPMITOOL_VERSION_FULL = $(IPMITOOL_VERSION)-$(IPMITOOL_VERSION_SUFFIX) | ||
IPMITOOL = ipmitool_$(IPMITOOL_VERSION_FULL)_$(CONFIGURED_ARCH).deb | ||
$(IPMITOOL)_SRC_PATH = $(SRC_PATH)/ipmitool | ||
SONIC_MAKE_DEBS += $(IPMITOOL) | ||
IPMITOOL_DBG = ipmitool-dbgsym_$(IPMITOOL_VERSION_FULL)_$(CONFIGURED_ARCH).deb | ||
$(eval $(call add_derived_package,$(IPMITOOL),$(IPMITOOL_DBG))) | ||
DBG_SRC_ARCHIVE += ipmitool | ||
# The .c, .cpp, .h & .hpp files under src/{$DBG_SRC_ARCHIVE list} | ||
# are archived into debug one image to facilitate debugging. | ||
# Export these variables so they can be used in a sub-make | ||
export IPMITOOL_VERSION | ||
export IPMITOOL_VERSION_FULL | ||
export IPMITOOL | ||
export IPMITOOL_DBG |
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,28 @@ | ||
.ONESHELL: | ||
SHELL = /bin/bash | ||
.SHELLFLAGS += -e | ||
|
||
MAIN_TARGET = $(IPMITOOL) | ||
DERIVED_TARGETS = $(IPMITOOL_DBG) | ||
|
||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : | ||
# Remove any stale files | ||
rm -rf ./ipmitool-$(IPMITOOL_VERSION) ./ipmitool*.{deb,udeb,dsc,gz,xz} | ||
# Obtain ipmitool | ||
dget https://deb.debian.org/debian/pool/main/i/ipmitool/ipmitool_$(IPMITOOL_VERSION_FULL).dsc | ||
# Build source and Debian packages | ||
pushd ipmitool-$(IPMITOOL_VERSION) | ||
|
||
git init | ||
git add -f * | ||
git commit -m "unmodified ipmitool source" | ||
|
||
# Apply patches | ||
stg init | ||
stg import -s ../patch/series | ||
dpkg-buildpackage -rfakeroot -d -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR) | ||
popd | ||
mv $* $(DERIVED_TARGETS) $(DEST)/ | ||
|
||
$(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET) | ||
|
113 changes: 113 additions & 0 deletions
113
src/ipmitool/patch/0001-Changes-needed-to-install-enterprise.txt.patch
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,113 @@ | ||
From 719292c4800054ead278affc2972d8f77babd227 Mon Sep 17 00:00:00 2001 | ||
From: rajib-dutta1 <rajib.dutta@dell.com> | ||
Date: Wed, 10 Jan 2024 20:51:03 -0800 | ||
Subject: [PATCH] Changes needed to install enterprise.txt | ||
|
||
--- | ||
Makefile.am | 40 ++++++++++++++++++++-------------------- | ||
configure.ac | 30 +++++++++++++++--------------- | ||
2 files changed, 35 insertions(+), 35 deletions(-) | ||
|
||
diff --git a/Makefile.am b/Makefile.am | ||
index 355d3f0..ec9605c 100644 | ||
--- a/Makefile.am | ||
+++ b/Makefile.am | ||
@@ -49,25 +49,25 @@ dist-hook: | ||
.PHONY: install-pen-database uninstall-pen-database | ||
.INTERMEDIATE: %.o %.la enterprise-numbers | ||
|
||
-#if DOWNLOAD | ||
- | ||
-#enterprise-numbers: | ||
-# @echo Downloading IANA PEN database... | ||
-# @$(DOWNLOAD) "$(IANA_PEN)" > tmpfile.$$PPID || {\ | ||
-# echo "FAILED to download the IANA PEN database"; \ | ||
-# rm tmpfile.$$PPID; \ | ||
-# false; \ | ||
-# } | ||
-# @mv tmpfile.$$PPID $@ | ||
-# | ||
-#install-pen-database: enterprise-numbers | ||
-# mkdir -m 755 -p $(DESTDIR)$(IANADIR) | ||
-# $(INSTALL_DATA) $< $(DESTDIR)$(IANADIR)/ | ||
-# | ||
-#uninstall-pen-database: | ||
-# -rm -rf $(DESTDIR)$(IANADIR)/enterprise-numbers | ||
-# | ||
-#else | ||
+if DOWNLOAD | ||
+ | ||
+enterprise-numbers.txt: | ||
+ @echo Downloading IANA PEN database... | ||
+ @$(DOWNLOAD) "$(IANA_PEN)" > tmpfile.$$PPID || {\ | ||
+ echo "FAILED to download the IANA PEN database"; \ | ||
+ rm tmpfile.$$PPID; \ | ||
+ false; \ | ||
+ } | ||
+ @mv tmpfile.$$PPID $@ | ||
+ | ||
+install-pen-database: enterprise-numbers.txt | ||
+ mkdir -m 755 -p $(DESTDIR)$(IANADIR) | ||
+ $(INSTALL_DATA) $< $(DESTDIR)$(IANADIR)/ | ||
+ | ||
+uninstall-pen-database: | ||
+ -rm -rf $(DESTDIR)$(IANADIR)/enterprise-numbers.txt | ||
+ | ||
+else | ||
|
||
install-pen-database: | ||
@echo "*** NOT installing the IANA PEN database." | ||
@@ -77,7 +77,7 @@ uninstall-pen-database: | ||
@echo "*** NOT uninstalling the IANA PEN database." | ||
@echo "*** It was installed manually (if ever)." | ||
|
||
-#endif | ||
+endif | ||
|
||
install-data-local: install-pen-database | ||
mkdir -p $(DESTDIR)$(DOCDIR) | ||
diff --git a/configure.ac b/configure.ac | ||
index b4321c6..d6ba62b 100644 | ||
--- a/configure.ac | ||
+++ b/configure.ac | ||
@@ -56,22 +56,22 @@ if test "x$exec_prefix" = "xNONE"; then | ||
exec_prefix="$prefix" | ||
fi | ||
|
||
-#if test "x$WGET" = "x"; then | ||
-# if test "x$CURL" = "x"; then | ||
-# AC_MSG_WARN([** Neither wget nor curl could be found.]) | ||
-# AC_MSG_WARN([** IANA PEN database will not be installed by `make install` !]) | ||
-# else | ||
-# DOWNLOAD="$CURL --location --progress-bar" | ||
-# AM_CONDITIONAL([DOWNLOAD], [true]) | ||
-# fi | ||
-#else | ||
-# DOWNLOAD="$WGET -c -nd -O -" | ||
-# AM_CONDITIONAL([DOWNLOAD], [true]) | ||
-#fi | ||
+if test "x$WGET" = "x"; then | ||
+ if test "x$CURL" = "x"; then | ||
+ AC_MSG_WARN([** Neither wget nor curl could be found.]) | ||
+ AC_MSG_WARN([** IANA PEN database will not be installed by `make install` !]) | ||
+ else | ||
+ DOWNLOAD="$CURL --location --progress-bar" | ||
+ AM_CONDITIONAL([DOWNLOAD], [true]) | ||
+ fi | ||
+else | ||
+ DOWNLOAD="$WGET -c -nd -O -" | ||
+ AM_CONDITIONAL([DOWNLOAD], [true]) | ||
+fi | ||
|
||
-#AC_MSG_WARN([** Download is:]) | ||
-#AC_MSG_WARN($DOWNLOAD) | ||
-#AC_SUBST(DOWNLOAD, $DOWNLOAD) | ||
+AC_MSG_WARN([** Download is:]) | ||
+AC_MSG_WARN($DOWNLOAD) | ||
+AC_SUBST(DOWNLOAD, $DOWNLOAD) | ||
|
||
dnl | ||
dnl set default option values | ||
-- | ||
2.25.1 | ||
|
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 @@ | ||
0001-Changes-needed-to-install-enterprise.txt.patch |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In
build_debian.sh
, can you remove theipmitool
package installation from there, to make sure this version is the only version that gets installed?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed the changed asked above.
root@sonic:/home/admin# show ver
SONiC Software Version: SONiC.master.0-dirty-20240209.233855
SONiC OS Version: 12
Distribution: Debian 12.4
Kernel: 6.1.0-11-2-amd64
Build commit: bd47fd1
Build date: Sat Feb 10 01:35:50 UTC 2024
Built by: commbuild@rajvm
Platform: x86_64-dellemc_s5212f_c3538-r0
HwSKU: DellEMC-S5212f-P-25G
ASIC: broadcom
ASIC Count: 1
Serial Number: CQY67C3
Model Number: 0VK93C
Hardware Revision: 01
Uptime: 07:59:58 up 4 min, 1 user, load average: 5.00, 4.12, 1.78
Date: Tue 13 Feb 2024 07:59:58
root@sonic:/home/admin# ipmitool raw 0x04 0x2d 0x31
Get Device ID command failed: 0xb1 Unknown (0xB1)
Received a response with unexpected ID 0 vs. 1
00 c0 01 80
root@sonic:/home/admin# ipmitool raw 0x04 0x2d 0x31
00 c0 01 80
root@sonic:/home/admin# dpkg -l ipmitool
||/ Name Version Architecture Description
+++-==============-============-============-==================================>
ii ipmitool 1.8.19-4 amd64 utility for IPMI control with kern>