From 87493db9683c342043ad1d4322acab9aa7bff515 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Tue, 19 Nov 2024 13:01:18 +0800 Subject: [PATCH] Revert "Ipmitool bookworm: Fix and patch enterprise-numbers URL (#17878)" (#20349) (#20844) The latest version of ipmitool in Debian has the enterprise-numbers.txt file. Don't compile this package locally anymore. This reverts commit 4753953ed01e65d1cb519f83e5cc4f1177b16ac4. Co-authored-by: Saikrishna Arcot --- build_debian.sh | 1 + .../build_templates/sonic_debian_extension.j2 | 4 - rules/ipmitool.dep | 11 -- rules/ipmitool.mk | 17 --- slave.mk | 1 - src/ipmitool/Makefile | 28 ----- ...ges-needed-to-install-enterprise.txt.patch | 113 ------------------ src/ipmitool/patch/series | 1 - 8 files changed, 1 insertion(+), 175 deletions(-) delete mode 100644 rules/ipmitool.dep delete mode 100644 rules/ipmitool.mk delete mode 100644 src/ipmitool/Makefile delete mode 100644 src/ipmitool/patch/0001-Changes-needed-to-install-enterprise.txt.patch delete mode 100644 src/ipmitool/patch/series diff --git a/build_debian.sh b/build_debian.sh index 7f059d68dcb9..908d8b8201ce 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -382,6 +382,7 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in mtr-tiny \ locales \ cgroup-tools \ + ipmitool \ ndisc6 \ makedumpfile \ conntrack \ diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index ed2abd39fec0..9531fdc42805 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -103,10 +103,6 @@ sudo mkdir -p $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/ifupdown2_*.deb || \ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f -# Install a patched version of ipmitool (and its dependencies via 'apt-get -y install -f') -sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/ipmitool_*.deb || \ - sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f - # Install a patched version of ntp (and its dependencies via 'apt-get -y install -f') sudo dpkg --root=$FILESYSTEM_ROOT --force-confdef --force-confold -i $debs_path/ntp_*.deb || \ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y \ diff --git a/rules/ipmitool.dep b/rules/ipmitool.dep deleted file mode 100644 index 7643d2477b59..000000000000 --- a/rules/ipmitool.dep +++ /dev/null @@ -1,11 +0,0 @@ - -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) - - diff --git a/rules/ipmitool.mk b/rules/ipmitool.mk deleted file mode 100644 index a3d08452473f..000000000000 --- a/rules/ipmitool.mk +++ /dev/null @@ -1,17 +0,0 @@ -# ipmitool packages -IPMITOOL_VERSION = 1.8.19 -IPMITOOL_VERSION_SUFFIX = 4+deb12u1 -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 diff --git a/slave.mk b/slave.mk index f65a4b28b666..030923f60d7d 100644 --- a/slave.mk +++ b/slave.mk @@ -1360,7 +1360,6 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \ $(LINUX_KERNEL) \ $(SONIC_DEVICE_DATA) \ $(IFUPDOWN2) \ - $(IPMITOOL) \ $(KDUMP_TOOLS) \ $(LIBPAM_RADIUS) \ $(LIBNSS_RADIUS) \ diff --git a/src/ipmitool/Makefile b/src/ipmitool/Makefile deleted file mode 100644 index dc8b9c05ca53..000000000000 --- a/src/ipmitool/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -.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) - diff --git a/src/ipmitool/patch/0001-Changes-needed-to-install-enterprise.txt.patch b/src/ipmitool/patch/0001-Changes-needed-to-install-enterprise.txt.patch deleted file mode 100644 index dcaab247a9a1..000000000000 --- a/src/ipmitool/patch/0001-Changes-needed-to-install-enterprise.txt.patch +++ /dev/null @@ -1,113 +0,0 @@ -From 719292c4800054ead278affc2972d8f77babd227 Mon Sep 17 00:00:00 2001 -From: rajib-dutta1 -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 - diff --git a/src/ipmitool/patch/series b/src/ipmitool/patch/series deleted file mode 100644 index df9c99f748fa..000000000000 --- a/src/ipmitool/patch/series +++ /dev/null @@ -1 +0,0 @@ -0001-Changes-needed-to-install-enterprise.txt.patch