Add dhcpcd 9.4.1

This commit is contained in:
fosslinux 2022-05-22 22:09:03 +10:00
parent 0ce50a6393
commit b614b3021d
6 changed files with 157 additions and 1 deletions

View File

@ -272,6 +272,9 @@ class SysA(SysGeneral):
"https://www.unicode.org/Public/11.0.0/ucd/NormalizationTest.txt",
"https://www.unicode.org/Public/11.0.0/ucd/UnicodeData.txt"])
# dhcpcd 9.4.1
self.get_file("https://roy.marples.name/git/dhcpcd/snapshot/dhcpcd-9.4.1.tar.gz")
# kexec-tools 2.0.22
self.get_file("https://github.com/horms/kexec-tools/archive/refs/tags/v2.0.22.tar.gz",
output="kexec-tools-2.0.22.tar.gz")

View File

@ -31,6 +31,7 @@ c25b36b8af6e0ad2a875daf4d6196bd0df28a62be7dd252e5f99a4d5d7288d95 coreutils-5.0.
247c7ec7521c4258e65634e529270d214fe32969971cccb72845e7aa46831f96 curl-7.83.0.tar.bz2
1d013547889f20576460249c4210632d5314531c8477378a2e046b13a8ebeb7e coreutils-6.10.tar.gz
af4214b851928a53ef470ed8729122b9db910a6c0769d5d46a5de0b3e96f74f3 deblob-4.9
adc30f140fbd0dc7f61ff9cf99da7eedfd484a26a8dafdcc9a0cd859e2199b5a dhcpcd-9.4.1.tar.gz
d5f2489c4056a31528e3ada4adacc23d498532b0af1a980f2f76158162b139d6 diffutils-2.7.tar.gz
54437ae4211867de7ad55723f68b94c29cb2f08a23f431e0bbbc9f34ee384f47 dist-3.5-236.tar.gz
340e9de42a12d0c26dd7527e9ef055ac85586de5c61f6273ae19f88d04e55804 e2fsprogs-1.45.7.tar.gz

View File

@ -0,0 +1,16 @@
# SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
#
# SPDX-License-Identifier: GPL-3.0-or-later
src_prepare() {
default
rm src/dhcpcd-embedded.c.in
}
src_configure() {
CC=gcc ./configure \
--prefix="${PREFIX}" \
--disable-embedded \
--disable-auth
}

View File

