summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--experimental/sbcl/APKBUILD38
-rw-r--r--experimental/sbcl/musl-libc.patch180
-rw-r--r--user/clisp/APKBUILD44
-rw-r--r--user/clisp/no-page.h.patch12
-rw-r--r--user/dovecot/APKBUILD280
-rw-r--r--user/dovecot/default-config.patch46
-rw-r--r--user/dovecot/dovecot.initd40
-rw-r--r--user/dovecot/dovecot.logrotate12
-rw-r--r--user/dovecot/dovecot.post-install45
-rw-r--r--user/dovecot/dovecot.post-upgrade7
-rw-r--r--user/dovecot/dovecot.pre-install8
-rw-r--r--user/dovecot/skip-iconv-check.patch11
-rw-r--r--user/dovecot/split-protocols.patch30
-rw-r--r--user/dovecot/ssl-paths.patch13
-rw-r--r--user/efibootmgr/APKBUILD2
-rw-r--r--user/efivar/APKBUILD2
-rw-r--r--user/elixir/APKBUILD28
-rw-r--r--user/libffcall/APKBUILD39
-rw-r--r--user/libsigsegv/APKBUILD35
19 files changed, 870 insertions, 2 deletions
diff --git a/experimental/sbcl/APKBUILD b/experimental/sbcl/APKBUILD
new file mode 100644
index 000000000..86f9ab1f5
--- /dev/null
+++ b/experimental/sbcl/APKBUILD
@@ -0,0 +1,38 @@
+# Contributor: Lee Starnes <lee@canned-death.us>
+# Maintainer: Lee Starnes <lee@canned-death.us>
+pkgname=sbcl
+pkgver=2.0.3
+pkgrel=0
+pkgdesc="Steel Bank Common Lisp"
+url="http://www.sbcl.org"
+arch="all !armv7"
+license="BSD-2-Clause AND BSD-2-Clause-FreeBSD AND BSD-3-Clause AND MIT"
+depends=""
+makedepends="clisp clisp-dev"
+checkdepends="ed"
+subpackages="$pkgname-doc"
+# Patch provided by Eric Timmons: https://bugs.launchpad.net/sbcl/+bug/1768368
+source="https://sourceforge.net/projects/$pkgname/files/$pkgname/$pkgver/$pkgname-$pkgver-source.tar.bz2
+ musl-libc.patch"
+
+prepare() {
+ default_prepare
+
+ # run-program test is hard-coded to use /bin/ed but it should be /usr/bin/ed
+ sed -i 's,/bin/ed,/usr/bin/ed,g' tests/run-program.impure.lisp
+}
+
+build() {
+ ./make.sh --prefix=/usr --with-dlclose-is-noop --xc-host=clisp
+}
+
+check() {
+ cd tests && sh run-tests.sh
+}
+
+package() {
+ INSTALL_ROOT="$pkgdir"/usr sh install.sh
+}
+
+sha512sums="c29c115fff0e118e5c05959dd8d73ae876458daeb5ddde67ce485b10e6d1583b1f8a9597b54b45606696ab1b1eea5392dcb09357c83fce31323f2a5a154f2dd1 sbcl-2.0.3-source.tar.bz2
+e6757e4cc623682c501ab5e255a881833ff393efac829ffe9f67fff0a005724c3c03a23352b4c88d58b3d15dbb0cf33c8cc58d72d3795abb2f12a4bca4302165 musl-libc.patch"
diff --git a/experimental/sbcl/musl-libc.patch b/experimental/sbcl/musl-libc.patch
new file mode 100644
index 000000000..1aa5cb557
--- /dev/null
+++ b/experimental/sbcl/musl-libc.patch
@@ -0,0 +1,180 @@
+diff --git a/contrib/sb-bsd-sockets/constants.lisp b/contrib/sb-bsd-sockets/constants.lisp
+index 88f5bb7c4..23fd87277 100644
+--- a/contrib/sb-bsd-sockets/constants.lisp
++++ b/contrib/sb-bsd-sockets/constants.lisp
+@@ -93,8 +93,8 @@
+ (:integer EAFNOSUPPORT "EAFNOSUPPORT")
+ (:integer EINPROGRESS "EINPROGRESS")
+
+- (:integer NETDB-INTERNAL #+hpux "h_NETDB_INTERNAL" #-hpux "NETDB_INTERNAL" "See errno.")
+- (:integer NETDB-SUCCESS #+hpux "h_NETDB_SUCCESS" #-hpux "NETDB_SUCCESS" "No problem.")
++ (:integer-no-check NETDB-INTERNAL #-os-provides-netdb-internal "-1" #+(and os-provides-netdb-internal hpux) "h_NETDB_INTERNAL" #+(and os-provides-netdb-internal (not hpux)) "NETDB_INTERNAL" "See errno.")
++ (:integer-no-check NETDB-SUCCESS #-os-provides-netdb-internal "0" #+(and os-provides-netdb-internal hpux) "h_NETDB_SUCCESS" #+(and os-provides-netdb-internal (not hpux)) "NETDB_SUCCESS" "No problem.")
+ (:integer HOST-NOT-FOUND "HOST_NOT_FOUND" "Authoritative Answer Host not found.")
+ (:integer TRY-AGAIN "TRY_AGAIN" "Non-Authoritative Host not found, or SERVERFAIL.")
+ (:integer NO-RECOVERY "NO_RECOVERY" "Non recoverable errors, FORMERR, REFUSED, NOTIMP.")
+diff --git a/src/runtime/linux-os.c b/src/runtime/linux-os.c
+index fa4f5e490..60b5fea4e 100644
+--- a/src/runtime/linux-os.c
++++ b/src/runtime/linux-os.c
+@@ -187,8 +187,15 @@ isnptl (void)
+ if (strstr (buf, "NPTL")) {
+ return 1;
+ }
++ else {
++ return 0;
++ }
++ }
++ else {
++ /* If the configuration variable is empty, just assume we have a
++ * good enough thread implementation. */
++ return 1;
+ }
+- return 0;
+ }
+ #endif
+
+diff --git a/tests/foreign.test.sh b/tests/foreign.test.sh
+index 7fb757813..9ba8ed3cf 100755
+--- a/tests/foreign.test.sh
++++ b/tests/foreign.test.sh
+@@ -248,16 +248,23 @@ cat > $TEST_FILESTEM.test.lisp <<EOF
+ (assert (= 13 foo))
+ (assert (= 42 (bar)))
+ (note "/original definitions ok")
+- (rename-file "$TEST_FILESTEM-b.so" "$TEST_FILESTEM-b.bak")
+- (rename-file "$TEST_FILESTEM-b2.so" "$TEST_FILESTEM-b.so")
+- (load-shared-object (truename "$TEST_FILESTEM-b.so"))
+- (note "/reloading ok")
+- (assert (= 42 foo))
+- (assert (= 13 (bar)))
+- (note "/redefined versions ok")
+- (rename-file "$TEST_FILESTEM-b.so" "$TEST_FILESTEM-b2.so")
+- (rename-file "$TEST_FILESTEM-b.bak" "$TEST_FILESTEM-b.so")
+- (note "/renamed back to originals")
++ ;; test late resolution
++ (eval-when (:compile-toplevel :load-toplevel :execute)
++ (setq *features* (union *features* sb-impl:+internal-features+)))
++ #+dlclose-is-noop
++ (note "/skipping reloading tests")
++ #-dlclose-is-noop
++ (progn
++ (rename-file "$TEST_FILESTEM-b.so" "$TEST_FILESTEM-b.bak")
++ (rename-file "$TEST_FILESTEM-b2.so" "$TEST_FILESTEM-b.so")
++ (load-shared-object (truename "$TEST_FILESTEM-b.so"))
++ (note "/reloading ok")
++ (assert (= 42 foo))
++ (assert (= 13 (bar)))
++ (note "/redefined versions ok")
++ (rename-file "$TEST_FILESTEM-b.so" "$TEST_FILESTEM-b2.so")
++ (rename-file "$TEST_FILESTEM-b.bak" "$TEST_FILESTEM-b.so")
++ (note "/renamed back to originals"))
+
+ ;; test late resolution
+ #+linkage-table
+@@ -274,13 +278,17 @@ cat > $TEST_FILESTEM.test.lisp <<EOF
+ (load-shared-object (truename "$TEST_FILESTEM-c.so"))
+ (assert (= 43 late-foo))
+ (assert (= 14 (late-bar)))
+- (unload-shared-object (truename "$TEST_FILESTEM-c.so"))
+- (multiple-value-bind (val err) (ignore-errors late-foo)
+- (assert (not val))
+- (assert (typep err 'undefined-alien-error)))
+- (multiple-value-bind (val err) (ignore-errors (late-bar))
+- (assert (not val))
+- (assert (typep err 'undefined-alien-error)))
++ #+dlclose-is-noop
++ (note "/skipping unloading tests")
++ #-dlclose-is-noop
++ (progn
++ (unload-shared-object (truename "$TEST_FILESTEM-c.so"))
++ (multiple-value-bind (val err) (ignore-errors late-foo)
++ (assert (not val))
++ (assert (typep err 'undefined-alien-error)))
++ (multiple-value-bind (val err) (ignore-errors (late-bar))
++ (assert (not val))
++ (assert (typep err 'undefined-alien-error))))
+ (note "/linkage table ok"))
+
+ (sb-ext:exit :code $EXIT_LISP_WIN) ; success convention for Lisp program
+diff --git a/tools-for-build/Makefile b/tools-for-build/Makefile
+index 3f6e4ecf9..39bab2b92 100644
+--- a/tools-for-build/Makefile
++++ b/tools-for-build/Makefile
+@@ -16,6 +16,9 @@ LDLIBS:=$(OS_LIBS)
+
+ all: grovel-headers determine-endianness where-is-mcontext
+
++dlclose-is-noop-test-helper.so: dlclose-is-noop-test-helper.c
++ @$(CC) $(LDFLAGS) -shared $< -o $@ $(LOADLIBES) $(LDLIBS)
++
+ clean:
+ rm -f *.o grovel-headers determine-endianness where-is-mcontext
+ rm -f *.exe
+diff --git a/tools-for-build/dlclose-is-noop-test-helper.c b/tools-for-build/dlclose-is-noop-test-helper.c
+new file mode 100644
+index 000000000..4be7a8e5b
+--- /dev/null
++++ b/tools-for-build/dlclose-is-noop-test-helper.c
+@@ -0,0 +1 @@
++int sbcl_dl_close_test = 42;
+diff --git a/tools-for-build/dlclose-is-noop-test.c b/tools-for-build/dlclose-is-noop-test.c
+new file mode 100644
+index 000000000..f4eab26a5
+--- /dev/null
++++ b/tools-for-build/dlclose-is-noop-test.c
+@@ -0,0 +1,19 @@
++/* test to build and run so that we know if we have a noop dlclose
++ */
++
++#include <dlfcn.h>
++#include <stddef.h>
++
++int main ()
++{
++ void * handle = dlopen("./dlclose-is-noop-test-helper.so", RTLD_NOW | RTLD_GLOBAL);
++ dlclose(handle);
++
++ handle = dlopen("./dlclose-is-noop-test-helper.so", RTLD_NOW | RTLD_NOLOAD);
++
++ if (handle != NULL) {
++ return 104;
++ } else {
++ return 0;
++ }
++}
+diff --git a/tools-for-build/grovel-features.sh b/tools-for-build/grovel-features.sh
+index ffc4307eb..bf1448a6a 100644
+--- a/tools-for-build/grovel-features.sh
++++ b/tools-for-build/grovel-features.sh
+@@ -36,3 +36,12 @@
+ if [ "$sbcl_arch" = arm ] ; then
+ featurep arm-softfp
+ fi
++
++featurep os-provides-netdb-internal
++
++# We need a helper shared library to test dlclose-is-noop
++$GNUMAKE dlclose-is-noop-test-helper.so > /dev/null 2>&1
++
++featurep dlclose-is-noop
++
++rm -f dlclose-is-noop-test-helper.so
+diff --git a/tools-for-build/os-provides-netdb-internal-test.c b/tools-for-build/os-provides-netdb-internal-test.c
+new file mode 100644
+index 000000000..cab08cc41
+--- /dev/null
++++ b/tools-for-build/os-provides-netdb-internal-test.c
+@@ -0,0 +1,12 @@
++#include <netdb.h>
++
++int main ()
++{
++#if defined NETDB_INTERNAL && defined NETDB_SUCCESS
++ return 104;
++#elif defined h_NETDB_INTERNAL && defined h_NETDB_SUCCESS
++ return 104;
++#else
++ return 0;
++#endif
++}
diff --git a/user/clisp/APKBUILD b/user/clisp/APKBUILD
new file mode 100644
index 000000000..d9f80ebef
--- /dev/null
+++ b/user/clisp/APKBUILD
@@ -0,0 +1,44 @@
+# Contributor: Soren Tempel <soeren+alpine@soeren-tempel.net>
+# Contrubutor: Carlo Landmeter <clandmeter@gmail.com>
+# Contributor: Lee Starnes <lee@canned-death.us>
+# Maintainer: Lee Starnes <lee@canned-death.us>
+pkgname=clisp
+pkgver=2.49
+pkgrel=0
+pkgdesc="ANSI Common Lisp interpreter, compiler, and debugger"
+url="https://clisp.sourceforge.io"
+arch="all"
+license="GPL-2.0-only"
+depends=""
+depends_dev="libsigsegv-dev libffcall ncurses-dev"
+makedepends="$depends_dev"
+subpackages="$pkgname-dev $pkgname-doc"
+source="https://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.bz2
+ no-page.h.patch"
+
+prepare() {
+ default_prepare
+ update_config_sub
+}
+
+build() {
+ ./configure \
+ --prefix=/usr \
+ --with-ffcall \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ "$builddir"
+ # Parallel builds fail
+ make -j1
+}
+
+check() {
+ make check
+}
+
+package() {
+ make -j1 DESTDIR="$pkgdir" install
+}
+
+sha512sums="eef66fc85199a2c283b616db61bf67ff103eeb0f19fa907da48994dc790b6f5f8d0c74fb3bd723c6b827c0ff3cfd89fa6ba67934fc669ed5d5249044b5140d81 clisp-2.49.tar.bz2
+86273c5d5d05a8d41ab6311192e0c757d3f7fe4d78546590830aa00f8c2f170fcb08f66ea739ae8834cec00cdf0f6a20824eb6a3d0f6df97be405c26b1cc5d39 no-page.h.patch"
diff --git a/user/clisp/no-page.h.patch b/user/clisp/no-page.h.patch
new file mode 100644
index 000000000..aafb98a31
--- /dev/null
+++ b/user/clisp/no-page.h.patch
@@ -0,0 +1,12 @@
+--- a/src/unix.d
++++ b/src/unix.d
+@@ -135,9 +135,6 @@
+ #ifdef UNIX_AUX
+ #include <sys/mmu.h> /* for SHMLBA */
+ #endif
+- #if defined(UNIX_LINUX) && !defined(UNIX_GNU)
+- #include <asm/page.h> /* for SHMLBA on Linux 2.0 */
+- #endif
+ /* <sys/shm.h> declares shmget(), shmat(), shmdt(), shmctl() */
+ #endif
+ /* used by SPVW, STREAM */
diff --git a/user/dovecot/APKBUILD b/user/dovecot/APKBUILD
new file mode 100644
index 000000000..f78987820
--- /dev/null
+++ b/user/dovecot/APKBUILD
@@ -0,0 +1,280 @@
+# Contributor: Valery Kartel <valery.kartel@gmail.com>
+# Contributor: Lukasz Jendrysik <scadu@yandex.com>
+# Contributor: Michael Mason <ms13sp@gmail.com>
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Lee Starnes <lee@canned-death.us>
+pkgname=dovecot
+pkgver=2.3.10
+_pkgvermajor=${pkgver%.*}
+pkgrel=0
+_pigeonholever=0.5.9
+_pigeonholevermajor=${_pigeonholever%.*}
+pkgdesc="IMAP and POP3 server"
+url="https://www.dovecot.org/"
+arch="all"
+options="libtool"
+license="LGPL-2.0+"
+depends="openssl"
+pkgusers="dovecot dovenull"
+pkggroups="dovecot dovenull"
+makedepends="
+ autoconf
+ automake
+ bzip2-dev
+ clucene-dev
+ expat-dev
+ krb5-dev
+ libcap-dev
+ openssl-dev
+ libtool
+ linux-headers
+ linux-pam-dev
+ mariadb-dev
+ openldap-dev
+ postgresql-dev
+ sqlite-dev
+ zlib-dev
+ libsodium-dev
+ "
+install="$pkgname.pre-install $pkgname.post-install $pkgname.post-upgrade"
+subpackages="
+ $pkgname-doc
+ $pkgname-dev
+ $pkgname-openrc
+ $pkgname-lmtpd
+ $pkgname-pop3d
+ $pkgname-submissiond
+ $pkgname-pigeonhole-plugin-ldap:_sieve_ldap
+ $pkgname-pigeonhole-plugin:_sieve
+ $pkgname-sql
+ $pkgname-pgsql
+ $pkgname-mysql
+ $pkgname-sqlite
+ $pkgname-gssapi
+ $pkgname-ldap
+ $pkgname-fts-solr:_fts_solr
+ $pkgname-fts-lucene:_fts_lucene
+ "
+source="https://www.dovecot.org/releases/$_pkgvermajor/dovecot-$pkgver.tar.gz
+ https://pigeonhole.dovecot.org/releases/$_pkgvermajor/$pkgname-$_pkgvermajor-pigeonhole-$_pigeonholever.tar.gz
+ skip-iconv-check.patch
+ split-protocols.patch
+ default-config.patch
+ ssl-paths.patch
+ dovecot.logrotate
+ dovecot.initd
+ "
+_builddir_pigeonhole="$srcdir/$pkgname-$_pkgvermajor-pigeonhole-$_pigeonholever"
+
+_configure() {
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --disable-static \
+ "$@"
+}
+
+build() {
+ _configure \
+ --with-gssapi=plugin \
+ --with-ldap=plugin \
+ --with-sql=plugin \
+ --with-pam \
+ --with-mysql \
+ --with-sqlite \
+ --with-pgsql \
+ --with-solr \
+ --with-lucene \
+ --with-ssl=openssl \
+ --with-ssldir=/etc/ssl/dovecot \
+ --with-rundir=/run/dovecot
+ make
+
+ # Build pigeonhole plugin
+ cd "$_builddir_pigeonhole"
+ _configure \
+ --with-dovecot="$builddir" \
+ --with-ldap=plugin
+ make
+}
+
+check() {
+ make check
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+
+ cd "$pkgdir"
+
+ install -d ./etc/ssl/dovecot
+ install -D -m 755 "$srcdir"/dovecot.initd ./etc/init.d/dovecot
+ install -D -m 644 "$srcdir"/dovecot.logrotate ./etc/logrotate.d/dovecot
+
+ # default config
+ rm ./etc/dovecot/*
+ rm ./usr/share/doc/dovecot/mkcert.sh
+ mv ./usr/share/doc/dovecot/dovecot-openssl.cnf ./etc/dovecot/
+ mv ./usr/share/doc/dovecot/example-config/dovecot* \
+ ./usr/share/doc/dovecot/example-config/conf.d \
+ ./etc/dovecot/
+ rm -fr ./usr/share/doc/dovecot/example-config
+
+ # Installing pigeonhole plugin.
+ cd "$_builddir_pigeonhole"
+ make install DESTDIR="$pkgdir"
+
+ # Moving config in the correct place
+ mv "$pkgdir"/usr/share/doc/dovecot/example-config/conf.d/* \
+ "$pkgdir"/etc/dovecot/conf.d
+
+ # Remove libtool archives. abuild doesn't remove them automatically even without options=libtool.
+ find "$pkgdir" -name '*.la' | xargs rm -f
+}
+
+dev() {
+ default_dev
+ mkdir -p "$subpkgdir"/usr/lib/dovecot
+ mv "$pkgdir"/usr/lib/dovecot/dovecot-config \
+ "$subpkgdir"/usr/lib/dovecot/
+}
+
+lmtpd() {
+ pkgdesc="$pkgdesc (LMTP server)"
+ _protocol lmtp
+}
+
+pop3d() {
+ pkgdesc="$pkgdesc (POP3 daemon)"
+ _protocol pop3
+}
+
+submissiond() {
+ pkgdesc="$pkgdesc (mail submission agent)"
+ _protocol submission
+}
+
+_protocol() {
+ depends="$pkgname=$pkgver-r$pkgrel"
+ _name="$1"
+ _protocolsd="$subpkgdir/usr/share/dovecot/protocols.d"
+
+ cd "$pkgdir"
+ _submv usr/libexec/dovecot/$_name*
+ _submv etc/dovecot/conf.d/*-$_name.conf
+
+ mkdir -p "$_protocolsd"
+ echo "protocols = \$protocols $_name" \
+ > "$_protocolsd"/${subpkgname#$pkgname-}.conf
+}
+
+_sieve() {
+ pkgdesc="Sieve and managesieve plugin for Dovecot"
+ depends="$pkgname=$pkgver-r$pkgrel"
+
+ cd "$pkgdir"
+ _submv $(find usr/ -name '*sieve_extprograms*')
+ _submv $(find usr/ -name '*sieve_imapsieve*')
+ _submv $(find usr/ -name '*sieve*')
+ _submv $(find usr/ -name '*pigeonhole*')
+ _submv $(find etc/dovecot/ -name '*sieve*')
+}
+
+_sieve_ldap() {
+ pkgdesc="Sieve and managesieve plugin for Dovecot (LDAP support)"
+ depends="$pkgname-pigeonhole-plugin=$pkgver-r$pkgrel $pkgname-ldap=$pkgver-r$pkgrel"
+
+ cd "$pkgdir"
+ _submv $(find usr/ -name '*_sieve_storage_ldap_*')
+}
+
+pgsql() {
+ pkgdesc="PostgreSQL driver for Dovecot"
+ depends="$pkgname-sql=$pkgver-r$pkgrel"
+
+ cd "$pkgdir"
+ _submv $(find usr/ -name '*_pgsql*')
+}
+
+mysql() {
+ pkgdesc="MySQL driver for Dovecot"
+ depends="$pkgname-sql=$pkgver-r$pkgrel"
+
+ cd "$pkgdir"
+ _submv $(find usr/ -name '*_mysql*')
+}
+
+sqlite() {
+ pkgdesc="SQLite driver for Dovecot"
+ depends="$pkgname-sql=$pkgver-r$pkgrel"
+
+ cd "$pkgdir"
+ _submv $(find usr/ -name '*_sqlite*')
+}
+
+gssapi() {
+ pkgdesc="GSSAPI auth plugin for Dovecot"
+ depends="$pkgname=$pkgver-r$pkgrel"
+
+ cd "$pkgdir"
+ _submv $(find usr/ -name '*_gssapi*')
+}
+
+ldap() {
+ pkgdesc="LDAP auth plugin for Dovecot"
+ depends="$pkgname=$pkgver-r$pkgrel"
+
+ cd "$pkgdir"
+ _submv $(find usr/ -name '*[_-]ldap*')
+ _submv $(find etc/dovecot/ -name '*-ldap.conf*')
+}
+
+sql() {
+ pkgdesc="SQL plugin for dovecot"
+ depends="$pkgname=$pkgver-r$pkgrel"
+
+ cd "$pkgdir"
+ _submv $(find usr/ -name '*-sql.*')
+ _submv $(find etc/dovecot/ -name '*-sql.conf*')
+}
+
+_fts_solr() {
+ pkgdesc="FTS-Solr plugin for dovecot"
+ depends="$pkgname=$pkgver-r$pkgrel"
+
+ cd "$pkgdir"
+ _submv $(find usr/ -name '*fts*solr*')
+}
+
+_fts_lucene() {
+ pkgdesc="FTS-Lucene plugin for dovecot"
+ depends="$pkgname=$pkgver-r$pkgrel"
+
+ cd "$pkgdir"
+ _submv $(find usr/ -name '*fts*lucene*')
+}
+
+_submv() {
+ while [ $# -gt 0 ]; do
+ _dir=${1%/*}
+ mkdir -p "$subpkgdir"/$_dir
+ mv "$pkgdir/$1" "$subpkgdir/$_dir/"
+ [ "$(ls -A $pkgdir/$_dir)" ] || rmdir "$pkgdir"/$_dir
+ shift
+ done
+}
+
+sha512sums="73e10d7d1e616d6599eb53f2d2d1ac0f0f2e6e84019faac5cd525e833da44839a7e483635b61d432e3254a9e5f6f90915bec8940c584210341085241949dffa2 dovecot-2.3.10.tar.gz
+1b8d2ac8d3985dde035fc45df519788a924ba971f3e39717f5196ea56a982d4156226586d0a964473525d086967883ea52f2e624e81f7035cb0952b76f2414d8 dovecot-2.3-pigeonhole-0.5.9.tar.gz
+fe4fbeaedb377d809f105d9dbaf7c1b961aa99f246b77189a73b491dc1ae0aa9c68678dde90420ec53ec877c08f735b42d23edb13117d7268420e001aa30967a skip-iconv-check.patch
+794875dbf0ded1e82c5c3823660cf6996a7920079149cd8eed54231a53580d931b966dfb17185ab65e565e108545ecf6591bae82f935ab1b6ff65bb8ee93d7d5 split-protocols.patch
+0d8f89c7ba6f884719b5f9fc89e8b2efbdc3e181de308abf9b1c1b0e42282f4df72c7bf62f574686967c10a8677356560c965713b9d146e2770aab17e95bcc07 default-config.patch
+5e68a0042a7c11b3d8c411fc157f5960e2e3305dac11f4b6b880441e2b4105769ddf6c56f67a995af6e1a58f3bfa2c199ea51318a3a0e37c7ef0ae6c4109b13f ssl-paths.patch
+9f19698ab45969f1f94dc4bddf6de59317daee93c9421c81f2dbf8a7efe6acf89689f1d30f60f536737bb9526c315215d2bce694db27e7b8d7896036a59c31f0 dovecot.logrotate
+d91951b81150d7a3ef6a674c0dc7b012f538164dac4b9d27a6801d31da6813b764995a438f69b6a680463e1b60a3b4f2959654f68e565fe116ea60312d5e5e70 dovecot.initd"
diff --git a/user/dovecot/default-config.patch b/user/dovecot/default-config.patch
new file mode 100644
index 000000000..0f8a7385a
--- /dev/null
+++ b/user/dovecot/default-config.patch
@@ -0,0 +1,46 @@
+--- a/doc/example-config/conf.d/10-mail.conf
++++ b/doc/example-config/conf.d/10-mail.conf
+@@ -208,10 +208,10 @@
+
+ # UNIX socket path to master authentication server to find users.
+ # This is used by imap (for shared users) and lda.
+-#auth_socket_path = /var/run/dovecot/auth-userdb
++#auth_socket_path = /run/dovecot/auth-userdb
+
+ # Directory where to look up mail plugins.
+-#mail_plugin_dir = /usr/lib/dovecot
++#mail_plugin_dir = /usr/lib/dovecot/modules
+
+ # Space separated list of plugins to load for all services. Plugins specific to
+ # IMAP, LDA, etc. are added to this list in their own .conf files.
+@@ -322,6 +322,7 @@ protocol !indexer-worker {
+ # them simultaneously.
+ #mbox_read_locks = fcntl
+ #mbox_write_locks = dotlock fcntl
++mbox_write_locks = fcntl
+
+ # Maximum time to wait for lock (all of them) before aborting.
+ #mbox_lock_timeout = 5 mins
+--- a/doc/example-config/conf.d/10-ssl.conf
++++ b/doc/example-config/conf.d/10-ssl.conf
+@@ -3,7 +3,10 @@
+ ##
+
+ # SSL/TLS support: yes, no, required. <doc/wiki/SSL.txt>
+-#ssl = yes
++# Disable plain (unencrypted) POP3 and IMAP, allowed are only POP3+TLS,
++# POP3S, IMAP+TLS and IMAPS.
++# Plain IMAP and POP3 are still allowed for local connections.
++ssl = required
+
+ # PEM encoded X.509 SSL/TLS certificate and private key. They're opened before
+ # dropping root privileges, so keep the key file unreadable by anyone but
+@@ -67,7 +67,7 @@
+ #ssl_curve_list =
+
+ # Prefer the server's order of ciphers over client's.
+-#ssl_prefer_server_ciphers = no
++ssl_prefer_server_ciphers = yes
+
+ # SSL crypto device to use, for valid values run "openssl engine"
+ #ssl_crypto_device =
diff --git a/user/dovecot/dovecot.initd b/user/dovecot/dovecot.initd
new file mode 100644
index 000000000..721f131ad
--- /dev/null
+++ b/user/dovecot/dovecot.initd
@@ -0,0 +1,40 @@
+#!/sbin/openrc-run
+
+[ "$RC_SVCNAME" != "${RC_SVCNAME##*.}" ] && instance=${RC_SVCNAME##*.}
+
+description="Secure POP3/IMAP server"
+
+cfgfile=/etc/dovecot/dovecot${instance:+.$instance}.conf
+pidfile=$(doveconf -c $cfgfile -h base_dir 2>/dev/null)/master.pid
+command=/usr/sbin/dovecot
+command_args=${instance:+-c $cfgfile}
+required_files="$cfgfile"
+extra_started_commands="reload reopen"
+description_reload="Reload configuration"
+description_reopen="Reopen log files"
+
+depend() {
+ need localmount net
+ before mta
+ after bootmisc firewall ldap mysql ntp-client ntpd postgresql saslauthd slapd
+ use logger
+}
+
+start_pre() {
+ ebegin
+ doveconf -c $cfgfile -x >/dev/null 2>&1 && \
+ checkpath --directory ${pidfile%/*}
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading $RC_SVCNAME configs and restarting auth/login processes"
+ start_pre && start-stop-daemon --signal HUP --pidfile $pidfile
+ eend $?
+}
+
+reopen() {
+ ebegin "Reopening $RC_SVCNAME log files"
+ start-stop-daemon --signal USR1 --pidfile $pidfile
+ eend $?
+}
diff --git a/user/dovecot/dovecot.logrotate b/user/dovecot/dovecot.logrotate
new file mode 100644
index 000000000..b1a4087b4
--- /dev/null
+++ b/user/dovecot/dovecot.logrotate
@@ -0,0 +1,12 @@
+/var/log/dovecot*.log {
+ daily
+ missingok
+ copytruncate
+ rotate 7
+ compress
+ notifempty
+ sharedscripts
+ postrotate
+ /etc/init.d/dovecot --quiet --ifstarted reopen
+ endscript
+}
diff --git a/user/dovecot/dovecot.post-install b/user/dovecot/dovecot.post-install
new file mode 100644
index 000000000..eb70cdece
--- /dev/null
+++ b/user/dovecot/dovecot.post-install
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+# based on doc/mkcert.sh
+
+# if ssl disabled then lets just exit
+doveconf ssl 2>/dev/null | grep -Eq '(yes|required)' || exit 0
+# Generates a self-signed certificate.
+
+OPENSSL=${OPENSSL-openssl}
+SSLDIR=${SSLDIR-/etc/ssl/dovecot}
+OPENSSLCONFIG=${OPENSSLCONFIG-/etc/dovecot/dovecot-openssl.cnf}
+
+CERTDIR=$SSLDIR
+KEYDIR=$SSLDIR
+
+# check if we have ssl_cert and/or key (for dovecot-2.0+)
+# try expand the cert/key itself and if found, lets just keep it
+[ -n "$(doveconf -x ssl_cert 2>/dev/null)" ] && exit 0
+[ -n "$(doveconf -x ssl_key 2>/dev/null)" ] && exit 0
+
+ssl_cert_file=$(doveconf ssl_cert | sed 's/.*= <//')
+ssl_key_file=$(doveconf ssl_key | sed 's/.*= <//')
+
+CERTFILE=${ssl_cert_file:-$CERTDIR/server.pem}
+KEYFILE=${ssl_key_file:-$KEYDIR/server.key}
+
+if [ -e "$CERTFILE" ]; then
+ echo "Keeping existing $CERTFILE"
+ exit 0
+fi
+
+if [ -e "$KEYFILE" ]; then
+ echo "Keeping existing $KEYFILE"
+ exit 0
+fi
+
+if [ ! -c /dev/urandom ] && [ ! -c /dev/random ]; then
+ echo "No /dev/urandom or /dev/random so ssl cert not created"
+ exit 1
+fi
+
+$OPENSSL req -new -x509 -nodes -config $OPENSSLCONFIG -out $CERTFILE -keyout $KEYFILE -days 365 || exit 2
+chmod 0600 $KEYFILE
+echo
+$OPENSSL x509 -subject -fingerprint -noout -in $CERTFILE || exit 2
diff --git a/user/dovecot/dovecot.post-upgrade b/user/dovecot/dovecot.post-upgrade
new file mode 100644
index 000000000..69f4366ed
--- /dev/null
+++ b/user/dovecot/dovecot.post-upgrade
@@ -0,0 +1,7 @@
+#!/bin/sh
+if ! grep ^"version_ignore=yes" /etc/dovecot/dovecot.conf; then
+ printf "dovecot restart required (version_ignore=yes not set)\n"
+fi
+
+exit $?
+
diff --git a/user/dovecot/dovecot.pre-install b/user/dovecot/dovecot.pre-install
new file mode 100644
index 000000000..73a0aa3e3
--- /dev/null
+++ b/user/dovecot/dovecot.pre-install
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+groupadd -r dovecot 2>/dev/null
+groupadd -r dovenull 2>/dev/null
+useradd -r -u 90 -h /dev/null -s /sbin/nologin -g dovecot dovecot 2>/dev/null
+useradd -r -u 91 -h /dev/null -s /sbin/nologin -g dovenull dovenull 2>/dev/null
+
+exit 0
diff --git a/user/dovecot/skip-iconv-check.patch b/user/dovecot/skip-iconv-check.patch
new file mode 100644
index 000000000..bb1002c84
--- /dev/null
+++ b/user/dovecot/skip-iconv-check.patch
@@ -0,0 +1,11 @@
+--- a/src/lib-charset/test-charset.c
++++ b/src/lib-charset/test-charset.c
+@@ -159,7 +159,7 @@
+ static void (*const test_functions[])(void) = {
+ test_charset_is_utf8,
+ test_charset_utf8,
+-#ifdef HAVE_ICONV
++#if 0 //def HAVE_ICONV
+ test_charset_iconv,
+ test_charset_iconv_crashes,
+ test_charset_iconv_utf7_state,
diff --git a/user/dovecot/split-protocols.patch b/user/dovecot/split-protocols.patch
new file mode 100644
index 000000000..b4bed2ccb
--- /dev/null
+++ b/user/dovecot/split-protocols.patch
@@ -0,0 +1,30 @@
+For each protocol $prot, which is moved into subpackage $subname,
+is installed file /usr/share/dovecot/protocols.d/$subname.conf with:
+
+ protocols = $protocols $prot
+
+--- a/doc/example-config/dovecot.conf
++++ b/doc/example-config/dovecot.conf
+@@ -20,8 +20,9 @@
+ # options. The paths listed here are for configure --prefix=/usr
+ # --sysconfdir=/etc --localstatedir=/var
+
+-# Protocols we want to be serving.
+-#protocols = imap pop3 lmtp submission
++# Enable installed protocols.
++#protocols = imap
++!include_try /usr/share/dovecot/protocols.d/*.conf
+
+ # A comma separated list of IPs or hosts where to listen in for connections.
+ # "*" listens in all IPv4 interfaces, "::" listens in all IPv6 interfaces.
+--- a/src/master/master-settings.c.orig
++++ b/src/master/master-settings.c
+@@ -206,7 +206,7 @@
+ .state_dir = PKG_STATEDIR,
+ .libexec_dir = PKG_LIBEXECDIR,
+ .instance_name = PACKAGE,
+- .protocols = "imap pop3 lmtp",
++ .protocols = "imap",
+ .listen = "*, ::",
+ .ssl = "yes:no:required",
+ .default_internal_user = "dovecot",
diff --git a/user/dovecot/ssl-paths.patch b/user/dovecot/ssl-paths.patch
new file mode 100644
index 000000000..b354b607e
--- /dev/null
+++ b/user/dovecot/ssl-paths.patch
@@ -0,0 +1,13 @@
+--- dovecot-2.3.10/doc/example-config/conf.d/10-ssl.conf 2020-03-05 14:35:53.000000000 +0000
++++ dovecot-2.3.10.new/doc/example-config/conf.d/10-ssl.conf 2020-04-26 06:49:45.860000000 +0000
+@@ -9,8 +9,8 @@
+ # dropping root privileges, so keep the key file unreadable by anyone but
+ # root. Included doc/mkcert.sh can be used to easily generate self-signed
+ # certificate, just make sure to update the domains in dovecot-openssl.cnf
+-ssl_cert = </etc/ssl/certs/dovecot.pem
+-ssl_key = </etc/ssl/private/dovecot.pem
++ssl_cert = </etc/ssl/dovecot/server.pem
++ssl_key = </etc/ssl/dovecot/server.key
+
+ # If key file is password protected, give the password here. Alternatively
+ # give it when starting dovecot with -p parameter. Since this file is often
diff --git a/user/efibootmgr/APKBUILD b/user/efibootmgr/APKBUILD
index 5f2149b22..379316b65 100644
--- a/user/efibootmgr/APKBUILD
+++ b/user/efibootmgr/APKBUILD
@@ -5,7 +5,7 @@ pkgver=16
pkgrel=0
pkgdesc="User-space application to modify the Intel EFI Boot Manager"
url="https://github.com/rhboot/efibootmgr"
-arch="pmmx x86_64 arm64 ia64"
+arch="pmmx x86_64 aarch64 ia64"
options="!check" # Dangerous.
license="GPL-2.0-only"
depends=""
diff --git a/user/efivar/APKBUILD b/user/efivar/APKBUILD
index 13b1b64bd..c8a8ba600 100644
--- a/user/efivar/APKBUILD
+++ b/user/efivar/APKBUILD
@@ -5,7 +5,7 @@ pkgver=37
pkgrel=0
pkgdesc="Tools and library to manipulate EFI variables"
url="https://github.com/rhboot/efivar"
-arch="pmmx x86_64 arm64 ia64"
+arch="pmmx x86_64 aarch64 ia64"
options="!check" # "WARNING: You should probably not run tests /ever/. This is not a joke."
license="LGPL-2.1+"
depends=""
diff --git a/user/elixir/APKBUILD b/user/elixir/APKBUILD
new file mode 100644
index 000000000..e23466f18
--- /dev/null
+++ b/user/elixir/APKBUILD
@@ -0,0 +1,28 @@
+# Contributor: Daniel Isaksen <d@duniel.no>
+# Contributor: Marlus Saraiva <marlus.saraiva@gmail.com>
+# Maintainer: Lee Starnes <lee@canned-death.us>
+pkgname=elixir
+pkgver=1.10.3
+pkgrel=0
+pkgdesc="Dynamic, functional language designed for building scalable and maintainable applications"
+url="https://elixir-lang.org/"
+arch="noarch"
+license="Apache-2.0"
+depends="erlang"
+makedepends="erlang-dev"
+subpackages="$pkgname-doc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/elixir-lang/elixir/archive/v$pkgver.tar.gz"
+
+build() {
+ make
+}
+
+check() {
+ make test
+}
+
+package() {
+ make DESTDIR="$pkgdir" PREFIX=/usr install
+}
+
+sha512sums="66b18b983e5374afbd4d94c43a880c5e46a9aa150fa6f38be74ff7f58a19eaaee00248b202d9ae3f6b78e2495fc8d5cec755de644256a731be367766c3812855 elixir-1.10.3.tar.gz"
diff --git a/user/libffcall/APKBUILD b/user/libffcall/APKBUILD
new file mode 100644
index 000000000..a3bdfde1a
--- /dev/null
+++ b/user/libffcall/APKBUILD
@@ -0,0 +1,39 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Contributor: Will Sinatra <wpsinatra@gmail.com>
+# Contributor: Lee Starnes <lee@canned-death.us>
+# Maintainer: Lee Starnes <lee@canned-death.us>
+pkgname=libffcall
+pkgver=2.2
+pkgrel=0
+pkgdesc="C library for implementing foreign function calls in embedded interpreters"
+url="https://www.gnu.org/software/libffcall"
+arch="all"
+license="GPL-2.0+"
+depends=""
+makedepends=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="https://ftp.gnu.org/gnu/libffcall/libffcall-$pkgver.tar.gz"
+
+build() {
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var
+ # Fails to build if building in parallel
+ make -j1
+}
+
+check() {
+ make check
+}
+
+package() {
+ make DESTDIR="$pkgdir" htmldir=/usr/share/doc/ffcall install
+
+}
+
+sha512sums="b9d3ca4c67ab92915a8183d850153e585dcb58ceb2199a104426a7aae363d37017b1226440acd18a2db0cc207e044f71e932857189964261e8eaa6de5cef1731 libffcall-2.2.tar.gz"
diff --git a/user/libsigsegv/APKBUILD b/user/libsigsegv/APKBUILD
new file mode 100644
index 000000000..bb21149a3
--- /dev/null
+++ b/user/libsigsegv/APKBUILD
@@ -0,0 +1,35 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Contributor: Lee Starnes <lee@canned-death.us>
+# Maintainer: Lee Starnes <lee@canned-death.us>
+pkgname=libsigsegv
+pkgver=2.12
+pkgrel=0
+pkgdesc="A library for handling page faults in user mode"
+url="https://www.gnu.org/software/libsigsegv"
+arch="all"
+license="GPL-2.0+"
+depends=""
+makedepends=""
+subpackages="$pkgname-dev"
+source="https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz"
+
+build() {
+ ./configure \
+ --prefix=/usr \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --enable-shared
+ make
+}
+
+check() {
+ make check
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="27986e8aaf4357ed131032aa7c281a5a28c5759530c62bb76f034aea33959547dcaae805e06347a1f532f0488b72fbbbdac4400f74e8d3f2128511526e8a5913 libsigsegv-2.12.tar.gz"