diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-03-20 00:40:44 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-03-20 00:40:44 +0000 |
commit | 4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch) | |
tree | 356496503d52354aa6d9f2d36126302fed5f3a73 /net-misc/rdate | |
parent | fcc5224904648a8e6eb528d7603154160a20022f (diff) |
gentoo resync : 20.03.2022
Diffstat (limited to 'net-misc/rdate')
-rw-r--r-- | net-misc/rdate/Manifest | 6 | ||||
-rw-r--r-- | net-misc/rdate/files/rdate-1.10.2-fix-musl-compat-stdint.patch | 180 | ||||
-rw-r--r-- | net-misc/rdate/files/rdate-1.10.2-respect-AR.patch | 40 | ||||
-rw-r--r-- | net-misc/rdate/rdate-1.10.2.ebuild | 15 | ||||
-rw-r--r-- | net-misc/rdate/rdate-1.11.ebuild | 33 |
5 files changed, 267 insertions, 7 deletions
diff --git a/net-misc/rdate/Manifest b/net-misc/rdate/Manifest index df308ac1bfef..776b3ad8712c 100644 --- a/net-misc/rdate/Manifest +++ b/net-misc/rdate/Manifest @@ -1,7 +1,11 @@ +AUX rdate-1.10.2-fix-musl-compat-stdint.patch 4574 BLAKE2B 8228b520bc94c1fce70416035ed4eeafb98c96ed05171eed18f914b6d4a6516fc232f9a46cc22e3a9413fa7d1a8dd3837dc2f67e5a8cc0c315fd1ad9a21ce972 SHA512 85c3cc5ead5a5909ac613e37a2ddf7d837dba8a57b162d72ccb473bf679a2c1d4783fcf3e7fd44ca388146ee999d3dc7e63a9a68ab8f1b6203207f39980c5c49 +AUX rdate-1.10.2-respect-AR.patch 1117 BLAKE2B ad992ef817847c39c779eb1a251df905b3a9c0c70487433dcb22014717c4b10486d06237bc2b12b6827c7016321a88950ff8d40a5072b81d5e9bf8a2a0f834cf SHA512 66912901b7b052203af8c39de81aab08f9c512d46c8eaf2174fc936c7bdeb7a045ad56cbfb81b65dca7cb8790c95174b4021ce227289f4e4edb63d21020e9409 AUX rdate-confd 509 BLAKE2B 92826ed23b867063c8cf1145e7a2f62fe6a904593eca1add05971f06773ae992f08e58bb4f5367660e93937baf7bf3d0fe35a508bdaea44bca104c0871cf6ba8 SHA512 1ebc27949cf5c68828e00cacb20644b6c6b0e833c23b4f9e31144f0e47c10daa06b82909198227cdc7018939cbae09f2fe53de69aa84c8b9a8ecb0ab9eaf1f8f AUX rdate-initd-1.4-r3 525 BLAKE2B 8533f2b589aa860d88a7cdf18931b2a5800a1d82a78db576dfb12189f4b3391535bff5896ef75d6b3ef7373e1ad86c86a82f7422f4c404af8b9b3e414aaad59c SHA512 8563dedff5b2188d5176a882e36d4c8cdab4709ca40e86eb9c76e30f91c3eb78d1da8f971d2c2f4189ef801413e173367d2a8a2b9b37608ef6a84a0e73e39157 DIST rdate-1.10.2.tar.gz 19839 BLAKE2B d51ff68303a05abd8049abebafd76a01d8dedff6a294057640989989f851f1b381d75f2ad7ab94a850de76c485340770e06cf086225d641a2fee6d43112b473f SHA512 6e3759e73c05532b54f004592989572f78a0cfef7a2af1ae33708c9d239b63203702466664d39701afbc0012ff53fbf0bc3917ad8bb3df3322c4b613fd2e8aba DIST rdate-1.10.tar.gz 19159 BLAKE2B 71c858b5eb10b07a2974fcb463a91808fc59582dfce786dc936370b3fc2122bfe72cc32cb3635a1e77ec663fd44712852ab85d8ba46702d1e222ec63ad46f3bb SHA512 7a7647102b5663218fff6c1364b83250a199a0169adf40db87a49709aa24c3b1fae5acf01732d5432fcb2883d29a24b2ae38cf5333ff75075e5d7a6fd90e7146 -EBUILD rdate-1.10.2.ebuild 917 BLAKE2B 865820dd26fb43906f1f6f90dd2f746f18aca5817a5ec5ded14f93013513b47c9b715ed1bc24d4da3097a136588106efad5bd286186861b9b20bd322ffd379e9 SHA512 864a33b2bd39263cc8c4b217275dd6d484605c5103dd2c15633cb74c479db63bae83b91fe98e51e0a76a21065c0219b0ebf02f37f772220bc7987d872d65e249 +DIST rdate-1.11.tar.gz 20210 BLAKE2B 0ff4abebe08f33b45c753dd2912c36e3895c1745b2d78340c7574116f50cd4d05364c5bee97e883b7ad587fcd5261931d928689cd583aa86b43aac408d2a4a6d SHA512 916952c26cdd51c8666bf62cdd823cf8a07fd4487fbf73213d529525b31a90f056120ea2ff16e6d37ea7c662853ba3c15789fef90724b2dbf17c21a6ff3f415d +EBUILD rdate-1.10.2.ebuild 857 BLAKE2B 8970e5d2d8a0e6b77addb0b09d25ac975a8c10e34e1615a6780eae75d2fa1761434b81810c3c9524c3c78df854852548925457e7d713e935d03877266b4b58cd SHA512 a0fc238d98e0217ff2a79faf32570d1018dbe3e2c3339e3da8f5151dc55ffa4619f9e3bc295f5dddbf0f8a4dbfe768118d092344e0afc2cde6e3a072c1e6968d EBUILD rdate-1.10.ebuild 743 BLAKE2B a3241a2734fbde24280b2a78cbd91b11151d7536504ef01229dca386198c524f417b7c4714e1788a77ffe77515fcbf2b9c92cdb3d0523d1f899fc20a866a29ae SHA512 582511eb5b1c66b6575a4cf7f2e8a9663013a612f25943213d392e418e1f3b8b0786cb8ce45446b84250c3336c0838e72b6a220b2ba78ed7a687c89b4655b480 +EBUILD rdate-1.11.ebuild 750 BLAKE2B 16b8d6cb39bca95bcbfccee9829504ed20dbb512fd533ecdc5e72bdf56c9a2f161a74d5ab08e869d5a4bb93c215c5d9a30bf2aee347662734d5c492fe9c26c9a SHA512 9512a4afe11a5c40c0388f2df68e90ab40315f452ee673d3eb8e600c34457aa44a0710fe33de824cf8cbb46c2028b9b6cab06cae4323aaa349186f9feba7ece5 MISC metadata.xml 217 BLAKE2B fbec54484edc2603e95c90cb231985ef0f5f8d2cd48632ac8a097a4dac165499ff4cc087b1ca9ba6a4368bbb73b3af1ee99622a80df17072e1a340c345a2ee64 SHA512 7d3fc456b183fe7bdea26fb6edce39f702741a762b74cd7d2159a0ba85af50ebc87fbd921c926692a6164d50c9faf6b19680ab96528819bb06aaeac679e42de2 diff --git a/net-misc/rdate/files/rdate-1.10.2-fix-musl-compat-stdint.patch b/net-misc/rdate/files/rdate-1.10.2-fix-musl-compat-stdint.patch new file mode 100644 index 000000000000..a6ff70b353d5 --- /dev/null +++ b/net-misc/rdate/files/rdate-1.10.2-fix-musl-compat-stdint.patch @@ -0,0 +1,180 @@ +https://github.com/resurrecting-open-source-projects/openrdate/pull/3 + +From: Sam James <sam@gentoo.org> +Date: Thu, 3 Feb 2022 09:23:35 +0000 +Subject: [PATCH] Use <stdint.h> to fix musl compatibility + +uint32_t and friends are provided by <stdint.h> and the types +previously being relied on are non-standard, so let's swap. + +This fixes building rdate on e.g. musl rather than glibc. + +Bug: https://bugs.gentoo.org/832554 +Signed-off-by: Sam James <sam@gentoo.org> +--- a/src/ntp.c ++++ b/src/ntp.c +@@ -52,6 +52,7 @@ + #include <netdb.h> + #include <stdio.h> + #include <stdlib.h> ++#include <stdint.h> + #include <string.h> + #include <time.h> + #include <unistd.h> +@@ -106,11 +107,11 @@ struct ntp_data { + double receive; + double transmit; + double current; +- u_int64_t recvck; ++ uint64_t recvck; + + /* Local State */ + double originate; +- u_int64_t xmitck; ++ uint64_t xmitck; + }; + + void ntp_client(const char *, int, struct timeval *, struct timeval *, int, int, int); +@@ -282,7 +283,7 @@ write_packet(int fd, struct ntp_data *data) + + packet[0] = (NTP_VERSION << 3) | (NTP_MODE_CLIENT); + +- data->xmitck = (u_int64_t)arc4random() << 32 | arc4random(); ++ data->xmitck = (uint64_t)arc4random() << 32 | arc4random(); + + /* + * Send out a random 64-bit number as our transmit time. The NTP +@@ -300,7 +301,7 @@ write_packet(int fd, struct ntp_data *data) + * the transmit field intelligible. + */ + +- *(u_int64_t *)(packet + NTP_TRANSMIT) = data->xmitck; ++ *(uint64_t *)(packet + NTP_TRANSMIT) = data->xmitck; + + data->originate = current_time(JAN_1970); + +@@ -453,7 +454,7 @@ double + current_time(double offset) + { + struct timeval current; +- u_int64_t t; ++ uint64_t t; + + if (gettimeofday(¤t, NULL)) + err(1, "Could not get local time of day"); +--- a/src/ntpleaps.c ++++ b/src/ntpleaps.c +@@ -45,12 +45,13 @@ + #include <fcntl.h> + #include <stdio.h> + #include <stdlib.h> ++#include <stdint.h> + #include <string.h> + #include <unistd.h> + + #include "ntpleaps.h" + +-static u_int64_t *leapsecs; ++static uint64_t *leapsecs; + static unsigned int leapsecs_num; + + +@@ -81,10 +82,10 @@ ntpleaps_init(void) + } + + int +-ntpleaps_sub(u_int64_t *t) ++ntpleaps_sub(uint64_t *t) + { + unsigned int i = 0; +- u_int64_t u; ++ uint64_t u; + int r = 1; + + if (ntpleaps_init() == -1) +@@ -105,10 +106,10 @@ ntpleaps_sub(u_int64_t *t) + return (r); + } + +-u_int32_t +-read_be_dword(u_int8_t *ptr) ++uint32_t ++read_be_dword(uint8_t *ptr) + { +- u_int32_t res; ++ uint32_t res; + + memcpy(&res, ptr, 4); + return (ntohl(res)); +@@ -120,10 +121,10 @@ ntpleaps_read(void) + { + int fd; + unsigned int r; +- u_int8_t buf[32]; +- u_int32_t m1, m2, m3; +- u_int64_t s; +- u_int64_t *l; ++ uint8_t buf[32]; ++ uint32_t m1, m2, m3; ++ uint64_t s; ++ uint64_t *l; + + fd = open("/usr/share/zoneinfo/right/UTC", O_RDONLY | O_NDELAY); + if (fd == -1) +@@ -153,7 +154,7 @@ ntpleaps_read(void) + close(fd); + return (-1); + } +- if ((l = (u_int64_t *)malloc(r << 3)) == NULL) { ++ if ((l = (uint64_t *)malloc(r << 3)) == NULL) { + close(fd); + return (-1); + } +--- a/src/ntpleaps.h ++++ b/src/ntpleaps.h +@@ -46,11 +46,13 @@ + #ifndef _NTPLEAPS_H + #define _NTPLEAPS_H + ++#include <stdint.h> ++ + /* Offset between struct timeval.tv_sec and a tai64_t */ + #define NTPLEAPS_OFFSET (4611686018427387914ULL) + + /* Hide this ugly value from programmes */ +-#define SEC_TO_TAI64(s) (NTPLEAPS_OFFSET + (u_int64_t)(s)) ++#define SEC_TO_TAI64(s) (NTPLEAPS_OFFSET + (uint64_t)(s)) + #define TAI64_TO_SEC(t) ((t) - NTPLEAPS_OFFSET) + + /* Initializes the leap second table. Does not need to be called +@@ -70,6 +72,6 @@ int ntpleaps_read(void); + * to posix clock tick time. + * returns 0 on success, -1 on error (time is unchanged), 1 on leap second + */ +-int ntpleaps_sub(u_int64_t *); ++int ntpleaps_sub(uint64_t *); + + #endif +--- a/src/rfc868time.c ++++ b/src/rfc868time.c +@@ -50,6 +50,7 @@ + #include <stdio.h> + #include <ctype.h> + #include <err.h> ++#include <stdint.h> + #include <string.h> + #include <netdb.h> + #include <unistd.h> +@@ -68,10 +69,10 @@ rfc868time_client (const char *hostname, int family, struct timeval *new, + { + struct addrinfo hints, *res0, *res; + struct timeval old; +- u_int32_t tim; /* RFC 868 states clearly this is an uint32 */ ++ uint32_t tim; /* RFC 868 states clearly this is an uint32 */ + int s; + int error; +- u_int64_t td; ++ uint64_t td; + + memset(&hints, 0, sizeof(hints)); + hints.ai_family = family; diff --git a/net-misc/rdate/files/rdate-1.10.2-respect-AR.patch b/net-misc/rdate/files/rdate-1.10.2-respect-AR.patch new file mode 100644 index 000000000000..05289f3453c9 --- /dev/null +++ b/net-misc/rdate/files/rdate-1.10.2-respect-AR.patch @@ -0,0 +1,40 @@ +https://github.com/resurrecting-open-source-projects/openrdate/pull/4 + +From: Sam James <sam@gentoo.org> +Date: Thu, 3 Feb 2022 09:30:53 +0000 +Subject: [PATCH] Respect AR from environment + +Detect `AR` from the environment (first the AR environment variable, but +failing that, ${CHOST}-ar). This allows using different toolchains (e.g. +Clang and LLVM's tooling) and also facilitates cross-compilation. + +Bug: https://bugs.gentoo.org/729998 +Signed-off-by: Sam James <sam@gentoo.org> +--- a/configure.ac ++++ b/configure.ac +@@ -11,6 +11,8 @@ AC_CONFIG_SRCDIR([src/rdate.c]) + AC_CONFIG_HEADERS([config.h]) + AC_ARG_VAR([kernel_version], [the version of the kernel to build against]) + ++AC_CANONICAL_HOST ++ + # Checks for programs. + AC_PROG_CC + +@@ -22,6 +24,8 @@ AC_PROG_INSTALL + AC_PROG_RANLIB + AC_PROG_EGREP + ++AM_PROG_AR ++ + # Checks for libraries. + AC_CHECK_LIB([c], [fork]) + AC_CHECK_LIB([util], [malloc]) +@@ -52,7 +56,6 @@ AC_CHECK_FUNCS([gettimeofday memset select socket]) + AC_PATH_PROG([UNAME], [uname], + [:]) + +-AC_CANONICAL_HOST + # Determine the particulars of the host + case "${host}" in + *-*-linux*) diff --git a/net-misc/rdate/rdate-1.10.2.ebuild b/net-misc/rdate/rdate-1.10.2.ebuild index 85c5f91b3cf8..f64d1f48a116 100644 --- a/net-misc/rdate/rdate-1.10.2.ebuild +++ b/net-misc/rdate/rdate-1.10.2.ebuild @@ -1,11 +1,11 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 MY_P="openrdate" -inherit autotools toolchain-funcs +inherit autotools DESCRIPTION="Use TCP or UDP to retrieve the current time of another machine" HOMEPAGE="https://github.com/resurrecting-open-source-projects/openrdate" @@ -14,16 +14,19 @@ S="${WORKDIR}/${MY_P}-${PV}" LICENSE="BSD-4" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 sparc x86" DEPEND="dev-libs/libbsd" -RDEPEND=${DEPEND} +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-1.10.2-fix-musl-compat-stdint.patch + "${FILESDIR}"/${PN}-1.10.2-respect-AR.patch +) src_prepare() { default - # Don't use hardcoded 'ar' command - sed -s '/^AC_PROG_CC/a m4_ifdef([AM_PROG_AR], [AM_PROG_AR], [AC_SUBST([AR], [$(tc-getAR])])' -i configure.ac || die eautoreconf } diff --git a/net-misc/rdate/rdate-1.11.ebuild b/net-misc/rdate/rdate-1.11.ebuild new file mode 100644 index 000000000000..dd88c82ec3e6 --- /dev/null +++ b/net-misc/rdate/rdate-1.11.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_P="openrdate" + +inherit autotools + +DESCRIPTION="Use TCP or UDP to retrieve the current time of another machine" +HOMEPAGE="https://github.com/resurrecting-open-source-projects/openrdate" +SRC_URI="https://github.com/resurrecting-open-source-projects/${MY_P}/archive/${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${MY_P}-${PV}" + +LICENSE="BSD-4" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" + +DEPEND="dev-libs/libbsd" +RDEPEND="${DEPEND}" + +src_prepare() { + default + + eautoreconf +} + +src_install() { + default + + newinitd "${FILESDIR}"/rdate-initd-1.4-r3 rdate + newconfd "${FILESDIR}"/rdate-confd rdate +} |