From patchwork Thu Feb 25 21:55:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabe Evans X-Patchwork-Id: 588396 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 1DDEA14056B for ; Fri, 26 Feb 2016 08:57:34 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=hashrabbit.co header.i=@hashrabbit.co header.b=wInq3qP7; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id BD90095D43; Thu, 25 Feb 2016 21:57:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fkGm-2m3Kzxh; Thu, 25 Feb 2016 21:57:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 1F91995D79; Thu, 25 Feb 2016 21:57:30 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id A126C1C2E64 for ; Thu, 25 Feb 2016 21:57:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9F1CCA5F3C for ; Thu, 25 Feb 2016 21:57:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NgScdTcR8SfC for ; Thu, 25 Feb 2016 21:57:07 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pf0-f170.google.com (mail-pf0-f170.google.com [209.85.192.170]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 19EA288FC6 for ; Thu, 25 Feb 2016 21:57:07 +0000 (UTC) Received: by mail-pf0-f170.google.com with SMTP id x65so39663635pfb.1 for ; Thu, 25 Feb 2016 13:57:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hashrabbit.co; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ipwSQ5sv2JXCoN7zw6h6eXk88BWFLztHuYrPcQ8+M5E=; b=wInq3qP7G+rkbNQnWr8iynIVsbMQumnhWHphYOvwytlPTRRyqweIIlxUSCi+36z/RN LFA4gVpJXc3I9FT0i3s71W+FgIAiqCmkzC2plR305uUM2JOUBQ/XBtyV83HDlz/rUUyk D7KPEnhfrhaGbvmNpNYa6Z7tfFfSbeaXuoqn0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ipwSQ5sv2JXCoN7zw6h6eXk88BWFLztHuYrPcQ8+M5E=; b=bJvbMTp+Z41MDTN0dLnefhVqIt2/Yw/rj6fIQEebDr6pbrtCl3YLTZ7j4i2PDzKyEg QuH887kn+XuNNxhrDomAAXn0sDkiB+4IdVo8K5e4e5+tACC5p5hVqzOQixbVVIRNQoYo qZVXOcC8ZzTka63OLt4KFvTGzCLzCfaVOLPOKL6BvCahZQv8OD6lArVucKd/pkGACGVw bg68T0BKcLxPj2xHzKnOJ4ckkgq7BflEKmnvildWXeU13dAIWHsc6sjQUboXu1B7HcDF XwZbWWCKzXpeLB+k4IP2bAVM/6pe8TnXy+cIasnUCGL5zwKK5FXmUq+bHSNyYNgkH94u HTOg== X-Gm-Message-State: AG10YOS9ZP02LUtxA/2ZaEGavwYZSz+Ck35uk5qgK+wBmAtsIqEWv+IFKsfLis2HixNcMA== X-Received: by 10.98.34.209 with SMTP id p78mr66492265pfj.154.1456437426792; Thu, 25 Feb 2016 13:57:06 -0800 (PST) Received: from lab.us-west-1.compute.internal (ec2-54-183-105-171.us-west-1.compute.amazonaws.com. [54.183.105.171]) by smtp.gmail.com with ESMTPSA id r77sm14342649pfa.47.2016.02.25.13.57.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 25 Feb 2016 13:57:06 -0800 (PST) From: Gabe Evans To: buildroot@buildroot.org Date: Thu, 25 Feb 2016 21:55:18 +0000 Message-Id: <1456437341-19025-10-git-send-email-gabe@hashrabbit.co> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1456437341-19025-1-git-send-email-gabe@hashrabbit.co> References: <1456437341-19025-1-git-send-email-gabe@hashrabbit.co> Subject: [Buildroot] [PATCH 09/32] package/systemd: add support for specifying NTP servers X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Systemd warns against the use of using the default NTP servers: configure: WARNING: *** Using Google NTP servers. Do not ship OSes or devices with these default settings. See DISTRO_PORTING for details! DISTRO_PORTING notes that Google's NTP servers aren't actually a publicly offered service like Google Public DNS and that they serve non-standard time that can be up to .5s off. To avoid unexpected behavior in out-of-the-box builds, ntp.org is used as the default. Signed-off-by: Gabe Evans --- package/systemd/Config.in | 18 +++++++++++++++++- package/systemd/systemd.mk | 4 +++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/package/systemd/Config.in b/package/systemd/Config.in index 5d6759d..5d74383 100644 --- a/package/systemd/Config.in +++ b/package/systemd/Config.in @@ -107,6 +107,22 @@ config BR2_PACKAGE_SYSTEMD_TIMESYNCD http://www.freedesktop.org/software/systemd/man/systemd-timesyncd.html +if BR2_PACKAGE_SYSTEMD_TIMESYNCD + +config BR2_PACKAGE_SYSTEMD_NTP_SERVERS + string "default NTP servers" + default "0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org" + help + You may specify a space-separated list of default NTP servers for timesyncd + to use. + + Anyone distributing an appliance, operating system, or some other kind of + software using NTP can register their own vendor pool at ntp.org: + + http://www.pool.ntp.org/en/vendors.html + +endif # BR2_PACKAGE_SYSTEMD_TIMESYNCD + config BR2_PACKAGE_SYSTEMD_COMPAT bool "enable compatibility libraries" help @@ -134,4 +150,4 @@ config BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT When this feature is enabled, Systemd mounts smackfs and manages security labels for sockets. -endif +endif # BR2_PACKAGE_SYSTEMD diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk index 639b8a5..32bf41b 100644 --- a/package/systemd/systemd.mk +++ b/package/systemd/systemd.mk @@ -145,7 +145,9 @@ endef endif ifeq ($(BR2_PACKAGE_SYSTEMD_TIMESYNCD),y) -SYSTEMD_CONF_OPTS += --enable-timesyncd +SYSTEMD_CONF_OPTS += \ + --enable-timesyncd \ + --with-ntp-servers=$(BR2_PACKAGE_SYSTEMD_NTP_SERVERS) define SYSTEMD_INSTALL_SERVICE_TIMESYNC mkdir -p $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants ln -sf ../../../../lib/systemd/system/systemd-timesyncd.service \