diff options
author | Alex Laskin <alex@lask.in> | 2018-06-15 22:47:39 +0300 |
---|---|---|
committer | Henrik Riomar <henrik.riomar@gmail.com> | 2019-03-21 22:05:44 +0100 |
commit | 1b5e1a72021e783153d1a6a6d132a901881e6ae9 (patch) | |
tree | c74c547e371d5b0011c12e3d5aeee5a4555eb12f | |
parent | a3b3a8ec3945c2c16fcc210aad49e02c12413be6 (diff) | |
download | aports-1b5e1a72021e783153d1a6a6d132a901881e6ae9.tar.bz2 aports-1b5e1a72021e783153d1a6a6d132a901881e6ae9.tar.xz |
testing/autofs: new aport
A kernel-based automounter for Linux
-rw-r--r-- | testing/autofs/10-glibc.patch | 115 | ||||
-rw-r--r-- | testing/autofs/APKBUILD | 52 | ||||
-rw-r--r-- | testing/autofs/autofs.confd | 7 | ||||
-rw-r--r-- | testing/autofs/autofs.initd | 14 |
4 files changed, 188 insertions, 0 deletions
diff --git a/testing/autofs/10-glibc.patch b/testing/autofs/10-glibc.patch new file mode 100644 index 0000000000..6dc7a47729 --- /dev/null +++ b/testing/autofs/10-glibc.patch @@ -0,0 +1,115 @@ +diff -Naur autofs-5.1.4-clean/daemon/Makefile autofs-5.1.4-patched/daemon/Makefile +--- autofs-5.1.4-clean/daemon/Makefile 2017-12-19 05:46:44.000000000 +0300 ++++ autofs-5.1.4-patched/daemon/Makefile 2018-06-15 20:58:25.362236144 +0300 +@@ -6,7 +6,7 @@ + include ../Makefile.rules + + SRCS = automount.c indirect.c direct.c spawn.c module.c mount.c \ +- lookup.c state.c flag.c ++ state.c flag.c + OBJS = automount.o indirect.o direct.o spawn.o module.o mount.o \ + lookup.o state.o flag.o + +diff -Naur autofs-5.1.4-clean/daemon/automount.c autofs-5.1.4-patched/daemon/automount.c +--- autofs-5.1.4-clean/daemon/automount.c 2017-12-19 05:46:44.000000000 +0300 ++++ autofs-5.1.4-patched/daemon/automount.c 2018-06-15 20:58:25.365569508 +0300 +@@ -269,7 +269,7 @@ + return -1; + } + +- if (fs.f_type != (__SWORD_TYPE) AUTOFS_SUPER_MAGIC) { ++ if (fs.f_type != (long int) AUTOFS_SUPER_MAGIC) { + crit(ap->logopt, "attempt to remove directory from a " + "non-autofs filesystem!"); + crit(ap->logopt, +diff -Naur autofs-5.1.4-clean/daemon/lookup.c autofs-5.1.4-patched/daemon/lookup.c +--- autofs-5.1.4-clean/daemon/lookup.c 2017-12-19 05:46:44.000000000 +0300 ++++ autofs-5.1.4-patched/daemon/lookup.c 2018-06-15 20:58:25.368902873 +0300 +@@ -382,7 +382,7 @@ + if (!S_ISREG(st.st_mode)) + return NSS_STATUS_NOTFOUND; + +- if (st.st_mode & __S_IEXEC) ++ if (st.st_mode & S_IEXEC) + type = src_prog; + else + type = src_file; +@@ -942,7 +942,7 @@ + if (!S_ISREG(st.st_mode)) + return NSS_STATUS_NOTFOUND; + +- if (st.st_mode & __S_IEXEC) ++ if (st.st_mode & S_IEXEC) + type = src_prog; + else + type = src_file; +diff -Naur autofs-5.1.4-clean/include/nsswitch.h autofs-5.1.4-patched/include/nsswitch.h +--- autofs-5.1.4-clean/include/nsswitch.h 2017-12-19 05:46:44.000000000 +0300 ++++ autofs-5.1.4-patched/include/nsswitch.h 2018-06-15 20:58:25.372236237 +0300 +@@ -24,7 +24,7 @@ + #include <netdb.h> + #include "list.h" + +-#define NSSWITCH_FILE _PATH_NSSWITCH_CONF ++#define NSSWITCH_FILE "/dev/null" + + enum nsswitch_status { + NSS_STATUS_UNKNOWN = -1, +diff -Naur autofs-5.1.4-clean/include/rpc_subs.h autofs-5.1.4-patched/include/rpc_subs.h +--- autofs-5.1.4-clean/include/rpc_subs.h 2017-12-19 05:46:44.000000000 +0300 ++++ autofs-5.1.4-patched/include/rpc_subs.h 2018-06-15 20:58:25.358902779 +0300 +@@ -18,7 +18,7 @@ + + #include <rpc/rpc.h> + #include <rpc/pmap_prot.h> +-#include <nfs/nfs.h> ++#include <linux/nfs.h> + #include <linux/nfs2.h> + #include <linux/nfs3.h> + +diff -Naur autofs-5.1.4-clean/modules/lookup_multi.c autofs-5.1.4-patched/modules/lookup_multi.c +--- autofs-5.1.4-clean/modules/lookup_multi.c 2017-12-19 05:46:44.000000000 +0300 ++++ autofs-5.1.4-patched/modules/lookup_multi.c 2018-06-15 20:58:25.372236237 +0300 +@@ -247,7 +247,7 @@ + continue; + } + +- if (st.st_mode & __S_IEXEC) ++ if (st.st_mode & S_IEXEC) + type = src_prog; + else + type = src_file; +@@ -452,7 +452,7 @@ + continue; + } + +- if (st.st_mode & __S_IEXEC) ++ if (st.st_mode & S_IEXEC) + type = src_prog; + else + type = src_file; +diff -Naur autofs-5.1.4-clean/samples/auto.master autofs-5.1.4-patched/samples/auto.master +--- autofs-5.1.4-clean/samples/auto.master 2017-12-19 05:46:44.000000000 +0300 ++++ autofs-5.1.4-patched/samples/auto.master 2018-06-15 20:58:25.362236144 +0300 +@@ -4,7 +4,7 @@ + # mount-point [map-type[,format]:]map [options] + # For details of the format look at auto.master(5). + # +-/misc /etc/auto.misc ++/misc /etc/autofs/auto.misc + # + # NOTE: mounts done from a hosts map will be mounted with the + # "nosuid" and "nodev" options unless the "suid" and "dev" +@@ -12,10 +12,10 @@ + # + /net -hosts + # +-# Include /etc/auto.master.d/*.autofs ++# Include /etc/autofs/auto.master.d/*.autofs + # The included files must conform to the format of this file. + # +-+dir:/etc/auto.master.d +++dir:/etc/autofs/auto.master.d + # + # Include central master map if it can be found using + # nsswitch sources. diff --git a/testing/autofs/APKBUILD b/testing/autofs/APKBUILD new file mode 100644 index 0000000000..7dd205aeb7 --- /dev/null +++ b/testing/autofs/APKBUILD @@ -0,0 +1,52 @@ +# Contributor: Alex Laskin <alex@lask.in> +# Maintainer: Alex Laskin <alex@lask.in> +pkgname=autofs +pkgver=5.1.4 +pkgrel=0 +pkgdesc="A kernel-based automounter for Linux" +url="https://www.kernel.org/pub/linux/daemons/autofs/" +arch="all" +license="GPL-2.0-only" +depends="" +makedepends="linux-headers automake flex bison rpcgen libtirpc-dev libnfs-dev" +subpackages="$pkgname-doc $pkgname-openrc" +source=" + https://www.kernel.org/pub/linux/daemons/${pkgname}/v5/${pkgname}-${pkgver}.tar.xz + autofs.initd + autofs.confd + 10-glibc.patch + " + +build() { + cd "$builddir" + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc/autofs \ + --with-mapdir=/etc/autofs \ + --with-confdir=/etc/conf.d \ + --without-hesiod \ + --with-libtirpc \ + --enable-ignore-busy + make -j8 +} + +check() { + cd "$builddir" + daemon/automount -V +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install + + install -m755 -D "$srcdir"/$pkgname.initd \ + "$pkgdir"/etc/init.d/$pkgname + + install -m644 -D "$srcdir"/$pkgname.confd \ + "$pkgdir"/etc/conf.d/$pkgname +} + +sha512sums="1ef48800a1e44d6bf7048923109f3b8299ef266ff0fbaf5f979c32f42c6c5e28620c1876f64b9d913fddb69244ff83226c01c666401ff6271dd6b53d31860589 autofs-5.1.4.tar.xz +a45c66cbae242b0e446716a98bd84db93609fab442b64fab668e5087440d2b7145d89010f5f1d7453c3c5142d21a4849802a6d0f60c0f7961f9cec899a44a766 autofs.initd +74884b94d8c5dc72579c9c0c9f13c8918ee0babe6fc1e6352bb79cfaf6f5ce3daa87a9b2ea2f34a4600c93a971b329aa0892785fe2efd42829fb7953a6130dd7 autofs.confd +c4edd75443543aa06b7741c2ee4907718d21e791ea70abc7b2b7b8413a7a82a663a3b7ef7bad1661a5d31aab86cc934cba2b4bd0803e502f7db4e73d374adf64 10-glibc.patch" diff --git a/testing/autofs/autofs.confd b/testing/autofs/autofs.confd new file mode 100644 index 0000000000..86ac0e2cd5 --- /dev/null +++ b/testing/autofs/autofs.confd @@ -0,0 +1,7 @@ +# Autofs conf.d file + +# +# Specify daemon options here. +# + +automount_opts="" diff --git a/testing/autofs/autofs.initd b/testing/autofs/autofs.initd new file mode 100644 index 0000000000..832e00bac0 --- /dev/null +++ b/testing/autofs/autofs.initd @@ -0,0 +1,14 @@ +#!/sbin/openrc-run + +name=${RC_SVCNAME} + +command="/usr/sbin/automount" +command_args="$automount_opts" +command_background="yes" + +pidfile="/run/${RC_SVCNAME}.pid" + +depend() { + need net + after firewall +} |