Browse Source

initial transfer

master
artoo 6 months ago
parent
commit
ef68fa5ae7

+ 13
- 0
dhcp/repos/extra-x86_64/0002-iproute2.patch View File

@@ -0,0 +1,13 @@
1
+diff --git a/client/scripts/linux b/client/scripts/linux
2
+index 5fb16121..c4cef632 100755
3
+--- a/client/scripts/linux
4
++++ b/client/scripts/linux
5
+@@ -362,7 +362,7 @@ case "$reason" in
6
+         interface_up_wait_time=5
7
+         for i in $(seq 0 ${interface_up_wait_time})
8
+         do
9
+-            ifconfig ${interface} | grep RUNNING >/dev/null 2>&1
10
++            ${ip} link show dev ${interface} | grep -q LOWER_UP 2>&1
11
+             if [ $? -eq 0 ]; then
12
+                 break;
13
+             fi

+ 94
- 0
dhcp/repos/extra-x86_64/PKGBUILD View File

@@ -0,0 +1,94 @@
1
+# $Id$
2
+# Maintainer: Felix Yan <felixonmars@archlinux.org>
3
+# Contributor: Daniel Isenmann <daniel @archlinux.org>
4
+
5
+pkgbase=dhcp
6
+pkgname=('dhcp' 'dhclient')
7
+
8
+# separate patch levels with a period to maintain proper versioning.
9
+pkgver=4.4.1
10
+pkgrel=4
11
+arch=('x86_64')
12
+license=('custom:isc-dhcp')
13
+url="https://www.isc.org/software/dhcp"
14
+makedepends=('bash' 'iproute2' 'openldap')
15
+validpgpkeys=('BE0E9748B718253A28BB89FFF1B11BF05CF02E57') # Internet Systems Consortium, Inc. (Signing key, 2017-2018) <codesign@isc.org>
16
+source=("ftp://ftp.isc.org/isc/${pkgbase}/${pkgver}/${pkgbase}-${pkgver}.tar.gz"{,.asc}
17
+        'dhcp-sysusers.conf'
18
+        'dhcp-tmpfiles.conf'
19
+        '0002-iproute2.patch')
20
+sha256sums=('2a22508922ab367b4af4664a0472dc220cc9603482cf3c16d9aff14f3a76b608'
21
+            'SKIP'
22
+            'b16083e6bb572ffacaa7cd97e7fde5fcfa1b6dbeb166f162e2ec6e8ec4b928d6'
23
+            'abcd30e9e8428e34d22ab4d3074ef4bd84c2b11f5868597111b47d6f56d204da'
24
+            '837a64189b949afae951655546967cc8f17f2f2cf370faabff00575364f0fcf7')
25
+
26
+prepare() {
27
+  cd "${srcdir}/${pkgbase}-${pkgver}"
28
+
29
+  # no ifconfig, use ip from iproute2
30
+  patch -Np1 -i ../0002-iproute2.patch
31
+}
32
+
33
+build() {
34
+  cd "${srcdir}/${pkgbase}-${pkgver}"
35
+
36
+  ./configure \
37
+      --prefix=/usr \
38
+      --sbindir=/usr/bin \
39
+      --sysconfdir=/etc \
40
+      --enable-binary-leases \
41
+      --enable-paranoia \
42
+      --with-ldap \
43
+      --with-ldapcrypto \
44
+      --with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \
45
+      --with-srv6-lease-file=/var/lib/dhcp/dhcpd6.leases \
46
+      --with-cli-lease-file=/var/lib/dhclient/dhclient.leases \
47
+      --with-cli6-lease-file=/var/lib/dhclient/dhclient6.leases
48
+
49
+  make -j1
50
+}
51
+
52
+package_dhcp(){
53
+  pkgdesc="A DHCP server, client, and relay agent"
54
+  depends=('glibc' 'libldap')
55
+  backup=('etc/dhcpd.conf' 'etc/dhcpd6.conf')
56
+
57
+  cd "${srcdir}/${pkgbase}-${pkgver}"
58
+
59
+  make DESTDIR="${pkgdir}" install
60
+
61
+  install -D -m644 "${srcdir}/dhcp-sysusers.conf" "${pkgdir}/usr/lib/sysusers.d/dhcp.conf"
62
+  install -D -m644 "${srcdir}/dhcp-tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/dhcp.conf"
63
+
64
+  # move and install config files in place
65
+  mv "${pkgdir}/etc/dhcpd.conf.example" "${pkgdir}/etc/dhcpd.conf"
66
+  install -D -m644 doc/examples/dhcpd-dhcpv6.conf "${pkgdir}/etc/dhcpd6.conf"
67
+
68
+  # Remove dhclient
69
+  make -C client DESTDIR="${pkgdir}" uninstall
70
+
71
+  # install license
72
+  install -m644 -D LICENSE "${pkgdir}/usr/share/licenses/dhcp/LICENSE"
73
+}
74
+
75
+package_dhclient(){
76
+  pkgdesc="A standalone DHCP client from the dhcp package"
77
+  depends=('glibc' 'bash' 'iproute2')
78
+  provides=('dhcp-client')
79
+
80
+  cd "${srcdir}/${pkgbase}-${pkgver}"
81
+
82
+  make -C client DESTDIR="${pkgdir}" install
83
+
84
+  install -m755 -d "${pkgdir}/usr/share/dhclient"
85
+  mv "${pkgdir}/etc/dhclient.conf.example" "${pkgdir}/usr/share/dhclient/"
86
+
87
+  install -d "${pkgdir}/var/lib/dhclient"
88
+
89
+  # install dhclient linux script
90
+  install -m755 client/scripts/linux "${pkgdir}/usr/bin/dhclient-script"
91
+
92
+  # install license
93
+  install -m644 -D LICENSE "${pkgdir}/usr/share/licenses/dhclient/LICENSE"
94
+}

