Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
vim \
tcpdump \
dbus \
ntp \
ntpstat \
openssh-server \
python \
Expand Down
4 changes: 4 additions & 0 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/python-sonic-utilities_*.deb ||
# in bash.bashrc, so we copy a version of the file with it enabled here.
sudo cp -f $IMAGE_CONFIGS/bash/bash.bashrc $FILESYSTEM_ROOT/etc/

# Install NTP version 4.2.6 this way until required fix is available for Jessie.
sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/ntp_4.2.6*.deb || \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f

# Install SONiC Device Data (and its dependencies via 'apt-get -y install -f')
sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/sonic-device-data_*.deb || \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f
Expand Down
13 changes: 13 additions & 0 deletions rules/ntp.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# ntp_4.2.6.p5+dfsg-7+deb8u2.deb

NTP_VERSION_MAJOR = 4.2.6
NTP_VERSION_SUFFIX = .p5+dfsg
NTP_VERSION_SUFFIX_NUM = 7+deb8u2
NTP_VERSION_FULL = $(NTP_VERSION_MAJOR)$(NTP_VERSION_SUFFIX)-$(NTP_VERSION_SUFFIX_NUM)
NTP_VERSION = $(NTP_VERSION_MAJOR)$(NTP_VERSION_SUFFIX)

export NTP_VERSION NTP_VERSION_FULL

NTP = ntp_$(NTP_VERSION_FULL)_amd64.deb
$(NTP)_SRC_PATH = $(SRC_PATH)/ntp
SONIC_MAKE_DEBS += $(NTP)
1 change: 1 addition & 0 deletions slave.mk
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
$(PYTHON_CLICK) \
$(SONIC_UTILS) \
$(BASH) \
$(NTP) \
$(LIBPAM_TACPLUS) \
$(LIBNSS_TACPLUS)) \
$$(addprefix $(TARGET_PATH)/,$$($$*_DOCKERS)) \
Expand Down
6 changes: 6 additions & 0 deletions sonic-slave/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,12 @@ RUN apt-get update && apt-get install -y \
qemu-kvm \
libvirt-bin

# For ntp
autogen \
libopts25-dev \
pps-tools \
dh-apparmor

# For jenkins slave
RUN apt-get -y install ca-certificates-java=20161107~bpo8+1 openjdk-8-jdk

Expand Down
28 changes: 28 additions & 0 deletions src/ntp/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
SHELL = /bin/bash
.ONESHELL:
.SHELLFLAGS += -e

MAIN_TARGET = ntp_$(NTP_VERSION_FULL)_amd64.deb

NTP_URL = http://cdn-fastly.deb.debian.org/debian/pool/main/n/ntp

DSC_FILE = ntp_$(NTP_VERSION_FULL).dsc
DSC_FILE_URL = $(NTP_URL)/$(DSC_FILE)

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
rm -rf ntp-$(NTP_VERSION)
dget -u $(DSC_FILE_URL)

pushd ntp-$(NTP_VERSION)

git init
git add -f *
git commit -m "original source files"

stg init
stg import -s ../patch/series

dpkg-buildpackage -us -uc -b -j$(SONIC_CONFIG_MAKE_JOBS)
popd

mv $* $(DEST)/
31 changes: 31 additions & 0 deletions src/ntp/patch/0001-donot-disable-reader-kernel-enobufs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
commit 1534de6d3ef2d188d1e2697f7180786ee5a8a9dc
Author: Praveen Chaudhary <[email protected]>
Date: Sat Feb 2 20:12:53 2019 -0800

[ntp_io.c]: Do not disable reader for error ENOBUFS.

Signed-off-by: Praveen Chaudhary<[email protected]>

diff --git a/ntpd/ntp_io.c b/ntpd/ntp_io.c
index f2a2404..fe5c94d 100644
--- a/ntpd/ntp_io.c
+++ b/ntpd/ntp_io.c
@@ -4430,10 +4430,14 @@ process_routing_msgs(struct asyncio_reader *reader)
cnt = read(reader->fd, buffer, sizeof(buffer));

if (cnt < 0) {
- msyslog(LOG_ERR,
- "i/o error on routing socket %m - disabling");
- remove_asyncio_reader(reader);
- delete_asyncio_reader(reader);
+ if (errno == ENOBUFS) {
+ msyslog(LOG_ERR, "routing socket reports: %m");
+ } else {
+ msyslog(LOG_ERR,
+ "i/o error on routing socket %m - disabling");
+ remove_asyncio_reader(reader);
+ delete_asyncio_reader(reader);
+ }
return;
}

1 change: 1 addition & 0 deletions src/ntp/patch/series
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0001-donot-disable-reader-kernel-enobufs.patch