From 6c7d869567a9da99810e60c7b480b2970b1b4d81 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Sat, 6 Jan 2024 21:23:19 +0100 Subject: [PATCH] uucp: many fixes. Properly create directories, read config from /etc, move logs and locks to /var/spool/uucp. --- srcpkgs/uucp/patches/uucp-alt-misc.patch | 14 +++++++------- srcpkgs/uucp/template | 13 ++++++++----- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/srcpkgs/uucp/patches/uucp-alt-misc.patch b/srcpkgs/uucp/patches/uucp-alt-misc.patch index 841b2e21283..e66f16ae1a7 100644 --- a/srcpkgs/uucp/patches/uucp-alt-misc.patch +++ b/srcpkgs/uucp/patches/uucp-alt-misc.patch @@ -16,7 +16,7 @@ /* #define LOCKDIR "/usr/spool/uucp/LCK" */ /* #define LOCKDIR "/var/spool/lock" */ -/* #define LOCKDIR "/var/lock" */ -+#define LOCKDIR "/var/lock/serial" ++#define LOCKDIR "/var/spool/uucp/Lock" /* You must also specify the format of the lock files by setting exactly one of the following macros to 1. Check an existing lock @@ -60,7 +60,7 @@ +/* #define LOGFILE "/usr/spool/uucp/Log" */ /* #define LOGFILE "/var/spool/uucp/Log" */ -/* #define LOGFILE "/var/log/uucp/Log" */ -+#define LOGFILE "/var/log/uucp/Log" ++#define LOGFILE "/var/spool/uucp/Log" /* The default statistics file when using HAVE_TAYLOR_LOGGING. When using HAVE_TAYLOR_CONFIG, this may be overridden by the @@ -69,7 +69,7 @@ +/* #define STATFILE "/usr/spool/uucp/Stats" */ /* #define STATFILE "/var/spool/uucp/Stats" */ -/* #define STATFILE "/var/log/uucp/Stats" */ -+#define STATFILE "/var/log/uucp/Stats" ++#define STATFILE "/var/spool/uucp/Stats" /* The default debugging file when using HAVE_TAYLOR_LOGGING. When using HAVE_TAYLOR_CONFIG, this may be overridden by the @@ -79,7 +79,7 @@ /* #define DEBUGFILE "/var/spool/uucp/Debug" */ -/* #define DEBUGFILE "/var/log/uucp/Debug" */ - -+#define DEBUGFILE "/var/log/uucp/Debug" ++#define DEBUGFILE "/var/spool/uucp/Debug" #endif /* HAVE_TAYLOR_LOGGING */ #if HAVE_V2_LOGGING @@ -90,7 +90,7 @@ -#define LOGFILE "/usr/spool/uucp/LOGFILE" + /* #define LOGFILE "/usr/spool/uucp/Log" */ + /* #define LOGFILE "/var/spool/uucp/Log" */ -+#define LOGFILE "/var/log/uucp/Log" ++#define LOGFILE "/var/spool/uucp/Log" /* The default statistics file when using HAVE_V2_LOGGING. When using HAVE_TAYLOR_CONFIG, this may be overridden by the ``statfile'' @@ -98,7 +98,7 @@ -#define STATFILE "/usr/spool/uucp/SYSLOG" + /* #define STATFILE "/usr/spool/uucp/Stats" */ + /* #define STATFILE "/var/spool/uucp/Stats" */ -+#define STATFILE "/var/log/uucp/Stats" ++#define STATFILE "/var/spool/uucp/Stats" /* The default debugging file when using HAVE_V2_LOGGING. When using HAVE_TAYLOR_CONFIG, this may be overridden by the ``debugfile'' @@ -106,6 +106,6 @@ -#define DEBUGFILE "/usr/spool/uucp/DEBUG" + /* #define DEBUGFILE "/usr/spool/uucp/Debug" */ + /* #define DEBUGFILE "/var/spool/uucp/Debug" */ -+#define DEBUGFILE "/var/log/uucp/Debug" ++#define DEBUGFILE "/var/spool/uucp/Debug" #endif /* HAVE_V2_LOGGING */ diff --git a/srcpkgs/uucp/template b/srcpkgs/uucp/template index 2b2b6f758fa..bb499c14c64 100644 --- a/srcpkgs/uucp/template +++ b/srcpkgs/uucp/template @@ -1,9 +1,10 @@ # Template file for 'uucp' pkgname=uucp version=1.07 -revision=1 +revision=2 build_style=gnu-configure -conf_files="/etc/uucp/config /etc/uucp/sys1 /etc/uucp/port" +configure_args="--with-newconfigdir=/etc/uucp --sbindir=/usr/bin" +conf_files="/etc/uucp/config /etc/uucp/sys /etc/uucp/port" makedepends="wget" short_desc="Taylor UUCP is a free implementation of UUCP" maintainer="MarcoAPC " @@ -17,8 +18,10 @@ system_accounts="_uucp" _uucp_homedir="/var/spool/uucp" make_dirs=" - /var/spool/uucp 0750 uucp uucp - /var/spool/uucppublic 0750 uucp uucp" + /var/spool/uucp 0750 _uucp _uucp + /var/spool/uucp/Lock 0750 _uucp _uucp + /var/spool/uucp/Log 0750 _uucp _uucp + /var/spool/uucppublic 0750 _uucp _uucp" pre_configure() { sed -i 's|${CC-cc} -E|${CC-cc} -E|g' configure @@ -27,7 +30,7 @@ do_install() { make DESTDIR=${DESTDIR} install vmkdir etc/uucp/ vinstall sample/config 0644 etc/uucp/ - vinstall sample/sys1 0644 etc/uucp/ + vinstall sample/sys1 0644 etc/uucp/ sys vinstall sample/port 0644 etc/uucp/ sed -i 's|\$\*|"$@"|' ${DESTDIR}/usr/bin/{uuto,uusched} chmod u+w ${DESTDIR}/usr/bin/*