Skip to content

Commit 6474bc4

Browse files
authored
Merge pull request sonic-net#584 from mssonicbld/sonicbld/202405-merge
[code sync] Merge code from sonic-net/sonic-buildimage:202405 to 202405
2 parents f41e78f + 6eafc7c commit 6474bc4

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

files/build_templates/sonic_debian_extension.j2

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,26 @@ sudo dpkg --root=$FILESYSTEM_ROOT -i {{deb}} || sudo LANG=C DEBIAN_FRONTEND=noni
749749
{% endfor %}
750750
{% endif %}
751751

752+
{% if installer_debs.strip() -%}
753+
{% for deb in installer_debs.strip().split(' ') -%}
754+
755+
# For some SONiC patch packages, Debian offcial version may higher than SONiC version
756+
# When install SONiC packages, fix broken install by 'apt-get -y install -f' may upgrade some installed SONiC packages to Debian offical version
757+
# Check and install upgraded SONiC package again, if install failed, need manually check and fix SONiC package version issue
758+
PACKAGE_NAME=$(dpkg-deb -f {{deb}} Package)
759+
PACKAGE_VERSION=$(dpkg-deb -f {{deb}} Version)
760+
INSTALLED_VERSION=$(dpkg-query --showformat='${Version}' --show $PACKAGE_NAME || true)
761+
if [ "$INSTALLED_VERSION" != "" ] && [ "$INSTALLED_VERSION" != "$PACKAGE_VERSION" ]; then
762+
sudo dpkg --root=$FILESYSTEM_ROOT -i {{deb}}
763+
fi
764+
765+
## SONiC packages may have lower version than Debian offical package, install offical Debian package will break feature
766+
## Hold installed packages to prevent these packages be upgrade by apt commands in this file
767+
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-mark hold $PACKAGE_NAME
768+
769+
{% endfor %}
770+
{% endif %}
771+
752772
## Run depmod command for target kernel modules
753773
sudo LANG=C chroot $FILESYSTEM_ROOT depmod -a {{kversion}}
754774

@@ -1135,3 +1155,11 @@ sudo rm -rf $FILESYSTEM_ROOT/tmp/mask_disabled_services.py
11351155

11361156

11371157
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install python3-dbus
1158+
1159+
{% if installer_debs.strip() -%}
1160+
{% for deb in installer_debs.strip().split(' ') -%}
1161+
## Unhold installed packages to allow these packages be upgrade after SONiC installed
1162+
PACKAGE_NAME=$(dpkg-deb -f {{deb}} Package)
1163+
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-mark unhold $PACKAGE_NAME
1164+
{% endfor %}
1165+
{% endif %}

rules/sonic-fips.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# fips packages
22

33
ifeq ($(BLDENV), bookworm)
4-
FIPS_VERSION = 1.4.3-1
4+
FIPS_VERSION = 1.5.2
55
FIPS_OPENSSL_VERSION = 3.0.11-1~deb12u2+fips
66
FIPS_OPENSSH_VERSION = 9.2p1-2+deb12u3+fips
77
FIPS_PYTHON_MAIN_VERSION = 3.11

src/sonic-py-common/sonic_py_common/device_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ def get_system_mac(namespace=None, hostname=None):
803803
mac_tmp = "{:012x}".format(int(mac_tmp, 16) + 1)
804804
mac_tmp = re.sub("(.{2})", "\\1:", mac_tmp, 0, re.DOTALL)
805805
mac = mac_tmp[:-1]
806-
return mac
806+
return mac.strip() if mac else None
807807

808808

809809
def get_system_routing_stack():

0 commit comments

Comments
 (0)