@ -0,0 +1,134 @@
diff --color -ru src/arp.c src/arp.c
--- src/arp.c 2022-05-22 13:55:30.103757852 +1000
+++ src/arp.c 2022-05-22 13:55:43.692407546 +1000
@@ -63,9 +63,6 @@
/* ARP debugging can be quite noisy. Enable this for more noise! */
//#define ARP_DEBUG
-/* Assert the correct structure size for on wire */
-__CTASSERT(sizeof(struct arphdr) == 8);
-
static ssize_t
arp_request(const struct arp_state *astate,
const struct in_addr *sip)
diff --color -ru src/auth.c src/auth.c
--- src/auth.c 2022-05-22 13:52:30.219151581 +1000
+++ src/auth.c 2022-05-22 13:53:24.729760674 +1000
@@ -343,9 +343,6 @@
/* RFC3318, section 5.2 - zero giaddr and hops */
if (mp == 4) {
- /* Assert the bootp structure is correct size. */
- __CTASSERT(sizeof(struct bootp) == 300);
-
*(mm + offsetof(struct bootp, hops)) = '\0';
memset(mm + offsetof(struct bootp, giaddr), 0, 4);
}
diff --color -ru src/dhcp6.c src/dhcp6.c
--- src/dhcp6.c 2022-05-22 13:52:30.219151581 +1000
+++ src/dhcp6.c 2022-05-22 13:53:33.455178213 +1000
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: BSD-2-Clause */
+ /* SPDX-License-Identifier: BSD-2-Clause */
/*
* dhcpcd - DHCP client daemon
* Copyright (c) 2006-2021 Roy Marples <roy@marples.name>
@@ -84,33 +84,28 @@
uint8_t xid[3];
/* followed by options */
};
-__CTASSERT(sizeof(struct dhcp6_message) == 4);
struct dhcp6_option {
uint16_t code;
uint16_t len;
/* followed by data */
};
-__CTASSERT(sizeof(struct dhcp6_option) == 4);
struct dhcp6_ia_na {
uint8_t iaid[4];
uint32_t t1;
uint32_t t2;
};
-__CTASSERT(sizeof(struct dhcp6_ia_na) == 12);
struct dhcp6_ia_ta {
uint8_t iaid[4];
};
-__CTASSERT(sizeof(struct dhcp6_ia_ta) == 4);
struct dhcp6_ia_addr {
struct in6_addr addr;
uint32_t pltime;
uint32_t vltime;
};
-__CTASSERT(sizeof(struct dhcp6_ia_addr) == 16 + 8);
/* XXX FIXME: This is the only packed structure and it does not align.
* Maybe manually decode it? */
@@ -120,7 +115,6 @@
uint8_t prefix_len;
struct in6_addr prefix;
} __packed;
-__CTASSERT(sizeof(struct dhcp6_pd_addr) == 8 + 1 + 16);
struct dhcp6_op {
uint16_t type;
diff --color -ru src/dhcp.c src/dhcp.c
--- src/dhcp.c 2022-05-22 13:52:30.219151581 +1000
+++ src/dhcp.c 2022-05-22 13:53:08.074963614 +1000
@@ -98,11 +98,6 @@
#define IP_RECVPKTINFO IP_PKTINFO
#endif
-/* Assert the correct structure size for on wire */
-__CTASSERT(sizeof(struct ip) == 20);
-__CTASSERT(sizeof(struct udphdr) == 8);
-__CTASSERT(sizeof(struct bootp) == 300);
-
struct dhcp_op {
uint8_t value;
const char *name;
diff --color -ru src/if-bsd.c src/if-bsd.c
--- src/if-bsd.c 2022-05-22 13:52:30.219151581 +1000
+++ src/if-bsd.c 2022-05-22 13:53:31.686093557 +1000
@@ -1589,7 +1589,6 @@
#endif
}
-__CTASSERT(offsetof(struct rt_msghdr, rtm_msglen) == 0);
int
if_handlelink(struct dhcpcd_ctx *ctx)
{
diff --color -ru src/ipv6nd.c src/ipv6nd.c
--- src/ipv6nd.c 2022-05-22 13:52:30.219151581 +1000
+++ src/ipv6nd.c 2022-05-22 13:53:30.092017279 +1000
@@ -80,7 +80,6 @@
uint32_t nd_opt_rdnss_lifetime;
/* followed by list of IP prefixes */
};
-__CTASSERT(sizeof(struct nd_opt_rdnss) == 8);
#endif
#ifndef ND_OPT_DNSSL
@@ -92,7 +91,6 @@
uint32_t nd_opt_dnssl_lifetime;
/* followed by list of DNS servers */
};
-__CTASSERT(sizeof(struct nd_opt_rdnss) == 8);
#endif
/* Impossible options, so we can easily add extras */
diff --color -ru src/privsep-root.c src/privsep-root.c
--- src/privsep-root.c 2022-05-22 13:52:30.220151629 +1000
+++ src/privsep-root.c 2022-05-22 13:53:28.152924488 +1000
@@ -56,8 +56,6 @@
#include "sa.h"
#include "script.h"
-__CTASSERT(sizeof(ioctl_request_t) <= sizeof(unsigned long));
-
struct psr_error
{
ssize_t psr_result;

View File

@ -42,7 +42,7 @@ src_install() {
done
# Pick-and-choose asm-generic headers
for i in types ioctl termios termbits ioctls; do
for i in types ioctl termios termbits ioctls sockios socket; do
cp "${DESTDIR}${PREFIX}/include/asm-generic/${i}.h" "${DESTDIR}${PREFIX}/include/asm/${i}.h"
done

View File

@ -225,6 +225,8 @@ build util-linux-2.19.1
build e2fsprogs-1.45.7
build dhcpcd-9.4.1 '' '' dhcpcd-dhcpcd-9.4.1-1663155
build kbd-1.15
build make-3.82