All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-networking][PATCH V2 1/2] htpdate: Add recipe
@ 2018-06-15  3:31 Khem Raj
  2018-06-15  3:31 ` [meta-oe][PATCH V2 2/2] modemmanager: Fix build with musl provide canonicalize_file_name() Khem Raj
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Khem Raj @ 2018-06-15  3:31 UTC (permalink / raw)
  To: openembedded-devel

Fix build with musl

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Andreas Müller <schnitzeltony@gmail.com>
---
 ...ent-variables-assignments-to-be-weak.patch | 31 ++++++++++++++
 ...01-Replace-ntp_adjtime-with-adjtimex.patch | 40 +++++++++++++++++++
 .../recipes-support/htpdate/htpdate_1.2.0.bb  | 39 ++++++++++++++++++
 3 files changed, 110 insertions(+)
 create mode 100644 meta-networking/recipes-support/htpdate/htpdate/0001-Make-environment-variables-assignments-to-be-weak.patch
 create mode 100644 meta-networking/recipes-support/htpdate/htpdate/0001-Replace-ntp_adjtime-with-adjtimex.patch
 create mode 100644 meta-networking/recipes-support/htpdate/htpdate_1.2.0.bb

diff --git a/meta-networking/recipes-support/htpdate/htpdate/0001-Make-environment-variables-assignments-to-be-weak.patch b/meta-networking/recipes-support/htpdate/htpdate/0001-Make-environment-variables-assignments-to-be-weak.patch
new file mode 100644
index 0000000000..0ee44c1621
--- /dev/null
+++ b/meta-networking/recipes-support/htpdate/htpdate/0001-Make-environment-variables-assignments-to-be-weak.patch
@@ -0,0 +1,31 @@
+From 04603f52d793f964653e6a985944400fe4fa87ee Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 13 Jun 2018 17:50:20 -0700
+Subject: [PATCH] Make environment variables assignments to be weak
+
+So that OE can override them for cross builds
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 1c80c09..884126c 100644
+--- a/Makefile
++++ b/Makefile
+@@ -2,11 +2,11 @@ prefix = $(DESTDIR)/usr
+ bindir = ${prefix}/bin
+ mandir = ${prefix}/share/man
+ 
+-CC = gcc
++CC ?= gcc
+ CFLAGS += -Wall -std=c99 -pedantic -O2
+ 
+-INSTALL = /usr/bin/install -c
+-STRIP = /usr/bin/strip -s
++INSTALL ?= /usr/bin/install -c
++STRIP ?= /usr/bin/strip -s
+ 
+ all: htpdate
+ 
diff --git a/meta-networking/recipes-support/htpdate/htpdate/0001-Replace-ntp_adjtime-with-adjtimex.patch b/meta-networking/recipes-support/htpdate/htpdate/0001-Replace-ntp_adjtime-with-adjtimex.patch
new file mode 100644
index 0000000000..cca8c6c364
--- /dev/null
+++ b/meta-networking/recipes-support/htpdate/htpdate/0001-Replace-ntp_adjtime-with-adjtimex.patch
@@ -0,0 +1,40 @@
+From 75646a2d2df14fdbc4a01e222a779afac94861d1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 14 Jun 2018 20:11:08 -0700
+Subject: [PATCH] Replace ntp_adjtime with adjtimex.
+
+ntp_adjtime in glibc is an alias to adjtimex and
+musl does not provide ntp_adjtime at all
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ htpdate.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/htpdate.c b/htpdate.c
+index 4171efe..ff0bf8d 100644
+--- a/htpdate.c
++++ b/htpdate.c
+@@ -391,7 +391,7 @@ static int htpdate_adjtimex( double drift ) {
+ 
+ 	/* Read current kernel frequency */
+ 	tmx.modes = 0;
+-	ntp_adjtime(&tmx);
++	adjtimex(&tmx);
+ 
+ 	/* Calculate new frequency */
+ 	freq = (long)(65536e6 * drift);
+@@ -406,7 +406,7 @@ static int htpdate_adjtimex( double drift ) {
+ 
+ 	/* Become root */
+ 	swuid(0);
+-	return( ntp_adjtime(&tmx) );
++	return( adjtimex(&tmx) );
+ 
+ }
+ 
+-- 
+2.17.1
+
diff --git a/meta-networking/recipes-support/htpdate/htpdate_1.2.0.bb b/meta-networking/recipes-support/htpdate/htpdate_1.2.0.bb
new file mode 100644
index 0000000000..eb6787846b
--- /dev/null
+++ b/meta-networking/recipes-support/htpdate/htpdate_1.2.0.bb
@@ -0,0 +1,39 @@
+# Copyright (C) 2018 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "HTTP based time synchronization tool"
+
+DESCRIPTION = "The  HTTP Time Protocol (HTP) is used to synchronize a computer's time with\
+ web servers as reference time source. This program can be used instead\
+ ntpdate or similar, in networks that has a firewall blocking the NTP port.\
+ Htpdate will synchronize the computer time to Greenwich Mean Time (GMT),\
+ using the timestamps from HTTP headers found in web servers response (the\
+ HEAD method will be used to get the information).\
+ Htpdate works through proxy servers. Accuracy of htpdate will be usually\
+ within 0.5 seconds (better with multiple servers).\
+"
+
+HOMEPAGE = "http://www.vervest.org/htp/"
+
+LICENSE = "GPL-2.0+"
+LIC_FILES_CHKSUM = "file://htpdate.c;beginline=26;endline=30;md5=d7018a4d2c5a6eab392709a05e5e168a"
+
+SRC_URI = "http://www.vervest.org/htp/archive/c/htpdate-${PV}.tar.xz \
+           file://0001-Make-environment-variables-assignments-to-be-weak.patch \
+           file://0001-Replace-ntp_adjtime-with-adjtimex.patch \
+           "
+SRC_URI[md5sum] = "9d5ca69be06edf5d535b52b5f790da4e"
+SRC_URI[sha256sum] = "22b2cf3ec45b0eedecddd3ad2a3d754ac57942ae7dcbac410d254935f0bdbc03"
+
+do_configure () {
+	:
+}
+
+do_compile () {
+	oe_runmake
+}
+
+do_install () {
+	oe_runmake install 'INSTALL=install' 'STRIP=echo' 'DESTDIR=${D}'
+}
+
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [meta-oe][PATCH V2 2/2] modemmanager: Fix build with musl provide canonicalize_file_name()
  2018-06-15  3:31 [meta-networking][PATCH V2 1/2] htpdate: Add recipe Khem Raj
@ 2018-06-15  3:31 ` Khem Raj
  2018-06-15  7:47   ` Andreas Müller
  2018-06-15  7:41 ` [meta-networking][PATCH V2 1/2] htpdate: Add recipe Andreas Müller
  2018-06-15 13:59 ` akuster808
  2 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2018-06-15  3:31 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Changed in V2:
- Add Upstream-Status

 ...eck-for-canonicalize_file_name-befor.patch | 66 +++++++++++++++++++
 .../modemmanager/modemmanager_1.7.991.bb      |  4 +-
 2 files changed, 69 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-connectivity/modemmanager/modemmanager/0001-Add-configure-check-for-canonicalize_file_name-befor.patch

diff --git a/meta-oe/recipes-connectivity/modemmanager/modemmanager/0001-Add-configure-check-for-canonicalize_file_name-befor.patch b/meta-oe/recipes-connectivity/modemmanager/modemmanager/0001-Add-configure-check-for-canonicalize_file_name-befor.patch
new file mode 100644
index 0000000000..f3cf3d639b
--- /dev/null
+++ b/meta-oe/recipes-connectivity/modemmanager/modemmanager/0001-Add-configure-check-for-canonicalize_file_name-befor.patch
@@ -0,0 +1,66 @@
+From 07f1eda630517816bfa900e811963745a149e57c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jun 2018 20:38:30 -0700
+Subject: [PATCH] Add configure check for canonicalize_file_name() before use
+
+Define canonicalize_file_name API if not provided by system C library
+musl e.g. does not provide this API
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ configure.ac                                |  2 ++
+ src/kerneldevice/mm-kernel-device-generic.c | 18 ++++++++++++++++++
+ 2 files changed, 20 insertions(+)
+
+Index: ModemManager-1.7.991/configure.ac
+===================================================================
+--- ModemManager-1.7.991.orig/configure.ac
++++ ModemManager-1.7.991/configure.ac
+@@ -72,6 +72,8 @@ AC_SUBST(MM_GLIB_LT_CURRENT)
+ AC_SUBST(MM_GLIB_LT_REVISION)
+ AC_SUBST(MM_GLIB_LT_AGE)
+ 
++AC_CHECK_FUNCS([canonicalize_file_name])
++
+ dnl-----------------------------------------------------------------------------
+ dnl Documentation
+ dnl
+Index: ModemManager-1.7.991/src/kerneldevice/mm-kernel-device-generic.c
+===================================================================
+--- ModemManager-1.7.991.orig/src/kerneldevice/mm-kernel-device-generic.c
++++ ModemManager-1.7.991/src/kerneldevice/mm-kernel-device-generic.c
+@@ -21,6 +21,7 @@
+ #define _LIBMM_INSIDE_MM
+ #include <libmm-glib.h>
+ 
++#include "config.h"
+ #include "mm-kernel-device-generic.h"
+ #include "mm-kernel-device-generic-rules.h"
+ #include "mm-log.h"
+@@ -100,6 +101,24 @@ read_sysfs_property_as_string (const gch
+     return contents;
+ }
+ 
++#ifndef HAVE_CANONICALIZE_FILE_NAME
++#include <limits.h>
++#include <string.h>
++#include <stdlib.h>
++#include <stdio.h>
++static char * canonicalize_file_name(const char *path)
++{
++   char buf[PATH_MAX] = { };
++
++   snprintf(buf, sizeof(buf) - 1, "%s", path);
++
++   if (!realpath(path, buf))
++       return NULL;
++
++   return strdup(buf);
++}
++#endif
++
+ /*****************************************************************************/
+ /* Load contents */
+ 
diff --git a/meta-oe/recipes-connectivity/modemmanager/modemmanager_1.7.991.bb b/meta-oe/recipes-connectivity/modemmanager/modemmanager_1.7.991.bb
index b1a718dbfb..26b56d17d0 100644
--- a/meta-oe/recipes-connectivity/modemmanager/modemmanager_1.7.991.bb
+++ b/meta-oe/recipes-connectivity/modemmanager/modemmanager_1.7.991.bb
@@ -11,7 +11,9 @@ inherit gnomebase gettext systemd vala gobject-introspection bash-completion
 
 DEPENDS = "glib-2.0 libgudev dbus-glib intltool-native"
 
-SRC_URI = "http://www.freedesktop.org/software/ModemManager/ModemManager-${PV}.tar.xz"
+SRC_URI = "http://www.freedesktop.org/software/ModemManager/ModemManager-${PV}.tar.xz \
+           file://0001-Add-configure-check-for-canonicalize_file_name-befor.patch \
+           "
 
 SRC_URI[md5sum] = "4efe6a240cef212bf8855c95424e7c7f"
 SRC_URI[sha256sum] = "4e366243bd4983f2e6efe35cb901cf5da51939307b5d6299fe622a9fcf411745"
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [meta-networking][PATCH V2 1/2] htpdate: Add recipe
  2018-06-15  3:31 [meta-networking][PATCH V2 1/2] htpdate: Add recipe Khem Raj
  2018-06-15  3:31 ` [meta-oe][PATCH V2 2/2] modemmanager: Fix build with musl provide canonicalize_file_name() Khem Raj
