added my Recipes

This commit is contained in:
2024-07-11 14:16:35 +02:00
parent 38bc4f53ac
commit 09b621d929
7118 changed files with 525762 additions and 3 deletions

View File

@@ -0,0 +1,40 @@
From e0c690acfcddd3c3421f6eb0182c54815fd70f8f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 14 Jul 2017 23:21:08 -0700
Subject: [PATCH] rdate: define logwtmp on libc != glibc
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/rdate.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/rdate.c b/src/rdate.c
index 943d481..685b1b8 100644
--- a/src/rdate.c
+++ b/src/rdate.c
@@ -41,7 +41,22 @@ static int print_mode = 0; // display the time
static int timeout = 10; // timeout for each connection attempt
static char *service = DEFAULT_SERVICE;
+#ifndef __GLIBC__
+static void logwtmp(const char * line, const char * name, const char * host)
+{
+ struct utmp u;
+ memset(&u, 0, sizeof(u));
+
+ u.ut_pid = getpid();
+ u.ut_type = name[0] ? USER_PROCESS : DEAD_PROCESS;
+ strncpy(u.ut_line, line, sizeof(u.ut_line));
+ strncpy(u.ut_name, name, sizeof(u.ut_name));
+ strncpy(u.ut_host, host, sizeof(u.ut_host));
+ gettimeofday(&(u.ut_tv), NULL);
+ updwtmp(_PATH_WTMP, &u);
+}
+#endif /* __GLIBC__ */
// Returns string from address info pointer
static char*
--
2.13.3

View File

@@ -0,0 +1,33 @@
From f58bcb43c31d08de58853b088681cbe4df36cbf9 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 26 Jun 2017 22:50:56 -0700
Subject: [PATCH] src/rdate: Fix printf format errors
Fixes
rdate.c:85:41: error: format not a string literal and no format arguments [-Werror=format-security]
| syslog(is_error?LOG_WARNING:LOG_INFO, buf);
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Submitted
src/rdate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/rdate.c b/src/rdate.c
index 5c3e829..943d481 100644
--- a/src/rdate.c
+++ b/src/rdate.c
@@ -82,7 +82,7 @@ write_log(int is_error, char *format, ...)
return; /* Error, which we can't report because this _is_ the error
reporting mechanism */
if(log_mode)
- syslog(is_error?LOG_WARNING:LOG_INFO, buf);
+ syslog(is_error?LOG_WARNING:LOG_INFO, "%s", buf);
if(is_error || print_mode)
fprintf(is_error?stderr:stdout, "%s: %s\n", argv0, buf);
}
--
2.13.2

View File

@@ -0,0 +1,21 @@
SUMMARY = "Tool for getting the date/time from a remote machine."
DESCRIPTION = "The rdate utility retrieves the date and time from \
another machine on your network, using the protocol described in RFC 868. \
If you run rdate as root, it will set your machine local time to the \
time of the machine that you queried. \
"
HOMEPAGE= "https://www.aelius.com/njh/rdate/"
SECTION = "Applications/System"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
SRC_URI = "https://www.aelius.com/njh/${BPN}/${BP}.tar.gz \
file://0001-src-rdate-Fix-printf-format-errors.patch \
file://0001-rdate-define-logwtmp-on-libc-glibc.patch \
"
SRC_URI[md5sum] = "0a4f612480777fdf25264ac03c57eae6"
SRC_URI[sha256sum] = "6e800053eaac2b21ff4486ec42f0aca7214941c7e5fceedd593fa0be99b9227d"
inherit autotools