summaryrefslogtreecommitdiffstats
path: root/source/installer
diff options
context:
space:
mode:
Diffstat (limited to 'source/installer')
-rw-r--r--source/installer/ChangeLog.txt11
-rwxr-xr-xsource/installer/build_installer.sh49
-rw-r--r--source/installer/sources/dnsmasq/dnsmasq-2.80-SIOCGSTAMP.patch60
-rw-r--r--source/installer/sources/dnsmasq/dnsmasq.leasedir.diff24
-rw-r--r--source/installer/sources/dnsmasq/dnsmasq.libidn2.diff13
5 files changed, 155 insertions, 2 deletions
diff --git a/source/installer/ChangeLog.txt b/source/installer/ChangeLog.txt
index cc5c2610b..c680f141f 100644
--- a/source/installer/ChangeLog.txt
+++ b/source/installer/ChangeLog.txt
@@ -1,3 +1,14 @@
+Mon Feb 7 19:03:07 UTC 2022
+ Add a /usr/bin/dbclient symlink. Thanks to alienBOB.
++--------------------------+
+Sat Feb 5 23:02:19 UTC 2022
+ Build a simplified version of dnsmasq that doesn't require libraries not
+ found on the installer. Unfortunately this bug broke PXE installation.
+ If you require PXE support for your installs, use this installer instead.
+ It will work on Slackware 15.0 as well.
+ Not entirely sure if this merits respinning the ISOs for 15.0... feel free
+ to make a thread on LQ and weigh in with any comments.
++--------------------------+
Sat Jan 22 21:34:07 UTC 2022
Reverted to an older simpler version of rescan-scsi-bus that does what we
need it to on the installer. Apparently the one we upgraded to requires the
diff --git a/source/installer/build_installer.sh b/source/installer/build_installer.sh
index 42bb23539..3aeb5574b 100755
--- a/source/installer/build_installer.sh
+++ b/source/installer/build_installer.sh
@@ -759,6 +759,9 @@ make $SILENTMAKE DESTDIR=$PKG/$ARCH-installer-filesystem/ MULTI="1" install || e
done
)
+# Evidently dropbearmulti wants dbclient in /usr/bin:
+( cd $PKG/$ARCH-installer-filesystem/usr/bin ; ln -sf ../../bin/dbclient . )
+
}
############### Build nano #####################################################
@@ -825,6 +828,47 @@ fi
}
+
+############### Build dnsmasq ##################################################
+
+build_dnsmasq()
+{
+echo "--- Building dnsmasq ---"
+# Extract source:
+cd $TMP
+if [ -d $CWD/sources/dnsmasq ]; then
+ DNSMASQPATH=$CWD/sources/dnsmasq
+elif [ -d $SRCDIR/sources/dnsmasq ]; then
+ DNSMASQPATH=$SRCDIR/sources/dnsmasq
+fi
+[ ! -d $DNSMASQPATH ] && ( echo "No directory '$DNSMASQPATH'" ; exit 1 )
+DNSMASQPKG=$(ls -1 $DNSMASQPATH/dnsmasq-*.tar.?z | head -1)
+DNSMASQVER=$(echo $DNSMASQPKG | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+tar x${VERBOSE2}f $DNSMASQPKG
+
+echo "--- Compiling DNSMASQ version '$DNSMASQVER' ---"
+cd dnsmasq* || exit 1
+
+zcat $DNSMASQPATH/dnsmasq.leasedir.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+zcat $DNSMASQPATH/dnsmasq.libidn2.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+zcat $DNSMASQPATH/dnsmasq-2.80-SIOCGSTAMP.patch.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+make $NUMJOBS all-i18n PREFIX=/usr MANDIR=/usr/man COPTS=" " || exit 1
+
+# Install into installer's filesystem:
+mkdir -p $PKG/$ARCH-installer-filesystem/usr/sbin
+cp -a src/dnsmasq $PKG/$ARCH-installer-filesystem/usr/sbin/dnsmasq
+strip --strip-unneeded $PKG/$ARCH-installer-filesystem/usr/sbin/dnsmasq
+chown root:root $PKG/$ARCH-installer-filesystem/usr/sbin/dnsmasq
+chmod 755 $PKG/$ARCH-installer-filesystem/usr/sbin/dnsmasq
+mkdir -p $PKG/$ARCH-installer-filesystem/usr/man/man8
+cat man/dnsmasq.8 | gzip -9c > $PKG/$ARCH-installer-filesystem/usr/man/man8/dnsmasq.8.gz
+
+}
+
############## Install binaries into installer filesystem ######################
# You can generate file-> package list in slackware-current
@@ -934,7 +978,6 @@ l/readline \
l/zlib \
l/zstd \
n/dhcpcd \
-n/dnsmasq \
n/iproute2 \
n/krb5 \
n/libgcrypt \
@@ -1159,7 +1202,6 @@ cp --remove-destination -fa${VERBOSE1} \
cd $TMP/extract-packages/usr/sbin
cp --remove-destination -fa${VERBOSE1} ${EXTRA_PKGS_USRSBIN} \
chpasswd \
- dnsmasq \
ntpdate \
nvme \
parted \
@@ -2324,6 +2366,9 @@ else
unpack_oldinitrd
fi
+ # Build a simplified version of dnsmasq for PXE installs:
+ build_dnsmasq
+
# Are we adding the nano editor?
if [ $ADD_NANO -eq 1 ]; then
build_nano
diff --git a/source/installer/sources/dnsmasq/dnsmasq-2.80-SIOCGSTAMP.patch b/source/installer/sources/dnsmasq/dnsmasq-2.80-SIOCGSTAMP.patch
new file mode 100644
index 000000000..3a32bb82e
--- /dev/null
+++ b/source/installer/sources/dnsmasq/dnsmasq-2.80-SIOCGSTAMP.patch
@@ -0,0 +1,60 @@
+From 31e14f6e52677c675ee4683f9daab5bf21c07dd6 Mon Sep 17 00:00:00 2001
+From: Petr Mensik <pemensik@redhat.com>
+Date: Wed, 31 Jul 2019 20:35:35 +0200
+Subject: [PATCH] Recent kernel no longer supports SIOCGSTAMP
+
+Build without it defined by kernel headers. Do not try SO_TIMESTAMP
+until fixed properly.
+---
+ src/dhcp.c | 32 ++++++++++++++++++--------------
+ 1 file changed, 18 insertions(+), 14 deletions(-)
+
+diff --git a/src/dhcp.c b/src/dhcp.c
+index f8d323b..9afdccf 100644
+--- a/src/dhcp.c
++++ b/src/dhcp.c
+@@ -178,23 +178,27 @@ void dhcp_packet(time_t now, int pxe_fd)
+ (sz < (ssize_t)(sizeof(*mess) - sizeof(mess->options))))
+ return;
+
+- #if defined (HAVE_LINUX_NETWORK)
+- if (ioctl(fd, SIOCGSTAMP, &tv) == 0)
++#if defined (HAVE_LINUX_NETWORK)
++#ifdef SIOCGSTAMP
++ if (tv.tv_sec == 0 && ioctl(fd, SIOCGSTAMP, &tv) == 0)
+ recvtime = tv.tv_sec;
++#endif
+
+ if (msg.msg_controllen >= sizeof(struct cmsghdr))
+- for (cmptr = CMSG_FIRSTHDR(&msg); cmptr; cmptr = CMSG_NXTHDR(&msg, cmptr))
+- if (cmptr->cmsg_level == IPPROTO_IP && cmptr->cmsg_type == IP_PKTINFO)
+- {
+- union {
+- unsigned char *c;
+- struct in_pktinfo *p;
+- } p;
+- p.c = CMSG_DATA(cmptr);
+- iface_index = p.p->ipi_ifindex;
+- if (p.p->ipi_addr.s_addr != INADDR_BROADCAST)
+- unicast_dest = 1;
+- }
++ {
++ for (cmptr = CMSG_FIRSTHDR(&msg); cmptr; cmptr = CMSG_NXTHDR(&msg, cmptr))
++ if (cmptr->cmsg_level == IPPROTO_IP && cmptr->cmsg_type == IP_PKTINFO)
++ {
++ union {
++ unsigned char *c;
++ struct in_pktinfo *p;
++ } p;
++ p.c = CMSG_DATA(cmptr);
++ iface_index = p.p->ipi_ifindex;
++ if (p.p->ipi_addr.s_addr != INADDR_BROADCAST)
++ unicast_dest = 1;
++ }
++ }
+
+ #elif defined(HAVE_BSD_NETWORK)
+ if (msg.msg_controllen >= sizeof(struct cmsghdr))
+--
+2.20.1
+
diff --git a/source/installer/sources/dnsmasq/dnsmasq.leasedir.diff b/source/installer/sources/dnsmasq/dnsmasq.leasedir.diff
new file mode 100644
index 000000000..9fec6b439
--- /dev/null
+++ b/source/installer/sources/dnsmasq/dnsmasq.leasedir.diff
@@ -0,0 +1,24 @@
+diff -Nur dnsmasq-2.52.orig/dnsmasq.conf.example dnsmasq-2.52/dnsmasq.conf.example
+--- dnsmasq-2.52.orig/dnsmasq.conf.example 2009-11-25 06:55:16.000000000 -0600
++++ dnsmasq-2.52/dnsmasq.conf.example 2010-01-22 15:32:41.137807274 -0600
+@@ -415,7 +415,7 @@
+ # The DHCP server needs somewhere on disk to keep its lease database.
+ # This defaults to a sane location, but if you want to change it, use
+ # the line below.
+-#dhcp-leasefile=/var/lib/misc/dnsmasq.leases
++#dhcp-leasefile=/var/state/dnsmasq/dnsmasq.leases
+
+ # Set the DHCP server to authoritative mode. In this mode it will barge in
+ # and take over the lease for any client which broadcasts on the network,
+diff -Nur dnsmasq-2.52.orig/src/config.h dnsmasq-2.52/src/config.h
+--- dnsmasq-2.52.orig/src/config.h 2010-01-21 08:22:06.000000000 -0600
++++ dnsmasq-2.52/src/config.h 2010-01-22 15:32:41.136833058 -0600
+@@ -47,7 +47,7 @@
+ # elif defined(__sun__) || defined (__sun)
+ # define LEASEFILE "/var/cache/dnsmasq.leases"
+ # else
+-# define LEASEFILE "/var/lib/misc/dnsmasq.leases"
++# define LEASEFILE "/var/state/dnsmasq/dnsmasq.leases"
+ # endif
+ #endif
+
diff --git a/source/installer/sources/dnsmasq/dnsmasq.libidn2.diff b/source/installer/sources/dnsmasq/dnsmasq.libidn2.diff
new file mode 100644
index 000000000..d99e556bc
--- /dev/null
+++ b/source/installer/sources/dnsmasq/dnsmasq.libidn2.diff
@@ -0,0 +1,13 @@
+--- ./Makefile.orig 2017-05-22 16:58:46.000000000 -0500
++++ ./Makefile 2017-07-07 13:28:14.124402827 -0500
+@@ -24,8 +24,8 @@
+ LOCALEDIR = $(PREFIX)/share/locale
+ BUILDDIR = $(SRC)
+ DESTDIR =
+-CFLAGS = -Wall -W -O2
+-LDFLAGS =
++CFLAGS = -Wall -W -O2 -DHAVE_LIBIDN2
++LDFLAGS = -lidn2
+ COPTS =
+ RPM_OPT_FLAGS =
+ LIBS =