@ 2018-06-15  7:41 ` Andreas Müller
  2018-06-15 13:59 ` akuster808
  2 siblings, 0 replies; 6+ messages in thread
From: Andreas Müller @ 2018-06-15  7:41 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembeded-devel

On Fri, Jun 15, 2018 at 5:31 AM, Khem Raj <raj.khem@gmail.com> wrote:
> Fix build with musl
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> Cc: Andreas Müller <schnitzeltony@gmail.com>
> ---
Acked-by: Andreas Müller <schnitzeltony@gmail.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [meta-oe][PATCH V2 2/2] modemmanager: Fix build with musl provide canonicalize_file_name()
  2018-06-15  3:31 ` [meta-oe][PATCH V2 2/2] modemmanager: Fix build with musl provide canonicalize_file_name() Khem Raj
@ 2018-06-15  7:47   ` Andreas Müller
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Müller @ 2018-06-15  7:47 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembeded-devel

On Fri, Jun 15, 2018 at 5:31 AM, Khem Raj <raj.khem@gmail.com> wrote:
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> Changed in V2:
> - Add Upstream-Status
Thanks - although I hoped for 'submitted' :)

Acked-by: Andreas Müller <schnitzeltony@gmail.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [meta-networking][PATCH V2 1/2] htpdate: Add recipe
  2018-06-15  3:31 [meta-networking][PATCH V2 1/2] htpdate: Add recipe Khem Raj
  2018-06-15  3:31 ` [meta-oe][PATCH V2 2/2] modemmanager: Fix build with musl provide canonicalize_file_name() Khem Raj
  2018-06-15  7:41 ` [meta-networking][PATCH V2 1/2] htpdate: Add recipe Andreas Müller
