uucp: many fixes.

Properly create directories, read config from /etc, move logs and locks
to /var/spool/uucp.
This commit is contained in:
Leah Neukirchen 2024-01-06 21:23:19 +01:00
parent d755b057c6
commit 6c7d869567
2 changed files with 15 additions and 12 deletions

View File

@ -16,7 +16,7 @@
/* #define LOCKDIR "/usr/spool/uucp/LCK" */ /* #define LOCKDIR "/usr/spool/uucp/LCK" */
/* #define LOCKDIR "/var/spool/lock" */ /* #define LOCKDIR "/var/spool/lock" */
-/* #define LOCKDIR "/var/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 /* You must also specify the format of the lock files by setting
exactly one of the following macros to 1. Check an existing lock exactly one of the following macros to 1. Check an existing lock
@ -60,7 +60,7 @@
+/* #define LOGFILE "/usr/spool/uucp/Log" */ +/* #define LOGFILE "/usr/spool/uucp/Log" */
/* #define LOGFILE "/var/spool/uucp/Log" */ /* #define LOGFILE "/var/spool/uucp/Log" */
-/* #define LOGFILE "/var/log/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 /* The default statistics file when using HAVE_TAYLOR_LOGGING. When
using HAVE_TAYLOR_CONFIG, this may be overridden by the using HAVE_TAYLOR_CONFIG, this may be overridden by the
@ -69,7 +69,7 @@
+/* #define STATFILE "/usr/spool/uucp/Stats" */ +/* #define STATFILE "/usr/spool/uucp/Stats" */
/* #define STATFILE "/var/spool/uucp/Stats" */ /* #define STATFILE "/var/spool/uucp/Stats" */
-/* #define STATFILE "/var/log/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 /* The default debugging file when using HAVE_TAYLOR_LOGGING. When
using HAVE_TAYLOR_CONFIG, this may be overridden by the using HAVE_TAYLOR_CONFIG, this may be overridden by the
@ -79,7 +79,7 @@
/* #define DEBUGFILE "/var/spool/uucp/Debug" */ /* #define DEBUGFILE "/var/spool/uucp/Debug" */
-/* #define DEBUGFILE "/var/log/uucp/Debug" */ -/* #define DEBUGFILE "/var/log/uucp/Debug" */
- -
+#define DEBUGFILE "/var/log/uucp/Debug" +#define DEBUGFILE "/var/spool/uucp/Debug"
#endif /* HAVE_TAYLOR_LOGGING */ #endif /* HAVE_TAYLOR_LOGGING */
#if HAVE_V2_LOGGING #if HAVE_V2_LOGGING
@ -90,7 +90,7 @@
-#define LOGFILE "/usr/spool/uucp/LOGFILE" -#define LOGFILE "/usr/spool/uucp/LOGFILE"
+ /* #define LOGFILE "/usr/spool/uucp/Log" */ + /* #define LOGFILE "/usr/spool/uucp/Log" */
+ /* #define LOGFILE "/var/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 /* The default statistics file when using HAVE_V2_LOGGING. When using
HAVE_TAYLOR_CONFIG, this may be overridden by the ``statfile'' 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/SYSLOG"
+ /* #define STATFILE "/usr/spool/uucp/Stats" */ + /* #define STATFILE "/usr/spool/uucp/Stats" */
+ /* #define STATFILE "/var/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 /* The default debugging file when using HAVE_V2_LOGGING. When using
HAVE_TAYLOR_CONFIG, this may be overridden by the ``debugfile'' 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 "/usr/spool/uucp/Debug" */ + /* #define DEBUGFILE "/usr/spool/uucp/Debug" */
+ /* #define DEBUGFILE "/var/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 */ #endif /* HAVE_V2_LOGGING */

View File

@ -1,9 +1,10 @@
# Template file for 'uucp' # Template file for 'uucp'
pkgname=uucp pkgname=uucp
version=1.07 version=1.07
revision=1 revision=2
build_style=gnu-configure 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" makedepends="wget"
short_desc="Taylor UUCP is a free implementation of UUCP" short_desc="Taylor UUCP is a free implementation of UUCP"
maintainer="MarcoAPC <marcoaureliopc@gmail.com>" maintainer="MarcoAPC <marcoaureliopc@gmail.com>"
@ -17,8 +18,10 @@ system_accounts="_uucp"
_uucp_homedir="/var/spool/uucp" _uucp_homedir="/var/spool/uucp"
make_dirs=" make_dirs="
/var/spool/uucp 0750 uucp uucp /var/spool/uucp 0750 _uucp _uucp
/var/spool/uucppublic 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() { pre_configure() {
sed -i 's|${CC-cc} -E|${CC-cc} -E|g' configure sed -i 's|${CC-cc} -E|${CC-cc} -E|g' configure
@ -27,7 +30,7 @@ do_install() {
make DESTDIR=${DESTDIR} install make DESTDIR=${DESTDIR} install
vmkdir etc/uucp/ vmkdir etc/uucp/
vinstall sample/config 0644 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/ vinstall sample/port 0644 etc/uucp/
sed -i 's|\$\*|"$@"|' ${DESTDIR}/usr/bin/{uuto,uusched} sed -i 's|\$\*|"$@"|' ${DESTDIR}/usr/bin/{uuto,uusched}
chmod u+w ${DESTDIR}/usr/bin/* chmod u+w ${DESTDIR}/usr/bin/*