+ 1
- 0
dhcp/repos/extra-x86_64/dhcp-sysusers.conf View File

@@ -0,0 +1 @@
1
+u dhcp - "DHCP daemon" /

+ 3
- 0
dhcp/repos/extra-x86_64/dhcp-tmpfiles.conf View File

@@ -0,0 +1,3 @@
1
+d /var/lib/dhcp 0750 dhcp dhcp -
2
+f /var/lib/dhcp/dhcpd.leases 0640 dhcp dhcp -
3
+f /var/lib/dhcp/dhcpd6.leases 0640 dhcp dhcp -

+ 13
- 0
dhcp/trunk/0002-iproute2.patch View File

@@ -0,0 +1,13 @@
1
+diff --git a/client/scripts/linux b/client/scripts/linux
2
+index 5fb16121..c4cef632 100755
3
+--- a/client/scripts/linux
4
++++ b/client/scripts/linux
5
+@@ -362,7 +362,7 @@ case "$reason" in
6
+         interface_up_wait_time=5
7
+         for i in $(seq 0 ${interface_up_wait_time})
8
+         do
9
+-            ifconfig ${interface} | grep RUNNING >/dev/null 2>&1
10
++            ${ip} link show dev ${interface} | grep -q LOWER_UP 2>&1
11
+             if [ $? -eq 0 ]; then
12
+                 break;
13
+             fi

+ 94
- 0
dhcp/trunk/PKGBUILD View File