@ 2018-06-15 13:59 ` akuster808
  2018-06-15 14:45   ` Khem Raj
  2 siblings, 1 reply; 6+ messages in thread
From: akuster808 @ 2018-06-15 13:59 UTC (permalink / raw)
  To: Khem Raj, openembedded-devel



On 06/14/2018 08:31 PM, Khem Raj wrote:
> Fix build with musl

what version of musl?

- armin
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> Cc: Andreas Müller <schnitzeltony@gmail.com>
> ---
>  ...ent-variables-assignments-to-be-weak.patch | 31 ++++++++++++++
>  ...01-Replace-ntp_adjtime-with-adjtimex.patch | 40 +++++++++++++++++++
>  .../recipes-support/htpdate/htpdate_1.2.0.bb  | 39 ++++++++++++++++++
>  3 files changed, 110 insertions(+)
>  create mode 100644 meta-networking/recipes-support/htpdate/htpdate/0001-Make-environment-variables-assignments-to-be-weak.patch
>  create mode 100644 meta-networking/recipes-support/htpdate/htpdate/0001-Replace-ntp_adjtime-with-adjtimex.patch
>  create mode 100644 meta-networking/recipes-support/htpdate/htpdate_1.2.0.bb
>
> diff --git a/meta-networking/recipes-support/htpdate/htpdate/0001-Make-environment-variables-assignments-to-be-weak.patch b/meta-networking/recipes-support/htpdate/htpdate/0001-Make-environment-variables-assignments-to-be-weak.patch
> new file mode 100644
> index 0000000000..0ee44c1621
> --- /dev/null
> +++ b/meta-networking/recipes-support/htpdate/htpdate/0001-Make-environment-variables-assignments-to-be-weak.patch
> @@ -0,0 +1,31 @@
> +From 04603f52d793f964653e6a985944400fe4fa87ee Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Wed, 13 Jun 2018 17:50:20 -0700
> +Subject: [PATCH] Make environment variables assignments to be weak
> +
> +So that OE can override them for cross builds
> +
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +---
> + Makefile | 6 +++---
> + 1 file changed, 3 insertions(+), 3 deletions(-)
> +
> +diff --git a/Makefile b/Makefile
> +index 1c80c09..884126c 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -2,11 +2,11 @@ prefix = $(DESTDIR)/usr
> + bindir = ${prefix}/bin
> + mandir = ${prefix}/share/man
> + 
> +-CC = gcc
> ++CC ?= gcc
> + CFLAGS += -Wall -std=c99 -pedantic -O2
> + 
> +-INSTALL = /usr/bin/install -c
> +-STRIP = /usr/bin/strip -s
> ++INSTALL ?= /usr/bin/install -c
> ++STRIP ?= /usr/bin/strip -s
> + 
> + all: htpdate
> + 
> diff --git a/meta-networking/recipes-support/htpdate/htpdate/0001-Replace-ntp_adjtime-with-adjtimex.patch b/meta-networking/recipes-support/htpdate/htpdate/0001-Replace-ntp_adjtime-with-adjtimex.patch
> new file mode 100644
> index 0000000000..cca8c6c364
> --- /dev/null
> +++ b/meta-networking/recipes-support/htpdate/htpdate/0001-Replace-ntp_adjtime-with-adjtimex.patch
> @@ -0,0 +1,40 @@
> +From 75646a2d2df14fdbc4a01e222a779afac94861d1 Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Thu, 14 Jun 2018 20:11:08 -0700
> +Subject: [PATCH] Replace ntp_adjtime with adjtimex.
> +
> +ntp_adjtime in glibc is an alias to adjtimex and
> +musl does not provide ntp_adjtime at all
> +
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +---
> +Upstream-Status: Pending
> +
> + htpdate.c | 4 ++--
> + 1 file changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/htpdate.c b/htpdate.c
> +index 4171efe..ff0bf8d 100644
> +--- a/htpdate.c
> ++++ b/htpdate.c
> +@@ -391,7 +391,7 @@ static int htpdate_adjtimex( double drift ) {
> + 
> + 	/* Read current kernel frequency */
> + 	tmx.modes = 0;
> +-	ntp_adjtime(&tmx);
> ++	adjtimex(&tmx);
> + 
> + 	/* Calculate new frequency */
> + 	freq = (long)(65536e6 * drift);
> +@@ -406,7 +406,7 @@ static int htpdate_adjtimex( double drift ) {
> + 
> + 	/* Become root */
> + 	swuid(0);
> +-	return( ntp_adjtime(&tmx) );
> ++	return( adjtimex(&tmx) );
> + 
> + }
> + 
> +-- 
> +2.17.1
> +
> diff --git a/meta-networking/recipes-support/htpdate/htpdate_1.2.0.bb b/meta-networking/recipes-support/htpdate/htpdate_1.2.0.bb
> new file mode 100644
> index 0000000000..eb6787846b
> --- /dev/null
> +++ b/meta-networking/recipes-support/htpdate/htpdate_1.2.0.bb
> @@ -0,0 +1,39 @@
> +# Copyright (C) 2018 Khem Raj <raj.khem@gmail.com>
> +# Released under the MIT license (see COPYING.MIT for the terms)
> +
> +SUMMARY = "HTTP based time synchronization tool"
> +
> +DESCRIPTION = "The  HTTP Time Protocol (HTP) is used to synchronize a computer's time with\
> + web servers as reference time source. This program can be used instead\
> + ntpdate or similar, in networks that has a firewall blocking the NTP port.\
> + Htpdate will synchronize the computer time to Greenwich Mean Time (GMT),\
> + using the timestamps from HTTP headers found in web servers response (the\
> + HEAD method will be used to get the information).\
> + Htpdate works through proxy servers. Accuracy of htpdate will be usually\
> + within 0.5 seconds (better with multiple servers).\
> +"
> +
> +HOMEPAGE = "http://www.vervest.org/htp/"
> +
> +LICENSE = "GPL-2.0+"
> +LIC_FILES_CHKSUM = "file://htpdate.c;beginline=26;endline=30;md5=d7018a4d2c5a6eab392709a05e5e168a"
> +
> +SRC_URI = "http://www.vervest.org/htp/archive/c/htpdate-${PV}.tar.xz \
> +           file://0001-Make-environment-variables-assignments-to-be-weak.patch \
> +           file://0001-Replace-ntp_adjtime-with-adjtimex.patch \
> +           "
> +SRC_URI[md5sum] = "9d5ca69be06edf5d535b52b5f790da4e"
> +SRC_URI[sha256sum] = "22b2cf3ec45b0eedecddd3ad2a3d754ac57942ae7dcbac410d254935f0bdbc03"
> +
> +do_configure () {
> +	:
> +}
> +
> +do_compile () {
> +	oe_runmake
> +}
> +
> +do_install () {
> +	oe_runmake install 'INSTALL=install' 'STRIP=echo' 'DESTDIR=${D}'
> +}
> +



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [meta-networking][PATCH V2 1/2] htpdate: Add recipe
  2018-06-15 13:59 ` akuster808
@ 2018-06-15 14:45   ` Khem Raj
  0 siblings, 0 replies; 6+ messages in thread
From: Khem Raj @ 2018-06-15 14:45 UTC (permalink / raw)
  To: Armin Kuster; +Cc: openembeded-devel

On Fri, Jun 15, 2018 at 6:59 AM akuster808 <akuster808@gmail.com> wrote:
>
>
>
> On 06/14/2018 08:31 PM, Khem Raj wrote:
> > Fix build with musl
>
> what version of musl?
>

Dont get your question why musl version is impaortant but it is
against the version
that is currently in OE-Core 1.1.19+

> - armin
> >
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > Cc: Andreas Müller <schnitzeltony@gmail.com>
> > ---
> >  ...ent-variables-assignments-to-be-weak.patch | 31 ++++++++++++++
> >  ...01-Replace-ntp_adjtime-with-adjtimex.patch | 40 +++++++++++++++++++
> >  .../recipes-support/htpdate/htpdate_1.2.0.bb  | 39 ++++++++++++++++++
> >  3 files changed, 110 insertions(+)
> >  create mode 100644 meta-networking/recipes-support/htpdate/htpdate/0001-Make-environment-variables-assignments-to-be-weak.patch
> >  create mode 100644 meta-networking/recipes-support/htpdate/htpdate/0001-Replace-ntp_adjtime-with-adjtimex.patch
> >  create mode 100644 meta-networking/recipes-support/htpdate/htpdate_1.2.0.bb
> >
> > diff --git a/meta-networking/recipes-support/htpdate/htpdate/0001-Make-environment-variables-assignments-to-be-weak.patch b/meta-networking/recipes-support/htpdate/htpdate/0001-Make-environment-variables-assignments-to-be-weak.patch
> > new file mode 100644
> > index 0000000000..0ee44c1621
> > --- /dev/null
> > +++ b/meta-networking/recipes-support/htpdate/htpdate/0001-Make-environment-variables-assignments-to-be-weak.patch
> > @@ -0,0 +1,31 @@
> > +From 04603f52d793f964653e6a985944400fe4fa87ee Mon Sep 17 00:00:00 2001
> > +From: Khem Raj <raj.khem@gmail.com>
> > +Date: Wed, 13 Jun 2018 17:50:20 -0700
> > +Subject: [PATCH] Make environment variables assignments to be weak
> > +
> > +So that OE can override them for cross builds
> > +
> > +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > +---
> > + Makefile | 6 +++---
> > + 1 file changed, 3 insertions(+), 3 deletions(-)
> > +
> > +diff --git a/Makefile b/Makefile
> > +index 1c80c09..884126c 100644
> > +--- a/Makefile
> > ++++ b/Makefile
> > +@@ -2,11 +2,11 @@ prefix = $(DESTDIR)/usr
> > + bindir = ${prefix}/bin
> > + mandir = ${prefix}/share/man
> > +
> > +-CC = gcc
> > ++CC ?= gcc
> > + CFLAGS += -Wall -std=c99 -pedantic -O2
> > +
> > +-INSTALL = /usr/bin/install -c
> > +-STRIP = /usr/bin/strip -s
> > ++INSTALL ?= /usr/bin/install -c
> > ++STRIP ?= /usr/bin/strip -s
> > +
> > + all: htpdate
> > +
> > diff --git a/meta-networking/recipes-support/htpdate/htpdate/0001-Replace-ntp_adjtime-with-adjtimex.patch b/meta-networking/recipes-support/htpdate/htpdate/0001-Replace-ntp_adjtime-with-adjtimex.patch
> > new file mode 100644
> > index 0000000000..cca8c6c364
> > --- /dev/null
> > +++ b/meta-networking/recipes-support/htpdate/htpdate/0001-Replace-ntp_adjtime-with-adjtimex.patch
> > @@ -0,0 +1,40 @@
> > +From 75646a2d2df14fdbc4a01e222a779afac94861d1 Mon Sep 17 00:00:00 2001
> > +From: Khem Raj <raj.khem@gmail.com>
> > +Date: Thu, 14 Jun 2018 20:11:08 -0700
> > +Subject: [PATCH] Replace ntp_adjtime with adjtimex.
> > +
> > +ntp_adjtime in glibc is an alias to adjtimex and
> > +musl does not provide ntp_adjtime at all
> > +
> > +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > +---
> > +Upstream-Status: Pending
> > +
> > + htpdate.c | 4 ++--
> > + 1 file changed, 2 insertions(+), 2 deletions(-)
> > +
> > +diff --git a/htpdate.c b/htpdate.c
> > +index 4171efe..ff0bf8d 100644
> > +--- a/htpdate.c
> > ++++ b/htpdate.c
> > +@@ -391,7 +391,7 @@ static int htpdate_adjtimex( double drift ) {
> > +
> > +     /* Read current kernel frequency */
> > +     tmx.modes = 0;
> > +-    ntp_adjtime(&tmx);
> > ++    adjtimex(&tmx);
> > +
> > +     /* Calculate new frequency */
> > +     freq = (long)(65536e6 * drift);
> > +@@ -406,7 +406,7 @@ static int htpdate_adjtimex( double drift ) {
> > +
> > +     /* Become root */
> > +     swuid(0);
> > +-    return( ntp_adjtime(&tmx) );
> > ++    return( adjtimex(&tmx) );
> > +
> > + }
> > +
> > +--
> > +2.17.1
> > +
> > diff --git a/meta-networking/recipes-support/htpdate/htpdate_1.2.0.bb b/meta-networking/recipes-support/htpdate/htpdate_1.2.0.bb
> > new file mode 100644
> > index 0000000000..eb6787846b
> > --- /dev/null
> > +++ b/meta-networking/recipes-support/htpdate/htpdate_1.2.0.bb
> > @@ -0,0 +1,39 @@
> > +# Copyright (C) 2018 Khem Raj <raj.khem@gmail.com>
> > +# Released under the MIT license (see COPYING.MIT for the terms)
> > +
> > +SUMMARY = "HTTP based time synchronization tool"
> > +
> > +DESCRIPTION = "The  HTTP Time Protocol (HTP) is used to synchronize a computer's time with\
> > + web servers as reference time source. This program can be used instead\
> > + ntpdate or similar, in networks that has a firewall blocking the NTP port.\
> > + Htpdate will synchronize the computer time to Greenwich Mean Time (GMT),\
> > + using the timestamps from HTTP headers found in web servers response (the\
> > + HEAD method will be used to get the information).\
> > + Htpdate works through proxy servers. Accuracy of htpdate will be usually\
> > + within 0.5 seconds (better with multiple servers).\
> > +"
> > +
> > +HOMEPAGE = "http://www.vervest.org/htp/"
> > +
> > +LICENSE = "GPL-2.0+"
> > +LIC_FILES_CHKSUM = "file://htpdate.c;beginline=26;endline=30;md5=d7018a4d2c5a6eab392709a05e5e168a"
> > +
> > +SRC_URI = "http://www.vervest.org/htp/archive/c/htpdate-${PV}.tar.xz \
> > +           file://0001-Make-environment-variables-assignments-to-be-weak.patch \
> > +           file://0001-Replace-ntp_adjtime-with-adjtimex.patch \
> > +           "
> > +SRC_URI[md5sum] = "9d5ca69be06edf5d535b52b5f790da4e"
> > +SRC_URI[sha256sum] = "22b2cf3ec45b0eedecddd3ad2a3d754ac57942ae7dcbac410d254935f0bdbc03"
> > +
> > +do_configure () {
> > +     :
> > +}
> > +
> > +do_compile () {
> > +     oe_runmake
> > +}
> > +
> > +do_install () {
> > +     oe_runmake install 'INSTALL=install' 'STRIP=echo' 'DESTDIR=${D}'
> > +}
> > +
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-06-15 14:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-15  3:31 [meta-networking][PATCH V2 1/2] htpdate: Add recipe Khem Raj
2018-06-15  3:31 ` [meta-oe][PATCH V2 2/2] modemmanager: Fix build with musl provide canonicalize_file_name() Khem Raj
2018-06-15  7:47   ` Andreas Müller
2018-06-15  7:41 ` [meta-networking][PATCH V2 1/2] htpdate: Add recipe Andreas Müller
2018-06-15 13:59 ` akuster808
2018-06-15 14:45   ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.