From de16da348671bd797500ab144ae56d23e88c7463 Mon Sep 17 00:00:00 2001 From: davidovski Date: Wed, 30 Mar 2022 17:54:09 +0100 Subject: fixed initd files --- repo/system/acpid.xibuild | 24 +++++++---- repo/system/dbus.xibuild | 16 +++---- repo/system/dhcp.xibuild | 86 ++++++++++++++++++-------------------- repo/system/networkmanager.xibuild | 32 +++++--------- 4 files changed, 77 insertions(+), 81 deletions(-) (limited to 'repo/system') diff --git a/repo/system/acpid.xibuild b/repo/system/acpid.xibuild index 55a4e6f..f960ac0 100644 --- a/repo/system/acpid.xibuild +++ b/repo/system/acpid.xibuild @@ -7,11 +7,14 @@ PKG_VER=2.0.33 SOURCE=https://downloads.sourceforge.net/acpid2/acpid-$PKG_VER.tar.xz DESC="Daemon for battery, power, and thermal readings" -BOOTSCRIPTS=blfs-bootscripts-20210826 ADDITIONAL=" - https://anduin.linuxfromscratch.org/BLFS/blfs-bootscripts/$BOOTSCRIPTS.tar.xz - " - + acpid.confd + acpid.initd + anything + handler.sh + lid-closed + power-supply-ac +" build () { ./configure --prefix=/usr \ --docdir=/usr/share/doc/acpid-$PKG_VER && @@ -20,10 +23,15 @@ build () { package () { make DESTDIR=$PKG_DEST install - install -v -m755 -d $PKG_DEST/etc/acpi/events && + install -m755 -d $PKG_DEST/etc/acpi/events && cp -r samples $PKG_DEST/usr/share/doc/acpid-$PKG_VER - tar xf $BOOTSCRIPTS.tar.xz - cd $BOOTSCRIPTS - make DESTDIR=$PKG_DEST install-acpid + install -D -m 755 handler.sh etc/acpi/handler.sh + install -D -m 644 anything etc/acpi/events/anything + install -D -m 755 power-supply-ac usr/share/acpid/ + install -D -m 755 lid-closed usr/share/acpid/ + + install -D -m 755 acpid.initd etc/init.d/acpid + install -D -m 644 acpid.confd etc/conf.d/acpid + } diff --git a/repo/system/dbus.xibuild b/repo/system/dbus.xibuild index e1a0e72..795d2d7 100644 --- a/repo/system/dbus.xibuild +++ b/repo/system/dbus.xibuild @@ -5,10 +5,12 @@ DEPS="elogind" PKG_VER=1.12.20 SOURCE=https://dbus.freedesktop.org/releases/dbus/dbus-$PKG_VER.tar.gz -BOOTSCRIPTS=blfs-bootscripts-20210826 + ADDITIONAL=" - https://anduin.linuxfromscratch.org/BLFS/blfs-bootscripts/$BOOTSCRIPTS.tar.xz - " +dbus.confd +dbus.initd +dbus.trigger +" DESC="A message bus system allowing applications to talk to one another" @@ -25,7 +27,8 @@ build () { --docdir=/usr/share/doc/dbus-$PKG_VER \ --with-console-auth-dir=/run/console \ --with-system-pid-file=/run/dbus/pid \ - --with-system-socket=/run/dbus/system_bus_socket && + --with-system-socket=/run/dbus/system_bus_socket \ + --with-x && make } @@ -47,7 +50,6 @@ package () { EOF - tar xf $BOOTSCRIPTS.tar.xz - cd $BOOTSCRIPTS - make DESTDIR=$PKG_DEST install-dbus + install -Dm755 dbus.initd $PKG_DEST/etc/init.d/dbus + install -Dm644 dbus.confd $PKG_DEST/etc/conf.d/dbus } diff --git a/repo/system/dhcp.xibuild b/repo/system/dhcp.xibuild index b8f5d9d..241dee1 100644 --- a/repo/system/dhcp.xibuild +++ b/repo/system/dhcp.xibuild @@ -6,14 +6,19 @@ DEPS="musl libldap" PKG_VER=4.4.3b1 SOURCE=https://ftp.isc.org/isc/dhcp/$PKG_VER/dhcp-$PKG_VER.tar.gz -BOOTSCRIPTS=blfs-bootscripts-20210826 ADDITIONAL=" - https://anduin.linuxfromscratch.org/BLFS/blfs-bootscripts/$BOOTSCRIPTS.tar.xz - " +01-dhclient-script-fix-bare-ip.patch +02-dhclient-script-remove-bashisms.patch +03-fix-unwind-import.patch +dhcpd.confd +dhcpd.initd +" DESC="A DHCP server, client and relay" package () { + apply_patches + sed -i '/o.*dhcp_type/d' server/mdb.c && sed -r '/u.*(local|remote)_port/d' \ -i client/dhclient.c \ @@ -22,52 +27,43 @@ package () { build () { - ( export CFLAGS="${CFLAGS:--g -O2} -Wall -fno-strict-aliasing \ - -D_PATH_DHCLIENT_SCRIPT='\"/usr/sbin/dhclient-script\"' \ - -D_PATH_DHCPD_CONF='\"/etc/dhcp/dhcpd.conf\"' \ - -D_PATH_DHCLIENT_CONF='\"/etc/dhcp/dhclient.conf\"'" && - -./configure --prefix=/usr \ - --sysconfdir=/etc/dhcp \ - --localstatedir=/var \ - --with-srv-lease-file=/var/lib/dhcpd/dhcpd.leases \ - --with-srv6-lease-file=/var/lib/dhcpd/dhcpd6.leases \ - --with-cli-lease-file=/var/lib/dhclient/dhclient.leases \ - --with-cli6-lease-file=/var/lib/dhclient/dhclient6.leases -) && -make -j1 + # fix ipv6 + + export CFLAGS="$CFLAGS -D_GNU_SOURCE \ + -D_PATH_DHCLIENT_CONF='\"/etc/dhcp/dhclient.conf\"'" + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc/dhcp \ + --localstatedir=/var \ + --with-srv-conf-file=/etc/dhcp/dhcpd.conf \ + --with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \ + --with-srv6-lease-file=/var/lib/dhcp/dhcpd6.leases \ + --with-cli-lease-file=/var/lib/dhcp/dhclient.leases \ + --with-cli6-lease-file=/var/lib/dhcp/dhclient6.leases \ + --with-srv-pid-file=/run/dhcp/dhcpd.pid \ + --with-srv6-pid-file=/run/dhcp/dhcpd6.pid \ + --with-cli-pid-file=/run/dhcp/dhclient.pid \ + --with-cli6-pid-file=/run/dhcp/dhclient6.pid \ + --with-relay-pid-file=/run/dhcp/dhcrelay.pid \ + --with-relay6-pid-file=/run/dhcp/dhcrelay6.pid \ + --with-libbind=no \ + --enable-dhcpv4o6 \ + --enable-paranoia \ + --enable-log-pid \ + + make -j1 -C bind && make } package () { - make -C client DESTDIR=$PKG_DEST install && - install -m755 client/scripts/linux $PKG_DEST/usr/sbin/dhclient-script - - install -dm755 /etc/dhcp && - cat > $PKG_DEST/etc/dhcp/dhclient.conf << "EOF" -# Begin /etc/dhcp/dhclient.conf -# -# Basic dhclient.conf(5) - -#prepend domain-name-servers 127.0.0.1; -request subnet-mask, broadcast-address, time-offset, routers, - domain-name, domain-name-servers, domain-search, host-name, - netbios-name-servers, netbios-scope, interface-mtu, - ntp-servers; -require subnet-mask, domain-name-servers; -#timeout 60; -#retry 60; -#reboot 10; -#select-timeout 5; -#initial-interval 2; - -# End /etc/dhcp/dhclient.conf -EOF - install -dm 755 $PKG_DEST/var/lib/dhclient - - tar xf $BOOTSCRIPTS.tar.xz - cd $BOOTSCRIPTS - make DESTDIR=$PKG_DEST install-service-dhclient + make DESTDIR=$PKG_DEST install + + install -d $PKG_DEST/var/lib/dhcp + install -d $PKG_DEST/run/dhcp + + + install -m755 -D dhcpd.initd $PKG_DEST/etc/init.d/dhcpd + install -m644 -D dhcpd.confd $PKG_DEST/etc/conf.d/dhcpd } diff --git a/repo/system/networkmanager.xibuild b/repo/system/networkmanager.xibuild index f48cca3..c2c8fbd 100644 --- a/repo/system/networkmanager.xibuild +++ b/repo/system/networkmanager.xibuild @@ -6,10 +6,12 @@ DEPS="jansson libndp curl wpa_supplicant newt nss polkit libpsl dbus gobject-int PKG_VER=1.35.5 SOURCE=https://download.gnome.org/sources/NetworkManager/${PKG_VER%.*}/NetworkManager-$PKG_VER.tar.xz -BOOTSCRIPTS=blfs-bootscripts-20210826 ADDITIONAL=" - https://anduin.linuxfromscratch.org/BLFS/blfs-bootscripts/$BOOTSCRIPTS.tar.xz - " +networkmanager.conf +networkmanager-dispatcher.initd +networkmanager.initd +networkmanager.rules +" DESC="Network connection manager and user applications" @@ -42,25 +44,13 @@ build () { package () { DESTDIR=$PKG_DEST ninja install && mv $PKG_DEST/usr/share/doc/NetworkManager \ - $PKG_DEST/usr/share/doc/NetworkManager-$PKG_VER} + $PKG_DEST/usr/share/doc/NetworkManager-$PKG_VER - # create minimum config file - cat >> $PKG_DEST/etc/NetworkManager/NetworkManager.conf << "EOF" -[main] -plugins=keyfile -EOF - cat > $PKG_DEST/etc/NetworkManager/conf.d/polkit.conf << "EOF" -[main] -auth-polkit=true -EOF - -cat > $PKG_DEST/etc/NetworkManager/conf.d/dhcp.conf << "EOF" -[main] -dhcp=dhclient -EOF + install -m644 -D networkmanager.rules \ + "$PKG_DEST/usr/share/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules" cd .. - tar xf $BOOTSCRIPTS.tar.xz - cd $BOOTSCRIPTS - make DESTDIR=$PKG_DEST install-networkmanager + install -m755 -D networkmanager.initd $PKG_DEST/etc/init.d/networkmanager + install -m755 -D networkmanager-dispatcher.initd $PKG_DEST/etc/init.d/networkmanager-dispatcher + install -m755 -D networkmanager.conf $PKG_DEST/etc/NetworkManager/NetworkManager.conf } -- cgit v1.2.1