diff options
Diffstat (limited to 'user')
25 files changed, 1203 insertions, 417 deletions
diff --git a/user/dosbox/APKBUILD b/user/dosbox/APKBUILD index 51fdf7284..58278e28b 100644 --- a/user/dosbox/APKBUILD +++ b/user/dosbox/APKBUILD @@ -20,7 +20,13 @@ builddir="$srcdir/dosbox-x-dosbox-x-wip-20180513-1316" build() { cd "$builddir" ./autogen.sh - ./configure --prefix=/usr --enable-debug --enable-core-inline --enable-sdl2 + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --enable-debug \ + --enable-core-inline \ + --enable-sdl2 make } diff --git a/user/heirloom-devtools/APKBUILD b/user/heirloom-devtools/APKBUILD deleted file mode 100644 index c774e66ac..000000000 --- a/user/heirloom-devtools/APKBUILD +++ /dev/null @@ -1,38 +0,0 @@ -# Contributor: A. Wilcox <awilfox@adelielinux.org> -# Maintainer: A. Wilcox <awilfox@adelielinux.org> -pkgname=heirloom-devtools -pkgver=070527 -pkgrel=0 -pkgdesc="Development tools compatible with UNIX" -url="http://heirloom.sourceforge.net/devtools.html" -arch="all" -options="!check" # No test suite. -license="CDDL-1.0" -depends="" -makedepends="" -subpackages="$pkgname-dev" -source="https://superb-sea2.dl.sourceforge.net/project/heirloom/heirloom-devtools/$pkgver/heirloom-devtools-$pkgver.tar.bz2 - configure.patch - deauto.patch - lex-compiler.patch - make-no-rpc.patch - $pkgname-$pkgver-solaris.patch - $pkgname-$pkgver-64-bit.patch" - -build() { - cd "$builddir" - make -j1 CXXFLAGS="${CXXFLAGS} -DMAXNETNAMELEN=255" -} - -package() { - cd "$builddir" - make ROOT="$pkgdir" install -} - -sha512sums="1f1f10a7b49402053172cc028bbd939a46fcf933994cb867fa40e8c5bbd7b1291575b3bac254cd79dc4fce3e3a2c88fe0f890449888fda16169c8e6a2540f055 heirloom-devtools-070527.tar.bz2 -7670995fb469b2613029d52514b95a0506728c09d2daf640c4e0d0fc63b82bc7a1a35a361bd4686b065cec35a072d0b329257e424f118b834367f9761efd5321 configure.patch -ebe4ae6af3b49290bdb50b396ff23973b3d6ba1429953563fe2b0e43312c1cca85dd754a140aa65bb2163a8307fd68a9dce3e3c4d1fa08d2d908e49df952f730 deauto.patch -ac29808a3bd5439fe4d8e8765bddc4944951ac53c91cb24f60c117fe2441a234bd0d8c1dcc59ed996d9c220789cb03eade03ab858c07d673797fac295eb80b5a lex-compiler.patch -b3c5d271f2edd5a8f331bfaf88b2f75a639cc79005c489d04fed90b2b6dfb1286dcc3084f0c7729519da06f0d0318c91f5e30c08f849c8c548b0b622221f4aba make-no-rpc.patch -335fdabef9b9a8b93ffa6eab2b66d2db11af29b24989c4b64ea64695cfadd4471c31a865c2fcb823c1f4c11eebc1babb53ab83c9c2bdf83c05f497faf16e3f1c heirloom-devtools-070527-solaris.patch -5523e670c9c9d57f0415e30d1aab4dfcd7d8ad74e2535136afbbe4c6e407c713e7801cbcbf7ddbe798ab2790fc196a2fdbf9d5295fa8c475c73360f5e3a27066 heirloom-devtools-070527-64-bit.patch" diff --git a/user/heirloom-devtools/configure.patch b/user/heirloom-devtools/configure.patch deleted file mode 100644 index 614adf94f..000000000 --- a/user/heirloom-devtools/configure.patch +++ /dev/null @@ -1,54 +0,0 @@ ---- heirloom-devtools-070527/mk.config.old 2007-05-27 11:56:51.000000000 -0500 -+++ heirloom-devtools-070527/mk.config 2017-11-24 21:27:26.961471332 -0600 -@@ -17,12 +17,12 @@ - # - # A BSD-compatible install command. - # --INSTALL=/usr/ucb/install -+INSTALL=/usr/bin/install - - # - # Prefix. - # - PREFIX=/usr/ccs - - # - # Where to place binaries. -@@ -32,7 +32,7 @@ - # - # Where to place additional binaries that aim at POSIX conformance. - # --SUSBIN=/usr/5bin/posix -+SUSBIN=$(PREFIX)/bin - - # - # Where to place libraries. -@@ -47,7 +47,7 @@ - # - # Binaries are stripped with this command after installation. - # --STRIP=strip -+STRIP=true - - # - # C++ compiler. -@@ -57,8 +57,8 @@ - # - # Compiler flags. - # --CFLAGS=-O --CXXFLAGS=-O -+CFLAGS ?= -O -+CXXFLAGS ?= -O - - # - # C preprocessor flags. -@@ -76,7 +76,7 @@ - # - # Linker flags. - # --LDFLAGS= -+LDFLAGS ?= - - # - # Additional libraries to link with. diff --git a/user/heirloom-devtools/deauto.patch b/user/heirloom-devtools/deauto.patch deleted file mode 100644 index 76e98f2d4..000000000 --- a/user/heirloom-devtools/deauto.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- heirloom-devtools-070527/make/bsd/bsd.cc.old 2007-01-21 20:11:25.000000000 -0600 -+++ heirloom-devtools-070527/make/bsd/bsd.cc 2017-12-12 04:18:01.749422384 -0600 -@@ -50,13 +50,13 @@ - extern SIG_PF - bsdsignal (int Signal, SIG_PF Handler) - { -- auto SIG_PF previous_handler; -+ SIG_PF previous_handler; - #ifdef SUN5_0 - #ifdef sun - previous_handler = sigset (Signal, Handler); - #else -- auto struct sigaction new_action; -- auto struct sigaction old_action; -+ struct sigaction new_action; -+ struct sigaction old_action; - - new_action.sa_flags = SA_SIGINFO; - new_action.sa_handler = (void (*) ()) Handler; diff --git a/user/heirloom-devtools/heirloom-devtools-070527-64-bit.patch b/user/heirloom-devtools/heirloom-devtools-070527-64-bit.patch deleted file mode 100644 index d6c3cd7a5..000000000 --- a/user/heirloom-devtools/heirloom-devtools-070527-64-bit.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- a/make/vroot/lock.cc 2007/01/18 15:06:32 1.1 -+++ b/make/vroot/lock.cc 2007/10/01 11:44:26 1.2 -@@ -31,7 +31,7 @@ - /* - * Portions Copyright (c) 2007 Gunnar Ritter, Freiburg i. Br., Germany - * -- * Sccsid @(#)lock.cc 1.4 (gritter) 01/13/07 -+ * Sccsid @(#)lock.cc 1.5 (gritter) 10/1/07 - */ - - #include <avo/intl.h> /* for NOCATGETS */ -@@ -53,7 +53,7 @@ - extern int sys_nerr; - #endif - --static void file_lock_error(char *msg, char *file, char *str, int arg1, int arg2); -+static void file_lock_error(char *msg, char *file, char *str, const char *arg1, const char *arg2); - - #define BLOCK_INTERUPTS sigfillset(&newset) ; \ - sigprocmask(SIG_SETMASK, &newset, &oldset) -@@ -123,7 +123,7 @@ - - if (errno != EEXIST) { - file_lock_error(msg, name, NOCATGETS("symlink(%s, %s)"), -- (int) name, (int) lockname); -+ name, lockname); - fprintf(stderr, "%s", msg); - return errno; - } -@@ -171,7 +171,8 @@ - * Format a message telling why the lock could not be created. - */ - static void --file_lock_error(char *msg, char *file, char *str, int arg1, int arg2) -+file_lock_error(char *msg, char *file, char *str, -+ const char *arg1, const char *arg2) - { - int len; - diff --git a/user/heirloom-devtools/heirloom-devtools-070527-solaris.patch b/user/heirloom-devtools/heirloom-devtools-070527-solaris.patch deleted file mode 100644 index c6b394208..000000000 --- a/user/heirloom-devtools/heirloom-devtools-070527-solaris.patch +++ /dev/null @@ -1,230 +0,0 @@ -diff --git a/make/include/mksh/defs.h b/make/include/mksh/defs.h -index 1992205..8065a77 100644 ---- a/make/include/mksh/defs.h -+++ b/make/include/mksh/defs.h -@@ -63,7 +63,6 @@ - #include <widec.h> - #endif - --#ifndef __sun - /* - * Definition of wchar functions. - */ -@@ -90,7 +89,6 @@ - # define wscmp(x,y) wcscmp(x,y) - # undef wsncmp - # define wsncmp(x,y,z) wcsncmp(x,y,z) --#endif - - #if defined (__FreeBSD__) || defined (__APPLE__) || defined (__hpux) - extern "C" { wchar_t *wcsdup(const wchar_t *s); } -diff --git a/make/makestate/lock.c b/make/makestate/lock.c -index cdf7562..aa6083e 100644 ---- a/make/makestate/lock.c -+++ b/make/makestate/lock.c -@@ -42,18 +42,6 @@ - #include <sys/errno.h> - #include <errno.h> /* errno */ - --#if defined(_LP64) --/* -- * The symbols _sys_errlist and _sys_nerr are not visible in the -- * LP64 libc. Use strerror(3C) instead. -- */ --#else /* #_LP64 */ --#if defined (__sun) || defined (__hpux) --extern char * sys_errlist[]; --extern int sys_nerr; --#endif --#endif /* #_LP64 */ -- - static void file_lock_error(char *, char *, const char *, char *, char *); - - /* -@@ -167,16 +155,7 @@ file_lock_error(char * msg, char * file, const char * str, char * arg1, - len = strlen(msg); - sprintf(&msg[len], str, arg1, arg2); - strcat(msg, " failed - "); --#if defined(_LP64) - /* Needs to be changed to use strerror(3C) instead. */ - len = strlen(msg); - sprintf(&msg[len], "errno %d", errno); --#else /* #_LP64 */ -- if (errno < sys_nerr) { -- strcat(msg, sys_errlist[errno]); -- } else { -- len = strlen(msg); -- sprintf(&msg[len], "errno %d", errno); -- } --#endif /* #_LP64 */ - } -diff --git a/make/mksh/macro.cc b/make/mksh/macro.cc -index 6ddb624..23b0315 100644 ---- a/make/mksh/macro.cc -+++ b/make/mksh/macro.cc -@@ -43,6 +43,7 @@ - /* - * Included files - */ -+#include <alloca.h> - #include <wordexp.h> - #include <mksh/dosys.h> /* sh_command2string() */ - #include <mksh/i18n.h> /* get_char_semantics_value() */ -@@ -1403,13 +1404,6 @@ found_it:; - new_value = ALLOC_WC(length); - new_value_allocated = true; - WCSTOMBS(mbs_buffer, old_vr); --#ifdef __sun -- wsprintf(new_value, -- NOCATGETS("/usr/arch/%s/%s:%s"), -- ha->string_mb + 1, -- ta->string_mb + 1, -- mbs_buffer); --#else - char * mbs_new_value = (char *)getmem(length); - sprintf(mbs_new_value, - NOCATGETS("/usr/arch/%s/%s:%s"), -@@ -1418,7 +1412,6 @@ found_it:; - mbs_buffer); - MBSTOWCS(new_value, mbs_new_value); - retmem_mb(mbs_new_value); --#endif - } - if (new_value[0] != 0) { - setvar_daemon(virtual_root, -diff --git a/make/mksh/misc.cc b/make/mksh/misc.cc -index 11122cf..d617591 100644 ---- a/make/mksh/misc.cc -+++ b/make/mksh/misc.cc -@@ -382,30 +382,7 @@ setup_char_semantics(void) - char * - errmsg(int errnum) - { --#ifndef __sun - return strerror(errnum); --#else // __sun -- -- extern int sys_nerr; --#ifdef SUN4_x -- extern char *sys_errlist[]; --#endif -- char *errbuf; -- -- if ((errnum < 0) || (errnum > sys_nerr)) { -- errbuf = getmem(6+1+11+1); -- sprintf(errbuf, "Error %d", errnum); -- return errbuf; -- } else { --#ifdef SUN4_x -- return(sys_errlist[errnum]); --#endif --#ifdef SUN5_0 -- return strerror(errnum); --#endif -- -- } --#endif // !__sun - } - - extern const char *progname; -diff --git a/make/src/implicit.cc b/make/src/implicit.cc -index 2d388cc..a1cee7e 100644 ---- a/make/src/implicit.cc -+++ b/make/src/implicit.cc -@@ -43,10 +43,13 @@ - /* - * Included files - */ -+#include <cstdio> - #include <mk/defs.h> - #include <mksh/macro.h> /* expand_value() */ - #include <mksh/misc.h> /* retmem() */ - -+using std::printf; -+ - /* - * Defined macros - */ -@@ -97,8 +100,6 @@ extern void add_target_to_chain(Name target, Chain * query); - * recursion_level Used for tracing - */ - --extern int printf (const char *, ...); -- - static Boolean actual_doname = false; - - /* /tolik/ -diff --git a/make/src/nse_printdep.cc b/make/src/nse_printdep.cc -index 6201a18..38826d2 100644 ---- a/make/src/nse_printdep.cc -+++ b/make/src/nse_printdep.cc -@@ -37,9 +37,12 @@ - /* - * Included files - */ -+#include <cstdio> - #include <mk/defs.h> - #include <mksh/misc.h> /* get_prop() */ - -+using std::printf; -+ - /* - * File table of contents - */ -@@ -59,7 +62,6 @@ static void print_rule(register Name target); - static void print_rec_info(Name target); - static Boolean is_out_of_date(Property line); - extern void depvar_print_results (void); --extern int printf (const char *, ...); - extern int _flsbuf (unsigned int, FILE *); - - /* -diff --git a/make/vroot/lock.cc b/make/vroot/lock.cc -index 1d6239b..1a20bc0 100644 ---- a/make/vroot/lock.cc -+++ b/make/vroot/lock.cc -@@ -48,11 +48,6 @@ - #include <signal.h> - #include <errno.h> /* errno */ - --#if defined(sun) || defined(HP_UX) --extern char *sys_errlist[]; --extern int sys_nerr; --#endif -- - static void file_lock_error(char *msg, char *file, char *str, int arg1, int arg2); - - #define BLOCK_INTERUPTS sigfillset(&newset) ; \ -@@ -179,20 +174,6 @@ file_lock_error(char *msg, char *file, char *str, int arg1, int arg2) - len = strlen(msg); - sprintf(&msg[len], str, arg1, arg2); - strcat(msg, " failed - "); --#ifdef __sun -- if (errno < sys_nerr) { --#ifdef SUN4_x -- strcat(msg, sys_errlist[errno]); --#endif --#ifdef SUN5_0 -- strcat(msg, strerror(errno)); --#endif -- } else { -- len = strlen(msg); -- sprintf(&msg[len], NOCATGETS("errno %d"), errno); -- } --#else - strcat(msg, strerror(errno)); --#endif - } - -diff --git a/sccs/src/vc.c b/sccs/src/vc.c -index d7f7187..1c0ffb1 100644 ---- a/sccs/src/vc.c -+++ b/sccs/src/vc.c -@@ -37,6 +37,7 @@ - */ - /* from OpenSolaris "sccs:cmd/vc.c" */ - # include <defines.h> -+# include <limits.h> - # include <locale.h> - - diff --git a/user/heirloom-devtools/lex-compiler.patch b/user/heirloom-devtools/lex-compiler.patch deleted file mode 100644 index e0d6e9967..000000000 --- a/user/heirloom-devtools/lex-compiler.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- heirloom-devtools-070527/lex/sub1.c.old 2005-11-26 12:50:23.000000000 -0600 -+++ heirloom-devtools-070527/lex/sub1.c 2017-12-12 04:13:27.493347227 -0600 -@@ -162,7 +162,8 @@ - } - -+#undef index - int - index(int a, CHR *s) - { - int k; - for (k = 0; s[k]; k++) diff --git a/user/heirloom-devtools/make-no-rpc.patch b/user/heirloom-devtools/make-no-rpc.patch deleted file mode 100644 index d80dd05dc..000000000 --- a/user/heirloom-devtools/make-no-rpc.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- heirloom-devtools-070527/make/src/pmake.cc.old 2007-01-18 09:34:13.000000000 -0600 -+++ heirloom-devtools-070527/make/src/pmake.cc 2017-12-12 04:21:31.058974256 -0600 -@@ -46,7 +46,9 @@ - #include <sys/stat.h> - #include <sys/types.h> - #include <sys/utsname.h> -+#ifdef _sun - #include <rpc/rpc.h> /* host2netname(), netname2host() */ -+#endif - #include <unistd.h> /* getdomainname() */ - - /* diff --git a/user/libutempter/APKBUILD b/user/libutempter/APKBUILD index 5d4a3841c..058530412 100644 --- a/user/libutempter/APKBUILD +++ b/user/libutempter/APKBUILD @@ -1,30 +1,32 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=libutempter pkgver=1.1.6 -pkgrel=0 +pkgrel=1 pkgdesc="Library to record virtual terminal sessions in login files" url="No URL" arch="all" -options="!check" # No test suite. +options="!check suid" # No test suite. license="LGPL-2.1+" depends="" makedepends="utmps-dev" subpackages="$pkgname-dev $pkgname-doc" source="ftp://ftp.altlinux.org/pub/people/ldv/utempter/$pkgname-$pkgver.tar.bz2 + fix-linking.patch port-to-utmpx.patch " build() { cd "$builddir" - make + make LDLIBS="-lutmps -lskarnet" } package() { cd "$builddir" make DESTDIR="$pkgdir" install - # utmps allows us to log without root! - chmod 0755 "$pkgdir"/usr/lib/utempter/utempter + # we need to be setuid, not setgid + chmod 4711 "$pkgdir"/usr/lib/utempter/utempter } sha512sums="6ada410b981d157ae20b578de8ce20997ec0446ec6de6859549b080aa65976fc9900d211600dab09dc3d0d109daabad0994a648b093b8781b442ff26ca17fede libutempter-1.1.6.tar.bz2 +c5abc344544ac962dfc7ba6a5a7c807120e03db5b2cc7111613934322ee7041e5e97db10643cab6bbf734b3f5687f8db3a7e375b04f9b952b7c7e33b4f0431e7 fix-linking.patch b2d0bc9075bda0dc3404458547ee2d190855d6d8b2c209ae70b763ea11baa0569bd3b167589ad09f77c82075430ca60ffe758a925b9fd4124b5945b93c19a10d port-to-utmpx.patch" diff --git a/user/libutempter/fix-linking.patch b/user/libutempter/fix-linking.patch new file mode 100644 index 000000000..91719507a --- /dev/null +++ b/user/libutempter/fix-linking.patch @@ -0,0 +1,11 @@ +--- libutempter-1.1.6/Makefile.old 2010-11-04 17:14:53.000000000 +0000 ++++ libutempter-1.1.6/Makefile 2018-08-29 14:47:24.740000000 +0000 +@@ -52,7 +52,7 @@ + $(COMPILE.c) -fPIC $< $(OUTPUT_OPTION) + + $(PROJECT): utempter.c +- $(LINK.c) -Wl,-z,now,-stats $(LDLIBS) $< $(OUTPUT_OPTION) ++ $(LINK.c) -Wl,-z,now,-stats $< $(OUTPUT_OPTION) $(LDLIBS) + + $(SHAREDLIB): iface.os $(MAP) + $(LINK.o) -shared \ diff --git a/user/netqmail/0001-DESTDIR.patch b/user/netqmail/0001-DESTDIR.patch new file mode 100644 index 000000000..30dba79a6 --- /dev/null +++ b/user/netqmail/0001-DESTDIR.patch @@ -0,0 +1,576 @@ +--- netqmail-1.06.old/Makefile ++++ netqmail-1.06/Makefile +@@ -21,9 +21,10 @@ + ./compile alloc_re.c + + auto-ccld.sh: \ +-conf-cc conf-ld warn-auto.sh ++conf-cc conf-ld conf-ldi warn-auto.sh + ( cat warn-auto.sh; \ + echo CC=\'`head -1 conf-cc`\'; \ ++ echo LDI=\'`head -1 conf-ldi`\'; \ + echo LD=\'`head -1 conf-ld`\' \ + ) > auto-ccld.sh + +@@ -702,7 +703,7 @@ + ./compile hfield.c + + hier.o: \ +-compile hier.c auto_qmail.h auto_split.h auto_uids.h fmt.h fifo.h ++compile hier.c auto_qmail.h auto_split.h auto_uids.h fmt.h fifo.h stralloc.h + ./compile hier.c + + home: \ +@@ -740,15 +741,15 @@ + ./compile idedit.c + + install: \ +-load install.o fifo.o hier.o auto_qmail.o auto_split.o auto_uids.o \ +-strerr.a substdio.a open.a error.a str.a fs.a +- ./load install fifo.o hier.o auto_qmail.o auto_split.o \ +- auto_uids.o strerr.a substdio.a open.a error.a str.a fs.a ++loadi install.o fifo.o hier.o auto_qmail.o auto_split.o auto_uids.o \ ++strerr.a substdio.a open.a error.a str.a fs.a stralloc.a alloc.a ++ ./loadi install fifo.o hier.o auto_qmail.o auto_split.o \ ++ auto_uids.o strerr.a substdio.a open.a error.a str.a fs.a stralloc.a alloc.a + + install-big: \ +-load install-big.o fifo.o install.o auto_qmail.o auto_split.o \ ++loadi install-big.o fifo.o install.o auto_qmail.o auto_split.o \ + auto_uids.o strerr.a substdio.a open.a error.a str.a fs.a +- ./load install-big fifo.o install.o auto_qmail.o \ ++ ./loadi install-big fifo.o install.o auto_qmail.o \ + auto_split.o auto_uids.o strerr.a substdio.a open.a error.a \ + str.a fs.a + +@@ -763,10 +764,10 @@ + ./compile install.c + + instcheck: \ +-load instcheck.o fifo.o hier.o auto_qmail.o auto_split.o auto_uids.o \ +-strerr.a substdio.a error.a str.a fs.a +- ./load instcheck fifo.o hier.o auto_qmail.o auto_split.o \ +- auto_uids.o strerr.a substdio.a error.a str.a fs.a ++loadi instcheck.o fifo.o hier.o auto_qmail.o auto_split.o auto_uids.o \ ++strerr.a substdio.a error.a str.a fs.a stralloc.a alloc.a ++ ./loadi instcheck fifo.o hier.o auto_qmail.o auto_split.o \ ++ auto_uids.o strerr.a substdio.a error.a str.a fs.a stralloc.a alloc.a + + instcheck.o: \ + compile instcheck.c strerr.h error.h readwrite.h exit.h +@@ -815,6 +816,11 @@ + ( cat warn-auto.sh; ./make-load "`cat systype`" ) > load + chmod 755 load + ++loadi: \ ++make-loadi warn-auto.sh systype ++ ( cat warn-auto.sh; ./make-loadi "`cat systype`" ) > loadi ++ chmod 755 loadi ++ + lock.a: \ + makelib lock_ex.o lock_exnb.o lock_un.o + ./makelib lock.a lock_ex.o lock_exnb.o lock_un.o +@@ -912,6 +918,11 @@ + make-load.sh auto-ccld.sh + cat auto-ccld.sh make-load.sh > make-load + chmod 755 make-load ++ ++make-loadi: \ ++make-loadi.sh auto-ccld.sh ++ cat auto-ccld.sh make-loadi.sh > make-loadi ++ chmod 755 make-loadi + + make-makelib: \ + make-makelib.sh auto-ccld.sh +--- netqmail-1.06.old/TARGETS ++++ netqmail-1.06/TARGETS +@@ -1,8 +1,10 @@ + auto-ccld.sh + make-load ++make-loadi + find-systype + systype + load ++loadi + make-compile + compile + fork.h +--- netqmail-1.06.old/hier.c ++++ netqmail-1.06/hier.c +@@ -1,3 +1,5 @@ ++#include <stdlib.h> ++#include "stralloc.h" + #include "auto_qmail.h" + #include "auto_split.h" + #include "auto_uids.h" +@@ -6,6 +8,19 @@ + + char buf[100 + FMT_ULONG]; + ++static char *base_qmail ; ++ ++static void base_init (void) ++{ ++ static stralloc sa = { 0 } ; ++ char *x = getenv("DESTDIR") ; ++ sa.len = 0 ; ++ if (x) stralloc_cats(&sa, x) ; ++ stralloc_cats(&sa, auto_qmail) ; ++ stralloc_0(&sa) ; ++ base_qmail = sa.s ; ++} ++ + void dsplit(base,uid,mode) + char *base; /* must be under 100 bytes */ + int uid; +@@ -14,7 +29,7 @@ + char *x; + unsigned long i; + +- d(auto_qmail,base,uid,auto_gidq,mode); ++ d(base_qmail,base,uid,auto_gidq,mode); + + for (i = 0;i < auto_split;++i) { + x = buf; +@@ -23,230 +38,231 @@ + x += fmt_ulong(x,i); + *x = 0; + +- d(auto_qmail,buf,uid,auto_gidq,mode); ++ d(base_qmail,buf,uid,auto_gidq,mode); + } + } + + void hier() + { +- h(auto_qmail,auto_uido,auto_gidq,0755); ++ base_init() ; ++ h(base_qmail,auto_uido,auto_gidq,0755); + +- d(auto_qmail,"control",auto_uido,auto_gidq,0755); +- d(auto_qmail,"users",auto_uido,auto_gidq,0755); +- d(auto_qmail,"bin",auto_uido,auto_gidq,0755); +- d(auto_qmail,"boot",auto_uido,auto_gidq,0755); +- d(auto_qmail,"doc",auto_uido,auto_gidq,0755); +- d(auto_qmail,"man",auto_uido,auto_gidq,0755); +- d(auto_qmail,"man/cat1",auto_uido,auto_gidq,0755); +- d(auto_qmail,"man/cat5",auto_uido,auto_gidq,0755); +- d(auto_qmail,"man/cat7",auto_uido,auto_gidq,0755); +- d(auto_qmail,"man/cat8",auto_uido,auto_gidq,0755); +- d(auto_qmail,"man/man1",auto_uido,auto_gidq,0755); +- d(auto_qmail,"man/man5",auto_uido,auto_gidq,0755); +- d(auto_qmail,"man/man7",auto_uido,auto_gidq,0755); +- d(auto_qmail,"man/man8",auto_uido,auto_gidq,0755); ++ d(base_qmail,"control",auto_uido,auto_gidq,0755); ++ d(base_qmail,"users",auto_uido,auto_gidq,0755); ++ d(base_qmail,"bin",auto_uido,auto_gidq,0755); ++ d(base_qmail,"boot",auto_uido,auto_gidq,0755); ++ d(base_qmail,"doc",auto_uido,auto_gidq,0755); ++ d(base_qmail,"man",auto_uido,auto_gidq,0755); ++ d(base_qmail,"man/cat1",auto_uido,auto_gidq,0755); ++ d(base_qmail,"man/cat5",auto_uido,auto_gidq,0755); ++ d(base_qmail,"man/cat7",auto_uido,auto_gidq,0755); ++ d(base_qmail,"man/cat8",auto_uido,auto_gidq,0755); ++ d(base_qmail,"man/man1",auto_uido,auto_gidq,0755); ++ d(base_qmail,"man/man5",auto_uido,auto_gidq,0755); ++ d(base_qmail,"man/man7",auto_uido,auto_gidq,0755); ++ d(base_qmail,"man/man8",auto_uido,auto_gidq,0755); + +- d(auto_qmail,"alias",auto_uida,auto_gidq,02755); ++ d(base_qmail,"alias",auto_uida,auto_gidq,02755); + +- d(auto_qmail,"queue",auto_uidq,auto_gidq,0750); +- d(auto_qmail,"queue/pid",auto_uidq,auto_gidq,0700); +- d(auto_qmail,"queue/intd",auto_uidq,auto_gidq,0700); +- d(auto_qmail,"queue/todo",auto_uidq,auto_gidq,0750); +- d(auto_qmail,"queue/bounce",auto_uids,auto_gidq,0700); ++ d(base_qmail,"queue",auto_uidq,auto_gidq,0750); ++ d(base_qmail,"queue/pid",auto_uidq,auto_gidq,0700); ++ d(base_qmail,"queue/intd",auto_uidq,auto_gidq,0700); ++ d(base_qmail,"queue/todo",auto_uidq,auto_gidq,0750); ++ d(base_qmail,"queue/bounce",auto_uids,auto_gidq,0700); + + dsplit("queue/mess",auto_uidq,0750); + dsplit("queue/info",auto_uids,0700); + dsplit("queue/local",auto_uids,0700); + dsplit("queue/remote",auto_uids,0700); + +- d(auto_qmail,"queue/lock",auto_uidq,auto_gidq,0750); +- z(auto_qmail,"queue/lock/tcpto",1024,auto_uidr,auto_gidq,0644); +- z(auto_qmail,"queue/lock/sendmutex",0,auto_uids,auto_gidq,0600); +- p(auto_qmail,"queue/lock/trigger",auto_uids,auto_gidq,0622); ++ d(base_qmail,"queue/lock",auto_uidq,auto_gidq,0750); ++ z(base_qmail,"queue/lock/tcpto",1024,auto_uidr,auto_gidq,0644); ++ z(base_qmail,"queue/lock/sendmutex",0,auto_uids,auto_gidq,0600); ++ p(base_qmail,"queue/lock/trigger",auto_uids,auto_gidq,0622); + +- c(auto_qmail,"boot","home",auto_uido,auto_gidq,0755); +- c(auto_qmail,"boot","home+df",auto_uido,auto_gidq,0755); +- c(auto_qmail,"boot","proc",auto_uido,auto_gidq,0755); +- c(auto_qmail,"boot","proc+df",auto_uido,auto_gidq,0755); +- c(auto_qmail,"boot","binm1",auto_uido,auto_gidq,0755); +- c(auto_qmail,"boot","binm1+df",auto_uido,auto_gidq,0755); +- c(auto_qmail,"boot","binm2",auto_uido,auto_gidq,0755); +- c(auto_qmail,"boot","binm2+df",auto_uido,auto_gidq,0755); +- c(auto_qmail,"boot","binm3",auto_uido,auto_gidq,0755); +- c(auto_qmail,"boot","binm3+df",auto_uido,auto_gidq,0755); ++ c(base_qmail,"boot","home",auto_uido,auto_gidq,0755); ++ c(base_qmail,"boot","home+df",auto_uido,auto_gidq,0755); ++ c(base_qmail,"boot","proc",auto_uido,auto_gidq,0755); ++ c(base_qmail,"boot","proc+df",auto_uido,auto_gidq,0755); ++ c(base_qmail,"boot","binm1",auto_uido,auto_gidq,0755); ++ c(base_qmail,"boot","binm1+df",auto_uido,auto_gidq,0755); ++ c(base_qmail,"boot","binm2",auto_uido,auto_gidq,0755); ++ c(base_qmail,"boot","binm2+df",auto_uido,auto_gidq,0755); ++ c(base_qmail,"boot","binm3",auto_uido,auto_gidq,0755); ++ c(base_qmail,"boot","binm3+df",auto_uido,auto_gidq,0755); + +- c(auto_qmail,"doc","FAQ",auto_uido,auto_gidq,0644); +- c(auto_qmail,"doc","UPGRADE",auto_uido,auto_gidq,0644); +- c(auto_qmail,"doc","SENDMAIL",auto_uido,auto_gidq,0644); +- c(auto_qmail,"doc","INSTALL",auto_uido,auto_gidq,0644); +- c(auto_qmail,"doc","INSTALL.alias",auto_uido,auto_gidq,0644); +- c(auto_qmail,"doc","INSTALL.ctl",auto_uido,auto_gidq,0644); +- c(auto_qmail,"doc","INSTALL.ids",auto_uido,auto_gidq,0644); +- c(auto_qmail,"doc","INSTALL.maildir",auto_uido,auto_gidq,0644); +- c(auto_qmail,"doc","INSTALL.mbox",auto_uido,auto_gidq,0644); +- c(auto_qmail,"doc","INSTALL.vsm",auto_uido,auto_gidq,0644); +- c(auto_qmail,"doc","TEST.deliver",auto_uido,auto_gidq,0644); +- c(auto_qmail,"doc","TEST.receive",auto_uido,auto_gidq,0644); +- c(auto_qmail,"doc","REMOVE.sendmail",auto_uido,auto_gidq,0644); +- c(auto_qmail,"doc","REMOVE.binmail",auto_uido,auto_gidq,0644); +- c(auto_qmail,"doc","PIC.local2alias",auto_uido,auto_gidq,0644); +- c(auto_qmail,"doc","PIC.local2ext",auto_uido,auto_gidq,0644); +- c(auto_qmail,"doc","PIC.local2local",auto_uido,auto_gidq,0644); +- c(auto_qmail,"doc","PIC.local2rem",auto_uido,auto_gidq,0644); +- c(auto_qmail,"doc","PIC.local2virt",auto_uido,auto_gidq,0644); +- c(auto_qmail,"doc","PIC.nullclient",auto_uido,auto_gidq,0644); +- c(auto_qmail,"doc","PIC.relaybad",auto_uido,auto_gidq,0644); +- c(auto_qmail,"doc","PIC.relaygood",auto_uido,auto_gidq,0644); +- c(auto_qmail,"doc","PIC.rem2local",auto_uido,auto_gidq,0644); ++ c(base_qmail,"doc","FAQ",auto_uido,auto_gidq,0644); ++ c(base_qmail,"doc","UPGRADE",auto_uido,auto_gidq,0644); ++ c(base_qmail,"doc","SENDMAIL",auto_uido,auto_gidq,0644); ++ c(base_qmail,"doc","INSTALL",auto_uido,auto_gidq,0644); ++ c(base_qmail,"doc","INSTALL.alias",auto_uido,auto_gidq,0644); ++ c(base_qmail,"doc","INSTALL.ctl",auto_uido,auto_gidq,0644); ++ c(base_qmail,"doc","INSTALL.ids",auto_uido,auto_gidq,0644); ++ c(base_qmail,"doc","INSTALL.maildir",auto_uido,auto_gidq,0644); ++ c(base_qmail,"doc","INSTALL.mbox",auto_uido,auto_gidq,0644); ++ c(base_qmail,"doc","INSTALL.vsm",auto_uido,auto_gidq,0644); ++ c(base_qmail,"doc","TEST.deliver",auto_uido,auto_gidq,0644); ++ c(base_qmail,"doc","TEST.receive",auto_uido,auto_gidq,0644); ++ c(base_qmail,"doc","REMOVE.sendmail",auto_uido,auto_gidq,0644); ++ c(base_qmail,"doc","REMOVE.binmail",auto_uido,auto_gidq,0644); ++ c(base_qmail,"doc","PIC.local2alias",auto_uido,auto_gidq,0644); ++ c(base_qmail,"doc","PIC.local2ext",auto_uido,auto_gidq,0644); ++ c(base_qmail,"doc","PIC.local2local",auto_uido,auto_gidq,0644); ++ c(base_qmail,"doc","PIC.local2rem",auto_uido,auto_gidq,0644); ++ c(base_qmail,"doc","PIC.local2virt",auto_uido,auto_gidq,0644); ++ c(base_qmail,"doc","PIC.nullclient",auto_uido,auto_gidq,0644); ++ c(base_qmail,"doc","PIC.relaybad",auto_uido,auto_gidq,0644); ++ c(base_qmail,"doc","PIC.relaygood",auto_uido,auto_gidq,0644); ++ c(base_qmail,"doc","PIC.rem2local",auto_uido,auto_gidq,0644); + +- c(auto_qmail,"bin","qmail-queue",auto_uidq,auto_gidq,04711); +- c(auto_qmail,"bin","qmail-lspawn",auto_uido,auto_gidq,0700); +- c(auto_qmail,"bin","qmail-start",auto_uido,auto_gidq,0700); +- c(auto_qmail,"bin","qmail-getpw",auto_uido,auto_gidq,0711); +- c(auto_qmail,"bin","qmail-local",auto_uido,auto_gidq,0711); +- c(auto_qmail,"bin","qmail-remote",auto_uido,auto_gidq,0711); +- c(auto_qmail,"bin","qmail-rspawn",auto_uido,auto_gidq,0711); +- c(auto_qmail,"bin","qmail-clean",auto_uido,auto_gidq,0711); +- c(auto_qmail,"bin","qmail-send",auto_uido,auto_gidq,0711); +- c(auto_qmail,"bin","splogger",auto_uido,auto_gidq,0711); +- c(auto_qmail,"bin","qmail-newu",auto_uido,auto_gidq,0700); +- c(auto_qmail,"bin","qmail-newmrh",auto_uido,auto_gidq,0700); +- c(auto_qmail,"bin","qmail-pw2u",auto_uido,auto_gidq,0711); +- c(auto_qmail,"bin","qmail-inject",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","predate",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","datemail",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","mailsubj",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","qmail-showctl",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","qmail-qread",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","qmail-qstat",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","qmail-tcpto",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","qmail-tcpok",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","qmail-pop3d",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","qmail-popup",auto_uido,auto_gidq,0711); +- c(auto_qmail,"bin","qmail-qmqpc",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","qmail-qmqpd",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","qmail-qmtpd",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","qmail-smtpd",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","sendmail",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","tcp-env",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","qreceipt",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","qsmhook",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","qbiff",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","forward",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","preline",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","condredirect",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","bouncesaying",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","except",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","maildirmake",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","maildir2mbox",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","maildirwatch",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","qail",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","elq",auto_uido,auto_gidq,0755); +- c(auto_qmail,"bin","pinq",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","qmail-queue",auto_uidq,auto_gidq,04711); ++ c(base_qmail,"bin","qmail-lspawn",auto_uido,auto_gidq,0700); ++ c(base_qmail,"bin","qmail-start",auto_uido,auto_gidq,0700); ++ c(base_qmail,"bin","qmail-getpw",auto_uido,auto_gidq,0711); ++ c(base_qmail,"bin","qmail-local",auto_uido,auto_gidq,0711); ++ c(base_qmail,"bin","qmail-remote",auto_uido,auto_gidq,0711); ++ c(base_qmail,"bin","qmail-rspawn",auto_uido,auto_gidq,0711); ++ c(base_qmail,"bin","qmail-clean",auto_uido,auto_gidq,0711); ++ c(base_qmail,"bin","qmail-send",auto_uido,auto_gidq,0711); ++ c(base_qmail,"bin","splogger",auto_uido,auto_gidq,0711); ++ c(base_qmail,"bin","qmail-newu",auto_uido,auto_gidq,0700); ++ c(base_qmail,"bin","qmail-newmrh",auto_uido,auto_gidq,0700); ++ c(base_qmail,"bin","qmail-pw2u",auto_uido,auto_gidq,0711); ++ c(base_qmail,"bin","qmail-inject",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","predate",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","datemail",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","mailsubj",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","qmail-showctl",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","qmail-qread",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","qmail-qstat",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","qmail-tcpto",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","qmail-tcpok",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","qmail-pop3d",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","qmail-popup",auto_uido,auto_gidq,0711); ++ c(base_qmail,"bin","qmail-qmqpc",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","qmail-qmqpd",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","qmail-qmtpd",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","qmail-smtpd",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","sendmail",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","tcp-env",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","qreceipt",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","qsmhook",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","qbiff",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","forward",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","preline",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","condredirect",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","bouncesaying",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","except",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","maildirmake",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","maildir2mbox",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","maildirwatch",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","qail",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","elq",auto_uido,auto_gidq,0755); ++ c(base_qmail,"bin","pinq",auto_uido,auto_gidq,0755); + +- c(auto_qmail,"man/man5","addresses.5",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat5","addresses.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man5","envelopes.5",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat5","envelopes.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man5","maildir.5",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat5","maildir.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man5","mbox.5",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat5","mbox.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man5","dot-qmail.5",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat5","dot-qmail.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man5","qmail-control.5",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat5","qmail-control.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man5","qmail-header.5",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat5","qmail-header.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man5","qmail-log.5",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat5","qmail-log.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man5","qmail-users.5",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat5","qmail-users.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man5","tcp-environ.5",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat5","tcp-environ.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man5","addresses.5",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat5","addresses.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man5","envelopes.5",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat5","envelopes.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man5","maildir.5",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat5","maildir.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man5","mbox.5",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat5","mbox.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man5","dot-qmail.5",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat5","dot-qmail.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man5","qmail-control.5",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat5","qmail-control.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man5","qmail-header.5",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat5","qmail-header.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man5","qmail-log.5",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat5","qmail-log.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man5","qmail-users.5",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat5","qmail-users.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man5","tcp-environ.5",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat5","tcp-environ.0",auto_uido,auto_gidq,0644); + +- c(auto_qmail,"man/man7","forgeries.7",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat7","forgeries.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man7","qmail-limits.7",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat7","qmail-limits.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man7","qmail.7",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat7","qmail.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man7","forgeries.7",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat7","forgeries.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man7","qmail-limits.7",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat7","qmail-limits.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man7","qmail.7",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat7","qmail.0",auto_uido,auto_gidq,0644); + +- c(auto_qmail,"man/man1","forward.1",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat1","forward.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man1","condredirect.1",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat1","condredirect.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man1","bouncesaying.1",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat1","bouncesaying.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man1","except.1",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat1","except.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man1","maildirmake.1",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat1","maildirmake.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man1","maildir2mbox.1",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat1","maildir2mbox.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man1","maildirwatch.1",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat1","maildirwatch.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man1","mailsubj.1",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat1","mailsubj.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man1","qreceipt.1",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat1","qreceipt.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man1","qbiff.1",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat1","qbiff.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man1","preline.1",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat1","preline.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man1","tcp-env.1",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat1","tcp-env.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man1","forward.1",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat1","forward.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man1","condredirect.1",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat1","condredirect.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man1","bouncesaying.1",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat1","bouncesaying.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man1","except.1",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat1","except.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man1","maildirmake.1",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat1","maildirmake.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man1","maildir2mbox.1",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat1","maildir2mbox.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man1","maildirwatch.1",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat1","maildirwatch.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man1","mailsubj.1",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat1","mailsubj.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man1","qreceipt.1",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat1","qreceipt.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man1","qbiff.1",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat1","qbiff.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man1","preline.1",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat1","preline.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man1","tcp-env.1",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat1","tcp-env.0",auto_uido,auto_gidq,0644); + +- c(auto_qmail,"man/man8","qmail-local.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","qmail-local.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man8","qmail-lspawn.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","qmail-lspawn.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man8","qmail-getpw.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","qmail-getpw.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man8","qmail-remote.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","qmail-remote.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man8","qmail-rspawn.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","qmail-rspawn.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man8","qmail-clean.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","qmail-clean.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man8","qmail-send.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","qmail-send.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man8","qmail-start.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","qmail-start.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man8","splogger.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","splogger.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man8","qmail-queue.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","qmail-queue.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man8","qmail-inject.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","qmail-inject.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man8","qmail-showctl.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","qmail-showctl.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man8","qmail-newmrh.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","qmail-newmrh.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man8","qmail-newu.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","qmail-newu.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man8","qmail-pw2u.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","qmail-pw2u.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man8","qmail-qread.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","qmail-qread.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man8","qmail-qstat.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","qmail-qstat.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man8","qmail-tcpok.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","qmail-tcpok.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man8","qmail-tcpto.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","qmail-tcpto.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man8","qmail-pop3d.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","qmail-pop3d.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man8","qmail-popup.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","qmail-popup.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man8","qmail-qmqpc.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","qmail-qmqpc.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man8","qmail-qmqpd.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","qmail-qmqpd.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man8","qmail-qmtpd.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","qmail-qmtpd.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man8","qmail-smtpd.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","qmail-smtpd.0",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/man8","qmail-command.8",auto_uido,auto_gidq,0644); +- c(auto_qmail,"man/cat8","qmail-command.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","qmail-local.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","qmail-local.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","qmail-lspawn.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","qmail-lspawn.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","qmail-getpw.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","qmail-getpw.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","qmail-remote.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","qmail-remote.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","qmail-rspawn.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","qmail-rspawn.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","qmail-clean.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","qmail-clean.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","qmail-send.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","qmail-send.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","qmail-start.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","qmail-start.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","splogger.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","splogger.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","qmail-queue.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","qmail-queue.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","qmail-inject.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","qmail-inject.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","qmail-showctl.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","qmail-showctl.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","qmail-newmrh.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","qmail-newmrh.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","qmail-newu.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","qmail-newu.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","qmail-pw2u.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","qmail-pw2u.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","qmail-qread.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","qmail-qread.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","qmail-qstat.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","qmail-qstat.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","qmail-tcpok.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","qmail-tcpok.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","qmail-tcpto.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","qmail-tcpto.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","qmail-pop3d.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","qmail-pop3d.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","qmail-popup.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","qmail-popup.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","qmail-qmqpc.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","qmail-qmqpc.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","qmail-qmqpd.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","qmail-qmqpd.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","qmail-qmtpd.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","qmail-qmtpd.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","qmail-smtpd.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","qmail-smtpd.0",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/man8","qmail-command.8",auto_uido,auto_gidq,0644); ++ c(base_qmail,"man/cat8","qmail-command.0",auto_uido,auto_gidq,0644); + } +--- /dev/null ++++ netqmail-1.06/make-loadi.sh +@@ -0,0 +1,2 @@ ++echo 'main="$1"; shift' ++echo exec "$LDI" '-o "$main" "$main".o ${1+"$@"}' diff --git a/user/netqmail/0002-qbiffutmpx-20170820.patch b/user/netqmail/0002-qbiffutmpx-20170820.patch new file mode 100644 index 000000000..a55044f6e --- /dev/null +++ b/user/netqmail/0002-qbiffutmpx-20170820.patch @@ -0,0 +1,130 @@ +<https://schmonz.com/qmail/qbiffutmpx> + +diff --git a/Makefile b/Makefile +index 0f0e31a..ae8d229 100644 +--- a/Makefile ++++ b/Makefile +@@ -685,6 +685,13 @@ chkshsgr warn-shsgr tryshsgr.c compile load + hasshsgr.h + rm -f tryshsgr.o tryshsgr + ++hasutmpx.h: \ ++tryutmpx.c compile load ++ ( ( ./compile tryutmpx.c && ./load tryutmpx ) >/dev/null \ ++ 2>&1 \ ++ && echo \#define HASUTMPX 1 || exit 0 ) > hasutmpx.h ++ rm -f tryutmpx.o tryutmpx ++ + haswaitp.h: \ + trywaitp.c compile load + ( ( ./compile trywaitp.c && ./load trywaitp ) >/dev/null \ +@@ -1071,7 +1078,8 @@ qbiff.1 + + qbiff.o: \ + compile qbiff.c readwrite.h stralloc.h gen_alloc.h substdio.h subfd.h \ +-substdio.h open.h byte.h str.h headerbody.h hfield.h env.h exit.h ++substdio.h open.h byte.h str.h headerbody.h hfield.h env.h exit.h \ ++hasutmpx.h + ./compile qbiff.c + + qmail-clean: \ +diff --git a/TARGETS b/TARGETS +index facdad7..c37a453 100644 +--- a/TARGETS ++++ b/TARGETS +@@ -388,3 +388,4 @@ + man + setup + check ++hasutmpx.h +diff --git a/qbiff.c b/qbiff.c +index 4e9f1d8..f21b6bf 100644 +--- a/qbiff.c ++++ b/qbiff.c +@@ -1,5 +1,9 @@ + #include <sys/types.h> + #include <sys/stat.h> ++#include "hasutmpx.h" ++#ifdef HASUTMPX ++#include <utmpx.h> ++#else + #include <utmp.h> + #ifndef UTMP_FILE + #ifdef _PATH_UTMP +@@ -8,6 +12,7 @@ + #define UTMP_FILE "/etc/utmp" + #endif + #endif ++#endif + #include "readwrite.h" + #include "stralloc.h" + #include "substdio.h" +@@ -20,15 +25,22 @@ + #include "env.h" + #include "exit.h" + ++#ifndef HASUTMPX + substdio ssutmp; + char bufutmp[sizeof(struct utmp) * 16]; + int fdutmp; ++#endif + substdio sstty; + char buftty[1024]; + int fdtty; + ++#ifdef HASUTMPX ++struct utmpx *ut; ++char line[sizeof(ut->ut_line) + 1]; ++#else + struct utmp ut; + char line[sizeof(ut.ut_line) + 1]; ++#endif + stralloc woof = {0}; + stralloc tofrom = {0}; + stralloc text = {0}; +@@ -63,7 +75,11 @@ void main() + if (!(user = env_get("USER"))) _exit(0); + if (!(sender = env_get("SENDER"))) _exit(0); + if (!(userext = env_get("LOCAL"))) _exit(0); ++#ifdef HASUTMPX ++ if (str_len(user) > sizeof(ut->ut_user)) _exit(0); ++#else + if (str_len(user) > sizeof(ut.ut_name)) _exit(0); ++#endif + + if (!stralloc_copys(&tofrom,"*** TO <")) _exit(0); + if (!stralloc_cats(&tofrom,userext)) _exit(0); +@@ -88,6 +104,7 @@ void main() + if (!stralloc_cat(&woof,&text)) _exit(0); + if (!stralloc_cats(&woof,"\015\n")) _exit(0); + ++#ifndef HASUTMPX + fdutmp = open_read(UTMP_FILE); + if (fdutmp == -1) _exit(0); + substdio_fdbuf(&ssutmp,read,fdutmp,bufutmp,sizeof(bufutmp)); +@@ -97,6 +114,13 @@ void main() + { + byte_copy(line,sizeof(ut.ut_line),ut.ut_line); + line[sizeof(ut.ut_line)] = 0; ++#else ++ while ((ut = getutxent())) ++ if (ut->ut_type == USER_PROCESS && !str_diffn(ut->ut_user,user,sizeof(ut->ut_user))) ++ { ++ byte_copy(line,sizeof(ut->ut_line),ut->ut_line); ++ line[sizeof(ut->ut_line)] = 0; ++#endif + if (line[0] == '/') continue; + if (!line[0]) continue; + if (line[str_chr(line,'.')]) continue; +diff --git a/tryutmpx.c b/tryutmpx.c +new file mode 100644 +index 0000000..551b597 +--- /dev/null ++++ b/tryutmpx.c +@@ -0,0 +1,6 @@ ++#include <utmpx.h> ++ ++void main() ++{ ++ ; ++} diff --git a/user/netqmail/0003-qmailremote-20170716.patch b/user/netqmail/0003-qmailremote-20170716.patch new file mode 100644 index 000000000..706441d21 --- /dev/null +++ b/user/netqmail/0003-qmailremote-20170716.patch @@ -0,0 +1,62 @@ +<https://schmonz.com/qmail/remote> + +diff --git a/Makefile b/Makefile +index 0f0e31a..8042611 100644 +--- a/Makefile ++++ b/Makefile +@@ -1462,11 +1462,11 @@ tcpto.h readwrite.h timeoutconn.h timeoutread.h timeoutwrite.h + + qmail-rspawn: \ + load qmail-rspawn.o spawn.o tcpto_clean.o now.o coe.o sig.a open.a \ +-seek.a lock.a wait.a fd.a stralloc.a alloc.a substdio.a error.a str.a \ ++seek.a lock.a wait.a fd.a stralloc.a alloc.a substdio.a error.a env.a str.a \ + auto_qmail.o auto_uids.o auto_spawn.o + ./load qmail-rspawn spawn.o tcpto_clean.o now.o coe.o \ + sig.a open.a seek.a lock.a wait.a fd.a stralloc.a alloc.a \ +- substdio.a error.a str.a auto_qmail.o auto_uids.o \ ++ substdio.a error.a env.a str.a auto_qmail.o auto_uids.o \ + auto_spawn.o + + qmail-rspawn.0: \ +@@ -1474,7 +1474,7 @@ qmail-rspawn.8 + nroff -man qmail-rspawn.8 > qmail-rspawn.0 + + qmail-rspawn.o: \ +-compile qmail-rspawn.c fd.h wait.h substdio.h exit.h fork.h error.h \ ++compile qmail-rspawn.c fd.h wait.h substdio.h exit.h fork.h error.h env.h \ + tcpto.h + ./compile qmail-rspawn.c + +diff --git a/qmail-rspawn.c b/qmail-rspawn.c +index 9d838e6..e064db1 100644 +--- a/qmail-rspawn.c ++++ b/qmail-rspawn.c +@@ -5,6 +5,17 @@ + #include "fork.h" + #include "error.h" + #include "tcpto.h" ++#include "env.h" ++ ++static char *qrargs[1] = { 0 }; ++ ++static void setup_qrargs() ++{ ++ if (!qrargs[0]) ++ qrargs[0] = env_get("QMAILREMOTE"); ++ if (!qrargs[0]) ++ qrargs[0] = "qmail-remote"; ++} + + void initialize(argc,argv) + int argc; +@@ -84,7 +95,9 @@ char *s; char *r; int at; + int f; + char *(args[5]); + +- args[0] = "qmail-remote"; ++ setup_qrargs(); ++ ++ args[0] = qrargs[0]; + args[1] = r + at + 1; + args[2] = s; + args[3] = r; diff --git a/user/netqmail/0004-notifyfd.patch b/user/netqmail/0004-notifyfd.patch new file mode 100644 index 000000000..d734b1417 --- /dev/null +++ b/user/netqmail/0004-notifyfd.patch @@ -0,0 +1,41 @@ +--- netqmail-1.06.old/qmail-send.c ++++ netqmail-1.06/qmail-send.c +@@ -1,5 +1,7 @@ + #include <sys/types.h> + #include <sys/stat.h> ++#include <fcntl.h> ++#include <stdlib.h> + #include "readwrite.h" + #include "sig.h" + #include "direntry.h" +@@ -1521,7 +1523,17 @@ + int nfds; + struct timeval tv; + int c; ++ int notifyfd = -1; + ++ { ++ char *x = getenv("QMAIL_NOTIFY_FD") ; ++ if (x) ++ { ++ unsigned long u; ++ if (scan_ulong(x, &u) && fcntl(u, F_GETFD) >= 0) notifyfd = (int)u; ++ } ++ } ++ + if (chdir(auto_qmail) == -1) + { log1("alert: cannot start: unable to switch to home directory\n"); _exit(111); } + if (!getcontrols()) +@@ -1567,6 +1579,12 @@ + pass_init(); + todo_init(); + cleanup_init(); ++ ++ if (notifyfd >=0) ++ { ++ write(notifyfd, "\n", 1); ++ close(notifyfd); ++ } + + while (!flagexitasap || !del_canexit()) + { diff --git a/user/netqmail/APKBUILD b/user/netqmail/APKBUILD new file mode 100644 index 000000000..bda855086 --- /dev/null +++ b/user/netqmail/APKBUILD @@ -0,0 +1,114 @@ +# Contributor: Laurent Bercot <ska-adelie@skarnet.org> +# Maintainer: Laurent Bercot <ska-adelie@skarnet.org> +pkgname=netqmail +pkgver=1.06 +pkgrel=0 +pkgdesc="The qmail mail transfer agent (community version)" +url="http://www.qmail.org/$pkgname/" +arch="all" +license="ISC" +provides=sendmail +options="suid !check" # suid programs (qmail-queue); no test suite +depends="execline s6 s6-networking" +subpackages="$pkgname-doc $pkgname-openrc" +install="$pkgname.post-install $pkgname.pre-deinstall" +source="http://www.qmail.org/$pkgname-$pkgver.tar.gz \ + 0001-DESTDIR.patch \ + 0002-qbiffutmpx-20170820.patch \ + 0003-qmailremote-20170716.patch + 0004-notifyfd.patch + qmail.run + smtpd.run + smtpsd.run + $pkgname.confd + $pkgname.initd" + +makeservicedir() +{ + mkdir -p -m 0755 "$1"/log "$1"/env + { + echo '#!/bin/execlineb -P' + echo + echo 's6-setuidgid qmaill' + echo 's6-envdir ../env' + echo 'importas -u IP IP' + echo 'exec -c' + echo "s6-log t $4" + } > "$1"/log/run + echo "$2" > "$1"/notification-fd + cp -f "$3" "$1"/run + + mkdir -p -m 3730 "$1"/event + mkdir -p -m 0700 "$1"/supervise + touch "$1"/supervise/lock "$1"/supervise/death_tally + mkfifo -m 0600 "$1"/supervise/control + dd if=/dev/zero of="$1"/supervise/status bs=35 count=1 + if test $5 -eq 0 ; then + echo /var/qmail/bin:/usr/bin:/usr/sbin:/bin:/sbin > "$1"/env/PATH + echo "$2" > "$1"/env/QMAIL_NOTIFY_FD + else + echo 110 > "$1"/env/UID + echo 200 > "$1"/env/GID + echo > "$1"/env/GIDLIST + if test $5 -eq 6 ; then + mkdir -p -m 0755 "$1"/data/rules/ip6/::_0 + touch "$1"/data/rules/ip6/::_0/allow + sed -i -e 's/s6-tcpserver /s6-tcpserver6 /' "$1"/run + elif test $5 -eq 4 ; then + mkdir -p -m 0755 "$1"/data/rules/ip4/0.0.0.0_0 + touch "$1"/data/rules/ip4/0.0.0.0_0/allow + sed -i -e 's/s6-tcpserver /s6-tcpserver4 /' "$1"/run + fi + fi + chmod 0755 "$1"/run "$1"/log/run +} + +build() { + cd "$builddir" + echo "gcc -O2 -pipe -W -Wall -Wextra" > conf-cc + echo "gcc -s -static" > conf-ld + echo "gcc -s" > conf-ldi # because fakeroot doesn't work with static programs + echo 022 > conf-patrn + echo /var/qmail > conf-qmail + echo 255 > conf-spawn + { echo alias; echo qmaild; echo qmaill; echo root; echo qmailp; echo qmailq; echo qmailr; echo qmails; } > conf-users + { echo qmail; echo nofiles; } > conf-groups + make + + + # The following should be done in package(), but abuild only + # does it under fakeroot when it's done in build() and + # there's no package() function. + + mkdir -p -m 0755 "$pkgdir"/var/qmail/services "$pkgdir"/var/log/qmail "$pkgdir"/usr/bin "$pkgdir"/usr/sbin "$pkgdir"/usr/share/doc "$pkgdir"/etc/qmail/services "$pkgdir"/etc/conf.d "$pkgdir"/etc/init.d + chown qmaill:qmaill "$pkgdir"/var/log/qmail + chmod 2700 "$pkgdir"/var/log/qmail + cp -f "$srcdir/$pkgname".confd "$pkgdir/etc/conf.d/$pkgname" + cp -f "$srcdir/$pkgname".initd "$pkgdir/etc/init.d/$pkgname" + chmod 0755 "$pkgdir/etc/init.d/$pkgname" + + env DESTDIR="$pkgdir" make setup install + ln -s ../../var/qmail/bin/sendmail "$pkgdir"/usr/sbin/ + ln -s ../../var/qmail/control "$pkgdir"/etc/qmail/control + rm -rf "$pkgdir"/var/qmail/boot "$pkgdir"/var/qmail/man/cat? + mv -f "$pkgdir"/var/qmail/man "$pkgdir"/usr/share/man + mv -f "$pkgdir"/var/qmail/doc "$pkgdir/usr/share/doc/$pkgname-$pkgver" + echo 255 > "$pkgdir"/var/qmail/control/concurrencylocal + echo 255 > "$pkgdir"/var/qmail/control/concurrencyremote + makeservicedir "$pkgdir"/var/qmail/services/qmail 7 "$srcdir"/qmail.run 'n20 s1000000 /var/log/qmail' 0 + makeservicedir "$pkgdir"/etc/qmail/services/smtpd4-skeleton 3 "$srcdir"/smtpd.run '/var/log/smtpd-$IP' 4 + makeservicedir "$pkgdir"/etc/qmail/services/smtpd6-skeleton 3 "$srcdir"/smtpd.run '/var/log/smtpd-$IP' 6 + makeservicedir "$pkgdir"/etc/qmail/services/smtpsd4-skeleton 3 "$srcdir"/smtpsd.run '/var/log/smtpsd-$IP' 4 + makeservicedir "$pkgdir"/etc/qmail/services/smtpsd6-skeleton 3 "$srcdir"/smtpsd.run '/var/log/smtpsd-$IP' 6 +} + +sha512sums="de40a6d8fac502bd785010434d99b99f2c0524e10aea3d0f2a0d35c70fce91e991eb1fb8f20a1276eb56d7e73130ea5e2c178f6075d138af47b28d9ca6e6046b netqmail-1.06.tar.gz +ad126cad5c0d35351919ad87022fd94b910519d91cf82f38c158f423bbfc1b82455844a791ba0c69d347af1a20a86b095bed571f75365a86ea786cbc9c626487 0001-DESTDIR.patch +b3af9c29e6d46daa2a1b9f677c6f32892d5f8c9b8d5c2bdd6f34b106dd5ad41394c05a5ebe145c6e29b4ced4482f08b2d09e7818fd309123c0d087600500e336 0002-qbiffutmpx-20170820.patch +cbebdc72c7cc5c437531c9277534ae552c6d044a83b36e3f3ce60ab5563c55eb814d6c543cc0997abab73075d1b517cc0929dd65674d468d517b0ca38196e2b4 0003-qmailremote-20170716.patch +b32a8a36c8ab8872abd4f1a117482f064a6d631a6bb2ba75cafe61743bef09f923d26935d9514eec33a7dec5aeb3d0b517d677e55924859d2db5233bc11f9f11 0004-notifyfd.patch +954a905bac5e3bc49f180dc0de7f6ee4c4ae8f94dd400ee4b06d3c944f1ff1cfc44bddccb07ae439f2523ad06fcb89023e57d091737da88f836013757794e931 qmail.run +c0cd244af4d8186305c51b0e93960bdb1ea6ce40f1adf20c4f72419aa7498e35649590919ebd16547a0313676bf9171c9efea2ff8ac3a5c773b18473a972a977 smtpd.run +719c4ce5ad93cddeafbb734cffeec3fd959d3f374e44e1f34e9a25d638303dd97df41642d3df5c7a069a8db47d1e31c32a16ecd2d04b72860c4e00bbba0c9fcf smtpsd.run +80ee7e8b3c1ca7cdb00044e6fdd5b9c6a39fd9c882b470f4968c79b974c95e48946a1a3a8b79d9d0ed134ecf09b1185823bf6d022f8b17168e34c18f44ddd16f netqmail.confd +7600285e70511447b11161a2fc1ca11debc5adcde1d76583d4c715e9710cab876f8be158fd8e034d480588d3d4978c42a9254c29f2db70913105ab009cab6479 netqmail.initd" diff --git a/user/netqmail/netqmail.confd b/user/netqmail/netqmail.confd new file mode 100644 index 000000000..b3f331fdb --- /dev/null +++ b/user/netqmail/netqmail.confd @@ -0,0 +1,49 @@ +# netqmail configuration for SMTP servers. + +# Most of the configuration for qmail is done in /var/qmail/control. +# Please read the documentation of qmail-control(5) and +# and adjust the files in /var/qmail/control according to your needs. +# In particular, that's where options for *routing* and *sending* +# mail are set. + +# The file you're viewing is about *receiving* mail. + + +# List the IP addresses (v4 or v6) where a SMTP daemon should +# be listening. v4 and v6 are handled separately (if you have +# one interface, you need to list both its IPv4 and its IPv6 +# address). +# 0.0.0.0 means all v4 addresses. Remove it if you want to +# list v4 addresses explicitly. +# :: means all v6 addresses. Remove it if you want to +# list v6 addresses explicitly. + +SMTPD_IPS="0.0.0.0 ::" + + +# TLS configuration. +# If you want to have SMTP-over-TLS daemons, the +# SMTPSD_KEYFILE should point to your private key, and the +# SMTPSD_CERTFILE should point to your certificate. +# Leave them empty for no SMTP-over-TLS. + +SMTPSD_KEYFILE= +SMTPSD_CERTFILE= + + +# List the IP addresses (v4 or v6) where a SMTP-over-TLS daemon +# should be listening. This will only be used if SMTPSD_KEYFILE +# and SMTPSD_CERTFILE are defined. + +SMTPSD_IPS="0.0.0.0 ::" + + +# Relaying configuration. +# If you want qmail to act as a relay for some subnets, declare +# the subnets here: for instance 1.2.3.0/24, 1.2.3.4/30, +# 0001:0002:0003:0004::/64. A single IP is a subnet with a netmask +# of 32 (for IPv4) or 128 (for IPv6). +# DO NOT ADD PUBLIC IP ADDRESSES THAT YOU DO NOT OWN. Doing this +# would make you an open relay and get you blacklisted by spam cops. + +RELAY_SUBNETS="" diff --git a/user/netqmail/netqmail.initd b/user/netqmail/netqmail.initd new file mode 100644 index 000000000..dae9c4d55 --- /dev/null +++ b/user/netqmail/netqmail.initd @@ -0,0 +1,153 @@ +#!/sbin/openrc-run + +description="Start/stop the s6 services for netqmail" + +depend() +{ + after net + after localmount +} + +makesmtpd() +{ + set -e + ip="$1" + usetls="$2" + if "$usetls" ; then + s="s" + port=25 + else + s= + port=465 + fi + if s6-tcpserver6-socketbinder -dBb0 -- "$ip" "$port" true 2>/dev/null ; then + ipv=6 + relayfor="$smtprelay6" + elif s6-tcpserver4-socketbinder -dBb0 -- "$ip" "$port" true 2>/dev/null ; then + ipv=4 + relayfor="$smtprelay4" + else + return 1 + fi + + service="smtp${s}d-$ip" + sdir=/run/services/"$service" + logdir=/var/log/"smtp${s}d-$ip" + + mkdir -p -m 0755 "$logdir" + chown qmaill:qmaill "$logdir" + chmod 2700 "$logdir" + + rm -rf "$sdir" + cp -a /etc/qmail/services/smtp"${s}"d"${ipv}"-skeleton "$sdir" + echo "$ip" > "$sdir"/env/IP + if "$usetls" ; then + echo "$SMTPSD_KEYFILE" > "$sdir"/env/KEYFILE + echo "$SMTPSD_CERTFILE" > "$sdir"/env/CERTFILE + fi + + for j in $relayfor ; do + mkdir -p -m 0755 "$sdir/data/rules/ip${ipv}/$j/env" + touch "$sdir/data/rules/ip${ipv}/$j/allow" + echo > "$sdir/data/rules/ip${ipv}/$j/env/RELAYCLIENT" + done + + return 0 +} + +stop() +{ + set -e + . /etc/conf.d/netqmail + ebegin "Stopping SMTP and SMTPS listeners" + dirs="" + logs="" + for i in ${SMTPD_IPS} ; do + rm -f "/run/service/smtpd-$i" + s6-svc -d "/run/services/smtpd-$i" + dirs="$dirs /run/services/smtpd-$i" + logs="$logs /run/services/smtpd-$i/log" + done + if test -r "$SMTPSD_KEYFILE" && test -r "$SMTPSD_CERTFILE" ; then + for i in ${SMTPSD_IPS} ; do + rm -f "/run/service/smtpsd-$i" + s6-svc -d "/run/services/smtpsd-$i" + dirs="$dirs /run/services/smtpsd-$i" + logs="$logs /run/services/smtpsd-$i/log" + done + fi + s6-svwait -D $dirs + eend $? + + ebegin "Stopping the qmail-send service (this may take some time)" + rm -f /run/service/qmail + logs="$logs /var/qmail/services/qmail/log" + s6-svc -dwD /var/qmail/services/qmail + eend $? + + ebegin "Stopping loggers and cleaning up qmail services" + for i in $logs ; do + s6-svc -d "$i" + done + s6-svwait -D $logs + s6-svscanctl -aN /run/service + rm -rf $dirs + eend $? +} + +start() +{ + set -e + . /etc/conf.d/netqmail + + ebegin "Parsing the relay subnets" + smtprelay4= + smtprelay6= + for i in ${RELAY_SUBNETS} ; do + j=`echo "$i" | tr / _` + if echo "$i" | grep -qF : ; then + smtprelay6="$smtprelay6 $j" + elif echo "$i" | grep -qF . ; then + smtprelay4="$smtprelay4 $j" + else + false + break + fi + done + eend $? + + ebegin "Starting the qmail-send service" + ln -nsf ../../var/qmail/services/qmail /run/service/qmail + s6-svscanctl -a /run/service + s6-svwait -U /var/qmail/services/qmail + eend $? + + for i in ${SMTPD_IPS} ; do + ebegin "Creating a service directory for a SMTP listener on $i" + makesmtpd "$i" false + eend $? + done + if test -r "$SMTPSD_KEYFILE" && test -r "$SMTPSD_CERTFILE" ; then + for i in ${SMTPSD_IPS} ; do + ebegin "Creating a service directory for a SMTPS listener on $i" + makesmtpd "$i" true + eend $? + done + fi + + dirs="" + ebegin "Starting SMTP/S listeners" + for i in ${SMTPD_IPS} ; do + ln -nsf "../services/smtpd-$i" "/run/service/smtpd-$i" + dirs="$dirs /run/service/smtpd-$i" + done + if test -r "$SMTPSD_KEYFILE" && test -r "$SMTPSD_CERTFILE" ; then + for i in ${SMTPSD_IPS} ; do + ln -nsf "../services/smtpsd-$i" "/run/service/smtpsd-$i" + dirs="$dirs /run/service/smtpsd-$i" + done + fi + s6-svscanctl -aN /run/service + s6-svwait -U $dirs + eend $? +} diff --git a/user/netqmail/netqmail.post-install b/user/netqmail/netqmail.post-install new file mode 100644 index 000000000..b9c03e947 --- /dev/null +++ b/user/netqmail/netqmail.post-install @@ -0,0 +1,22 @@ +#!/bin/sh -e + +# Basic /var/qmail/control configuration so qmail has a chance to +# work out-of-the-box for very simple installations. + +name=`uname -n` +ddom=`echo "$name" | sed 's/^\([^\.]*\)\.\([^\.]*\)\./\2\./'` +pdom=`echo "$name" | sed 's/^.*\.\([^\.]*\)\.\([^\.]*\)$/\1.\2/'` + +cd /var/qmail/control +echo "$name" > me +echo "$name" > locals +echo "$name" > rcpthosts +echo "$name powered by qmail" > smtpgreeting +echo "$ddom" > defaultdomain +echo "$pdom" > plusdomain + +{ + echo "Minimal qmail configuration done in /var/qmail/control." + echo "Please check and adjust those settings before starting the service." + echo "Please review /etc/init.d/netqmail for more settings." +} 1>&2 diff --git a/user/netqmail/netqmail.pre-deinstall b/user/netqmail/netqmail.pre-deinstall new file mode 100644 index 000000000..496133f3d --- /dev/null +++ b/user/netqmail/netqmail.pre-deinstall @@ -0,0 +1,5 @@ +#!/bin/sh -e + +# Remove s6-supervise files so apk can clean up directories. + +rm -rf /var/qmail/services/qmail/event /var/qmail/services/qmail/supervise /var/qmail/services/qmail/log/event /var/qmail/services/qmail/log/supervise diff --git a/user/netqmail/qmail.run b/user/netqmail/qmail.run new file mode 100644 index 000000000..5d92e7540 --- /dev/null +++ b/user/netqmail/qmail.run @@ -0,0 +1,5 @@ +#!/bin/execlineb -P + +fdmove -c 2 1 +s6-envdir env +/var/qmail/bin/qmail-start ./Maildir/ diff --git a/user/netqmail/smtpd.run b/user/netqmail/smtpd.run new file mode 100644 index 000000000..7f10dbdbb --- /dev/null +++ b/user/netqmail/smtpd.run @@ -0,0 +1,9 @@ +#!/bin/execlineb -P + +fdmove -c 2 1 +s6-envdir env +importas -u IP IP +fdmove 1 3 +s6-tcpserver -v2 -1U -c 255 -- $IP 25 +s6-tcpserver-access -v2 -DRpl0 -t 5000 -i data/rules -- +qmail-smtpd diff --git a/user/netqmail/smtpsd.run b/user/netqmail/smtpsd.run new file mode 100644 index 000000000..32d9f54ab --- /dev/null +++ b/user/netqmail/smtpsd.run @@ -0,0 +1,8 @@ +#!/bin/execlineb -P + +fdmove -c 2 1 +s6-envdir env +importas -u IP IP +fdmove 1 3 +s6-tlsserver -v2 -1U -c 255 -DRpl0 -t 5000 -i data/rules -- $IP 465 +qmail-smtpd diff --git a/user/thunderbird/APKBUILD b/user/thunderbird/APKBUILD index 59cb19c17..9202bd063 100644 --- a/user/thunderbird/APKBUILD +++ b/user/thunderbird/APKBUILD @@ -1,8 +1,8 @@ # Contributor: A. Wilcox <awilfox@adelielinux.org> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=thunderbird -pkgver=52.9.0 -pkgrel=1 +pkgver=52.9.1 +pkgrel=0 pkgdesc="Email client from Mozilla" url="https://www.mozilla.org/thunderbird/" arch="all" @@ -111,8 +111,8 @@ dev() { mv "$pkgdir"/usr/share/idl "$subpkgdir"/usr/share } -sha512sums="2142ba7cc04f48a9ffa17ad8f3a0d761f90416c9e6a7066be662a09b19846f13f0fb9669356ccbbf576744a83143cd659c28ce034679c4d6377004f428932dc1 thunderbird-52.9.0.source.tar.xz -fa45db90165fd4eff9318de4c1f6af1d48f48ceb3506cad8ecbf4bed7a22241f930db2a4083444aeb0ebad127344a0f8fbe773f16b2ea5cddedca8937370176c mozconfig +sha512sums="0de80a5036b1e8a5a8549c546b4693cb285ee4d10f546f4b4aceed9e1d6c64b9dbafce7bacaaf057112130036f7b41fb2e0fa3343412140e6ac926dd94c27d23 thunderbird-52.9.1.source.tar.xz +70fe8deb669eb0fb060f90f7af4ef98d6b6a80bde258a898397dd7e8c075b11ff3e418aa5eaf72262f40e561ea82da4b645cfc0b92d02af53f45536dc9963cbb mozconfig 9b11ba43f1f3fe9cda69b6b92e2073ea5165a47e30084537f396ceb8fb63573c4eb057251644837504aa4546183dc8f77fbb24f1450b6a15a1386f29180deefc bad-google-code.patch 2f52fcd7c42f8e12c955e05aa12449aa486c5347d2a7406ff0dada66f64079152b18c3f65c43410df372e871488f17889bc337ced37d0b76305afdbcb55cb580 fix-seccomp-bpf.patch 475bdf81c41775634b131635197fa449b5068f2624a6b120d1878e2191a8e7badf01ac79a15ccf39242c64a29357f2ed7bae96352ceb70a234b17468a999e0c4 mach-linux-musl.patch diff --git a/user/thunderbird/mozconfig b/user/thunderbird/mozconfig index 623894870..a241960d5 100644 --- a/user/thunderbird/mozconfig +++ b/user/thunderbird/mozconfig @@ -20,7 +20,6 @@ ac_add_options --enable-pulseaudio ac_add_options --enable-startup-notification ac_add_options --enable-system-ffi ac_add_options --enable-system-hunspell -ac_add_options --enable-system-sqlite ac_add_options --with-pthreads ac_add_options --with-system-bz2 ac_add_options --with-system-icu diff --git a/user/wine/APKBUILD b/user/wine/APKBUILD index 6341351d5..99cf1f2dd 100644 --- a/user/wine/APKBUILD +++ b/user/wine/APKBUILD @@ -83,9 +83,6 @@ package() { *) _wine="wine";; esac - paxmark -psmre "$pkgdir"/usr/bin/$_wine-preloader \ - "$pkgdir"/usr/bin/$_wine - install -Dm755 tools/wineapploader \ "$pkgdir"/usr/bin/wineapploader |