@@ -0,0 +1,94 @@
1
+# $Id$
2
+# Maintainer: Felix Yan <felixonmars@archlinux.org>
3
+# Contributor: Daniel Isenmann <daniel @archlinux.org>
4
+
5
+pkgbase=dhcp
6
+pkgname=('dhcp' 'dhclient')
7
+
8
+# separate patch levels with a period to maintain proper versioning.
9
+pkgver=4.4.1
10
+pkgrel=4
11
+arch=('x86_64')
12
+license=('custom:isc-dhcp')
13
+url="https://www.isc.org/software/dhcp"
14
+makedepends=('bash' 'iproute2' 'openldap')
15
+validpgpkeys=('BE0E9748B718253A28BB89FFF1B11BF05CF02E57') # Internet Systems Consortium, Inc. (Signing key, 2017-2018) <codesign@isc.org>
16
+source=("ftp://ftp.isc.org/isc/${pkgbase}/${pkgver}/${pkgbase}-${pkgver}.tar.gz"{,.asc}
17
+        'dhcp-sysusers.conf'
18
+        'dhcp-tmpfiles.conf'
19
+        '0002-iproute2.patch')
20
+sha256sums=('2a22508922ab367b4af4664a0472dc220cc9603482cf3c16d9aff14f3a76b608'
21
+            'SKIP'
22
+            'b16083e6bb572ffacaa7cd97e7fde5fcfa1b6dbeb166f162e2ec6e8ec4b928d6'
23
+            'abcd30e9e8428e34d22ab4d3074ef4bd84c2b11f5868597111b47d6f56d204da'
24
+            '837a64189b949afae951655546967cc8f17f2f2cf370faabff00575364f0fcf7')
25
+
26
+prepare() {
27
+  cd "${srcdir}/${pkgbase}-${pkgver}"
28
+
29
+  # no ifconfig, use ip from iproute2
30
+  patch -Np1 -i ../0002-iproute2.patch
31
+}
32
+
33
+build() {
34
+  cd "${srcdir}/${pkgbase}-${pkgver}"
35
+
36
+  ./configure \
37
+      --prefix=/usr \
38
+      --sbindir=/usr/bin \
39
+      --sysconfdir=/etc \
40
+      --enable-binary-leases \
41
+      --enable-paranoia \
42
+      --with-ldap \
43
+      --with-ldapcrypto \
44
+      --with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \
45
+      --with-srv6-lease-file=/var/lib/dhcp/dhcpd6.leases \
46
+      --with-cli-lease-file=/var/lib/dhclient/dhclient.leases \
47
+      --with-cli6-lease-file=/var/lib/dhclient/dhclient6.leases
48
+
49
+  make -j1
50
+}
51
+
52
+package_dhcp(){
53
+  pkgdesc="A DHCP server, client, and relay agent"
54
+  depends=('glibc' 'libldap')
55
+  backup=('etc/dhcpd.conf' 'etc/dhcpd6.conf')
56
+
57
+  cd "${srcdir}/${pkgbase}-${pkgver}"
58
+
59
+  make DESTDIR="${pkgdir}" install
60
+
61
+  install -D -m644 "${srcdir}/dhcp-sysusers.conf" "${pkgdir}/usr/lib/sysusers.d/dhcp.conf"
62
+  install -D -m644 "${srcdir}/dhcp-tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/dhcp.conf"
63
+
64
+  # move and install config files in place
65
+  mv "${pkgdir}/etc/dhcpd.conf.example" "${pkgdir}/etc/dhcpd.conf"
66
+  install -D -m644 doc/examples/dhcpd-dhcpv6.conf "${pkgdir}/etc/dhcpd6.conf"
67
+
68
+  # Remove dhclient
69
+  make -C client DESTDIR="${pkgdir}" uninstall
70
+
71
+  # install license
72
+  install -m644 -D LICENSE "${pkgdir}/usr/share/licenses/dhcp/LICENSE"
73
+}
74
+
75
+package_dhclient(){
76
+  pkgdesc="A standalone DHCP client from the dhcp package"
77
+  depends=('glibc' 'bash' 'iproute2')
78
+  provides=('dhcp-client')
79
+
80
+  cd "${srcdir}/${pkgbase}-${pkgver}"
81
+
82
+  make -C client DESTDIR="${pkgdir}" install
83
+
84
+  install -m755 -d "${pkgdir}/usr/share/dhclient"
85
+  mv "${pkgdir}/etc/dhclient.conf.example" "${pkgdir}/usr/share/dhclient/"
86
+
87
+  install -d "${pkgdir}/var/lib/dhclient"
88
+
89
+  # install dhclient linux script
90
+  install -m755 client/scripts/linux "${pkgdir}/usr/bin/dhclient-script"
91
+
92
+  # install license
93
+  install -m644 -D LICENSE "${pkgdir}/usr/share/licenses/dhclient/LICENSE"
94
+}

+ 1
- 0
dhcp/trunk/dhcp-sysusers.conf View File

@@ -0,0 +1 @@
1
+u dhcp - "DHCP daemon" /

+ 3
- 0
dhcp/trunk/dhcp-tmpfiles.conf View File

@@ -0,0 +1,3 @@
1
+d /var/lib/dhcp 0750 dhcp dhcp -
2
+f /var/lib/dhcp/dhcpd.leases 0640 dhcp dhcp -
3
+f /var/lib/dhcp/dhcpd6.leases 0640 dhcp dhcp -

Loading…
Cancel
Save