summaryrefslogtreecommitdiff
path: root/net-fs
diff options
context:
space:
mode:
Diffstat (limited to 'net-fs')
-rw-r--r--net-fs/autofs/Manifest28
-rw-r--r--net-fs/autofs/autofs-5.0.10.ebuild114
-rw-r--r--net-fs/autofs/autofs-5.0.7-r4.ebuild132
-rw-r--r--net-fs/autofs/autofs-5.0.7-r5.ebuild133
-rw-r--r--net-fs/autofs/autofs-5.1.1-r1.ebuild114
-rw-r--r--net-fs/autofs/autofs-5.1.2.ebuild118
-rw-r--r--net-fs/autofs/autofs-5.1.3.ebuild115
-rw-r--r--net-fs/autofs/files/autofs-5.0.3-heimdal.patch35
-rw-r--r--net-fs/autofs/files/autofs-5.0.5-fix-install-deadlink.patch12
-rw-r--r--net-fs/autofs/files/autofs-5.0.6-revert-ldap.patch18
-rw-r--r--net-fs/autofs/files/autofs-5.0.7-add-missing-endif-HAVE_SASL-in-modules-lookup_ldap.c.patch45
-rw-r--r--net-fs/autofs/files/autofs-5.0.7-libtirpc-link.patch10
-rw-r--r--net-fs/autofs/files/autofs-5.0.7-parallel-make.patch48
-rw-r--r--net-fs/autofs/files/autofs-5.0.7-respect-user-flags-and-fix-asneeded-r3.patch144
-rw-r--r--net-fs/autofs/files/autofs-5.0.7-sasl-def.patch43
-rw-r--r--net-fs/autofs/files/autofs-5.0.7-sloppy-mount.patch99
-rw-r--r--net-fs/autofs/files/autofs-5.1.2-libtirpc-as-need.patch28
-rw-r--r--net-fs/autofs/files/autofs5-auto.master23
-rw-r--r--net-fs/autofs/files/autofs5.initd69
-rw-r--r--net-fs/autofs/metadata.xml21
-rw-r--r--net-fs/btfs/Manifest6
-rw-r--r--net-fs/btfs/btfs-2.16.ebuild39
-rw-r--r--net-fs/btfs/btfs-2.17.ebuild39
-rw-r--r--net-fs/btfs/metadata.xml11
-rw-r--r--net-fs/cifs-utils/Manifest11
-rw-r--r--net-fs/cifs-utils/cifs-utils-6.4.ebuild106
-rw-r--r--net-fs/cifs-utils/cifs-utils-6.6-r2.ebuild112
-rw-r--r--net-fs/cifs-utils/cifs-utils-6.7.ebuild123
-rw-r--r--net-fs/cifs-utils/files/cifs-utils-6.7-heimdal.patch27
-rw-r--r--net-fs/cifs-utils/files/cifs-utils-6.7-talloc.patch29
-rw-r--r--net-fs/cifs-utils/metadata.xml15
-rw-r--r--net-fs/curlftpfs/Manifest10
-rw-r--r--net-fs/curlftpfs/curlftpfs-0.9.2-r3.ebuild42
-rw-r--r--net-fs/curlftpfs/files/curlftpfs-0.9.2-64bit_filesize.patch11
-rw-r--r--net-fs/curlftpfs/files/curlftpfs-0.9.2-darwin.patch17
-rw-r--r--net-fs/curlftpfs/files/curlftpfs-0.9.2-fix-escaping.patch420
-rw-r--r--net-fs/curlftpfs/files/curlftpfs-0.9.2-memleak-nocache.patch60
-rw-r--r--net-fs/curlftpfs/files/curlftpfs-0.9.2-memleak.patch24
-rw-r--r--net-fs/curlftpfs/metadata.xml11
-rw-r--r--net-fs/cvmfs/Manifest9
-rw-r--r--net-fs/cvmfs/cvmfs-2.1.20.0_p05.ebuild114
-rw-r--r--net-fs/cvmfs/cvmfs-2.3.5-r1.ebuild160
-rw-r--r--net-fs/cvmfs/files/cvmfs-2.1.20.0_p05-cares-underlink.patch106
-rw-r--r--net-fs/cvmfs/files/cvmfs-2.1.20.0_p05-geoip-missing-cmake.patch151
-rw-r--r--net-fs/cvmfs/metadata.xml28
-rw-r--r--net-fs/davfs2/Manifest5
-rw-r--r--net-fs/davfs2/davfs2-1.5.4.ebuild45
-rw-r--r--net-fs/davfs2/metadata.xml8
-rw-r--r--net-fs/docker-volume-netshare/Manifest16
-rw-r--r--net-fs/docker-volume-netshare/docker-volume-netshare-0.34.ebuild51
-rw-r--r--net-fs/docker-volume-netshare/files/docker-volume-netshare.confd2
-rw-r--r--net-fs/docker-volume-netshare/files/docker-volume-netshare.initd11
-rw-r--r--net-fs/docker-volume-netshare/metadata.xml11
-rw-r--r--net-fs/libnfs/Manifest18
-rw-r--r--net-fs/libnfs/files/libnfs-1.9.5-headers.patch86
-rw-r--r--net-fs/libnfs/files/libnfs-1.9.5-implicit-internal.patch27
-rw-r--r--net-fs/libnfs/libnfs-1.10.0.ebuild41
-rw-r--r--net-fs/libnfs/libnfs-1.11.0.ebuild41
-rw-r--r--net-fs/libnfs/libnfs-1.9.5.ebuild46
-rw-r--r--net-fs/libnfs/libnfs-1.9.7.ebuild41
-rw-r--r--net-fs/libnfs/libnfs-1.9.8.ebuild41
-rw-r--r--net-fs/libnfs/libnfs-2.0.0.ebuild48
-rw-r--r--net-fs/libnfs/libnfs-9999.ebuild48
-rw-r--r--net-fs/libnfs/metadata.xml11
-rw-r--r--net-fs/metadata.xml34
-rw-r--r--net-fs/minio/Manifest5
-rw-r--r--net-fs/minio/metadata.xml8
-rw-r--r--net-fs/minio/minio-0_pre20170613.ebuild44
-rw-r--r--net-fs/minio/minio-0_pre20170805.ebuild44
-rw-r--r--net-fs/ncpfs/Manifest24
-rw-r--r--net-fs/ncpfs/files/ipx.confd27
-rw-r--r--net-fs/ncpfs/files/ipx.init41
-rw-r--r--net-fs/ncpfs/files/ncpfs-2.2.5-php.patch16
-rw-r--r--net-fs/ncpfs/files/ncpfs-2.2.6-align-fix.patch12
-rw-r--r--net-fs/ncpfs/files/ncpfs-2.2.6-drop-kernel-check.patch31
-rw-r--r--net-fs/ncpfs/files/ncpfs-2.2.6-drop-mtab-support.patch269
-rw-r--r--net-fs/ncpfs/files/ncpfs-2.2.6-gcc4.patch36
-rw-r--r--net-fs/ncpfs/files/ncpfs-2.2.6-getuid-fix.patch124
-rw-r--r--net-fs/ncpfs/files/ncpfs-2.2.6-ldflags-support.patch153
-rw-r--r--net-fs/ncpfs/files/ncpfs-2.2.6-makefile-fix-soname-link.patch15
-rw-r--r--net-fs/ncpfs/files/ncpfs-2.2.6-missing-includes.patch22
-rw-r--r--net-fs/ncpfs/files/ncpfs-2.2.6-multiple-vulns.patch557
-rw-r--r--net-fs/ncpfs/files/ncpfs-2.2.6-no-suid-root.patch16
-rw-r--r--net-fs/ncpfs/files/ncpfs-2.2.6-pam_ncp_auth-fix.patch12
-rw-r--r--net-fs/ncpfs/files/ncpfs-2.2.6-remove-libncp_atomic-header.patch15
-rw-r--r--net-fs/ncpfs/files/ncpfs-2.2.6-remove-packed-attrib.patch297
-rw-r--r--net-fs/ncpfs/files/ncpfs-2.2.6-servername-array-fix.patch15
-rw-r--r--net-fs/ncpfs/files/ncpfs-2.2.6-zend_function_entry.patch11
-rw-r--r--net-fs/ncpfs/metadata.xml9
-rw-r--r--net-fs/ncpfs/ncpfs-2.2.6-r3.ebuild89
-rw-r--r--net-fs/ncpfs/ncpfs-2.2.6-r4.ebuild95
-rw-r--r--net-fs/netatalk/Manifest11
-rw-r--r--net-fs/netatalk/files/netatalk-3.1.7-gentoo.patch132
-rw-r--r--net-fs/netatalk/files/netatalk-3.1.8-disable-ld-library-path.patch34
-rw-r--r--net-fs/netatalk/metadata.xml30
-rw-r--r--net-fs/netatalk/netatalk-3.1.10.ebuild181
-rw-r--r--net-fs/netatalk/netatalk-3.1.11.ebuild181
-rw-r--r--net-fs/netatalk/netatalk-3.1.8.ebuild179
-rw-r--r--net-fs/nfs-utils/Manifest35
-rw-r--r--net-fs/nfs-utils/files/exports1
-rw-r--r--net-fs/nfs-utils/files/nfs-utils-1.1.4-mtab-sym.patch39
-rw-r--r--net-fs/nfs-utils/files/nfs-utils-1.2.8-cross-build.patch48
-rw-r--r--net-fs/nfs-utils/files/nfs-utils.conf3
-rw-r--r--net-fs/nfs-utils/files/nfs.confd38
-rw-r--r--net-fs/nfs-utils/files/nfs.initd162
-rw-r--r--net-fs/nfs-utils/files/nfsclient.confd18
-rw-r--r--net-fs/nfs-utils/files/nfsclient.initd33
-rw-r--r--net-fs/nfs-utils/files/nfsd.service-r115
-rw-r--r--net-fs/nfs-utils/files/nfsmount.confd7
-rw-r--r--net-fs/nfs-utils/files/nfsmount.initd47
-rw-r--r--net-fs/nfs-utils/files/nfsmount.initd-1.3.126
-rw-r--r--net-fs/nfs-utils/files/proc-fs-nfsd.mount8
-rw-r--r--net-fs/nfs-utils/files/rpc-gssd.service12
-rw-r--r--net-fs/nfs-utils/files/rpc-idmapd.service11
-rw-r--r--net-fs/nfs-utils/files/rpc-mountd.service-r110
-rw-r--r--net-fs/nfs-utils/files/rpc-statd.service-r212
-rw-r--r--net-fs/nfs-utils/files/rpc-svcgssd.service13
-rw-r--r--net-fs/nfs-utils/files/rpc.gssd.initd23
-rw-r--r--net-fs/nfs-utils/files/rpc.idmapd.initd25
-rw-r--r--net-fs/nfs-utils/files/rpc.pipefs.initd32
-rw-r--r--net-fs/nfs-utils/files/rpc.statd.initd32
-rw-r--r--net-fs/nfs-utils/files/rpc.svcgssd.initd23
-rw-r--r--net-fs/nfs-utils/files/var-lib-nfs-rpc_pipefs.mount7
-rw-r--r--net-fs/nfs-utils/metadata.xml20
-rw-r--r--net-fs/nfs-utils/nfs-utils-1.3.4-r1.ebuild178
-rw-r--r--net-fs/nfs-utils/nfs-utils-2.1.1-r1.ebuild175
-rw-r--r--net-fs/nfs-utils/nfs-utils-2.1.2_rc3.ebuild190
-rw-r--r--net-fs/nfs-utils/nfs-utils-2.1.2_rc5.ebuild190
-rw-r--r--net-fs/nfs4-acl-tools/Manifest5
-rw-r--r--net-fs/nfs4-acl-tools/metadata.xml8
-rw-r--r--net-fs/nfs4-acl-tools/nfs4-acl-tools-0.3.3.ebuild16
-rw-r--r--net-fs/nfstest/Manifest7
-rw-r--r--net-fs/nfstest/metadata.xml7
-rw-r--r--net-fs/nfstest/nfstest-1.0.2.ebuild25
-rw-r--r--net-fs/nfstest/nfstest-2.1.2.ebuild25
-rw-r--r--net-fs/openafs-kernel/Manifest13
-rw-r--r--net-fs/openafs-kernel/metadata.xml13
-rw-r--r--net-fs/openafs-kernel/openafs-kernel-1.6.20.1.ebuild134
-rw-r--r--net-fs/openafs-kernel/openafs-kernel-1.6.20.2-r1.ebuild134
-rw-r--r--net-fs/openafs-kernel/openafs-kernel-1.6.21-r1.ebuild134
-rw-r--r--net-fs/openafs-kernel/openafs-kernel-1.6.21.1.ebuild134
-rw-r--r--net-fs/openafs-legacy/Manifest4
-rw-r--r--net-fs/openafs-legacy/metadata.xml5
-rw-r--r--net-fs/openafs-legacy/openafs-legacy-0.1.ebuild70
-rw-r--r--net-fs/openafs/Manifest17
-rw-r--r--net-fs/openafs/metadata.xml22
-rw-r--r--net-fs/openafs/openafs-1.6.20.1.ebuild222
-rw-r--r--net-fs/openafs/openafs-1.6.20.2-r1.ebuild222
-rw-r--r--net-fs/openafs/openafs-1.6.21-r1.ebuild222
-rw-r--r--net-fs/openafs/openafs-1.6.21.1.ebuild222
-rw-r--r--net-fs/s3backer/Manifest4
-rw-r--r--net-fs/s3backer/metadata.xml9
-rw-r--r--net-fs/s3backer/s3backer-1.3.7.ebuild33
-rw-r--r--net-fs/s3fs/Manifest8
-rw-r--r--net-fs/s3fs/metadata.xml21
-rw-r--r--net-fs/s3fs/s3fs-1.74.ebuild28
-rw-r--r--net-fs/s3fs/s3fs-1.78.ebuild34
-rw-r--r--net-fs/s3fs/s3fs-1.80.ebuild55
-rw-r--r--net-fs/s3ql/Manifest22
-rw-r--r--net-fs/s3ql/files/s3ql-2.14-ceph.patch75
-rw-r--r--net-fs/s3ql/metadata.xml15
-rw-r--r--net-fs/s3ql/s3ql-1.19.ebuild60
-rw-r--r--net-fs/s3ql/s3ql-2.11.1.ebuild54
-rw-r--r--net-fs/s3ql/s3ql-2.11.ebuild54
-rw-r--r--net-fs/s3ql/s3ql-2.12.ebuild54
-rw-r--r--net-fs/s3ql/s3ql-2.14-r1.ebuild58
-rw-r--r--net-fs/s3ql/s3ql-2.14.ebuild54
-rw-r--r--net-fs/s3ql/s3ql-2.17.1.ebuild54
-rw-r--r--net-fs/s3ql/s3ql-2.20.ebuild54
-rw-r--r--net-fs/s3ql/s3ql-2.21.ebuild54
-rw-r--r--net-fs/s3ql/s3ql-2.23.ebuild54
-rw-r--r--net-fs/samba/Manifest36
-rw-r--r--net-fs/samba/files/4.2/samba4.confd38
-rw-r--r--net-fs/samba/files/4.2/samba4.initd-r155
-rw-r--r--net-fs/samba/files/4.4/samba4.confd38
-rw-r--r--net-fs/samba/files/4.4/samba4.initd-r155
-rw-r--r--net-fs/samba/files/nmbd.service12
-rw-r--r--net-fs/samba/files/samba-4.2.3-heimdal_compilefix.patch22
-rw-r--r--net-fs/samba/files/samba-4.2.7-pam.patch36
-rw-r--r--net-fs/samba/files/samba-4.4.0-pam.patch29
-rw-r--r--net-fs/samba/files/samba-4.5.1-compile_et_fix.patch16
-rw-r--r--net-fs/samba/files/samba.conf2
-rw-r--r--net-fs/samba/files/samba.service10
-rw-r--r--net-fs/samba/files/smbd.service12
-rw-r--r--net-fs/samba/files/smbd.socket9
-rw-r--r--net-fs/samba/files/smbd_at.service7
-rw-r--r--net-fs/samba/files/talloc-disable-python.patch34
-rw-r--r--net-fs/samba/files/winbindd.service12
-rw-r--r--net-fs/samba/metadata.xml31
-rw-r--r--net-fs/samba/samba-4.2.14.ebuild257
-rw-r--r--net-fs/samba/samba-4.5.10-r1.ebuild281
-rw-r--r--net-fs/samba/samba-4.5.13.ebuild282
-rw-r--r--net-fs/samba/samba-4.5.14.ebuild282
-rw-r--r--net-fs/samba/samba-4.6.8-r1.ebuild305
-rw-r--r--net-fs/samba/samba-4.7.0-r1.ebuild301
-rw-r--r--net-fs/smbnetfs/Manifest5
-rw-r--r--net-fs/smbnetfs/metadata.xml37
-rw-r--r--net-fs/smbnetfs/smbnetfs-0.6.0-r1.ebuild39
-rw-r--r--net-fs/smbtad/Manifest6
-rw-r--r--net-fs/smbtad/files/smbtad.rc25
-rw-r--r--net-fs/smbtad/metadata.xml11
-rw-r--r--net-fs/smbtad/smbtad-1.2.6.ebuild44
-rw-r--r--net-fs/smbtatools/Manifest6
-rw-r--r--net-fs/smbtatools/files/smbtatools-1.2.6-fix-cmake.patch38
-rw-r--r--net-fs/smbtatools/metadata.xml11
-rw-r--r--net-fs/smbtatools/smbtatools-1.2.6-r1.ebuild47
-rw-r--r--net-fs/sshfs/Manifest8
-rw-r--r--net-fs/sshfs/metadata.xml11
-rw-r--r--net-fs/sshfs/sshfs-2.10.ebuild19
-rw-r--r--net-fs/sshfs/sshfs-2.8.ebuild21
-rw-r--r--net-fs/sshfs/sshfs-2.9.ebuild21
-rw-r--r--net-fs/tahoe-lafs/Manifest5
-rw-r--r--net-fs/tahoe-lafs/metadata.xml21
-rw-r--r--net-fs/tahoe-lafs/tahoe-lafs-1.10.2.ebuild58
-rw-r--r--net-fs/torus/Manifest6
-rw-r--r--net-fs/torus/metadata.xml11
-rw-r--r--net-fs/torus/torus-0.1.2.ebuild82
-rw-r--r--net-fs/wdfs/Manifest6
-rw-r--r--net-fs/wdfs/files/wdfs-1.4.2-fix-Waddress.patch40
-rw-r--r--net-fs/wdfs/metadata.xml13
-rw-r--r--net-fs/wdfs/wdfs-1.4.2-r1.ebuild24
221 files changed, 13121 insertions, 0 deletions
diff --git a/net-fs/autofs/Manifest b/net-fs/autofs/Manifest
new file mode 100644
index 000000000000..bb31c7f02a30
--- /dev/null
+++ b/net-fs/autofs/Manifest
@@ -0,0 +1,28 @@
+AUX autofs-5.0.3-heimdal.patch 1380 SHA256 ca62546abf6b6ae2ed95f53d439d25770f20e70651fdaf5a0edf9d69920b108a SHA512 f8f0528988085691899c3f4c1b3f13c6b189b4fe7fa160e713a819f25cb1c860ed896e096c4226e9e6449526037b263e832d27a5e5ce9b13bc5416ee28cb7317 WHIRLPOOL b6060d5074eb3a523724d85bcf1fef24f8af70372f6806be18a0e4fecff6f6e26638192490935ccf99bb90f140b9dedfc195fb42cc582512acdf4a2616dfb8d3
+AUX autofs-5.0.5-fix-install-deadlink.patch 544 SHA256 48393e00ddb51c5b0588ea45711abb16bf256c487c584062bc3de59b30bae053 SHA512 03f4f8fa6721e5ddd16560b9d7385a3734c7614f2903bd142869b2f2b099317ae2f73f6aa59f6e62b166f00d90baba3345d5fd5c3af3344b2348984d09ba3020 WHIRLPOOL c8c202220584c8cedcf0d90f066cad3311f60c90e5b36a8a52847f1b0723babb8b97a95264cd64fb1fd2164e64f3f314df1ef357c822cb0028cd9ff498d7d13f
+AUX autofs-5.0.6-revert-ldap.patch 512 SHA256 67e4f23d0c1ef771f861ec295a2780d9c09b37d26718c21e3f20d3b4936738e9 SHA512 e929bbe145c19ac5180094205a9095387e90126e8360ede99ab972cca864c40c1caf779503454784804e925e0efc0b4c459accb734f63482c758989bb17d7313 WHIRLPOOL 70c541931415e7d35955196c683bef2bf08c16b920f7398a679eaa8abeda5364cd3f0afec674e02e126447ca5c29d8c2934eb33d3f09aeb48fa0ae7a798cc56f
+AUX autofs-5.0.7-add-missing-endif-HAVE_SASL-in-modules-lookup_ldap.c.patch 1151 SHA256 e2ea51d649d9c40ccea45828570e7b9b43cb598a703990d59933e79ab38669f1 SHA512 d92b0fcafdf6bb5df1b1d79f628bd049e07a51318e7b487f350816b1ff54d73c24b0fb44d8558b068bf27f128cf9edbc611a5e67e5d33f96b91c47bede1ebbfd WHIRLPOOL 3bfe2633f81069ca0d491f591b87368a9251eecf7af53ad888a5b2bf86a8754473575f1dd1e081ba91ed03823c13c2fd94aaf2ace5e0f060f3ba90e9f123af56
+AUX autofs-5.0.7-libtirpc-link.patch 423 SHA256 8093e021c4bdb3f876f57f5496a4ed3ac4526d09797422f60e1abfb73b4ef75d SHA512 2a66e7ad011571ad49c9c9c98a880a663f6ec3c2d31e792f727e8d2c38fa5ae00a8f48222f3b215caab5ef7db64dbc6eb9a794f556efccea5a941ff5fe4f5bc5 WHIRLPOOL a3211cb59dafaca258b18067baabb24feb88bc451ba7b847d406d66e4401997caf220179d468e2704ab0388ea13cefb0119a15d09bc38423dfe87e5fb09bc023
+AUX autofs-5.0.7-parallel-make.patch 1424 SHA256 359f57bc828edfdaca8c66edd3c821e4b7a9d355ebccadbd20390aed928b822c SHA512 8489a71e22c5711bc76d3756b4c3a375984392f821a58c5f28db82c0134a8dcb009905a64fdef56ca3553eaff8be883e653a36d6acf72a724b90a946408aa8cf WHIRLPOOL 4fa8e26f46c6fb3bdf233c2213578d827e0025ea0e19df0bfa1a2ae1802dce5df4628977f503b1ed94142388381c60c0af896d5b549736088f892fb810dace4d
+AUX autofs-5.0.7-respect-user-flags-and-fix-asneeded-r3.patch 3883 SHA256 e2c15afb788421c4231eacb7830ff4694c306acddb95f8258dc2a34845aed8c2 SHA512 7332d440b583cdf88be95a4f01d0832a5807e5e807564d135fd47c08886d3abb90bc9df0c88bfa5b2a910ebf1ca3ee37ade78afb02ce6e57a4468c03b6ddbc84 WHIRLPOOL b96cbfc284c0caab12c4ac6c53ccd57a9247f25d1b0f22b45899181cf3e72a9c419472dc26252f3dfcf029a59d02aae3f713826268f62cd7300587c8315e05c0
+AUX autofs-5.0.7-sasl-def.patch 1114 SHA256 bcaa9a826d7a936d1510f4ddb914a314bf37eeab9edc24dcf9b73cdbc6cfa79a SHA512 a6b1b75079f4651ef9886d8315c8fb6894c5800eb6a4f614fdcb205365e805ba6e4f95146ed95b283e361339eb5b0b723956b3344e50856223ae79aec7c6ca09 WHIRLPOOL fcea83e33989315a87a983972d7c6cc155346c7d901f63e9aa8a18f300cc5b109fa247b617acc9f97aa20100e4d4e95b901f24fd9ac3af6ef8530dee2b1e2b11
+AUX autofs-5.0.7-sloppy-mount.patch 3375 SHA256 e5901ee729202d6b6ac9cea99dc0457986875c546a3b0d684133b25bed22ba8f SHA512 2c5cf35c9ea4258c406be629b99fabe953fca63209dfa93a74b1b8441ae92b58677bb52e408556a05be0492871ac98849baf6c8aba7429efc97e38b4a9b1fb45 WHIRLPOOL b13e2c494f224e0e244ec7b3a030835d3c830660203e691117f355a078b719cd64ec312c3809f1ff1410b5b9e9b34914a4ce0dedc3c4db609ba5cd4ddaec9248
+AUX autofs-5.1.2-libtirpc-as-need.patch 808 SHA256 06257ab8ffd07188a5d16473662fea0b9ca44cdae523e21f33ae0dee15b11b4c SHA512 96441e4a040ceafd4bf323003d13170f419ea09c7d9cfdaeaf8675c945d28afde9b9ccf0ae3b0180d2038f5120e6d651c6657115658591093b778ed8f21b1bb3 WHIRLPOOL ede59bbc7473e34fbbd65f44409fd3312005b7049353ecf1b780f889f9852afeb5a40b4bef3dcb560cdef5b1dcee42498f617fdceb928978d05a0be3c7ffe393
+AUX autofs5-auto.master 693 SHA256 32b4e7b113bf6cef42d827887abd135e81623a959ee6993b8877cc9a0d95e867 SHA512 3be4e92250cb678a6d8454b5703c48f6fac14653e1e89028917a627787e8785bfae1cac5a76b2d8a030fd2ec6e491e22488c19a2034cfeedf02e98c400a228dd WHIRLPOOL 5dc1736c64cef4bd9c6af7698ec3c1f81481a2f4a4cf46d7178d1b9645a5f1ba9153588d1a375b16c4352a8967b643f49e010baf6522bd88de6bc807a8893842
+AUX autofs5.initd 1563 SHA256 5ee23ee05da536fb67456c034e757841b27bc8528d93d2bc835e7427fe77d05e SHA512 f8e1d38917b9c7048a4f6498fb987984306e15458eaf8cb73990a99d355d7f7ce3f1aa5450725283cbbc6f5c0e2f31048f1cd26eca7f136f1fe30a6dd8d31c43 WHIRLPOOL b57a6ab92d8dfe21be2348ec8e86ae91a63ad4452547335896c066148e57fc4adae3197d684614934b1b7d24611440e98060ce0b4541608adcdbfd69cfd6b81c
+DIST autofs-5.0.10.tar.xz 258480 SHA256 98150c09639112a125a6d0ddc6aa1920ae4e6c41736e65d8a004c3171fcca70b SHA512 899d3b7040d1162312f9d595df0fd6c40489e4aefb7086893b51993446da78f10707d7e8caf8440ff24000d54794faca869aaf8564e5622caf8bb046af6fcf3b WHIRLPOOL 32c964a58f5125dfbfe589345e1fdf3da357fdadead790e3adbc840f0fc1b7093a0191224ac8d07ac792184914f6630ba08d572ffdcca0423e2a41bb2892ceaf
+DIST autofs-5.0.7-patches-3.tar.lzma 37967 SHA256 16de3486573a94d476f70f2c422656d6fddd79b3581ce05faeb5dd55748ba1cb SHA512 8cbb683a82d2cdc5e3c97921ba3a5bc5af5ab9fb45e4802de021a6161eaeaebb192790a351d281d48b68ed0f8ea6e3a0c0514a4f4a1c546191d8acca9e856ca7 WHIRLPOOL a42f6d609ee4160dfb2d84d94516667f41b8dbe9bf6bdef923f424f82ec00f6115f211dc2985170c45be53bdc45ea47026cc3750c61c7e14aa02ce3384bb9908
+DIST autofs-5.0.7.tar.bz2 319117 SHA256 08c4304d8076dc80c14df559bc5fd821b67ef3457b245f61068bd053d8f94ccc SHA512 672c53e0a5477097779088d8654edaad4cb01ab68ade2ee175d963c7d4895d1bdeeeabc87057ecca2f4f3a0f08014298dae40e5e8e862c20c0b1477d72431f84 WHIRLPOOL 220cbd618ee4f34c82eaad823312284cc787aa28a0a8b9638a4b495cf38a3a6f9da194e74722febe04ee2b5ac4e1e9eccccde1f562d0d554f1e8a5ff4b5faec8
+DIST autofs-5.1.1-patches-0.tar.lzma 41178 SHA256 ef9f94aacff845d29d3118c73ca7d08199d40a7de5edae1025d341530e7dc2b4 SHA512 5c3ba26711401b3f9dc8cd36d3a85b1a8efce409621efedfc4f1caf2a15536646f6f89a79b8e12c703d3b3a4627ecda8c800386ebff34e20fdfad39041d91aa4 WHIRLPOOL d3d91c432e643911a4d8b5463e056aa50c717c08287e6ccf75bf1d6ca071460cc709aa32387f53cbe763de27b86eef1e26ab75a2fd334c783fd024b9f1d47ba3
+DIST autofs-5.1.1.tar.xz 290300 SHA256 e08ff0ef9ff365d87b6c33dca136d20e4e07675197a324f2816894cb437021c3 SHA512 37c0f10ee06bbfc76059ff9ae54d9b462f1c2bc39e8779e96dd5bfc2b07055606c0710f1c3de95e6f099edd2c5bb5a6f8a341be989d7554bf80011bfbe90c905 WHIRLPOOL 063e7bcabb3e93a17e8e7da75e6b42af59769e794e3b31240762a4617cc2ac626b4b4985a38455bdca56753fb897fed1a3173c633f1f9a594e79f891dc41f523
+DIST autofs-5.1.2.tar.xz 294792 SHA256 88b7de39088aead983e02072a7b753d5ee52ce419c8913f7a3d4ff5521313f0c SHA512 435bcb41c9d467947c194d879e46692b5976131b8e923793bdeac34f70420ede740c4d70ec393413fff0b1010495ac7fe5fa8b45a59d15a2430ecae9ec3fe7e1 WHIRLPOOL d0e53d1d41bf31c8bf6358053b1a0668dcc0a84ee92ff69ade86a6731bfb0945f41cab5b2dd62d7c086219095c20db43c91a074ce321fd5db870a5f16af7bce0
+DIST autofs-5.1.3.tar.xz 300632 SHA256 e96eebfe3ed5fb1a30f4510f538198affde223e370c6dc2bed9780309272b1bf SHA512 d5363f4442be5258465140920a32cb63340c5da060ef2e66678f003d6a0c00579880837f0a04f59c7bce57d1cbc0f42bdd26546a2195f87e7bd46334c9e32e35 WHIRLPOOL f3fd7ae400a858ddc888970d1435d0b408b8d11534e22db765782cede3a31604456beed27024066fa9afc1d124602ce07589bd4fd3d8fa89c9becbc676d26fa9
+EBUILD autofs-5.0.10.ebuild 3051 SHA256 51fd84712524bbfa2502b0fc6808821bbc548a51e52a9f7a6c664dc4229cdc0a SHA512 9d920430aea147beca0808c18bae3e697c8d28674756c073ebaf08257c390cbde5f4f35a6c116cbc2e7a6ce9ae2bf3945d27336e29469869470ba82ef79898b3 WHIRLPOOL c2dc04e819bd2bf36924371a16689113acb3fbc8577bdc742562039d6f0d873d405fc8725cff2c6ed3071fe55a8b188beee15157a460bcd1dcd3f884c7772541
+EBUILD autofs-5.0.7-r4.ebuild 3800 SHA256 60a7fab10f88217d7fd95b2091f4d063fe7d87754cfc2e97d86f6e0f68b68905 SHA512 6b397ac969f16d35e907590643112596698e1da71bf48091f05b01d3c40f613329472c6fb9c43c50b43fff3e9d234ae2141ae741a78db9aa213a6b45dfe6d577 WHIRLPOOL 0270a7819e105178c0d71c29eac3e07173fc762ad72dabfc61d11abba0d8329755bccc36fd6fb7fd0792191bdd2dafa4515956b1d77f4e8ff2ffc3230f1c3713
+EBUILD autofs-5.0.7-r5.ebuild 3862 SHA256 7d48c0682098326a5dd4a72dd421305ab1bf3ce550e00581f30cf1ba724ab31f SHA512 36d61ce719c07ed99b77ec1cfcad99c4917b2c5d84eed44571f5cb814c0dda5af31bf5c23573275ffb3472245930e3adfcb03bf85adf8cd718716ce18c17ed79 WHIRLPOOL 55cab84a80fa301cd8a694cb93726f93fad453af92754a82abe2c3bcd4e72d9e4b68609dc0b1b271a16beeb37e2bbfac03d6152058a704595f08cbe801e23ec4
+EBUILD autofs-5.1.1-r1.ebuild 3049 SHA256 2052f836d4a55ea195a024a74396116ceeb354d674c771d7bd28a155fe64d71e SHA512 396dff732065faa92f220aab9c01b352aa39d797cbe15bebc9499d1591cd3d5d5cbd74c036aa3ba5f89cfd7b30177fdcf281b0b3451b092634acb0236649530a WHIRLPOOL 30b50d053134608e80c0884677fadf628e77f4ef893a8efcb28600e59fb95ebd42a784b9f30f5bf035d3f0a2dbc7871fde89dfe605533d7df832bc2aa562ca32
+EBUILD autofs-5.1.2.ebuild 3098 SHA256 4943cc0cad9923c46055bf413d5f6a38f0fcd0c8b37ad9f1dd5a752463abe148 SHA512 cc2ae2b4284ca354e9d3f7314e04c7ac40e06638d57303c493b2ef8ffeb0666fa55031a31b791322b5eb2edc515f6bac893f2c2edf6807c7f55c0aaca98c60c2 WHIRLPOOL efb65c476ad52175786173f991881099f4095adca075909a69236ff2ae1079c55a8b3d496d7fdcd140ee65f74689971a58cc10f53b26bcc9c97c84c8d093e69c
+EBUILD autofs-5.1.3.ebuild 3090 SHA256 b2574fe8c2a6a65c567968ec3e21e49091f5ed03196f355828cefebffbffec61 SHA512 ecd06248b831aa736e5b30a9b16bce46babfe0b8f1fa710e178ec845000768a430269219736b20ff5faa66834578156d4a709b35be02820d4be336ade5d7774b WHIRLPOOL 223e23355c442e41fc114f5443e2168fd3d7f38ab1d765f01d56474527199f16401301079bb70510f933870a77cb3f09f6029bf2959802ac1b2b3065c2c7a1d9
+MISC ChangeLog 6434 SHA256 63b80d8479610aa5f88dd0a7b41fc850b11ec497daa404ae576ff2b5245f4b9d SHA512 d20ec60005f18e6357e6e5be370634d101c3197c8fd87650fc40199ae9d97e81837d19b194b5424393c3dc46d159c1ebaadcf60daec4af84ff763583705206e3 WHIRLPOOL 116419ae49f9421592f9a18f514e3e7537ed461bad2b2493b4e2d179bfac368021744b2822ed3218ae137fc4f8d1e93dea6783be6313772f9907900ec1213298
+MISC ChangeLog-2015 30660 SHA256 6c4db77e17bcf966502dfb7d61b3857d157aaf00b4871ea96ba5febf5e6e7b09 SHA512 2cd070f669c1891699e5b92e9dfe134d87d8bb31371738bcc228a653d39b852d4ba5b300aedbfd041aecb508eb62b3aa65cb4af43b8ecac7cb251de8739d3a17 WHIRLPOOL 495b89da795092fe7f03d69ac8d5cd3d90baeb488ab648bd5541f744fdc0fc10592c4b3d4596517b9de621d0d6b8c8946828c9c680fbd5885677f5f49fef985c
+MISC metadata.xml 856 SHA256 e97455c4fd91a9ac1f3e97e1d03b99e5fadf4092a6f7c30e7fdcfcac3228ea00 SHA512 b84635dd58c8ab0cc085faf540a76844365c7479429ae48672c9b8ff3f3b2250c40b91e753fa5f9702c2bc12cb7ed5f52384db0f36bb3abb8d2f020fbd12e63b WHIRLPOOL 39d67637b44ade776d472922f41840674ab60d170bda40fef244a4908dfc26d59d6e51d2e5b2f88b0191494dabaf42dbd027cf91428daea33289b3d7aca356ea
diff --git a/net-fs/autofs/autofs-5.0.10.ebuild b/net-fs/autofs/autofs-5.0.10.ebuild
new file mode 100644
index 000000000000..c7881fa3b00f
--- /dev/null
+++ b/net-fs/autofs/autofs-5.0.10.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+AUTOTOOLS_IN_SOURCE_BUILD=true
+
+inherit autotools-utils linux-info multilib systemd toolchain-funcs
+
+PATCH_VER=
+[[ -n ${PATCH_VER} ]] && \
+ PATCHSET_URI="https://dev.gentoo.org/~jlec/distfiles/${P}-patches-${PATCH_VER}.tar.lzma"
+
+DESCRIPTION="Kernel based automounter"
+HOMEPAGE="http://www.linux-consulting.com/Amd_AutoFS/autofs.html"
+SRC_URI="
+ mirror://kernel/linux/daemons/${PN}/v5/${P}.tar.xz
+ ${PATCHSET_URI}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="-dmalloc hesiod ldap libtirpc mount-locking sasl"
+
+# USE="sasl" adds SASL support to the LDAP module which will not be build. If
+# SASL support should be available, please add "ldap" to the USE flags.
+REQUIRED_USE="sasl? ( ldap )"
+
+# currently, sasl code assumes the presence of kerberosV
+RDEPEND=">=sys-apps/util-linux-2.20
+ dmalloc? ( dev-libs/dmalloc[threads] )
+ hesiod? ( net-dns/hesiod )
+ ldap? ( >=net-nds/openldap-2.0
+ sasl? (
+ dev-libs/cyrus-sasl
+ dev-libs/libxml2
+ virtual/krb5
+ )
+ )
+ libtirpc? ( net-libs/libtirpc )"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/yacc"
+
+CONFIG_CHECK="~AUTOFS4_FS"
+
+src_prepare() {
+ # Upstream's patchset
+ if [[ -n ${PATCH_VER} ]]; then
+ EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}"/patches
+ fi
+
+ sed -i -e "s:/usr/bin/kill:/bin/kill:" samples/autofs.service.in || die #bug #479492
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ # bug #483716
+ tc-export AR
+ # --with-confdir is for bug #361481
+ # --with-mapdir is for bug #385113
+ local myeconfargs=(
+ --with-confdir=/etc/conf.d
+ --with-mapdir=/etc/autofs
+ $(use_with dmalloc)
+ $(use_with ldap openldap)
+ $(use_with libtirpc)
+ $(use_with sasl)
+ $(use_with hesiod)
+ $(use_enable mount-locking)
+ --disable-ext-env
+ --enable-sloppy-mount # bug #453778
+ --enable-force-shutdown
+ --enable-ignore-busy
+ --with-systemd="$(systemd_get_unitdir)" #bug #479492
+ RANLIB="$(type -P $(tc-getRANLIB))" # bug #483716
+ )
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile DONTSTRIP=1
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ if kernel_is -lt 2 6 30; then
+ # kernel patches
+ docinto patches
+ dodoc patches/${PN}4-2.6.??{,.?{,?}}-v5-update-????????.patch
+ fi
+ newinitd "${FILESDIR}"/autofs5.initd autofs
+ insinto etc/autofs
+ newins "${FILESDIR}"/autofs5-auto.master auto.master
+}
+
+pkg_postinst() {
+ if kernel_is -lt 2 6 30; then
+ elog "This version of ${PN} requires a kernel with autofs4 supporting"
+ elog "protocol version 5.00. Patches for kernels older than 2.6.30 have"
+ elog "been installed into"
+ elog "${EROOT}usr/share/doc/${P}/patches."
+ elog "For further instructions how to patch the kernel, please refer to"
+ elog "${EROOT}usr/share/doc/${P}/INSTALL."
+ elog
+ fi
+ elog "If you plan on using autofs for automounting remote NFS mounts,"
+ elog "please check that both portmap (or rpcbind) and rpc.statd/lockd"
+ elog "are running."
+}
diff --git a/net-fs/autofs/autofs-5.0.7-r4.ebuild b/net-fs/autofs/autofs-5.0.7-r4.ebuild
new file mode 100644
index 000000000000..82f75d9de136
--- /dev/null
+++ b/net-fs/autofs/autofs-5.0.7-r4.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils linux-info multilib systemd toolchain-funcs
+
+PATCH_VER=3
+[[ -n ${PATCH_VER} ]] && \
+ PATCHSET_URI="https://dev.gentoo.org/~jlec/distfiles/${P}-patches-${PATCH_VER}.tar.lzma"
+
+DESCRIPTION="Kernel based automounter"
+HOMEPAGE="http://www.linux-consulting.com/Amd_AutoFS/autofs.html"
+SRC_URI="
+ mirror://kernel/linux/daemons/${PN}/v5/${P}.tar.bz2
+ ${PATCHSET_URI}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ~ppc64 sparc x86"
+IUSE="-dmalloc hesiod ldap libtirpc mount-locking sasl"
+
+# USE="sasl" adds SASL support to the LDAP module which will not be build. If
+# SASL support should be available, please add "ldap" to the USE flags.
+REQUIRED_USE="sasl? ( ldap )"
+
+# currently, sasl code assumes the presence of kerberosV
+RDEPEND=">=sys-apps/util-linux-2.20
+ dmalloc? ( dev-libs/dmalloc[threads] )
+ hesiod? ( net-dns/hesiod )
+ ldap? ( >=net-nds/openldap-2.0
+ sasl? (
+ dev-libs/cyrus-sasl
+ dev-libs/libxml2
+ virtual/krb5
+ )
+ )
+ libtirpc? ( net-libs/libtirpc )"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/yacc"
+
+CONFIG_CHECK="~AUTOFS4_FS"
+
+PATCHES=(
+ # Fix for bug #210762
+ # Upstream reference: http://thread.gmane.org/gmane.linux.kernel.autofs/4203
+ "${FILESDIR}"/${PN}-5.0.3-heimdal.patch
+
+ # Accumulated fixes for bugs
+ # #154797: Respect CC and CFLAGS
+ # #253412: Respect LDFLAGS
+ # #247969: Link order for --as-needed
+ "${FILESDIR}"/${PN}-5.0.7-respect-user-flags-and-fix-asneeded-r3.patch
+
+ # Upstream reference: http://thread.gmane.org/gmane.linux.kernel.autofs/5371
+ "${FILESDIR}"/${PN}-5.0.5-fix-install-deadlink.patch
+
+ "${FILESDIR}"/${P}-add-missing-endif-HAVE_SASL-in-modules-lookup_ldap.c.patch #361899, #468606
+ "${FILESDIR}"/${PN}-5.0.6-revert-ldap.patch #381315
+ "${FILESDIR}"/${PN}-5.0.7-sasl-def.patch #469324
+ "${FILESDIR}"/${PN}-5.0.7-libtirpc-link.patch #464120
+ "${FILESDIR}"/${PN}-5.0.7-parallel-make.patch
+ )
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+src_prepare() {
+ # Upstream's patchset
+ if [[ -n ${PATCH_VER} ]]; then
+ EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}"/patches
+ fi
+ sed -i -e "s:/usr/bin/kill:/bin/kill:" samples/autofs.service.in || die #bug #479492
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ # bug #483716
+ tc-export AR
+ # --with-confdir is for bug #361481
+ # --with-mapdir is for bug #385113
+ local myeconfargs=(
+ --with-confdir=/etc/conf.d
+ --with-mapdir=/etc/autofs
+ $(use_with dmalloc)
+ $(use_with ldap openldap)
+ $(use_with libtirpc)
+ $(use_with sasl)
+ $(use_with hesiod)
+ $(use_enable mount-locking)
+ --disable-ext-env
+ --enable-sloppy-mount # bug #453778
+ --enable-forced-shutdown
+ --enable-ignore-busy
+ --with-systemd
+ systemddir="$(systemd_get_unitdir)" #bug #479492
+ RANLIB="$(type -P $(tc-getRANLIB))" # bug #483716
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ if kernel_is -lt 2 6 30; then
+ # kernel patches
+ docinto patches
+ dodoc patches/${PN}4-2.6.??{,.?{,?}}-v5-update-????????.patch
+ fi
+ newinitd "${FILESDIR}"/autofs5.initd autofs
+ insinto etc/autofs
+ newins "${FILESDIR}"/autofs5-auto.master auto.master
+}
+
+pkg_postinst() {
+ if kernel_is -lt 2 6 30; then
+ elog "This version of ${PN} requires a kernel with autofs4 supporting"
+ elog "protocol version 5.00. Patches for kernels older than 2.6.30 have"
+ elog "been installed into"
+ elog "${EROOT}usr/share/doc/${P}/patches."
+ elog "For further instructions how to patch the kernel, please refer to"
+ elog "${EROOT}usr/share/doc/${P}/INSTALL."
+ elog
+ fi
+ elog "If you plan on using autofs for automounting remote NFS mounts,"
+ elog "please check that both portmap (or rpcbind) and rpc.statd/lockd"
+ elog "are running."
+}
diff --git a/net-fs/autofs/autofs-5.0.7-r5.ebuild b/net-fs/autofs/autofs-5.0.7-r5.ebuild
new file mode 100644
index 000000000000..e85bd049f50d
--- /dev/null
+++ b/net-fs/autofs/autofs-5.0.7-r5.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils linux-info multilib systemd toolchain-funcs
+
+PATCH_VER=3
+[[ -n ${PATCH_VER} ]] && \
+ PATCHSET_URI="https://dev.gentoo.org/~jlec/distfiles/${P}-patches-${PATCH_VER}.tar.lzma"
+
+DESCRIPTION="Kernel based automounter"
+HOMEPAGE="http://www.linux-consulting.com/Amd_AutoFS/autofs.html"
+SRC_URI="
+ mirror://kernel/linux/daemons/${PN}/v5/${P}.tar.bz2
+ ${PATCHSET_URI}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="-dmalloc hesiod ldap libtirpc mount-locking sasl"
+
+# USE="sasl" adds SASL support to the LDAP module which will not be build. If
+# SASL support should be available, please add "ldap" to the USE flags.
+REQUIRED_USE="sasl? ( ldap )"
+
+# currently, sasl code assumes the presence of kerberosV
+RDEPEND=">=sys-apps/util-linux-2.20
+ dmalloc? ( dev-libs/dmalloc[threads] )
+ hesiod? ( net-dns/hesiod )
+ ldap? ( >=net-nds/openldap-2.0
+ sasl? (
+ dev-libs/cyrus-sasl
+ dev-libs/libxml2
+ virtual/krb5
+ )
+ )
+ libtirpc? ( net-libs/libtirpc )"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/yacc"
+
+CONFIG_CHECK="~AUTOFS4_FS"
+
+PATCHES=(
+ # Fix for bug #210762
+ # Upstream reference: http://thread.gmane.org/gmane.linux.kernel.autofs/4203
+ "${FILESDIR}"/${PN}-5.0.3-heimdal.patch
+
+ # Accumulated fixes for bugs
+ # #154797: Respect CC and CFLAGS
+ # #253412: Respect LDFLAGS
+ # #247969: Link order for --as-needed
+ "${FILESDIR}"/${PN}-5.0.7-respect-user-flags-and-fix-asneeded-r3.patch
+
+ # Upstream reference: http://thread.gmane.org/gmane.linux.kernel.autofs/5371
+ "${FILESDIR}"/${PN}-5.0.5-fix-install-deadlink.patch
+
+ "${FILESDIR}"/${P}-add-missing-endif-HAVE_SASL-in-modules-lookup_ldap.c.patch #361899, #468606
+ "${FILESDIR}"/${PN}-5.0.6-revert-ldap.patch #381315
+ "${FILESDIR}"/${PN}-5.0.7-sasl-def.patch #469324
+ "${FILESDIR}"/${PN}-5.0.7-libtirpc-link.patch #464120
+ "${FILESDIR}"/${PN}-5.0.7-parallel-make.patch
+ "${FILESDIR}"/${PN}-5.0.7-sloppy-mount.patch #545258
+ )
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+src_prepare() {
+ # Upstream's patchset
+ if [[ -n ${PATCH_VER} ]]; then
+ EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}"/patches
+ fi
+ sed -i -e "s:/usr/bin/kill:/bin/kill:" samples/autofs.service.in || die #bug #479492
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ # bug #483716
+ tc-export AR
+ # --with-confdir is for bug #361481
+ # --with-mapdir is for bug #385113
+ local myeconfargs=(
+ --with-confdir=/etc/conf.d
+ --with-mapdir=/etc/autofs
+ $(use_with dmalloc)
+ $(use_with ldap openldap)
+ $(use_with libtirpc)
+ $(use_with sasl)
+ $(use_with hesiod)
+ $(use_enable mount-locking)
+ --disable-ext-env
+ --enable-sloppy-mount # bug #453778
+ --enable-forced-shutdown
+ --enable-ignore-busy
+ --with-systemd
+ systemddir="$(systemd_get_unitdir)" #bug #479492
+ RANLIB="$(type -P $(tc-getRANLIB))" # bug #483716
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ if kernel_is -lt 2 6 30; then
+ # kernel patches
+ docinto patches
+ dodoc patches/${PN}4-2.6.??{,.?{,?}}-v5-update-????????.patch
+ fi
+ newinitd "${FILESDIR}"/autofs5.initd autofs
+ insinto etc/autofs
+ newins "${FILESDIR}"/autofs5-auto.master auto.master
+}
+
+pkg_postinst() {
+ if kernel_is -lt 2 6 30; then
+ elog "This version of ${PN} requires a kernel with autofs4 supporting"
+ elog "protocol version 5.00. Patches for kernels older than 2.6.30 have"
+ elog "been installed into"
+ elog "${EROOT}usr/share/doc/${P}/patches."
+ elog "For further instructions how to patch the kernel, please refer to"
+ elog "${EROOT}usr/share/doc/${P}/INSTALL."
+ elog
+ fi
+ elog "If you plan on using autofs for automounting remote NFS mounts,"
+ elog "please check that both portmap (or rpcbind) and rpc.statd/lockd"
+ elog "are running."
+}
diff --git a/net-fs/autofs/autofs-5.1.1-r1.ebuild b/net-fs/autofs/autofs-5.1.1-r1.ebuild
new file mode 100644
index 000000000000..8db4727c131b
--- /dev/null
+++ b/net-fs/autofs/autofs-5.1.1-r1.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+AUTOTOOLS_IN_SOURCE_BUILD=true
+
+inherit autotools-utils linux-info multilib systemd toolchain-funcs
+
+PATCH_VER=0
+[[ -n ${PATCH_VER} ]] && \
+ PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-patches-${PATCH_VER}.tar.lzma"
+
+DESCRIPTION="Kernel based automounter"
+HOMEPAGE="http://www.linux-consulting.com/Amd_AutoFS/autofs.html"
+SRC_URI="
+ mirror://kernel/linux/daemons/${PN}/v5/${P}.tar.xz
+ ${PATCHSET_URI}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc x86"
+IUSE="-dmalloc hesiod ldap +libtirpc mount-locking sasl"
+
+# USE="sasl" adds SASL support to the LDAP module which will not be build. If
+# SASL support should be available, please add "ldap" to the USE flags.
+REQUIRED_USE="sasl? ( ldap )"
+
+# currently, sasl code assumes the presence of kerberosV
+RDEPEND=">=sys-apps/util-linux-2.20
+ dmalloc? ( dev-libs/dmalloc[threads] )
+ hesiod? ( net-dns/hesiod )
+ ldap? ( >=net-nds/openldap-2.0
+ sasl? (
+ dev-libs/cyrus-sasl
+ dev-libs/libxml2
+ virtual/krb5
+ )
+ )
+ libtirpc? ( net-libs/libtirpc )"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/yacc"
+
+CONFIG_CHECK="~AUTOFS4_FS"
+
+src_prepare() {
+ # Upstream's patchset
+ if [[ -n ${PATCH_VER} ]]; then
+ EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}"/patches
+ fi
+
+ sed -i -e "s:/usr/bin/kill:/bin/kill:" samples/autofs.service.in || die #bug #479492
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ # bug #483716
+ tc-export AR
+ # --with-confdir is for bug #361481
+ # --with-mapdir is for bug #385113
+ local myeconfargs=(
+ --with-confdir=/etc/conf.d
+ --with-mapdir=/etc/autofs
+ $(use_with dmalloc)
+ $(use_with ldap openldap)
+ $(use_with libtirpc)
+ $(use_with sasl)
+ $(use_with hesiod)
+ $(use_enable mount-locking)
+ --disable-ext-env
+ --enable-sloppy-mount # bug #453778
+ --enable-force-shutdown
+ --enable-ignore-busy
+ --with-systemd="$(systemd_get_unitdir)" #bug #479492
+ RANLIB="$(type -P $(tc-getRANLIB))" # bug #483716
+ )
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile DONTSTRIP=1
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ if kernel_is -lt 2 6 30; then
+ # kernel patches
+ docinto patches
+ dodoc patches/${PN}4-2.6.??{,.?{,?}}-v5-update-????????.patch
+ fi
+ newinitd "${FILESDIR}"/autofs5.initd autofs
+ insinto etc/autofs
+ newins "${FILESDIR}"/autofs5-auto.master auto.master
+}
+
+pkg_postinst() {
+ if kernel_is -lt 2 6 30; then
+ elog "This version of ${PN} requires a kernel with autofs4 supporting"
+ elog "protocol version 5.00. Patches for kernels older than 2.6.30 have"
+ elog "been installed into"
+ elog "${EROOT}usr/share/doc/${P}/patches."
+ elog "For further instructions how to patch the kernel, please refer to"
+ elog "${EROOT}usr/share/doc/${P}/INSTALL."
+ elog
+ fi
+ elog "If you plan on using autofs for automounting remote NFS mounts,"
+ elog "please check that both portmap (or rpcbind) and rpc.statd/lockd"
+ elog "are running."
+}
diff --git a/net-fs/autofs/autofs-5.1.2.ebuild b/net-fs/autofs/autofs-5.1.2.ebuild
new file mode 100644
index 000000000000..3a398fa77007
--- /dev/null
+++ b/net-fs/autofs/autofs-5.1.2.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+AUTOTOOLS_IN_SOURCE_BUILD=true
+
+inherit autotools-utils linux-info multilib systemd toolchain-funcs
+
+PATCH_VER=
+[[ -n ${PATCH_VER} ]] && \
+ PATCHSET_URI="https://dev.gentoo.org/~jlec/distfiles/${P}-patches-${PATCH_VER}.tar.lzma"
+
+DESCRIPTION="Kernel based automounter"
+HOMEPAGE="http://www.linux-consulting.com/Amd_AutoFS/autofs.html"
+SRC_URI="
+ mirror://kernel/linux/daemons/${PN}/v5/${P}.tar.xz
+ ${PATCHSET_URI}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86"
+IUSE="-dmalloc hesiod ldap libtirpc mount-locking sasl"
+
+# USE="sasl" adds SASL support to the LDAP module which will not be build. If
+# SASL support should be available, please add "ldap" to the USE flags.
+REQUIRED_USE="sasl? ( ldap )"
+
+# currently, sasl code assumes the presence of kerberosV
+RDEPEND=">=sys-apps/util-linux-2.20
+ dmalloc? ( dev-libs/dmalloc[threads] )
+ hesiod? ( net-dns/hesiod )
+ ldap? ( >=net-nds/openldap-2.0
+ sasl? (
+ dev-libs/cyrus-sasl
+ dev-libs/libxml2
+ virtual/krb5
+ )
+ )
+ libtirpc? ( net-libs/libtirpc )"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/yacc"
+
+CONFIG_CHECK="~AUTOFS4_FS"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-libtirpc-as-need.patch
+)
+
+src_prepare() {
+ # Upstream's patchset
+ if [[ -n ${PATCH_VER} ]]; then
+ EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}"/patches
+ fi
+
+ sed -i -e "s:/usr/bin/kill:/bin/kill:" samples/autofs.service.in || die #bug #479492
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ # bug #483716
+ tc-export AR
+ # --with-confdir is for bug #361481
+ # --with-mapdir is for bug #385113
+ local myeconfargs=(
+ --with-confdir=/etc/conf.d
+ --with-mapdir=/etc/autofs
+ $(use_with dmalloc)
+ $(use_with ldap openldap)
+ $(use_with libtirpc)
+ $(use_with sasl)
+ $(use_with hesiod)
+ $(use_enable mount-locking)
+ --disable-ext-env
+ --enable-sloppy-mount # bug #453778
+ --enable-force-shutdown
+ --enable-ignore-busy
+ --with-systemd="$(systemd_get_unitdir)" #bug #479492
+ RANLIB="$(type -P $(tc-getRANLIB))" # bug #483716
+ )
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile DONTSTRIP=1
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ if kernel_is -lt 2 6 30; then
+ # kernel patches
+ docinto patches
+ dodoc patches/${PN}4-2.6.??{,.?{,?}}-v5-update-????????.patch
+ fi
+ newinitd "${FILESDIR}"/autofs5.initd autofs
+ insinto etc/autofs
+ newins "${FILESDIR}"/autofs5-auto.master auto.master
+}
+
+pkg_postinst() {
+ if kernel_is -lt 2 6 30; then
+ elog "This version of ${PN} requires a kernel with autofs4 supporting"
+ elog "protocol version 5.00. Patches for kernels older than 2.6.30 have"
+ elog "been installed into"
+ elog "${EROOT}usr/share/doc/${P}/patches."
+ elog "For further instructions how to patch the kernel, please refer to"
+ elog "${EROOT}usr/share/doc/${P}/INSTALL."
+ elog
+ fi
+ elog "If you plan on using autofs for automounting remote NFS mounts,"
+ elog "please check that both portmap (or rpcbind) and rpc.statd/lockd"
+ elog "are running."
+}
diff --git a/net-fs/autofs/autofs-5.1.3.ebuild b/net-fs/autofs/autofs-5.1.3.ebuild
new file mode 100644
index 000000000000..861d5ec5231a
--- /dev/null
+++ b/net-fs/autofs/autofs-5.1.3.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+AUTOTOOLS_IN_SOURCE_BUILD=true
+
+inherit autotools-utils linux-info multilib systemd toolchain-funcs
+
+PATCH_VER=
+[[ -n ${PATCH_VER} ]] && \
+ PATCHSET_URI="https://dev.gentoo.org/~jlec/distfiles/${P}-patches-${PATCH_VER}.tar.lzma"
+
+DESCRIPTION="Kernel based automounter"
+HOMEPAGE="http://www.linux-consulting.com/Amd_AutoFS/autofs.html"
+SRC_URI="
+ mirror://kernel/linux/daemons/${PN}/v5/${P}.tar.xz
+ ${PATCHSET_URI}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="-dmalloc hesiod ldap libtirpc mount-locking sasl"
+
+# USE="sasl" adds SASL support to the LDAP module which will not be build. If
+# SASL support should be available, please add "ldap" to the USE flags.
+REQUIRED_USE="sasl? ( ldap )"
+
+# currently, sasl code assumes the presence of kerberosV
+RDEPEND=">=sys-apps/util-linux-2.20
+ dmalloc? ( dev-libs/dmalloc[threads] )
+ hesiod? ( net-dns/hesiod )
+ ldap? ( >=net-nds/openldap-2.0
+ sasl? (
+ dev-libs/cyrus-sasl
+ dev-libs/libxml2
+ virtual/krb5
+ )
+ )
+ libtirpc? ( net-libs/libtirpc )
+ !libtirpc? ( sys-libs/glibc[rpc(-)] )
+"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/yacc"
+
+CONFIG_CHECK="~AUTOFS4_FS"
+
+src_prepare() {
+ # Upstream's patchset
+ if [[ -n ${PATCH_VER} ]]; then
+ EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}"/patches
+ fi
+
+ sed -i -e "s:/usr/bin/kill:/bin/kill:" samples/autofs.service.in || die #bug #479492
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ # bug #483716
+ tc-export AR
+ # --with-confdir is for bug #361481
+ # --with-mapdir is for bug #385113
+ local myeconfargs=(
+ --with-confdir=/etc/conf.d
+ --with-mapdir=/etc/autofs
+ $(use_with dmalloc)
+ $(use_with ldap openldap)
+ $(use_with libtirpc)
+ $(use_with sasl)
+ $(use_with hesiod)
+ $(use_enable mount-locking)
+ --disable-ext-env
+ --enable-sloppy-mount # bug #453778
+ --enable-force-shutdown
+ --enable-ignore-busy
+ --with-systemd="$(systemd_get_unitdir)" #bug #479492
+ RANLIB="$(type -P $(tc-getRANLIB))" # bug #483716
+ )
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile DONTSTRIP=1
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ if kernel_is -lt 2 6 30; then
+ # kernel patches
+ docinto patches
+ dodoc patches/${PN}4-2.6.??{,.?{,?}}-v5-update-????????.patch
+ fi
+ newinitd "${FILESDIR}"/autofs5.initd autofs
+ insinto etc/autofs
+ newins "${FILESDIR}"/autofs5-auto.master auto.master
+}
+
+pkg_postinst() {
+ if kernel_is -lt 2 6 30; then
+ elog "This version of ${PN} requires a kernel with autofs4 supporting"
+ elog "protocol version 5.00. Patches for kernels older than 2.6.30 have"
+ elog "been installed into"
+ elog "${EROOT}usr/share/doc/${P}/patches."
+ elog "For further instructions how to patch the kernel, please refer to"
+ elog "${EROOT}usr/share/doc/${P}/INSTALL."
+ elog
+ fi
+ elog "If you plan on using autofs for automounting remote NFS mounts,"
+ elog "please check that both portmap (or rpcbind) and rpc.statd/lockd"
+ elog "are running."
+}
diff --git a/net-fs/autofs/files/autofs-5.0.3-heimdal.patch b/net-fs/autofs/files/autofs-5.0.3-heimdal.patch
new file mode 100644
index 000000000000..707364df2f97
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.3-heimdal.patch
@@ -0,0 +1,35 @@
+--- autofs-5.0.3.orig/modules/cyrus-sasl.c 2008-04-28 16:17:03.000000000 +0200
++++ autofs-5.0.3/modules/cyrus-sasl.c 2008-04-28 16:41:58.000000000 +0200
+@@ -66,6 +66,15 @@
+ #endif
+ #endif
+
++/**
++ * The type of a principal is different for MIT Krb5 and Heimdal.
++ * These macros are provided by Heimdal, and introduced here for MIT.
++ */
++#ifndef krb5_realm_length
++#define krb5_realm_length(r) ((r).length)
++#define krb5_realm_data(r) ((r).data)
++#endif
++
+ /*
+ * Once a krb5 credentials cache is setup, we need to set the KRB5CCNAME
+ * environment variable so that the library knows where to find it.
+@@ -452,11 +461,11 @@
+
+ /* setup a principal for the ticket granting service */
+ ret = krb5_build_principal_ext(ctxt->krb5ctxt, &tgs_princ,
+- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->length,
+- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->data,
++ krb5_realm_length(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
++ krb5_realm_data(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
+ strlen(KRB5_TGS_NAME), KRB5_TGS_NAME,
+- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->length,
+- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->data,
++ krb5_realm_length(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
++ krb5_realm_data(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
+ 0);
+ if (ret) {
+ error(logopt,
+
diff --git a/net-fs/autofs/files/autofs-5.0.5-fix-install-deadlink.patch b/net-fs/autofs/files/autofs-5.0.5-fix-install-deadlink.patch
new file mode 100644
index 000000000000..8ab10fcf7471
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.5-fix-install-deadlink.patch
@@ -0,0 +1,12 @@
+--- modules/Makefile.old 2010-06-19 20:43:45.373371321 +0200
++++ modules/Makefile 2010-06-19 20:45:26.062417092 +0200
+@@ -63,7 +63,9 @@ install: all
+ -rm -f $(INSTALLROOT)$(autofslibdir)/mount_smbfs.so
+ ln -fs lookup_file.so $(INSTALLROOT)$(autofslibdir)/lookup_files.so
+ ln -fs lookup_yp.so $(INSTALLROOT)$(autofslibdir)/lookup_nis.so
++ifeq ($(SASL), 1)
+ ln -fs lookup_ldap.so $(INSTALLROOT)$(autofslibdir)/lookup_ldaps.so
++endif
+ ln -fs mount_nfs.so $(INSTALLROOT)$(autofslibdir)/mount_nfs4.so
+ ifeq ($(EXT2FS), 1)
+ ifeq ($(EXT3FS), 1)
diff --git a/net-fs/autofs/files/autofs-5.0.6-revert-ldap.patch b/net-fs/autofs/files/autofs-5.0.6-revert-ldap.patch
new file mode 100644
index 000000000000..49901ddfc69b
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.6-revert-ldap.patch
@@ -0,0 +1,18 @@
+--- modules/lookup_ldap.c
++++ modules/lookup_ldap.c
+@@ -1488,6 +1488,7 @@ int lookup_init(const char *mapfmt, int
+ }
+ }
+
++#ifdef WITH_SASL
+ /*
+ * First, check to see if a preferred authentication method was
+ * specified by the user. parse_ldap_config will return error
+@@ -1500,7 +1501,6 @@ int lookup_init(const char *mapfmt, int
+ return 1;
+ }
+
+-#ifdef WITH_SASL
+ /* Init the sasl callbacks */
+ if (!autofs_sasl_client_init(LOGOPT_NONE)) {
+ error(LOGOPT_ANY, "failed to init sasl client");
diff --git a/net-fs/autofs/files/autofs-5.0.7-add-missing-endif-HAVE_SASL-in-modules-lookup_ldap.c.patch b/net-fs/autofs/files/autofs-5.0.7-add-missing-endif-HAVE_SASL-in-modules-lookup_ldap.c.patch
new file mode 100644
index 000000000000..366b1eaaba3b
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.7-add-missing-endif-HAVE_SASL-in-modules-lookup_ldap.c.patch
@@ -0,0 +1,45 @@
+--- ./modules/lookup_ldap.c
++++ ./modules/lookup_ldap.c
+@@ -591,10 +591,12 @@ static LDAP *do_connect(unsigned logopt, const char *uri, struct lookup_context
+ {
+ LDAP *ldap;
+
++#ifdef HAVE_SASL
+ if (ctxt->extern_cert && ctxt->extern_key) {
+ set_env(logopt, ENV_LDAPTLS_CERT, ctxt->extern_cert);
+ set_env(logopt, ENV_LDAPTLS_KEY, ctxt->extern_key);
+ }
++#endif
+
+ ldap = init_ldap_connection(logopt, uri, ctxt);
+ if (ldap) {
+@@ -1372,10 +1374,12 @@ static void free_context(struct lookup_context *ctxt)
+ defaults_free_searchdns(ctxt->sdns);
+ if (ctxt->dclist)
+ free_dclist(ctxt->dclist);
++#ifdef HAVE_SASL
+ if (ctxt->extern_cert)
+ free(ctxt->extern_cert);
+ if (ctxt->extern_key)
+ free(ctxt->extern_key);
++#endif
+ free(ctxt);
+
+ return;
+ modules/lookup_ldap.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c
+index dbec753..ce1e2e5 100644
+--- a/modules/lookup_ldap.c
++++ b/modules/lookup_ldap.c
+@@ -28,7 +28,9 @@
+ #include <arpa/nameser.h>
+ #include <resolv.h>
+ #include <lber.h>
++#ifdef HAVE_SASL
+ #include <libxml/tree.h>
++#endif
+
+ #define MODULE_LOOKUP
+ #include "automount.h"
diff --git a/net-fs/autofs/files/autofs-5.0.7-libtirpc-link.patch b/net-fs/autofs/files/autofs-5.0.7-libtirpc-link.patch
new file mode 100644
index 000000000000..92143f1d3066
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.7-libtirpc-link.patch
@@ -0,0 +1,10 @@
+diff --git a/modules/Makefile b/modules/Makefile
+index 4ecbd6a..6a17540 100644
+--- a/modules/Makefile
++++ b/modules/Makefile
+@@ -114,4 +114,4 @@ lookup_ldap.so: lookup_ldap.c dclist.o base64.o $(SASL_OBJ)
+
+ mount_nfs.so: mount_nfs.c replicated.o
+ $(CC) $(LDFLAGS) $(SOLDFLAGS) $(CFLAGS) -o mount_nfs.so \
+- mount_nfs.c replicated.o $(AUTOFS_LIB) $(LIBNSL)
++ mount_nfs.c replicated.o $(AUTOFS_LIB) $(LIBNSL) $(TIRPCLIB)
diff --git a/net-fs/autofs/files/autofs-5.0.7-parallel-make.patch b/net-fs/autofs/files/autofs-5.0.7-parallel-make.patch
new file mode 100644
index 000000000000..f510f8fa2015
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.7-parallel-make.patch
@@ -0,0 +1,48 @@
+From ed85b855e1bcdb814b3dca7f6c768b86e6353fe7 Mon Sep 17 00:00:00 2001
+From: "Lan Yixun (dlan)" <dennis.yxun@gmail.com>
+Date: Thu, 25 Jul 2013 10:04:23 +0800
+Subject: [PATCH] fix occasional build error when enable parallel compiling
+
+the problem here we pass "-jX" ( X> 1) to "make", and "rpc_subs.c"
+occasionally fail to compile due to it can't find "mount.h",
+the root cause it that "mount.h" haven't generated by that time,
+add this patch should fix this problem.
+to make rpc_subs.o explicitly depend on "mount.h".
+
+---
+error message:
+
+x86_64-pc-linux-gnu-gcc -O2 -pipe -march=core2 -D_REENTRANT
+-D_FILE_OFFSET_BITS=64 -I/usr/include/tirp c -D_REENTRANT
+-D_FILE_OFFSET_BITS=64 -I/usr/include/tirpc -I../include -fPIC
+-D_GNU_SOURCE -DAUTOFS_MA P_DIR=\"/etc/autofs\"
+-DAUTOFS_CONF_DIR=\"/etc/conf.d\" -c rpc_subs.c
+rpc_subs.c:46:19: fatal error: mount.h: No such file or directory
+ #include "mount.h"
+ ^
+compilation terminated.
+make[1]: *** [rpc_subs.o] Error 1
+make[1]: *** Waiting for unfinished
+jobs....
+
+Signed-off-by: Lan Yixun (dlan) <dennis.yxun@gmail.com>
+---
+ lib/Makefile | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/lib/Makefile b/lib/Makefile
+index 5418009..314779b 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -70,6 +70,8 @@ nss_tok.o: nss_tok.c nss_parse.tab.h
+
+ nss_parse.tab.o: nss_parse.tab.c nss_parse.tab.h
+
++rpc_subs.o: mount.h
++
+ install: all
+
+ clean:
+--
+1.8.3.2
+
diff --git a/net-fs/autofs/files/autofs-5.0.7-respect-user-flags-and-fix-asneeded-r3.patch b/net-fs/autofs/files/autofs-5.0.7-respect-user-flags-and-fix-asneeded-r3.patch
new file mode 100644
index 000000000000..c12d4bbe2b17
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.7-respect-user-flags-and-fix-asneeded-r3.patch
@@ -0,0 +1,144 @@
+--- a/Makefile.conf.in
++++ b/Makefile.conf.in
+@@ -100,3 +100,6 @@ initdir = @initdir@
+
+ # Location of systemd unit files
+ systemddir = @systemddir@
++
++# Use the compiler determined by configure
++CC := @CC@
+--- a/Makefile.rules
++++ b/Makefile.rules
+@@ -16,44 +16,30 @@ INSTALLROOT = $(DESTDIR)
+ AUTOFS_LIB = ../lib/autofs.a
+
+ # Compilers, linkers and flags
+-# The STRIP defined here *must not* remove any dynamic-loading symbols
+-
+ ifdef DMALLOCLIB
+ DEBUG=1
+ endif
+
+ ifdef DEBUG
+ CFLAGS ?= -g -Wall -DDEBUG
+-LDFLAGS = -g
+-STRIP = :
+ else
+-ifdef DONTSTRIP
+ CFLAGS ?= -O2 -g
+-LDFLAGS = -g
+-STRIP = :
+-else
+-CFLAGS ?= -O2 -Wall
+-LDFLAGS = -s
+-STRIP = strip --strip-debug
+-endif
+ endif
++AUTOFS_LDFLAGS = -g
+
+-CC = gcc
+-CXX = g++
+ CXXFLAGS = $(CFLAGS)
+ LD = ld
+ SOLDFLAGS = -shared
+
+ CFLAGS += -D_REENTRANT -D_FILE_OFFSET_BITS=64
+-LDFLAGS += -lpthread
+
+ ifdef TIRPCLIB
+ CFLAGS += -I/usr/include/tirpc
+-LDFLAGS += $(TIRPCLIB)
++AUTOFS_LDFLAGS += $(TIRPCLIB)
+ endif
+
+ ifdef DMALLOCLIB
+-LDFLAGS += $(DMALLOCLIB)
++AUTOFS_LDFLAGS += $(DMALLOCLIB)
+ endif
+
+ ifdef SASL
+@@ -71,5 +57,4 @@ endif
+ $(CC) $(CFLAGS) -S $<
+
+ .c.so:
+- $(CC) $(SOLDFLAGS) $(CFLAGS) -o $*.so $< $(AUTOFS_LIB) $(DMALLOCLIB) $(LIBNSL)
+- $(STRIP) $*.so
++ $(CC) $(LDFLAGS) $(SOLDFLAGS) $(CFLAGS) -o $*.so $< $(AUTOFS_LIB) $(DMALLOCLIB) $(LIBNSL)
+--- a/configure.in
++++ b/configure.in
+@@ -183,7 +183,7 @@ AC_ARG_WITH(hesiod,
+ : Search for Hesiod in normal directory path
+ else
+ : Search for Hesiod in specific directory
+- LDFLAGS="$LDFLAGS -L${withval}/lib"
++ LDFLAGS="$LDFLAGS -Wl,--no-as-needed -L${withval}/lib"
+ LIBHESIOD="-L${withval}/lib"
+ HESIOD_FLAGS="-I${withval}/include"
+ fi
+--- a/daemon/Makefile
++++ b/daemon/Makefile
+@@ -20,7 +20,7 @@ CFLAGS += -DAUTOFS_FIFO_DIR=\"$(autofsfi
+ CFLAGS += -DAUTOFS_FLAG_DIR=\"$(autofsflagdir)\"
+ CFLAGS += -DVERSION_STRING=\"$(version)\"
+ LDFLAGS += -rdynamic
+-LIBS = -ldl
++LIBS += -ldl -lpthread
+
+ ifeq ($(LDAP), 1)
+ CFLAGS += $(XML_FLAGS)
+@@ -30,8 +30,7 @@ endif
+ all: automount
+
+ automount: $(OBJS) $(AUTOFS_LIB)
+- $(CC) $(LDFLAGS) $(DAEMON_LDFLAGS) -o automount $(OBJS) $(AUTOFS_LIB) $(LIBS)
+- $(STRIP) automount
++ $(CC) $(AUTOFS_LDFLAGS) $(DAEMON_LDFLAGS) $(LDFLAGS) -o automount $(OBJS) $(AUTOFS_LIB) $(LIBS)
+
+ clean:
+ rm -f *.o *.s *~ automount
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -41,14 +41,12 @@ mount_clnt.c: mount.h
+
+ mount_clnt.o: mount_clnt.c
+ $(CC) $(CFLAGS) -o mount_clnt.o -c mount_clnt.c
+- $(STRIP) mount_clnt.o
+
+ mount_xdr.c: mount.h
+ $(RPCGEN) -c -o mount_xdr.c mount.x
+
+ mount_xdr.o: mount_xdr.c
+ $(CC) $(CFLAGS) -Wno-unused-variable -o mount_xdr.o -c mount_xdr.c
+- $(STRIP) mount_xdr.o
+
+ master_tok.c: master_tok.l
+ $(LEX) -o$@ -Pmaster_ $?
+--- a/modules/Makefile
++++ b/modules/Makefile
+@@ -87,9 +87,8 @@ endif
+ # Ad hoc compilation rules for modules which need auxilliary libraries
+ #
+ lookup_hesiod.so: lookup_hesiod.c
+- $(CC) $(SOLDFLAGS) $(CFLAGS) $(HESIOD_FLAGS) -o lookup_hesiod.so \
++ $(CC) $(LDFLAGS) $(SOLDFLAGS) $(CFLAGS) $(HESIOD_FLAGS) -o lookup_hesiod.so \
+ lookup_hesiod.c $(AUTOFS_LIB) $(LIBHESIOD) $(LIBRESOLV)
+- $(STRIP) lookup_hesiod.so
+
+ cyrus-sasl.o: cyrus-sasl.c
+ $(CC) $(CFLAGS) $(LDAP_FLAGS) -c $<
+@@ -98,13 +97,10 @@ cyrus-sasl-extern.o: cyrus-sasl-extern.c
+ $(CC) $(CFLAGS) $(LDAP_FLAGS) -c $<
+
+ lookup_ldap.so: lookup_ldap.c dclist.o base64.o $(SASL_OBJ)
+- $(CC) $(SOLDFLAGS) $(CFLAGS) $(LDAP_FLAGS) -o lookup_ldap.so \
++ $(CC) $(LDFLAGS) $(SOLDFLAGS) $(CFLAGS) $(LDAP_FLAGS) -o lookup_ldap.so \
+ lookup_ldap.c dclist.o base64.o $(SASL_OBJ) \
+ $(AUTOFS_LIB) $(LIBLDAP) $(LIBRESOLV)
+- $(STRIP) lookup_ldap.so
+
+ mount_nfs.so: mount_nfs.c replicated.o
+- $(CC) $(SOLDFLAGS) $(CFLAGS) -o mount_nfs.so \
++ $(CC) $(LDFLAGS) $(SOLDFLAGS) $(CFLAGS) -o mount_nfs.so \
+ mount_nfs.c replicated.o $(AUTOFS_LIB) $(LIBNSL)
+- $(STRIP) mount_nfs.so
+-
diff --git a/net-fs/autofs/files/autofs-5.0.7-sasl-def.patch b/net-fs/autofs/files/autofs-5.0.7-sasl-def.patch
new file mode 100644
index 000000000000..a12d3798bdf0
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.7-sasl-def.patch
@@ -0,0 +1,43 @@
+diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c
+index ce1e2e5..35a2106 100644
+--- a/modules/lookup_ldap.c
++++ b/modules/lookup_ldap.c
+@@ -28,9 +28,6 @@
+ #include <arpa/nameser.h>
+ #include <resolv.h>
+ #include <lber.h>
+-#ifdef HAVE_SASL
+-#include <libxml/tree.h>
+-#endif
+
+ #define MODULE_LOOKUP
+ #include "automount.h"
+@@ -38,6 +35,10 @@
+ #include "lookup_ldap.h"
+ #include "base64.h"
+
++#ifdef WITH_SASL
++#include <libxml/tree.h>
++#endif
++
+ #define MAPFMT_DEFAULT "sun"
+
+ #define MODPREFIX "lookup(ldap): "
+@@ -587,7 +588,7 @@ static LDAP *do_connect(unsigned logopt, const char *uri, struct lookup_context
+ {
+ LDAP *ldap;
+
+-#ifdef HAVE_SASL
++#ifdef WITH_SASL
+ if (ctxt->extern_cert && ctxt->extern_key) {
+ set_env(logopt, ENV_LDAPTLS_CERT, ctxt->extern_cert);
+ set_env(logopt, ENV_LDAPTLS_KEY, ctxt->extern_key);
+@@ -1389,7 +1390,7 @@ static void free_context(struct lookup_context *ctxt)
+ defaults_free_searchdns(ctxt->sdns);
+ if (ctxt->dclist)
+ free_dclist(ctxt->dclist);
+-#ifdef HAVE_SASL
++#ifdef WITH_SASL
+ if (ctxt->extern_cert)
+ free(ctxt->extern_cert);
+ if (ctxt->extern_key)
diff --git a/net-fs/autofs/files/autofs-5.0.7-sloppy-mount.patch b/net-fs/autofs/files/autofs-5.0.7-sloppy-mount.patch
new file mode 100644
index 000000000000..86e02bce5558
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.7-sloppy-mount.patch
@@ -0,0 +1,99 @@
+From: Ian Kent <ikent@redhat.com>
+
+Historically autofs added an option to mounts, called the sloppy
+option, meant to allow mount(8) to ignore invalid mount options.
+This was done so that mount map entries for sites that needed to
+use different mount options for some machines would still work.
+It was needed for nfs mounts in particular.
+
+Recent changes to mount(8) cause the sloppy option to be passed on
+for all mounts when it is given.
+
+Previously mount(8) only passed on the option to nfs mounts so now,
+for other than nfs mounts, the mount will fail if the file system
+doesn't understand the sloppy option.
+
+Since the option was not passed on to other than nfs mounts before
+it seems sensible for autofs to not add it for other than nfs mounts
+now.
+
+Signed-off-by: Ian Kent <ikent@redhat.com>
+---
+ modules/mount_bind.c | 9 ++++-----
+ modules/mount_changer.c | 6 +++---
+ modules/mount_ext2.c | 6 +++---
+ modules/mount_generic.c | 4 ++--
+ 4 files changed, 12 insertions(+), 13 deletions(-)
+
+--- a/modules/mount_bind.c
++++ b/modules/mount_bind.c
+@@ -158,13 +158,12 @@ int mount_mount(struct autofs_point *ap,
+ if (!status)
+ existed = 0;
+
+- debug(ap->logopt,
+- MODPREFIX
+- "calling mount --bind " SLOPPY " -o %s %s %s",
++ debug(ap->logopt, MODPREFIX
++ "calling mount --bind -o %s %s %s",
+ options, what, fullpath);
+
+- err = spawn_bind_mount(ap->logopt,
+- SLOPPYOPT "-o", options, what, fullpath, NULL);
++ err = spawn_bind_mount(ap->logopt, "-o",
++ options, what, fullpath, NULL);
+
+ if (err) {
+ if (ap->type != LKP_INDIRECT)
+--- a/modules/mount_changer.c
++++ b/modules/mount_changer.c
+@@ -103,12 +103,12 @@ int mount_mount(struct autofs_point *ap,
+ }
+
+ if (options && options[0]) {
+- debug(ap->logopt,
+- MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s",
++ debug(ap->logopt, MODPREFIX
++ "calling mount -t %s -o %s %s %s",
+ fstype, options, what, fullpath);
+
+ err = spawn_mount(ap->logopt, "-t", fstype,
+- SLOPPYOPT "-o", options, what, fullpath, NULL);
++ "-o", options, what, fullpath, NULL);
+ } else {
+ debug(ap->logopt,
+ MODPREFIX "calling mount -t %s %s %s",
+--- a/modules/mount_ext2.c
++++ b/modules/mount_ext2.c
+@@ -116,11 +116,11 @@ int mount_mount(struct autofs_point *ap,
+ }
+
+ if (options) {
+- debug(ap->logopt,
+- MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s",
++ debug(ap->logopt, MODPREFIX
++ "calling mount -t %s -o %s %s %s",
+ fstype, options, what, fullpath);
+ err = spawn_mount(ap->logopt, "-t", fstype,
+- SLOPPYOPT "-o", options, what, fullpath, NULL);
++ "-o", options, what, fullpath, NULL);
+ } else {
+ debug(ap->logopt,
+ MODPREFIX "calling mount -t %s %s %s",
+--- a/modules/mount_generic.c
++++ b/modules/mount_generic.c
+@@ -97,11 +97,11 @@ int mount_mount(struct autofs_point *ap,
+
+ if (options && options[0]) {
+ debug(ap->logopt,
+- MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s",
++ MODPREFIX "calling mount -t %s -o %s %s %s",
+ fstype, options, loc, fullpath);
+
+ err = spawn_mount(ap->logopt, "-t", fstype,
+- SLOPPYOPT "-o", options, loc, fullpath, NULL);
++ "-o", options, loc, fullpath, NULL);
+ } else {
+ debug(ap->logopt, MODPREFIX "calling mount -t %s %s %s",
+ fstype, loc, fullpath);
+
diff --git a/net-fs/autofs/files/autofs-5.1.2-libtirpc-as-need.patch b/net-fs/autofs/files/autofs-5.1.2-libtirpc-as-need.patch
new file mode 100644
index 000000000000..f6e176978164
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.1.2-libtirpc-as-need.patch
@@ -0,0 +1,28 @@
+Make configure compatible with -Wl,--as-needed following
+https://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed#Failure_in_..2Fconfigure
+
+2016-07-05 Martin von Gagern
+
+--- autofs-5.1.2.orig/aclocal.m4
++++ autofs-5.1.2/aclocal.m4
+@@ -413,9 +413,9 @@ AC_DEFUN([AF_CHECK_LIBTIRPC],
+ [
+ # save current flags
+ af_check_libtirpc_save_cflags="$CFLAGS"
+-af_check_libtirpc_save_ldflags="$LDFLAGS"
++af_check_libtirpc_save_libs="$LIBS"
+ CFLAGS="$CFLAGS -I/usr/include/tirpc"
+-LDFLAGS="$LDFLAGS -ltirpc"
++LIBS="$LIBS -ltirpc"
+
+ AC_TRY_LINK(
+ [ #include <rpc/rpc.h> ],
+@@ -438,7 +438,7 @@ AC_CHECK_FUNCS([getrpcbyname getservbyna
+
+ # restore flags
+ CFLAGS="$af_check_libtirpc_save_cflags"
+-LDFLAGS="$af_check_libtirpc_save_ldflags"
++LIBS="$af_check_libtirpc_save_libs"
+ ])
+
+ AC_DEFUN([AF_WITH_LIBTIRPC],
diff --git a/net-fs/autofs/files/autofs5-auto.master b/net-fs/autofs/files/autofs5-auto.master
new file mode 100644
index 000000000000..8ad09274584b
--- /dev/null
+++ b/net-fs/autofs/files/autofs5-auto.master
@@ -0,0 +1,23 @@
+# Sample auto.master file
+# This is an automounter map and it has the following format
+# key [ -mount-options-separated-by-comma ] location
+# For details of the format look at autofs(5).
+#
+#/misc /etc/autofs/auto.misc
+#/net /etc/autofs/auto.net
+#
+# NOTE: mounts done from a hosts map will be mounted with the
+# "nosuid" and "nodev" options unless the "suid" and "dev"
+# options are explicitly given.
+#
+#/net -hosts
+#
+# Include central master map if it can be found using
+# nsswitch sources.
+#
+# Note that if there are entries for /net or /misc (as
+# above) in the included master map any keys that are the
+# same will not be seen as the first read key seen takes
+# precedence.
+#
+#+auto.master
diff --git a/net-fs/autofs/files/autofs5.initd b/net-fs/autofs/files/autofs5.initd
new file mode 100644
index 000000000000..119585c995e0
--- /dev/null
+++ b/net-fs/autofs/files/autofs5.initd
@@ -0,0 +1,69 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DAEMON=/usr/sbin/automount
+PIDFILE=/var/run/autofs.pid
+DEVICE=autofs
+
+depend() {
+ need localmount
+ use ypbind nfs slapd portmap net
+}
+
+extra_started_commands="reload"
+
+start() {
+ ebegin "Starting automounter"
+
+ # Ensure autofs support is loaded
+ grep -q autofs /proc/filesystems || modprobe -q autofs4
+ if [ $? -ne 0 ]; then
+ eend 1 "No autofs support available in kernel"
+ return 1
+ fi
+
+ # Check misc device
+ if [ -n "${USE_MISC_DEVICE}" -a "${USE_MISC_DEVICE}" = "yes" ]; then
+ sleep 1
+ if [ -e "/proc/misc" ]; then
+ MINOR=$(awk "/${DEVICE}/ {print \$1}" /proc/misc)
+ if [ -n "${MINOR}" -a ! -c "/dev/${DEVICE}" ]; then
+ mknod -m 0600 "/dev/${DEVICE}" c 10 ${MINOR}
+ if [ $? -ne 0 ]; then
+ eend 1 "Could not create '/dev/${DEVICE}'"
+ return 1
+ fi
+ fi
+ fi
+ if [ -x /sbin/restorecon -a -c "/dev/${DEVICE}" ]; then
+ /sbin/restorecon "/dev/${DEVICE}"
+ if [ $? -ne 0 ]; then
+ eend 1 "Failed to execute '/sbin/restorecon \"/dev/${DEVICE}\"'"
+ return 1
+ fi
+ fi
+ else
+ [ -c "/dev/${DEVICE}" ] && rm -rf "/dev/${DEVICE}"
+ fi
+
+ start-stop-daemon --start --exec ${DAEMON} -- -p ${PIDFILE} ${OPTIONS}
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping automounter"
+ start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE}
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading automounter"
+ if [ ! -r "${PIDFILE}" ]; then
+ eend 1 "automount not running"
+ else
+ kill -s HUP $(cat "${PIDFILE}") 2> /dev/null
+ eend $?
+ fi
+}
diff --git a/net-fs/autofs/metadata.xml b/net-fs/autofs/metadata.xml
new file mode 100644
index 000000000000..9e93cdcfb23a
--- /dev/null
+++ b/net-fs/autofs/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>dlan@gentoo.org</email>
+ <name>Yixun Lan</name>
+ </maintainer>
+ <use>
+ <flag name="dmalloc">Enable debugging with the dmalloc library</flag>
+ <flag name="hesiod">Install hesiod module</flag>
+ <flag name="ldap">Install LDAP module</flag>
+ <flag name="libtirpc">Use TiRPC library instead of SunRPC</flag>
+ <flag name="mount-locking">
+ Enable locking to prevent corruption of /etc/mtab in the presence of
+ concurrent auto-mounting. If enabled, recursive auto-mounting (eg. using
+ autofs to bind or loop mount a filesystem which is itself auto-mounted)
+ is not possible.
+ </flag>
+ <flag name="sasl">Enable SASL support in the LDAP module</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-fs/btfs/Manifest b/net-fs/btfs/Manifest
new file mode 100644
index 000000000000..b85325faa1dc
--- /dev/null
+++ b/net-fs/btfs/Manifest
@@ -0,0 +1,6 @@
+DIST btfs-2.16.tar.gz 24004 SHA256 673013ba648285f380848ae2e2f8a06800f781a0680582c0d550cc0c563cc08b SHA512 c073b24dc1cd595db32f80732156ba904683289106557e3df47fa46328c55ffd7a92153946381bb0a06abe2eef96d6690608712852516ca54164ca058451b517 WHIRLPOOL e9c3d35008239e9e5936b89c2b6bdb14ed84e17b6f837b8947b04097ae05f0e8d0f6479756f687e566516564f2093ec0ed8d35c4248f44026b1576c51f2fef89
+DIST btfs-2.17.tar.gz 24231 SHA256 80a5a3ad48bebf13441d506755b2402ac230dc3f1f648ce12d3855e5cf04e53b SHA512 e4fae52e46581ca382ac4ddd64d80217a9bc0c18cd6317bb4780734c193dcdd9cfed210073b5fd2d8514be2922bb3f0481b13695411e97bb67b7d793f071c3e1 WHIRLPOOL 709a4c8abbee99b10bcdda389e112dbe02a540033e1fff6662004308fedd6dab217b25b7f710a05a23279b90f8a409f96c0d55af709c4f77b74a737b6eea8f7c
+EBUILD btfs-2.16.ebuild 846 SHA256 f562f6da112ae7a534a520ec47f3d63381dd756a3b68fbba582201da9ce0929b SHA512 3b5203d86b04cc3266fd7d04f5e90d701f575c7facf6d1944ca86f0c26d63848210f00242bd40964e9f62ea3a30f5d711770ab5ce78dcdcbbeaff4b0a64b70c3 WHIRLPOOL 94e0d2da6aba31ac92bd2365ae4d5af018b8a866ec92db33f20c693d32dc87fc29152102bd4199421f53a6de6245b54241364ff67779ec679b3d5178238223cc
+EBUILD btfs-2.17.ebuild 848 SHA256 8ed343b387726e1b9727b442d5f6b5de3f824c35b846f331dd78b9a402c59d99 SHA512 da135375634a54afae7862752e8bc724af648bce5efe5802fa6af16a05dd288eb3989f69485acd56055197c6cba80426773bf0f3ee2be1d8fcfe9cf7804950df WHIRLPOOL 5c658de995b618ba71e8e8a697eba8f658dec3abb7ada9b6ba9ffe5f2d7de82d2fbb3c587a819cd3d952d8d9809fb8abcd00db5738a6f2f3b961b0812ad9fdd3
+MISC ChangeLog 613 SHA256 ad5395a85906d4356ef5eed7913a9782e71f497dcaca63fbb285c700c4485374 SHA512 5dc0bd5ea7573d49773008f8502924b61db558ef5579f4fa9da8f3617dcdb3bcb6b64c31eb9c4a5cd744a32ff240458065a476e2fcba95923188d9436f87c8c6 WHIRLPOOL c6d323d8581379f6c79ae1e458e87a652f840c32d0f55cc0def8aff6594c3e3bfca918173697a5d609a64e7460e42dcaf54053b11f9ca2b36a1987f53dea5283
+MISC metadata.xml 322 SHA256 4497281fc1719685773869c092262a62cbb0dd8a2afa4d7403bdb857df91a6a9 SHA512 56969b79f7cbbef67ffb5077fec8f1587dfae94a3af7d575d71a89f56c44f27ea0013a307c0ba6f1546d34ab7f0bc086a7c13e265209982a27fea38dd8f1c8b4 WHIRLPOOL 23c169d244a3ef9923efde6c764712bda8e74bfc63513148a6a125c4c0e678660bebbc7eea70ad8d58b666b87a4f9e0fc2643aa667f40b7bd1e76849ad98ecf8
diff --git a/net-fs/btfs/btfs-2.16.ebuild b/net-fs/btfs/btfs-2.16.ebuild
new file mode 100644
index 000000000000..62a37b110eb3
--- /dev/null
+++ b/net-fs/btfs/btfs-2.16.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit autotools python-r1
+
+DESCRIPTION="a bittorrent filesystem based on FUSE"
+HOMEPAGE="https://github.com/johang/btfs"
+SRC_URI="https://github.com/johang/btfs/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+CDEPEND=">=sys-fs/fuse-2.8.0
+ >=net-misc/curl-7.22.0
+ dev-libs/boost:=
+ >=net-libs/libtorrent-rasterbar-0.16.0:="
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ ${PYTHON_DEPS}"
+
+src_prepare() {
+ default
+
+ # don't install btplay via make
+ sed -i '/^SUBDIRS =/s/scripts//' Makefile.am || die
+
+ eautoreconf
+}
+
+src_install() {
+ default
+ python_foreach_impl python_doscript scripts/btplay
+}
diff --git a/net-fs/btfs/btfs-2.17.ebuild b/net-fs/btfs/btfs-2.17.ebuild
new file mode 100644
index 000000000000..00453fa98b64
--- /dev/null
+++ b/net-fs/btfs/btfs-2.17.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit autotools python-r1
+
+DESCRIPTION="a bittorrent filesystem based on FUSE"
+HOMEPAGE="https://github.com/johang/btfs"
+SRC_URI="https://github.com/johang/btfs/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+CDEPEND=">=sys-fs/fuse-2.8.0:0
+ >=net-misc/curl-7.22.0
+ dev-libs/boost:=
+ >=net-libs/libtorrent-rasterbar-0.16.0:="
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ ${PYTHON_DEPS}"
+
+src_prepare() {
+ default
+
+ # don't install btplay via make
+ sed -i '/^SUBDIRS =/s/scripts//' Makefile.am || die
+
+ eautoreconf
+}
+
+src_install() {
+ default
+ python_foreach_impl python_doscript scripts/btplay
+}
diff --git a/net-fs/btfs/metadata.xml b/net-fs/btfs/metadata.xml
new file mode 100644
index 000000000000..21630ede97af
--- /dev/null
+++ b/net-fs/btfs/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">johang/btfs</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-fs/cifs-utils/Manifest b/net-fs/cifs-utils/Manifest
new file mode 100644
index 000000000000..4c83c12017ef
--- /dev/null
+++ b/net-fs/cifs-utils/Manifest
@@ -0,0 +1,11 @@
+AUX cifs-utils-6.7-heimdal.patch 904 SHA256 f56e35987f344f9d88f89ddf9249d8183dffa9c9dc8ec18b02df0ab3a277d00e SHA512 e3364e05fba6aff57ea2f09b530692f4f5ec95213e91794388fff9382d210db9bacb28dae1440d3b35a570c0b3bc21084a067e0ce8333febd5246c52aa9260ae WHIRLPOOL 9026572acdd282aaa9969ff6413a4441b597e42bc6025d9e451222eca54e971139ecf0c552e977cd26833340b12bd069aebadf46a8c8daa28a5da709f3204c6e
+AUX cifs-utils-6.7-talloc.patch 857 SHA256 ec979ead2ee53a0ee1244387ccba525d4a6118dca341ee2362b674e734c66d83 SHA512 c1e64736ec7735213a66b9c2514667244e5dd78531c899b7e10ff93acfed8395ad970b9b2dac929d7894feff3cfc0f46c6693df244557dbb9d2f2f8939ccc8f5 WHIRLPOOL a9c3a7b01eeedcda7496458b96f6999432471c9df8ba7fa9c2c1b0305d80f9eb5c5860d73d686a1ed131fc99518eae223f8c433735cc4fb6c2887c7ee6bf10f1
+DIST cifs-utils-6.4.tar.bz2 392809 SHA256 38fc63926af435dae4ebcf4406275580a692d9fb9ee3e32170317cf2ba68e6e3 SHA512 05860ceed1e83b4f4da689d2fc1c1b48fddc0ca53ba52fc6cf26a277d6a884f5780060725c5df1401a665ac35ec5a170262ee62f61095e4a8d76348888182614 WHIRLPOOL 335262eb329860318750fcd081dc2c082f36c75a32e5e596a45b51e73b08be7ee66133c2e4e2bc3089631d3909018abd9c2f36f79d82cd9ea7f6fe2530900f72
+DIST cifs-utils-6.6.tar.bz2 401831 SHA256 d07152a807de6840566bbcc69a97ff6fa17fca4e09ceb4641d74882a83e67125 SHA512 0059c85a9faeff4bba052a9bfc672baa658a923e03304dfb0c51f427079afc6effb2f83d7d09cdcacb2c8a30cdfccd3946957b1616790f5ad3ae2300f161458f WHIRLPOOL 340b8ac0bcc42d83e757a1fd747444afb36d1b252b36ca77896d02e384c9c016a45f7cd5d1fa40a1f90163f652a4fc43c90818cb56c33b263f4d2a9b49cc62c7
+DIST cifs-utils-6.7.tar.bz2 363647 SHA256 b2f21612474ab012e75accd167aab607a0614ff67efb56ea0f36789fa785cfab SHA512 ee050a0eb4a72fbc8d773e86fbe6839ea2bf11cda5ebd071c8ead66e31b46d50ea4e1d1b26478373be53227cd60b32a90b65b5cb989b5a8237cddfc65bad8e5e WHIRLPOOL 4fe0f0d73f69001e97e25b665134a76cdfb4779006a192188e066d8c63cb82ef487ac5a5e3f0722f54c2843032391411c2863497e420c83521d6bad08db18d47
+EBUILD cifs-utils-6.4.ebuild 2967 SHA256 0635bd2685a4b82e72a202102d2908190179b4c7fb2906d8fd11ce0133a5aaa6 SHA512 c8513c805d82cc91c057b1afae6ee8a858af7dcdd2510ed0c43515f3f8cbbeed2cd64488032999aa73bea89bd64addad7c5a9e2eb31a56ada023f4e59cbc458a WHIRLPOOL a840b0527ad6fdeb69d1ef288b6c84eadd84acd032a13a9f4d32f66df6ddccfd0c49c0c05b53bdf625b694b74451cda0a2fe02a8d770cf95074694d70b3a7198
+EBUILD cifs-utils-6.6-r2.ebuild 3089 SHA256 0e3794b22d3ee7f83a22463a93e22e719499994a13ed3686f4494b860fca7816 SHA512 2e39d65abf4546c0cbe60a6c1a14d505c7917eca4d2f6ed294f2e4300cb2b19a0990907f305ab8bf985b0937d14d06354a7e3c962470a5a21ee567a4d3e03608 WHIRLPOOL b254f0d6cca72a246da6e24f01c35f3fd12cd55439505eb1d19127ebc61762b07297b2e749529e2db8f40c1c9f9211b16ee247a92a5a9f080cea70f306c995bc
+EBUILD cifs-utils-6.7.ebuild 3245 SHA256 63acfc62263e42625965a5dc54f3d8337f115ebc318ab6e62b03211336f858b4 SHA512 16582ec8c9eb9fe48d1cead83a2e9a5c86bd54bf1ce45b80e913b10c24b2918bd37aa4dc4a2417355a54061a0543ccbf40b3f8a506e1561011b0f6a8d14759a9 WHIRLPOOL 94ee21198f1462f92bdf8c228eb0cbd5e0e7d1b8440f6b6a6a775b5d544b4ca2cc8d40cf0839a0ca3a37d4eb939ba8fa1ab3cee54d9f8fdafa2daeff8c8e631c
+MISC ChangeLog 6821 SHA256 07eed26f77562d41a3778f699eecbc16777e6a3ee692bd5a2e5fa2ac6613a79b SHA512 238bd10608deb895bf7a06ea1e1c706b01b33a2e555ca63b35f82bbab8338b1f23bc92e6ae8bb0bd7c6c39f68d3cd32878edd41969a58b929fffd4685e6a17a4 WHIRLPOOL 032de7e4b13f6f44df44155e4b6e68f76c7acdf1048f3fab521884034e96550216cab09e541b4a2b5016fa386319e59e717c5cabc54cc7ebab2fcbe1edec8ace
+MISC ChangeLog-2015 12721 SHA256 8b26bff3df84d27491a9a9aa39459c109a7643ebde9e8a375b5ad4c93e58c4ad SHA512 89a2674b5fdd892ebbf022faca0dace1b2f125d8eb6ea6034266930af391dcc1ce70292a6b374bd6f82d02029a0f7a75ccf705af678302a4ca750c1206d2b2e0 WHIRLPOOL 7e2959c4519617336b808fd5469a6950756d6841b957ef1e4e2c66c99d164c2c6dfd685c652f29be1f085d0061266ac71cca894dfff2862d8e12ad5651c0bce2
+MISC metadata.xml 889 SHA256 89bba935346607875e91cba58f764b546785ddfd0959a1da29332a8413285576 SHA512 979960233f0941ecbfa1cadd79fae28898cf8f8333225483808cd25b84d0395d9a7dbc84a5912c2dedb38269d62b7d7f4a647b5d12e47b7706368b3640d90c66 WHIRLPOOL 6d0c66bb0c9349a25c87b051f91ee70dd489ffa89bc343922cc90f9961c343d56a8c596b08565576530a297a5f36e1cc65f8500b8af1570e7975ff0176e4db34
diff --git a/net-fs/cifs-utils/cifs-utils-6.4.ebuild b/net-fs/cifs-utils/cifs-utils-6.4.ebuild
new file mode 100644
index 000000000000..6789aead638c
--- /dev/null
+++ b/net-fs/cifs-utils/cifs-utils-6.4.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils linux-info multilib
+
+DESCRIPTION="Tools for Managing Linux CIFS Client Filesystems"
+HOMEPAGE="http://wiki.samba.org/index.php/LinuxCIFS_utils"
+SRC_URI="ftp://ftp.samba.org/pub/linux-cifs/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~arm-linux ~x86-linux"
+IUSE="+acl +ads +caps +caps-ng creds"
+
+DEPEND="!net-fs/mount-cifs
+ !<net-fs/samba-3.6_rc1
+ ads? (
+ sys-apps/keyutils
+ sys-libs/talloc
+ virtual/krb5
+ )
+ caps? ( !caps-ng? ( sys-libs/libcap ) )
+ caps? ( caps-ng? ( sys-libs/libcap-ng ) )
+ creds? ( sys-apps/keyutils )"
+PDEPEND="${DEPEND}
+ acl? ( || (
+ =net-fs/samba-3.6*[winbind]
+ >=net-fs/samba-4.0.0_alpha1
+ ) )
+"
+
+REQUIRED_USE="acl? ( ads )"
+
+DOCS="doc/linux-cifs-client-guide.odt"
+
+pkg_setup() {
+ linux-info_pkg_setup
+
+ if ! linux_config_exists || ! linux_chkconfig_present CIFS; then
+ ewarn "You must enable CIFS support in your kernel config, "
+ ewarn "to be able to mount samba shares. You can find it at"
+ ewarn
+ ewarn " File systems"
+ ewarn " Network File Systems"
+ ewarn " CIFS support"
+ ewarn
+ ewarn "and recompile your kernel ..."
+ fi
+}
+
+src_configure() {
+ ROOTSBINDIR="${EPREFIX}"/sbin \
+ econf \
+ $(use_enable acl cifsacl cifsidmap) \
+ $(use_enable ads cifsupcall) \
+ $(use caps && use_with !caps-ng libcap || echo --without-libcap) \
+ $(use caps && use_with caps-ng libcap-ng || echo --without-libcap-ng) \
+ $(use_enable creds cifscreds)
+}
+
+src_install() {
+ default
+
+ # remove empty directories
+ find "${ED}" -type d -print0 | xargs --null rmdir \
+ --ignore-fail-on-non-empty &>/dev/null
+
+ if use acl ; then
+ dodir /etc/cifs-utils
+ dosym /usr/$(get_libdir)/cifs-utils/idmapwb.so \
+ /etc/cifs-utils/idmap-plugin
+ dodir /etc/request-key.d
+ echo 'create cifs.idmap * * /usr/sbin/cifs.idmap %k' \
+ > "${ED}/etc/request-key.d/cifs.idmap.conf"
+ fi
+
+ if use ads ; then
+ dodir /etc/request-key.d
+ echo 'create dns_resolver * * /usr/sbin/cifs.upcall %k' \
+ > "${ED}/etc/request-key.d/cifs.upcall.conf"
+ echo 'create cifs.spnego * * /usr/sbin/cifs.upcall %k' \
+ > "${ED}/etc/request-key.d/cifs.spnego.conf"
+ fi
+}
+
+pkg_postinst() {
+ # Inform about set-user-ID bit of mount.cifs
+ ewarn "setuid use flag was dropped due to multiple security implications"
+ ewarn "such as CVE-2009-2948, CVE-2011-3585 and CVE-2012-1586"
+ ewarn "You are free to set setuid flags by yourself"
+
+ # Inform about upcall usage
+ if use acl ; then
+ einfo "The cifs.idmap utility has been enabled by creating the"
+ einfo "configuration file /etc/request-key.d/cifs.idmap.conf"
+ einfo "This enables you to get and set CIFS acls."
+ fi
+
+ if use ads ; then
+ einfo "The cifs.upcall utility has been enabled by creating the"
+ einfo "configuration file /etc/request-key.d/cifs.upcall.conf"
+ einfo "This enables you to mount DFS shares."
+ fi
+}
diff --git a/net-fs/cifs-utils/cifs-utils-6.6-r2.ebuild b/net-fs/cifs-utils/cifs-utils-6.6-r2.ebuild
new file mode 100644
index 000000000000..8076f0fb3049
--- /dev/null
+++ b/net-fs/cifs-utils/cifs-utils-6.6-r2.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils linux-info multilib pam
+
+DESCRIPTION="Tools for Managing Linux CIFS Client Filesystems"
+HOMEPAGE="http://wiki.samba.org/index.php/LinuxCIFS_utils"
+SRC_URI="https://ftp.samba.org/pub/linux-cifs/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~arm-linux ~x86-linux"
+IUSE="+acl +ads +caps +caps-ng creds pam"
+
+RDEPEND="
+ !net-fs/mount-cifs
+ !<net-fs/samba-3.6_rc1
+ sys-apps/keyutils
+ ads? (
+ sys-libs/talloc
+ virtual/krb5
+ )
+ caps? ( !caps-ng? ( sys-libs/libcap ) )
+ caps? ( caps-ng? ( sys-libs/libcap-ng ) )
+ creds? ( sys-apps/keyutils )
+ pam? ( virtual/pam )
+"
+DEPEND="${RDEPEND}"
+PDEPEND="
+ acl? ( || (
+ =net-fs/samba-3.6*[winbind]
+ >=net-fs/samba-4.0.0_alpha1
+ ) )
+"
+
+REQUIRED_USE="acl? ( ads )"
+
+DOCS="doc/linux-cifs-client-guide.odt"
+
+pkg_setup() {
+ linux-info_pkg_setup
+
+ if ! linux_config_exists || ! linux_chkconfig_present CIFS; then
+ ewarn "You must enable CIFS support in your kernel config, "
+ ewarn "to be able to mount samba shares. You can find it at"
+ ewarn
+ ewarn " File systems"
+ ewarn " Network File Systems"
+ ewarn " CIFS support"
+ ewarn
+ ewarn "and recompile your kernel ..."
+ fi
+}
+
+src_configure() {
+ ROOTSBINDIR="${EPREFIX}"/sbin \
+ econf \
+ $(use_enable acl cifsacl cifsidmap) \
+ $(use_enable ads cifsupcall) \
+ $(use caps && use_with !caps-ng libcap || echo --without-libcap) \
+ $(use caps && use_with caps-ng libcap-ng || echo --without-libcap-ng) \
+ $(use_enable creds cifscreds) \
+ $(use_enable pam) \
+ $(use_with pam pamdir $(getpam_mod_dir))
+}
+
+src_install() {
+ default
+
+ # remove empty directories
+ find "${ED}" -type d -print0 | xargs --null rmdir \
+ --ignore-fail-on-non-empty &>/dev/null
+
+ if use acl ; then
+ dodir /etc/cifs-utils
+ dosym /usr/$(get_libdir)/cifs-utils/idmapwb.so \
+ /etc/cifs-utils/idmap-plugin
+ dodir /etc/request-key.d
+ echo 'create cifs.idmap * * /usr/sbin/cifs.idmap %k' \
+ > "${ED}/etc/request-key.d/cifs.idmap.conf"
+ fi
+
+ if use ads ; then
+ dodir /etc/request-key.d
+ echo 'create dns_resolver * * /usr/sbin/cifs.upcall %k' \
+ > "${ED}/etc/request-key.d/cifs.upcall.conf"
+ echo 'create cifs.spnego * * /usr/sbin/cifs.upcall %k' \
+ > "${ED}/etc/request-key.d/cifs.spnego.conf"
+ fi
+}
+
+pkg_postinst() {
+ # Inform about set-user-ID bit of mount.cifs
+ ewarn "setuid use flag was dropped due to multiple security implications"
+ ewarn "such as CVE-2009-2948, CVE-2011-3585 and CVE-2012-1586"
+ ewarn "You are free to set setuid flags by yourself"
+
+ # Inform about upcall usage
+ if use acl ; then
+ einfo "The cifs.idmap utility has been enabled by creating the"
+ einfo "configuration file /etc/request-key.d/cifs.idmap.conf"
+ einfo "This enables you to get and set CIFS acls."
+ fi
+
+ if use ads ; then
+ einfo "The cifs.upcall utility has been enabled by creating the"
+ einfo "configuration file /etc/request-key.d/cifs.upcall.conf"
+ einfo "This enables you to mount DFS shares."
+ fi
+}
diff --git a/net-fs/cifs-utils/cifs-utils-6.7.ebuild b/net-fs/cifs-utils/cifs-utils-6.7.ebuild
new file mode 100644
index 000000000000..b18e773d4607
--- /dev/null
+++ b/net-fs/cifs-utils/cifs-utils-6.7.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils linux-info multilib pam
+
+DESCRIPTION="Tools for Managing Linux CIFS Client Filesystems"
+HOMEPAGE="http://wiki.samba.org/index.php/LinuxCIFS_utils"
+SRC_URI="https://ftp.samba.org/pub/linux-cifs/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~arm-linux ~x86-linux"
+IUSE="+acl +ads +caps +caps-ng creds pam"
+
+RDEPEND="
+ !net-fs/mount-cifs
+ !<net-fs/samba-3.6_rc1
+ sys-apps/keyutils
+ ads? (
+ sys-libs/talloc
+ virtual/krb5
+ )
+ caps? ( !caps-ng? ( sys-libs/libcap ) )
+ caps? ( caps-ng? ( sys-libs/libcap-ng ) )
+ pam? ( virtual/pam )
+"
+DEPEND="${RDEPEND}"
+PDEPEND="
+ acl? ( >=net-fs/samba-4.0.0_alpha1 )
+"
+
+REQUIRED_USE="acl? ( ads )"
+
+DOCS="doc/linux-cifs-client-guide.odt"
+
+PATCHES=(
+ "${FILESDIR}/${P}-talloc.patch"
+)
+
+pkg_setup() {
+ linux-info_pkg_setup
+
+ if ! linux_config_exists || ! linux_chkconfig_present CIFS; then
+ ewarn "You must enable CIFS support in your kernel config, "
+ ewarn "to be able to mount samba shares. You can find it at"
+ ewarn
+ ewarn " File systems"
+ ewarn " Network File Systems"
+ ewarn " CIFS support"
+ ewarn
+ ewarn "and recompile your kernel ..."
+ fi
+}
+
+src_prepare() {
+ default
+
+ if has_version app-crypt/heimdal ; then
+ # https://bugs.gentoo.org/612584
+ eapply "${FILESDIR}/${PN}-6.7-heimdal.patch"
+ fi
+
+ eautoreconf
+}
+
+src_configure() {
+ ROOTSBINDIR="${EPREFIX}"/sbin \
+ econf \
+ $(use_enable acl cifsacl cifsidmap) \
+ $(use_enable ads cifsupcall) \
+ $(use caps && use_with !caps-ng libcap || echo --without-libcap) \
+ $(use caps && use_with caps-ng libcap-ng || echo --without-libcap-ng) \
+ $(use_enable creds cifscreds) \
+ $(use_enable pam) \
+ $(use_with pam pamdir $(getpam_mod_dir))
+}
+
+src_install() {
+ default
+
+ # remove empty directories
+ find "${ED}" -type d -print0 | xargs --null rmdir \
+ --ignore-fail-on-non-empty &>/dev/null
+
+ if use acl ; then
+ dodir /etc/cifs-utils
+ dosym /usr/$(get_libdir)/cifs-utils/idmapwb.so \
+ /etc/cifs-utils/idmap-plugin
+ dodir /etc/request-key.d
+ echo 'create cifs.idmap * * /usr/sbin/cifs.idmap %k' \
+ > "${ED}/etc/request-key.d/cifs.idmap.conf"
+ fi
+
+ if use ads ; then
+ dodir /etc/request-key.d
+ echo 'create dns_resolver * * /usr/sbin/cifs.upcall %k' \
+ > "${ED}/etc/request-key.d/cifs.upcall.conf"
+ echo 'create cifs.spnego * * /usr/sbin/cifs.upcall %k' \
+ > "${ED}/etc/request-key.d/cifs.spnego.conf"
+ fi
+}
+
+pkg_postinst() {
+ # Inform about set-user-ID bit of mount.cifs
+ ewarn "setuid use flag was dropped due to multiple security implications"
+ ewarn "such as CVE-2009-2948, CVE-2011-3585 and CVE-2012-1586"
+ ewarn "You are free to set setuid flags by yourself"
+
+ # Inform about upcall usage
+ if use acl ; then
+ einfo "The cifs.idmap utility has been enabled by creating the"
+ einfo "configuration file /etc/request-key.d/cifs.idmap.conf"
+ einfo "This enables you to get and set CIFS acls."
+ fi
+
+ if use ads ; then
+ einfo "The cifs.upcall utility has been enabled by creating the"
+ einfo "configuration file /etc/request-key.d/cifs.upcall.conf"
+ einfo "This enables you to mount DFS shares."
+ fi
+}
diff --git a/net-fs/cifs-utils/files/cifs-utils-6.7-heimdal.patch b/net-fs/cifs-utils/files/cifs-utils-6.7-heimdal.patch
new file mode 100644
index 000000000000..f8fea48fb4b4
--- /dev/null
+++ b/net-fs/cifs-utils/files/cifs-utils-6.7-heimdal.patch
@@ -0,0 +1,27 @@
+https://bugs.gentoo.org/612584
+
+--- cifs-utils-6.7/cifs.upcall.c
++++ cifs-utils-6.7/cifs.upcall.c
+@@ -75,11 +75,13 @@
+ #define KRB5_KEY_LENGTH(k) ((k)->keyvalue.length)
+ #define KRB5_KEY_DATA(k) ((k)->keyvalue.data)
+ #define KRB5_KEY_DATA_CAST void
++#define KRB5_FREE_STRING(c,k) krb5_xfree(k)
+ #else /* MIT */
+ #define KRB5_KEY_TYPE(k) ((k)->enctype)
+ #define KRB5_KEY_LENGTH(k) ((k)->length)
+ #define KRB5_KEY_DATA(k) ((k)->contents)
+ #define KRB5_KEY_DATA_CAST krb5_octet
++#define KRB5_FREE_STRING(c,k) krb5_free_string(c,k)
+ #endif
+
+ #ifdef HAVE_LIBCAP_NG
+@@ -358,7 +360,7 @@
+ syslog(LOG_DEBUG, "%s: krb5_cc_get_full_name failed: %d\n", __func__, ret);
+ } else {
+ syslog(LOG_DEBUG, "%s: default ccache is %s\n", __func__, cachename);
+- krb5_free_string(context, cachename);
++ KRB5_FREE_STRING(context, cachename);
+ }
+
+ if (!get_tgt_time(cc)) {
diff --git a/net-fs/cifs-utils/files/cifs-utils-6.7-talloc.patch b/net-fs/cifs-utils/files/cifs-utils-6.7-talloc.patch
new file mode 100644
index 000000000000..7e3418631bd4
--- /dev/null
+++ b/net-fs/cifs-utils/files/cifs-utils-6.7-talloc.patch
@@ -0,0 +1,29 @@
+https://bugs.gentoo.org/show_bug.cgi?id=612018
+
+From: Thomas Witt <pyromaniac@exherbo.org>
+Date: Wed, 15 Mar 2017 20:20:44 +0000 (+0000)
+Subject: mount.cifs: Remove data_blob.h include
+X-Git-Url: https://git.samba.org/?p=cifs-utils.git;a=commitdiff_plain;h=272d523a57a4e8791d625a479128613be5e401f5
+
+mount.cifs: Remove data_blob.h include
+
+data_blob.h includes talloc.h from libtalloc, but that is only marked as
+a dependency for cifs.upcall. No symbols from that header are used by
+cifs.mount, so remove it to avoid the libtalloc dependency
+
+Signed-off-by: Thomas Witt <pyromaniac@exherbo.org>
+---
+
+diff --git a/mount.cifs.c b/mount.cifs.c
+index 13b71ef..2612feb 100644
+--- a/mount.cifs.c
++++ b/mount.cifs.c
+@@ -61,7 +61,6 @@
+ #include "mount.h"
+ #include "util.h"
+ #include "resolve_host.h"
+-#include "data_blob.h"
+
+ #ifndef MS_MOVE
+ #define MS_MOVE 8192
+
diff --git a/net-fs/cifs-utils/metadata.xml b/net-fs/cifs-utils/metadata.xml
new file mode 100644
index 000000000000..d5117586f46c
--- /dev/null
+++ b/net-fs/cifs-utils/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>samba@gentoo.org</email>
+ <name>Samba Team</name>
+ </maintainer>
+ <longdescription>The in-kernel CIFS filesystem relies on a set of user-space tools. That package of tools is called cifs-utils. Although not really part of Samba proper, these tools were originally part of the Samba package. For several reasons, shipping these tools as part of Samba was problematic and it was deemed better to split them off into their own package</longdescription>
+ <use>
+ <flag name="ads">Enable Active Directory support and create cifs.idmap binary - idmap support</flag>
+ <flag name="caps">libcap support</flag>
+ <flag name="caps-ng">libcap-ng support</flag>
+ <flag name="creds">cifs credentials support</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-fs/curlftpfs/Manifest b/net-fs/curlftpfs/Manifest
new file mode 100644
index 000000000000..c668602799ca
--- /dev/null
+++ b/net-fs/curlftpfs/Manifest
@@ -0,0 +1,10 @@
+AUX curlftpfs-0.9.2-64bit_filesize.patch 626 SHA256 95d880b3a43387f5ae6e5b3ed9309060bbdc3757fb7631af50edf386c7a6805c SHA512 3b23ee31c5008fffec3032c9ab440a584d672a3936f8fae943af31e5936964e8b5641f5778f56b5c656e9af26156d0a1f31e49ef8c4eb526ec8a83ff7076fcb7 WHIRLPOOL 26be2399dca4464cb1e8e130bd3cc2a765d1cc9cca5901e52c5f91a7ba56950c4350cae70161c01c12c96f9eeeb4922ca2a8836f4659db93b4d3e37c76438d10
+AUX curlftpfs-0.9.2-darwin.patch 517 SHA256 0f4abd06c2e17c1c66379443e06df0211dff25f1def8cfeeb84887bd791234bb SHA512 81e77c00c6b13b2f023ad1230fbd2c48bcf902454207e7b221d507086df1facffd603e1e1ab615b28a3d44d886941a509c0d1246279cceea197286073d6a322d WHIRLPOOL 14b5ed218a08c4cdb55dda4e27f034e2dbac593b5b375d7fe709d5f4424c937d075dbc8b0d03e2decb99bd0242fd66fb220bbc05e5c5b7dc111969c11201063c
+AUX curlftpfs-0.9.2-fix-escaping.patch 15750 SHA256 af8d67fc8f3d704ea39b93cefccbb6cd61910e92bbde00732a67c1ab5eeda9c3 SHA512 9373aabf3748de309196d27fe26367ac0b8625df69a095d5ea67a1033b1c5db19820f3a5e5040e4fbdb38e55b24c620f351a21906fc3ad3d681bb08c7cef1e72 WHIRLPOOL 839e5389c8b156a257414082fc0745be0c9eb74c3f0e3be92d07f9683a2ac73384a373ef05794b53fe74ff60a3efad95da66f47f9cb6c8bcf2222c096d15a1a7
+AUX curlftpfs-0.9.2-memleak-nocache.patch 1810 SHA256 d51e86585061c4dc15145d50d139331d9ae332643332467291e7e7313e3c4e48 SHA512 b53ed1acfea1aa539c0f69ab7dd961a635ded7299500337a7453fa2445e61590ec39a9010ac105d230880b09a90d388b8564295a185e5b44f3398903a6d1d5d4 WHIRLPOOL 8794b31cc4cb6bd75b2f3461d1c82127582d5fb1f78b6621739dfd11eb6e985bc7a0cc69e953a55bfa563411d3cf49305756e7bc479116ccbed3d7cdea1664f1
+AUX curlftpfs-0.9.2-memleak.patch 834 SHA256 b81de7d8eac46a390f1baf4071efde62c77148908562ea9a255acc9fd8d35f97 SHA512 dee0eac27bd09208f44d20d3c0627499da0664601abfb0cb5a3a979c988c71713ef00850f2b72e71c38a9dac09698e55cfbc6249bb1e2196a07a783b0fcd49bc WHIRLPOOL 17e3d417734ca610753c2435e736d3d833183b3346873039bc352d9cb36748f792b34e3c46f1609c1d0d94e30db7d702d17a7544a3edef4766fbfdaf918e9130
+DIST curlftpfs-0.9.2.tar.gz 365503 SHA256 4eb44739c7078ba0edde177bdd266c4cfb7c621075f47f64c85a06b12b3c6958 SHA512 df07c418d175f766c89525017fc56e79726061eee0c3a6607ded0e1bf24f64f1475ba0e546157b65892194e3c4414c120822bf8fb175437e68366f82de216067 WHIRLPOOL c14686eeadafe2f26f9c79fd44ab0d66403e79ec724d5eae28a8b3838ac676755edc1d86583c4de73486fc0dc5d49eabb2b57f7cb477edaccfab33b2aa9f0931
+EBUILD curlftpfs-0.9.2-r3.ebuild 995 SHA256 9e66b6ca6c6521b1c7e8aa5270f86d3ce847f030b7acb67527fd60d9960a7a3b SHA512 bfe01cc652c49b7c96aa18c634375317fc6b5e44fca0e3dc12b6608e7e9457e52e72fbdeaf49a06d1ff90cd4914dd58b13a72073a6e8c8a00da0f812b493a420 WHIRLPOOL 63c65b1166f02c920579eb9d1efde26621677662f477d74059ca617bc8539fe0ed60f1b3e84380a473d0c7b3656843d2ac11612691d96661903fa5f2850e69a5
+MISC ChangeLog 2782 SHA256 b4662960212ecec6344af4f25333ad1759f859cfee1d7d64fdee785dc6064a8c SHA512 2980732cf0d5f8a87901d6bb023e7a79dac385a4d1edf884602bc927a85370ea185132fc7e3632dcafd086f1c6b23ea7222b99da790d396d03d71f5381e75f9c WHIRLPOOL 92b594feb841446ea69d82879c345869074a42dbcc10cdbcf855f7336139de752c78c6dbc604ee4691edf63770907da531592c3f057a1d724ba03251f47d63b5
+MISC ChangeLog-2015 5171 SHA256 1282db4d1c382caa6e08946c972448598be93b70b2cf333aa3ae412a43c86609 SHA512 3af64b7e431266818c7125438f04363eeba90ce9224fbd0c984f19b1e23a99b67fb8e62ae801c4430db3608950e9e547ef3fef2794f318a07f9f5f6d3d154d3b WHIRLPOOL ae40b24eb2f0c824787be33ce43db6bd0088139b5e8d7896f5bc5a9c9f70f44a1922597444321fd1c8d8cf934900b363fb116185ede4526d547980ce6c2f4c86
+MISC metadata.xml 340 SHA256 4b7fce668410f349fc61e83f2efe5bea27488954175e7d6d11170b190c2b0232 SHA512 4e0ec7a3f4ed5e5e1bf875275776d6d610bca1b6fbb8200e208eff80150df4e98bea430a976deef94405fcbf825aa5ba992b40e30175a30ebccc30d53591eba3 WHIRLPOOL 8820d948587a5695837bb877258a1153e999347d55b3c1bfc20dea17c196a03553d92256bb1b15bd538bdc3e84abb3d6a92a146e8029ef860ec16d1f461a115d
diff --git a/net-fs/curlftpfs/curlftpfs-0.9.2-r3.ebuild b/net-fs/curlftpfs/curlftpfs-0.9.2-r3.ebuild
new file mode 100644
index 000000000000..b63fa315a634
--- /dev/null
+++ b/net-fs/curlftpfs/curlftpfs-0.9.2-r3.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils autotools
+
+DESCRIPTION="File system for accessing ftp hosts based on FUSE"
+HOMEPAGE="http://curlftpfs.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm x86 ~amd64-linux ~x86-linux ~x86-macos"
+IUSE=""
+RESTRICT="test" # bug 258460
+
+RDEPEND=">=net-misc/curl-7.17.0
+ >=sys-fs/fuse-2.2
+ >=dev-libs/glib-2.0"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-64bit_filesize.patch
+ epatch "${FILESDIR}"/${PN}-0.9.2-darwin.patch
+ epatch "${FILESDIR}"/${PN}-0.9.2-memleak.patch
+ epatch "${FILESDIR}"/${PN}-0.9.2-memleak-nocache.patch
+ epatch "${FILESDIR}"/${PN}-0.9.2-fix-escaping.patch
+
+ # automake-1.13.1 obsoletes AM_* bit #469818
+ sed -i -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.ac || die
+
+ epatch_user
+
+ eautoreconf
+}
+
+src_install() {
+ default
+ dodoc README
+}
diff --git a/net-fs/curlftpfs/files/curlftpfs-0.9.2-64bit_filesize.patch b/net-fs/curlftpfs/files/curlftpfs-0.9.2-64bit_filesize.patch
new file mode 100644
index 000000000000..38b6f33a2ba5
--- /dev/null
+++ b/net-fs/curlftpfs/files/curlftpfs-0.9.2-64bit_filesize.patch
@@ -0,0 +1,11 @@
+--- ftpfs.c.old 2009-11-28 14:28:05.000000000 +0300
++++ ftpfs.c 2009-11-28 14:28:19.000000000 +0300
+@@ -503,7 +503,7 @@
+
+ curl_easy_setopt_or_die(fh->write_conn, CURLOPT_URL, fh->full_path);
+ curl_easy_setopt_or_die(fh->write_conn, CURLOPT_UPLOAD, 1);
+- curl_easy_setopt_or_die(fh->write_conn, CURLOPT_INFILESIZE, -1);
++ curl_easy_setopt_or_die(fh->write_conn, CURLOPT_INFILESIZE, (curl_off_t)-1);
+ curl_easy_setopt_or_die(fh->write_conn, CURLOPT_READFUNCTION, write_data_bg);
+ curl_easy_setopt_or_die(fh->write_conn, CURLOPT_READDATA, fh);
+ curl_easy_setopt_or_die(fh->write_conn, CURLOPT_LOW_SPEED_LIMIT, 1);
diff --git a/net-fs/curlftpfs/files/curlftpfs-0.9.2-darwin.patch b/net-fs/curlftpfs/files/curlftpfs-0.9.2-darwin.patch
new file mode 100644
index 000000000000..fd0bd1f0cfe5
--- /dev/null
+++ b/net-fs/curlftpfs/files/curlftpfs-0.9.2-darwin.patch
@@ -0,0 +1,17 @@
+https://sourceforge.net/tracker/?func=detail&atid=816359&aid=2799820&group_id=160565
+
+diff -ur configure.ac configure.ac
+--- configure.ac 2008-04-23 15:37:42 +0400
++++ configure.ac 2009-06-02 09:46:05 +0400
+@@ -18,6 +18,11 @@
+ AC_MSG_ERROR(["We need libcurl with support for FTP protocol."])
+ fi
+
++case $host_os in
++ darwin*)
++ CFLAGS="$CFLAGS -D__off_t=off_t"
++ ;;
++esac
+ CFLAGS="$CFLAGS -Wall -W -Wno-sign-compare -D_REENTRANT $GLIB_CFLAGS $FUSE_CFLAGS $LIBCURL_CPPFLAGS"
+ LIBS="$GLIB_LIBS $FUSE_LIBS $LIBCURL"
+
diff --git a/net-fs/curlftpfs/files/curlftpfs-0.9.2-fix-escaping.patch b/net-fs/curlftpfs/files/curlftpfs-0.9.2-fix-escaping.patch
new file mode 100644
index 000000000000..df15bddd562f
--- /dev/null
+++ b/net-fs/curlftpfs/files/curlftpfs-0.9.2-fix-escaping.patch
@@ -0,0 +1,420 @@
+fix handling of special symbols in file operations.
+
+Path fixes at least following cases:
+ - attempt to enter directory named '#'
+ - attempt to open file named '#'
+ - attempt to dereference link named '#'
+ - attempt to chown file / dir named '#'
+
+The fix is basically following mechanical conversion:
+--- curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_URL, something);
++++ something_uri = path_to_uri(something);
++++ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_URL, something_uri);
+=== curl_easy_perform();
++++ free_uri(something_uri);
+
+What is not yet converted is ftp hostname.
+
+Reported-by: Jaakko Perttilä
+Gentoo-bug: http://bugs.gentoo.org/458110
+Based-on-patch: https://github.com/jomat/curlftpfs/commit/da20298fd0d0dcefc7d6d69ffecbc5544e783cfe
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+diff --git a/ftpfs.c b/ftpfs.c
+index ffd0b28..f21a267 100644
+--- a/ftpfs.c
++++ b/ftpfs.c
+@@ -257,6 +257,7 @@ static int ftpfs_getdir(const char* path, fuse_cache_dirh_t h,
+ int err = 0;
+ CURLcode curl_res;
+ char* dir_path = get_fulldir_path(path);
++ char* dir_path_uri = path_to_uri(dir_path);
+
+ DEBUG(1, "ftpfs_getdir: %s\n", dir_path);
+ struct buffer buf;
+@@ -264,7 +265,7 @@ static int ftpfs_getdir(const char* path, fuse_cache_dirh_t h,
+
+ pthread_mutex_lock(&ftpfs.lock);
+ cancel_previous_multi();
+- curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_URL, dir_path);
++ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_URL, dir_path_uri);
+ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_WRITEDATA, &buf);
+ curl_res = curl_easy_perform(ftpfs.connection);
+ pthread_mutex_unlock(&ftpfs.lock);
+@@ -278,6 +279,7 @@ static int ftpfs_getdir(const char* path, fuse_cache_dirh_t h,
+ NULL, NULL, NULL, 0, h, filler);
+ }
+
++ free_uri(dir_path_uri);
+ free(dir_path);
+ buf_free(&buf);
+ return op_return(err, "ftpfs_getdir");
+@@ -287,6 +289,7 @@ static int ftpfs_getattr(const char* path, struct stat* sbuf) {
+ int err;
+ CURLcode curl_res;
+ char* dir_path = get_dir_path(path);
++ char* dir_path_uri = path_to_uri(dir_path);
+
+ DEBUG(2, "ftpfs_getattr: %s dir_path=%s\n", path, dir_path);
+ struct buffer buf;
+@@ -294,7 +297,7 @@ static int ftpfs_getattr(const char* path, struct stat* sbuf) {
+
+ pthread_mutex_lock(&ftpfs.lock);
+ cancel_previous_multi();
+- curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_URL, dir_path);
++ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_URL, dir_path_uri);
+ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_WRITEDATA, &buf);
+ curl_res = curl_easy_perform(ftpfs.connection);
+ pthread_mutex_unlock(&ftpfs.lock);
+@@ -309,6 +312,7 @@ static int ftpfs_getattr(const char* path, struct stat* sbuf) {
+ err = parse_dir((char*)buf.p, dir_path + strlen(ftpfs.host) - 1,
+ name, sbuf, NULL, 0, NULL, NULL);
+
++ free_uri(dir_path_uri);
+ free(dir_path);
+ buf_free(&buf);
+ if (err) return op_return(-ENOENT, "ftpfs_getattr");
+@@ -329,6 +333,7 @@ static size_t ftpfs_read_chunk(const char* full_path, char* rbuf,
+ int running_handles = 0;
+ int err = 0;
+ struct ftpfs_file* fh = get_ftpfs_file(fi);
++ char* full_path_uri = path_to_uri(full_path); /* TODO: optimize bu pushing up conversion to context */
+
+ DEBUG(2, "ftpfs_read_chunk: %s %p %zu %lld %p %p\n",
+ full_path, rbuf, size, offset, fi, fh);
+@@ -355,7 +360,7 @@ static size_t ftpfs_read_chunk(const char* full_path, char* rbuf,
+
+ cancel_previous_multi();
+
+- curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_URL, full_path);
++ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_URL, full_path_uri);
+ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_WRITEDATA, &fh->buf);
+ if (offset) {
+ char range[15];
+@@ -444,6 +449,7 @@ static size_t ftpfs_read_chunk(const char* full_path, char* rbuf,
+
+ pthread_mutex_unlock(&ftpfs.lock);
+
++ free_uri(full_path_uri);
+ if (err) return CURLFTPFS_BAD_READ;
+ return size;
+ }
+@@ -497,11 +503,12 @@ int write_thread_ctr = 0;
+ static void *ftpfs_write_thread(void *data) {
+ struct ftpfs_file *fh = data;
+ char range[15];
+-
++ char* full_path_uri = path_to_uri(fh->full_path); /* TODO: optimize bu pushing up conversion to context */
++
+ DEBUG(2, "enter streaming write thread #%d path=%s pos=%lld\n", ++write_thread_ctr, fh->full_path, fh->pos);
+
+
+- curl_easy_setopt_or_die(fh->write_conn, CURLOPT_URL, fh->full_path);
++ curl_easy_setopt_or_die(fh->write_conn, CURLOPT_URL, full_path_uri);
+ curl_easy_setopt_or_die(fh->write_conn, CURLOPT_UPLOAD, 1);
+ curl_easy_setopt_or_die(fh->write_conn, CURLOPT_INFILESIZE, (curl_off_t)-1);
+ curl_easy_setopt_or_die(fh->write_conn, CURLOPT_READFUNCTION, write_data_bg);
+@@ -541,6 +548,8 @@ static void *ftpfs_write_thread(void *data) {
+
+ sem_post(&fh->data_written); /* ftpfs_write may return */
+
++ free_uri(full_path_uri);
++
+ return NULL;
+ }
+
+@@ -621,16 +630,19 @@ static void free_ftpfs_file(struct ftpfs_file *fh) {
+ }
+
+ static int buffer_file(struct ftpfs_file *fh) {
++ char* full_path_uri = path_to_uri(fh->full_path); /* TODO: optimize bu pushing up conversion to context */
+ // If we want to write to the file, we have to load it all at once,
+ // modify it in memory and then upload it as a whole as most FTP servers
+ // don't support resume for uploads.
+ pthread_mutex_lock(&ftpfs.lock);
+ cancel_previous_multi();
+- curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_URL, fh->full_path);
++ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_URL, full_path_uri);
+ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_WRITEDATA, &fh->buf);
+ CURLcode curl_res = curl_easy_perform(ftpfs.connection);
+ pthread_mutex_unlock(&ftpfs.lock);
+
++ free_uri(full_path_uri);
++
+ if (curl_res != 0) {
+ return -EACCES;
+ }
+@@ -643,10 +655,11 @@ static int create_empty_file(const char * path)
+ int err = 0;
+
+ char *full_path = get_full_path(path);
++ char* full_path_uri = path_to_uri(full_path);
+
+ pthread_mutex_lock(&ftpfs.lock);
+ cancel_previous_multi();
+- curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_URL, full_path);
++ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_URL, full_path_uri);
+ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_INFILESIZE, 0);
+ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_UPLOAD, 1);
+ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_READDATA, NULL);
+@@ -656,7 +669,9 @@ static int create_empty_file(const char * path)
+
+ if (curl_res != 0) {
+ err = -EPERM;
+- }
++ }
++
++ free_uri(full_path_uri);
+ free(full_path);
+ return err;
+ }
+@@ -875,6 +890,7 @@ static int ftpfs_chmod(const char* path, mode_t mode) {
+
+ struct curl_slist* header = NULL;
+ char* full_path = get_dir_path(path);
++ char* full_path_uri = path_to_uri(full_path);
+ char* filename = get_file_name(path);
+ char* cmd = g_strdup_printf("SITE CHMOD %.3o %s", mode_c, filename);
+ struct buffer buf;
+@@ -885,7 +901,7 @@ static int ftpfs_chmod(const char* path, mode_t mode) {
+ pthread_mutex_lock(&ftpfs.lock);
+ cancel_previous_multi();
+ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_POSTQUOTE, header);
+- curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_URL, full_path);
++ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_URL, full_path_uri);
+ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_WRITEDATA, &buf);
+ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_NOBODY, ftpfs.safe_nobody);
+ CURLcode curl_res = curl_easy_perform(ftpfs.connection);
+@@ -896,12 +912,13 @@ static int ftpfs_chmod(const char* path, mode_t mode) {
+ if (curl_res != 0) {
+ err = -EPERM;
+ }
+-
++
+ buf_free(&buf);
+ curl_slist_free_all(header);
++ free_uri(full_path_uri);
+ free(full_path);
+ free(filename);
+- free(cmd);
++ free(cmd);
+ return op_return(err, "ftpfs_chmod");
+ }
+
+@@ -912,6 +929,7 @@ static int ftpfs_chown(const char* path, uid_t uid, gid_t gid) {
+
+ struct curl_slist* header = NULL;
+ char* full_path = get_dir_path(path);
++ char* full_path_uri = path_to_uri(full_path);
+ char* filename = get_file_name(path);
+ char* cmd = g_strdup_printf("SITE CHUID %i %s", uid, filename);
+ char* cmd2 = g_strdup_printf("SITE CHGID %i %s", gid, filename);
+@@ -924,7 +942,7 @@ static int ftpfs_chown(const char* path, uid_t uid, gid_t gid) {
+ pthread_mutex_lock(&ftpfs.lock);
+ cancel_previous_multi();
+ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_POSTQUOTE, header);
+- curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_URL, full_path);
++ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_URL, full_path_uri);
+ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_WRITEDATA, &buf);
+ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_NOBODY, ftpfs.safe_nobody);
+ CURLcode curl_res = curl_easy_perform(ftpfs.connection);
+@@ -938,6 +956,7 @@ static int ftpfs_chown(const char* path, uid_t uid, gid_t gid) {
+
+ buf_free(&buf);
+ curl_slist_free_all(header);
++ free_uri(full_path_uri);
+ free(full_path);
+ free(filename);
+ free(cmd);
+@@ -1001,6 +1020,7 @@ static int ftpfs_rmdir(const char* path) {
+ int err = 0;
+ struct curl_slist* header = NULL;
+ char* full_path = get_dir_path(path);
++ char* full_path_uri = path_to_uri(full_path);
+ char* filename = get_file_name(path);
+ char* cmd = g_strdup_printf("RMD %s", filename);
+ struct buffer buf;
+@@ -1014,7 +1034,7 @@ static int ftpfs_rmdir(const char* path) {
+ pthread_mutex_lock(&ftpfs.lock);
+ cancel_previous_multi();
+ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_POSTQUOTE, header);
+- curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_URL, full_path);
++ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_URL, full_path_uri);
+ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_WRITEDATA, &buf);
+ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_NOBODY, ftpfs.safe_nobody);
+ CURLcode curl_res = curl_easy_perform(ftpfs.connection);
+@@ -1028,6 +1048,7 @@ static int ftpfs_rmdir(const char* path) {
+
+ buf_free(&buf);
+ curl_slist_free_all(header);
++ free_uri(full_path_uri);
+ free(full_path);
+ free(filename);
+ free(cmd);
+@@ -1038,6 +1059,7 @@ static int ftpfs_mkdir(const char* path, mode_t mode) {
+ int err = 0;
+ struct curl_slist* header = NULL;
+ char* full_path = get_dir_path(path);
++ char* full_path_uri = path_to_uri(full_path);
+ char* filename = get_file_name(path);
+ char* cmd = g_strdup_printf("MKD %s", filename);
+ struct buffer buf;
+@@ -1048,7 +1070,7 @@ static int ftpfs_mkdir(const char* path, mode_t mode) {
+ pthread_mutex_lock(&ftpfs.lock);
+ cancel_previous_multi();
+ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_POSTQUOTE, header);
+- curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_URL, full_path);
++ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_URL, full_path_uri);
+ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_WRITEDATA, &buf);
+ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_NOBODY, ftpfs.safe_nobody);
+ CURLcode curl_res = curl_easy_perform(ftpfs.connection);
+@@ -1062,6 +1084,7 @@ static int ftpfs_mkdir(const char* path, mode_t mode) {
+
+ buf_free(&buf);
+ curl_slist_free_all(header);
++ free_uri(full_path_uri);
+ free(full_path);
+ free(filename);
+ free(cmd);
+@@ -1076,6 +1099,7 @@ static int ftpfs_unlink(const char* path) {
+ int err = 0;
+ struct curl_slist* header = NULL;
+ char* full_path = get_dir_path(path);
++ char* full_path_uri = path_to_uri(full_path);
+ char* filename = get_file_name(path);
+ char* cmd = g_strdup_printf("DELE %s", filename);
+ struct buffer buf;
+@@ -1086,7 +1110,7 @@ static int ftpfs_unlink(const char* path) {
+ pthread_mutex_lock(&ftpfs.lock);
+ cancel_previous_multi();
+ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_POSTQUOTE, header);
+- curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_URL, full_path);
++ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_URL, full_path_uri);
+ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_WRITEDATA, &buf);
+ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_NOBODY, ftpfs.safe_nobody);
+ CURLcode curl_res = curl_easy_perform(ftpfs.connection);
+@@ -1100,6 +1124,7 @@ static int ftpfs_unlink(const char* path) {
+
+ buf_free(&buf);
+ curl_slist_free_all(header);
++ free_uri(full_path_uri);
+ free(full_path);
+ free(filename);
+ free(cmd);
+@@ -1301,6 +1326,7 @@ static int ftpfs_readlink(const char *path, char *linkbuf, size_t size) {
+ int err;
+ CURLcode curl_res;
+ char* dir_path = get_dir_path(path);
++ char* dir_path_uri = path_to_uri(dir_path);
+
+ DEBUG(2, "dir_path: %s %s\n", path, dir_path);
+ struct buffer buf;
+@@ -1308,7 +1334,7 @@ static int ftpfs_readlink(const char *path, char *linkbuf, size_t size) {
+
+ pthread_mutex_lock(&ftpfs.lock);
+ cancel_previous_multi();
+- curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_URL, dir_path);
++ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_URL, dir_path_uri);
+ curl_easy_setopt_or_die(ftpfs.connection, CURLOPT_WRITEDATA, &buf);
+ curl_res = curl_easy_perform(ftpfs.connection);
+ pthread_mutex_unlock(&ftpfs.lock);
+@@ -1323,6 +1349,7 @@ static int ftpfs_readlink(const char *path, char *linkbuf, size_t size) {
+ err = parse_dir((char*)buf.p, dir_path + strlen(ftpfs.host) - 1,
+ name, NULL, linkbuf, size, NULL, NULL);
+
++ free_uri(dir_path_uri);
+ free(dir_path);
+ buf_free(&buf);
+ if (err) return op_return(-ENOENT, "ftpfs_readlink");
+diff --git a/path_utils.c b/path_utils.c
+index db3d7e4..214b5e6 100644
+--- a/path_utils.c
++++ b/path_utils.c
+@@ -92,3 +92,72 @@ char* get_dir_path(const char* path) {
+
+ return ret;
+ }
++
++/*
++ * the chars not needed to be escaped:
++ * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
++ */
++static inline int is_unreserved_rfc3986(char c)
++{
++ int is_locase_alpha = (c >= 'a' && c <= 'z');
++ int is_upcase_alpha = (c >= 'a' && c <= 'z');
++ int is_digit = (c >= '0' && c <= '9');
++ int is_special = c == '-'
++ || c == '.'
++ || c == '_'
++ || c == '~';
++ int is_unreserved = is_locase_alpha
++ || is_upcase_alpha
++ || is_digit
++ || is_special;
++
++ return is_unreserved;
++}
++
++static inline int is_unreserved(char c)
++{
++ return is_unreserved_rfc3986(c) || c == '/';
++}
++
++char* path_to_uri(const char* path)
++{
++ static const char hex[] = "0123456789ABCDEF";
++ size_t path_len = strlen(path);
++ size_t host_len = strlen(ftpfs.host);
++ /* at worst: c -> %XX */
++ char * encoded_path = malloc (3 * path_len + 1);
++ const char * s = path;
++ char * d = encoded_path;
++
++ /*
++ * 'path' is always prefixed with 'ftpfs.host'
++ */
++ memcpy (d, ftpfs.host, host_len);
++ s += host_len;
++ d += host_len;
++
++ for (; *s; ++s)
++ {
++ char c = *s;
++ if (is_unreserved (c))
++ {
++ *d++ = c;
++ }
++ else
++ {
++ unsigned int hi = ((unsigned)c >> 4) & 0xF;
++ unsigned int lo = ((unsigned)c >> 0) & 0xF;
++ *d++ = '%';
++ *d++ = hex[hi];
++ *d++ = hex[lo];
++ }
++ }
++ *d = '\0';
++
++ return encoded_path;
++}
++
++void free_uri(char* path)
++{
++ free(path);
++}
+diff --git a/path_utils.h b/path_utils.h
+index 084ae4d..e3e9bca 100644
+--- a/path_utils.h
++++ b/path_utils.h
+@@ -6,4 +6,11 @@ char* get_full_path(const char* path);
+ char* get_fulldir_path(const char* path);
+ char* get_dir_path(const char* path);
+
++/*
++ * Transforms UNIX path to RFC3986 encoded path
++ * (CURLOPT_URL accepts only such paths)
++ */
++char* path_to_uri(const char* path);
++void free_uri(char* path);
++
+ #endif /* __CURLFTPFS_PATH_UTILS_H__ */
diff --git a/net-fs/curlftpfs/files/curlftpfs-0.9.2-memleak-nocache.patch b/net-fs/curlftpfs/files/curlftpfs-0.9.2-memleak-nocache.patch
new file mode 100644
index 000000000000..344233c2b83e
--- /dev/null
+++ b/net-fs/curlftpfs/files/curlftpfs-0.9.2-memleak-nocache.patch
@@ -0,0 +1,60 @@
+Picked-from: http://pkgs.fedoraproject.org/cgit/curlftpfs.git/tree/curlftpfs-0.9.2-memleak-cached%23591299.patch?h=f18
+
+@@ -, +, @@
+---
+ cache.c | 2 1 + 1 - 0 !
+ ftpfs-ls.c | 19 15 + 4 - 0 !
+ 2 files changed, 16 insertions(+), 5 deletions(-)
+--- b/cache.c
++++ b/cache.c
+@@ -25,7 +25,7 @@ struct cache {
+ time_t last_cleaned;
+ };
+
+-static struct cache cache;
++struct cache cache;
+
+ struct node {
+ struct stat stat;
+--- b/ftpfs-ls.c
++++ b/ftpfs-ls.c
+@@ -25,6 +25,13 @@
+ #include "charset_utils.h"
+ #include "ftpfs-ls.h"
+
++struct cache {
++ int on;
++ char incomplete[];
++};
++
++extern struct cache cache;
++
+ static int parse_dir_unix(const char *line,
+ struct stat *sbuf,
+ char *file,
+@@ -243,8 +250,10 @@ int parse_dir(const char* list, const ch
+ reallink = g_strdup(link);
+ }
+ int linksize = strlen(reallink);
+- cache_add_link(full_path, reallink, linksize+1);
+- DEBUG(1, "cache_add_link: %s %s\n", full_path, reallink);
++ if (cache.on) {
++ cache_add_link(full_path, reallink, linksize+1);
++ DEBUG(1, "cache_add_link: %s %s\n", full_path, reallink);
++ }
+ if (linkbuf && linklen) {
+ if (linksize > linklen) linksize = linklen - 1;
+ strncpy(linkbuf, reallink, linksize);
+@@ -257,8 +266,10 @@ int parse_dir(const char* list, const ch
+ DEBUG(1, "filler: %s\n", file);
+ filler(h, file, &stat_buf);
+ } else {
+- DEBUG(1, "cache_add_attr: %s\n", full_path);
+- cache_add_attr(full_path, &stat_buf);
++ if (cache.on) {
++ DEBUG(1, "cache_add_attr: %s\n", full_path);
++ cache_add_attr(full_path, &stat_buf);
++ }
+ }
+
+ DEBUG(2, "comparing %s %s\n", name, file);
diff --git a/net-fs/curlftpfs/files/curlftpfs-0.9.2-memleak.patch b/net-fs/curlftpfs/files/curlftpfs-0.9.2-memleak.patch
new file mode 100644
index 000000000000..27163ac229e0
--- /dev/null
+++ b/net-fs/curlftpfs/files/curlftpfs-0.9.2-memleak.patch
@@ -0,0 +1,24 @@
+Picked-from: https://github.com/jomat/curlftpfs/commit/b8ce5599a17a1f9e00c93cff3a81fe88f51e8bd3
+Upstream-bug: https://sourceforge.net/tracker/?func=detail&aid=2924678&group_id=160565&atid=816357
+
+commit b8ce5599a17a1f9e00c93cff3a81fe88f51e8bd3
+Author: jomat <jomat@copete.de>
+Date: Sun Oct 16 18:41:37 2011 +0000
+
+ added patch agains memory leak
+
+ see also https://sourceforge.net/tracker/?func=detail&aid=2924678&group_id=160565&atid=816357
+
+diff --git a/ftpfs.c b/ftpfs.c
+index 0346354..96146f7 100644
+--- a/ftpfs.c
++++ b/ftpfs.c
+@@ -615,6 +615,8 @@ static void free_ftpfs_file(struct ftpfs_file *fh) {
+ sem_destroy(&fh->data_need);
+ sem_destroy(&fh->data_written);
+ sem_destroy(&fh->ready);
++ if (fh->buf.size) { buf_free(&fh->buf); }
++ if (fh->stream_buf.size) { buf_free(&fh->stream_buf); }
+ free(fh);
+ }
+
diff --git a/net-fs/curlftpfs/metadata.xml b/net-fs/curlftpfs/metadata.xml
new file mode 100644
index 000000000000..d18ff5806215
--- /dev/null
+++ b/net-fs/curlftpfs/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>slyfox@gentoo.org</email>
+ <name>Sergei Trofimovich</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">curlftpfs</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-fs/cvmfs/Manifest b/net-fs/cvmfs/Manifest
new file mode 100644
index 000000000000..393834df59f7
--- /dev/null
+++ b/net-fs/cvmfs/Manifest
@@ -0,0 +1,9 @@
+AUX cvmfs-2.1.20.0_p05-cares-underlink.patch 6951 SHA256 b7997848a5f6b78b8f39ca608d33d7cf426f854c4fedf0d37b0a0ae558d3cb43 SHA512 714d511bbb9feeccb97ad5f6215fe1a9e7c1901494e24e97b0fdf78c86662e802e0d1c1836e02b061fc8641540ca82bedf3af94ab0f321640fa39fbcb80fb386 WHIRLPOOL 4dbab0c057a5439e56a928325f01cd08020bdadfab92ae1d0deb195c4c24feaae4f6b5d900266c64fe73276b65d2259d511f37f5af2d068efa77db849cfcedac
+AUX cvmfs-2.1.20.0_p05-geoip-missing-cmake.patch 5143 SHA256 070ed4e5d873637c9e88c5a90f5a048002f71f55f7fbde40242adcb085160f6f SHA512 0aebcabfef27a04f9ba88253ead2c323f2871434d1c397a26e61981970cc838ae7988337676dd75ac0f3eaf02933664960c57e6671a066f7a91e61e5844a49f5 WHIRLPOOL ba199f8cdbf7a40cb975afd4b90ff9dc0ec6f62abd84a06e313bf9ef10a96eb5a31475b6c5f903875d100bcd5c7370cc35778b0ea65d5eb63a1cc1d9bd42822b
+DIST cvmfs-2.1.20.0-fix05.tar.gz 36877322 SHA256 83d9358bebdd3987472ed602efb7b0d06b586216030e02bc100a363dc7bbfc20 SHA512 95dc6d5e433630aecd45e15d59f831b4b1ccd8a439f799ae078a61bd6fd8e4dc10ae72d760352913c1d4d9e50cd5bc71ddd82b40b8b9b59d371d62aa7e62abf6 WHIRLPOOL a9ab8500ddd31466df26c12fbcaf0403e748fc1d52c9b5eefa495bc1aaa1f1c67e5f679407d55143fe161f7de7be0d52284cb947a63ff0e0a3f63ade879bb21c
+DIST cvmfs-2.3.5.tar.gz 37771779 SHA256 4e35b81f98f8b3c9588081abaedee76bd796da6750ff1fcd6189882a751d397b SHA512 7f2d05776a747c72d0aa8b5270cfb46f7dc31a458deee65a4a21446718ba813e4c449f6424c7419345e6ffb7cefce3d328dea7b414fe5a5980f9b93ccac0157b WHIRLPOOL d3de1deb541ee8c3e439e1fbda151c73d602ec4ceb54b1e94fd50a1c8716b497c23082b60cb887dabbd3602dbc5c6d1bc375544d20201d95d92ea7f0c30d5823
+EBUILD cvmfs-2.1.20.0_p05.ebuild 2610 SHA256 595c27e98f4eea2336e16ce757bfe0e027e0f103a7dd6f5ec288dfe2fd7c54ba SHA512 d2e6a7a98280365ae2016ddedd2d325da89ca51a6afd7ce61e34fcd12bc8c753a3ad4cfdf12b16fb52183ca04b06c250450935e22826900b3a50ac2e4385d6b9 WHIRLPOOL fcf963f1e94f59f28640c7941ff1aaeeef6bc2d8df24880da6915b2b47a01cd921f11176f649608c1392104d540eab6ac723ac402ab11c16c3c3e10c14f8cc45
+EBUILD cvmfs-2.3.5-r1.ebuild 3641 SHA256 700f4dc22f98c4198714506b64e1764735963857fb5e470303e7b8ce21fb0ef9 SHA512 6cd16f0c48e3b1e83ba0a742853bb953ca15d1aa004bd32d2b64fbfb81ffabd4f7ad961fa7fccc2a469b7548346286d67d1f0e485f4b3cb87e82e2643f052f4d WHIRLPOOL 373c15db681502cb1058f7380d8d80d604906eb900340d5f3728975db31f235634559b1bec88d003618419a3a716007826083b433326c5873eba2da59d31e804
+MISC ChangeLog 2909 SHA256 a232f0b663f0a254ccd01964e6fcaeff24df50c2f8996e6f383778f29d0749b7 SHA512 ad224be76f5c98e6792f95178b616a0f229b9d745399803f1610585943c4ffc56543531ebe32b601c21e1d0e2f342b7d3fa511737ac373ab6e6824468854f69a WHIRLPOOL 38be1ce5c28c7266518a39d31490a59fdb9cc0aecd216c46a548ceac97b1a13594bc96a91fc3be30ad84376aa4d08ce4a60fc7a5f3e42c4a0c73706dbe28d187
+MISC ChangeLog-2015 3676 SHA256 5fa54ae523e5005d29b69377e9aad0fb3ad2ab60de3319e09ac4cb0df1aea963 SHA512 38b651b9256be9c6b543e997edfffd7440e7b60c0c0c7a62f43ad2cafceee0f4ee3bd3b7b539f8a0c71e704b96a9d1504821b2c3449310510318608986cce2ed WHIRLPOOL 5a94027b0f5f40ad6f263d1ebc85e35424d97c5a40a865e0cb4203c3c8701fdb5209798ed9147cc2058db4b2df17700dda43f1bc7acc6d046f747f2ae9bff104
+MISC metadata.xml 1320 SHA256 975ba82ea3ede7426b7e46fc2045ccdd37ff40aaa093d48c327f5d1fe3c0e171 SHA512 13a012dcd92e457b7ec53b078c12fdbaef7d8d47c80a6feeffb7566aff93803996e477fb8e4eaad878ef1c84e4d8f37cd87c05cfac116fcbcd342cd4f901b543 WHIRLPOOL cd5571da0fa363dc5498c898cf61484c20b34115cfb2280b43984fca34ddb4037094156fc7f65f42c466dc76e116711b31f8241b9f0cf1cd1d3eecd3b0ede743
diff --git a/net-fs/cvmfs/cvmfs-2.1.20.0_p05.ebuild b/net-fs/cvmfs/cvmfs-2.1.20.0_p05.ebuild
new file mode 100644
index 000000000000..6e758132e03a
--- /dev/null
+++ b/net-fs/cvmfs/cvmfs-2.1.20.0_p05.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit cmake-utils
+
+MYP=${PN}-${PV/_p/-fix}
+
+DESCRIPTION="HTTP read-only file system for distributing software"
+HOMEPAGE="http://cernvm.cern.ch/portal/filesystem"
+SRC_URI="https://github.com/cvmfs/${PN}/archive/${MYP}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="+client debug doc test server"
+
+CDEPEND="
+ dev-cpp/gtest
+ dev-db/sqlite:3=
+ dev-libs/openssl:0
+ net-libs/pacparser:0=
+ net-misc/curl:0=[adns]
+ sys-apps/attr
+ sys-libs/zlib:0=
+ client? (
+ >=dev-cpp/sparsehash-1.12
+ dev-libs/leveldb:0=
+ sys-fs/fuse:0= )
+ server? (
+ >=dev-python/geoip-python-1.3.1
+ >=dev-cpp/tbb-4.2:0= )"
+
+RDEPEND="${CDEPEND}
+ client? ( net-fs/autofs )"
+# server? ( www-servers/apache[ssl] )"
+
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen[dot] )"
+
+S="${WORKDIR}/${PN}-${MYP}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-geoip-missing-cmake.patch \
+ "${FILESDIR}"/${P}-cares-underlink.patch
+ # gentoo stuff
+ sed -i -e 's/COPYING//' CMakeLists.txt || die
+ rm bootstrap.sh || die
+ sed -i \
+ -e "s:cvmfs-\${CernVM-FS_VERSION_STRING}:${PF}:" \
+ CMakeLists.txt || die
+
+ # hack for bundled vjson
+ # vjson not worth unbundling, already upstream obsolete
+ # upstream replaced by gason with a new api
+ if use server; then
+ sed -i \
+ -e 's/g++/$(CXX)/g' \
+ -e 's/-O2/$(CXXFLAGS)/g' \
+ -e 's/ar/$(AR)/' \
+ -e 's/ranlib/$(RANLIB)/' \
+ externals/vjson/src/Makefile || die
+ mkdir -p "${WORKDIR}/${P}_build"/externals/build_vjson
+ cp externals/vjson/src/* "${WORKDIR}/${P}_build"/externals/build_vjson/ || die
+ fi
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DGEOIP_BUILTIN=OFF
+ -DGOOGLETEST_BUILTIN=OFF
+ -DLEVELDB_BUILTIN=OFF
+ -DLIBCURL_BUILTIN=OFF
+ -DPACPARSER_BUILTIN=OFF
+ -DSPARSEHASH_BUILTIN=OFF
+ -DSQLITE3_BUILTIN=OFF
+ -DTBB_PRIVATE_LIB=OFF
+ -DZLIB_BUILTIN=OFF
+ $(cmake-utils_use debug BUILD_SERVER_DEBUG)
+ $(cmake-utils_use server BUILD_SERVER)
+ $(cmake-utils_use client BUILD_CVMFS)
+ $(cmake-utils_use client BUILD_LIBCVMFS)
+ $(cmake-utils_use client INSTALL_MOUNT_SCRIPTS)
+ $(cmake-utils_use test BUILD_UNITTESTS)
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ if use doc; then
+ cd doc
+ doxygen cvmfs.doxy || die
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+ use doc && dohtml -r doc/html/*
+}
+
+pkg_config() {
+ if use client; then
+ einfo "Setting up CernVM-FS client"
+ cvmfs_config setup
+ einfo "Now edit ${EROOT%/}/etc/cvmfs/default.local"
+ einfo "and restart the autofs service"
+ fi
+}
diff --git a/net-fs/cvmfs/cvmfs-2.3.5-r1.ebuild b/net-fs/cvmfs/cvmfs-2.3.5-r1.ebuild
new file mode 100644
index 000000000000..05b2f3138849
--- /dev/null
+++ b/net-fs/cvmfs/cvmfs-2.3.5-r1.ebuild
@@ -0,0 +1,160 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils linux-info bash-completion-r1
+
+MYP=${PN}-${PV/_p/-fix}
+
+DESCRIPTION="HTTP read-only file system for distributing software"
+HOMEPAGE="http://cernvm.cern.ch/portal/filesystem"
+SRC_URI="https://github.com/cvmfs/${PN}/archive/${MYP}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="aufs bash-completion debug doc preload server test test-programs"
+
+CDEPEND="
+ dev-cpp/gtest
+ >=dev-cpp/sparsehash-1.12
+ dev-db/sqlite:3=
+ dev-libs/leveldb:0=
+ dev-libs/openssl:0
+ net-libs/pacparser:0=
+ net-misc/curl:0[adns]
+ sys-apps/attr
+ sys-fs/fuse:0=
+ sys-libs/libcap:0=
+ sys-libs/zlib:0=
+ preload? ( >=dev-cpp/tbb-4.4:0=[debug?] )
+ server? (
+ >=dev-cpp/tbb-4.4:0=[debug?]
+ dev-python/geoip-python
+ )
+"
+
+RDEPEND="${CDEPEND}
+ app-admin/sudo
+ net-fs/autofs
+ server? (
+ aufs? ( || (
+ sys-fs/aufs3
+ sys-fs/aufs4
+ sys-kernel/aufs-sources ) )
+ www-servers/apache
+ )
+"
+
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen[dot] )
+ test? (
+ dev-python/geoip-python
+ >=dev-cpp/tbb-4.4:0=
+ || ( sys-devel/gdb dev-util/lldb )
+ )
+"
+
+REQUIRED_USE="test-programs? ( server )"
+
+S="${WORKDIR}/${PN}-${MYP}"
+
+pkg_setup() {
+ if use server; then
+ if use aufs; then
+ CONFIG_CHECK="~AUFS_FS"
+ ERROR_AUFS_FS="CONFIG_AUFS_FS: is required to be set with the aufs flag"
+ else
+ CONFIG_CHECK="~OVERLAY_FS"
+ ERROR_AUFS_FS="CONFIG_OVERLAY_FS: is required to be set"
+ fi
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ cmake-utils_src_prepare
+ # gentoo stuff
+ sed -i -e 's/COPYING//' CMakeLists.txt || die
+ rm bootstrap.sh || die
+ sed -e "s:cvmfs-\${CernVM-FS_VERSION_STRING}:${PF}:" \
+ -i CMakeLists.txt || die
+
+ # hack for bundled packages
+ # not worth unbundling upstreams are flaky/dead
+ local pkg
+ for pkg in vjson sha2 sha3; do
+ # respect toolchain variables
+ sed -e 's/g++/$(CXX)/g' \
+ -e 's/gcc/$(CC)/g' \
+ -e 's/CFLAGS/MYCFLAGS/g' \
+ -e 's/-O2/$(CFLAGS)/g' \
+ -e 's/-O2/$(CXXFLAGS)/g' \
+ -e 's/ar/$(AR)/' \
+ -e 's/ranlib/$(RANLIB)/' \
+ -i externals/${pkg}/src/Makefile || die
+ mkdir -p "${WORKDIR}/${P}_build"/externals/build_${pkg}
+ cp -r externals/${pkg}/src/* \
+ "${WORKDIR}/${P}_build"/externals/build_${pkg}/ || die
+ done
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DGEOIP_BUILTIN=OFF
+ -DGOOGLETEST_BUILTIN=OFF
+ -DLEVELDB_BUILTIN=OFF
+ -DLIBCURL_BUILTIN=OFF
+ -DPACPARSER_BUILTIN=OFF
+ -DSPARSEHASH_BUILTIN=OFF
+ -DSQLITE3_BUILTIN=OFF
+ -DTBB_PRIVATE_LIB=OFF
+ -DZLIB_BUILTIN=OFF
+ -DBUILD_CVMFS=ON
+ -DBUILD_LIBCVMFS=ON
+ -DINSTALL_MOUNT_SCRIPTS=ON
+ -DINSTALL_PUBLIC_KEYS=ON
+ -DINSTALL_BASH_COMPLETION=OFF
+ -DBUILD_DOCUMENTATION="$(usex doc)"
+ -DBUILD_PRELOADER="$(usex preload)"
+ -DBUILD_SERVER="$(usex server)"
+ )
+ if use test || use test-programs; then
+ mycmakeargs+=( -DBUILD_UNITTESTS=ON )
+ fi
+ use test-programs && mycmakeargs+=( -DINSTALL_UNITTESTS=ON )
+ if use debug; then
+ mycmakeargs+=(
+ $(cmake-utils_use server BUILD_SERVER_DEBUG)
+ $(cmake-utils_use test BUILD_UNITTESTS_DEBUG)
+ )
+ fi
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ use doc && cmake-utils_src_compile doc
+}
+
+src_install() {
+ cmake-utils_src_install
+ use bash-completion && \
+ newbashcomp cvmfs/bash_completion/cvmfs.bash_completion cvmfs
+ dodoc doc/*.md
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ doins -r "${BUILD_DIR}"/html
+ docompress -x /usr/share/doc/${PF}/html
+ fi
+}
+
+pkg_config() {
+ einfo "Setting up CernVM-FS client"
+ cvmfs_config setup
+ einfo "Now edit ${EROOT%/}/etc/cvmfs/default.local"
+ einfo "and restart the autofs service"
+}
diff --git a/net-fs/cvmfs/files/cvmfs-2.1.20.0_p05-cares-underlink.patch b/net-fs/cvmfs/files/cvmfs-2.1.20.0_p05-cares-underlink.patch
new file mode 100644
index 000000000000..198d137e7d15
--- /dev/null
+++ b/net-fs/cvmfs/files/cvmfs-2.1.20.0_p05-cares-underlink.patch
@@ -0,0 +1,106 @@
+diff -Nur cvmfs-cvmfs-2.1.20.0-fix05.orig/cmake/Modules/FindCARES.cmake cvmfs-cvmfs-2.1.20.0-fix05/cmake/Modules/FindCARES.cmake
+--- cvmfs-cvmfs-2.1.20.0-fix05.orig/cmake/Modules/FindCARES.cmake 1970-01-01 00:00:00.000000000 +0000
++++ cvmfs-cvmfs-2.1.20.0-fix05/cmake/Modules/FindCARES.cmake 2015-07-31 18:35:05.859879354 +0000
+@@ -0,0 +1,35 @@
++#
++# $Id$
++#
++# - Find cares
++# Find the native CARES includes and library
++#
++# CARES_INCLUDE_DIRS - where to find cares.h, etc.
++# CARES_LIBRARIES - List of libraries when using cares.
++# CARES_FOUND - True if cares found.
++
++
++IF (CARES_INCLUDE_DIRS)
++ # Already in cache, be silent
++ SET(CARES_FIND_QUIETLY TRUE)
++ENDIF (CARES_INCLUDE_DIRS)
++
++FIND_PATH(CARES_INCLUDE_DIR ares.h)
++
++SET(CARES_NAMES cares)
++FIND_LIBRARY(CARES_LIBRARY NAMES ${CARES_NAMES} )
++
++# handle the QUIETLY and REQUIRED arguments and set CARES_FOUND to TRUE if
++# all listed variables are TRUE
++INCLUDE(FindPackageHandleStandardArgs)
++FIND_PACKAGE_HANDLE_STANDARD_ARGS(CARES DEFAULT_MSG CARES_LIBRARY CARES_INCLUDE_DIR)
++
++IF(CARES_FOUND)
++ SET( CARES_LIBRARIES ${CARES_LIBRARY} )
++ SET( CARES_INCLUDE_DIRS ${CARES_INCLUDE_DIR} )
++ELSE(CARES_FOUND)
++ SET( CARES_LIBRARIES )
++ SET( CARES_INCLUDE_DIRS )
++ENDIF(CARES_FOUND)
++
++MARK_AS_ADVANCED( CARES_LIBRARIES CARES_INCLUDE_DIRS )
+diff -Nur cvmfs-cvmfs-2.1.20.0-fix05.orig/CMakeLists.txt cvmfs-cvmfs-2.1.20.0-fix05/CMakeLists.txt
+--- cvmfs-cvmfs-2.1.20.0-fix05.orig/CMakeLists.txt 2015-02-23 13:51:47.000000000 +0000
++++ cvmfs-cvmfs-2.1.20.0-fix05/CMakeLists.txt 2015-07-31 18:32:34.259882076 +0000
+@@ -252,9 +252,12 @@
+ include (${CARES_BUILTIN_LOCATION}/CVMFS-CMakeLists.txt)
+ include (${LIBCURL_BUILTIN_LOCATION}/CVMFS-CMakeLists.txt)
+ set (CURL_LIBRARIES "")
++ set (CARES_LIBRARIES "")
+ else (LIBCURL_BUILTIN)
+ find_package (CURL REQUIRED)
++ find_package (CARES REQUIRED)
+ set (INCLUDE_DIRECTORIES ${INCLUDE_DIRECTORIES} ${CURL_INCLUDE_DIRS})
++ set (INCLUDE_DIRECTORIES ${INCLUDE_DIRECTORIES} ${CARES_INCLUDE_DIRS})
+ if (CURL_INCLUDE_DIRS)
+ find_program(CURL_CONFIG_EXEC NAMES curl-config)
+ if (CURL_CONFIG_EXEC)
+diff -Nur cvmfs-cvmfs-2.1.20.0-fix05.orig/cvmfs/CMakeLists.txt cvmfs-cvmfs-2.1.20.0-fix05/cvmfs/CMakeLists.txt
+--- cvmfs-cvmfs-2.1.20.0-fix05.orig/cvmfs/CMakeLists.txt 2015-02-23 13:51:47.000000000 +0000
++++ cvmfs-cvmfs-2.1.20.0-fix05/cvmfs/CMakeLists.txt 2015-07-31 18:34:36.789879876 +0000
+@@ -271,7 +271,7 @@
+ set_target_properties (cvmfs_fuse_debug PROPERTIES VERSION ${CernVM-FS_VERSION_STRING})
+
+ # link the stuff (*_LIBRARIES are dynamic link libraries *_archive are static link libraries ... one of them will be empty for each dependency)
+- set (CVMFS_FUSE_LINK_LIBRARIES ${SQLITE3_LIBRARY} ${CURL_LIBRARIES} ${PACPARSER_LIBRARIES} ${ZLIB_LIBRARIES} ${LEVELDB_LIBRARIES} ${OPENSSL_LIBRARIES} ${FUSE_LIBRARIES} ${LIBFUSE_ARCHIVE} ${SQLITE3_ARCHIVE} ${LIBCURL_ARCHIVE} ${PACPARSER_ARCHIVE} ${LEVELDB_ARCHIVE} ${CARES_ARCHIVE} ${ZLIB_ARCHIVE} ${RT_LIBRARY} ${UUID_LIBRARIES} pthread dl)
++ set (CVMFS_FUSE_LINK_LIBRARIES ${SQLITE3_LIBRARY} ${CARES_LIBRARIES} ${CURL_LIBRARIES} ${PACPARSER_LIBRARIES} ${ZLIB_LIBRARIES} ${LEVELDB_LIBRARIES} ${OPENSSL_LIBRARIES} ${FUSE_LIBRARIES} ${LIBFUSE_ARCHIVE} ${SQLITE3_ARCHIVE} ${LIBCURL_ARCHIVE} ${PACPARSER_ARCHIVE} ${LEVELDB_ARCHIVE} ${CARES_ARCHIVE} ${ZLIB_ARCHIVE} ${RT_LIBRARY} ${UUID_LIBRARIES} pthread dl)
+
+ target_link_libraries (cvmfs2 ${CVMFS_LOADER_LIBS} ${OPENSSL_LIBRARIES} ${LIBFUSE} ${RT_LIBRARY} ${UUID_LIBRARIES} pthread dl)
+ target_link_libraries (cvmfs_fuse_debug ${CVMFS2_DEBUG_LIBS} ${CVMFS_FUSE_LINK_LIBRARIES})
+@@ -331,7 +331,7 @@
+ add_dependencies (libcvmfs cvmfs_only)
+
+ add_executable( test_libcvmfs ${TEST_LIBCVMFS_SOURCES} )
+- target_link_libraries( test_libcvmfs ${CMAKE_CURRENT_BINARY_DIR}/libcvmfs.a ${SQLITE3_LIBRARY} ${CURL_LIBRARIES} ${PACPARSER_LIBRARIES} ${ZLIB_LIBRARIES} ${OPENSSL_LIBRARIES} ${RT_LIBRARY} ${UUID_LIBRARIES} pthread dl )
++ target_link_libraries( test_libcvmfs ${CMAKE_CURRENT_BINARY_DIR}/libcvmfs.a ${SQLITE3_LIBRARY} ${CARES_LIBRARIES} ${CURL_LIBRARIES} ${PACPARSER_LIBRARIES} ${ZLIB_LIBRARIES} ${OPENSSL_LIBRARIES} ${RT_LIBRARY} ${UUID_LIBRARIES} pthread dl )
+ add_dependencies (test_libcvmfs libcvmfs)
+
+ endif (BUILD_LIBCVMFS)
+@@ -371,7 +371,7 @@
+ set_target_properties (cvmfs_swissknife PROPERTIES COMPILE_FLAGS "${CVMFS_SWISSKNIFE_CFLAGS}" LINK_FLAGS "${CVMFS_SWISSKNIFE_LD_FLAGS}")
+
+ # link the stuff (*_LIBRARIES are dynamic link libraries)
+- target_link_libraries (cvmfs_swissknife ${CVMFS_SWISSKNIFE_LIBS} ${SQLITE3_LIBRARY} ${CURL_LIBRARIES} ${ZLIB_LIBRARIES} ${TBB_LIBRARIES} ${OPENSSL_LIBRARIES} ${LIBCURL_ARCHIVE} ${CARES_ARCHIVE} ${SQLITE3_ARCHIVE} ${ZLIB_ARCHIVE} ${RT_LIBRARY} ${VJSON_ARCHIVE} pthread dl)
++ target_link_libraries (cvmfs_swissknife ${CVMFS_SWISSKNIFE_LIBS} ${SQLITE3_LIBRARY} ${CARES_LIBRARIES} ${CURL_LIBRARIES} ${ZLIB_LIBRARIES} ${TBB_LIBRARIES} ${OPENSSL_LIBRARIES} ${LIBCURL_ARCHIVE} ${CARES_ARCHIVE} ${SQLITE3_ARCHIVE} ${ZLIB_ARCHIVE} ${RT_LIBRARY} ${VJSON_ARCHIVE} pthread dl)
+
+ if (BUILD_SERVER_DEBUG)
+ add_executable (cvmfs_swissknife_debug ${CVMFS_SWISSKNIFE_DEBUG_SOURCES})
+@@ -399,7 +399,7 @@
+ message (WARNING "Debug libraries of TBB were not found. Using the release versions instead.")
+ set (TBB_DEBUG_LIBRARIES ${TBB_LIBRARIES})
+ endif (NOT TBB_DEBUG_LIBRARIES)
+- target_link_libraries (cvmfs_swissknife_debug ${CVMFS_SWISSKNIFE_LIBS} ${SQLITE3_LIBRARY} ${CURL_LIBRARIES} ${ZLIB_LIBRARIES} ${OPENSSL_LIBRARIES} ${LIBCURL_ARCHIVE} ${CARES_ARCHIVE} ${SQLITE3_ARCHIVE} ${ZLIB_ARCHIVE} ${TBB_DEBUG_LIBRARIES} ${RT_LIBRARY} ${VJSON_ARCHIVE} pthread dl)
++ target_link_libraries (cvmfs_swissknife_debug ${CVMFS_SWISSKNIFE_LIBS} ${SQLITE3_LIBRARY} ${CARES_LIBRARIES} ${CURL_LIBRARIES} ${ZLIB_LIBRARIES} ${OPENSSL_LIBRARIES} ${LIBCURL_ARCHIVE} ${CARES_ARCHIVE} ${SQLITE3_ARCHIVE} ${ZLIB_ARCHIVE} ${TBB_DEBUG_LIBRARIES} ${RT_LIBRARY} ${VJSON_ARCHIVE} pthread dl)
+ endif (BUILD_SERVER_DEBUG)
+ endif (BUILD_SERVER)
+
+diff -Nur cvmfs-cvmfs-2.1.20.0-fix05.orig/cvmfs/CMakeLists.txt cvmfs-cvmfs-2.1.20.0-fix05/cvmfs/CMakeLists.txt
+--- cvmfs-cvmfs-2.1.20.0-fix05.orig/test/unittests/CMakeLists.txt.orig 2015-07-31 19:03:06.829849170 +0000
++++ cvmfs-cvmfs-2.1.20.0-fix05/test/unittests/CMakeLists.txt 2015-07-31 19:03:36.459848638 +0000
+@@ -212,7 +212,7 @@
+ endif (BUILD_UNITTESTS_DEBUG)
+
+ # link the stuff (*_LIBRARIES are dynamic link libraries)
+-set (UNITTEST_LINK_LIBRARIES ${GTEST_LIBRARIES} ${GOOGLETEST_ARCHIVE} ${OPENSSL_LIBRARIES}
++set (UNITTEST_LINK_LIBRARIES ${GTEST_LIBRARIES} ${GOOGLETEST_ARCHIVE} ${OPENSSL_LIBRARIES} ${CARES_LIBRARIES}
+ ${CURL_LIBRARIES} ${LIBCURL_ARCHIVE} ${CARES_ARCHIVE}
+ ${SQLITE3_LIBRARY} ${SQLITE3_ARCHIVE} ${TBB_LIBRARIES}
+ ${ZLIB_LIBRARIES} ${ZLIB_ARCHIVE} ${RT_LIBRARY} ${UUID_LIBRARIES}
diff --git a/net-fs/cvmfs/files/cvmfs-2.1.20.0_p05-geoip-missing-cmake.patch b/net-fs/cvmfs/files/cvmfs-2.1.20.0_p05-geoip-missing-cmake.patch
new file mode 100644
index 000000000000..e47f61ee894a
--- /dev/null
+++ b/net-fs/cvmfs/files/cvmfs-2.1.20.0_p05-geoip-missing-cmake.patch
@@ -0,0 +1,151 @@
+--- /dev/null
++++ cmake/Modules/FindLibGeoIP.cmake
+@@ -0,0 +1,68 @@
++# - Try to find GeoIP headers and libraries
++#
++# Usage of this module as follows:
++#
++# find_package(LibGeoIP)
++#
++# Variables used by this module, they can change the default behaviour and need
++# to be set before calling find_package:
++#
++# LibGeoIP_ROOT_DIR Set this variable to the root installation of
++# libGeoIP if the module has problems finding the
++# proper installation path.
++#
++# Variables defined by this module:
++#
++# LIBGEOIP_FOUND System has GeoIP libraries and headers
++# LibGeoIP_LIBRARY The GeoIP library
++# LibGeoIP_INCLUDE_DIR The location of GeoIP headers
++# HAVE_GEOIP_COUNTRY_EDITION_V6 Whether the API support IPv6 country edition
++# HAVE_GEOIP_CITY_EDITION_REV0_V6 Whether the API supports IPv6 city edition
++
++find_path(LibGeoIP_ROOT_DIR
++ NAMES include/GeoIPCity.h
++)
++
++if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
++ # the static version of the library is preferred on OS X for the
++ # purposes of making packages (libGeoIP doesn't ship w/ OS X)
++ set(libgeoip_names libGeoIp.a GeoIP)
++else ()
++ set(libgeoip_names GeoIP)
++endif ()
++
++find_library(LibGeoIP_LIBRARY
++ NAMES ${libgeoip_names}
++ HINTS ${LibGeoIP_ROOT_DIR}/lib
++)
++
++find_path(LibGeoIP_INCLUDE_DIR
++ NAMES GeoIPCity.h
++ HINTS ${LibGeoIP_ROOT_DIR}/include
++)
++
++include(FindPackageHandleStandardArgs)
++find_package_handle_standard_args(LibGeoIP DEFAULT_MSG
++ LibGeoIP_LIBRARY
++ LibGeoIP_INCLUDE_DIR
++)
++
++if (LIBGEOIP_FOUND)
++ include(CheckCXXSourceCompiles)
++ set(CMAKE_REQUIRED_INCLUDES ${LibGeoIP_INCLUDE_DIR})
++ check_cxx_source_compiles("
++ #include <GeoIPCity.h>
++ int main() { GEOIP_COUNTRY_EDITION_V6; return 0; }
++ " HAVE_GEOIP_COUNTRY_EDITION_V6)
++ check_cxx_source_compiles("
++ #include <GeoIPCity.h>
++ int main() { GEOIP_CITY_EDITION_REV0_V6; return 0; }
++ " HAVE_GEOIP_CITY_EDITION_REV0_V6)
++ set(CMAKE_REQUIRED_INCLUDES)
++endif ()
++
++mark_as_advanced(
++ LibGeoIP_ROOT_DIR
++ LibGeoIP_LIBRARY
++ LibGeoIP_INCLUDE_DIR
++)
+\ No newline at end of file
+diff --git a/cmake/Modules/FindPythonModule.cmake b/cmake/Modules/FindPythonModule.cmake
+new file mode 100644
+index 0000000..1a29315
+--- /dev/null
++++ cmake/Modules/FindPythonModule.cmake
+@@ -0,0 +1,24 @@
++# Find if a Python module is installed
++# Found at http://www.cmake.org/pipermail/cmake/2011-January/041666.html
++# To use do: find_python_module(PyQt4 REQUIRED)
++function(find_python_module module)
++ string(TOUPPER ${module} module_upper)
++ if(NOT PYTHON_${module_upper})
++ include (FindPythonInterp)
++ if(ARGC GREATER 1 AND ARGV1 STREQUAL "REQUIRED")
++ set(PY_${module}_FIND_REQUIRED TRUE)
++ endif()
++ # A module's location is usually a directory, but for binary modules
++ # it's a .so file.
++ execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c"
++ "import re, ${module}; print(re.compile('/__init__.py.*').sub('',${module}.__file__))"
++ RESULT_VARIABLE _${module}_status
++ OUTPUT_VARIABLE _${module}_location
++ ERROR_QUIET
++ OUTPUT_STRIP_TRAILING_WHITESPACE)
++ if(${_${module}_status} EQUAL 0)
++ set(PYTHON_${module_upper} ${_${module}_location} CACHE STRING "Location of Python module ${module}")
++ endif(${_${module}_status} EQUAL 0)
++ endif(NOT PYTHON_${module_upper})
++ find_package_handle_standard_args(PY_${module} DEFAULT_MSG PYTHON_${module_upper})
++endfunction(find_python_module)
+\ No newline at end of file
+diff --git a/cvmfs/CMakeLists.txt b/cvmfs/CMakeLists.txt
+index cb09b94..44be85e 100644
+--- cvmfs/CMakeLists.txt
++++ cvmfs/CMakeLists.txt
+@@ -347,9 +347,9 @@ if (BUILD_SERVER)
+ # create targets with corresponding sources and static link libraries
+ add_executable (cvmfs_swissknife ${CVMFS_SWISSKNIFE_SOURCES})
+ add_executable (cvmfs_suid_helper ${CVMFS_SUID_HELPER_SOURCES})
+- add_custom_target (geoip ALL)
+
+ if (GEOIP_BUILTIN)
++ add_custom_target (geoip ALL)
+ add_dependencies (python-geoip libgeoip)
+ add_dependencies (geoip python-geoip)
+ endif (GEOIP_BUILTIN)
+--- CMakeLists.txt.orig 2015-08-04 15:33:53.383868890 +0000
++++ CMakeLists.txt 2015-08-04 15:58:03.133842858 +0000
+@@ -145,6 +145,12 @@
+ endif (EXISTS "${CMAKE_SOURCE_DIR}/bootstrap.sh")
+
+ #
++# include some common functionality
++#
++include (FindPythonModule)
++
++
++#
+ # set some default flags
+ #
+ # flags in CMAKE_C**_FLAGS are always passed to the compiler
+@@ -309,13 +315,15 @@
+ set (INCLUDE_DIRECTORIES ${INCLUDE_DIRECTORIES} ${GTEST_INCLUDE_DIRS})
+ endif (GOOGLETEST_BUILTIN)
+
++if (BUILD_SERVER OR BUILD_UNITTESTS)
+ if (GEOIP_BUILTIN)
+ include (${LIBGEOIP_BUILTIN_LOCATION}/CVMFS-CMakeLists.txt)
+ include (${PYTHON_GEOIP_BUILTIN_LOCATION}/CVMFS-CMakeLists.txt)
+ else (GEOIP_BUILTIN)
+- find_package (GeoIP REQUIRED)
+- find_package (python-GeoIP REQUIRED)
++ find_package (LibGeoIP REQUIRED)
++ find_python_module (GeoIP REQUIRED)
+ endif (GEOIP_BUILTIN)
++endif (BUILD_SERVER OR BUILD_UNITTESTS)
+
+ # required libraries for client and libcvmfs
+ if (BUILD_CVMFS OR BUILD_LIBCVMFS)
diff --git a/net-fs/cvmfs/metadata.xml b/net-fs/cvmfs/metadata.xml
new file mode 100644
index 000000000000..1c13de9185c6
--- /dev/null
+++ b/net-fs/cvmfs/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>bicatali@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ The CernVM File System is a client-server file system developed to
+ deliver software stacks onto virtual machines in a fast, scalable,
+ and reliable way. CernVM-FS is implemented as a FUSE module. It
+ makes a specially prepared directory tree stored on a web server
+ look like a local read-only file system on the virtual
+ machine. CernVM-FS uses outgoing HTTP connections only, thereby it
+ avoids most of the firewall issues of other network file systems. It
+ transfers data file by file on demand, verifying the content by
+ SHA-1 keys.
+ </longdescription>
+ <use>
+ <flag name='aufs'>Use AUFS instead of OverlayFS for the server</flag>
+ <flag name="client">Install the cvmfs client programs and init script</flag>
+ <flag name="preload">Install the cvmfs cache preloader for distributed file systems</flag>
+ <flag name="server">Install the cvmfsd program and init script</flag>
+ <flag name='test-programs'>Install unit test programs</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">cvmfs/cvmfs</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-fs/davfs2/Manifest b/net-fs/davfs2/Manifest
new file mode 100644
index 000000000000..3c211bb861ae
--- /dev/null
+++ b/net-fs/davfs2/Manifest
@@ -0,0 +1,5 @@
+DIST davfs2-1.5.4.tar.gz 478377 SHA256 c9c4e0f0912a782386216b2147eb9c36c47f193b8fcf3d637719e0b9fe7c96e0 SHA512 08550f171f4b196f55f3fb71c6c75ed24063f8a5afc31c52502d0c911cf7aca4da01f7a123269d410dadc497c44ef5a3573e455aca6eafe48eb86f18429b94b2 WHIRLPOOL f22962bf770867b2e5b54f810004325d3d782c43448787223de4c203f959630fb0a43ab61bff355563fb1bee3a47444e1ee9baeb47f13b200c48852eb4332972
+EBUILD davfs2-1.5.4.ebuild 958 SHA256 9dec868691525db76c0ba09b956baa4d263f62e2875dce837787eb1b39cc02a7 SHA512 7b1b638d70fdbde8415b078b4a3f98e5d810b4cfb8b79c6ddf4e3f2a938203c1ed26807e3303063e387c10dd991986595a4f8727ab3300996d51d8cdcb7a3587 WHIRLPOOL e6cb3619d1b21f858b7579a058e898866235d19d2e30b6729d00b5c8cda0e06068d77d2c2fe8902fa71e3f4d4f5828f26faf4d5c6b3d525c628e7924027228ae
+MISC ChangeLog 5664 SHA256 cac461874705aed11280eaa83503213249663a2a00c728777d0f0c806f17605a SHA512 f1a1dd81af8772f18b31f72cb611401b7d7221169c277e8b02857ad95cf008053c69ba337d6eb04e86487bbf1972ce31634042ebda1eba0936387edb4e4e3992 WHIRLPOOL a817ebbd025114b3117479ae3fc3c5db2151a5d2aee02f4ccbf4afb532ccae917682e912498f92cc66297cdd388a751896edd9362f0116b71643b3d6f2054dcc
+MISC ChangeLog-2015 11599 SHA256 660c23b886406ba7e08342f2e9c810f77882e69b2c98e7ba47e1a8290754a938 SHA512 a88e617a2239460cb4ee6bb4b3eaad2f33881b72f5fc2417cdbd1457ebf578818fea15178ea359e1f030efa177f0e4b47fa564279b3322e2148c74236955644a WHIRLPOOL a9e922360c8bddcafbefc0aa5d5eef1960aded3fb5b8dcd3ec3b6435343df4887f36d67790befde19aafb2ff8e0b41ef4ad9cafe438ebcec75419685816fe0ed
+MISC metadata.xml 251 SHA256 057f94d9b3b98378eb65b8e00896452f99292b2250ed881ed70b1ab6f92dcf40 SHA512 6d9ef84f36e3ce79747ee806d0194543d1c5a004e612ecbe308644829cf03234d7f52ef0dbbe57144da5d4af86e3a9a5df297a01c95c4d9938f49605e92aea32 WHIRLPOOL 630159dc53adcd4de115823ad315fb0a5767de53cc724419905feb8d71157c8e6ce624e1eaaafdd2c29da5f711ba3078a6dbcfeb2ba37dcf11e97fe69a51746d
diff --git a/net-fs/davfs2/davfs2-1.5.4.ebuild b/net-fs/davfs2/davfs2-1.5.4.ebuild
new file mode 100644
index 000000000000..d786cfd93205
--- /dev/null
+++ b/net-fs/davfs2/davfs2-1.5.4.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit user
+
+DESCRIPTION="Linux FUSE (or coda) driver that allows you to mount a WebDAV resource"
+HOMEPAGE="https://savannah.nongnu.org/projects/davfs2"
+SRC_URI="mirror://nongnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="nls"
+RESTRICT="test"
+
+RDEPEND="dev-libs/libxml2
+ net-libs/neon
+ sys-libs/zlib
+ nls? ( virtual/libintl virtual/libiconv )
+"
+DEPEND="${REPEND}
+ nls? ( sys-devel/gettext )
+"
+
+pkg_setup() {
+ enewgroup davfs2
+}
+
+src_configure() {
+ econf dav_user=nobody --enable-largefile $(use_enable nls)
+}
+
+pkg_postinst() {
+ elog
+ elog "Quick setup:"
+ elog " (as root)"
+ elog " # gpasswd -a \${your_user} davfs2"
+ elog " # echo 'http://path/to/dav /home/\${your_user}/dav davfs rw,user,noauto 0 0' >> /etc/fstab"
+ elog " (as user)"
+ elog " \$ mkdir -p ~/dav"
+ elog " \$ mount ~/dav"
+ elog
+}
diff --git a/net-fs/davfs2/metadata.xml b/net-fs/davfs2/metadata.xml
new file mode 100644
index 000000000000..4d7a21128d94
--- /dev/null
+++ b/net-fs/davfs2/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>gokturk@gentoo.org</email>
+ <name>Göktürk Yüksek</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-fs/docker-volume-netshare/Manifest b/net-fs/docker-volume-netshare/Manifest
new file mode 100644
index 000000000000..a39a2c56e183
--- /dev/null
+++ b/net-fs/docker-volume-netshare/Manifest
@@ -0,0 +1,16 @@
+AUX docker-volume-netshare.confd 75 SHA256 92d3dd007370ba0281f06c72843d20076f41786847d92aabd841d6e9e7b31f4c SHA512 27d5b4a31807eee134fff6a79ebead41d0d7087379ab49b225ec77af26974c79122eaef95e316b092a1346cbee2f272bf711ad09547a61c47a7c42ae5ac11955 WHIRLPOOL 6adcceadb9171bc44e10a1dced485bb2d20fb0a91120aaf1c7055d960ac24e3a44e3afdaac35de7779994358db33b81fcca993879b9e687ef8ad01f0922089da
+AUX docker-volume-netshare.initd 410 SHA256 af34ed3c2a92405e06e52f82e3d43635bd4eec60a2a4e108384b92c17e219629 SHA512 1dfabf3abf1e1c61e52ec3178123350cb61e1cda050be0cab3faa5c0cbedb13b9e8969db40c79dcaf4567356d65a103fc5a6a9255caa3e8e379781e08e90cbac WHIRLPOOL b659a215bfd030aabbdb2c5e4c5664d619e460506cba154909d15669995407cda54bf10093ab83f6d28de260a7c5aefcae0a0becd16297cd3e1590d3c40d39a0
+DIST docker-volume-netshare-0.34.tar.gz 18751 SHA256 36a458389e5b8f1362a80d79e2f1e1d47ffe9d28f57bea3100193bc1ec37d238 SHA512 a81e934540b52697845760c1443fb1148fb4a4921def2596c12745efb411726a0a144ce3951319ac98571ca5a5566e208ce4865139589d309514322b1be32198 WHIRLPOOL 7c9d8b9ac078b35cf965e4cb2269e00e8db3c6ad3220395cd3e57458ca8e905d5291066f6e0ee6d2e626ddddfcaf3520feaf4cc8a7eaf85c70d31e0ec1325af2
+DIST github.com-Sirupsen-logrus-85b1699d505667d13f8ac4478c1debbf85d6c5de.tar.gz 27996 SHA256 495d91239ef5aaee4968e2cd06d2bb9bfdd3553593ac8684121c60c83017d539 SHA512 7bc0a13cd2c63d7ac935a0c1379853c5788830431e39f8285a0b038fa7db510a287606628603fcf97a7ba839779558f1237db1bd0a84860fda98adeb5cdf7f78 WHIRLPOOL 9e7b16a860dc0b79ae325e4a6c17ba6ad4ca072d44730f12e6e56691ba7a4c63aeaf9a1c8d52db562b9c266be98c34c35a6f4d9bd6b32e0ba21d9d2fc9447fbf
+DIST github.com-coreos-go-systemd-24036eb3df68550d24a2736c5d013f4e83366866.tar.gz 54967 SHA256 a4c5cfd493a6239f994bbc42871eef470a1b0ad3648cc40fd91931523be344e4 SHA512 60b46dc15c01d0415fda5efcff71cfdd43587ddb04d494c532c995a92cc700fb79762dceb29e621966dbb85a008f6f866c6faa36dcf85cc9064a8a919e801546 WHIRLPOOL ffbdd90ae32d25efd0a1ca47a91e4e12124d968feca218949e4e319dc7f2547f89d1a4464ca03e5ba356a8000e900c4b0c7f0363bd888e27f019201953fc8fd3
+DIST github.com-coreos-pkg-8dbaa491b063ed47e2474b5363de0c0db91cf9f2.tar.gz 31142 SHA256 b04d76dcdb8d57ea0bfb844828c01d38d81d0c92add71562f5b5c80746893648 SHA512 5f9602d8ce25190d77443c878e63e6e8d9c3efb29b3aaa32ec2a4adc28d40c2f12a5a6b152cbb4fc729f94a87193bd8c30d40f2c1720e885a84fe002d4eec2a8 WHIRLPOOL 9bf7da2d08f275383db92f351a5fb293af05d55f01f1524f61c8802f564695c8e148d210a1673f8fc63c35b9d519be88b47ddcfb4d4a52a1c15a73b81f97edb0
+DIST github.com-dickeyxxx-netrc-3acf1b3de25d89c7688c63bb45f6b07f566555ec.tar.gz 5252 SHA256 2ded9d58248330ad399d6bd79cf97a4ce322f90a910f02a9ce4d53a81df25620 SHA512 f513f94b180743a3bf447ee79648c067f7908a1877201919794ad7c387fbe8ef4c4513c2def45e24e1d1d7f15c272ecbf3667219071e8aa3922c1fc69aa254e1 WHIRLPOOL 22688185138a0ec98d8836a50d8c786f6b876369528c3cb5dadd1d4906e73256be4ef5910fd7d3fbd8c85164da2d9e27e8304416dda64a8a5a8d726b7a2aca93
+DIST github.com-docker-go-connections-e15c02316c12de00874640cd76311849de2aeed5.tar.gz 29737 SHA256 b8a207b5def2d60fc4012efbc54c1cdef5e350092a1323ebf38a69ba80079716 SHA512 bae235a7a1798452c4d28564e9531a2ef3d71ac1bfcb5627d7c73d49510d0a000e1844066a757cf99e1d93d88f830afab7086202e7a8fe04b6e008b8bc56dbd7 WHIRLPOOL c54cf7f1c37302ecd42f27d42b5c3965a40b3179c71df1790f88ef125866148147a26e793dc42bc23284934ea725a5a244368f22bae5a9f889c5da09c91fa787
+DIST github.com-docker-go-plugins-helpers-021fd77358602b2c20fc3a1dfd260fd0dace4f53.tar.gz 22388 SHA256 a609d6200225a8e89b039eaf481af7830ac7d70fd63e5b5d956d52da9ac92ac0 SHA512 20147a6888ef97f4e008a92abeafc735e7672ad469404eb3b27894ae5467473069a4f5f3e8c735372ad3e5a5b7b2e1cfed0c9c38e0851b81194144c0c6bd47ff WHIRLPOOL 0c8167ef16e2986491812efe2eb8412ec43d95a77310da89ba06a49e595149e3370430bfc4c54ee18909d21ef84c4b03cce636912745ef638f979bae85d9a2a0
+DIST github.com-golang-crypto-850760c427c516be930bc91280636328f1a62286.tar.gz 1342197 SHA256 a75465ad0e2b07cc2f3b52085b7b8ea4cb4aa25f64e7d5b78a7376d5499b32ec SHA512 7c37d7b759506fd187646702a1fd6b6bf8a99abc93f96eeaec45d1d912cb40cbf8327fd8d43967a41fb90cc4a29f5271e4be147d85c6b96e4c0da7a0b4311e20 WHIRLPOOL 632f99f88bccca7e36a6a44651a590f7833db078a5133aaa152da812c69c043bf627151640273abfc7d52ec00a29d49402ff6c729057fd3c98507dd4717435ed
+DIST github.com-golang-net-dfe83d419c9403b40b19d08cdba2afec27b002f7.tar.gz 901402 SHA256 9cf191e6ae01246c1e593e670f13fe443fddeaea95d1782c5217864ce2be074f SHA512 de273a65adece387770bbff75c3b79acaf75f0e26233893d50c251be109fe6db88a715d94b07dfda7d8578515352483ffeefe988a74952a7c93169707ebaeeea WHIRLPOOL 9ea4bb847765229fd865bd355ddb61211a5090c8586acdb02f1f2a6891e7939a8de3cccc4e540d174d4984decfa8712cb626d65c8b436884e5b0117f0cc14740
+DIST github.com-miekg-dns-e78414ef75607394ad7d917824f07f381df2eafa.tar.gz 176815 SHA256 9c883d0b6257703a21e06fc4de30a1e0563a2966622e80d49851cd7f71d2ed52 SHA512 dee878a85620d8db53c147b7ea6903a7e80da556bead1780f15c7d1ced0df0ef29e46a5ac7c1cde726262a99d789bfd7024301e048282ffef74e39734552d392 WHIRLPOOL 6fe62e297e1344113456b2045903c7b8afabb491a2547b5483ff5970164f9fcf0489bd81b003febdecdb5ca01cb9af841e98d2b1344e033f5ae51b229191f98e
+DIST github.com-spf13-cobra-b4dbd37a01839e0653eec12aa4bbb2a2ce7b2a37.tar.gz 97045 SHA256 88297336e29f7d6d53688068e3b41f304a5982c6f97a1d34d15548e571cfc67b SHA512 e612a10cad34c480f0401aaab229e7cba9e52dcca21814d89f900f12547ef2493017f48bb447736d1a9de9948006b296f1e0d9184fa3bf88f4a5ff4251b5afa1 WHIRLPOOL 775126f5468a55b67e54f0a6b2092439428d559e92a246ddb9b5c6076fb63eeef06fe28541d7cdd5d09ecd04e3e0e306fb2b0d4f28b9333b13adb501a66c7313
+DIST github.com-spf13-pflag-e57e3eeb33f795204c1ca35f56c44f83227c6e66.tar.gz 39045 SHA256 f89a8f029e77ad12fa46b2c07dde9a9c925111c4dfc68e7adfe52b120238aa7b SHA512 c05ef1bc05cba471a55a11a2209fe4bdaaba491434a28b7f08d23528f4074b82a656b62972efdd49384dd49bde429d2d2c0e6ba311cae0d23f55b229b768dae8 WHIRLPOOL d958689c39e1c56469b97192301e74c3a676f589e4abc46a30f98fad40aefd9fd723d9abd002729b6c57e98b4ee7ebe50d65d3a16f998bdb250067bbc203d1f0
+EBUILD docker-volume-netshare-0.34.ebuild 1765 SHA256 acb6667404b6e29b035694470bc572ee05102fe851f4b4f4e56cf63f5bb6a0aa SHA512 407de406ca4c37cdabff43407954d99c91ab3089f2a4edfbd8316b72ce458a08aeeb0c980c9fefe15538f3c1372af673ac276637f1b1282544bebf1a38d834e0 WHIRLPOOL 427fc7f80d83ad7bed06dfb9c4a0ae9d2611826b1024d92efa936ff78a9343e04008ee98a3293f3376d9c61f1f396be176facbe37e14b1c4ee8c911c125cf5d2
+MISC metadata.xml 351 SHA256 4a65ccd36950f5c1506f1479ae8e6aba4e3c9c5f0b68599a9599365e0c7c871b SHA512 8d10ac1384531b448d25f8d9533b84abe6a21f561e027600a1f0a23152468dac80db4e425d471b35473435e2aaa9dfb8a271a259f12c6b890b95639c44b201b6 WHIRLPOOL c0f9c3026fcc3f170b79a8312e225efae404759889374d8e12f4577ea409415b4ab3d1d066c28afcf58e9af97d868fc3e806cd71a0dd11e52f4993281daf6417
diff --git a/net-fs/docker-volume-netshare/docker-volume-netshare-0.34.ebuild b/net-fs/docker-volume-netshare/docker-volume-netshare-0.34.ebuild
new file mode 100644
index 000000000000..3bb8f1d16afa
--- /dev/null
+++ b/net-fs/docker-volume-netshare/docker-volume-netshare-0.34.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGO_PN="github.com/ContainX/docker-volume-netshare"
+EGIT_COMMIT="v${PV}"
+
+EGO_VENDOR=( "github.com/Sirupsen/logrus 85b1699d505667d13f8ac4478c1debbf85d6c5de"
+ "github.com/dickeyxxx/netrc 3acf1b3de25d89c7688c63bb45f6b07f566555ec"
+ "github.com/docker/go-plugins-helpers 021fd77358602b2c20fc3a1dfd260fd0dace4f53"
+ "github.com/coreos/go-systemd 24036eb3df68550d24a2736c5d013f4e83366866"
+ "github.com/docker/go-connections e15c02316c12de00874640cd76311849de2aeed5"
+ "github.com/miekg/dns e78414ef75607394ad7d917824f07f381df2eafa"
+ "github.com/spf13/cobra b4dbd37a01839e0653eec12aa4bbb2a2ce7b2a37"
+ "github.com/spf13/pflag e57e3eeb33f795204c1ca35f56c44f83227c6e66"
+ "golang.org/x/net dfe83d419c9403b40b19d08cdba2afec27b002f7 github.com/golang/net"
+ "github.com/coreos/pkg 8dbaa491b063ed47e2474b5363de0c0db91cf9f2"
+ "golang.org/x/crypto 850760c427c516be930bc91280636328f1a62286 github.com/golang/crypto"
+)
+
+inherit golang-vcs-snapshot systemd user
+
+SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz
+ ${EGO_VENDOR_URI}"
+DESCRIPTION="Docker NFS, AWS EFS, Ceph & Samba/CIFS Volume Plugin"
+HOMEPAGE="https://github.com/ContainX/docker-volume-netshare"
+LICENSE="Apache-2.0"
+KEYWORDS="~amd64"
+SLOT="0"
+IUSE=""
+
+src_prepare() {
+ default
+ sed -i -e "s/dmaj/ContainX/" -e "s/VERSION string = \"\"/VERSION string =\"${PV}\"/" src/${EGO_PN}/main.go || die
+}
+
+src_compile() {
+ pushd src/${EGO_PN} || die
+ CGO_LDFLAGS="-fno-PIC" GOPATH="${S}" go build || die
+ popd || die
+}
+
+src_install() {
+ pushd src/${EGO_PN} || die
+ dobin ${PN}
+ dodoc README.md
+ popd || die
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+}
diff --git a/net-fs/docker-volume-netshare/files/docker-volume-netshare.confd b/net-fs/docker-volume-netshare/files/docker-volume-netshare.confd
new file mode 100644
index 000000000000..a8a88debb293
--- /dev/null
+++ b/net-fs/docker-volume-netshare/files/docker-volume-netshare.confd
@@ -0,0 +1,2 @@
+# arguments for docker-volume-netshare plugin
+command_args="nfs -o nolock"
diff --git a/net-fs/docker-volume-netshare/files/docker-volume-netshare.initd b/net-fs/docker-volume-netshare/files/docker-volume-netshare.initd
new file mode 100644
index 000000000000..d80b7be94841
--- /dev/null
+++ b/net-fs/docker-volume-netshare/files/docker-volume-netshare.initd
@@ -0,0 +1,11 @@
+#!/sbin/openrc-run
+# Copyright 2016-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="Docker Volume Netshare plugin"
+pidfile=${pidfile:-"/run/${SVCNAME}.pid"}
+command="/usr/bin/docker-volume-netshare"
+command_args="${command_args:nfs}"
+command_background="true"
+start_stop_daemon_args="--stdout /var/log/${SVCNAME}.log \
+ --stderr /var/log/${SVCNAME}.log"
diff --git a/net-fs/docker-volume-netshare/metadata.xml b/net-fs/docker-volume-netshare/metadata.xml
new file mode 100644
index 000000000000..26c8455b4c5e
--- /dev/null
+++ b/net-fs/docker-volume-netshare/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <name>Manuel Rüger</name>
+ <email>mrueg@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">ContainX/docker-volume-netshare</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-fs/libnfs/Manifest b/net-fs/libnfs/Manifest
new file mode 100644
index 000000000000..0d29f3bafaaa
--- /dev/null
+++ b/net-fs/libnfs/Manifest
@@ -0,0 +1,18 @@
+AUX libnfs-1.9.5-headers.patch 2132 SHA256 6855cdb560dbe6a9e917f6a0244de7789985a3b5144190be32c7936b8d052a4f SHA512 5f0d54aa4a4491add09e90dfa54a5f19cfe2057c559e7e7dffe013fecb9865d9b42b70825008204268a78df4c52a17a0009d65da91ddb6a6327138ec2384a140 WHIRLPOOL 54488b365b18321a5398c6228b49fe5f128ac8644e69b0d21ea777edbbd6bd490b148e6c09fe4765c975431f61f17427317901ceb53bb8459a8c53182470bbff
+AUX libnfs-1.9.5-implicit-internal.patch 655 SHA256 b3ad37f9fddf53314756b61a0c0cc1a716df8079b5c47e6a07db055d18d772b7 SHA512 cfd52e78a2bffd7c263da084f92ee6b0acdb6d5808f0613e37a56654ab73964f00c4af4e4c74f114c7cb454f377c678732ae1d479bbd92a9218d6a995544b21b WHIRLPOOL 9efb96a93b56db6985a7e6a7091098a4fc75683ba3c65e28f638d448f2055b877b62b644ccc4c4e9028bc74d9ccdb1aa9315e82a69d00fd44a897ff3573b3dec
+DIST libnfs-1.10.0.tar.gz 149108 SHA256 7f6c62a05c7e0f0749f2b13f178a4ed7aaf17bd09e65a10bb147bfe9807da272 SHA512 9d1bdd2e193f189841dd915d5a4d0965cfd0c597372fa82b12377c4da1f6b5ec022bd0cddfe46dda1a4ac3de3f31eed73cb7dcf832469a4d292e05401b8fb247 WHIRLPOOL 8027757fcc64ce63b3673affdf179d8b17d221f6f934c19fc9c8fd703ac6aa2475a689c1fc53f2621b63ce4eacf8a7500a1ad7691ac27177c835c9e0a80ce540
+DIST libnfs-1.11.0.tar.gz 152239 SHA256 fc2e45df14d8714ccd07dc2bbe919e45a2e36318bae7f045cbbb883a7854640f SHA512 e1ef6e341fd56955c3adedf6ba90841a57be9c6a962d61ff18425593bfc2787c34c776fdc8ec711f8bb2da1ec08271fc8778a0499aef01c3a7694c384a4c037b WHIRLPOOL 19a9162586d31b76180cf561cd854dfce87431e20fd33c533aaafcb9d41b4eff54a07321499a5dc6256d6da4c252c503f332aa6854c33ec227bc1dc18584e78b
+DIST libnfs-1.9.5.tar.gz 141162 SHA256 dd99ffa02a3d9fc936976e199614e0d0e2516bd27ead5639c063b8504008a393 SHA512 fee676503b3655f3710342f5f6944f598b1e404f0a00891387d36d41f55f25f27254cbe061b8d8b00ee445a1bfd51df9c2cbccd72f3cdb0f7e8925691fcb2a4b WHIRLPOOL 631000670b9b7f5a1084e182aa793a70b844945d8e96ac3bcb6d035cd92c0a3aa304b8421d7d1ff998134ad991c3f258ff78f85861ce92b481fccd7826633860
+DIST libnfs-1.9.7.tar.gz 145925 SHA256 7c2e088f5fd85b791ab644a5221b717894208bc5fb8b8a5a49633802ecaa0990 SHA512 0dec9a6eee61bcab5a406b6f8bd50d15ffa257bc0fae7079e25a3e0ecb1177845514c232d699c67c59a3f1a269099a46225959d413301bf4550aa37504e2f492 WHIRLPOOL bc3e37b4c6174a1d9d14c9e6722cf03c1610e3c39b020ad0d9e8dfdeda7b2e06e7c0287a5b789d89d4d4434b46192f662e1d48cec2e1d666e647ef8e5f75d31d
+DIST libnfs-1.9.8.tar.gz 148757 SHA256 e95af693e763a504eee72dacf3dc6c1001d83e40b807e7e1d0be2eaf48af779c SHA512 2a0e11dde5a2c4d25fcf1040d04ad984fe3b2e2ce5f544d602becb55aebdabbfe29a3b961d3db7d034c918862b540d3a03735bbbad0606ff3a128c50c2dad666 WHIRLPOOL 2df1b66c2788fb9a676884504e0c1f10c9c0c697a0c52cd6df493a51eebcc0e55fa5c6587e7009f815b1a23981e52ece2a480b17d2e06da3232d45515ae0e648
+DIST libnfs-2.0.0.tar.gz 200932 SHA256 7ea6cd8fa6c461d01091e584d424d28e137d23ff4b65b95d01a3fd0ef95d120e SHA512 701dd5317b0395523be89123d473f4da5c3ff53c2e30004a922f649f0dbbd97546ee39ab34fce06278a8148c13200ca383726a0822d09846fad6e308f29e42c7 WHIRLPOOL e52a1d8b286ce1e10a710bbbcff083e2791f17ccc210c4aeaa1246bb8e3f867a96b7854ff9a640913a66dd9ae42b25b0514a172f5706c114882399b43f49fabf
+EBUILD libnfs-1.10.0.ebuild 1076 SHA256 538ed8249b0d558b6edc9caca505cc6bb480daebc166cf57b1ee85abbac50e08 SHA512 a98406e2047ef0f1f841af6874358125f58c12aef62f47d5259c5d38fd842c68807675d93f53a771d4bd11b1fe712df404ee074e64b694015e26b72efb10acf7 WHIRLPOOL c3f6e1b881b8a0a8fa949244ca1c466f716248cdac7225e57d707f652e9c98595a6c7ace99806dd7ae65040ce45d7f56135e30c4de892988527b86b65ccac0ca
+EBUILD libnfs-1.11.0.ebuild 1076 SHA256 538ed8249b0d558b6edc9caca505cc6bb480daebc166cf57b1ee85abbac50e08 SHA512 a98406e2047ef0f1f841af6874358125f58c12aef62f47d5259c5d38fd842c68807675d93f53a771d4bd11b1fe712df404ee074e64b694015e26b72efb10acf7 WHIRLPOOL c3f6e1b881b8a0a8fa949244ca1c466f716248cdac7225e57d707f652e9c98595a6c7ace99806dd7ae65040ce45d7f56135e30c4de892988527b86b65ccac0ca
+EBUILD libnfs-1.9.5.ebuild 1104 SHA256 d506ed8ffe8436df7000988f2fcd42400dc71468602ac9832f3fefaee566cf9b SHA512 ab70f6ec1e3e80aeaca04a8c01c8a27d01bb2ff3bbfc0f656f4d70a9a7db73ab7c385c8a292aa5cbbc6f4517de9c52f385c66010de1775f28e36af2a69a2fbb6 WHIRLPOOL 8de4b296457c8a3d33cdba20a5ef62de70a327e76f0f896c1b92c8486277113c58eb6b9a15006bfa7e7f8afc5897b5a27ae23bad6db5855c7d27c3c19372a9f3
+EBUILD libnfs-1.9.7.ebuild 1065 SHA256 b48a37469256196edb53dba41e826c304e9e923d8c9ad799e3b744cbb93ac8dc SHA512 27c789939b00ef3864474fd16ea24e337d53859c35ff0479b302d47ddea6e6e3d9321048be473602df865834248122c4232c72a6996a14a00b16c8bdf8641a60 WHIRLPOOL 8fd0218883ab724464ec3bdfdbfbe37be1c1145e40bbb8758ae552d9112f6a83400f33e5099ab4fe442a1fdd76d639947fdcd9fba9cc8feff286815f58fb74e5
+EBUILD libnfs-1.9.8.ebuild 1076 SHA256 538ed8249b0d558b6edc9caca505cc6bb480daebc166cf57b1ee85abbac50e08 SHA512 a98406e2047ef0f1f841af6874358125f58c12aef62f47d5259c5d38fd842c68807675d93f53a771d4bd11b1fe712df404ee074e64b694015e26b72efb10acf7 WHIRLPOOL c3f6e1b881b8a0a8fa949244ca1c466f716248cdac7225e57d707f652e9c98595a6c7ace99806dd7ae65040ce45d7f56135e30c4de892988527b86b65ccac0ca
+EBUILD libnfs-2.0.0.ebuild 1118 SHA256 e1c9c41355e599d938922ae6554f3eff33682931ecdf926d5ef2b76f3a27e74c SHA512 0bca1722a17557667b9c7c6996fee9fe98ccfeed7d9d74db0af1d265b99cdb2668c3a934398648c9615fd970972bad79234b28580bccee3a38eed934bd5ad7e0 WHIRLPOOL 6977038a16eec8f084ef2e9d6a54492f4031eaee8df665378e7d81ce0e49885539487e628f785b5b0fe0c9db6970cfc74b0c5adab6ccc0c1a5f3cfe352b0e30e
+EBUILD libnfs-9999.ebuild 1118 SHA256 e1c9c41355e599d938922ae6554f3eff33682931ecdf926d5ef2b76f3a27e74c SHA512 0bca1722a17557667b9c7c6996fee9fe98ccfeed7d9d74db0af1d265b99cdb2668c3a934398648c9615fd970972bad79234b28580bccee3a38eed934bd5ad7e0 WHIRLPOOL 6977038a16eec8f084ef2e9d6a54492f4031eaee8df665378e7d81ce0e49885539487e628f785b5b0fe0c9db6970cfc74b0c5adab6ccc0c1a5f3cfe352b0e30e
+MISC ChangeLog 4092 SHA256 16536451960e68816b8d069b33841233b31e0db1db6b626a04b4155b6ebe2f83 SHA512 3f085df7bc69d92818f7f67a96252ebcb8a5c05e24a233a1a75e449db550ee729e74012b5c460cd4b4cc329083a52c4ca70e8552019faa0d13cd119af6c3aa51 WHIRLPOOL 4341befccfe3aafd86a59eb9c76f310f3cd4183a94d3b603c0b94e36314309ca25f58e7c3e556834efb2ad6b75c2b02f169737e2395b9adc41007798fe072342
+MISC ChangeLog-2015 4120 SHA256 8bbb3389ecdc32a7edd96068b7f6debed3af3c4e353f2a21f55933ecfd14ca07 SHA512 b0537d7ef30d91f9f60892ba51789120480dd05dd338d1e146c10ac6a6d018a4a7842a2da5f99a8fbae05421f2e9a6df3b56a3bb4774db58d518192de978cf57 WHIRLPOOL 8aa0bbedf91e3686d0854d1e3d26e2b1b7f9741efd154e2fe24bdf547a534d5abbb56c351e7ac85fd20a00a0d310477c1fd8350834b7b1473cedb6541f86922b
+MISC metadata.xml 337 SHA256 4e06dca28108226d77929eff9608debbfa7066f8524740bbb71f5a527825a893 SHA512 aabcd286aba9ba93d7e64759ef0fb49b4d5ac99182453b2bf68727d0f41638640d312355465b8862b4f070f5bd47b1debbca635a07d7e44dde841da99405206d WHIRLPOOL 0b937b34050bf5a9aec93ee6cd0ea4e2966a8a36eb5befd29cc95464d68609a15fa701a6938ed3e2fc1ffde959b2eacc34f144a536b0712c8d2dc2b88825b739
diff --git a/net-fs/libnfs/files/libnfs-1.9.5-headers.patch b/net-fs/libnfs/files/libnfs-1.9.5-headers.patch
new file mode 100644
index 000000000000..96719ffd54c2
--- /dev/null
+++ b/net-fs/libnfs/files/libnfs-1.9.5-headers.patch
@@ -0,0 +1,86 @@
+From 0bfc3e09b7d7ca2b75d42c17874b89333b96f371 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 3 Dec 2012 22:30:04 -0500
+Subject: [PATCH] fix implicit decl warnings
+
+Include the proper headers to fix warnings like:
+libnfs-sync.c:1529:3: warning: implicit declaration of function 'gettimeofday' [-Wimplicit-function-declaration]
+libnfs-zdr.c:506:2: warning: implicit declaration of function 'getuid' [-Wimplicit-function-declaration]
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ lib/libnfs-sync.c | 1 +
+ lib/libnfs-zdr.c | 9 +++++++++
+ lib/libnfs.c | 1 +
+ lib/socket.c | 1 +
+ 4 files changed, 12 insertions(+)
+
+diff --git a/lib/libnfs-sync.c b/lib/libnfs-sync.c
+index 0fc1094..c140258 100644
+--- a/lib/libnfs-sync.c
++++ b/lib/libnfs-sync.c
+@@ -77,6 +77,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <assert.h>
++#include <sys/time.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+diff --git a/lib/libnfs-zdr.c b/lib/libnfs-zdr.c
+index c32f661..b6b3ed9 100644
+--- a/lib/libnfs-zdr.c
++++ b/lib/libnfs-zdr.c
+@@ -20,6 +20,10 @@
+ * i.e. zdrmem_create() buffers.
+ * It aims to be compatible with normal rpcgen generated functions.
+ */
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++
+ #ifdef WIN32
+ #include "win32_compat.h"
+ #endif
+@@ -28,9 +32,14 @@
+ #include "aros_compat.h"
+ #endif
+
++#ifdef HAVE_ARPA_INET_H
++#include <arpa/inet.h>
++#endif
++
+ #include <stdlib.h>
+ #include <string.h>
+ #include <time.h>
++#include <unistd.h>
+ #include "libnfs-zdr.h"
+
+ struct opaque_auth _null_auth;
+diff --git a/lib/libnfs.c b/lib/libnfs.c
+index 5692dc3..0a7d139 100644
+--- a/lib/libnfs.c
++++ b/lib/libnfs.c
+@@ -73,6 +73,7 @@
+ #include <string.h>
+ #include <assert.h>
+ #include <errno.h>
++#include <time.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+diff --git a/lib/socket.c b/lib/socket.c
+index 3f7f89f..f8db957 100644
+--- a/lib/socket.c
++++ b/lib/socket.c
+@@ -68,6 +68,7 @@
+ #include <fcntl.h>
+ #include <string.h>
+ #include <errno.h>
++#include <time.h>
+ #include <sys/types.h>
+ #include "libnfs-zdr.h"
+ #include "libnfs.h"
+--
+2.0.0
+
diff --git a/net-fs/libnfs/files/libnfs-1.9.5-implicit-internal.patch b/net-fs/libnfs/files/libnfs-1.9.5-implicit-internal.patch
new file mode 100644
index 000000000000..e702c81f5cb4
--- /dev/null
+++ b/net-fs/libnfs/files/libnfs-1.9.5-implicit-internal.patch
@@ -0,0 +1,27 @@
+From 2be32c3c41207c029f54ebd0f4aa08e216bd3c21 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Fri, 8 Aug 2014 05:45:32 -0400
+Subject: [PATCH 3/3] fix implicit decls of rpc_{g,s}et_error
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ lib/libnfs-zdr.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/lib/libnfs-zdr.c b/lib/libnfs-zdr.c
+index b6b3ed9..90abe26 100644
+--- a/lib/libnfs-zdr.c
++++ b/lib/libnfs-zdr.c
+@@ -41,6 +41,9 @@
+ #include <time.h>
+ #include <unistd.h>
+ #include "libnfs-zdr.h"
++#include "libnfs.h"
++#include "libnfs-raw.h"
++#include "libnfs-private.h"
+
+ struct opaque_auth _null_auth;
+
+--
+2.0.0
+
diff --git a/net-fs/libnfs/libnfs-1.10.0.ebuild b/net-fs/libnfs/libnfs-1.10.0.ebuild
new file mode 100644
index 000000000000..f1bc7bb76502
--- /dev/null
+++ b/net-fs/libnfs/libnfs-1.10.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF="1"
+
+inherit eutils
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/sahlberg/${PN}.git"
+ inherit git-2 autotools-utils
+else
+ SRC_URI="https://github.com/sahlberg/${PN}/archive/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~x86"
+ inherit autotools-utils
+fi
+
+DESCRIPTION="Client library for accessing NFS shares over a network"
+HOMEPAGE="https://github.com/sahlberg/libnfs"
+
+LICENSE="LGPL-2.1 GPL-3"
+SLOT="0/8" # sub-slot matches SONAME major
+IUSE="examples static-libs"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${PN}-${P}"
+
+src_install() {
+ autotools-utils_src_install
+ if use examples; then
+ # --enable-examples configure switch just compiles them
+ # better install sources instead
+ exeinto /usr/share/doc/${PF}/examples/
+ for program in $(grep PROGRAMS examples/Makefile.am | cut -d= -f2); do
+ doexe examples/${program}.c
+ done
+ fi
+}
diff --git a/net-fs/libnfs/libnfs-1.11.0.ebuild b/net-fs/libnfs/libnfs-1.11.0.ebuild
new file mode 100644
index 000000000000..f1bc7bb76502
--- /dev/null
+++ b/net-fs/libnfs/libnfs-1.11.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF="1"
+
+inherit eutils
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/sahlberg/${PN}.git"
+ inherit git-2 autotools-utils
+else
+ SRC_URI="https://github.com/sahlberg/${PN}/archive/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~x86"
+ inherit autotools-utils
+fi
+
+DESCRIPTION="Client library for accessing NFS shares over a network"
+HOMEPAGE="https://github.com/sahlberg/libnfs"
+
+LICENSE="LGPL-2.1 GPL-3"
+SLOT="0/8" # sub-slot matches SONAME major
+IUSE="examples static-libs"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${PN}-${P}"
+
+src_install() {
+ autotools-utils_src_install
+ if use examples; then
+ # --enable-examples configure switch just compiles them
+ # better install sources instead
+ exeinto /usr/share/doc/${PF}/examples/
+ for program in $(grep PROGRAMS examples/Makefile.am | cut -d= -f2); do
+ doexe examples/${program}.c
+ done
+ fi
+}
diff --git a/net-fs/libnfs/libnfs-1.9.5.ebuild b/net-fs/libnfs/libnfs-1.9.5.ebuild
new file mode 100644
index 000000000000..92631d7dc172
--- /dev/null
+++ b/net-fs/libnfs/libnfs-1.9.5.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF="1"
+
+inherit eutils
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/sahlberg/${PN}.git"
+ inherit git-2 autotools-utils
+else
+ SRC_URI="https://github.com/sahlberg/${PN}/archive/${P}.tar.gz"
+ KEYWORDS="alpha amd64 arm hppa ppc ppc64 x86"
+ inherit autotools-utils
+fi
+
+DESCRIPTION="Client library for accessing NFS shares over a network"
+HOMEPAGE="https://github.com/sahlberg/libnfs"
+
+LICENSE="LGPL-2.1 GPL-3"
+SLOT="0"
+IUSE="examples static-libs"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${PN}-${P}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.9.5-headers.patch
+ "${FILESDIR}"/${PN}-1.9.5-implicit-internal.patch
+)
+
+src_install() {
+ autotools-utils_src_install
+ if use examples; then
+ # --enable-examples configure switch just compiles them
+ # better install sources instead
+ exeinto /usr/share/doc/${PF}/examples/
+ for program in $(grep PROGRAMS examples/Makefile.am | cut -d= -f2); do
+ doexe examples/${program}.c
+ done
+ fi
+}
diff --git a/net-fs/libnfs/libnfs-1.9.7.ebuild b/net-fs/libnfs/libnfs-1.9.7.ebuild
new file mode 100644
index 000000000000..ba92c47cf7a2
--- /dev/null
+++ b/net-fs/libnfs/libnfs-1.9.7.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF="1"
+
+inherit eutils
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/sahlberg/${PN}.git"
+ inherit git-2 autotools-utils
+else
+ SRC_URI="https://github.com/sahlberg/${PN}/archive/${P}.tar.gz"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh x86"
+ inherit autotools-utils
+fi
+
+DESCRIPTION="Client library for accessing NFS shares over a network"
+HOMEPAGE="https://github.com/sahlberg/libnfs"
+
+LICENSE="LGPL-2.1 GPL-3"
+SLOT="0/8" # sub-slot matches SONAME major
+IUSE="examples static-libs"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${PN}-${P}"
+
+src_install() {
+ autotools-utils_src_install
+ if use examples; then
+ # --enable-examples configure switch just compiles them
+ # better install sources instead
+ exeinto /usr/share/doc/${PF}/examples/
+ for program in $(grep PROGRAMS examples/Makefile.am | cut -d= -f2); do
+ doexe examples/${program}.c
+ done
+ fi
+}
diff --git a/net-fs/libnfs/libnfs-1.9.8.ebuild b/net-fs/libnfs/libnfs-1.9.8.ebuild
new file mode 100644
index 000000000000..f1bc7bb76502
--- /dev/null
+++ b/net-fs/libnfs/libnfs-1.9.8.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF="1"
+
+inherit eutils
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/sahlberg/${PN}.git"
+ inherit git-2 autotools-utils
+else
+ SRC_URI="https://github.com/sahlberg/${PN}/archive/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~x86"
+ inherit autotools-utils
+fi
+
+DESCRIPTION="Client library for accessing NFS shares over a network"
+HOMEPAGE="https://github.com/sahlberg/libnfs"
+
+LICENSE="LGPL-2.1 GPL-3"
+SLOT="0/8" # sub-slot matches SONAME major
+IUSE="examples static-libs"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${PN}-${P}"
+
+src_install() {
+ autotools-utils_src_install
+ if use examples; then
+ # --enable-examples configure switch just compiles them
+ # better install sources instead
+ exeinto /usr/share/doc/${PF}/examples/
+ for program in $(grep PROGRAMS examples/Makefile.am | cut -d= -f2); do
+ doexe examples/${program}.c
+ done
+ fi
+}
diff --git a/net-fs/libnfs/libnfs-2.0.0.ebuild b/net-fs/libnfs/libnfs-2.0.0.ebuild
new file mode 100644
index 000000000000..6a1db823ef98
--- /dev/null
+++ b/net-fs/libnfs/libnfs-2.0.0.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF="1"
+
+inherit eutils autotools autotools-utils
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/sahlberg/${PN}.git"
+ inherit git-2
+else
+ SRC_URI="https://github.com/sahlberg/${PN}/archive/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~x86"
+fi
+
+DESCRIPTION="Client library for accessing NFS shares over a network"
+HOMEPAGE="https://github.com/sahlberg/libnfs"
+
+LICENSE="LGPL-2.1 GPL-3"
+SLOT="0/11" # sub-slot matches SONAME major
+IUSE="examples static-libs"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${PN}-${P}"
+
+src_prepare() {
+ default
+
+ epatch_user
+
+ eautoreconf
+}
+
+src_install() {
+ autotools-utils_src_install
+ if use examples; then
+ # --enable-examples configure switch just compiles them
+ # better install sources instead
+ exeinto /usr/share/doc/${PF}/examples/
+ for program in $(grep PROGRAMS examples/Makefile.am | cut -d= -f2); do
+ doexe examples/${program}.c
+ done
+ fi
+}
diff --git a/net-fs/libnfs/libnfs-9999.ebuild b/net-fs/libnfs/libnfs-9999.ebuild
new file mode 100644
index 000000000000..6a1db823ef98
--- /dev/null
+++ b/net-fs/libnfs/libnfs-9999.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+AUTOTOOLS_AUTORECONF="1"
+
+inherit eutils autotools autotools-utils
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/sahlberg/${PN}.git"
+ inherit git-2
+else
+ SRC_URI="https://github.com/sahlberg/${PN}/archive/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~x86"
+fi
+
+DESCRIPTION="Client library for accessing NFS shares over a network"
+HOMEPAGE="https://github.com/sahlberg/libnfs"
+
+LICENSE="LGPL-2.1 GPL-3"
+SLOT="0/11" # sub-slot matches SONAME major
+IUSE="examples static-libs"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${PN}-${P}"
+
+src_prepare() {
+ default
+
+ epatch_user
+
+ eautoreconf
+}
+
+src_install() {
+ autotools-utils_src_install
+ if use examples; then
+ # --enable-examples configure switch just compiles them
+ # better install sources instead
+ exeinto /usr/share/doc/${PF}/examples/
+ for program in $(grep PROGRAMS examples/Makefile.am | cut -d= -f2); do
+ doexe examples/${program}.c
+ done
+ fi
+}
diff --git a/net-fs/libnfs/metadata.xml b/net-fs/libnfs/metadata.xml
new file mode 100644
index 000000000000..0a94e5f6ef13
--- /dev/null
+++ b/net-fs/libnfs/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">sahlberg/libnfs</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-fs/metadata.xml b/net-fs/metadata.xml
new file mode 100644
index 000000000000..e419bebd83ba
--- /dev/null
+++ b/net-fs/metadata.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The net-fs category contains network filesystem packages.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie net-fs enthült Netzwerkdateisysteme.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría net-fs contiene paquetes de sistemas de ficheros en red.
+ </longdescription>
+ <longdescription lang="ja">
+ net-fsカテゴリーにはネットワーク・ファイルシステムのパッケージが含まれています。
+ </longdescription>
+ <longdescription lang="nl">
+ De net-fs categorie bevat netwerk-bestandssystemen.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm net-fs chứa các gói hệ tập tin mạng.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria net-fs contiene pacchetti per i filesystem di rete.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria net-fs contém pacotes para sistemas de arquivos de
+ rede.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria net-fs zawiera pakiety związane z NFS, sieciowym systemem
+ plików.
+ </longdescription>
+</catmetadata>
+
diff --git a/net-fs/minio/Manifest b/net-fs/minio/Manifest
new file mode 100644
index 000000000000..9616b98ec5df
--- /dev/null
+++ b/net-fs/minio/Manifest
@@ -0,0 +1,5 @@
+DIST minio-0_pre20170613.tar.gz 5037377 SHA256 a44ee8c0933e55c1c561d4ed154564af1d45571a2cd0b00b0788b59d9475c402 SHA512 3844ce71dc5b7736e9a1ecdc8771b863879b195f22546e74e5c29a8100c3102bced971f138f19fd7788d2cc6cf6c766f3b9727af8770ca59cc4d621e92dd22a7 WHIRLPOOL cf8809d03530468e5bff26e6afc3f031d78f979dd02f254d9f50faf515e94d87de2f45a39b9dace65f28928698a12f94891c9c0ef6d51b3e18bd0de41f06ef7f
+DIST minio-0_pre20170805.tar.gz 6891365 SHA256 78d4cf72bca7e9c1e2b6c8afa2eec13139c3d246672737ad4b07be16f3f4d8a1 SHA512 318bbebf7cddc956e2ac5bb39e3316bb43b71c3a57bfe00fa868fe3ac94f7eabdcb8c62b1460105051b89014e6a2bb6eee7e6a5da7b17e512c9af8437aec75fa WHIRLPOOL 5f09f7f2e177dca8abf8cd61b556f3b5ca252ec365dfffc6f933d5967b423b2d5d023b8aece2f3c00f4388320b888676eab27def23e9f623f2ee959a9be06e27
+EBUILD minio-0_pre20170613.ebuild 1123 SHA256 36c7b2b369d2d5e35714d6cd56c1ce685f1ff16051b3eb166c4cf72924614179 SHA512 234c685e79254311efdfc195375b80f566c63a8ad0c3fafdf2227fc7dcdb2b93de2eef022dc5c2cd2aacf9025e08348de706a74a45608262baaff1fc21d6535a WHIRLPOOL 17391e3f87cee75b87b5119967b0654723845a268e7ff88f6d1a5cee41fc0460b931d3480e7a9d16f20fa58972a7a535ffb859b04adf9c02e0d9ac43d51696c7
+EBUILD minio-0_pre20170805.ebuild 1123 SHA256 41d86ce8fc59039490a27ad7137f1bf80f6553863b7cd925e35c710ce317137a SHA512 6ba20846467a4a54325d2db0c0f0e7047516500e38ff056377288523f12ee2a7ff40029e84d93ae584b4dc2bd069f27f9703549e07e2162984b62b198cd71ed7 WHIRLPOOL c3370646238d607ec0766f947f778c45b8d5159409264cfe521a58a38d2946965c089afbca7e81aa2ca23b3be3df17fc9cf806fb97495fc21bd6470f50dd1478
+MISC metadata.xml 245 SHA256 6fedd876236c2f1fe2687e73628381650ebecef9734f88f6d483bec5bf475a7f SHA512 ce14e948c06d19eefb8504b77746e191099fd4d66083ad01ac62d874029b397af4edc5940312dac09c9ed18ccbcd98909b93fc0bc463c15db97bf68d13c9fec4 WHIRLPOOL 4957affde63b54e118270c40ce12683872777b41ec1a798f7b03807a99917148279d392f71cbcf95ec4e5d586ee5fc0400aea77d9e46083873a441a4907ba13d
diff --git a/net-fs/minio/metadata.xml b/net-fs/minio/metadata.xml
new file mode 100644
index 000000000000..97df2a00971b
--- /dev/null
+++ b/net-fs/minio/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mrueg@gentoo.org</email>
+ <name>Manuel Rüger</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-fs/minio/minio-0_pre20170613.ebuild b/net-fs/minio/minio-0_pre20170613.ebuild
new file mode 100644
index 000000000000..18e6eb2062eb
--- /dev/null
+++ b/net-fs/minio/minio-0_pre20170613.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit golang-build golang-vcs-snapshot
+
+EGO_PN="github.com/minio/minio"
+VERSION="2017-06-13T19-01-01Z"
+EGIT_COMMIT="b9f622824ac17d3e0577d8a9b81a707666cc8cf1"
+ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64"
+
+DESCRIPTION="An Amazon S3 compatible object storage server"
+HOMEPAGE="https://github.com/minio/minio"
+SRC_URI="${ARCHIVE_URI}"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE=""
+
+RESTRICT="test"
+
+src_prepare() {
+ default
+ sed -i -e "s/time.Now().UTC().Format(time.RFC3339)/\"${VERSION}\"/"\
+ -e "s/-s //"\
+ -e "/time/d"\
+ -e "s/+ commitID()/+ \"${EGIT_COMMIT}\"/"\
+ src/${EGO_PN}/buildscripts/gen-ldflags.go || die
+}
+
+src_compile() {
+ pushd src/${EGO_PN} || die
+ MINIO_RELEASE="${VERSION}"
+ go run buildscripts/gen-ldflags.go
+ GOPATH="${S}" go build --ldflags "$(go run buildscripts/gen-ldflags.go)" -o ${PN} || die
+ popd || die
+}
+
+src_install() {
+ pushd src/${EGO_PN} || die
+ dodoc -r README.md CONTRIBUTING.md MAINTAINERS.md docs
+ dobin minio
+ popd || die
+}
diff --git a/net-fs/minio/minio-0_pre20170805.ebuild b/net-fs/minio/minio-0_pre20170805.ebuild
new file mode 100644
index 000000000000..c3d427448b64
--- /dev/null
+++ b/net-fs/minio/minio-0_pre20170805.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit golang-build golang-vcs-snapshot
+
+EGO_PN="github.com/minio/minio"
+VERSION="2017-08-05T00-00-53Z"
+EGIT_COMMIT="aeafe668d8b6d25caac671d59e2b0f0473ce35d0"
+ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64"
+
+DESCRIPTION="An Amazon S3 compatible object storage server"
+HOMEPAGE="https://github.com/minio/minio"
+SRC_URI="${ARCHIVE_URI}"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE=""
+
+RESTRICT="test"
+
+src_prepare() {
+ default
+ sed -i -e "s/time.Now().UTC().Format(time.RFC3339)/\"${VERSION}\"/"\
+ -e "s/-s //"\
+ -e "/time/d"\
+ -e "s/+ commitID()/+ \"${EGIT_COMMIT}\"/"\
+ src/${EGO_PN}/buildscripts/gen-ldflags.go || die
+}
+
+src_compile() {
+ pushd src/${EGO_PN} || die
+ MINIO_RELEASE="${VERSION}"
+ go run buildscripts/gen-ldflags.go
+ GOPATH="${S}" go build --ldflags "$(go run buildscripts/gen-ldflags.go)" -o ${PN} || die
+ popd || die
+}
+
+src_install() {
+ pushd src/${EGO_PN} || die
+ dodoc -r README.md CONTRIBUTING.md MAINTAINERS.md docs
+ dobin minio
+ popd || die
+}
diff --git a/net-fs/ncpfs/Manifest b/net-fs/ncpfs/Manifest
new file mode 100644
index 000000000000..7d9908e1e03a
--- /dev/null
+++ b/net-fs/ncpfs/Manifest
@@ -0,0 +1,24 @@
+AUX ipx.confd 604 SHA256 ae98222d9b94a86fad8f75303a084ee65599987f9681652118d1f014e74e9493 SHA512 b20a772fec2130054037f71a930e237baa33c264bf090568ad1a248c20680b994144d02d6488dad42c3643516f55da5171415b10aab9a908544f571c507d5690 WHIRLPOOL 531ac0c32a2e82160184e520fafdbcf11287ba212fb3619d98cdd28a24287ef68bd0c56931a765ec55ab8be300e3d979d3e878f729bf8bb852b9694594a50439
+AUX ipx.init 872 SHA256 d3b2855bda1227d1ef7a38f028c80c8072338b2e540ad82429c3384d9e69aeb9 SHA512 a64efeecfdb847ad16289ab5b5c4ebba8d6c910f50a378608db9aa0ef09210c4a054531abf2b4ee84b5c8ab440df61970172e7421ccdb4340127c2bb4c283ec5 WHIRLPOOL 99a62843b5a945f174a6ef47a5805516f29c36bffd716f0396cfe8fb8a984a8f6da2ea1234a605c2921f70d09b07ef2e9b336fb5a12008dfa55958b90b05cda2
+AUX ncpfs-2.2.5-php.patch 559 SHA256 240fa4b2eba421031e54242af11d270115f180ab9a2f39df5081a984aab7e14c SHA512 1c8509216b759df915f046c42dbb8a56d101ef9382f22f7830c089fc4f4310c75291c3984c1f079fe7b23f94717debb272c7d2b166619d415ea9df87168a52ca WHIRLPOOL 5fe06ae1208250184e2f14465914d6249759677ad11f23c399b4f6d01b023650e4d6f9e3aed2638fa6e1eefa5993c86c1cc4b3d3532765f7ea3c583ee26b0a0a
+AUX ncpfs-2.2.6-align-fix.patch 421 SHA256 bc1b5e972b28a6ac6e3bf37730e7f69f91528f69aff1a98809938a3e054eb5e7 SHA512 cf76a9866926048a0792e315c1296cb144432f8d576d9e7d68004f5eb7e10a19ff097ea4d450d2f36da05d97650f1a3411cb6a45bd88b44f6050d5b6df254528 WHIRLPOOL 75b9f12ed0b01acbf11b5ce0ebdff7fef7b505fa23767059af7d1bc438453c5ab307bdc4e1e2688a20b9fd630b47595f0dac9a2009d62b0155b7cd57b6797891
+AUX ncpfs-2.2.6-drop-kernel-check.patch 728 SHA256 b695ab86896abebaa9cd4160c8273ff32b8eee932be2210114a36dd012af1811 SHA512 6433bd1df6e9d830b0e23882dd4d00afddbd9780d994de0ca480155d817e077b88ae7f46538855631e14a62cc52ec8c1fc5c230b1b64687ada5f2cccb61e392a WHIRLPOOL 53c4c55416c0471fae1a99a00066a41b5ce30a0bf3658e5efc31287c4348efe1a93403268634e0d1ec4618645ef7a559c314483f0bcb7911fca329a2d2dac39e
+AUX ncpfs-2.2.6-drop-mtab-support.patch 7196 SHA256 6e6712b7ec51bfe71447a7cf94d6498245c73666ad69e6225bba4566fd6475cd SHA512 a7498d8927c251f882f5d63c2250a8ef2ec72191531bd95bdd1c65aad1f8600602dd2ae54fc0ed6ca95c431fe330168abe972d3d3acad8e71733dde1452eed0b WHIRLPOOL 9bf268cca881222550bc81bd352a9acd1feb43befd9732111ca622f2b8184b5eee1ae659331feeb12e146132832ff565f8c29b8b387309cbf3a35e9b17781a39
+AUX ncpfs-2.2.6-gcc4.patch 1271 SHA256 27e730a4bf83ed825f2c7128e0e660ad82d75378ee178731782dd55e71a3e460 SHA512 b67b3a8267a76ef1fe3a128443fa96831896c3cac8f41136d3932816dfe9ab5a4d55258b6f19288c543015e53e41b691577484abf57f9163c0e3bebb4742cdbe WHIRLPOOL 6b2c850231f3295e6a029ad7b9636ed3130bead9859d0ce4b0deb2ae70eac76832cc29d4ddfc7b1cca0151995f15147a9a5e2a0c6f71b2f6b9b5a9f2af9d8a77
+AUX ncpfs-2.2.6-getuid-fix.patch 5121 SHA256 67e61f5991f2a5c9f28661055ab23e3acec1c01a4fc45397fa014895e994e50b SHA512 46f02242198829dc615dd9d07ec7502e88d5738b5055e480758ddabe76b65432d436b24607a0131fd33724fa1cec95b90460b8b27c887d29c5c71a410d89edd8 WHIRLPOOL 233820039cf59f5da18c630040247da92389793a3b4da8f26e8e32405cf69a9557d38781dbee1b186e58131aa136fb0f1e282c881d24d0fb80d0ba077dc87369
+AUX ncpfs-2.2.6-ldflags-support.patch 5974 SHA256 078f3ceb155a7ab13d0be70079a09494343d738aa9ae0e7ca606e8a2c13047e2 SHA512 4d9d6ed8021b9a9a64622e3b2af63616c69ba77ee8b4d83930d34071ac4a1d2f273e02a7ef7051edc5f816a860f977ba6474710e9ced91ff89560739976b10f6 WHIRLPOOL afb0bc5d5a5668e84ce62046f2f1ac45d7d1e8d197ecb069d01fef7ca11b2474fd51ff8aab2902b2aff6c751adec5d3486eca14500a1b529b4b79e685424a00f
+AUX ncpfs-2.2.6-makefile-fix-soname-link.patch 771 SHA256 db5f6c3bfa44de96c0ea7990dfef45bedd65d8008bdaac42749d391041b8b0d7 SHA512 0f5f6143e6e66a7f2562c8db7a184df0a507cb1d19c32cda787ba989d0827175d198f400c6402ef399436fb4538ee067e432c5dd5b64509e0cddc4a4aef3f0dd WHIRLPOOL a7327431ae01fdb5ee4f9fd822208e7b82568071114107278dd24574d6172f425412e1d68a5c68c6fdb973572dfd24a48e3d16b9620ad31eef58412b17993328
+AUX ncpfs-2.2.6-missing-includes.patch 758 SHA256 5231d7aaade8af5cec769150d2118d257930a371f6faf7bdde9c6427d2969571 SHA512 4fab8be6c46d494721d6186055b03b6274d77f8e5a2e1bb1a28a73e8ec57805e4ca32b4a0ea4c853c8ebf023b88cc09a50307b04f97d42d5ecffd486c8a4892e WHIRLPOOL d26795d392001d47a972d88b6b0c41a51dfd7fc5d7b7bb19c119beccdf212af125f724ba55f3644e45c32ae2ea176a8dc6d69eb0033533b627e17dcc0801efb8
+AUX ncpfs-2.2.6-multiple-vulns.patch 14138 SHA256 5603915028702fdf6b2b09be9da1e1efaf4283a6f09c8a56aaae783e40707605 SHA512 a58a3d5f4ff7540a880e064bfe7602d38671ddd737bc8e4a9e48ef52f0864de8e0ae51f0fea2ae0be82cc6910d4a47ff8562f9a730dd1930a37fd870bc2823c9 WHIRLPOOL 4f3d428ec4615f931368d8f277303caa3cebc6a796b47ddce179f6cd947b3c1f71e75ec6fd273051452c48acd7bb29558ff9c410e157020eae54308324390b26
+AUX ncpfs-2.2.6-no-suid-root.patch 544 SHA256 d743c2266f528ea592dade37279f0e2856948ddda1c839c8eff99faba9dda47c SHA512 697d577aab12c94cbdb36c2f9f2cd51b82e3ab5efb4a9e8246a7c93b7004d004e7d4fdb1ec003585daf1a11f9f559fd65ea86fe8933f2a7d89b0ce810f21c975 WHIRLPOOL b02ebf2006fc16b53eed6091be67692ccb80ac120d79e576114050afdfdeea72ead4ea396c4a092d42b9e1ed6c38bb055474fc5aa14169128b89f9394f6ba7ea
+AUX ncpfs-2.2.6-pam_ncp_auth-fix.patch 556 SHA256 9cbf947dad700787e084c74d00a9a68ac0bddeb89568c6546816560c7255e93e SHA512 3c20c36bb2b8c72440e359bb3f66d5a91bc91132accc518bae8db0fbc77aaf966e676f494c8add959178e315513aaddc9f627a05b9e0c376cf7ece5bba0b0dde WHIRLPOOL 6cddf88d0b0aac79d8855a77fe7d2ffe36a6b18c17585927e84b2d084a234868e8eb4b86fbafa2521ccd0c19a6431fb909cfc860af4a5465f518dcf1efd46fe6
+AUX ncpfs-2.2.6-remove-libncp_atomic-header.patch 572 SHA256 881a5c6ebe5bed2563a69bec90c2bf19c4fbc14a7e0fb972ce44917610d5d946 SHA512 07689c979e8e6a40aca410ac8211c6af9fa640679c34ab3431e70c849e9f3c42d26b204310a697ef1494f33b5296e642b977dfc56453f680527ee54d697abe1c WHIRLPOOL 1cd8e5a1eddddbf4a370f1864b5a4294268dc609035ff6ab6451247d1c20287a2e2afbc4ad11c7d225b98cb30d7688f1a3c2e59d5b802ed79de6bb79806fbd83
+AUX ncpfs-2.2.6-remove-packed-attrib.patch 10312 SHA256 f1c587b329224f34f351e08b32333e854539223d337e6bb2fdadf28c2130673b SHA512 efd11c2cf08f3b7b1458b836ee863f31e3ae470986a02a3d2db0ec6fbb7a984e2d33643765d7223b797732d80187412a907a9ca971233eb0f95ed4744ef6f44a WHIRLPOOL 187d2c71547de0de2007f872a53a7c4545a2ace4d258fc93802283278202eb0db7fbef70c7a6f7210e8f037e65399c76fa57def0fe73591d8d24967432be9a4c
+AUX ncpfs-2.2.6-servername-array-fix.patch 523 SHA256 8dd6be08b94259051c9cb8158a8375c4a7e35c5fc32301073ec174399458812c SHA512 10c8a0b7c6d715018acf77ea3bcca2e50add48d479cc0ee07035f3f8fb910069c2c508a25ab3de945ef19c78add6d8192f0cb484e756d9a15ceb3afcd8195a69 WHIRLPOOL ae9799b79681c8eadb5e5dc6c4c0f4e7fd4c5040fbaa84a166bf09d24e1e1fb6cdb0842acafefa3b6a9f0f6cb3e2ed1593898beb79fcee329b6a5e8f266b5d6c
+AUX ncpfs-2.2.6-zend_function_entry.patch 296 SHA256 8b598b730a313181e7d1c3f26b3daf7342ff74f0a8ba1ad4dd8f7628047fe1e2 SHA512 c96723a840cb1b0cdddb91ebe74620b87a32350be084f21b741bda4e399a7648fd00522e9f2ec8404d5a98835d3f5a343dd588f4279848cc031de5bed01680e0 WHIRLPOOL 1c7ebde603741a0d157c7d8cbf4d0910758105cdff5a00074c6161983835f91b134a5bdb94782232a82403bc76e8ac67df145529352e162e10524782d1447e8c
+DIST ncpfs-2.2.6.tar.gz 2100545 SHA256 2837046046bcdb46d77a80c1d17dbfd15e878700e879edab4cda9f080e0337f9 SHA512 51f85eaae85deb66cea2ff434974699f6aa45ed1ed75217ef6176ac0b7d0f9f1c4fb186afc64c1b495474d5bad9ac7614033128c0bec39c05de723a9b29c8602 WHIRLPOOL c0d4cca71fb3921e39fc6def9932d5a2500a65c7ca60f15ee09eef25637f7653df489c1947b9880f5c4eb3fab11cba663b8604fad8989170b3a74994cd4eb847
+EBUILD ncpfs-2.2.6-r3.ebuild 2604 SHA256 548c6982e15b1645d6ce915cc15722222861291ced326de57f3035b24a73f250 SHA512 c81d58564071787615b572ed360230ad2fa2d8030a2a8aefa778467b7be7d9726c5556bb7faad3f73e7a92341a33aebc61cb812a951d9f7c2970424ef733b976 WHIRLPOOL c71d98b4d73f7a779b69795cc732b81466634ce42564fe4f51232b5436800ff959a30e88a2a76fd964ae46c50c2773ecc6a9d7000d9f687feea2127d07e0315a
+EBUILD ncpfs-2.2.6-r4.ebuild 2449 SHA256 2aba7d5e165e917b9efdccb2da65bb4820dded35d3f5d7a23a70bba1fc01728d SHA512 46cf6f9b1968528649df09596d097b7f775fb2ac61e69ebedce78bb7ae0c7c1622d3febc9d25245278de73c938edf488f99712dac5c7db4aa4a3f150e83830e8 WHIRLPOOL e9e71f4a7285bf560a3c554fe6936abb285e282a9ac1ad549c7bc08122fc85e177822e18ec8123faa895aaf063641b41a4384447584a3ea212de6fe92cdbbc13
+MISC ChangeLog 3198 SHA256 66998e5598e9a69af8e1a920ea855fa17a41a6b638e2b66f144da17fd8c827d8 SHA512 43aef9d35157e635d79e04cabc0629f2122138c750ac5ce1bb483691038551967b810ff2e941946dc21574bb00e364fa40600b2a0f2677c997ba11ed93f8decf WHIRLPOOL 53664864477bc393b34edd99d18c4d77e18a7d6e9782f4b91f6fc0ff278f452e384c4504ca5f8ba15293ad71c1ada117f716178a464556edaa5562b4d4612b65
+MISC ChangeLog-2015 6601 SHA256 81195998789b5a72a2a25c93192a47984ff6d6b482841749d4e0709f0c0c3fd3 SHA512 4e3bacb85d64cdd4b3240ea20c794e0354bfc85434ff3464a9d0f931ea04e2a90bfb17d2b13be3b67aa2208c99d89f492ae1478aa7664f034502ccbbf74a617e WHIRLPOOL 685e523ccc10cec4b95b205ee94134473c942e4b91c767635e03ac345e4b64ce1d8c713522202abbecc85d135aa016038c7f75c23c3b02c7f4cdc391fa8e1789
+MISC metadata.xml 376 SHA256 8f5abedbae70054852c88f3336a36bc4450b5dab797e6fb343b04fcea638a10d SHA512 dacdb06d762397d05a6ba195648173ddd13822bc020fd0c8ed12148003e9ee651636f162860c5aace8e1182111da4082d2c509a20e8523bd8ed05ef04c51afec WHIRLPOOL 8963090f9ff93add22124bd30c90b47ba11d3bf775bba3792c8a175e6f0ce065c67bb2f76c30350f9e923659fca920074021f1da07a09c76f225c2a569143074
diff --git a/net-fs/ncpfs/files/ipx.confd b/net-fs/ncpfs/files/ipx.confd
new file mode 100644
index 000000000000..ca778f4e286a
--- /dev/null
+++ b/net-fs/ncpfs/files/ipx.confd
@@ -0,0 +1,27 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Config file for /etc/init.d/ipx
+
+# Automatically selecting a primary interface.
+IPX_AUTO_PRIMARY=on
+
+# Automatically creating interfaces.
+IPX_AUTO_INTERFACE=on
+
+# Interface to which IPX sockets are bound.
+IPX_DEVICE=eth0
+
+# The IPX frame type to use.
+# Valid values are: 802.2, 802.3, SNAP, & EtherII.
+IPX_FRAME=802.2
+
+# Create a special kind of IPX interface that does not
+# have a physical device or frame type.
+IPX_INTERNAL_NET=no
+
+# Network number
+IPX_NETNUM=1
+
+# Node number
+IPX_NODENUM=1
diff --git a/net-fs/ncpfs/files/ipx.init b/net-fs/ncpfs/files/ipx.init
new file mode 100644
index 000000000000..e4aa25716c5d
--- /dev/null
+++ b/net-fs/ncpfs/files/ipx.init
@@ -0,0 +1,41 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+#NB: Config is in /etc/conf.d/ipx
+
+depend() {
+ need net netmount
+}
+
+start() {
+ local retval=0
+
+ ebegin "Bringing IPX up"
+ if [ ${IPX_INTERNAL_NET} = "yes" ]
+ then
+ /usr/bin/ipx_internal_net add ${IPX_NETNUM} ${IPX_NODENUM}
+ retval=$?
+ else
+ /usr/bin/ipx_interface add -p ${IPX_DEVICE} \
+ ${IPX_FRAME} ${IPX_NETNUM}
+ retval=$?
+ fi
+
+ /usr/bin/ipx_configure \
+ --auto_primary=${IPX_AUTO_PRIMARY} \
+ --auto_interface=${IPX_AUTO_INTERFACE}
+ retval=$(( $retval + $? ))
+ eend ${retval} "Failed to bring IPX up"
+}
+
+stop() {
+ local retval=0
+
+ ebegin "Bringing IPX down"
+ /usr/bin/ipx_configure --auto_primary=off --auto_interface=off
+ retval=$?
+ /usr/bin/ipx_interface delall
+ retval=$(( $retval + $? ))
+ eend ${retval} "Failed to down IPX"
+}
diff --git a/net-fs/ncpfs/files/ncpfs-2.2.5-php.patch b/net-fs/ncpfs/files/ncpfs-2.2.5-php.patch
new file mode 100644
index 000000000000..81908acd6c0b
--- /dev/null
+++ b/net-fs/ncpfs/files/ncpfs-2.2.5-php.patch
@@ -0,0 +1,16 @@
+--- a/contrib/php/build/rules.mk.orig 2004-12-09 13:01:04.417854240 +0000
++++ b/contrib/php/build/rules.mk 2004-12-09 13:01:42.460070944 +0000
+@@ -63,10 +63,10 @@
+
+ install-modules:
+ @test -d modules && \
+- $(mkinstalldirs) $(moduledir) && \
+- echo "installing shared modules into $(moduledir)" && \
++ $(mkinstalldirs) $(DESTDIR)/$(moduledir) && \
++ echo "installing shared modules into $(DESTDIR)/$(moduledir)" && \
+ rm -f modules/*.la && \
+- cp modules/* $(moduledir) || true
++ cp modules/* $(DESTDIR)/$(moduledir) || true
+
+ include $(builddir)/.deps
+
diff --git a/net-fs/ncpfs/files/ncpfs-2.2.6-align-fix.patch b/net-fs/ncpfs/files/ncpfs-2.2.6-align-fix.patch
new file mode 100644
index 000000000000..49d3c386d5a1
--- /dev/null
+++ b/net-fs/ncpfs/files/ncpfs-2.2.6-align-fix.patch
@@ -0,0 +1,12 @@
+diff -Naurp ncpfs-2.2.6.orig/lib/ndslib.c ncpfs-2.2.6/lib/ndslib.c
+--- a/lib/ndslib.c.orig 2005-01-27 12:35:59.000000000 -0500
++++ b/lib/ndslib.c 2014-08-12 21:07:35.559190454 -0400
+@@ -957,7 +957,7 @@ static NWDSCCODE nds_beginauth2(
+ NWDSCCODE err;
+ int n1, n3;
+ u_int16_t n3a;
+- char rpb_b[DEFAULT_MESSAGE_LEN];
++ char rpb_b[DEFAULT_MESSAGE_LEN] __attribute__ ((aligned (4)));
+ Buf_T rpb;
+ size_t k1tl;
+
diff --git a/net-fs/ncpfs/files/ncpfs-2.2.6-drop-kernel-check.patch b/net-fs/ncpfs/files/ncpfs-2.2.6-drop-kernel-check.patch
new file mode 100644
index 000000000000..9348c08536e4
--- /dev/null
+++ b/net-fs/ncpfs/files/ncpfs-2.2.6-drop-kernel-check.patch
@@ -0,0 +1,31 @@
+Description: Drop kernel version check
+Author: Bastian Blank <waldi@debian.org>
+Bug-Debian: http://bugs.debian.org/692472
+
+--- a/sutil/ncpm_common.c.orig
++++ b/sutil/ncpm_common.c
+@@ -243,23 +243,6 @@ static int load_ncpfs(void)
+ #endif /* MOUNT2 */
+
+ static int getmountver(void) {
+- struct utsname name;
+- int maj, mid, rev;
+- int ver;
+-
+- if (uname(&name)) {
+- errexit(1, _("Cannot get kernel release\n"));
+- }
+- if (sscanf(name.release, "%d.%d.%d", &maj, &mid, &rev) != 3) {
+- errexit(2, _("Cannot convert kernel release \"%s\" to number\n"), name.release);
+- }
+- ver = maj*0x10000 + mid*0x100 + rev;
+- if (ver < 0x20100)
+- return 2;
+- if (ver < 0x20328)
+- return 3;
+- if (ver < 0x2051F)
+- return 4;
+ return 5;
+ }
+
+
diff --git a/net-fs/ncpfs/files/ncpfs-2.2.6-drop-mtab-support.patch b/net-fs/ncpfs/files/ncpfs-2.2.6-drop-mtab-support.patch
new file mode 100644
index 000000000000..b9c39f51e4ed
--- /dev/null
+++ b/net-fs/ncpfs/files/ncpfs-2.2.6-drop-mtab-support.patch
@@ -0,0 +1,269 @@
+diff -Naurp ncpfs-2.2.6.orig/sutil/ncplogin.c ncpfs-2.2.6/sutil/ncplogin.c
+--- a/sutil/ncplogin.c.orig 2014-08-13 02:52:56.859067273 -0400
++++ b/sutil/ncplogin.c 2014-08-13 02:53:42.699067001 -0400
+@@ -111,7 +111,6 @@
+ #include <stdlib.h>
+ #include <stdarg.h>
+ #include <sys/mount.h>
+-#include <mntent.h>
+ #include <ncp/kernel/ipx.h>
+ #include <sys/ioctl.h>
+ #ifdef CONFIG_NATIVE_UNIX
+@@ -935,12 +934,6 @@ ncpipx:;
+ }
+ NWCCCloseConn(conn);
+ NWDSFreeContext(ctx);
+- /* ncpmap, ncplogin must write in /etc/mtab */
+- {
+- block_sigs();
+- add_mnt_entry(mount_name, mount_point, info.flags);
+- unblock_sigs();
+- }
+ free(mount_name);
+ if (info.echo_mnt_pnt) {
+ printf(_("mounted on:%s\n"),mount_point);
+diff -Naurp ncpfs-2.2.6.orig/sutil/ncpm_common.c ncpfs-2.2.6/sutil/ncpm_common.c
+--- ncpfs-2.2.6.orig/sutil/ncpm_common.c 2014-08-13 02:52:56.959067273 -0400
++++ ncpfs-2.2.6/sutil/ncpm_common.c 2014-08-13 02:55:38.349066313 -0400
+@@ -104,7 +104,6 @@
+ #include <stdlib.h>
+ #include <stdarg.h>
+ #include <sys/mount.h>
+-#include <mntent.h>
+ #include <ncp/kernel/ipx.h>
+ #include <sys/ioctl.h>
+ #if MOUNT3
+@@ -1423,68 +1422,6 @@ static const struct smntflags {
+ {MS_NODIRATIME, "nodiratime"},
+ {0, NULL}};
+
+-void add_mnt_entry(char* mount_name, char* mpnt, unsigned long flags) {
+- const struct smntflags* sf;
+- char mnt_opts[80];
+- char* p;
+- struct mntent ment;
+- int fd;
+- FILE* mtab;
+-
+- if (check_name(mount_name) == -1 || check_name(mpnt) == -1)
+- errexit(107, _("Illegal character in mount entry\n"));
+-
+- ment.mnt_fsname = mount_name;
+- ment.mnt_dir = mpnt;
+- ment.mnt_type = (char*)"ncpfs";
+- ment.mnt_opts = mnt_opts;
+- ment.mnt_freq = 0;
+- ment.mnt_passno = 0;
+-
+- p = mnt_opts;
+- *p++ = 'r';
+- *p++ = (flags & MS_RDONLY)?'o':'w';
+- for (sf = mntflags; sf->flag; sf++) {
+- if (flags & sf->flag) {
+- *p++ = ',';
+- strcpy(p, sf->name);
+- p += strlen(p);
+- }
+- }
+- *p = 0;
+-
+- if (ncpm_suser()) {
+- errexit(91, _("Cannot switch to superuser: %s\n"), strerror(errno));
+- }
+- if ((fd = open(MOUNTED "~", O_RDWR | O_CREAT | O_EXCL, 0600)) == -1)
+- {
+- errexit(58, _("Can't get %s~ lock file\n"), MOUNTED);
+- }
+- close(fd);
+-
+- if ((mtab = setmntent(MOUNTED, "a+")) == NULL)
+- {
+- errexit(59, _("Can't open %s\n"), MOUNTED);
+- }
+- if (addmntent(mtab, &ment) == 1)
+- {
+- errexit(60, _("Can't write mount entry\n"));
+- }
+- if (fchmod(fileno(mtab), 0644) == -1)
+- {
+- errexit(61, _("Can't set perms on %s\n"), MOUNTED);
+- }
+- endmntent(mtab);
+-
+- if (unlink(MOUNTED "~") == -1)
+- {
+- errexit(62, _("Can't remove %s~\n"), MOUNTED);
+- }
+- if (ncpm_normal()) {
+- errexit(90, _("Cannot relinquish superuser rights: %s\n"), strerror(EPERM));
+- }
+-}
+-
+ static int __proc_option(const struct optinfo* opts, struct ncp_mount_info* info, const char* opt, const char* param) {
+ const struct optinfo* optr;
+
+diff -Naurp ncpfs-2.2.6.orig/sutil/ncpm_common.h ncpfs-2.2.6/sutil/ncpm_common.h
+--- ncpfs-2.2.6.orig/sutil/ncpm_common.h 2014-08-13 02:52:56.749067274 -0400
++++ ncpfs-2.2.6/sutil/ncpm_common.h 2014-08-13 02:53:42.699067001 -0400
+@@ -60,7 +60,6 @@ void verify_argv(int argc, char* argv[])
+ int ncp_mount_specific(struct ncp_conn* conn, int pathNS, const unsigned char* NWpath, int pathlen);
+ int mount_ok(struct stat *st);
+ void mycom_err(int, const char*, ...);
+-void add_mnt_entry(char* mount_name, char* mpoint, unsigned long flags);
+
+ struct ncp_mount_info {
+ struct ncp_mount_data_independent mdata;
+diff -Naurp ncpfs-2.2.6.orig/sutil/ncpmount.c ncpfs-2.2.6/sutil/ncpmount.c
+--- ncpfs-2.2.6.orig/sutil/ncpmount.c 2014-08-13 02:52:56.749067274 -0400
++++ ncpfs-2.2.6/sutil/ncpmount.c 2014-08-13 02:53:42.699067001 -0400
+@@ -114,7 +114,6 @@
+ #include <stdlib.h>
+ #include <stdarg.h>
+ #include <sys/mount.h>
+-#include <mntent.h>
+ #include <ncp/kernel/ipx.h>
+ #include <ncp/nwclient.h>
+ #include <sys/ioctl.h>
+@@ -719,11 +718,6 @@ ncpipx:;
+ }
+ ncp_close(conn);
+
+- if (!opt_n) {
+- block_sigs();
+- add_mnt_entry(mount_name, mount_point, info.flags);
+- unblock_sigs();
+- }
+ return 0;
+ }
+
+diff -Naurp ncpfs-2.2.6.orig/sutil/ncpumount.c ncpfs-2.2.6/sutil/ncpumount.c
+--- ncpfs-2.2.6.orig/sutil/ncpumount.c 2014-08-13 02:52:56.749067274 -0400
++++ ncpfs-2.2.6/sutil/ncpumount.c 2014-08-13 02:55:10.369066480 -0400
+@@ -179,108 +179,6 @@ static void enableAlarm(void) {
+ sigprocmask(SIG_UNBLOCK, &sa.sa_mask, NULL);
+ }
+
+-static int __clearMtab (const char* mount_points[], unsigned int numEntries) {
+-// main logic from ncpumount.c
+- struct mntent *mnt;
+- FILE *mtab;
+- FILE *new_mtab;
+-
+-#define MOUNTED_TMP MOUNTED".tmp"
+-
+- if ((mtab = setmntent(MOUNTED, "r")) == NULL){
+- eprintf(_("Can't open %s: %s\n"), MOUNTED,
+- strerror(errno));
+- return 1;
+- }
+-
+- if ((new_mtab = setmntent(MOUNTED_TMP, "w")) == NULL){
+- eprintf(_("Can't open %s: %s\n"), MOUNTED_TMP,
+- strerror(errno));
+- endmntent(mtab);
+- return 1;
+- }
+- while ((mnt = getmntent(mtab)) != NULL) {
+- unsigned int i=0;
+- int found=0;
+-
+- while (i<numEntries && !found) {
+- found=!strcmp(mnt->mnt_dir, mount_points[i]);
+- i++;
+- }
+- if (!found) {
+- addmntent(new_mtab, mnt);
+- }
+- }
+-
+- endmntent(mtab);
+-
+- if (fchmod(fileno(new_mtab), S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) < 0){
+- eprintf(_("Error changing mode of %s: %s\n"),
+- MOUNTED_TMP, strerror(errno));
+- return 1;
+- }
+- endmntent(new_mtab);
+-
+- if (rename(MOUNTED_TMP, MOUNTED) < 0){
+- eprintf(_("Cannot rename %s to %s: %s\n"),
+- MOUNTED, MOUNTED_TMP, strerror(errno));
+- return 1;
+- }
+- return 0;
+-}
+-
+-static int clearMtab (const char* mount_points[], unsigned int numEntries) {
+- int fd;
+- int err;
+- int retries = 10;
+-
+- if (!numEntries)
+- return 0; /* don't waste time ! */
+-
+- block_sigs();
+-
+- while ((fd = open(MOUNTED "~", O_RDWR | O_CREAT | O_EXCL, 0600)) == -1) {
+- struct timespec tm;
+-
+- if (errno != EEXIST || retries == 0) {
+- unblock_sigs();
+- eprintf(_("Can't get %s~ lock file: %s\n"), MOUNTED, strerror(errno));
+- return 1;
+- }
+- fd = open(MOUNTED "~", O_RDWR);
+- if (fd != -1) {
+- alarm(10);
+- err = lockf(fd, F_LOCK, 0);
+- alarm(0);
+- close(fd);
+- if (err) {
+- unblock_sigs();
+- eprintf(_("Can't lock lock file %s~: %s\n"), MOUNTED, _("Lock timed out"));
+- return 1;
+- }
+- tm.tv_sec = 0;
+- tm.tv_nsec = 20000000;
+- nanosleep(&tm, NULL);
+- }
+- retries--;
+- }
+- alarm(1);
+- lockf(fd, F_LOCK, 0);
+- alarm(0);
+- close(fd);
+-
+- err = __clearMtab(mount_points, numEntries);
+-
+- if ((unlink(MOUNTED "~") == -1) && (err == 0)){
+- unblock_sigs();
+- eprintf(_("Can't remove %s~"), MOUNTED);
+- return 1;
+- }
+- unblock_sigs();
+- return err;
+-}
+-
+-
+ int ncp_mnt_umount(const char *abs_mnt, const char *rel_mnt)
+ {
+ if (umount(rel_mnt) != 0) {
+@@ -617,10 +515,6 @@ static int old_ncpumount(int argc, char
+ ret = 1;
+ continue;
+ }
+- if (clearMtab(&mount_point, 1)) {
+- ret = 1;
+- continue;
+- }
+ }
+ return ret;
+ }
+@@ -739,7 +633,6 @@ main(int argc, char *argv[])
+ if (serverName || allConns) {
+ processBindServers(conns,curEntries,serverName,umountTable,&mountEntries);
+ }
+- clearMtab(umountTable, mountEntries);
+ } else if (treeName) {
+ eprintf(_("No NCP connections to tree %s.\n"),treeName);
+ } else if (serverName) {
diff --git a/net-fs/ncpfs/files/ncpfs-2.2.6-gcc4.patch b/net-fs/ncpfs/files/ncpfs-2.2.6-gcc4.patch
new file mode 100644
index 000000000000..793aca6cbccd
--- /dev/null
+++ b/net-fs/ncpfs/files/ncpfs-2.2.6-gcc4.patch
@@ -0,0 +1,36 @@
+diff -ur ncpfs-2.2.6-orig/lib/ncplib.c ncpfs-2.2.6/lib/ncplib.c
+--- a/lib/ncplib.c.orig 2006-01-13 16:55:05.000000000 -0500
++++ b/lib/ncplib.c 2006-01-13 16:56:08.000000000 -0500
+@@ -2421,7 +2421,7 @@
+ int i = 1;
+ NWCCODE nwerr;
+
+- static int get_argument(int arg_no, const char **target) {
++ int get_argument(int arg_no, const char **target) {
+ int count = 1;
+
+ if (target != NULL) {
+diff -ur ncpfs-2.2.6-orig/util/nwpjmv.c ncpfs-2.2.6/util/nwpjmv.c
+--- ncpfs-2.2.6-orig/util/nwpjmv.c 2006-01-13 16:55:05.000000000 -0500
++++ ncpfs-2.2.6/util/nwpjmv.c 2006-01-13 16:55:50.000000000 -0500
+@@ -131,7 +131,7 @@
+ char *s = q->command;
+ char *target_end = target + target_size;
+
+- static void add_string(const char *str)
++ void add_string(const char *str)
+ {
+ int len = strlen(str);
+ if (target + len + 1 > target_end)
+diff -ur ncpfs-2.2.6-orig/util/pserver.c ncpfs-2.2.6/util/pserver.c
+--- ncpfs-2.2.6-orig/util/pserver.c 2006-01-13 16:55:05.000000000 -0500
++++ ncpfs-2.2.6/util/pserver.c 2006-01-13 16:55:36.000000000 -0500
+@@ -153,7 +153,7 @@
+ char *s = q->command;
+ char *target_end = target + target_size;
+
+- static void add_string(const char *str)
++ void add_string(const char *str)
+ {
+ int len = strlen(str);
+ if (target + len + 1 > target_end)
diff --git a/net-fs/ncpfs/files/ncpfs-2.2.6-getuid-fix.patch b/net-fs/ncpfs/files/ncpfs-2.2.6-getuid-fix.patch
new file mode 100644
index 000000000000..64193c22d052
--- /dev/null
+++ b/net-fs/ncpfs/files/ncpfs-2.2.6-getuid-fix.patch
@@ -0,0 +1,124 @@
+diff -Naurp ncpfs-2.2.6.orig/contrib/tcl-utils/chgpwd.c ncpfs-2.2.6/contrib/tcl-utils/chgpwd.c
+--- a/contrib/tcl-utils/chgpwd.c.orig 2005-01-27 12:35:59.000000000 -0500
++++ b/contrib/tcl-utils/chgpwd.c 2014-08-12 21:08:25.779190155 -0400
+@@ -292,12 +292,12 @@ int main(int argc, char *argv[]) {
+ }
+ } else {
+ if (!treeName[0]) {
+- NWCXGetPreferredDSTree(treeName,sizeof(treeName));
++ dserr=NWCXGetPreferredDSTree(treeName,sizeof(treeName));
+
+ }
+ if (!treeName[0]) {
+ fprintf(stderr,"failed: You must specify a server or a tree\n");
+- dserr=114;
++ /*dserr=114;*/
+ goto finished;
+ }
+
+diff -Naurp ncpfs-2.2.6.orig/contrib/tcl-utils/ncplist.c ncpfs-2.2.6/contrib/tcl-utils/ncplist.c
+--- ncpfs-2.2.6.orig/contrib/tcl-utils/ncplist.c 2005-01-27 12:35:59.000000000 -0500
++++ ncpfs-2.2.6/contrib/tcl-utils/ncplist.c 2014-08-12 21:08:25.779190155 -0400
+@@ -299,7 +299,12 @@ int main(int argc, char *argv[]) {
+ }else {
+
+ if (!treeName[0]) {
+- NWCXGetPreferredDSTree(treeName,sizeof(treeName));
++ dserr=NWCXGetPreferredDSTree(treeName,sizeof(treeName));
++ if (dserr){
++ fprintf(stderr, "failed: Cannot get preffered DS tree: %s\n",
++ strnwerror(dserr);
++ exit(106);
++ }
+
+ }
+ if (!treeName[0]) {
+diff -Naurp ncpfs-2.2.6.orig/contrib/tcl-utils/ncpreadprop.c ncpfs-2.2.6/contrib/tcl-utils/ncpreadprop.c
+--- ncpfs-2.2.6.orig/contrib/tcl-utils/ncpreadprop.c 2005-01-27 12:35:59.000000000 -0500
++++ ncpfs-2.2.6/contrib/tcl-utils/ncpreadprop.c 2014-08-12 21:08:25.779190155 -0400
+@@ -470,7 +470,7 @@ main(int argc, char *argv[])
+ }
+ } else {
+ if (!treeName[0]) {
+- NWCXGetPreferredDSTree(treeName,sizeof(treeName));
++ dserr=NWCXGetPreferredDSTree(treeName,sizeof(treeName));
+
+ }
+ if (!treeName[0]) {
+diff -Naurp ncpfs-2.2.6.orig/contrib/tcl-utils/ncpreadprops.c ncpfs-2.2.6/contrib/tcl-utils/ncpreadprops.c
+--- ncpfs-2.2.6.orig/contrib/tcl-utils/ncpreadprops.c 2005-01-27 12:35:59.000000000 -0500
++++ ncpfs-2.2.6/contrib/tcl-utils/ncpreadprops.c 2014-08-12 21:08:25.779190155 -0400
+@@ -507,7 +507,7 @@ main(int argc, char *argv[])
+ }
+ } else {
+ if (!treeName[0]) {
+- NWCXGetPreferredDSTree(treeName,sizeof(treeName));
++ dserr=NWCXGetPreferredDSTree(treeName,sizeof(treeName));
+
+ }
+ if (!treeName[0]) {
+diff -Naurp ncpfs-2.2.6.orig/lib/nwclient.c ncpfs-2.2.6/lib/nwclient.c
+--- ncpfs-2.2.6.orig/lib/nwclient.c 2005-01-27 12:35:59.000000000 -0500
++++ ncpfs-2.2.6/lib/nwclient.c 2014-08-12 21:08:25.779190155 -0400
+@@ -481,6 +481,10 @@ static char* readnwinfosfile (char * use
+ *err = EACCES;
+ return NULL;
+ }
++ if (st.st_uid != getuid()) {
++ *err = EACCES;
++ return NULL;
++ }
+ if ((st.st_mode & (S_IRWXO | S_IRWXG)) != 0) {
+ *err = NCPLIB_INVALID_MODE;
+ return NULL;
+@@ -560,7 +564,7 @@ NWDSCCODE NWCXGetPreferredDSTree (NWD
+ if (!res)
+ res=readnwinfosfile (NULL,NDS_PREFERRED_TREE,NULL, &err);
+ if (!res)
+- return -1;
++ return err;
+ if (strlen (res)+1 >maxLen)
+ return NWE_BUFFER_OVERFLOW;
+ strcpy(preferTree,res);
+@@ -581,7 +585,7 @@ NWDSCCODE NWCXGetDefaultNameContext (con
+ if (!res)
+ res=readnwinfosfile (NULL,NDS_PREFERRED_NAME_CTX,forTree,&err);
+ if (!res)
+- return -1;
++ return err;
+ if (strlen (res)+1 >maxLen)
+ return NWE_BUFFER_OVERFLOW;
+ strcpy(nameContext,res);
+@@ -603,7 +607,7 @@ NWDSCCODE NWCXGetPreferredServer (con
+
+ res=readnwinfosfile (NULL, NDS_PREFERRED_SERVER, forTree, &err);
+ if (!res) {
+- return -1;
++ return err;
+ }
+ }
+ /* test that this server DO belongs to tree forTree*/
+@@ -644,7 +648,7 @@ NWDSCCODE NWCXGetDefaultUserName (const
+ if (!res)
+ res=readnwinfosfile (NULL,NDS_USER,forTree, &err);
+ if (!res)
+- return -1;
++ return err;
+ if (strlen (res)+1 >maxLen)
+ return NWE_BUFFER_OVERFLOW;
+ strcpy(defaultName,res);
+diff -Naurp ncpfs-2.2.6.orig/sutil/ncplogin.c ncpfs-2.2.6/sutil/ncplogin.c
+--- ncpfs-2.2.6.orig/sutil/ncplogin.c 2005-01-27 12:35:59.000000000 -0500
++++ ncpfs-2.2.6/sutil/ncplogin.c 2014-08-12 21:08:25.779190155 -0400
+@@ -588,7 +588,10 @@ main(int argc, char *argv[])
+ int flags = 0;
+
+ if (!info.tree) {
+- NWCXGetPreferredDSTree(ntree, sizeof(ntree));
++ err=NWCXGetPreferredDSTree(ntree, sizeof(ntree));
++ if (err){
++ errexit(104, _("Cannot get preffered DS tree: %s\n"),strnwerror(err));
++ }
+ info.tree = ntree;
+ }
+
diff --git a/net-fs/ncpfs/files/ncpfs-2.2.6-ldflags-support.patch b/net-fs/ncpfs/files/ncpfs-2.2.6-ldflags-support.patch
new file mode 100644
index 000000000000..111e780ff520
--- /dev/null
+++ b/net-fs/ncpfs/files/ncpfs-2.2.6-ldflags-support.patch
@@ -0,0 +1,153 @@
+diff -Naurp ncpfs-2.2.6.orig/contrib/pam/Makefile.in ncpfs-2.2.6/contrib/pam/Makefile.in
+--- a/contrib/pam/Makefile.in.orig 2005-01-27 12:35:59.000000000 -0500
++++ b/contrib/pam/Makefile.in 2014-08-12 21:06:42.369190770 -0400
+@@ -17,6 +17,7 @@ PAM_LIBRARY = pam_ncp_auth.so
+ PAM_OBJECTS = pam_ncp_auth.do support.do
+
+ CFLAGS_pam_ncp_auth.do := -DNCPMOUNT_PATH=\"$(bindir)/ncpmount\" -DNCPUMOUNT_PATH=\"$(bindir)/ncpumount\"
++LDFLAGS = @LDFLAGS@
+
+ .PHONY : all install install-dev dep clean mrproper distclean
+ .PHONY : default
+@@ -45,7 +46,7 @@ $(PAM_OBJECTS): %.do: %.c
+
+
+ $(PAM_LIBRARY): $(PAM_OBJECTS)
+- $(CC) $(CFLAGS) -shared -o $@ $(PAM_OBJECTS) -L$(NCPLIB_DIR) -lncp -lpam ${LIBS}
++ $(CC) $(CFLAGS) -shared $(LDFLAGS) -o $@ $(PAM_OBJECTS) -L$(NCPLIB_DIR) -lncp -lpam ${LIBS}
+
+ dep:
+
+diff -Naurp ncpfs-2.2.6.orig/ipx-1.0/Makefile.in ncpfs-2.2.6/ipx-1.0/Makefile.in
+--- ncpfs-2.2.6.orig/ipx-1.0/Makefile.in 2005-01-27 12:35:59.000000000 -0500
++++ ncpfs-2.2.6/ipx-1.0/Makefile.in 2014-08-12 21:06:42.369190770 -0400
+@@ -9,6 +9,7 @@ vpath %.c ${this_srcdir}
+ vpath %.8 ${this_srcdir}
+
+ LIBS = @INTLLIBS@ @LIBS@
++LDFLAGS = @LDFLAGS@
+
+ O_UTILS = ipx_configure.o ipx_cmd.o
+ O_UTIIPX = ipx_interface.o ipx_internal_net.o ipx_route.o
+@@ -33,7 +34,7 @@ $(ALL_OBJECTS): %.o: %.c
+ [ -s $@ ] || rm -f $@
+
+ $(UTIIPX): %: %.o ipxutil.o
+- $(CC) $(CFLAGS) -o $@ $(addsuffix .o,$@) ipxutil.o ${LIBS}
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(addsuffix .o,$@) ipxutil.o ${LIBS}
+
+ $(UTILS): %: %.o
+ $(CC) $(CFLAGS) -o $@ $(addsuffix .o,$@) ${LIBS}
+diff -Naurp ncpfs-2.2.6.orig/ipxdump/Makefile.in ncpfs-2.2.6/ipxdump/Makefile.in
+--- ncpfs-2.2.6.orig/ipxdump/Makefile.in 2005-01-27 12:35:59.000000000 -0500
++++ ncpfs-2.2.6/ipxdump/Makefile.in 2014-08-12 21:06:42.369190770 -0400
+@@ -11,6 +11,7 @@ ncp_if_ether_support = @ncp_if_ether_sup
+ OBJECTS= ipxutil.o
+
+ ALL_OBJECTS := $(EXEC:%=%.o) $(OBJECTS)
++LDFLAGS = @LDFLAGS@
+
+ .PHONY : all install dep clean mrproper distclean
+ .PHONY : dist tgz
+@@ -24,7 +25,7 @@ install: $(EXEC)
+ ifeq ($(ncp_if_ether_support),yes)
+
+ $(EXEC): %: %.o $(OBJECTS)
+- $(CC) $(CFLAGS) -o $@ $(addsuffix .o,$@) $(OBJECTS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(addsuffix .o,$@) $(OBJECTS)
+
+ else
+ .PHONY ipxdump ipxparse
+diff -Naurp ncpfs-2.2.6.orig/lib/Makefile.in ncpfs-2.2.6/lib/Makefile.in
+--- ncpfs-2.2.6.orig/lib/Makefile.in 2005-01-27 12:35:59.000000000 -0500
++++ ncpfs-2.2.6/lib/Makefile.in 2014-08-12 21:06:42.369190770 -0400
+@@ -23,6 +23,7 @@ STATIC_NCPLIB_BIN := $(STATIC_NCPLIB)
+ CCFLAGS += -I.
+ PIC_FLAGS := -fPIC
+ NWCOMPAT := 1
++LDFLAGS := @LDFLAGS@
+
+ SHARED_VLINK :=
+ SHARED_VLINK_CFLAGS :=
+@@ -122,7 +123,7 @@ $(SHARED_NCPLIB): $(SHARED_NCPLIB_BIN)
+ ln -sf $< $@
+
+ $(SHARED_NCPLIB_BIN): $(SHARED_O_OBJ) ${this_srcdir}/libncp.vers
+- $(CC) -shared -o $@ -Wl,-soname=$(SHARED_NCPLIB_SONAME) $(SHARED_VLINK) $(SHARED_O_OBJ) ${LIBS} -lc
++ $(CC) -shared -o $@ -Wl,-soname=$(SHARED_NCPLIB_SONAME) $(LDFLAGS) $(SHARED_VLINK) $(SHARED_O_OBJ) ${LIBS} -lc
+
+ install_static: $(STATIC_NCPLIB_BIN)
+ $(INSTALL) -d $(DESTDIR)$(libadir)
+diff -Naurp ncpfs-2.2.6.orig/Make.rules.in ncpfs-2.2.6/Make.rules.in
+--- ncpfs-2.2.6.orig/Make.rules.in 2005-01-27 12:35:59.000000000 -0500
++++ ncpfs-2.2.6/Make.rules.in 2014-08-12 21:06:42.369190770 -0400
+@@ -42,6 +42,7 @@ CFLAGS_OPTIONS += $(CWARN)
+ CFLAGS_DEFINES := -DN_PLAT_LINUX -DLOCALEDIR=\"${localedir}\" -DNCPFS_VERSION=\"${VERSION}\" -DNCPFS_PACKAGE=\"${PACKAGE}\"
+
+ CCFLAGS := $(CFLAGS_DEFINES) $(CFLAGS_OPTIONS) $(INCLUDES)
++LDFLAGS := @LDFLAGS@
+
+ # If your system is ELF, either also do a 'make install', or append the util/
+ # directory where the dynamic library resides to the environment
+diff -Naurp ncpfs-2.2.6.orig/sutil/Makefile.in ncpfs-2.2.6/sutil/Makefile.in
+--- ncpfs-2.2.6.orig/sutil/Makefile.in 2005-01-27 12:35:59.000000000 -0500
++++ ncpfs-2.2.6/sutil/Makefile.in 2014-08-12 21:06:42.369190770 -0400
+@@ -14,6 +14,7 @@ USE_KERNEL = @USE_KERNEL@
+ NDS_SUPPORT = @NDS_SUPPORT@
+
+ LIBS = @INTLLIBS@ @LIBS@
++LDFLAGS := @LDFLAGS@
+
+ # environ in ncpmount
+ CCFLAGS += -D_GNU_SOURCE
+@@ -69,7 +70,7 @@ $(O_UTILS:.o=.d): %.d: %.c
+ [ -s $@ ] || rm -f $@
+
+ ncpmap.o: %.o: ncplogin.c
+- $(CC) $(CFLAGS) $(CCFLAGS) $(CFLAGS_$@) -o $@ -c $<
++ $(CC) $(CFLAGS) $(LDFLAGS) $(CCFLAGS) $(CFLAGS_$@) -o $@ -c $<
+
+ ncpmap.d: %.d: ncplogin.c
+ set -e; $(CC) -M $(CFLAGS) $(CCFLAGS) $(CFLAGS_$(@:.d=.o)) $< \
+@@ -85,7 +86,7 @@ ncpm_common.d mount_login.d: %.d: %.c
+ [ -s $@ ] || rm -f $@
+
+ $(UTILS): %: %.o ../lib/libncp.a ncpm_common.o mount_login.o
+- $(CC) @GC_SECTIONS@-o $@ $(addsuffix .o,$@) $(LDFLAGS_$@) ../lib/libncp.a ${LIBS}
++ $(CC) @GC_SECTIONS@-o $@ $(addsuffix .o,$@) $(LDFLAGS) $(LDFLAGS_$@) ../lib/libncp.a ${LIBS}
+
+ ../lib/libncp.a:
+ make -C ../lib libncp.a
+diff -Naurp ncpfs-2.2.6.orig/util/Makefile.in ncpfs-2.2.6/util/Makefile.in
+--- ncpfs-2.2.6.orig/util/Makefile.in 2005-01-27 12:35:59.000000000 -0500
++++ ncpfs-2.2.6/util/Makefile.in 2014-08-12 21:06:42.369190770 -0400
+@@ -15,6 +15,7 @@ NDS_SUPPORT = @NDS_SUPPORT@
+ MOUNT2 = @MOUNT2@
+
+ LIBS = @INTLLIBS@ @LIBS@
++LDFLAGS = @LDFLAGS@
+
+ O_OTHER = dsqueue.o
+ O_USERUTILS = slist.o pqlist.o nwfsinfo.o pserver.o nprint.o nsend.o \
+@@ -83,7 +84,7 @@ install-dev:
+ make -C ../lib libncp.so
+
+ $(O_USERUTILS) $(O_SBINUTILS) $(O_OTHER) ncptest.o: %.o: %.c
+- $(CC) $(CFLAGS) $(CCFLAGS) $(CFLAGS_$@) -o $@ -c $<
++ $(CC) $(CFLAGS) $(LDFLAGS) $(CCFLAGS) $(CFLAGS_$@) -o $@ -c $<
+
+ %.d: %.c
+ set -e; $(CC) -M $(CFLAGS) $(CCFLAGS) $(CFLAGS_$(@:.d=.o)) $< \
+@@ -94,10 +95,10 @@ $(O_USERUTILS) $(O_SBINUTILS) $(O_OTHER)
+ pqstat nwpqjob nprint: dsqueue.o
+
+ $(UTILS): %: %.o $(LIBDEP)
+- $(CC) $(CFLAGS) -o $@ $(addsuffix .o,$@) $(ADDOBJS_$@) -L$(NCPLIB_DIR) -lncp ${LIBS}
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(addsuffix .o,$@) $(ADDOBJS_$@) -L$(NCPLIB_DIR) -lncp ${LIBS}
+
+ ipx_probe: ipx_probe.c
+- $(CC) $(CFLAGS) $(CCFLAGS) -o ipx_probe ipx_probe.c ${LIBS}
++ $(CC) $(CFLAGS) $(LDFLAGS) $(CCFLAGS) -o ipx_probe ipx_probe.c ${LIBS}
+
+ dep:
+
diff --git a/net-fs/ncpfs/files/ncpfs-2.2.6-makefile-fix-soname-link.patch b/net-fs/ncpfs/files/ncpfs-2.2.6-makefile-fix-soname-link.patch
new file mode 100644
index 000000000000..ece9fc720db6
--- /dev/null
+++ b/net-fs/ncpfs/files/ncpfs-2.2.6-makefile-fix-soname-link.patch
@@ -0,0 +1,15 @@
+diff -Naurp ncpfs-2.2.6.orig/lib/Makefile.in ncpfs-2.2.6/lib/Makefile.in
+--- a/lib/Makefile.in.orig 2014-08-12 23:23:27.149141996 -0400
++++ b/lib/Makefile.in 2014-08-12 23:23:55.969141824 -0400
+@@ -99,9 +99,10 @@ distclean: mrproper
+ install_shared: $(SHARED_NCPLIB_BIN)
+ $(INSTALL) -d $(DESTDIR)$(libsodir)
+ $(INSTALL) $(SHARED_NCPLIB_BIN) $(DESTDIR)$(libsodir)
++ ln -sf $(SHARED_NCPLIB_BIN) $(DESTDIR)$(libsodir)/$(SHARED_NCPLIB)
++ ln -sf $(SHARED_NCPLIB_BIN) $(DESTDIR)$(libsodir)/$(SHARED_NCPLIB_SONAME)
+
+ install-dev: install_shared install_static
+- ln -sf $(SHARED_NCPLIB_SONAME) $(DESTDIR)$(libsodir)/$(SHARED_NCPLIB)
+ $(INSTALL) -d $(DESTDIR)$(includedir)/ncp
+ $(INSTALL) -d $(DESTDIR)$(includedir)/ncp/ext
+ $(INSTALL) -d $(DESTDIR)$(includedir)/ncp/kernel
diff --git a/net-fs/ncpfs/files/ncpfs-2.2.6-missing-includes.patch b/net-fs/ncpfs/files/ncpfs-2.2.6-missing-includes.patch
new file mode 100644
index 000000000000..11258253af91
--- /dev/null
+++ b/net-fs/ncpfs/files/ncpfs-2.2.6-missing-includes.patch
@@ -0,0 +1,22 @@
+diff -ruN ncpfs-2.2.6/contrib/pam/pam_ncp_auth.c ncpfs-2.2.6-fixed/contrib/pam/pam_ncp_auth.c
+--- a/contrib/pam/pam_ncp_auth.c.orig 2005-01-27 18:35:59.000000000 +0100
++++ a/contrib/pam/pam_ncp_auth.c 2007-05-11 21:38:05.143474750 +0200
+@@ -257,6 +257,7 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
++#include <syslog.h>
+ #include <unistd.h>
+ #include <pwd.h>
+ #include <grp.h>
+diff -ruN ncpfs-2.2.6/sutil/ncpm_common.c ncpfs-2.2.6-fixed/sutil/ncpm_common.c
+--- ncpfs-2.2.6/sutil/ncpm_common.c 2005-01-27 18:35:59.000000000 +0100
++++ ncpfs-2.2.6-fixed/sutil/ncpm_common.c 2007-05-11 21:38:29.609003750 +0200
+@@ -82,6 +82,7 @@
+
+ #include "ncpm_common.h"
+
++#include <stddef.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <signal.h>
diff --git a/net-fs/ncpfs/files/ncpfs-2.2.6-multiple-vulns.patch b/net-fs/ncpfs/files/ncpfs-2.2.6-multiple-vulns.patch
new file mode 100644
index 000000000000..def49a5fad65
--- /dev/null
+++ b/net-fs/ncpfs/files/ncpfs-2.2.6-multiple-vulns.patch
@@ -0,0 +1,557 @@
+From: Dan Rosenberg <dan.j.rosenberg () gmail com>
+Date: Fri, 5 Mar 2010 12:06:01 -0500
+
+============================================
+ ncpfs, Multiple Vulnerabilities
+ March 5, 2010
+ CVE-2010-0788, CVE-2010-0790, CVE-2010-0791
+============================================
+
+==Description==
+
+The ncpmount, ncpumount, and ncplogin utilities, installed as part of the ncpfs
+package, contain several vulnerabilities.
+
+1. ncpmount, ncpumount, and ncplogin are vulnerable to race conditions that
+allow a local attacker to unmount arbitrary mountpoints, causing
+denial-of-service, or mount Netware shares to arbitrary directories,
+potentially leading to root compromise. This issue was formerly assigned
+CVE-2009-3297, but has since been re-assigned CVE-2010-0788 to avoid overlap
+with related bugs in other packages.
+
+2. ncpumount is vulnerable to an information disclosure vulnerability that
+allows a local attacker to verify the existence of arbitrary files, violating
+directory permissions. This issue has been assigned CVE-2010-0790.
+
+3. ncpmount, ncpumount, and ncplogin create lockfiles insecurely, allowing a
+local attacker to leave a stale lockfile at /etc/mtab~, causing other mount
+utilities to fail and creating denial-of-service conditions. This issue has
+been assigned CVE-2010-0791.
+
+==Workaround==
+
+If unprivileged users do not need the ability to mount and unmount Netware
+shares, then the suid bit should be removed from these utilities.
+
+==Solution==
+
+A patch has been released that resolves these issues (attached to this
+advisory). ncpfs-2.2.6.partial.patch is intended for ncpfs releases that have
+already been patched against the first vulnerability in this report
+(CVE-2010-0788, formerly CVE-2009-3297). It has been tested against the latest
+ncpfs packages distributed by Fedora, Red Hat, and Mandriva.
+ncpfs-2.2.6.full.patch is intended for ncpfs releases that have not been
+patched against any of these vulnerabilities. It has been tested against the
+latest ncpfs packages distributed by Debian, Ubuntu, and the upstream release
+(ftp://platan.vc.cvut.cz/pub/linux/ncpfs/).
+
+Users are advised to recompile from source, or request updated packages from
+downstream distributors.
+
+==Credits==
+
+These vulnerabilities were discovered by Dan Rosenberg
+(dan.j.rosenberg () gmail com).
+Thanks to Vitezslav Crhonek for the patch against the first issue.
+
+==References==
+
+CVE identifiers CVE-2010-0788, CVE-2010-0790, and CVE-2010-0791 have been
+assigned to these issues.
+
+http://seclists.org/fulldisclosure/2010/Mar/122
+
+
+diff -ur ncpfs-2.2.6.orig/sutil/ncplogin.c ncpfs-2.2.6/sutil/ncplogin.c
+--- a/sutil/ncplogin.c.orig 2010-03-03 16:18:59.000000000 -0500
++++ b/sutil/ncplogin.c 2010-03-03 16:17:41.000000000 -0500
+@@ -934,7 +934,9 @@
+ NWDSFreeContext(ctx);
+ /* ncpmap, ncplogin must write in /etc/mtab */
+ {
++ block_sigs();
+ add_mnt_entry(mount_name, mount_point, info.flags);
++ unblock_sigs();
+ }
+ free(mount_name);
+ if (info.echo_mnt_pnt) {
+diff -ur ncpfs-2.2.6.orig/sutil/ncpm_common.c ncpfs-2.2.6/sutil/ncpm_common.c
+--- ncpfs-2.2.6.orig/sutil/ncpm_common.c 2010-03-03 16:18:59.000000000 -0500
++++ ncpfs-2.2.6/sutil/ncpm_common.c 2010-03-03 16:17:41.000000000 -0500
+@@ -360,7 +360,7 @@
+ #endif
+
+ static inline int ncpm_suser(void) {
+- return setreuid(-1, 0);
++ return setresuid(0, 0, myuid);
+ }
+
+ static int ncpm_normal(void) {
+@@ -368,11 +368,31 @@
+ int v;
+
+ e = errno;
+- v = setreuid(-1, myuid);
++ v = setresuid(myuid, myuid, 0);
+ errno = e;
+ return v;
+ }
+
++void block_sigs(void) {
++
++ sigset_t mask, orig_mask;
++ sigfillset(&mask);
++
++ if(sigprocmask(SIG_SETMASK, &mask, &orig_mask) < 0) {
++ errexit(-1, _("Blocking signals failed.\n"));
++ }
++}
++
++void unblock_sigs(void) {
++
++ sigset_t mask, orig_mask;
++ sigemptyset(&mask);
++
++ if (sigprocmask(SIG_SETMASK, &mask, &orig_mask) < 0) {
++ errexit(-1, _("Un-blocking signals failed.\n"));
++ }
++}
++
+ static int proc_ncpm_mount(const char* source, const char* target, const char* filesystem, unsigned long mountflags, const void* data) {
+ int v;
+ int e;
+@@ -444,7 +464,7 @@
+ }
+ datav2.file_mode = data->file_mode;
+ datav2.dir_mode = data->dir_mode;
+- err = proc_ncpm_mount(mount_name, data->mount_point, "ncpfs", flags, (void*) &datav2);
++ err = proc_ncpm_mount(mount_name, ".", "ncpfs", flags, (void*) &datav2);
+ if (err)
+ return errno;
+ return 0;
+@@ -508,7 +528,7 @@
+ exit(0); /* Should not return from process_connection */
+ }
+ close(pp[0]);
+- err=proc_ncpm_mount(mount_name, data->mount_point, "ncpfs", flags, (void*) &datav3);
++ err=proc_ncpm_mount(mount_name, ".", "ncpfs", flags, (void*) &datav3);
+ if (err) {
+ err = errno;
+ /* Mount unsuccesful so we have to kill daemon */
+@@ -559,7 +579,7 @@
+ sprintf(mountopts, "version=%u,flags=%u,owner=%u,uid=%u,gid=%u,mode=%u,dirmode=%u,timeout=%u,retry=%u,wdogpid=%u,ncpfd=%u,infofd=%u",
+ NCP_MOUNT_VERSION_V5, ncpflags, data->mounted_uid, data->uid, data->gid, data->file_mode,
+ data->dir_mode, data->time_out, data->retry_count, wdog_pid, data->ncp_fd, pp[1]);
+- err=proc_ncpm_mount(mount_name, data->mount_point, "ncpfs", flags, mountopts);
++ err=proc_ncpm_mount(mount_name, ".", "ncpfs", flags, mountopts);
+ } else {
+ err=-1;
+ }
+@@ -577,7 +597,7 @@
+ datav4.file_mode = data->file_mode;
+ datav4.dir_mode = data->dir_mode;
+ datav4.wdog_pid = wdog_pid;
+- err = proc_ncpm_mount(mount_name, data->mount_point, "ncpfs", flags, (void*)&datav4);
++ err = proc_ncpm_mount(mount_name, ".", "ncpfs", flags, (void*)&datav4);
+ if (err) {
+ err = errno;
+ /* Mount unsuccesful so we have to kill daemon */
+@@ -1395,6 +1415,17 @@
+ }
+ #endif /* MOUNT3 */
+
++static int check_name(const char *name)
++{
++ char *s;
++ for (s = "\n\t\\"; *s; s++) {
++ if (strchr(name, *s)) {
++ return -1;
++ }
++ }
++ return 0;
++}
++
+ static const struct smntflags {
+ unsigned int flag;
+ const char* name;
+@@ -1416,6 +1447,9 @@
+ int fd;
+ FILE* mtab;
+
++ if (check_name(mount_name) == -1 || check_name(mpnt) == -1)
++ errexit(107, _("Illegal character in mount entry\n"));
++
+ ment.mnt_fsname = mount_name;
+ ment.mnt_dir = mpnt;
+ ment.mnt_type = (char*)"ncpfs";
+diff -ur ncpfs-2.2.6.orig/sutil/ncpm_common.h ncpfs-2.2.6/sutil/ncpm_common.h
+--- ncpfs-2.2.6.orig/sutil/ncpm_common.h 2010-03-03 16:18:59.000000000 -0500
++++ ncpfs-2.2.6/sutil/ncpm_common.h 2010-03-03 16:17:41.000000000 -0500
+@@ -121,6 +121,9 @@
+ int proc_aftermount(const struct ncp_mount_info* info, NWCONN_HANDLE* conn);
+ int proc_ncpm_umount(const char* dir);
+
++void block_sigs(void);
++void unblock_sigs(void);
++
+ #define UNUSED(x) x __attribute__((unused))
+
+ #endif /* __NCPM_COMMON_H__ */
+diff -ur ncpfs-2.2.6.orig/sutil/ncpmount.c ncpfs-2.2.6/sutil/ncpmount.c
+--- ncpfs-2.2.6.orig/sutil/ncpmount.c 2010-03-03 16:18:59.000000000 -0500
++++ ncpfs-2.2.6/sutil/ncpmount.c 2010-03-03 16:17:41.000000000 -0500
+@@ -359,11 +359,17 @@
+ usage();
+ return -1;
+ }
++
+ realpath(argv[optind], mount_point);
+
+- if (stat(mount_point, &st) == -1)
++ if (chdir(mount_point))
++ {
++ errexit(31, _("Could not change directory into mount target %s: %s\n"),
++ mount_point, strerror(errno));
++ }
++ if (stat(".", &st) == -1)
+ {
+- errexit(31, _("Could not find mount point %s: %s\n"),
++ errexit(31, _("Mount point %s does not exist: %s\n"),
+ mount_point, strerror(errno));
+ }
+ if (mount_ok(&st) != 0)
+@@ -714,7 +720,9 @@
+ ncp_close(conn);
+
+ if (!opt_n) {
++ block_sigs();
+ add_mnt_entry(mount_name, mount_point, info.flags);
++ unblock_sigs();
+ }
+ return 0;
+ }
+diff -ur ncpfs-2.2.6.orig/sutil/ncpumount.c ncpfs-2.2.6/sutil/ncpumount.c
+--- ncpfs-2.2.6.orig/sutil/ncpumount.c 2010-03-03 16:18:59.000000000 -0500
++++ ncpfs-2.2.6/sutil/ncpumount.c 2010-03-03 16:17:41.000000000 -0500
+@@ -70,13 +70,24 @@
+ #include <mntent.h>
+ #include <pwd.h>
+
++#include <sched.h>
++
+ #include "private/libintl.h"
+
+ #define _(X) X
+
++#ifndef MS_REC
++#define MS_REC 16384
++#endif
++#ifndef MS_SLAVE
++#define MS_SLAVE (1<<19)
++#endif
++
+ static char *progname;
+ static int is_ncplogout = 0;
+
++uid_t uid;
++
+ static void
+ usage(void)
+ {
+@@ -117,6 +128,40 @@
+ va_end(ap);
+ }
+
++/* Mostly copied from ncpm_common.c */
++void block_sigs(void) {
++
++ sigset_t mask, orig_mask;
++ sigfillset(&mask);
++ sigdelset(&mask, SIGALRM); /* Need SIGALRM for ncpumount */
++
++ if(setresuid(0, 0, uid) < 0) {
++ eprintf("Failed to raise privileges.\n");
++ exit(-1);
++ }
++
++ if(sigprocmask(SIG_SETMASK, &mask, &orig_mask) < 0) {
++ eprintf("Blocking signals failed.\n");
++ exit(-1);
++ }
++}
++
++void unblock_sigs(void) {
++
++ sigset_t mask, orig_mask;
++ sigemptyset(&mask);
++
++ if(setresuid(uid, uid, 0) < 0) {
++ eprintf("Failed to drop privileges.\n");
++ exit(-1);
++ }
++
++ if(sigprocmask(SIG_SETMASK, &mask, &orig_mask) < 0) {
++ eprintf("Un-blocking signals failed.\n");
++ exit(-1);
++ }
++}
++
+ static void alarmSignal(int sig) {
+ (void)sig;
+ }
+@@ -192,10 +237,13 @@
+ if (!numEntries)
+ return 0; /* don't waste time ! */
+
++ block_sigs();
++
+ while ((fd = open(MOUNTED "~", O_RDWR | O_CREAT | O_EXCL, 0600)) == -1) {
+ struct timespec tm;
+
+ if (errno != EEXIST || retries == 0) {
++ unblock_sigs();
+ eprintf(_("Can't get %s~ lock file: %s\n"), MOUNTED, strerror(errno));
+ return 1;
+ }
+@@ -206,6 +254,7 @@
+ alarm(0);
+ close(fd);
+ if (err) {
++ unblock_sigs();
+ eprintf(_("Can't lock lock file %s~: %s\n"), MOUNTED, _("Lock timed out"));
+ return 1;
+ }
+@@ -223,26 +272,205 @@
+ err = __clearMtab(mount_points, numEntries);
+
+ if ((unlink(MOUNTED "~") == -1) && (err == 0)){
++ unblock_sigs();
+ eprintf(_("Can't remove %s~"), MOUNTED);
+ return 1;
+ }
++ unblock_sigs();
+ return err;
+ }
+
++
++int ncp_mnt_umount(const char *abs_mnt, const char *rel_mnt)
++{
++ if (umount(rel_mnt) != 0) {
++ eprintf(_("Could not umount %s: %s\n"),
++ abs_mnt, strerror(errno));
++ return -1;
++ }
++ return 0;
++}
++
++
++static int check_is_mount_child(void *p)
++{
++ const char **a = p;
++ const char *last = a[0];
++ const char *mnt = a[1];
++ int res;
++ const char *procmounts = "/proc/mounts";
++ int found;
++ FILE *fp;
++ struct mntent *entp;
++
++ res = mount("", "/", "", MS_SLAVE | MS_REC, NULL);
++ if (res == -1) {
++ eprintf(_("Failed to mark mounts slave: %s\n"),
++ strerror(errno));
++ return 1;
++ }
++
++ res = mount(".", "/tmp", "", MS_BIND | MS_REC, NULL);
++ if (res == -1) {
++ eprintf(_("Failed to bind parent to /tmp: %s\n"),
++ strerror(errno));
++ return 1;
++ }
++
++ fp = setmntent(procmounts, "r");
++ if (fp == NULL) {
++ eprintf(_("Failed to open %s: %s\n"),
++ procmounts, strerror(errno));
++ return 1;
++ }
++
++ found = 0;
++ while ((entp = getmntent(fp)) != NULL) {
++ if (strncmp(entp->mnt_dir, "/tmp/", 5) == 0 &&
++ strcmp(entp->mnt_dir + 5, last) == 0) {
++ found = 1;
++ break;
++ }
++ }
++ endmntent(fp);
++
++ if (!found) {
++ eprintf(_("%s not mounted\n"), mnt);
++ return 1;
++ }
++
++ return 0;
++}
++
++
++static int check_is_mount(const char *last, const char *mnt)
++{
++ char buf[131072];
++ pid_t pid, p;
++ int status;
++ const char *a[2] = { last, mnt };
++
++ pid = clone(check_is_mount_child, buf + 65536, CLONE_NEWNS, (void *) a);
++ if (pid == (pid_t) -1) {
++ eprintf(_("Failed to clone namespace: %s\n"),
++ strerror(errno));
++ return -1;
++ }
++ p = waitpid(pid, &status, __WCLONE);
++ if (p == (pid_t) -1) {
++ eprintf(_("Waitpid failed: %s\n"),
++ strerror(errno));
++ return -1;
++ }
++ if (!WIFEXITED(status)) {
++ eprintf(_("Child terminated abnormally (status %i)\n"),
++ status);
++ return -1;
++ }
++ if (WEXITSTATUS(status) != 0)
++ return -1;
++
++ return 0;
++}
++
++
++static int chdir_to_parent(char *copy, const char **lastp, int *currdir_fd)
++{
++ char *tmp;
++ const char *parent;
++ char buf[PATH_MAX];
++ int res;
++
++ tmp = strrchr(copy, '/');
++ if (tmp == NULL || tmp[1] == '\0') {
++ eprintf(_("Internal error: invalid abs path: <%s>\n"),
++ copy);
++ return -1;
++ }
++ if (tmp != copy) {
++ *tmp = '\0';
++ parent = copy;
++ *lastp = tmp + 1;
++ } else if (tmp[1] != '\0') {
++ *lastp = tmp + 1;
++ parent = "/";
++ } else {
++ *lastp = ".";
++ parent = "/";
++ }
++ *currdir_fd = open(".", O_RDONLY);
++ if (*currdir_fd == -1) {
++ eprintf(_("Failed to open current directory: %s\n"),
++ strerror(errno));
++ return -1;
++ }
++ res = chdir(parent);
++ if (res == -1) {
++ eprintf(_("Failed to chdir to %s: %s\n"),
++ parent, strerror(errno));
++ return -1;
++ }
++ if (getcwd(buf, sizeof(buf)) == NULL) {
++ eprintf(_("Failed to obtain current directory: %s\n"),
++ strerror(errno));
++ return -1;
++ }
++ if (strcmp(buf, parent) != 0) {
++ eprintf(_("Mountpoint moved (%s -> %s)\n"),
++ parent, buf);
++ return -1;
++
++ }
++
++ return 0;
++}
++
++
++static int unmount_ncp(const char *mount_point)
++{
++ int currdir_fd = -1;
++ char *copy;
++ const char *last;
++ int res;
++
++ copy = strdup(mount_point);
++ if (copy == NULL) {
++ eprintf(_("Failed to allocate memory\n"));
++ return -1;
++ }
++ res = chdir_to_parent(copy, &last, &currdir_fd);
++ if (res == -1)
++ goto out;
++ res = check_is_mount(last, mount_point);
++ if (res == -1)
++ goto out;
++ res = ncp_mnt_umount(mount_point, last);
++
++out:
++ free(copy);
++ if (currdir_fd != -1) {
++ fchdir(currdir_fd);
++ close(currdir_fd);
++ }
++
++ return res;
++}
++
+ static int
+ do_umount(const char *mount_point)
+ {
+ int fid = open(mount_point, O_RDONLY, 0);
+ uid_t mount_uid;
++ int res;
+
+ if (fid == -1) {
+- eprintf(_("Could not open %s: %s\n"),
+- mount_point, strerror(errno));
++ eprintf(_("Invalid or unauthorized mountpoint %s\n"),
++ mount_point);
+ return -1;
+ }
+ if (ncp_get_mount_uid(fid, &mount_uid) != 0) {
+ close(fid);
+- eprintf(_("%s probably not ncp-filesystem\n"),
++ eprintf(_("Invalid or unauthorized mountpoint %s\n"),
+ mount_point);
+ return -1;
+ }
+@@ -253,12 +481,8 @@
+ return -1;
+ }
+ close(fid);
+- if (umount(mount_point) != 0) {
+- eprintf(_("Could not umount %s: %s\n"),
+- mount_point, strerror(errno));
+- return -1;
+- }
+- return 0;
++ res = unmount_ncp(mount_point);
++ return res;
+ }
+
+
+@@ -409,7 +633,8 @@
+ int allConns = 0;
+ const char *serverName = NULL;
+ const char *treeName = NULL;
+- uid_t uid = getuid();
++
++ uid = getuid();
+
+ progname = strrchr(argv[0], '/');
+ if (progname) {
diff --git a/net-fs/ncpfs/files/ncpfs-2.2.6-no-suid-root.patch b/net-fs/ncpfs/files/ncpfs-2.2.6-no-suid-root.patch
new file mode 100644
index 000000000000..050de30b86b0
--- /dev/null
+++ b/net-fs/ncpfs/files/ncpfs-2.2.6-no-suid-root.patch
@@ -0,0 +1,16 @@
+Description: Don't install utils as suid root
+Author: Bastian Blank <waldi@debian.org>
+Bug-Debian: http://bugs.debian.org/692929
+
+--- ncpfs-2.2.6.orig/sutil/Makefile.in
++++ ncpfs-2.2.6/sutil/Makefile.in
+@@ -51,7 +51,7 @@ all: $(UTILS)
+ install: all
+ ${INSTALL} -d $(DESTDIR)$(bindir)
+ ${INSTALL} -d $(DESTDIR)/sbin
+- ${INSTALL} -m 4755 $(UTILS) $(DESTDIR)$(bindir)
++ ${INSTALL} $(UTILS) $(DESTDIR)$(bindir)
+ ifeq ($(USE_KERNEL),1)
+ ln -sf $(bindir)/ncpmount $(DESTDIR)/sbin/mount.ncp
+ ln -sf $(bindir)/ncpmount $(DESTDIR)/sbin/mount.ncpfs
+
diff --git a/net-fs/ncpfs/files/ncpfs-2.2.6-pam_ncp_auth-fix.patch b/net-fs/ncpfs/files/ncpfs-2.2.6-pam_ncp_auth-fix.patch
new file mode 100644
index 000000000000..2a9e0edd4b22
--- /dev/null
+++ b/net-fs/ncpfs/files/ncpfs-2.2.6-pam_ncp_auth-fix.patch
@@ -0,0 +1,12 @@
+diff -Naurp ncpfs-2.2.6.orig/contrib/pam/pam_ncp_auth.c ncpfs-2.2.6/contrib/pam/pam_ncp_auth.c
+--- ncpfs-2.2.6.orig/contrib/pam/pam_ncp_auth.c 2005-01-27 12:35:59.000000000 -0500
++++ ncpfs-2.2.6/contrib/pam/pam_ncp_auth.c 2014-08-12 21:02:33.229192251 -0400
+@@ -2534,7 +2534,7 @@ nw_retrieve_nds_user_info(struct nw_user
+ bailoutctx:;
+ NWDSFreeContext(ctx);
+ bailout:;
+- if (!err & (ui->qflag & QF_DEBUG))
++ if ((!err) && (ui->qflag & QF_DEBUG))
+ syslog(LOG_NOTICE, "%u %u %s %s %s\n", ui->uid, ui->gid, ui->dir, ui->gecos, ui->shell);
+ return err;
+ }
diff --git a/net-fs/ncpfs/files/ncpfs-2.2.6-remove-libncp_atomic-header.patch b/net-fs/ncpfs/files/ncpfs-2.2.6-remove-libncp_atomic-header.patch
new file mode 100644
index 000000000000..22768817045c
--- /dev/null
+++ b/net-fs/ncpfs/files/ncpfs-2.2.6-remove-libncp_atomic-header.patch
@@ -0,0 +1,15 @@
+Description: Remove another generated file
+Author: Bastian Blank <waldi@debian.org>
+Bug-Debian: http://bugs.debian.org/692471
+
+--- ncpfs-2.2.6.orig/Makefile.in
++++ ncpfs-2.2.6/Makefile.in
+@@ -71,6 +71,7 @@ distclean:
+ rm -f intl/Makefile po/Makefile po/Makefile.in
+ rm -f lib/Makefile man/Makefile sutil/Makefile util/Makefile
+ rm -f include/config.h
++ rm -f include/private/libncp-atomic.h
+ rm -f include/ncp/ext/socket.h include/ncp/ext/stdint.h
+ rm -f include/ncp/kernel/fs.h
+ rm -f include/ncp/kernel/if.h include/ncp/kernel/route.h include/ncp/kernel/types.h
+
diff --git a/net-fs/ncpfs/files/ncpfs-2.2.6-remove-packed-attrib.patch b/net-fs/ncpfs/files/ncpfs-2.2.6-remove-packed-attrib.patch
new file mode 100644
index 000000000000..40267c728710
--- /dev/null
+++ b/net-fs/ncpfs/files/ncpfs-2.2.6-remove-packed-attrib.patch
@@ -0,0 +1,297 @@
+diff -Naurp ncpfs-2.2.6.orig//include/ncp/ipxlib.h ncpfs-2.2.6//include/ncp/ipxlib.h
+--- ncpfs-2.2.6.orig//include/ncp/ipxlib.h 2005-01-27 12:35:59.000000000 -0500
++++ ncpfs-2.2.6//include/ncp/ipxlib.h 2011-02-10 02:38:18.822076000 -0500
+@@ -64,12 +64,12 @@ struct sap_query
+ struct sap_server_ident
+ {
+ u_int16_t server_type __attribute__((packed));
+- char server_name[48] __attribute__((packed));
++ char server_name[48];
+ IPXNet server_network __attribute__((packed));
+ #ifdef SWIG
+ u_int8_t server_node[6] __attribute__((packed));
+ #else
+- IPXNode server_node __attribute__((packed));
++ IPXNode server_node;
+ #endif
+ IPXPort server_port __attribute__((packed));
+ u_int16_t intermediate_network __attribute__((packed));
+@@ -87,7 +87,7 @@ struct ipx_rt_def {
+ struct ipx_rip_packet
+ {
+ u_int16_t operation __attribute__((packed));
+- struct ipx_rt_def rt[1] __attribute__((packed));
++ struct ipx_rt_def rt[1];
+ };
+
+ #ifdef SWIG
+diff -Naurp ncpfs-2.2.6.orig//include/ncp/kernel/ncp.h ncpfs-2.2.6//include/ncp/kernel/ncp.h
+--- ncpfs-2.2.6.orig//include/ncp/kernel/ncp.h 2005-01-27 12:35:59.000000000 -0500
++++ ncpfs-2.2.6//include/ncp/kernel/ncp.h 2011-02-10 02:38:18.822076000 -0500
+@@ -53,12 +53,12 @@
+
+ struct ncp_request_header {
+ u_int16_t type __attribute__((packed));
+- u_int8_t sequence __attribute__((packed));
+- u_int8_t conn_low __attribute__((packed));
+- u_int8_t task __attribute__((packed));
+- u_int8_t conn_high __attribute__((packed));
+- u_int8_t function __attribute__((packed));
+- u_int8_t data[0] __attribute__((packed));
++ u_int8_t sequence;
++ u_int8_t conn_low;
++ u_int8_t task;
++ u_int8_t conn_high;
++ u_int8_t function;
++ u_int8_t data[0];
+ };
+
+ #define NCP_REPLY (0x3333)
+@@ -66,13 +66,13 @@ struct ncp_request_header {
+
+ struct ncp_reply_header {
+ u_int16_t type __attribute__((packed));
+- u_int8_t sequence __attribute__((packed));
+- u_int8_t conn_low __attribute__((packed));
+- u_int8_t task __attribute__((packed));
+- u_int8_t conn_high __attribute__((packed));
+- u_int8_t completion_code __attribute__((packed));
+- u_int8_t connection_state __attribute__((packed));
+- u_int8_t data[0] __attribute__((packed));
++ u_int8_t sequence;
++ u_int8_t conn_low;
++ u_int8_t task;
++ u_int8_t conn_high;
++ u_int8_t completion_code;
++ u_int8_t connection_state;
++ u_int8_t data[0];
+ };
+
+ #define NCP_VOLNAME_LEN (16)
+@@ -230,8 +230,8 @@ struct nw_info_struct {
+ u_int32_t EAKeyCount __attribute__((packed));
+ u_int32_t EAKeySize __attribute__((packed));
+ u_int32_t NSCreator __attribute__((packed));
+- u_int8_t nameLen __attribute__((packed));
+- u_int8_t entryName[256] __attribute__((packed));
++ u_int8_t nameLen;
++ u_int8_t entryName[256];
+ };
+ #endif
+
+@@ -282,13 +282,13 @@ struct nw_file_info {
+ int opened;
+ int access;
+ u_int32_t server_file_handle __attribute__((packed));
+- u_int8_t open_create_action __attribute__((packed));
+- u_int8_t file_handle[6] __attribute__((packed));
++ u_int8_t open_create_action;
++ u_int8_t file_handle[6];
+ };
+ #endif
+
+ struct nw_search_sequence {
+- u_int8_t volNumber __attribute__((packed));
++ u_int8_t volNumber;
+ u_int32_t dirBase __attribute__((packed));
+ u_int32_t sequence __attribute__((packed));
+ };
+diff -Naurp ncpfs-2.2.6.orig//include/ncp/ncp.h ncpfs-2.2.6//include/ncp/ncp.h
+--- ncpfs-2.2.6.orig//include/ncp/ncp.h 2005-01-27 12:35:59.000000000 -0500
++++ ncpfs-2.2.6//include/ncp/ncp.h 2011-02-10 02:38:18.822076000 -0500
+@@ -95,7 +95,7 @@ struct prop_net_address {
+ #ifdef SWIG
+ fixedArray node[IPX_NODE_LEN];
+ #else
+- u_int8_t node[IPX_NODE_LEN] __attribute__((packed));
++ u_int8_t node[IPX_NODE_LEN];
+ #endif
+ u_int16_t port __attribute__((packed));
+ };
+@@ -163,20 +163,20 @@ struct nw_queue_job_entry {
+ u_int32_t ClientTask __attribute__((packed));
+ u_int32_t ClientObjectID __attribute__((packed));
+ u_int32_t TargetServerID __attribute__((packed));
+- u_int8_t TargetExecTime[6] __attribute__((packed));
+- u_int8_t JobEntryTime[6] __attribute__((packed));
++ u_int8_t TargetExecTime[6];
++ u_int8_t JobEntryTime[6];
+ u_int32_t JobNumber __attribute__((packed));
+ u_int16_t JobType __attribute__((packed));
+ u_int16_t JobPosition __attribute__((packed));
+ u_int16_t JobControlFlags __attribute__((packed));
+- u_int8_t FileNameLen __attribute__((packed));
+- char JobFileName[13] __attribute__((packed));
++ u_int8_t FileNameLen;
++ char JobFileName[13];
+ u_int32_t JobFileHandle __attribute__((packed));
+ u_int32_t ServerStation __attribute__((packed));
+ u_int32_t ServerTaskNumber __attribute__((packed));
+ u_int32_t ServerObjectID __attribute__((packed));
+- char JobTextDescription[50] __attribute__((packed));
+- char ClientRecordArea[152] __attribute__((packed));
++ char JobTextDescription[50];
++ char ClientRecordArea[152];
+ };
+
+ struct queue_job {
+@@ -217,18 +217,18 @@ struct print_job_record {
+ };
+ #else
+ struct print_job_record {
+- u_int8_t Version __attribute__((packed));
+- u_int8_t TabSize __attribute__((packed));
++ u_int8_t Version;
++ u_int8_t TabSize;
+ u_int16_t Copies __attribute__((packed));
+ u_int16_t CtrlFlags __attribute__((packed));
+ u_int16_t Lines __attribute__((packed));
+ u_int16_t Rows __attribute__((packed));
+- char FormName[16] __attribute__((packed));
+- u_int8_t Reserved[6] __attribute__((packed));
+- char BannerName[13] __attribute__((packed));
+- char FnameBanner[13] __attribute__((packed));
+- char FnameHeader[14] __attribute__((packed));
+- char Path[80] __attribute__((packed));
++ char FormName[16];
++ u_int8_t Reserved[6];
++ char BannerName[13];
++ char FnameBanner[13];
++ char FnameHeader[14];
++ char Path[80];
+ };
+ #endif
+
+diff -Naurp ncpfs-2.2.6.orig//include/ncp/ncplib.h ncpfs-2.2.6//include/ncp/ncplib.h
+--- ncpfs-2.2.6.orig//include/ncp/ncplib.h 2005-01-27 12:35:59.000000000 -0500
++++ ncpfs-2.2.6//include/ncp/ncplib.h 2011-02-10 02:38:18.822076000 -0500
+@@ -462,24 +462,24 @@ struct ncp_file_server_info
+ #else
+ struct ncp_file_server_info
+ {
+- u_int8_t ServerName[48] __attribute__((packed));
+- u_int8_t FileServiceVersion __attribute__((packed));
+- u_int8_t FileServiceSubVersion __attribute__((packed));
++ u_int8_t ServerName[48];
++ u_int8_t FileServiceVersion;
++ u_int8_t FileServiceSubVersion;
+ u_int16_t MaximumServiceConnections __attribute__((packed));
+ u_int16_t ConnectionsInUse __attribute__((packed));
+ u_int16_t NumberMountedVolumes __attribute__((packed));
+- u_int8_t Revision __attribute__((packed));
+- u_int8_t SFTLevel __attribute__((packed));
+- u_int8_t TTSLevel __attribute__((packed));
++ u_int8_t Revision;
++ u_int8_t SFTLevel;
++ u_int8_t TTSLevel;
+ u_int16_t MaxConnectionsEverUsed __attribute__((packed));
+- u_int8_t AccountVersion __attribute__((packed));
+- u_int8_t VAPVersion __attribute__((packed));
+- u_int8_t QueueVersion __attribute__((packed));
+- u_int8_t PrintVersion __attribute__((packed));
+- u_int8_t VirtualConsoleVersion __attribute__((packed));
+- u_int8_t RestrictionLevel __attribute__((packed));
+- u_int8_t InternetBridge __attribute__((packed));
+- u_int8_t Reserved[60] __attribute__((packed));
++ u_int8_t AccountVersion;
++ u_int8_t VAPVersion;
++ u_int8_t QueueVersion;
++ u_int8_t PrintVersion;
++ u_int8_t VirtualConsoleVersion;
++ u_int8_t RestrictionLevel;
++ u_int8_t InternetBridge;
++ u_int8_t Reserved[60];
+ };
+ #endif
+
+@@ -592,7 +592,7 @@ struct ncp_station_addr
+ #ifdef SWIG
+ fixedArray Node[6];
+ #else
+- u_int8_t Node[6] __attribute__((packed));
++ u_int8_t Node[6];
+ #endif
+ u_int16_t Socket __attribute__((packed));
+ };
+@@ -602,32 +602,32 @@ struct ncp_prop_login_control
+ #ifdef SWIG
+ fixedArray AccountExpireDate[3];
+ #else
+- u_int8_t AccountExpireDate[3] __attribute__((packed));
++ u_int8_t AccountExpireDate[3];
+ #endif
+- u_int8_t Disabled __attribute__((packed));
++ u_int8_t Disabled;
+ #ifdef SWIG
+ fixedArray PasswordExpireDate[3];
+ #else
+- u_int8_t PasswordExpireDate[3] __attribute__((packed));
++ u_int8_t PasswordExpireDate[3];
+ #endif
+- u_int8_t GraceLogins __attribute__((packed));
++ u_int8_t GraceLogins;
+ u_int16_t PasswordExpireInterval __attribute__((packed));
+- u_int8_t MaxGraceLogins __attribute__((packed));
+- u_int8_t MinPasswordLength __attribute__((packed));
++ u_int8_t MaxGraceLogins;
++ u_int8_t MinPasswordLength;
+ u_int16_t MaxConnections __attribute__((packed));
+ #ifdef SWIG
+ fixedArray ConnectionTimeMask[42] __attribute__((packed));
+ fixedArray LastLogin[6] __attribute__((packed));
+ #else
+- u_int8_t ConnectionTimeMask[42] __attribute__((packed));
+- u_int8_t LastLogin[6] __attribute__((packed));
++ u_int8_t ConnectionTimeMask[42];
++ u_int8_t LastLogin[6];
+ #endif
+- u_int8_t RestrictionMask __attribute__((packed));
+- u_int8_t reserved __attribute__((packed));
++ u_int8_t RestrictionMask;
++ u_int8_t reserved;
+ u_int32_t MaxDiskUsage __attribute__((packed));
+ u_int16_t BadLoginCount __attribute__((packed));
+ u_int32_t BadLoginCountDown __attribute__((packed));
+- struct ncp_station_addr LastIntruder __attribute__((packed));
++ struct ncp_station_addr LastIntruder;
+ };
+
+ NWCCODE NWReadPropertyValue(NWCONN_HANDLE conn, const char *objName,
+diff -Naurp ncpfs-2.2.6.orig//ipx-1.0/ipx_cmd.c ncpfs-2.2.6//ipx-1.0/ipx_cmd.c
+--- ncpfs-2.2.6.orig//ipx-1.0/ipx_cmd.c 2005-01-27 12:35:59.000000000 -0500
++++ ncpfs-2.2.6//ipx-1.0/ipx_cmd.c 2011-02-10 02:40:19.222076002 -0500
+@@ -63,8 +63,8 @@
+ /* we are doing EthernetII... Any objections? */
+ struct {
+ u_int16_t unknown __attribute__((packed));
+- u_int8_t dst[6] __attribute__((packed));
+- u_int8_t src[6] __attribute__((packed));
++ u_int8_t dst[6];
++ u_int8_t src[6];
+ u_int16_t type __attribute__((packed));
+ u_int8_t ipx[16384];
+ } buffer;
+diff -Naurp ncpfs-2.2.6.orig//lib/ncplib.c ncpfs-2.2.6//lib/ncplib.c
+--- ncpfs-2.2.6.orig//lib/ncplib.c 2011-02-10 02:38:05.000000000 -0500
++++ ncpfs-2.2.6//lib/ncplib.c 2011-02-10 02:38:18.822076000 -0500
+@@ -2584,13 +2584,13 @@ ncp_request(struct ncp_conn *conn, int f
+
+ struct nw_time_buffer
+ {
+- u_int8_t year __attribute__((packed));
+- u_int8_t month __attribute__((packed));
+- u_int8_t day __attribute__((packed));
+- u_int8_t hour __attribute__((packed));
+- u_int8_t minute __attribute__((packed));
+- u_int8_t second __attribute__((packed));
+- u_int8_t wday __attribute__((packed));
++ u_int8_t year;
++ u_int8_t month;
++ u_int8_t day;
++ u_int8_t hour;
++ u_int8_t minute;
++ u_int8_t second;
++ u_int8_t wday;
+ };
+
+ static time_t
diff --git a/net-fs/ncpfs/files/ncpfs-2.2.6-servername-array-fix.patch b/net-fs/ncpfs/files/ncpfs-2.2.6-servername-array-fix.patch
new file mode 100644
index 000000000000..3e96aac5b364
--- /dev/null
+++ b/net-fs/ncpfs/files/ncpfs-2.2.6-servername-array-fix.patch
@@ -0,0 +1,15 @@
+diff -Naurp ncpfs-2.2.6.orig/include/ncp/ncplib.h ncpfs-2.2.6/include/ncp/ncplib.h
+--- ncpfs-2.2.6.orig/include/ncp/ncplib.h 2005-01-27 12:35:59.000000000 -0500
++++ ncpfs-2.2.6/include/ncp/ncplib.h 2014-08-12 21:01:01.159192798 -0400
+@@ -485,9 +485,9 @@ struct ncp_file_server_info
+
+ struct ncp_file_server_info_2 {
+ #ifdef SWIG
+- fixedArray ServerName[49];
++ fixedArray ServerName[50];
+ #else
+- u_int8_t ServerName[49];
++ u_int8_t ServerName[50];
+ #endif
+ u_int8_t FileServiceVersion;
+ u_int8_t FileServiceSubVersion;
diff --git a/net-fs/ncpfs/files/ncpfs-2.2.6-zend_function_entry.patch b/net-fs/ncpfs/files/ncpfs-2.2.6-zend_function_entry.patch
new file mode 100644
index 000000000000..648cb8f7f770
--- /dev/null
+++ b/net-fs/ncpfs/files/ncpfs-2.2.6-zend_function_entry.patch
@@ -0,0 +1,11 @@
+--- a/contrib/php/php_auth_nds.c
++++ b/contrib/php/php_auth_nds.c
+@@ -1102,7 +1102,7 @@
+ php_info_print_table_end();
+ }
+
+-function_entry auth_nds_functions[] = {
++zend_function_entry auth_nds_functions[] = {
+ PHP_FE(auth_bindery, NULL)
+ PHP_FE(auth_nds, NULL)
+ PHP_FE(auth_tree, NULL)
diff --git a/net-fs/ncpfs/metadata.xml b/net-fs/ncpfs/metadata.xml
new file mode 100644
index 000000000000..494dcfa44647
--- /dev/null
+++ b/net-fs/ncpfs/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>kumba@gentoo.org</email>
+ <name>Joshua Kinard</name>
+ </maintainer>
+ <longdescription>Provides Access to Netware services using the NCP protocol (Kernel support must be activated!)</longdescription>
+</pkgmetadata>
diff --git a/net-fs/ncpfs/ncpfs-2.2.6-r3.ebuild b/net-fs/ncpfs/ncpfs-2.2.6-r3.ebuild
new file mode 100644
index 000000000000..f66a06347b88
--- /dev/null
+++ b/net-fs/ncpfs/ncpfs-2.2.6-r3.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils pam
+
+DESCRIPTION="Provides Access to Netware services using the NCP protocol"
+HOMEPAGE="ftp://platan.vc.cvut.cz/pub/linux/ncpfs/"
+SRC_URI="ftp://platan.vc.cvut.cz/pub/linux/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~mips ppc ppc64 x86"
+IUSE="nls pam php"
+
+DEPEND="nls? ( sys-devel/gettext )
+ pam? ( virtual/pam )
+ php? ( || ( dev-lang/php virtual/httpd-php ) )"
+
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # Add patch for PHP extension sandbox violation
+ epatch "${FILESDIR}"/${PN}-2.2.5-php.patch
+ epatch "${FILESDIR}"/${P}-gcc4.patch
+ epatch "${FILESDIR}"/${P}-missing-includes.patch
+
+ # Add a patch to fix multiple vulnerabilities.
+ # CVE-2010-0788, CVE-2010-0790, & CVE-2010-0791.
+ # http://seclists.org/fulldisclosure/2010/Mar/122
+ epatch "${FILESDIR}"/${P}-multiple-vulns.patch
+
+ # Add a patch that removes the __attribute__((packed)); directive
+ # from several struct members in include/ncp/ncplib.h. This will
+ # cut down on a large number of compile warnings generated by modern
+ # gcc releases.
+ epatch "${FILESDIR}"/${P}-remove-packed-attrib.patch
+
+ # Misc patches borrowed from Mageia.
+ epatch "${FILESDIR}"/${P}-align-fix.patch
+ epatch "${FILESDIR}"/${P}-getuid-fix.patch
+ epatch "${FILESDIR}"/${P}-pam_ncp_auth-fix.patch
+ epatch "${FILESDIR}"/${P}-servername-array-fix.patch
+
+ # Misc patches borrowed from Debian.
+ # Fixes Bug #497278
+ epatch "${FILESDIR}"/${P}-drop-kernel-check.patch
+ epatch "${FILESDIR}"/${P}-drop-mtab-support.patch
+ epatch "${FILESDIR}"/${P}-no-suid-root.patch
+ epatch "${FILESDIR}"/${P}-remove-libncp_atomic-header.patch
+
+ # Bug #273484.
+ sed -i '/ldconfig/d' lib/Makefile.in
+
+ # Support LDFLAGS.
+ epatch "${FILESDIR}"/${P}-ldflags-support.patch
+
+ # Bug 446696. This might need re-diffing if additional Makefile
+ # fixes are added.
+ epatch "${FILESDIR}"/${P}-makefile-fix-soname-link.patch
+
+ # bug 522444
+ epatch "${FILESDIR}"/${P}-zend_function_entry.patch
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ $(use_enable pam pam "$(getpam_mod_dir)") \
+ $(use_enable php)
+}
+
+src_install() {
+ dodir $(getpam_mod_dir) /usr/sbin /sbin
+
+ # Bug #446696.
+ #ln -s "${D}"/usr/lib64/libncp.so.2.3 "${D}"/libncp.so.2.3.0
+
+ # Install the main programs, then the headers.
+ emake DESTDIR="${D}" install || die
+ emake DESTDIR="${D}" install-dev || die
+
+ # Install a startup script in /etc/init.d and a conf file in /etc/conf.d
+ newconfd "${FILESDIR}"/ipx.confd ipx
+ newinitd "${FILESDIR}"/ipx.init ipx
+
+ # Docs
+ dodoc FAQ README
+}
diff --git a/net-fs/ncpfs/ncpfs-2.2.6-r4.ebuild b/net-fs/ncpfs/ncpfs-2.2.6-r4.ebuild
new file mode 100644
index 000000000000..481e43c3474f
--- /dev/null
+++ b/net-fs/ncpfs/ncpfs-2.2.6-r4.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit pam
+
+DESCRIPTION="Provides access to Netware services using the NCP protocol"
+HOMEPAGE="ftp://platan.vc.cvut.cz/pub/linux/ncpfs/"
+SRC_URI="ftp://platan.vc.cvut.cz/pub/linux/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~mips ~ppc ~ppc64 ~x86"
+IUSE="nls pam php"
+
+DEPEND="
+ nls? ( sys-devel/gettext )
+ pam? ( virtual/pam )
+ php? ( || ( dev-lang/php:* virtual/httpd-php:* ) )"
+
+RDEPEND="${DEPEND}"
+
+MY_PATCHES=(
+ # PHP extension sandbox violation.
+ "${FILESDIR}"/${PN}-2.2.5-php.patch
+ "${FILESDIR}"/${P}-gcc4.patch
+ "${FILESDIR}"/${P}-missing-includes.patch
+
+ # Add a patch to fix multiple vulnerabilities.
+ # CVE-2010-0788, CVE-2010-0790, & CVE-2010-0791.
+ # http://seclists.org/fulldisclosure/2010/Mar/122
+ "${FILESDIR}"/${P}-multiple-vulns.patch
+
+ # Add a patch that removes the __attribute__((packed)); directive
+ # from several struct members in include/ncp/ncplib.h. This will
+ # cut down on a large number of compile warnings generated by modern
+ # gcc releases.
+ "${FILESDIR}"/${P}-remove-packed-attrib.patch
+
+ # Misc patches borrowed from Mageia.
+ "${FILESDIR}"/${P}-align-fix.patch
+ "${FILESDIR}"/${P}-getuid-fix.patch
+ "${FILESDIR}"/${P}-pam_ncp_auth-fix.patch
+ "${FILESDIR}"/${P}-servername-array-fix.patch
+
+ # Misc patches borrowed from Debian.
+ # Fixes Bug #497278
+ "${FILESDIR}"/${P}-drop-kernel-check.patch
+ "${FILESDIR}"/${P}-drop-mtab-support.patch
+ "${FILESDIR}"/${P}-no-suid-root.patch
+ "${FILESDIR}"/${P}-remove-libncp_atomic-header.patch
+
+ # Support LDFLAGS.
+ "${FILESDIR}"/${P}-ldflags-support.patch
+
+ # Bug 446696. This might need re-diffing if additional Makefile
+ # fixes are added.
+ "${FILESDIR}"/${P}-makefile-fix-soname-link.patch
+
+ # bug 522444
+ "${FILESDIR}"/${P}-zend_function_entry.patch
+)
+
+DOCS=( FAQ README )
+
+src_prepare() {
+ default
+
+ # Bug #273484.
+ sed -i '/ldconfig/d' lib/Makefile.in || die
+
+ epatch "${MY_PATCHES[@]}"
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ $(use_enable pam pam "$(getpam_mod_dir)") \
+ $(use_enable php)
+}
+
+src_install() {
+ dodir $(getpam_mod_dir) /usr/sbin /sbin
+
+ # Install main software and headers.
+ emake DESTDIR="${D}" install
+ emake DESTDIR="${D}" install-dev
+
+ # Install a startup script in /etc/init.d and a conf file in /etc/conf.d
+ newconfd "${FILESDIR}"/ipx.confd ipx
+ newinitd "${FILESDIR}"/ipx.init ipx
+
+ einstalldocs
+}
diff --git a/net-fs/netatalk/Manifest b/net-fs/netatalk/Manifest
new file mode 100644
index 000000000000..46c0d0cd1c5c
--- /dev/null
+++ b/net-fs/netatalk/Manifest
@@ -0,0 +1,11 @@
+AUX netatalk-3.1.7-gentoo.patch 4910 SHA256 adfb4a8bb52253b18054d88395db229e31ba5d669dd86b1d5025192b5be58960 SHA512 5b8ff4ba306e1467d089df9c3f9dcfb22c4c21cce2c6b53e29dc84006efda0b88609cd00a01a2eec8f153d85d3c7283a1b5123219ecce1fe120a143290f3958f WHIRLPOOL a08fa1a6ce32ba856f86d1eb60565a6b3e0a37f24d89c4159f0d58e15fadefc217b7b080b962ca1992cc5f485800c0e70cdc38165d1ef6ffb96279758e62194d
+AUX netatalk-3.1.8-disable-ld-library-path.patch 1860 SHA256 cef401744ea7ec9114eea059e8aae1e8e662fa1c3fcfa850cf79e95195321462 SHA512 971e1d4787f94e3f608dd7de4ea8721d3027aacc5b6461fbee0332d7434704336a35c2962d54c4b380bb3cf76c56d9cd6e8bf094f9bd9a0958054bf83e25299b WHIRLPOOL 7c90efc7e9b025e6835494b58660f9cb2e01f583d9a7eba09c5ffbc59f0e3134d6f749b16fa29894cbcbc372c11869d384668c23f5d193624b656e092178477b
+DIST netatalk-3.1.10.tar.bz2 1811929 SHA256 2b40161985bb32cff5660bf689a4704f15c33bb87565efc7805dd5c75ad1fcc7 SHA512 dd1f49307b5298a784e2b487c0da94459632bab8353cf505cd4b104f4c0b55bbb77caf73e8b4c60af64018b345df78337accac3b5ed6cb5620309b163a86d32b WHIRLPOOL f5996ef249e98e5cb95ab214087f482502e6177bfa4d259119db8362e45665d775ca4e41277b34e627c4c199859915f9732c101adc0f17ba56bdcf64efc7a789
+DIST netatalk-3.1.11.tar.bz2 1812227 SHA256 3434472ba96d3bbe3b024274438daad83b784ced720f7662a4c1d0a1078799a6 SHA512 330e584f34b5f5e8714b3eca8e11adb93134cc0afa73e9bc25ddadcf3e9a96779a2979dfc08a64d343b148bc2d4e0e0f25b08d9c46d6b68057611d04ecfd06ea WHIRLPOOL d5bc44c13585cb41b8cfd48876398842900b830a8f685585ad993d719bb0a3614bb87d1d43213200eceb9b57ebc48138f3dc6c02692ab6dd27196aa3e59f8e8d
+DIST netatalk-3.1.8.tar.bz2 1802404 SHA256 34668d5f53b780e9f143c2d7ee06ebc1c2bd7758c60ca483c8b08da27dcc4d4c SHA512 734745743b2d5fe39f3d6716f377e6255d6a061e3c615a4fe30db388ec6d848f6db063d733dfa24ccf967f1e9042841bce4824f4bed391952c4304ee11e11b0d WHIRLPOOL dff6050c746b301864d34b9577f9cea7195878434306e4ad83032a51ba6841b4b8537db6cedef27642d751beeefacba62026addd4b8f5056a9fe9b0b07bf98d8
+EBUILD netatalk-3.1.10.ebuild 4963 SHA256 26e3c0f1430945b0524c41f71b137e677c84d2315ec1773c87ef1d15d139a9f1 SHA512 9984c07268251cfb30d6e43138f7cd5b6b1e8cb2e265e519e3af9392b55dd33acf5731e2114f96d6f214da7c3be01d986096cfa28c95b226076f1475e0163098 WHIRLPOOL 4ea6e1b8976c4a69070ba9547a4a50c09547e4e9bc10336af5c12f699b2ffedec15e918246eca0e56c3d522f00fd3b5773b606fd82d4c68906df031b14735d83
+EBUILD netatalk-3.1.11.ebuild 4966 SHA256 11c4c9254ab135d06f90c420913726cef76e83e2dd8ebacffc729dc40de3a6a1 SHA512 fc71d343e461e36242c80456aad94fe205465bf8b332620ff83f337fc49d233949648fe5f1d574cd3c3d85eb17b4c7bca8f5e799d71b1aa13fdcddbcadf8099f WHIRLPOOL afe04e8d7c90e6293b60d5d1db9fc558fec947e2214b5c857b90cbd1a1a1f8361a0b310af7b986733f6f22034cfa060bc09126730d26d2d70483a69e0292a0ce
+EBUILD netatalk-3.1.8.ebuild 4867 SHA256 ab5380edd5694fbb143ece405fea7822661da867ccb742cb47676d500a838763 SHA512 086e53f7ddfc438e0b173e7f6e208a2245d224e44a70fde07fca5294f299c18fc04a75986fa02b9e5759c5319886514d319fb91ee5ec94209a29663dc02e7a63 WHIRLPOOL b593c1e4f5536bc96cba929d62f7021112ed44dd0f42751e7f5e1fc1134bd992b3d8638633e94872abf7904ac6946661987e7edd975403f252f71e57488d1325
+MISC ChangeLog 5797 SHA256 ecf2a86c8c696434e1702c0db759cbc94971183cc0b00da6f0bb20a9234a7d40 SHA512 4b07df7430eb520dd8dcfc54037718d6b7543c3bc597672489e47ec0a250311121028e2c2494898bc5e3fa7f9e57140dc009caeb1aa684997a2c13dd853ad12f WHIRLPOOL d411b47c47febf70917cb45ff480ea109f52fb8271cda7e10f26e0f7551d77ddf697dfdd486998fd59c4a8f90c16ef157dabdc5792bcc5ea002233253781185f
+MISC ChangeLog-2015 20828 SHA256 717cf11ea01ad5ff15196200c293748faf16d0b91678fa0f3f47ea14a4c78ec8 SHA512 3d9e2ea4bc930f0d37c81e11f046b654e690121ca58bedff26d0a6a4f6c07e8769e44ba399927f108e23b033c53d726a90c524f60d049da5a5c2962fa91b449f WHIRLPOOL 9567c3ba1db930bb056bf2396fc0a01590c4a6e402db13c6c6fd1be5237a7ee71ef72a69ee46e79e6e1816844cbdfc45361b4c2ade3539e50afee5daf1b82c80
+MISC metadata.xml 826 SHA256 66c2c05b42b094daa6300cacfc7dd8e7c9375b47f790e102d0b6827456adc5e7 SHA512 5e5429bdbcee4cdd74c5353fd477828e990d24aaac6782ea9c7d725a39af9c6ca19fb988bb5864b8085ddfababfed11769161cfddf86dcb3b9777302175a4a7b WHIRLPOOL 13672de441969c94a52df40c41e508dd89ebf39ac613eb6cfcb943148ce14a2c32aa684cabaef6a1dc7d3352411875653fa19981b3af740782265a3f9760b4bc
diff --git a/net-fs/netatalk/files/netatalk-3.1.7-gentoo.patch b/net-fs/netatalk/files/netatalk-3.1.7-gentoo.patch
new file mode 100644
index 000000000000..82dd788fc6d2
--- /dev/null
+++ b/net-fs/netatalk/files/netatalk-3.1.7-gentoo.patch
@@ -0,0 +1,132 @@
+ Makefile.am | 6 ------
+ etc/netatalk/Makefile.am | 5 +++--
+ etc/netatalk/afp_avahi.c | 2 +-
+ etc/uams/Makefile.am | 20 ++++++++++----------
+ libatalk/dsi/Makefile.am | 3 ++-
+ libatalk/vfs/Makefile.am | 1 +
+ macros/netatalk.m4 | 1 -
+ 7 files changed, 17 insertions(+), 21 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index ec7f14d..b87fd8a 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -11,12 +11,6 @@ EXTRA_DIST = CONTRIBUTORS COPYRIGHT COPYING NEWS VERSION abigen.sh
+ ACLOCAL_AMFLAGS = -I macros
+ AUTOMAKE_OPTIONS = foreign
+
+-if RUN_LDCONFIG
+-install-exec-hook:
+- @printf "Running ldconfig to ensure libraries installed in system library directories are added to the dynamic linker cache ... "
+- @-@NETA_LDCONFIG@
+- @printf "done\n"
+-endif
+
+ if DEVELOPER
+ abi-clean:
+diff --git a/etc/netatalk/Makefile.am b/etc/netatalk/Makefile.am
+index 5392b9d..3e62e2d 100644
+--- a/etc/netatalk/Makefile.am
++++ b/etc/netatalk/Makefile.am
+@@ -18,6 +18,7 @@ netatalk_LDADD = \
+ $(top_builddir)/libatalk/libatalk.la
+
+ netatalk_LDFLAGS =
++netatalk_CPPFLAGS =
+
+ if USE_BUILTIN_LIBEVENT
+ netatalk_CFLAGS += \
+@@ -27,8 +28,8 @@ netatalk_CFLAGS += \
+ netatalk_LDADD += \
+ $(top_builddir)/libevent/libevent.la
+ else
+-netatalk_CFLAGS += @LIBEVENT_CFLAGS@
+-netatalk_LDFLAGS += @LIBEVENT_LDFLAGS@ -levent
++netatalk_CPPFLAGS += @LIBEVENT_CFLAGS@
++netatalk_LDADD += @LIBEVENT_LDFLAGS@ -levent
+ endif
+
+ noinst_HEADERS = afp_zeroconf.h afp_avahi.h afp_mdns.h
+diff --git a/etc/netatalk/afp_avahi.c b/etc/netatalk/afp_avahi.c
+index d6b55dc..dade1e0 100644
+--- a/etc/netatalk/afp_avahi.c
++++ b/etc/netatalk/afp_avahi.c
+@@ -164,8 +164,8 @@ static void register_stuff(void) {
+ return;
+
+ fail:
+- time(NULL);
+ // avahi_threaded_poll_quit(ctx->threaded_poll);
++ return;
+ }
+
+ /* Called when publishing of service data completes */
+diff --git a/etc/uams/Makefile.am b/etc/uams/Makefile.am
+index 23fd3d1..0e882ea 100644
+--- a/etc/uams/Makefile.am
++++ b/etc/uams/Makefile.am
+@@ -95,16 +95,16 @@ uams_dhx_pam_la_CFLAGS = @SSL_CFLAGS@ @PAM_CFLAGS@
+ uams_dhx2_pam_la_CFLAGS = @LIBGCRYPT_CFLAGS@ @PAM_CFLAGS@
+ uams_gss_la_CFLAGS = @GSSAPI_CFLAGS@ @KRB5_CFLAGS@
+
+-uams_guest_la_LDFLAGS = -module -avoid-version
+-uams_randnum_la_LDFLAGS = -module -avoid-version @SSL_LIBS@
+-uams_passwd_la_LDFLAGS = -module -avoid-version @CRYPT_LIBS@
+-uams_pam_la_LDFLAGS = -module -avoid-version @PAM_LIBS@
+-uams_pgp_la_LDFLAGS = -module -avoid-version @SSL_LIBS@
+-uams_dhx_passwd_la_LDFLAGS = -module -avoid-version @CRYPT_LIBS@ @SSL_LIBS@
+-uams_dhx_pam_la_LDFLAGS = -module -avoid-version @CRYPT_LIBS@ @SSL_LIBS@ @PAM_LIBS@
+-uams_dhx2_passwd_la_LDFLAGS = -module -avoid-version @CRYPT_LIBS@ @LIBGCRYPT_LIBS@
+-uams_dhx2_pam_la_LDFLAGS = -module -avoid-version @LIBGCRYPT_LIBS@ @PAM_LIBS@
+-uams_gss_la_LDFLAGS = -module -avoid-version @GSSAPI_LIBS@ @KRB5_LIBS@
++uams_guest_la_LDFLAGS = -shared -module -avoid-version
++uams_randnum_la_LDFLAGS = -shared -module -avoid-version @SSL_LIBS@
++uams_passwd_la_LDFLAGS = -shared -module -avoid-version @CRYPT_LIBS@
++uams_pam_la_LDFLAGS = -shared -module -avoid-version @PAM_LIBS@
++uams_pgp_la_LDFLAGS = -shared -module -avoid-version @SSL_LIBS@
++uams_dhx_passwd_la_LDFLAGS = -shared -module -avoid-version @CRYPT_LIBS@ @SSL_LIBS@
++uams_dhx_pam_la_LDFLAGS = -shared -module -avoid-version @CRYPT_LIBS@ @SSL_LIBS@ @PAM_LIBS@
++uams_dhx2_passwd_la_LDFLAGS = -shared -module -avoid-version @CRYPT_LIBS@ @LIBGCRYPT_LIBS@
++uams_dhx2_pam_la_LDFLAGS = -shared -module -avoid-version @LIBGCRYPT_LIBS@ @PAM_LIBS@
++uams_gss_la_LDFLAGS = -shared -module -avoid-version @GSSAPI_LIBS@ @KRB5_LIBS@
+
+ #
+ # module compilation
+diff --git a/libatalk/dsi/Makefile.am b/libatalk/dsi/Makefile.am
+index 34fa76e..dbde336 100644
+--- a/libatalk/dsi/Makefile.am
++++ b/libatalk/dsi/Makefile.am
+@@ -1,9 +1,10 @@
+ # Makefile.am for libatalk/dsi/
+
+-INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/sys
++AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/sys
+
+ LIBS = @LIBS@
+
+ noinst_LTLIBRARIES = libdsi.la
+
+ libdsi_la_SOURCES = dsi_attn.c dsi_close.c dsi_cmdreply.c dsi_getsess.c dsi_getstat.c dsi_init.c dsi_opensess.c dsi_read.c dsi_tcp.c dsi_tickle.c dsi_write.c dsi_stream.c
++libdsi_la_LIBADD = $(WRAP_LIBS)
+diff --git a/libatalk/vfs/Makefile.am b/libatalk/vfs/Makefile.am
+index aa62aeb..8ac2045 100644
+--- a/libatalk/vfs/Makefile.am
++++ b/libatalk/vfs/Makefile.am
+@@ -6,4 +6,5 @@ libvfs_la_SOURCES = vfs.c unix.c ea_ad.c ea_sys.c extattr.c
+
+ if HAVE_ACLS
+ libvfs_la_SOURCES += acl.c
++libvfs_la_LIBADD = $(ACL_LIBS)
+ endif
+diff --git a/macros/netatalk.m4 b/macros/netatalk.m4
+index ea2bbff..40ab817 100644
+--- a/macros/netatalk.m4
++++ b/macros/netatalk.m4
+@@ -790,7 +790,6 @@ save_CFLAGS="$CFLAGS"
+ save_LDFLAGS="$LDFLAGS"
+ save_LIBS="$LIBS"
+ CFLAGS=""
+-LDFLAGS=""
+ LIBS=""
+ LDAP_CFLAGS=""
+ LDAP_LDFLAGS=""
diff --git a/net-fs/netatalk/files/netatalk-3.1.8-disable-ld-library-path.patch b/net-fs/netatalk/files/netatalk-3.1.8-disable-ld-library-path.patch
new file mode 100644
index 000000000000..0335366b23b5
--- /dev/null
+++ b/net-fs/netatalk/files/netatalk-3.1.8-disable-ld-library-path.patch
@@ -0,0 +1,34 @@
+there's no need to set LD_LIBRARY_PATH in order to perform link tests, and
+it's actually undesirable as it'll cause the toolchain to search a different
+path than the ones it's configured to (host lib wise).
+
+https://bugs.gentoo.org/564350
+
+--- a/macros/db3-check.m4
++++ b/macros/db3-check.m4
+@@ -142,15 +142,7 @@ if test "x$bdb_required" = "xyes"; then
+ CPPFLAGS="-I${bdbdir}/include${subdir} $CPPFLAGS"
+ LDFLAGS="-L$bdblibdir $LDFLAGS"
+
+- dnl -- Uses version set by NETATALK_BDB_HEADER to try to run
+- dnl -- a conftest that checks that header/lib version match
+- dnl -- $shlibpath_var is set by LIBTOOL, its value is
+- dnl -- LD_LIBRARY_PATH on many platforms. This will be fairly
+- dnl -- portable hopefully. Reference:
+- dnl -- http://lists.gnu.org/archive/html/autoconf/2009-03/msg00040.html
+- eval export $shlibpath_var=$bdblibdir
+ NETATALK_BDB_TRY_LINK
+- eval export $shlibpath_var=$saved_shlibpath_var
+
+ if test x"${atalk_cv_bdb_version}" = x"yes"; then
+ BDB_CFLAGS="-I${bdbdir}/include${subdir}"
+@@ -174,9 +166,7 @@ if test "x$bdb_required" = "xyes"; then
+ CPPFLAGS="-I${bdbdir}/include${subdir} $CPPFLAGS"
+ LDFLAGS="-L$bdblibdir $LDFLAGS"
+
+- eval export $shlibpath_var=$bdblibdir
+ NETATALK_BDB_TRY_LINK
+- eval export $shlibpath_var=$saved_shlibpath_var
+
+ if test x"${atalk_cv_bdb_version}" = x"yes"; then
+ BDB_CFLAGS="-I${bdbdir}/include${subdir}"
diff --git a/net-fs/netatalk/metadata.xml b/net-fs/netatalk/metadata.xml
new file mode 100644
index 000000000000..22c8cf038f60
--- /dev/null
+++ b/net-fs/netatalk/metadata.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <use>
+ <flag name="pgp">
+ Add support pgp authentication module
+ </flag>
+ <flag name="quota">
+ Add support for user quota on various filesystems.
+ </flag>
+ <flag name="shadow">
+ Add shadow support
+ </flag>
+ <flag name="tracker">
+ Add support for spotlight like tracker
+ </flag>
+ <flag name="utils">
+ Install afpstats script
+ </flag>
+ <flag name="ssl">
+ Use <pkg>dev-libs/openssl</pkg> to provide DHX User Access
+ Modules. These are not used with most recent versions of OS X
+ and can be kept disabled without risks.
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">netatalk</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-fs/netatalk/netatalk-3.1.10.ebuild b/net-fs/netatalk/netatalk-3.1.10.ebuild
new file mode 100644
index 000000000000..39d75a27f41b
--- /dev/null
+++ b/net-fs/netatalk/netatalk-3.1.10.ebuild
@@ -0,0 +1,181 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+AUTOTOOLS_AUTORECONF=yes
+
+inherit autotools-utils flag-o-matic multilib pam python-r1 systemd versionator
+
+DESCRIPTION="Open Source AFP server"
+HOMEPAGE="http://netatalk.sourceforge.net/"
+SRC_URI="mirror://sourceforge/project/${PN}/${PN}/$(get_version_component_range 1-3)/${P}.tar.bz2"
+
+LICENSE="GPL-2 BSD"
+SLOT="0/17.0"
+KEYWORDS="amd64 arm ~ppc ~ppc64 x86 ~x86-fbsd"
+IUSE="acl cracklib dbus debug pgp kerberos ldap pam quota samba +shadow ssl static-libs tracker tcpd +utils zeroconf"
+
+CDEPEND="
+ !app-editors/yudit
+ dev-libs/libevent:0=
+ >=dev-libs/libgcrypt-1.2.3:0
+ sys-apps/coreutils
+ >=sys-libs/db-4.2.52:=
+ sys-libs/tdb
+ acl? (
+ sys-apps/attr
+ sys-apps/acl
+ )
+ cracklib? ( sys-libs/cracklib )
+ dbus? ( sys-apps/dbus dev-libs/dbus-glib )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )
+ pam? ( virtual/pam )
+ ssl? ( dev-libs/openssl:0 )
+ tcpd? ( sys-apps/tcp-wrappers )
+ tracker? ( app-misc/tracker )
+ utils? ( ${PYTHON_DEPS} )
+ zeroconf? ( net-dns/avahi[dbus] )
+"
+RDEPEND="${CDEPEND}
+ utils? (
+ dev-lang/perl
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ )"
+DEPEND="${CDEPEND}
+ virtual/yacc
+ sys-devel/flex"
+
+RESTRICT="test"
+
+REQUIRED_USE="
+ ldap? ( acl )
+ tracker? ( dbus )
+ utils? ( ${PYTHON_REQUIRED_USE} )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1.7-gentoo.patch
+ "${FILESDIR}"/${PN}-3.1.8-disable-ld-library-path.patch #564350
+)
+
+src_prepare() {
+ if ! use utils; then
+ sed \
+ -e "s:shell_utils::g" \
+ -i contrib/Makefile.am || die
+ fi
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=()
+
+ append-flags -fno-strict-aliasing
+
+ # Ignore --with-init-style=gentoo, we install the init.d by hand and we avoid having
+ # to sed the Makefiles to not do rc-update.
+ # TODO:
+ # systemd : --with-init-style=systemd
+ myeconfargs+=(
+ $(use_enable debug)
+ $(use_enable debug debugging)
+ $(use_enable pgp pgp-uam)
+ $(use_enable kerberos)
+ $(use_enable kerberos krbV-uam)
+ $(use_enable quota)
+ $(use_enable tcpd tcp-wrappers)
+ $(use_enable zeroconf)
+ $(use_with acl acls)
+ $(use_with cracklib)
+ $(use_with dbus afpstats)
+ $(use_with ldap)
+ $(use_with pam)
+ $(use_with samba smbsharemodes)
+ $(use_with shadow)
+ $(use_with ssl ssl-dir)
+ $(use_with tracker)
+ $(use_with tracker dbus-daemon "${EPREFIX}/usr/bin/dbus-daemon")
+ $(use_with tracker tracker-pkgconfig-version $(get_version_component_range 1-2 $(best_version app-misc/tracker | sed 's:app-misc/tracker-::g')))
+ --enable-overwrite
+ --disable-krb4-uam
+ --disable-afs
+ --with-libevent-header=/usr/include
+ --with-libevent-lib=/usr/$(get_libdir)
+ --with-bdb=/usr
+ --with-uams-path=/usr/$(get_libdir)/${PN}
+ --disable-silent-rules
+ --with-init-style=gentoo-openrc
+ --without-libevent
+ --without-tdb
+ --with-lockfile=/run/lock/${PN}
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ if use zeroconf; then
+ sed -i -e '/avahi-daemon/s:use:need:g' "${D}"/etc/init.d/${PN} || die
+ else
+ sed -i -e '/avahi-daemon/d' "${D}"/etc/init.d/${PN} || die
+ fi
+
+ # The pamd file isn't what we need, use pamd_mimic_system
+ rm -rf "${ED}/etc/pam.d" || die
+ pamd_mimic_system netatalk auth account password session
+
+ sed \
+ -e "s|:SBINDIR:|${EPREFIX}/usr/sbin|g" \
+ -e "s|:PATH_NETATALK_LOCK:|/run/lock/netatalk|g" \
+ distrib/initscripts/service.systemd.tmpl \
+ > "${T}"/service.systemd || die
+ systemd_newunit "${T}"/service.systemd ${PN}.service
+
+ use utils && python_foreach_impl python_doscript contrib/shell_utils/afpstats
+}
+
+pkg_postinst() {
+ local fle v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 3 ${v}; then
+ for fle in afp_signature.conf afp_voluuid.conf; do
+ if [[ -f "${ROOT}"etc/netatalk/${fle} ]]; then
+ if [[ ! -f "${ROOT}"var/lib/netatalk/${fle} ]]; then
+ mv \
+ "${ROOT}"etc/netatalk/${fle} \
+ "${ROOT}"var/lib/netatalk/
+ fi
+ fi
+ done
+
+ echo ""
+ elog "Starting from version 3.0 only uses a single init script again"
+ elog "Please update your runlevels accordingly"
+ echo ""
+ elog "Dependencies should be resolved automatically depending on settings"
+ elog "but please report issues with this on https://bugs.gentoo.org/ if"
+ elog "you find any."
+ echo ""
+ elog "Following config files are obsolete now:"
+ elog "afpd.conf, netatalk.conf, AppleVolumes.default and afp_ldap.conf"
+ elog "in favour of"
+ elog "/etc/afp.conf"
+ echo ""
+ elog "Please convert your existing configs before you restart your daemon"
+ echo ""
+ elog "The new AppleDouble default backend is appledouble = ea"
+ elog "Existing entries will be updated on access, but can do an offline"
+ elog "conversion with"
+ elog "dbd -ruve /path/to/Volume"
+ echo ""
+ elog "For general notes on the upgrade, please visit"
+ elog "http://netatalk.sourceforge.net/3.0/htmldocs/upgrade.html"
+ echo ""
+ break
+ fi
+ done
+}
diff --git a/net-fs/netatalk/netatalk-3.1.11.ebuild b/net-fs/netatalk/netatalk-3.1.11.ebuild
new file mode 100644
index 000000000000..761f1c4f0041
--- /dev/null
+++ b/net-fs/netatalk/netatalk-3.1.11.ebuild
@@ -0,0 +1,181 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+AUTOTOOLS_AUTORECONF=yes
+
+inherit autotools-utils flag-o-matic multilib pam python-r1 systemd versionator
+
+DESCRIPTION="Open Source AFP server"
+HOMEPAGE="http://netatalk.sourceforge.net/"
+SRC_URI="mirror://sourceforge/project/${PN}/${PN}/$(get_version_component_range 1-3)/${P}.tar.bz2"
+
+LICENSE="GPL-2 BSD"
+SLOT="0/17.0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd"
+IUSE="acl cracklib dbus debug kerberos ldap pam pgp quota samba +shadow ssl static-libs tracker tcpd +utils zeroconf"
+
+CDEPEND="
+ !app-editors/yudit
+ dev-libs/libevent:0=
+ >=dev-libs/libgcrypt-1.2.3:0
+ sys-apps/coreutils
+ >=sys-libs/db-4.2.52:=
+ sys-libs/tdb
+ acl? (
+ sys-apps/attr
+ sys-apps/acl
+ )
+ cracklib? ( sys-libs/cracklib )
+ dbus? ( sys-apps/dbus dev-libs/dbus-glib )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )
+ pam? ( virtual/pam )
+ ssl? ( dev-libs/openssl:0 )
+ tcpd? ( sys-apps/tcp-wrappers )
+ tracker? ( app-misc/tracker )
+ utils? ( ${PYTHON_DEPS} )
+ zeroconf? ( net-dns/avahi[dbus] )
+"
+RDEPEND="${CDEPEND}
+ utils? (
+ dev-lang/perl
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ )"
+DEPEND="${CDEPEND}
+ virtual/yacc
+ sys-devel/flex"
+
+RESTRICT="test"
+
+REQUIRED_USE="
+ ldap? ( acl )
+ tracker? ( dbus )
+ utils? ( ${PYTHON_REQUIRED_USE} )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1.7-gentoo.patch
+ "${FILESDIR}"/${PN}-3.1.8-disable-ld-library-path.patch #564350
+)
+
+src_prepare() {
+ if ! use utils; then
+ sed \
+ -e "s:shell_utils::g" \
+ -i contrib/Makefile.am || die
+ fi
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=()
+
+ append-flags -fno-strict-aliasing
+
+ # Ignore --with-init-style=gentoo, we install the init.d by hand and we avoid having
+ # to sed the Makefiles to not do rc-update.
+ # TODO:
+ # systemd : --with-init-style=systemd
+ myeconfargs+=(
+ $(use_enable debug)
+ $(use_enable debug debugging)
+ $(use_enable pgp pgp-uam)
+ $(use_enable kerberos)
+ $(use_enable kerberos krbV-uam)
+ $(use_enable quota)
+ $(use_enable tcpd tcp-wrappers)
+ $(use_enable zeroconf)
+ $(use_with acl acls)
+ $(use_with cracklib)
+ $(use_with dbus afpstats)
+ $(use_with ldap)
+ $(use_with pam)
+ $(use_with samba smbsharemodes)
+ $(use_with shadow)
+ $(use_with ssl ssl-dir)
+ $(use_with tracker)
+ $(use_with tracker dbus-daemon "${EPREFIX}/usr/bin/dbus-daemon")
+ $(use_with tracker tracker-pkgconfig-version $(get_version_component_range 1-2 $(best_version app-misc/tracker | sed 's:app-misc/tracker-::g')))
+ --enable-overwrite
+ --disable-krb4-uam
+ --disable-afs
+ --with-libevent-header=/usr/include
+ --with-libevent-lib=/usr/$(get_libdir)
+ --with-bdb=/usr
+ --with-uams-path=/usr/$(get_libdir)/${PN}
+ --disable-silent-rules
+ --with-init-style=gentoo-openrc
+ --without-libevent
+ --without-tdb
+ --with-lockfile=/run/lock/${PN}
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ if use zeroconf; then
+ sed -i -e '/avahi-daemon/s:use:need:g' "${D}"/etc/init.d/${PN} || die
+ else
+ sed -i -e '/avahi-daemon/d' "${D}"/etc/init.d/${PN} || die
+ fi
+
+ # The pamd file isn't what we need, use pamd_mimic_system
+ rm -rf "${ED}/etc/pam.d" || die
+ pamd_mimic_system netatalk auth account password session
+
+ sed \
+ -e "s|:SBINDIR:|${EPREFIX}/usr/sbin|g" \
+ -e "s|:PATH_NETATALK_LOCK:|/run/lock/netatalk|g" \
+ distrib/initscripts/service.systemd.tmpl \
+ > "${T}"/service.systemd || die
+ systemd_newunit "${T}"/service.systemd ${PN}.service
+
+ use utils && python_foreach_impl python_doscript contrib/shell_utils/afpstats
+}
+
+pkg_postinst() {
+ local fle v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 3 ${v}; then
+ for fle in afp_signature.conf afp_voluuid.conf; do
+ if [[ -f "${ROOT}"etc/netatalk/${fle} ]]; then
+ if [[ ! -f "${ROOT}"var/lib/netatalk/${fle} ]]; then
+ mv \
+ "${ROOT}"etc/netatalk/${fle} \
+ "${ROOT}"var/lib/netatalk/
+ fi
+ fi
+ done
+
+ echo ""
+ elog "Starting from version 3.0 only uses a single init script again"
+ elog "Please update your runlevels accordingly"
+ echo ""
+ elog "Dependencies should be resolved automatically depending on settings"
+ elog "but please report issues with this on https://bugs.gentoo.org/ if"
+ elog "you find any."
+ echo ""
+ elog "Following config files are obsolete now:"
+ elog "afpd.conf, netatalk.conf, AppleVolumes.default and afp_ldap.conf"
+ elog "in favour of"
+ elog "/etc/afp.conf"
+ echo ""
+ elog "Please convert your existing configs before you restart your daemon"
+ echo ""
+ elog "The new AppleDouble default backend is appledouble = ea"
+ elog "Existing entries will be updated on access, but can do an offline"
+ elog "conversion with"
+ elog "dbd -ruve /path/to/Volume"
+ echo ""
+ elog "For general notes on the upgrade, please visit"
+ elog "http://netatalk.sourceforge.net/3.0/htmldocs/upgrade.html"
+ echo ""
+ break
+ fi
+ done
+}
diff --git a/net-fs/netatalk/netatalk-3.1.8.ebuild b/net-fs/netatalk/netatalk-3.1.8.ebuild
new file mode 100644
index 000000000000..30f0a1ece1d3
--- /dev/null
+++ b/net-fs/netatalk/netatalk-3.1.8.ebuild
@@ -0,0 +1,179 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+AUTOTOOLS_AUTORECONF=yes
+
+inherit autotools-utils flag-o-matic multilib pam python-r1 systemd versionator
+
+DESCRIPTION="Open Source AFP server"
+HOMEPAGE="http://netatalk.sourceforge.net/"
+SRC_URI="mirror://sourceforge/project/${PN}/${PN}/$(get_version_component_range 1-3)/${P}.tar.bz2"
+
+LICENSE="GPL-2 BSD"
+SLOT="0/17.0"
+KEYWORDS="amd64 arm ~ppc ~ppc64 x86 ~x86-fbsd"
+IUSE="acl cracklib dbus debug pgp kerberos ldap pam quota samba +shadow ssl static-libs tracker tcpd +utils zeroconf"
+
+CDEPEND="
+ !app-editors/yudit
+ dev-libs/libevent
+ >=dev-libs/libgcrypt-1.2.3:0
+ sys-apps/coreutils
+ >=sys-libs/db-4.2.52:=
+ sys-libs/tdb
+ acl? (
+ sys-apps/attr
+ sys-apps/acl
+ )
+ cracklib? ( sys-libs/cracklib )
+ dbus? ( sys-apps/dbus dev-libs/dbus-glib )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )
+ pam? ( virtual/pam )
+ ssl? ( dev-libs/openssl:0 )
+ tcpd? ( sys-apps/tcp-wrappers )
+ tracker? ( app-misc/tracker )
+ utils? ( ${PYTHON_DEPS} )
+ zeroconf? ( net-dns/avahi[dbus] )
+"
+RDEPEND="${CDEPEND}
+ utils? (
+ dev-lang/perl
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ )"
+DEPEND="${CDEPEND}
+ virtual/yacc
+ sys-devel/flex"
+
+RESTRICT="test"
+
+REQUIRED_USE="
+ ldap? ( acl )
+ utils? ( ${PYTHON_REQUIRED_USE} )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1.7-gentoo.patch
+ "${FILESDIR}"/${PN}-3.1.8-disable-ld-library-path.patch #564350
+)
+
+src_prepare() {
+ if ! use utils; then
+ sed \
+ -e "s:shell_utils::g" \
+ -i contrib/Makefile.am || die
+ fi
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=()
+
+ append-flags -fno-strict-aliasing
+
+ # Ignore --with-init-style=gentoo, we install the init.d by hand and we avoid having
+ # to sed the Makefiles to not do rc-update.
+ # TODO:
+ # systemd : --with-init-style=systemd
+ myeconfargs+=(
+ $(use_enable debug)
+ $(use_enable debug debugging)
+ $(use_enable pgp pgp-uam)
+ $(use_enable kerberos)
+ $(use_enable kerberos krbV-uam)
+ $(use_enable quota)
+ $(use_enable tcpd tcp-wrappers)
+ $(use_enable zeroconf)
+ $(use_with acl acls)
+ $(use_with cracklib)
+ $(use_with dbus afpstats)
+ $(use_with ldap)
+ $(use_with pam)
+ $(use_with samba smbsharemodes)
+ $(use_with shadow)
+ $(use_with ssl ssl-dir)
+ $(use_with tracker)
+ $(use_with tracker tracker-pkgconfig-version $(get_version_component_range 1-2 $(best_version app-misc/tracker | sed 's:app-misc/tracker-::g')))
+ --enable-overwrite
+ --disable-krb4-uam
+ --disable-afs
+ --with-libevent-header=/usr/include
+ --with-libevent-lib=/usr/$(get_libdir)
+ --with-bdb=/usr
+ --with-uams-path=/usr/$(get_libdir)/${PN}
+ --disable-silent-rules
+ --with-init-style=gentoo
+ --without-libevent
+ --without-tdb
+ --with-lockfile=/run/lock/${PN}
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ if use zeroconf; then
+ sed -i -e '/avahi-daemon/s:use:need:g' "${D}"/etc/init.d/${PN} || die
+ else
+ sed -i -e '/avahi-daemon/d' "${D}"/etc/init.d/${PN} || die
+ fi
+
+ # The pamd file isn't what we need, use pamd_mimic_system
+ rm -rf "${ED}/etc/pam.d" || die
+ pamd_mimic_system netatalk auth account password session
+
+ sed \
+ -e "s|:SBINDIR:|${EPREFIX}/usr/sbin|g" \
+ -e "s|:PATH_NETATALK_LOCK:|/run/lock/netatalk|g" \
+ distrib/initscripts/service.systemd.tmpl \
+ > "${T}"/service.systemd || die
+ systemd_newunit "${T}"/service.systemd ${PN}.service
+
+ use utils && python_foreach_impl python_doscript contrib/shell_utils/afpstats
+}
+
+pkg_postinst() {
+ local fle v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 3 ${v}; then
+ for fle in afp_signature.conf afp_voluuid.conf; do
+ if [[ -f "${ROOT}"etc/netatalk/${fle} ]]; then
+ if [[ ! -f "${ROOT}"var/lib/netatalk/${fle} ]]; then
+ mv \
+ "${ROOT}"etc/netatalk/${fle} \
+ "${ROOT}"var/lib/netatalk/
+ fi
+ fi
+ done
+
+ echo ""
+ elog "Starting from version 3.0 only uses a single init script again"
+ elog "Please update your runlevels accordingly"
+ echo ""
+ elog "Dependencies should be resolved automatically depending on settings"
+ elog "but please report issues with this on https://bugs.gentoo.org/ if"
+ elog "you find any."
+ echo ""
+ elog "Following config files are obsolete now:"
+ elog "afpd.conf, netatalk.conf, AppleVolumes.default and afp_ldap.conf"
+ elog "in favour of"
+ elog "/etc/afp.conf"
+ echo ""
+ elog "Please convert your existing configs before you restart your daemon"
+ echo ""
+ elog "The new AppleDouble default backend is appledouble = ea"
+ elog "Existing entries will be updated on access, but can do an offline"
+ elog "conversion with"
+ elog "dbd -ruve /path/to/Volume"
+ echo ""
+ elog "For general notes on the upgrade, please visit"
+ elog "http://netatalk.sourceforge.net/3.0/htmldocs/upgrade.html"
+ echo ""
+ break
+ fi
+ done
+}
diff --git a/net-fs/nfs-utils/Manifest b/net-fs/nfs-utils/Manifest
new file mode 100644
index 000000000000..93e419a2095a
--- /dev/null
+++ b/net-fs/nfs-utils/Manifest
@@ -0,0 +1,35 @@
+AUX exports 66 SHA256 5d6356df546682e2f1a87131d1bb67de9b1f9a34d3a5742343dc64e890cf71d5 SHA512 fd8052dc8e17eccb0bb1443f341c97ec7c9dac5824294cadf486d91475bc728d4bb69300034b528a690707520590f6675ee371f92e9838afc8ed88092ee0f220 WHIRLPOOL 7cc6b59c1f7013a0ad98518623b03d1cba784ecaf6d6a085b85282192c6f41ac1c649a39dc6e1b42ff38a571c00a85aed6e04ea57d6339a072cc4f2c41d5d74e
+AUX nfs-utils-1.1.4-mtab-sym.patch 1020 SHA256 0232799d085151649a1eb1f31644105de7e5cfba888794354005499a0db277c3 SHA512 1cd916028a8515772f05ef63832d73a09e9720055aedc9e2e4ce3a08ce1820948700a4f00ca9c4ee684880f18e67aca888dd857fc7931d923021ba50964be998 WHIRLPOOL c16ecee3228ad4522cf4ede1d05ca50cece3910955314c96eb88a61cfe07b7f6a95c42bb15a7f7f9fd211fa62cdcbb02925e68702d5066338b4543baf56fb2df
+AUX nfs-utils-1.2.8-cross-build.patch 1323 SHA256 281ae4f2af4d28adc936be961c2ab4aa4f77c4fb74ba08f2cef1038c6e03b30e SHA512 42a41411d0de384b66a2875fa9ea15e4b854150b5f75ba2db54ad7785fd147ee329eb8867d24a26b2b1d9ef89bd887caeaf0b5a59cdda15f5a11c47888882b9a WHIRLPOOL 52f5704ec8b88eeb3fab37e4aa9a7ca64ca76f0665c66347ab663624cb3b70309a262d86b21882dc5f687741c73974dc6efbc01d6c386e3ea607bbdb89619edb
+AUX nfs-utils.conf 74 SHA256 a09f97a40b5c75a3fb65bd60feb4c4b7d2b569ced004464eef4e5136d850ddd6 SHA512 d72c0fbdf12cb1ddf8eaa5885e1ed93a2078c40ca48eb8868836fb72fa456c4865df15273fb7472f70dfe8098167e695b1340ff9a59b55e73b47690baaf977d6 WHIRLPOOL 295e80d0e6f51ad7b89ff40ecc06f56a4f41dec580da40f9fd5c6d7f1c61b39a3676bf2ab5bce230682193b2b23ed34154b9b0ac613eb3b6c24b3d36e35798ef
+AUX nfs.confd 930 SHA256 c652a4fe8a43dc68a818345db2b3acc560663b5b6c969324d4f23afb0fb96a94 SHA512 bc11b073735ee86c96b9c249ee187f4d16329c279a4e26760875059d2b5fa1d510ef3e4df5ee9dfb2a3133d755e1eb5c323d2fadc432a0cf630191ec353ac535 WHIRLPOOL 799a8faf894b912816737388bdf2dfffacf4de791e5c868437fc298604c6d27c58581b1e3df26648cba4e832cb0eee8d4042692065ed6b4c6fb66f6a1e207813
+AUX nfs.initd 4244 SHA256 247456e845e70badb44d9155b68e5f76d502361769e4332a9d1bd6345f85fbfa SHA512 f7feb79cfcab0478affb640d1e5ad059757c88d51cc790fd54cde2fd7ed2e3cfd8f7f4c2de993d99da03e8ce3bdfb2750a4cb997b850fe33d0ef76d9b91c9018 WHIRLPOOL ef4edea3cda5bc5867cf513bc14fd104ad4d4f58440aa5bf52a49f83f5e3a368acc0276323286607293bd79d2bd52a49794b429036bf41c06b0999d9a0e06322
+AUX nfsclient.confd 592 SHA256 e8842fca856eae598fb8fe15ed8d3cef13e61851217be66b8cc4087af8cee8ad SHA512 f12e67728ac4e76357685e2fe38bd7f6fcd90064165758ffeca145e6962ac44d4ff9d8d57e18cc6925a6ada8e95ad8321e9fc355931a804dd455aae1e4850e92 WHIRLPOOL 480fea7b62817721358366678ba58f79c957d4a9b7184ca13a093e9a97aef7223f3862887d185405cf73b4ea99fb409ff5c33aedcf7fc4f32df0078a9d85569b
+AUX nfsclient.initd 752 SHA256 56973f5c8196b4227114d94a1d3c8c95518be5a02c6b5dc97da243d0b6086843 SHA512 85078e2cd38b37a1e6fbaf0e40cf7690f403e71d9c8188d542d12fe56bfc02a49763c7bcc7742691754acc37928468c215db2795bebc29a5dfb052ba08f407bb WHIRLPOOL 1513fe28b612be33b8a4afa7e26994f32f08b559f1b90cb190a64e4649819defee2cdba7738409b6f65b7817e950193225b6818c08e7cfd134fc7faeb95bd376
+AUX nfsd.service-r1 294 SHA256 b98575ae9803d0e75159a32f8bed61f6666f8ae130bb93069de13e76943f2577 SHA512 256c78317e5af15cca7f10e247d086d1a0b04ca34d93e8afe4f940d841c93a95ddc119c80aba287d777fe87830dfc8b52f9b558a3663de0ee5e05aa64fbbadbb WHIRLPOOL 8f492d40a44658ab8bbee760c29f738c531ea361081cb18ab7ed85d28d3e9736c2d8e040fe91554a19e8f49e1d26d064d73370f2b6e3ad2cd0927597ab09618d
+AUX nfsmount.confd 326 SHA256 b9389e143c2c4f95c11f97a8a379e007f140559016f60011c9d2ff0935758bcb SHA512 6e23897885cc33c49d9c7353b456585a1e0c7300822edba81bc48ba4ccc18297adce137260cc0aa9487aa5ef0aab3eecf931532cfa5bd40fd03bc9e0ddacfb28 WHIRLPOOL 97939b074a9b5717184512088388c9c22a31f37009996b69137023a0f8a97ce6eb41f7cb0a25843ea088f00d37cb45f6b3bd1ba0f801de7cb8f6dc2e5d374dfb
+AUX nfsmount.initd 1014 SHA256 5ef6d28219c6c8388d1f23a393b75e5dc4cee1222aa8caba3d5741177af2f4c9 SHA512 89259b9f0878658d48792b5b2f42b43c966ed098dba1fecf9e07fb0de4aab37ad67655ea8dbcc2361ddab2b5013b2de35a03048a513aaeedf790e4b416a35a54 WHIRLPOOL 780c96ffefd536c20ee52bb7849a949e316b4a03fff341a3804de925be34f6ab01ccaff045d94b182caafd3d626d70017532ab7f26a9a3ce6291344816068d3d
+AUX nfsmount.initd-1.3.1 740 SHA256 ae7d08e337397077920e52c09b7dfa2421fe9c7fc88e8c197c130b49ec66e7c5 SHA512 a540443a0259360f2476277bc020bb08eb095debe9c8e6a620dba5da1c7850f399673cc1ab505df65aea095a7e67954a9b5b8b26bbfd94e55d62348791af643d WHIRLPOOL b2901cd9d75a702bd15d0770a2ed7c601e23d11fc87da8bc170328603655ee4b1f5da8e340234ea77e3d59623c82d18bfb1b14ac61ac6c19eb38f96fe4436013
+AUX proc-fs-nfsd.mount 123 SHA256 39ca215bd3ff124a5872d3535f7cfd403455469350a9495f0ac1f6fb169264c2 SHA512 cd129a6cb7286c175d1dde512bb7cf51c5e56648870cb0082ffeb4068636c78c58c8f3935ebf0c8f177943a4a69b4d02eef80851f88415ad0dffffadaee3dd1b WHIRLPOOL 273581c5e30f4495b12ed5fd35c1cdaaf38351d6a30a17ee45b79406d9c3185c835a2e15c5c1887f1c1bfd98c4669179c7492a9ae7961a2c30ee81bb8f8cb14d
+AUX rpc-gssd.service 289 SHA256 1a322ed002c4e3c1e9166f169b8a8467c51bab51897459982cfe73d19c7e7bc6 SHA512 84e8a043b62b6f371dfc19670bd95cf81aef624482072b06e5a1877be23466102775898605ceace0823feb53e0c066c156ab7d16f41fb23833f32d6e06739aa3 WHIRLPOOL 5f1307780deadf454229c1a5a337c4d99e8a4a121d90e37eeadc3981e4bee75a80db36f816f4934fe09f760f504ae1382d29997cbc033a3bab0a0045224b02d3
+AUX rpc-idmapd.service 269 SHA256 996c02401f0a5f2516650bd205e993987ca0781b6040a6fbcd6736d6eedf2b62 SHA512 973b0aa83c42f4f22a982680669a0d4109db498362c9c8cbf4da445c04c7be059cb89fe67f839892b53f44c0fd1b4e767f8d8a834ac3d3180c62c83267c5fab1 WHIRLPOOL 4ed69ec063368a0064fe999eb685c113c3aa63d6b6484dd3747722134018e8d774a6803d7617d7b670b938683b8f3de2b46480a5be75c10df86156daed307766
+AUX rpc-mountd.service-r1 192 SHA256 a322bcd80f9029066524fb707c67ed565d4443ed5e0bb3de026ea9d46805d5a8 SHA512 7229b044668a7a84696261e040004d09ea117786a06b6b8f620790c067254caa22dafb9ee9ad91bf11af7a8bbc1fe83e9b0e44c2756019b69773e1de30b4ad26 WHIRLPOOL fbb46a198359f163db758441561ab29bc6b4041dc3559b1f8f4e4cb6327ac01291c1d973be0f3b3e898110e1c3dbfceb7fbc02b2c5b8118913a90bd100d6c56b
+AUX rpc-statd.service-r2 237 SHA256 59e7009a15d28e73df0238ded9a2b6691c2b522a6dd516ea5eedf2342030db84 SHA512 b4a6a0b9a649ee5de64f3c727287aacbba71307edd63f79571e8e45a627c46f8a195f7429c35af03830b71279c7e03af5fabf8eb8264f7b30801d06ac825d329 WHIRLPOOL e95920d0d8c4d4b01d3801a3a99a8a11868442f376c046bd0c70b65aae28c073559f3931da06b631a0bc07a2a192b6fa934691a97f5c3a9647e16f58412be532
+AUX rpc-svcgssd.service 259 SHA256 ee585a6448c3f211e431431d547378531eea5137b8968ae1c663e79a490999dd SHA512 ff5cfcb9f5f616b8418535b6337410133c60824def55dcefea2622c64352c4a1c295933f291361917148402cba7f7b0fbf218d7a33b427ee7a174c938a73594e WHIRLPOOL b45aac6b7d0fd2a0be18c0e00df2a95d31d433327e0838da680a582623028376d44242875fa0bd563049c61cf183c962c373e005e6c47e291fabb36b1f61de81
+AUX rpc.gssd.initd 455 SHA256 83c318a7502718a3e1693869297b95db1c32270b37d45b26b2bc151ec06f3c08 SHA512 d9d7eeebbe153d3c4784112ed6d50734b5619b3315bb1454f8163de2b78ed8f958029a0e1088de58e9b1b8069184aeab2c8f19af4b957b6be25e4f138960aeac WHIRLPOOL 94e2ea6103ce06f245bd7e349f56789415c1289954f3f8b53335071240fb93ac3915f4b37e6d35536075c81b00088ca269aa6effb787af9fd55813919713930c
+AUX rpc.idmapd.initd 482 SHA256 dc21ce6ba28f45eb450d5d0dbe7e5ea706b1547c8bece4ddb6836a5433427bd6 SHA512 f3e88038cb040ffcbca76166f4322d37e39da00d144bc0a17aed4467ab10c6e626fcde6c407d0911d135bfab55622ad2e38ed93788b11459c5882ce60577fb45 WHIRLPOOL 864abfa5d2fc88112f9670673f8c7974c2a163a518f516b356ec12409be9b59f9c4307c1dbcf8fb21c2063d2708a89404186c325d7e60bf4adeb4edb96201b13
+AUX rpc.pipefs.initd 760 SHA256 04102bff9b13d2e7c4e30603e7c98fe412d5f6c907a37dcea95f420f153c29ae SHA512 3d3fa6e7ae01e27d27d88aba1e307c5293dd1cbc9d555737e03c4f1e17988518f4f1e7f7a38a7337f8e8961e8378cc4611769b04db7368460589a3b218ac6d6b WHIRLPOOL d1398888182a15edb9df6e0cee807de4be6cf576af7383a36abfa1de806efc0d4ecefc901fa245d87aec44935ece967dea975b99d7228ac1a83c69bc84fe6157
+AUX rpc.statd.initd 706 SHA256 6f3d93442db0c17436547a16155e0d61dd5cd17f49fd3a642a9a5de833411d51 SHA512 7f6baea852fff91b88e15e432ba19f9da0a3e3510b6f550b553912cf3887ce176280367b62bcce2a044730a075e4c1f6d7df1a669556d42725dea6e6e8e967ac WHIRLPOOL c8902c26109a70f5393121a97b8f6f9212fb3113aa0359da08fd650e9683e6155da170f8a05fd2d0410fb67aa2a817f5618630572a540396f16a08151293fe48
+AUX rpc.svcgssd.initd 470 SHA256 272905335a7c82034c6bac007bd4477aae21d8ce49e82355c48301db771ba77e SHA512 819cce4ae0a0f26bc74ce546e149b98420584240a594c9bb4a0a49413750320bde050866f3753c499425ea8d8df094211fb1f7e020ce281791e1933e1bc6a47f WHIRLPOOL 00ec16b95b288d98ea30ed135f5b518fec16c41413e7369d8ec497e3ebc7367ed76434d24ff0f8bcb27103d8880c4dd0b0fbc9306ba2ecc77136260683580f5d
+AUX var-lib-nfs-rpc_pipefs.mount 111 SHA256 59e05e4e6d6af92d5fafaf2d6b8e87670bcda4de5c9fb748d1be40a21f594500 SHA512 f4502bf53fd3014987e53ffc5d4b9b8678103052289dfe9f9304bb7eab66b6b59d80e3a29c19e3bc794657c2e3dbb25e275f78e09bc25808ed9849cc4a748034 WHIRLPOOL c684e43627f4e9ec4c97f0db28ce28682fc5f17627573c0902bb17946b0012969e070bd9030e0c20b9bd10e140e2901a9c2246a7e70700cf7541d90aa7293c76
+DIST nfs-utils-1.3.4.tar.bz2 814545 SHA256 c529c82a82320daae811f3d3a143f83d2714d7e7a43beadd42fcd6022c17d590 SHA512 765c0bc55a9a0bdb2c25d8fb7189a9054fb9f2dd51726eda29f44e5d5c423e245b02307dfcfab9239276d8f44869a72732416f6e9ef5a1f80753d9243ba1b38c WHIRLPOOL 6dc556ef7d00a583c222eb62a600b0d83c6f91ad65d89ca14e1fb3c8aaacf4fbae492e6f0ca3fb0821e2b666f0806ad5fddec041a1124b86b9941540cdfb08b4
+DIST nfs-utils-2.1.1.tar.bz2 820083 SHA256 0a28416948516c26f3bfe90425b0de09b79364dc1f508bf1dda8de66e1edbb09 SHA512 ed358280b7e124154632040bf747f6e4c3c6e4156bf90e82ff6915b1488f1c0dd65251a3a0f9b7ca96b9664d64e24b379828da9b524e64a3c769a44f4c930448 WHIRLPOOL bb28ae312b64c3493a1393a5b41eda457367594a71e230379ec04ffea3eb29d60ab8254e4981b0aa9cbe778dc1fbe9b08dc8615184a35cdb22bf4e5e04e56a6c
+DIST nfs-utils-2.1.2_rc3.tar.gz 475356 SHA256 5b379316a2cc49b07f72042b72eadee0bfe7c88e65d7b5baa4798e6cefca5a82 SHA512 2f948994f275b405678240deecc879900cc0e72476adaf552db059364f08f0929722013d751e0bc7913c30eb3f8183d1fc7693709c063fc92e20b71edd24ccef WHIRLPOOL 6a16a9cc3d22d883b6a8aa2d2f01dce81f9a1df03154a80e4aa43ae9bb878a15f0ca37951702f780341283da94d885b7be3656a950285ef79619e09dc465727f
+DIST nfs-utils-2.1.2_rc5.tar.gz 476401 SHA256 52b32896572e0f81dffd5ccd90c367e5d00b5d371b8deef45dc744ee1b7ad2ab SHA512 28670ca993c1bf953632086ab15cec1b6a525fb1b28243e382f246362cfb2629c9d0416f4f65c6a2f2c46202a4c6855d1924a7f8c984395ddb98b6d4f4b0cbcb WHIRLPOOL f2e2f75c0a989402f75740164870e250a12f29f4b3f0eb7102cecf57aea0d647a0a7860798f9333e8bef9efc4af72f516c885c62cd079e89470d108cdaca4b9d
+EBUILD nfs-utils-1.3.4-r1.ebuild 5143 SHA256 14af2bab1372632aa119f64072b31163225a55f5332f1be698a7a2e3cb3fe268 SHA512 0d3c81edc4533db8e37527ba9f56f6456353dc3c926a5d5887e2a5f51ffc428c78fed780758317a991a2803d4031b37b7c715776b3babdb9101384141632ec83 WHIRLPOOL 9e596e0df33eb2ec38a8efa9d0ab1116097a32c35af81116839f1951ce71aaf297f930a637f44798661047a5696238dcea0b6bd02bce9ee958e0224f08d0304e
+EBUILD nfs-utils-2.1.1-r1.ebuild 5064 SHA256 e54c82752ed4b46354eb6e54d70dafa2c6302ec10c0b085359950b094b1d5a90 SHA512 213f9a4905ee77a3e02ee5894cfc2aa8bbedcc81014f0d85eabb54c4994e3e7bb7ab70fe7c501796add31deb8abfc8aaffaf077c0d177067145c9de3802e491c WHIRLPOOL 7c21a5f2b23883ad8614c31cdfebe54e833e1ec199ddc5abcd0fcf9d16bb06e193a2924eced829b39fbc4d5ecdd4cbeaf514d77a2d37bfcf0563290f77ce6ff0
+EBUILD nfs-utils-2.1.2_rc3.ebuild 5289 SHA256 5b4b33d8fd56a614466848030c3e6872a28eafa6b2874c81cdd915ce3fb7d4ff SHA512 81bc8b7e20eb65f451f2c0b4dd5034a603b71cefd0e6dd4bf3c4c96f3e1cba58d32f00c87e61ceb3aa545f0dcca2d74b85448b1d453ec578fb4a38c19b04ad5e WHIRLPOOL 7fc9aa7589ab8843145253bb0e289ca2e2b8a42fb215881f84891fa24aeac49c5ef7e4b95b0c5a98e730dd6dfe122346bc0025b5add1a680a11df0990640717c
+EBUILD nfs-utils-2.1.2_rc5.ebuild 5340 SHA256 98f810df2cd6e69debf60e98ac90ebfc7be36b6c672adc33a02d99c008b9d88b SHA512 7626cec28aeeb377acb2f402fa870a94daea38854ceafeb25dbdf93f36ca5fbdd1439f0e92e51a3f865f50756b5af5051c8caeadf617f3b4fb39dbe4b81e750d WHIRLPOOL e763b6302d3c226c6f7150f3a3473f11f8362ffcbef7f252163144c193f8bd9ffd60245e331fbe3466336f1e1d06e5198249e3b8ef8a7dfbcda220271bdc246d
+MISC ChangeLog 4793 SHA256 332289ca95671a4b5cdef50e7feb9a7ca6dd3932fb5d7dd15edf7cb5a28ef284 SHA512 fba2097f9cbfa7b0d354247415ed85db7ea13b6094da9c43a0b8fdc0c2ee62f4ff17d9d32661ad8e74623ccb2180a00270a3add38b5dd1096358db1236ef999e WHIRLPOOL 0d3b058b419df04477283b53224c71bdea2067af9aee05e10ee9738766e296f8cf9e217381b7599edb8606316c147994dd0ebe3a0d59480766c8c84e04218833
+MISC ChangeLog-2015 46341 SHA256 d909ce1f5fbc93ca1a57f34f3d3567e34bf331462f827b19bf33296a963ab0da SHA512 4140a6ce807d598b6bd3c2e24f3ec4c14f122089f72bfdde7b0985e92013fe0ffaf6c1bf84cf9d532e4784e3d4566541f36c0feae4ec1864365cc137fc07b009 WHIRLPOOL 405b59e201f22161623fab182db72287d7a4a5715ef439e37c9df32330c0446d1ee6d66c04b266284a54d3c3307c86961a890ce66638ca93d3735b5ff0a8ecd6
+MISC metadata.xml 815 SHA256 8ef118718c7d92dbb008dd3cd8bb89e40584967b9c930849ffab396829a43069 SHA512 18aa7723310d1c01653fa49266742b3c00413761af48586977a8979bd34088bd39f281f36d5784c980ada53b981e3654f67363be35d8c1872075d0c5e189da14 WHIRLPOOL 13844feb1774af2e735249a00e1a6bc0db2a08b434740e52b442c181929da4cd0372056606cd7c75d96dd336b73eead6a06d9bd79047a392433e2217bd419fbe
diff --git a/net-fs/nfs-utils/files/exports b/net-fs/nfs-utils/files/exports
new file mode 100644
index 000000000000..5102ef27c150
--- /dev/null
+++ b/net-fs/nfs-utils/files/exports
@@ -0,0 +1 @@
+# /etc/exports: NFS file systems being exported. See exports(5).
diff --git a/net-fs/nfs-utils/files/nfs-utils-1.1.4-mtab-sym.patch b/net-fs/nfs-utils/files/nfs-utils-1.1.4-mtab-sym.patch
new file mode 100644
index 000000000000..c9e60afc74d2
--- /dev/null
+++ b/net-fs/nfs-utils/files/nfs-utils-1.1.4-mtab-sym.patch
@@ -0,0 +1,39 @@
+ripped from Debian
+
+--- nfs-utils-1.1.4/utils/mount/fstab.c
++++ nfs-utils-1.1.4/utils/mount/fstab.c
+@@ -57,7 +57,7 @@ mtab_does_not_exist(void) {
+ return var_mtab_does_not_exist;
+ }
+
+-static int
++int
+ mtab_is_a_symlink(void) {
+ get_mtab_info();
+ return var_mtab_is_a_symlink;
+--- nfs-utils-1.1.4/utils/mount/fstab.h
++++ nfs-utils-1.1.4/utils/mount/fstab.h
+@@ -7,6 +7,7 @@
+ #define _PATH_FSTAB "/etc/fstab"
+ #endif
+
++int mtab_is_a_symlink(void);
+ int mtab_is_writable(void);
+ int mtab_does_not_exist(void);
+ void reset_mtab_info(void);
+--- nfs-utils-1.1.4/utils/mount/mount.c
++++ nfs-utils-1.1.4/utils/mount/mount.c
+@@ -230,6 +230,13 @@ create_mtab (void) {
+ int flags;
+ mntFILE *mfp;
+
++ /* Avoid writing if the mtab is a symlink to /proc/mounts, since
++ that would create a file /proc/mounts in case the proc filesystem
++ is not mounted, and the fchmod below would also fail. */
++ if (mtab_is_a_symlink()) {
++ return EX_SUCCESS;
++ }
++
+ lock_mtab();
+
+ mfp = nfs_setmntent (MOUNTED, "a+");
diff --git a/net-fs/nfs-utils/files/nfs-utils-1.2.8-cross-build.patch b/net-fs/nfs-utils/files/nfs-utils-1.2.8-cross-build.patch
new file mode 100644
index 000000000000..7317115a0e18
--- /dev/null
+++ b/net-fs/nfs-utils/files/nfs-utils-1.2.8-cross-build.patch
@@ -0,0 +1,48 @@
+this is kind of hacky, but automake doesn't make this easy
+for us atm, so hack away :(
+
+(recent autotools will always add $(CFLAGS)/etc... to the compile)
+
+--- a/tools/locktest/Makefile.am
++++ b/tools/locktest/Makefile.am
+@@ -1,12 +1,11 @@
+ ## Process this file with automake to produce Makefile.in
+
+ CC=$(CC_FOR_BUILD)
+-LIBTOOL = @LIBTOOL@ --tag=CC
++CFLAGS=$(CFLAGS_FOR_BUILD)
++CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
++LDFLAGS=$(LDFLAGS_FOR_BUILD)
+
+ noinst_PROGRAMS = testlk
+ testlk_SOURCES = testlk.c
+-testlk_CFLAGS=$(CFLAGS_FOR_BUILD)
+-testlk_CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
+-testlk_LDFLAGS=$(LDFLAGS_FOR_BUILD)
+
+ MAINTAINERCLEANFILES = Makefile.in
+--- a/tools/rpcgen/Makefile.am
++++ b/tools/rpcgen/Makefile.am
+@@ -1,7 +1,9 @@
+ ## Process this file with automake to produce Makefile.in
+
+ CC=$(CC_FOR_BUILD)
+-LIBTOOL = @LIBTOOL@ --tag=CC
++CFLAGS=$(CFLAGS_FOR_BUILD)
++CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
++LDFLAGS=$(LDFLAGS_FOR_BUILD)
+
+ noinst_PROGRAMS = rpcgen
+ rpcgen_SOURCES = rpc_clntout.c rpc_cout.c rpc_hout.c rpc_main.c \
+@@ -9,10 +11,6 @@
+ rpc_util.c rpc_sample.c rpc_output.h rpc_parse.h \
+ rpc_scan.h rpc_util.h
+
+-rpcgen_CFLAGS=$(CFLAGS_FOR_BUILD)
+-rpcgen_CPPLAGS=$(CPPFLAGS_FOR_BUILD)
+-rpcgen_LDFLAGS=$(LDFLAGS_FOR_BUILD)
+-rpcgen_LDADD=$(LIBTIRPC)
+
+ MAINTAINERCLEANFILES = Makefile.in
+
+ EXTRA_DIST = rpcgen.new.1
diff --git a/net-fs/nfs-utils/files/nfs-utils.conf b/net-fs/nfs-utils/files/nfs-utils.conf
new file mode 100644
index 000000000000..b9b586c2ac07
--- /dev/null
+++ b/net-fs/nfs-utils/files/nfs-utils.conf
@@ -0,0 +1,3 @@
+d /var/lib/nfs/rpc_pipefs
+d /var/lib/nfs/v4recovery
+d /var/lib/nfs/v4root
diff --git a/net-fs/nfs-utils/files/nfs.confd b/net-fs/nfs-utils/files/nfs.confd
new file mode 100644
index 000000000000..9dc14058c1fe
--- /dev/null
+++ b/net-fs/nfs-utils/files/nfs.confd
@@ -0,0 +1,38 @@
+# /etc/conf.d/nfs
+
+# If you wish to set the port numbers for lockd,
+# please see /etc/sysctl.conf
+
+# Optional services to include in default `/etc/init.d/nfs start`
+# For NFSv4 users, you'll want to add "rpc.idmapd" here.
+NFS_NEEDED_SERVICES=""
+
+# Options to pass to rpc.nfsd
+OPTS_RPC_NFSD="8"
+
+# Options to pass to rpc.mountd
+# ex. OPTS_RPC_MOUNTD="-p 32767"
+OPTS_RPC_MOUNTD=""
+
+# Options to pass to rpc.statd
+# ex. OPTS_RPC_STATD="-p 32765 -o 32766"
+OPTS_RPC_STATD=""
+
+# Options to pass to rpc.idmapd
+OPTS_RPC_IDMAPD=""
+
+# Options to pass to rpc.gssd
+OPTS_RPC_GSSD=""
+
+# Options to pass to rpc.svcgssd
+OPTS_RPC_SVCGSSD=""
+
+# Options to pass to rpc.rquotad (requires sys-fs/quota)
+OPTS_RPC_RQUOTAD=""
+
+# Timeout (in seconds) for exportfs
+EXPORTFS_TIMEOUT=30
+
+# Options to set in the nfsd filesystem (/proc/fs/nfsd/).
+# Format is <option>=<value>. Multiple options are allowed.
+#OPTS_NFSD="nfsv4leasetime=30 max_block_size=4096"
diff --git a/net-fs/nfs-utils/files/nfs.initd b/net-fs/nfs-utils/files/nfs.initd
new file mode 100644
index 000000000000..4b572fc2e5ed
--- /dev/null
+++ b/net-fs/nfs-utils/files/nfs.initd
@@ -0,0 +1,162 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="reload"
+
+# This variable is used for controlling whether or not to run exportfs -ua;
+# see stop() for more information
+restarting=no
+
+# The binary locations
+exportfs=/usr/sbin/exportfs
+ mountd=/usr/sbin/rpc.mountd
+ nfsd=/usr/sbin/rpc.nfsd
+smnotify=/usr/sbin/sm-notify
+
+depend() {
+ local myneed=""
+ # XXX: no way to detect NFSv4 is desired and so need rpc.idmapd
+ myneed="${myneed} $(
+ awk '!/^[[:space:]]*#/ {
+ # clear the path to avoid spurious matches
+ $1 = "";
+ if ($0 ~ /[(][^)]*sec=(krb|spkm)[^)]*[)]/) {
+ print "rpc.svcgssd"
+ exit 0
+ }
+ }' /etc/exports /etc/exports.d/*.exports 2>/dev/null
+ )"
+ config /etc/exports /etc/exports.d/*.exports
+ need portmap rpc.statd ${myneed} ${NFS_NEEDED_SERVICES}
+ use ypbind net dns rpc.rquotad rpc.idmapd rpc.svcgssd
+ after quota
+}
+
+mkdir_nfsdirs() {
+ local d
+ for d in v4recovery v4root ; do
+ d="/var/lib/nfs/${d}"
+ [ ! -d "${d}" ] && mkdir -p "${d}"
+ done
+}
+
+waitfor_exportfs() {
+ local pid=$1
+ ( sleep ${EXPORTFS_TIMEOUT:-30}; kill -9 ${pid} 2>/dev/null ) &
+ wait $1
+}
+
+mount_nfsd() {
+ if [ -e /proc/modules ] ; then
+ # Make sure nfs support is loaded in the kernel #64709
+ if ! grep -qs nfsd /proc/filesystems ; then
+ modprobe -q nfsd
+ fi
+ # Restart idmapd if needed #220747
+ if grep -qs nfsd /proc/modules ; then
+ killall -q -HUP rpc.idmapd
+ fi
+ fi
+
+ # This is the new "kernel 2.6 way" to handle the exports file
+ if grep -qs nfsd /proc/filesystems ; then
+ if ! mountinfo -q /proc/fs/nfsd ; then
+ ebegin "Mounting nfsd filesystem in /proc"
+ mount -t nfsd -o nodev,noexec,nosuid nfsd /proc/fs/nfsd
+ eend $?
+ fi
+
+ local o
+ for o in ${OPTS_NFSD} ; do
+ echo "${o#*=}" > "/proc/fs/nfsd/${o%%=*}"
+ done
+ fi
+}
+
+start_it() {
+ ebegin "Starting NFS $1"
+ shift
+ "$@"
+ eend $?
+ ret=$((ret + $?))
+}
+start() {
+ mount_nfsd
+ mkdir_nfsdirs
+
+ # Exportfs likes to hang if networking isn't working.
+ # If that's the case, then try to kill it so the
+ # bootup process can continue.
+ if grep -qs '^[[:space:]]*/' /etc/exports /etc/exports.d/*.exports ; then
+ ebegin "Exporting NFS directories"
+ ${exportfs} -r &
+ waitfor_exportfs $!
+ eend $?
+ fi
+
+ local ret=0
+ start_it mountd ${mountd} ${OPTS_RPC_MOUNTD}
+ start_it daemon ${nfsd} ${OPTS_RPC_NFSD}
+ [ -x "${smnotify}" ] && start_it smnotify ${smnotify} ${OPTS_SMNOTIFY}
+ return ${ret}
+}
+
+stop() {
+ local ret=0
+
+ ebegin "Stopping NFS mountd"
+ start-stop-daemon --stop --exec ${mountd}
+ eend $?
+ ret=$((ret + $?))
+
+ # nfsd sets its process name to [nfsd] so don't look for $nfsd
+ ebegin "Stopping NFS daemon"
+ start-stop-daemon --stop --name nfsd --user root --signal 2
+ eend $?
+ ret=$((ret + $?))
+ # in case things don't work out ... #228127
+ rpc.nfsd 0
+
+ # When restarting the NFS server, running "exportfs -ua" probably
+ # isn't what the user wants. Running it causes all entries listed
+ # in xtab to be removed from the kernel export tables, and the
+ # xtab file is cleared. This effectively shuts down all NFS
+ # activity, leaving all clients holding stale NFS filehandles,
+ # *even* when the NFS server has restarted.
+ #
+ # That's what you would want if you were shutting down the NFS
+ # server for good, or for a long period of time, but not when the
+ # NFS server will be running again in short order. In this case,
+ # then "exportfs -r" will reread the xtab, and all the current
+ # clients will be able to resume NFS activity, *without* needing
+ # to umount/(re)mount the filesystem.
+ if [ "${restarting}" = no -o "${RC_CMD}" = "restart" ] ; then
+ ebegin "Unexporting NFS directories"
+ # Exportfs likes to hang if networking isn't working.
+ # If that's the case, then try to kill it so the
+ # shutdown process can continue.
+ ${exportfs} -ua &
+ waitfor_exportfs $!
+ eend $?
+ fi
+
+ return ${ret}
+}
+
+reload() {
+ # Exportfs likes to hang if networking isn't working.
+ # If that's the case, then try to kill it so the
+ # bootup process can continue.
+ ebegin "Reloading /etc/exports"
+ ${exportfs} -r 1>&2 &
+ waitfor_exportfs $!
+ eend $?
+}
+
+restart() {
+ # See long comment in stop() regarding "restarting" and exportfs -ua
+ restarting=yes
+ svc_stop
+ svc_start
+}
diff --git a/net-fs/nfs-utils/files/nfsclient.confd b/net-fs/nfs-utils/files/nfsclient.confd
new file mode 100644
index 000000000000..8a995571e1b8
--- /dev/null
+++ b/net-fs/nfs-utils/files/nfsclient.confd
@@ -0,0 +1,18 @@
+# You need to decide which nfs protocol version you want to use.
+# If you are unsure, leave these alone.
+#
+# If you are using only nfsv4, uncomment this line:
+#
+#rc_need="!rpc.statd"
+#
+# If you are using only nfsv3, uncomment this line:
+#
+#rc_need="!rpc.idmapd"
+#
+# You will need to set the dependencies in the nfsclient script to match
+# the network configuration tools you are using. This should be done in
+# this file by following the examples below, and not by changing the
+# service script itself. See /etc/conf.d/netmount for more examples.
+#
+# This is a safe default.
+rc_after="net"
diff --git a/net-fs/nfs-utils/files/nfsclient.initd b/net-fs/nfs-utils/files/nfsclient.initd
new file mode 100644
index 000000000000..6724e913d10f
--- /dev/null
+++ b/net-fs/nfs-utils/files/nfsclient.initd
@@ -0,0 +1,33 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs
+
+depend() {
+ local opts myneed=""
+ if [ -e /etc/fstab ] ; then
+ for opts in $(fstabinfo -o -t nfs,nfs4) ; do
+ case $opts in
+ *sec=krb*|*sec=spkm*) myneed="$myneed rpc.gssd" ;;
+ esac
+ done
+ fi
+ config /etc/fstab
+ need portmap rpc.statd rpc.idmapd ${myneed}
+ use ypbind dns
+}
+
+start() {
+ if [ -x /usr/sbin/sm-notify ] ; then
+ ebegin "Starting NFS sm-notify"
+ /usr/sbin/sm-notify ${OPTS_SMNOTIFY}
+ eend $?
+ fi
+
+ # Make sure nfs support is loaded in the kernel #64709
+ if [ -e /proc/modules ] && ! grep -qs 'nfs$' /proc/filesystems ; then
+ modprobe -q nfs
+ fi
+ return 0
+}
diff --git a/net-fs/nfs-utils/files/nfsd.service-r1 b/net-fs/nfs-utils/files/nfsd.service-r1
new file mode 100644
index 000000000000..e15cf98f9bec
--- /dev/null
+++ b/net-fs/nfs-utils/files/nfsd.service-r1
@@ -0,0 +1,15 @@
+[Unit]
+Description=NFS server
+After=rpcbind.service
+Requires=rpcbind.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/rpc.nfsd 8
+ExecStartPost=/usr/sbin/exportfs -a
+ExecStop=/usr/sbin/rpc.nfsd 0
+ExecStopPost=/usr/sbin/exportfs -a -u
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-fs/nfs-utils/files/nfsmount.confd b/net-fs/nfs-utils/files/nfsmount.confd
new file mode 100644
index 000000000000..418353668f97
--- /dev/null
+++ b/net-fs/nfs-utils/files/nfsmount.confd
@@ -0,0 +1,7 @@
+# You will need to set the dependencies in the nfsmount script to match
+# the network configuration tools you are using. This should be done in
+# this file by following the examples below, and not by changing the
+# service script itself. See /etc/conf.d/netmount for more examples.
+#
+# This is a safe default.
+rc_after="net"
diff --git a/net-fs/nfs-utils/files/nfsmount.initd b/net-fs/nfs-utils/files/nfsmount.initd
new file mode 100644
index 000000000000..12c7d786a0ff
--- /dev/null
+++ b/net-fs/nfs-utils/files/nfsmount.initd
@@ -0,0 +1,47 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs
+
+depend() {
+ local myneed=""
+ if [ -e /etc/fstab ] ; then
+ myneed="${myneed} $(
+ awk '!/^[[:space:]]*#/ && ($3 == "nfs" || $3 == "nfs4") {
+ if ($3 == "nfs4")
+ idmapd = "rpc.idmapd"
+ if ($4 ~ /sec=(krb|spkm)/)
+ gssd = "rpc.gssd"
+ }
+ END { print idmapd " " gssd }
+ ' /etc/fstab
+ )"
+ fi
+ config /etc/fstab
+ need portmap rpc.statd ${myneed}
+ use ypbind dns rpc.idmapd rpc.gssd
+}
+
+start() {
+ if [ -x /usr/sbin/sm-notify ] ; then
+ ebegin "Starting NFS sm-notify"
+ /usr/sbin/sm-notify ${OPTS_SMNOTIFY}
+ eend $?
+ fi
+
+ # Make sure nfs support is loaded in the kernel #64709
+ if [ -e /proc/modules ] && ! grep -qs 'nfs$' /proc/filesystems ; then
+ modprobe -q nfs
+ fi
+
+ ebegin "Mounting NFS filesystems"
+ mount -a -t nfs,nfs4
+ eend $?
+}
+
+stop() {
+ ebegin "Unmounting NFS filesystems"
+ umount -a -t nfs,nfs4
+ eend $?
+}
diff --git a/net-fs/nfs-utils/files/nfsmount.initd-1.3.1 b/net-fs/nfs-utils/files/nfsmount.initd-1.3.1
new file mode 100644
index 000000000000..68007ca11939
--- /dev/null
+++ b/net-fs/nfs-utils/files/nfsmount.initd-1.3.1
@@ -0,0 +1,26 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# This is mostly as a fix for bug #537996, to avoid breaking existing users
+# with nfsmount in their runlevels.
+# If neither nfsclient nor netmount are in your runlevels, and you manually
+# start netmount before nfsclient, then this will break. A real solution is
+# forthcoming, but requires feature development, see bug #406021 for soft
+# dependencies
+depend() {
+ need nfsclient netmount
+}
+
+msg() {
+ ewarn "nfsmount is deprecated, please migrate as described in the news item: 2015-02-02-nfs-service-changes"
+ ewarn "This migration script will be removed after 01 Aug 2015."
+}
+
+start() {
+ msg
+}
+
+stop() {
+ msg
+}
diff --git a/net-fs/nfs-utils/files/proc-fs-nfsd.mount b/net-fs/nfs-utils/files/proc-fs-nfsd.mount
new file mode 100644
index 000000000000..26b58b9682d9
--- /dev/null
+++ b/net-fs/nfs-utils/files/proc-fs-nfsd.mount
@@ -0,0 +1,8 @@
+[Unit]
+Description=NFS Configuration File System
+DefaultDependencies=no
+
+[Mount]
+What=sunrpc
+Where=/proc/fs/nfsd
+Type=nfsd
diff --git a/net-fs/nfs-utils/files/rpc-gssd.service b/net-fs/nfs-utils/files/rpc-gssd.service
new file mode 100644
index 000000000000..4c96deef4408
--- /dev/null
+++ b/net-fs/nfs-utils/files/rpc-gssd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=RPC GSS-API Client Daemon
+Documentation=man:rpc.gssd(8)
+After=rpcbind.service var-lib-nfs-rpc_pipefs.mount
+Requires=rpcbind.service var-lib-nfs-rpc_pipefs.mount
+Before=remote-fs-pre.target
+
+[Service]
+ExecStart=/usr/sbin/rpc.gssd -f
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-fs/nfs-utils/files/rpc-idmapd.service b/net-fs/nfs-utils/files/rpc-idmapd.service
new file mode 100644
index 000000000000..4a63b91ca73a
--- /dev/null
+++ b/net-fs/nfs-utils/files/rpc-idmapd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=NFS v4 ID-Name Mapping Daemon
+Documentation=man:rpc.idmapd(8) man:idmapd.conf(5)
+After=var-lib-nfs-rpc_pipefs.mount nfsd.service
+Requires=var-lib-nfs-rpc_pipefs.mount
+
+[Service]
+ExecStart=/usr/sbin/rpc.idmapd -f
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-fs/nfs-utils/files/rpc-mountd.service-r1 b/net-fs/nfs-utils/files/rpc-mountd.service-r1
new file mode 100644
index 000000000000..d5f5b24af399
--- /dev/null
+++ b/net-fs/nfs-utils/files/rpc-mountd.service-r1
@@ -0,0 +1,10 @@
+[Unit]
+Description=NFS Mount Daemon
+After=rpcbind.service nfsd.service
+Requires=rpcbind.service nfsd.service
+
+[Service]
+ExecStart=/usr/sbin/rpc.mountd -F
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-fs/nfs-utils/files/rpc-statd.service-r2 b/net-fs/nfs-utils/files/rpc-statd.service-r2
new file mode 100644
index 000000000000..3633ebded5d8
--- /dev/null
+++ b/net-fs/nfs-utils/files/rpc-statd.service-r2
@@ -0,0 +1,12 @@
+[Unit]
+Description=NFSv2/3 Network Status Monitor Daemon
+After=rpcbind.service
+Requires=rpcbind.service
+Before=remote-fs-pre.target
+Wants=remote-fs-pre.target
+
+[Service]
+ExecStart=/sbin/rpc.statd -F
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-fs/nfs-utils/files/rpc-svcgssd.service b/net-fs/nfs-utils/files/rpc-svcgssd.service
new file mode 100644
index 000000000000..121c61a49b30
--- /dev/null
+++ b/net-fs/nfs-utils/files/rpc-svcgssd.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=RPC GSS-API Server Daemon
+Documentation=man:rpc.svcgssd(8)
+After=rpcbind.service
+Requires=rpcbind.service
+Before=nfs-server.target
+PartOf=nfs-server.target
+
+[Service]
+ExecStart=/usr/sbin/rpc.svcgssd -f
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-fs/nfs-utils/files/rpc.gssd.initd b/net-fs/nfs-utils/files/rpc.gssd.initd
new file mode 100644
index 000000000000..445d44c44473
--- /dev/null
+++ b/net-fs/nfs-utils/files/rpc.gssd.initd
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs
+
+depend() {
+ use ypbind net
+ need portmap rpc.pipefs
+ after quota
+}
+
+start() {
+ ebegin "Starting gssd"
+ start-stop-daemon --start --exec /usr/sbin/rpc.gssd -- ${OPTS_RPC_GSSD}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping gssd"
+ start-stop-daemon --stop --exec /usr/sbin/rpc.gssd
+ eend $?
+}
diff --git a/net-fs/nfs-utils/files/rpc.idmapd.initd b/net-fs/nfs-utils/files/rpc.idmapd.initd
new file mode 100644
index 000000000000..61cfd4de2e73
--- /dev/null
+++ b/net-fs/nfs-utils/files/rpc.idmapd.initd
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs
+
+rpc_bin=/usr/sbin/rpc.idmapd
+
+depend() {
+ use ypbind net
+ need portmap rpc.pipefs
+ after quota
+}
+
+start() {
+ ebegin "Starting idmapd"
+ ${rpc_bin} ${OPTS_RPC_IDMAPD}
+ eend $? "make sure DNOTIFY support is enabled ..."
+}
+
+stop() {
+ ebegin "Stopping idmapd"
+ start-stop-daemon --stop --exec ${rpc_bin}
+ eend $?
+}
diff --git a/net-fs/nfs-utils/files/rpc.pipefs.initd b/net-fs/nfs-utils/files/rpc.pipefs.initd
new file mode 100644
index 000000000000..f971a49b393e
--- /dev/null
+++ b/net-fs/nfs-utils/files/rpc.pipefs.initd
@@ -0,0 +1,32 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+MNT="/var/lib/nfs/rpc_pipefs"
+
+mount_pipefs() {
+ local fstype=rpc_pipefs
+
+ # if things are already mounted, nothing to do
+ mountinfo -q ${MNT} && return 0
+
+ # if rpc_pipefs is not available, try to load sunrpc for it #219566
+ grep -qs ${fstype} /proc/filesystems || modprobe -q sunrpc
+ # if still not available, the `mount` will issue an error for the user
+
+ # now just do it for kicks
+ mkdir -p ${MNT}
+ mount -t ${fstype} ${fstype} ${MNT}
+}
+
+start() {
+ ebegin "Setting up RPC pipefs"
+ mount_pipefs
+ eend $? "make sure you have NFS/SUNRPC enabled in your kernel"
+}
+
+stop() {
+ ebegin "Unmounting RPC pipefs"
+ umount ${MNT}
+ eend $?
+}
diff --git a/net-fs/nfs-utils/files/rpc.statd.initd b/net-fs/nfs-utils/files/rpc.statd.initd
new file mode 100644
index 000000000000..ea78b9aef61a
--- /dev/null
+++ b/net-fs/nfs-utils/files/rpc.statd.initd
@@ -0,0 +1,32 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs
+
+rpc_bin=/sbin/rpc.statd
+rpc_pid=/var/run/rpc.statd.pid
+
+depend() {
+ use ypbind net
+ need portmap
+ after quota
+}
+
+start() {
+ # Don't start rpc.statd if already started by someone else ...
+ # Don't try and kill it if it's already dead ...
+ if killall -q -0 ${rpc_bin} ; then
+ return 0
+ fi
+
+ ebegin "Starting NFS statd"
+ start-stop-daemon --start --exec ${rpc_bin} -- --no-notify ${OPTS_RPC_STATD}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping NFS statd"
+ start-stop-daemon --stop --exec ${rpc_bin} --pidfile /var/run/rpc.statd.pid
+ eend $?
+}
diff --git a/net-fs/nfs-utils/files/rpc.svcgssd.initd b/net-fs/nfs-utils/files/rpc.svcgssd.initd
new file mode 100644
index 000000000000..c714e36076f4
--- /dev/null
+++ b/net-fs/nfs-utils/files/rpc.svcgssd.initd
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs
+
+depend() {
+ use ypbind net
+ need portmap rpc.pipefs
+ after quota
+}
+
+start() {
+ ebegin "Starting svcgssd"
+ start-stop-daemon --start --exec /usr/sbin/rpc.svcgssd -- ${OPTS_RPC_SVCGSSD}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping svcgssd"
+ start-stop-daemon --stop --exec /usr/sbin/rpc.svcgssd
+ eend $?
+}
diff --git a/net-fs/nfs-utils/files/var-lib-nfs-rpc_pipefs.mount b/net-fs/nfs-utils/files/var-lib-nfs-rpc_pipefs.mount
new file mode 100644
index 000000000000..c4166582225d
--- /dev/null
+++ b/net-fs/nfs-utils/files/var-lib-nfs-rpc_pipefs.mount
@@ -0,0 +1,7 @@
+[Unit]
+Description=RPC Pipe File System
+
+[Mount]
+What=rpc_pipefs
+Where=/var/lib/nfs/rpc_pipefs
+Type=rpc_pipefs
diff --git a/net-fs/nfs-utils/metadata.xml b/net-fs/nfs-utils/metadata.xml
new file mode 100644
index 000000000000..2ec31888ca1f
--- /dev/null
+++ b/net-fs/nfs-utils/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <longdescription>NFS client and server daemons</longdescription>
+ <use>
+ <flag name="libmount">Link mount.nfs with libmount</flag>
+ <flag name="nfsdcld">Enable nfsdcld NFSv4 clientid tracking daemon</flag>
+ <flag name="nfsidmap">Enable support for newer nfsidmap helper</flag>
+ <flag name="nfsv4">Enable support for NFSv4</flag>
+ <flag name="nfsv41">Enable support for NFSv4.1</flag>
+ <flag name="uuid">Support UUID lookups in rpc.mountd</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">nfs</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-fs/nfs-utils/nfs-utils-1.3.4-r1.ebuild b/net-fs/nfs-utils/nfs-utils-1.3.4-r1.ebuild
new file mode 100644
index 000000000000..ab79aa46f8e5
--- /dev/null
+++ b/net-fs/nfs-utils/nfs-utils-1.3.4-r1.ebuild
@@ -0,0 +1,178 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils flag-o-matic multilib autotools systemd
+
+DESCRIPTION="NFS client and server daemons"
+HOMEPAGE="http://linux-nfs.org/"
+SRC_URI="mirror://sourceforge/nfs/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86"
+IUSE="caps ipv6 kerberos +libmount nfsdcld +nfsidmap +nfsv4 nfsv41 selinux tcpd +uuid"
+REQUIRED_USE="kerberos? ( nfsv4 )"
+RESTRICT="test" #315573
+
+# kth-krb doesn't provide the right include
+# files, and nfs-utils doesn't build against heimdal either,
+# so don't depend on virtual/krb.
+# (04 Feb 2005 agriffis)
+DEPEND_COMMON="tcpd? ( sys-apps/tcp-wrappers )
+ caps? ( sys-libs/libcap )
+ sys-libs/e2fsprogs-libs
+ >=net-nds/rpcbind-0.2.4
+ net-libs/libtirpc:=
+ libmount? ( sys-apps/util-linux )
+ nfsdcld? ( >=dev-db/sqlite-3.3 )
+ nfsv4? (
+ dev-libs/libevent:=
+ >=net-libs/libnfsidmap-0.21-r1
+ kerberos? (
+ >=net-libs/libtirpc-0.2.4-r1[kerberos]
+ app-crypt/mit-krb5
+ )
+ nfsidmap? (
+ >=net-libs/libnfsidmap-0.24
+ >=sys-apps/keyutils-1.5.9
+ )
+ )
+ nfsv41? (
+ sys-fs/lvm2
+ )
+ uuid? ( sys-apps/util-linux )"
+RDEPEND="${DEPEND_COMMON}
+ !net-nds/portmap
+ !<sys-apps/openrc-0.13.9
+ selinux? (
+ sec-policy/selinux-rpc
+ sec-policy/selinux-rpcbind
+ )
+"
+DEPEND="${DEPEND_COMMON}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.1.4-mtab-sym.patch
+ epatch "${FILESDIR}"/${PN}-1.2.8-cross-build.patch
+
+ sed \
+ -e "/^sbindir/s:= := \"${EPREFIX}\":g" \
+ -i utils/*/Makefile.am || die
+
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ export libsqlite3_cv_is_recent=yes # Our DEPEND forces this.
+ export ac_cv_header_keyutils_h=$(usex nfsidmap)
+ econf \
+ --with-statedir="${EPREFIX}"/var/lib/nfs \
+ --enable-tirpc \
+ --with-tirpcinclude="${EPREFIX}"/usr/include/tirpc/ \
+ $(use_enable libmount libmount-mount) \
+ $(use_with tcpd tcp-wrappers) \
+ $(use_enable nfsdcld nfsdcltrack) \
+ $(use_enable nfsv4) \
+ $(use_enable nfsv41) \
+ $(use_enable ipv6) \
+ $(use_enable caps) \
+ $(use_enable uuid) \
+ $(use_enable kerberos gss) \
+ $(use_enable kerberos svcgss) \
+ --without-gssglue
+}
+
+src_compile(){
+ # remove compiled files bundled in the tarball
+ emake clean
+ default
+}
+
+src_install() {
+ default
+ rm linux-nfs/Makefile* || die
+ dodoc -r linux-nfs README
+
+ # Don't overwrite existing xtab/etab, install the original
+ # versions somewhere safe... more info in pkg_postinst
+ keepdir /var/lib/nfs/{,sm,sm.bak}
+ mv "${ED}"/var/lib "${ED}"/usr/$(get_libdir) || die
+
+ # Install some client-side binaries in /sbin
+ dodir /sbin
+ mv "${ED}"/usr/sbin/rpc.statd "${ED}"/sbin/ || die
+
+ if use nfsv4 && use nfsidmap ; then
+ # Install a config file for idmappers in newer kernels. #415625
+ insinto /etc/request-key.d
+ echo 'create id_resolver * * /usr/sbin/nfsidmap -t 600 %k %d' > id_resolver.conf
+ doins id_resolver.conf
+ fi
+
+ insinto /etc
+ doins "${FILESDIR}"/exports
+ keepdir /etc/exports.d
+
+ local f list=() opt_need=""
+ if use nfsv4 ; then
+ opt_need="rpc.idmapd"
+ list+=( rpc.idmapd rpc.pipefs )
+ use kerberos && list+=( rpc.gssd rpc.svcgssd )
+ fi
+ for f in nfs nfsclient rpc.statd "${list[@]}" ; do
+ newinitd "${FILESDIR}"/${f}.initd ${f}
+ done
+ newinitd "${FILESDIR}"/nfsmount.initd-1.3.1 nfsmount # Nuke after 2015/08/01
+ for f in nfs nfsclient ; do
+ newconfd "${FILESDIR}"/${f}.confd ${f}
+ done
+ sed -i \
+ -e "/^NFS_NEEDED_SERVICES=/s:=.*:=\"${opt_need}\":" \
+ "${ED}"/etc/conf.d/nfs || die #234132
+
+ systemd_dounit systemd/*.{mount,service,target}
+ if ! use nfsv4 || ! use kerberos ; then
+ rm "${D}$(systemd_get_unitdir)"/rpc-{gssd,svcgssd}.service || die
+ fi
+ if ! use nfsv41 ; then
+ rm "${D}$(systemd_get_unitdir)"/nfs-blkmap.* || die
+ fi
+ rm "${D}$(systemd_get_unitdir)"/nfs-config.service || die
+ sed -i -r \
+ -e "/^EnvironmentFile=/s:=.*:=${EPREFIX}/etc/conf.d/nfs:" \
+ -e '/^(After|Wants)=nfs-config.service$/d' \
+ -e 's:/usr/sbin/rpc.statd:/sbin/rpc.statd:' \
+ "${D}$(systemd_get_unitdir)"/* || die
+
+ keepdir /var/lib/nfs #368505
+ keepdir /var/lib/nfs/v4recovery #603628
+}
+
+pkg_postinst() {
+ # Install default xtab and friends if there's none existing. In
+ # src_install we put them in /usr/lib/nfs for safe-keeping, but
+ # the daemons actually use the files in /var/lib/nfs. #30486
+ local f
+ for f in "${EROOT}"/usr/$(get_libdir)/nfs/*; do
+ [[ -e ${EROOT}/var/lib/nfs/${f##*/} ]] && continue
+ einfo "Copying default ${f##*/} from ${EPREFIX}/usr/$(get_libdir)/nfs to ${EPREFIX}/var/lib/nfs"
+ cp -pPR "${f}" "${EROOT}"/var/lib/nfs/
+ done
+
+ if systemd_is_booted; then
+ if [[ ${REPLACING_VERSIONS} < 1.3.0 ]]; then
+ ewarn "We have switched to upstream systemd unit files. Since"
+ ewarn "they got renamed, you should probably enable the new ones."
+ ewarn "You can run 'equery files nfs-utils | grep systemd'"
+ ewarn "to know what services you need to enable now."
+ fi
+ else
+ ewarn "If you use OpenRC, the nfsmount service has been replaced with nfsclient."
+ ewarn "If you were using nfsmount, please add nfsclient and netmount to the"
+ ewarn "same runlevel as nfsmount."
+ fi
+}
diff --git a/net-fs/nfs-utils/nfs-utils-2.1.1-r1.ebuild b/net-fs/nfs-utils/nfs-utils-2.1.1-r1.ebuild
new file mode 100644
index 000000000000..54de57a47aca
--- /dev/null
+++ b/net-fs/nfs-utils/nfs-utils-2.1.1-r1.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils flag-o-matic multilib autotools systemd
+
+DESCRIPTION="NFS client and server daemons"
+HOMEPAGE="http://linux-nfs.org/"
+SRC_URI="mirror://sourceforge/nfs/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="caps ipv6 kerberos +libmount nfsdcld +nfsidmap +nfsv4 nfsv41 selinux tcpd +uuid"
+REQUIRED_USE="kerberos? ( nfsv4 )"
+RESTRICT="test" #315573
+
+# kth-krb doesn't provide the right include
+# files, and nfs-utils doesn't build against heimdal either,
+# so don't depend on virtual/krb.
+# (04 Feb 2005 agriffis)
+DEPEND_COMMON="tcpd? ( sys-apps/tcp-wrappers )
+ caps? ( sys-libs/libcap )
+ sys-libs/e2fsprogs-libs
+ >=net-nds/rpcbind-0.2.4
+ net-libs/libtirpc:=
+ libmount? ( sys-apps/util-linux )
+ nfsdcld? ( >=dev-db/sqlite-3.3 )
+ nfsv4? (
+ dev-libs/libevent:=
+ >=net-libs/libnfsidmap-0.21-r1
+ kerberos? (
+ >=net-libs/libtirpc-0.2.4-r1[kerberos]
+ app-crypt/mit-krb5
+ )
+ nfsidmap? (
+ >=net-libs/libnfsidmap-0.24
+ >=sys-apps/keyutils-1.5.9
+ )
+ )
+ nfsv41? (
+ sys-fs/lvm2
+ )
+ uuid? ( sys-apps/util-linux )"
+RDEPEND="${DEPEND_COMMON}
+ !net-nds/portmap
+ !<sys-apps/openrc-0.13.9
+ selinux? (
+ sec-policy/selinux-rpc
+ sec-policy/selinux-rpcbind
+ )
+"
+DEPEND="${DEPEND_COMMON}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.1.4-mtab-sym.patch
+ epatch "${FILESDIR}"/${PN}-1.2.8-cross-build.patch
+
+ sed \
+ -e "/^sbindir/s:= := \"${EPREFIX}\":g" \
+ -i utils/*/Makefile.am || die
+
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ export libsqlite3_cv_is_recent=yes # Our DEPEND forces this.
+ export ac_cv_header_keyutils_h=$(usex nfsidmap)
+ econf \
+ --with-statedir="${EPREFIX}"/var/lib/nfs \
+ --enable-tirpc \
+ --with-tirpcinclude="${EPREFIX}"/usr/include/tirpc/ \
+ $(use_enable libmount libmount-mount) \
+ $(use_with tcpd tcp-wrappers) \
+ $(use_enable nfsdcld nfsdcltrack) \
+ $(use_enable nfsv4) \
+ $(use_enable nfsv41) \
+ $(use_enable ipv6) \
+ $(use_enable caps) \
+ $(use_enable uuid) \
+ $(use_enable kerberos gss) \
+ $(use_enable kerberos svcgss) \
+ --without-gssglue
+}
+
+src_compile(){
+ # remove compiled files bundled in the tarball
+ emake clean
+ default
+}
+
+src_install() {
+ default
+ rm linux-nfs/Makefile* || die
+ dodoc -r linux-nfs README
+
+ # Don't overwrite existing xtab/etab, install the original
+ # versions somewhere safe... more info in pkg_postinst
+ keepdir /var/lib/nfs/{,sm,sm.bak}
+ mv "${ED}"/var/lib "${ED}"/usr/$(get_libdir) || die
+
+ # Install some client-side binaries in /sbin
+ dodir /sbin
+ mv "${ED}"/usr/sbin/rpc.statd "${ED}"/sbin/ || die
+
+ if use nfsv4 && use nfsidmap ; then
+ # Install a config file for idmappers in newer kernels. #415625
+ insinto /etc/request-key.d
+ echo 'create id_resolver * * /usr/sbin/nfsidmap -t 600 %k %d' > id_resolver.conf
+ doins id_resolver.conf
+ fi
+
+ insinto /etc
+ doins "${FILESDIR}"/exports
+ keepdir /etc/exports.d
+
+ local f list=() opt_need=""
+ if use nfsv4 ; then
+ opt_need="rpc.idmapd"
+ list+=( rpc.idmapd rpc.pipefs )
+ use kerberos && list+=( rpc.gssd rpc.svcgssd )
+ fi
+ for f in nfs nfsclient rpc.statd "${list[@]}" ; do
+ newinitd "${FILESDIR}"/${f}.initd ${f}
+ done
+ newinitd "${FILESDIR}"/nfsmount.initd-1.3.1 nfsmount # Nuke after 2015/08/01
+ for f in nfs nfsclient ; do
+ newconfd "${FILESDIR}"/${f}.confd ${f}
+ done
+ sed -i \
+ -e "/^NFS_NEEDED_SERVICES=/s:=.*:=\"${opt_need}\":" \
+ "${ED}"/etc/conf.d/nfs || die #234132
+
+ systemd_dounit systemd/*.{mount,service,target}
+ if ! use nfsv4 || ! use kerberos ; then
+ rm "${ED}$(systemd_get_unitdir)"/rpc-{gssd,svcgssd}.service || die
+ fi
+ if ! use nfsv41 ; then
+ rm "${ED}$(systemd_get_unitdir)"/nfs-blkmap.* || die
+ fi
+ sed -i -r \
+ -e "/^EnvironmentFile=/s:=.*:=${EPREFIX}/etc/conf.d/nfs:" \
+ -e '/^(After|Wants)=nfs-config.service$/d' \
+ -e 's:/usr/sbin/rpc.statd:/sbin/rpc.statd:' \
+ "${ED}$(systemd_get_unitdir)"/* || die
+}
+
+pkg_postinst() {
+ # Install default xtab and friends if there's none existing. In
+ # src_install we put them in /usr/lib/nfs for safe-keeping, but
+ # the daemons actually use the files in /var/lib/nfs. #30486
+ local f
+ mkdir -p "${EROOT}"/var/lib/nfs #368505
+ for f in "${EROOT}"/usr/$(get_libdir)/nfs/*; do
+ [[ -e ${EROOT}/var/lib/nfs/${f##*/} ]] && continue
+ einfo "Copying default ${f##*/} from ${EPREFIX}/usr/$(get_libdir)/nfs to ${EPREFIX}/var/lib/nfs"
+ cp -pPR "${f}" "${EROOT}"/var/lib/nfs/
+ done
+
+ if systemd_is_booted; then
+ if [[ ${REPLACING_VERSIONS} < 1.3.0 ]]; then
+ ewarn "We have switched to upstream systemd unit files. Since"
+ ewarn "they got renamed, you should probably enable the new ones."
+ ewarn "You can run 'equery files nfs-utils | grep systemd'"
+ ewarn "to know what services you need to enable now."
+ fi
+ else
+ ewarn "If you use OpenRC, the nfsmount service has been replaced with nfsclient."
+ ewarn "If you were using nfsmount, please add nfsclient and netmount to the"
+ ewarn "same runlevel as nfsmount."
+ fi
+}
diff --git a/net-fs/nfs-utils/nfs-utils-2.1.2_rc3.ebuild b/net-fs/nfs-utils/nfs-utils-2.1.2_rc3.ebuild
new file mode 100644
index 000000000000..4858d85705fd
--- /dev/null
+++ b/net-fs/nfs-utils/nfs-utils-2.1.2_rc3.ebuild
@@ -0,0 +1,190 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils flag-o-matic multilib autotools systemd
+
+DESCRIPTION="NFS client and server daemons"
+HOMEPAGE="http://linux-nfs.org/"
+
+if [[ "${PV}" = *_rc* ]] ; then
+ inherit versionator
+ MY_PV="$(replace_all_version_separators -)"
+ SRC_URI="http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=snapshot;h=refs/tags/${PN}-${MY_PV};sf=tgz -> ${P}.tar.gz"
+ S="${WORKDIR}/${PN}-${PN}-${MY_PV}"
+else
+ SRC_URI="mirror://sourceforge/nfs/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="caps ipv6 kerberos +libmount nfsdcld +nfsidmap +nfsv4 nfsv41 selinux tcpd +uuid"
+REQUIRED_USE="kerberos? ( nfsv4 )"
+RESTRICT="test" #315573
+
+# kth-krb doesn't provide the right include
+# files, and nfs-utils doesn't build against heimdal either,
+# so don't depend on virtual/krb.
+# (04 Feb 2005 agriffis)
+DEPEND_COMMON="tcpd? ( sys-apps/tcp-wrappers )
+ caps? ( sys-libs/libcap )
+ sys-libs/e2fsprogs-libs
+ >=net-nds/rpcbind-0.2.4
+ net-libs/libtirpc:=
+ libmount? ( sys-apps/util-linux )
+ nfsdcld? ( >=dev-db/sqlite-3.3 )
+ nfsv4? (
+ dev-libs/libevent:=
+ >=net-libs/libnfsidmap-0.21-r1
+ kerberos? (
+ >=net-libs/libtirpc-0.2.4-r1[kerberos]
+ app-crypt/mit-krb5
+ )
+ nfsidmap? (
+ >=net-libs/libnfsidmap-0.24
+ >=sys-apps/keyutils-1.5.9
+ )
+ )
+ nfsv41? (
+ sys-fs/lvm2
+ )
+ uuid? ( sys-apps/util-linux )"
+RDEPEND="${DEPEND_COMMON}
+ !net-nds/portmap
+ !<sys-apps/openrc-0.13.9
+ selinux? (
+ sec-policy/selinux-rpc
+ sec-policy/selinux-rpcbind
+ )
+"
+DEPEND="${DEPEND_COMMON}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.1.4-mtab-sym.patch
+ "${FILESDIR}"/${PN}-1.2.8-cross-build.patch
+)
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+
+ sed \
+ -e "/^sbindir/s:= := \"${EPREFIX}\":g" \
+ -i utils/*/Makefile.am || die
+
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ export libsqlite3_cv_is_recent=yes # Our DEPEND forces this.
+ export ac_cv_header_keyutils_h=$(usex nfsidmap)
+ local myeconfargs=(
+ --with-statedir="${EPREFIX}"/var/lib/nfs
+ --enable-tirpc
+ --with-tirpcinclude="${EPREFIX}"/usr/include/tirpc/
+ $(use_enable libmount libmount-mount)
+ $(use_with tcpd tcp-wrappers)
+ $(use_enable nfsdcld nfsdcltrack)
+ $(use_enable nfsv4)
+ $(use_enable nfsv41)
+ $(use_enable ipv6)
+ $(use_enable caps)
+ $(use_enable uuid)
+ $(use_enable kerberos gss)
+ $(use_enable kerberos svcgss)
+ --without-gssglue
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_compile(){
+ # remove compiled files bundled in the tarball
+ emake clean
+ default
+}
+
+src_install() {
+ default
+ rm linux-nfs/Makefile* || die
+ dodoc -r linux-nfs README
+
+ # Don't overwrite existing xtab/etab, install the original
+ # versions somewhere safe... more info in pkg_postinst
+ keepdir /var/lib/nfs/{,sm,sm.bak}
+ mv "${ED}"/var/lib "${ED}"/usr/$(get_libdir) || die
+
+ # Install some client-side binaries in /sbin
+ dodir /sbin
+ mv "${ED}"/usr/sbin/rpc.statd "${ED}"/sbin/ || die
+
+ if use nfsv4 && use nfsidmap ; then
+ # Install a config file for idmappers in newer kernels. #415625
+ insinto /etc/request-key.d
+ echo 'create id_resolver * * /usr/sbin/nfsidmap -t 600 %k %d' > id_resolver.conf
+ doins id_resolver.conf
+ fi
+
+ insinto /etc
+ doins "${FILESDIR}"/exports
+ keepdir /etc/exports.d
+
+ local f list=() opt_need=""
+ if use nfsv4 ; then
+ opt_need="rpc.idmapd"
+ list+=( rpc.idmapd rpc.pipefs )
+ use kerberos && list+=( rpc.gssd rpc.svcgssd )
+ fi
+ for f in nfs nfsclient rpc.statd "${list[@]}" ; do
+ newinitd "${FILESDIR}"/${f}.initd ${f}
+ done
+ newinitd "${FILESDIR}"/nfsmount.initd-1.3.1 nfsmount # Nuke after 2015/08/01
+ for f in nfs nfsclient ; do
+ newconfd "${FILESDIR}"/${f}.confd ${f}
+ done
+ sed -i \
+ -e "/^NFS_NEEDED_SERVICES=/s:=.*:=\"${opt_need}\":" \
+ "${ED}"/etc/conf.d/nfs || die #234132
+
+ systemd_dounit systemd/*.{mount,service,target}
+ if ! use nfsv4 || ! use kerberos ; then
+ rm "${ED}$(systemd_get_unitdir)"/rpc-{gssd,svcgssd}.service || die
+ fi
+ if ! use nfsv41 ; then
+ rm "${ED}$(systemd_get_unitdir)"/nfs-blkmap.* || die
+ fi
+ sed -i \
+ -e 's:/usr/sbin/rpc.statd:/sbin/rpc.statd:' \
+ "${ED}$(systemd_get_unitdir)"/* || die
+
+ keepdir /var/lib/nfs #368505
+ keepdir /var/lib/nfs/v4recovery #603628
+
+}
+
+pkg_postinst() {
+ # Install default xtab and friends if there's none existing. In
+ # src_install we put them in /usr/lib/nfs for safe-keeping, but
+ # the daemons actually use the files in /var/lib/nfs. #30486
+ local f
+ for f in "${EROOT}"/usr/$(get_libdir)/nfs/*; do
+ [[ -e ${EROOT}/var/lib/nfs/${f##*/} ]] && continue
+ einfo "Copying default ${f##*/} from ${EPREFIX}/usr/$(get_libdir)/nfs to ${EPREFIX}/var/lib/nfs"
+ cp -pPR "${f}" "${EROOT}"/var/lib/nfs/
+ done
+
+ if systemd_is_booted; then
+ if [[ ${REPLACING_VERSIONS} < 1.3.0 ]]; then
+ ewarn "We have switched to upstream systemd unit files. Since"
+ ewarn "they got renamed, you should probably enable the new ones."
+ ewarn "You can run 'equery files nfs-utils | grep systemd'"
+ ewarn "to know what services you need to enable now."
+ fi
+ else
+ ewarn "If you use OpenRC, the nfsmount service has been replaced with nfsclient."
+ ewarn "If you were using nfsmount, please add nfsclient and netmount to the"
+ ewarn "same runlevel as nfsmount."
+ fi
+}
diff --git a/net-fs/nfs-utils/nfs-utils-2.1.2_rc5.ebuild b/net-fs/nfs-utils/nfs-utils-2.1.2_rc5.ebuild
new file mode 100644
index 000000000000..133e06869f03
--- /dev/null
+++ b/net-fs/nfs-utils/nfs-utils-2.1.2_rc5.ebuild
@@ -0,0 +1,190 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic multilib systemd
+
+DESCRIPTION="NFS client and server daemons"
+HOMEPAGE="http://linux-nfs.org/"
+
+if [[ "${PV}" = *_rc* ]] ; then
+ inherit versionator
+ MY_PV="$(replace_all_version_separators -)"
+ SRC_URI="http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=snapshot;h=refs/tags/${PN}-${MY_PV};sf=tgz -> ${P}.tar.gz"
+ S="${WORKDIR}/${PN}-${PN}-${MY_PV}"
+else
+ SRC_URI="mirror://sourceforge/nfs/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="caps ipv6 kerberos +libmount nfsdcld +nfsidmap +nfsv4 nfsv41 selinux tcpd +uuid"
+REQUIRED_USE="kerberos? ( nfsv4 )"
+RESTRICT="test" #315573
+
+# kth-krb doesn't provide the right include
+# files, and nfs-utils doesn't build against heimdal either,
+# so don't depend on virtual/krb.
+# (04 Feb 2005 agriffis)
+DEPEND_COMMON="tcpd? ( sys-apps/tcp-wrappers )
+ caps? ( sys-libs/libcap )
+ sys-libs/e2fsprogs-libs
+ >=net-nds/rpcbind-0.2.4
+ net-libs/libtirpc:=
+ libmount? ( sys-apps/util-linux )
+ nfsdcld? ( >=dev-db/sqlite-3.3 )
+ nfsv4? (
+ dev-libs/libevent:=
+ >=net-libs/libnfsidmap-0.21-r1
+ kerberos? (
+ >=net-libs/libtirpc-0.2.4-r1[kerberos]
+ app-crypt/mit-krb5
+ )
+ nfsidmap? (
+ >=net-libs/libnfsidmap-0.24
+ >=sys-apps/keyutils-1.5.9
+ )
+ )
+ nfsv41? (
+ sys-fs/lvm2
+ )
+ uuid? ( sys-apps/util-linux )"
+RDEPEND="${DEPEND_COMMON}
+ !net-nds/portmap
+ !<sys-apps/openrc-0.13.9
+ selinux? (
+ sec-policy/selinux-rpc
+ sec-policy/selinux-rpcbind
+ )
+"
+DEPEND="${DEPEND_COMMON}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.1.4-mtab-sym.patch
+ "${FILESDIR}"/${PN}-1.2.8-cross-build.patch
+)
+
+src_prepare() {
+ default
+
+ sed \
+ -e "/^sbindir/s:= := \"${EPREFIX}\":g" \
+ -i utils/*/Makefile.am || die
+
+ eautoreconf
+}
+
+src_configure() {
+ export libsqlite3_cv_is_recent=yes # Our DEPEND forces this.
+ export ac_cv_header_keyutils_h=$(usex nfsidmap)
+ local myeconfargs=(
+ --with-statedir="${EPREFIX}"/var/lib/nfs
+ --enable-tirpc
+ --with-tirpcinclude="${EPREFIX}"/usr/include/tirpc/
+ $(use_enable libmount libmount-mount)
+ $(use_with tcpd tcp-wrappers)
+ $(use_enable nfsdcld nfsdcltrack)
+ $(use_enable nfsv4)
+ $(use_enable nfsv41)
+ $(use_enable ipv6)
+ $(use_enable caps)
+ $(use_enable uuid)
+ $(use_enable kerberos gss)
+ $(use_enable kerberos svcgss)
+ --without-gssglue
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_compile(){
+ # remove compiled files bundled in the tarball
+ emake clean
+ default
+}
+
+src_install() {
+ default
+ rm linux-nfs/Makefile* || die
+ dodoc -r linux-nfs README
+
+ # Don't overwrite existing xtab/etab, install the original
+ # versions somewhere safe... more info in pkg_postinst
+ keepdir /var/lib/nfs/{,sm,sm.bak}
+ mv "${ED%/}"/var/lib "${ED%/}"/usr/$(get_libdir) || die
+
+ # Install some client-side binaries in /sbin
+ dodir /sbin
+ mv "${ED%/}"/usr/sbin/rpc.statd "${ED%/}"/sbin/ || die
+
+ if use nfsv4 && use nfsidmap ; then
+ # Install a config file for idmappers in newer kernels. #415625
+ insinto /etc/request-key.d
+ echo 'create id_resolver * * /usr/sbin/nfsidmap -t 600 %k %d' > id_resolver.conf
+ doins id_resolver.conf
+ fi
+
+ insinto /etc
+ doins "${FILESDIR}"/exports
+ keepdir /etc/exports.d
+
+ local f list=() opt_need=""
+ if use nfsv4 ; then
+ opt_need="rpc.idmapd"
+ list+=( rpc.idmapd rpc.pipefs )
+ use kerberos && list+=( rpc.gssd rpc.svcgssd )
+ fi
+ for f in nfs nfsclient rpc.statd "${list[@]}" ; do
+ newinitd "${FILESDIR}"/${f}.initd ${f}
+ done
+ newinitd "${FILESDIR}"/nfsmount.initd-1.3.1 nfsmount # Nuke after 2015/08/01
+ for f in nfs nfsclient ; do
+ newconfd "${FILESDIR}"/${f}.confd ${f}
+ done
+ sed -i \
+ -e "/^NFS_NEEDED_SERVICES=/s:=.*:=\"${opt_need}\":" \
+ "${ED%/}"/etc/conf.d/nfs || die #234132
+
+ local systemd_systemunitdir="$(systemd_get_systemunitdir)"
+ systemd_dounit systemd/*.{mount,service,target}
+ if ! use nfsv4 || ! use kerberos ; then
+ rm "${ED%/}${systemd_systemunitdir}"/rpc-{gssd,svcgssd}.service || die
+ fi
+ if ! use nfsv41 ; then
+ rm "${ED%/}${systemd_systemunitdir}"/nfs-blkmap.* || die
+ fi
+ sed -i \
+ -e 's:/usr/sbin/rpc.statd:/sbin/rpc.statd:' \
+ "${ED%/}${systemd_systemunitdir}"/* || die
+
+ keepdir /var/lib/nfs #368505
+ keepdir /var/lib/nfs/v4recovery #603628
+
+}
+
+pkg_postinst() {
+ # Install default xtab and friends if there's none existing. In
+ # src_install we put them in /usr/lib/nfs for safe-keeping, but
+ # the daemons actually use the files in /var/lib/nfs. #30486
+ local f
+ for f in "${EROOT%/}"/usr/$(get_libdir)/nfs/*; do
+ [[ -e ${EROOT%/}/var/lib/nfs/${f##*/} ]] && continue
+ einfo "Copying default ${f##*/} from ${EPREFIX}/usr/$(get_libdir)/nfs to ${EPREFIX}/var/lib/nfs"
+ cp -pPR "${f}" "${EROOT%/}"/var/lib/nfs/
+ done
+
+ if systemd_is_booted; then
+ if [[ ${REPLACING_VERSIONS} < 1.3.0 ]]; then
+ ewarn "We have switched to upstream systemd unit files. Since"
+ ewarn "they got renamed, you should probably enable the new ones."
+ ewarn "You can run 'equery files nfs-utils | grep systemd'"
+ ewarn "to know what services you need to enable now."
+ fi
+ else
+ ewarn "If you use OpenRC, the nfsmount service has been replaced with nfsclient."
+ ewarn "If you were using nfsmount, please add nfsclient and netmount to the"
+ ewarn "same runlevel as nfsmount."
+ fi
+}
diff --git a/net-fs/nfs4-acl-tools/Manifest b/net-fs/nfs4-acl-tools/Manifest
new file mode 100644
index 000000000000..6d50696cae6d
--- /dev/null
+++ b/net-fs/nfs4-acl-tools/Manifest
@@ -0,0 +1,5 @@
+DIST nfs4-acl-tools-0.3.3.tar.gz 176018 SHA256 1990cf5664ff1258695d5f15100b352912366ea2db2c661941adf053bbe966b4 SHA512 8efa67c9f8a2f360c96b0df4e4aad55c044544188ebacd2e23b5f1c8a2c6c03d06cb8ffa434b03f502351a3403e98f4013bf6e6d9c85909995747b5489ea22d7 WHIRLPOOL 4fd941e18571a987e67b598e3dbaae9cfab51ef757e9fb0a2affd60a0dda75ca269f4f37ed85f00b6ec9fe70749eb4634c9add06a6fd792ec431eaf6ef110b36
+EBUILD nfs4-acl-tools-0.3.3.ebuild 428 SHA256 bd8aded48a29c327879f1d902bd4c9602d01442b04fc2f8c6313dc8d4a4d6c38 SHA512 05fc149e347707402bad76d2cd6a738eb6088a4926357102adbc430e8c92cab66c6601c7d6b852943f1a79754dcb75e767f53c7d052e99c030ba0b46e68e432f WHIRLPOOL 6170455629866379f7e333a3994339aee301d378517b0d398c829d89fcde69101b547481f5a20129d8ae1dd7c683c77537cbe236c9bc9158dcf1e024fc74430d
+MISC ChangeLog 2586 SHA256 a20ac43f0bb81570519170db361157b2e68447beab931c9a58109387425b59b0 SHA512 dd49c131a0dfebb8118f59ecdd8bb28ac208bf43fa0944a47747f99f27e8e6a671681026bde5dc6a939da2a8512097de2fff6355524fe9bd4ad6e29af99acc35 WHIRLPOOL 03bd4a7e109a8321732e3085df73e50b97ecda23b6cbb96dc216825d15c91221f3d14c7bd1d5f07a07297162cf9677123b8f41d279e11a6539d99ac1ee24ea61
+MISC ChangeLog-2015 1002 SHA256 897b97315238ceb7e2c272f816cab0904ff7b532ef1ed07b0691160e16fb81e4 SHA512 da9167f13ba922dce65f45bd5df9832207f62a48495b5f4591e51ef3c3187b72f08e0c6831ba2cac0e8188dd666473c59968c9ba67ccf1d9d664d88a048c922c WHIRLPOOL 3ca0630a34c5ce369ab0cefe3b9ba6a0e3b2286e23d6346bc8f02327c8a0312413aa51de90ea745d5cadedcd3b21457fd8e93f3cb67afa1bcb7cd115d391a644
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/net-fs/nfs4-acl-tools/metadata.xml b/net-fs/nfs4-acl-tools/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/net-fs/nfs4-acl-tools/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-fs/nfs4-acl-tools/nfs4-acl-tools-0.3.3.ebuild b/net-fs/nfs4-acl-tools/nfs4-acl-tools-0.3.3.ebuild
new file mode 100644
index 000000000000..c96fe8ae670a
--- /dev/null
+++ b/net-fs/nfs4-acl-tools/nfs4-acl-tools-0.3.3.ebuild
@@ -0,0 +1,16 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+DESCRIPTION="Commandline and GUI tools that deal directly with NFSv4 ACLs"
+HOMEPAGE="http://www.citi.umich.edu/projects/nfsv4/linux/"
+SRC_URI="http://www.citi.umich.edu/projects/nfsv4/linux/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="sys-apps/attr"
+RDEPEND="${DEPEND}"
diff --git a/net-fs/nfstest/Manifest b/net-fs/nfstest/Manifest
new file mode 100644
index 000000000000..c0f22c93b89b
--- /dev/null
+++ b/net-fs/nfstest/Manifest
@@ -0,0 +1,7 @@
+DIST NFStest-1.0.2.tar.gz 214840 SHA256 9fcde8dfb8da1a36626c5af907eae052ff6530b11a0b0cbf2851eef4f82fa10c SHA512 3758f6af8c3959274a3dfdc33a3c9e76451bd46c85b779ce7352ec4b4d616273ff2b409598fb31dbaf4663b8a2d743f9e0a1cc3a0c4eabcd918d6d5fbed2f09e WHIRLPOOL c97d65634d01eeb0087f8545781c8402ef195d6bd819f812aec7cbe7908cac76fe13da2e8c78c24d714a5e515bd7f61cbbbc3e4865984d2eb88261c02454f0e3
+DIST NFStest-2.1.2.tar.gz 357049 SHA256 de3fbab7c4e9e1c0e5e23c4eedaabc44a387b2e50cabd949912613db7f029baa SHA512 83d77bd94bb325d1a7badfc48d55fe200c6f53749d13f622c918b2fd6d8a7d279fda5f59e725f86d41b3f573881a14c677556c8b1b36d1a0b5e20d7d9b7639e9 WHIRLPOOL 708756823d564bd90744c05e749ed21ca98033cc76e5c9b874ac1fd6085838b6314a53c0ec36fdaf0ead6cae37d97febb0ca7351515a26a73c2266370ba53739
+EBUILD nfstest-1.0.2.ebuild 554 SHA256 b66d3c07e381f4fac1b1e8fa4fb6d7a7bc61fbe77613e12b0999240b2d9c3359 SHA512 de5f3041b3c63743b5d858cdef6b8a3303e14cc1901028b82f3e77ff0ddd73d36bb7a0b9f12504f4860de93aebe381bb44026af371cde9364fb660fc6b4cb92e WHIRLPOOL 09f6bfb40fdd59df4b22a7d6ac72751e17dacd9c71e9bab63aaca377ec74401da3f614e3362d845390c2cae04205a0f85ba172c8c532b6bc64f7be5ce302c830
+EBUILD nfstest-2.1.2.ebuild 554 SHA256 344e0fb731d61d835bf9918f2e332e2d1de9047e3332be3ae9af74a421e559f4 SHA512 5b1c2ce92021296f480cdfc8751b8f95ea9f96cc322d97599a1281d2e90a325310dae17b576cb4ccb912ae1c99290ebe7a083036cc52c499b7e28b03244f2548 WHIRLPOOL 6ea7b3f3575f008837b42bd0c4bec2ee13ce9d86fe487301a8ef602eb3a42e78931ce567c5fc9ac413c7193c3b4b52d4b7cb3409abd526a3547fd062eea17100
+MISC ChangeLog 2893 SHA256 9655ef485a9b2664e57ee62bcfc6463cf30627c38b9846f2db02448945a62efe SHA512 4cd6aa452d45f800e5508593a1e3296c7a57631613fb38e15210219fd1512c130678aebe1c222b495c20fbcea4844a928edf57d86478ca24bececa3432a594b6 WHIRLPOOL c125e4d89d10ff8b4b1f82dc65cb531be549329d9a4483358d12939c49fde390e130582bde5e86bc057c514c0121ff0fba1e0ffb18164117305874225cea918f
+MISC ChangeLog-2015 455 SHA256 36f7e1bf49502fa8b2d42077088f2b2eed8f73b4d996988dfabfc8ecf22dbcdc SHA512 273b8ca7380898898521541e0046ec79e7717b1925741b860e9b960124c2690aa7b3b40ca57c262eaac3a59ff22d9978b45653b988f86165fa787cab0a3c1f10 WHIRLPOOL 892d7689fe43350e0cacfa3236fccf739452e30d52ef2074b037c914d722ad884ce1c739b4f24166be304c77108995e7e718fbfdfa928cf3792b49b310e8556d
+MISC metadata.xml 229 SHA256 df1c79cc4b8e818a5663ca9643c6002ca415161a7c5a4be400f0632e6bc0757b SHA512 9f62745ab9913699460068f581f894339e98acaab182072fc7ad75f2974f212aed1c5e44bcb26b54ab76b10a840f294b334cc1aadba15971dcc4b9ceb2fd3d18 WHIRLPOOL fe32c65aa31e52f1ad6d2d84097f6b53296c6b9e9c2c412c0399c6e16e2569c44d701de465e76d94ee174034ad2d8ebe2458b10036f27c71c7e11230103eced1
diff --git a/net-fs/nfstest/metadata.xml b/net-fs/nfstest/metadata.xml
new file mode 100644
index 000000000000..97fa5b04edcd
--- /dev/null
+++ b/net-fs/nfstest/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>prometheanfire@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-fs/nfstest/nfstest-1.0.2.ebuild b/net-fs/nfstest/nfstest-1.0.2.ebuild
new file mode 100644
index 000000000000..697a421617a6
--- /dev/null
+++ b/net-fs/nfstest/nfstest-1.0.2.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+MY_PN="NFStest"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Tools for testing either the NFS client or the NFS server"
+HOMEPAGE="http://wiki.linux-nfs.org/wiki/index.php/NFStest"
+SRC_URI="http://www.linux-nfs.org/~mora/nfstest/releases/${MY_P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="net-fs/nfs-utils"
+DEPEND=""
+
+S="${WORKDIR}"/${MY_P}
diff --git a/net-fs/nfstest/nfstest-2.1.2.ebuild b/net-fs/nfstest/nfstest-2.1.2.ebuild
new file mode 100644
index 000000000000..51b29530b7d6
--- /dev/null
+++ b/net-fs/nfstest/nfstest-2.1.2.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+MY_PN="NFStest"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Tools for testing either the NFS client or the NFS server"
+HOMEPAGE="http://wiki.linux-nfs.org/wiki/index.php/NFStest"
+SRC_URI="http://www.linux-nfs.org/~mora/nfstest/releases/${MY_P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="net-fs/nfs-utils"
+DEPEND=""
+
+S="${WORKDIR}"/${MY_P}
diff --git a/net-fs/openafs-kernel/Manifest b/net-fs/openafs-kernel/Manifest
new file mode 100644
index 000000000000..4fb1602cacc0
--- /dev/null
+++ b/net-fs/openafs-kernel/Manifest
@@ -0,0 +1,13 @@
+DIST openafs-1.6.20.1-src.tar.bz2 14672548 SHA256 dc869eecf6c81949d3dd2021eaf87118ef9b90ec5012a35f64836a02a58a8826 SHA512 cd6a0cd5d48fffaf37d143a9f8f7cd84c78ada6a645ac1a6cd3cf5b4a8a5af602e84133506c797e62ef2e61180a1c89915ea8657ac95bb872ada018b1baf0d59 WHIRLPOOL e289125306024b5a4d651017f35c0b2a91cadfeecf5820298e5ecccebf8c94a8126f7b70c120a687c5edfc4ad769ecfe72f9597173c34fb0dec6e13a7619cf4c
+DIST openafs-1.6.20.2-src.tar.bz2 14676861 SHA256 50234820c3da9752d2ca05fb7e83b7dc5c96a0e96a0b875ebc7ae3c835607614 SHA512 74c50fa71a98e7ad8bfed0610ab1dbf5c6669cdbd1e240c7b155f345fc511d9e51b4d9caa8d235223ad929b711577a192ca0841c92279bf16991cace8f19a575 WHIRLPOOL af213b7bb94962dcf76d22cf2078c8cc02d435a22a26f14ca7113d3eafb4304823b9806ff4121e5c0ab4f9f4f665eed0910c08dd41f3f2de136e8818f7ed2b1e
+DIST openafs-1.6.21-src.tar.bz2 14682997 SHA256 ba9c1f615edd53b64fc271ad369c49a816acedca70cdd090975033469a84118f SHA512 451c38ed5031b8a962da3276bf5d0f1b74c5956c2d10cdb8bbd22ea633880ebf35cf5fc71feb5d2eca4306762f6c2376a46f4522150291acfc469f8be2da757f WHIRLPOOL a643735720d8ab486fc32f0f21a1340792879e0648d0ffa72bfe7a10a4659f5c0f986d4b918bfc7810c2fe4fa0762a0c727c7fd8de5c179b14bdbdb56664c607
+DIST openafs-1.6.21.1-src.tar.bz2 14679991 SHA256 aed896b0f598e3033e9ceb2a1eae24addff9ec0bb2d713ab63945a449ded3a5a SHA512 a8c496657a59ee00411717aac8b6c4ca64f7ffeef400ae84ff902c8b2d81d19a367f78fbe105512ec7ec7181e8b0158fc359565eb99e2beb39d6a93ed1b28f98 WHIRLPOOL 57919d0babfee0aca6659e0e036437b9f0d01d8798bdaf51200798dd47d08b706a078bdff055f0ac0f85cb4ee7cf3adc239feaf9bec19dfb268984b9fd47faca
+DIST openafs-patches-20170212.tar.xz 11008 SHA256 9e20ca0ce0af6178ba39e459e88ecf3da8e6d97947a8b77a65f3cb0e523f6b47 SHA512 13e525a3f612b43318ad2fefaa3edf15ad572153494e94826815400f90a253678d2ade44d6adae08b1cb0dc8f311f5407f5aa540ed0df7a2d2d6024695bd917f WHIRLPOOL 4f81b94ad5ae7aab8ab954a333aa5cf72692cf91784b441b16e55fd023e58b7fe575b0228073fbacb9036cd4a7bfccd7553795457872973d15bbe48b95ac4484
+DIST openafs-patches-20170822.tar.xz 11036 SHA256 970324fc50ee48bc6aa06bbe448c0aac5a398c38e196155924b85dc8ed36e649 SHA512 f4b574287bfe54881a70f3ccd4d4901b2f8f9ecbec7b3a4975b59050d5ef27c6de3da25f820b7b2b10f1a38034bb28e5c01ee094fb38cae80e244eeb04b29d0a WHIRLPOOL d9485c1d08f2346218cf1285d02ac5097bc283d4648ba9203d861162c259fa74ff749acb455e62eaa38a717cf253ed221c11f3ad0339600496b7da4929419e50
+EBUILD openafs-kernel-1.6.20.1.ebuild 3835 SHA256 d39aad0bead960b822e42f31c1789dc7f38683ad4ee3a2714c34cdfbbf9c4761 SHA512 490887d5f94f3f536efab45acfe12b62c7484f7dbb3a35b6a051fa777da1e9e671136f677ccadfe85a75a907a5c77db9fecb439182f214d2b717379f010fd0fc WHIRLPOOL 7950deaa737d28c2836b66b879946a666377a17dff556b0244913a5e7e9280a057a8bd2bed775dc6ebab965c199f9383bf28fc720b261fb44c446c662e4162db
+EBUILD openafs-kernel-1.6.20.2-r1.ebuild 3838 SHA256 93e242aa34d4973c0af53e2f3ea81b07812d5abaed31133d7d55779159b82e27 SHA512 66f546dbd7a0905ba336b13c5ffdaf170acddf871c6d216e1e1d0fa8e59c49974e61d5c627698bbbc8b1293b8080488a5cb67286bb9e360b46d528b82f4483d9 WHIRLPOOL aec491e079ca0bae668024d7febdf130a97b800e24165fc7d00f7e7a7183cdd2bad880c09c4435d4fa0ded66b5d9ecd4c2774b1fe8b9612e19d325a0782e8a5c
+EBUILD openafs-kernel-1.6.21-r1.ebuild 3836 SHA256 90b37687e2d6d2f8e3c4b7050676fe0f3ff69733c2f8f9ecf89bad52835bb1cd SHA512 1850b0473ef8d822cc6165c5bcc23e3d7990a3aff7c48dbc81a1ebc6c5f1593216fde58881fd16f955c3e1cd1650dff867ca95f409acd00b7ec846dde1df643b WHIRLPOOL 5dbc486e2429f028d5055a8494ec7b2c783f9b3bdc9b80a0f0ea947baae936205c00e0e1fe54fef7acf466e8a5ca051606a639ad37ba5a410c5838f70c281078
+EBUILD openafs-kernel-1.6.21.1.ebuild 3838 SHA256 3a605b6f04f0ca18f610c25d96968641e27c0f4f6a21f3927cf832541019cff5 SHA512 bc3a856e88205c402c3fb3eb79a36811455b8b66edb308b283f735aff04f5c79cd41ce67fd33af695cd182d095528499cedcf62531de924dfe76010cada613e8 WHIRLPOOL 1c138ddb80b723fdfe4d0229e34778417a0c8f218a1b222505c4a5ad003c251bcf7de3e0fdf5ce1b97b4e6a33f51cf43254d944240488eab4d9324f492e2150c
+MISC ChangeLog 9463 SHA256 a36d3ae0e209ccf27249c656adfe28b486076491688e928c12c53f308dbc1437 SHA512 fefd6b64fca313b9cc0f8ed9890d6c0e49a9777c05541213a470c692593be0e135675345c78e0a1295305d54b72a68e4a0369e7d9bbc7a6c873092feccfc21c9 WHIRLPOOL 5857ff37713a457fb377435e7d6478072230fe535f99326159de5ebcc95f17ab9e4d97f821c3d5a0f80e36c107c8fc84ab723f62209f4392a4b2058bd552cd2a
+MISC ChangeLog-2015 29123 SHA256 4c95ef686475550fea49c59d4152cb2ba69cae32e2a673ff1fdc8c7097d54552 SHA512 0607f7e09958af3974b853cbd7c5fd970d5a3907d94748842cd1c9489bfcc63f51c834756c46c276d7cb1dc2dccfb36fac7ddde8ae7f974b8132b8e897d22b24 WHIRLPOOL 66b7476c37147f79d75eff1f4737dc9c254bf97d25cb97fc54b6ce5a2d2ff24b601a43528c09dce51d85fe0a89509f19065efc176b78dfdfcf2bc820447974bc
+MISC metadata.xml 421 SHA256 90586e9016d105142026e51835747c1c69ecde000f17af953fd8671eab8c39bb SHA512 66972c2fff54dc80eae78500b81957e2a2ca1516feb747172055cc44c288e6d0ecd25a3b0a9b179e84c4da68f857094d4936b0a9b836b5b9fafdca5489edb864 WHIRLPOOL 8d654a6ffbc4fb7bd73b0d3d7e81fe66c6813401a26686cbe356f178d9b5e06968da9ba7973780d71bf0388a9cdc651deeec9a8b9554a3b770bd0dea356f2694
diff --git a/net-fs/openafs-kernel/metadata.xml b/net-fs/openafs-kernel/metadata.xml
new file mode 100644
index 000000000000..20e8e259583a
--- /dev/null
+++ b/net-fs/openafs-kernel/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>NP-Hardass@gentoo.org</email>
+ <description>please assign bugs to</description>
+</maintainer>
+<maintainer type="person">
+ <email>bircoph@gentoo.org</email>
+ <name>Andrew Savchenko</name>
+ <description>please CC on bugs</description>
+</maintainer>
+</pkgmetadata>
diff --git a/net-fs/openafs-kernel/openafs-kernel-1.6.20.1.ebuild b/net-fs/openafs-kernel/openafs-kernel-1.6.20.1.ebuild
new file mode 100644
index 000000000000..cff675598aaf
--- /dev/null
+++ b/net-fs/openafs-kernel/openafs-kernel-1.6.20.1.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools linux-mod multilib toolchain-funcs versionator
+
+MY_PV=$(delete_version_separator '_')
+MY_PN="${PN/-kernel}"
+MY_P="${MY_PN}-${MY_PV}"
+PVER="20170212"
+
+DESCRIPTION="The OpenAFS distributed file system kernel module"
+HOMEPAGE="https://www.openafs.org/"
+# We always d/l the doc tarball as man pages are not USE=doc material
+[[ ${PV} == *_pre* ]] && MY_PRE="candidate/" || MY_PRE=""
+SRC_URI="
+ https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2
+ https://dev.gentoo.org/~bircoph/afs/${MY_PN}-patches-${PVER}.tar.xz
+"
+
+LICENSE="IBM BSD openafs-krb5-a APSL-2"
+SLOT="0"
+KEYWORDS="amd64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="debug"
+
+S=${WORKDIR}/${MY_P}
+
+CONFIG_CHECK="~!AFS_FS KEYS"
+ERROR_AFS_FS="OpenAFS conflicts with the in-kernel AFS-support. Make sure not to load both at the same time!"
+ERROR_KEYS="OpenAFS needs CONFIG_KEYS option enabled"
+
+QA_TEXTRELS_x86_fbsd="/boot/modules/libafs.ko"
+QA_TEXTRELS_amd64_fbsd="/boot/modules/libafs.ko"
+
+PATCHES=( "${WORKDIR}/gentoo/patches" )
+
+pkg_pretend() {
+ if use kernel_linux && kernel_is ge 4 10 ; then
+ ewarn "Gentoo supports kernels which are supported by OpenAFS"
+ ewarn "which are limited to the kernel versions: < 4.10"
+ ewarn ""
+ ewarn "You are free to utilize epatch_user to provide whatever"
+ ewarn "support you feel is appropriate, but will not receive"
+ ewarn "support as a result of those changes."
+ ewarn ""
+ ewarn "Please do not file a bug report about this."
+ fi
+}
+
+pkg_setup() {
+ if use kernel_linux; then
+ linux-mod_pkg_setup
+ fi
+}
+
+src_prepare() {
+ default
+
+ # packaging is f-ed up, so we can't run eautoreconf
+ # run autotools commands based on what is listed in regen.sh
+ eaclocal -I src/cf
+ eautoconf
+ eautoconf -o configure-libafs configure-libafs.ac
+ eautoheader
+ einfo "Deleting autom4te.cache directory"
+ rm -rf autom4te.cache
+}
+
+src_configure() {
+ local myconf=""
+ # OpenAFS 1.6.11 has a bug with kernels 3.17-3.17.2 that requires a config option
+ if use kernel_linux && kernel_is -ge 3 17 && kernel_is -le 3 17 2; then
+ myconf="--enable-linux-d_splice_alias-extra-iput"
+ fi
+
+ local ARCH="$(tc-arch-kernel)"
+ local MY_ARCH="$(tc-arch)"
+ local BSD_BUILD_DIR="/usr/src/sys/${MY_ARCH}/compile/GENERIC"
+
+ if use kernel_linux; then
+ myconf+=( --with-linux-kernel-headers="${KV_DIR}" \
+ --with-linux-kernel-build="${KV_OUT_DIR}"
+ )
+ elif use kernel_FreeBSD; then
+ myconf+=( --with-bsd-kernel-build="${BSD_BUILD_DIR}" )
+ fi
+ econf \
+ $(use_enable debug debug-kernel) \
+ "${myconf[@]}"
+}
+
+src_compile() {
+ ARCH="$(tc-arch-kernel)" AR="$(tc-getAR)" emake V=1 -j1 only_libafs
+}
+
+src_install() {
+ if use kernel_linux; then
+ local srcdir=$(expr "${S}"/src/libafs/MODLOAD-*)
+ [[ -f ${srcdir}/libafs.${KV_OBJ} ]] || die "Couldn't find compiled kernel module"
+
+ MODULE_NAMES="libafs(fs/openafs:${srcdir})"
+
+ linux-mod_src_install
+ elif use kernel_FreeBSD; then
+ insinto /boot/modules
+ doins "${S}"/src/libafs/MODLOAD/libafs.ko
+ fi
+}
+
+pkg_postinst() {
+ # Update linker.hints file
+ use kernel_FreeBSD && /usr/sbin/kldxref "${EPREFIX}/boot/modules"
+ use kernel_linux && linux-mod_pkg_postinst
+
+ if use kernel_linux; then
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 1.6.18.2 ${v}; then
+ ewarn "As of OpenAFS 1.6.18.2, Gentoo's packaging no longer requires"
+ ewarn "that CONFIG_DEBUG_RODATA be turned off in one's kernel config."
+ ewarn "If you only turned this option off for OpenAFS, please re-enable"
+ ewarn "it, as keeping it turned off is a security risk."
+ break
+ fi
+ done
+ fi
+}
+
+pkg_postrm() {
+ # Update linker.hints file
+ use kernel_FreeBSD && /usr/sbin/kldxref "${EPREFIX}/boot/modules"
+ use kernel_linux && linux-mod_pkg_postrm
+}
diff --git a/net-fs/openafs-kernel/openafs-kernel-1.6.20.2-r1.ebuild b/net-fs/openafs-kernel/openafs-kernel-1.6.20.2-r1.ebuild
new file mode 100644
index 000000000000..4098bbf18219
--- /dev/null
+++ b/net-fs/openafs-kernel/openafs-kernel-1.6.20.2-r1.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools linux-mod multilib toolchain-funcs versionator
+
+MY_PV=$(delete_version_separator '_')
+MY_PN="${PN/-kernel}"
+MY_P="${MY_PN}-${MY_PV}"
+PVER="20170822"
+
+DESCRIPTION="The OpenAFS distributed file system kernel module"
+HOMEPAGE="https://www.openafs.org/"
+# We always d/l the doc tarball as man pages are not USE=doc material
+[[ ${PV} == *_pre* ]] && MY_PRE="candidate/" || MY_PRE=""
+SRC_URI="
+ https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2
+ https://dev.gentoo.org/~bircoph/afs/${MY_PN}-patches-${PVER}.tar.xz
+"
+
+LICENSE="IBM BSD openafs-krb5-a APSL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="debug"
+
+S=${WORKDIR}/${MY_P}
+
+CONFIG_CHECK="~!AFS_FS KEYS"
+ERROR_AFS_FS="OpenAFS conflicts with the in-kernel AFS-support. Make sure not to load both at the same time!"
+ERROR_KEYS="OpenAFS needs CONFIG_KEYS option enabled"
+
+QA_TEXTRELS_x86_fbsd="/boot/modules/libafs.ko"
+QA_TEXTRELS_amd64_fbsd="/boot/modules/libafs.ko"
+
+PATCHES=( "${WORKDIR}/gentoo/patches" )
+
+pkg_pretend() {
+ if use kernel_linux && kernel_is ge 4 12 ; then
+ ewarn "Gentoo supports kernels which are supported by OpenAFS"
+ ewarn "which are limited to the kernel versions: < 4.12"
+ ewarn ""
+ ewarn "You are free to utilize epatch_user to provide whatever"
+ ewarn "support you feel is appropriate, but will not receive"
+ ewarn "support as a result of those changes."
+ ewarn ""
+ ewarn "Please do not file a bug report about this."
+ fi
+}
+
+pkg_setup() {
+ if use kernel_linux; then
+ linux-mod_pkg_setup
+ fi
+}
+
+src_prepare() {
+ default
+
+ # packaging is f-ed up, so we can't run eautoreconf
+ # run autotools commands based on what is listed in regen.sh
+ eaclocal -I src/cf
+ eautoconf
+ eautoconf -o configure-libafs configure-libafs.ac
+ eautoheader
+ einfo "Deleting autom4te.cache directory"
+ rm -rf autom4te.cache
+}
+
+src_configure() {
+ local myconf=""
+ # OpenAFS 1.6.11 has a bug with kernels 3.17-3.17.2 that requires a config option
+ if use kernel_linux && kernel_is -ge 3 17 && kernel_is -le 3 17 2; then
+ myconf="--enable-linux-d_splice_alias-extra-iput"
+ fi
+
+ local ARCH="$(tc-arch-kernel)"
+ local MY_ARCH="$(tc-arch)"
+ local BSD_BUILD_DIR="/usr/src/sys/${MY_ARCH}/compile/GENERIC"
+
+ if use kernel_linux; then
+ myconf+=( --with-linux-kernel-headers="${KV_DIR}" \
+ --with-linux-kernel-build="${KV_OUT_DIR}"
+ )
+ elif use kernel_FreeBSD; then
+ myconf+=( --with-bsd-kernel-build="${BSD_BUILD_DIR}" )
+ fi
+ econf \
+ $(use_enable debug debug-kernel) \
+ "${myconf[@]}"
+}
+
+src_compile() {
+ ARCH="$(tc-arch-kernel)" AR="$(tc-getAR)" emake V=1 -j1 only_libafs
+}
+
+src_install() {
+ if use kernel_linux; then
+ local srcdir=$(expr "${S}"/src/libafs/MODLOAD-*)
+ [[ -f ${srcdir}/libafs.${KV_OBJ} ]] || die "Couldn't find compiled kernel module"
+
+ MODULE_NAMES="libafs(fs/openafs:${srcdir})"
+
+ linux-mod_src_install
+ elif use kernel_FreeBSD; then
+ insinto /boot/modules
+ doins "${S}"/src/libafs/MODLOAD/libafs.ko
+ fi
+}
+
+pkg_postinst() {
+ # Update linker.hints file
+ use kernel_FreeBSD && /usr/sbin/kldxref "${EPREFIX}/boot/modules"
+ use kernel_linux && linux-mod_pkg_postinst
+
+ if use kernel_linux; then
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 1.6.18.2 ${v}; then
+ ewarn "As of OpenAFS 1.6.18.2, Gentoo's packaging no longer requires"
+ ewarn "that CONFIG_DEBUG_RODATA be turned off in one's kernel config."
+ ewarn "If you only turned this option off for OpenAFS, please re-enable"
+ ewarn "it, as keeping it turned off is a security risk."
+ break
+ fi
+ done
+ fi
+}
+
+pkg_postrm() {
+ # Update linker.hints file
+ use kernel_FreeBSD && /usr/sbin/kldxref "${EPREFIX}/boot/modules"
+ use kernel_linux && linux-mod_pkg_postrm
+}
diff --git a/net-fs/openafs-kernel/openafs-kernel-1.6.21-r1.ebuild b/net-fs/openafs-kernel/openafs-kernel-1.6.21-r1.ebuild
new file mode 100644
index 000000000000..cd28b79075be
--- /dev/null
+++ b/net-fs/openafs-kernel/openafs-kernel-1.6.21-r1.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools linux-mod multilib toolchain-funcs versionator
+
+MY_PV=$(delete_version_separator '_')
+MY_PN="${PN/-kernel}"
+MY_P="${MY_PN}-${MY_PV}"
+PVER="20170822"
+
+DESCRIPTION="The OpenAFS distributed file system kernel module"
+HOMEPAGE="https://www.openafs.org/"
+# We always d/l the doc tarball as man pages are not USE=doc material
+[[ ${PV} == *_pre* ]] && MY_PRE="candidate/" || MY_PRE=""
+SRC_URI="
+ https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2
+ https://dev.gentoo.org/~bircoph/afs/${MY_PN}-patches-${PVER}.tar.xz
+"
+
+LICENSE="IBM BSD openafs-krb5-a APSL-2"
+SLOT="0"
+KEYWORDS="amd64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="debug"
+
+S=${WORKDIR}/${MY_P}
+
+CONFIG_CHECK="~!AFS_FS KEYS"
+ERROR_AFS_FS="OpenAFS conflicts with the in-kernel AFS-support. Make sure not to load both at the same time!"
+ERROR_KEYS="OpenAFS needs CONFIG_KEYS option enabled"
+
+QA_TEXTRELS_x86_fbsd="/boot/modules/libafs.ko"
+QA_TEXTRELS_amd64_fbsd="/boot/modules/libafs.ko"
+
+PATCHES=( "${WORKDIR}/gentoo/patches" )
+
+pkg_pretend() {
+ if use kernel_linux && kernel_is ge 4 13 ; then
+ ewarn "Gentoo supports kernels which are supported by OpenAFS"
+ ewarn "which are limited to the kernel versions: < 4.13"
+ ewarn ""
+ ewarn "You are free to utilize epatch_user to provide whatever"
+ ewarn "support you feel is appropriate, but will not receive"
+ ewarn "support as a result of those changes."
+ ewarn ""
+ ewarn "Please do not file a bug report about this."
+ fi
+}
+
+pkg_setup() {
+ if use kernel_linux; then
+ linux-mod_pkg_setup
+ fi
+}
+
+src_prepare() {
+ default
+
+ # packaging is f-ed up, so we can't run eautoreconf
+ # run autotools commands based on what is listed in regen.sh
+ eaclocal -I src/cf
+ eautoconf
+ eautoconf -o configure-libafs configure-libafs.ac
+ eautoheader
+ einfo "Deleting autom4te.cache directory"
+ rm -rf autom4te.cache
+}
+
+src_configure() {
+ local myconf=""
+ # OpenAFS 1.6.11 has a bug with kernels 3.17-3.17.2 that requires a config option
+ if use kernel_linux && kernel_is -ge 3 17 && kernel_is -le 3 17 2; then
+ myconf="--enable-linux-d_splice_alias-extra-iput"
+ fi
+
+ local ARCH="$(tc-arch-kernel)"
+ local MY_ARCH="$(tc-arch)"
+ local BSD_BUILD_DIR="/usr/src/sys/${MY_ARCH}/compile/GENERIC"
+
+ if use kernel_linux; then
+ myconf+=( --with-linux-kernel-headers="${KV_DIR}" \
+ --with-linux-kernel-build="${KV_OUT_DIR}"
+ )
+ elif use kernel_FreeBSD; then
+ myconf+=( --with-bsd-kernel-build="${BSD_BUILD_DIR}" )
+ fi
+ econf \
+ $(use_enable debug debug-kernel) \
+ "${myconf[@]}"
+}
+
+src_compile() {
+ ARCH="$(tc-arch-kernel)" AR="$(tc-getAR)" emake V=1 -j1 only_libafs
+}
+
+src_install() {
+ if use kernel_linux; then
+ local srcdir=$(expr "${S}"/src/libafs/MODLOAD-*)
+ [[ -f ${srcdir}/libafs.${KV_OBJ} ]] || die "Couldn't find compiled kernel module"
+
+ MODULE_NAMES="libafs(fs/openafs:${srcdir})"
+
+ linux-mod_src_install
+ elif use kernel_FreeBSD; then
+ insinto /boot/modules
+ doins "${S}"/src/libafs/MODLOAD/libafs.ko
+ fi
+}
+
+pkg_postinst() {
+ # Update linker.hints file
+ use kernel_FreeBSD && /usr/sbin/kldxref "${EPREFIX}/boot/modules"
+ use kernel_linux && linux-mod_pkg_postinst
+
+ if use kernel_linux; then
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 1.6.18.2 ${v}; then
+ ewarn "As of OpenAFS 1.6.18.2, Gentoo's packaging no longer requires"
+ ewarn "that CONFIG_DEBUG_RODATA be turned off in one's kernel config."
+ ewarn "If you only turned this option off for OpenAFS, please re-enable"
+ ewarn "it, as keeping it turned off is a security risk."
+ break
+ fi
+ done
+ fi
+}
+
+pkg_postrm() {
+ # Update linker.hints file
+ use kernel_FreeBSD && /usr/sbin/kldxref "${EPREFIX}/boot/modules"
+ use kernel_linux && linux-mod_pkg_postrm
+}
diff --git a/net-fs/openafs-kernel/openafs-kernel-1.6.21.1.ebuild b/net-fs/openafs-kernel/openafs-kernel-1.6.21.1.ebuild
new file mode 100644
index 000000000000..4d7d351471f0
--- /dev/null
+++ b/net-fs/openafs-kernel/openafs-kernel-1.6.21.1.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools linux-mod multilib toolchain-funcs versionator
+
+MY_PV=$(delete_version_separator '_')
+MY_PN="${PN/-kernel}"
+MY_P="${MY_PN}-${MY_PV}"
+PVER="20170822"
+
+DESCRIPTION="The OpenAFS distributed file system kernel module"
+HOMEPAGE="https://www.openafs.org/"
+# We always d/l the doc tarball as man pages are not USE=doc material
+[[ ${PV} == *_pre* ]] && MY_PRE="candidate/" || MY_PRE=""
+SRC_URI="
+ https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2
+ https://dev.gentoo.org/~bircoph/afs/${MY_PN}-patches-${PVER}.tar.xz
+"
+
+LICENSE="IBM BSD openafs-krb5-a APSL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="debug"
+
+S=${WORKDIR}/${MY_P}
+
+CONFIG_CHECK="~!AFS_FS KEYS"
+ERROR_AFS_FS="OpenAFS conflicts with the in-kernel AFS-support. Make sure not to load both at the same time!"
+ERROR_KEYS="OpenAFS needs CONFIG_KEYS option enabled"
+
+QA_TEXTRELS_x86_fbsd="/boot/modules/libafs.ko"
+QA_TEXTRELS_amd64_fbsd="/boot/modules/libafs.ko"
+
+PATCHES=( "${WORKDIR}/gentoo/patches" )
+
+pkg_pretend() {
+ if use kernel_linux && kernel_is ge 4 14 ; then
+ ewarn "Gentoo supports kernels which are supported by OpenAFS"
+ ewarn "which are limited to the kernel versions: < 4.14"
+ ewarn ""
+ ewarn "You are free to utilize epatch_user to provide whatever"
+ ewarn "support you feel is appropriate, but will not receive"
+ ewarn "support as a result of those changes."
+ ewarn ""
+ ewarn "Please do not file a bug report about this."
+ fi
+}
+
+pkg_setup() {
+ if use kernel_linux; then
+ linux-mod_pkg_setup
+ fi
+}
+
+src_prepare() {
+ default
+
+ # packaging is f-ed up, so we can't run eautoreconf
+ # run autotools commands based on what is listed in regen.sh
+ eaclocal -I src/cf
+ eautoconf
+ eautoconf -o configure-libafs configure-libafs.ac
+ eautoheader
+ einfo "Deleting autom4te.cache directory"
+ rm -rf autom4te.cache
+}
+
+src_configure() {
+ local myconf=""
+ # OpenAFS 1.6.11 has a bug with kernels 3.17-3.17.2 that requires a config option
+ if use kernel_linux && kernel_is -ge 3 17 && kernel_is -le 3 17 2; then
+ myconf="--enable-linux-d_splice_alias-extra-iput"
+ fi
+
+ local ARCH="$(tc-arch-kernel)"
+ local MY_ARCH="$(tc-arch)"
+ local BSD_BUILD_DIR="/usr/src/sys/${MY_ARCH}/compile/GENERIC"
+
+ if use kernel_linux; then
+ myconf+=( --with-linux-kernel-headers="${KV_DIR}" \
+ --with-linux-kernel-build="${KV_OUT_DIR}"
+ )
+ elif use kernel_FreeBSD; then
+ myconf+=( --with-bsd-kernel-build="${BSD_BUILD_DIR}" )
+ fi
+ econf \
+ $(use_enable debug debug-kernel) \
+ "${myconf[@]}"
+}
+
+src_compile() {
+ ARCH="$(tc-arch-kernel)" AR="$(tc-getAR)" emake V=1 -j1 only_libafs
+}
+
+src_install() {
+ if use kernel_linux; then
+ local srcdir=$(expr "${S}"/src/libafs/MODLOAD-*)
+ [[ -f ${srcdir}/libafs.${KV_OBJ} ]] || die "Couldn't find compiled kernel module"
+
+ MODULE_NAMES="libafs(fs/openafs:${srcdir})"
+
+ linux-mod_src_install
+ elif use kernel_FreeBSD; then
+ insinto /boot/modules
+ doins "${S}"/src/libafs/MODLOAD/libafs.ko
+ fi
+}
+
+pkg_postinst() {
+ # Update linker.hints file
+ use kernel_FreeBSD && /usr/sbin/kldxref "${EPREFIX}/boot/modules"
+ use kernel_linux && linux-mod_pkg_postinst
+
+ if use kernel_linux; then
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 1.6.18.2 ${v}; then
+ ewarn "As of OpenAFS 1.6.18.2, Gentoo's packaging no longer requires"
+ ewarn "that CONFIG_DEBUG_RODATA be turned off in one's kernel config."
+ ewarn "If you only turned this option off for OpenAFS, please re-enable"
+ ewarn "it, as keeping it turned off is a security risk."
+ break
+ fi
+ done
+ fi
+}
+
+pkg_postrm() {
+ # Update linker.hints file
+ use kernel_FreeBSD && /usr/sbin/kldxref "${EPREFIX}/boot/modules"
+ use kernel_linux && linux-mod_pkg_postrm
+}
diff --git a/net-fs/openafs-legacy/Manifest b/net-fs/openafs-legacy/Manifest
new file mode 100644
index 000000000000..19c96f0e7793
--- /dev/null
+++ b/net-fs/openafs-legacy/Manifest
@@ -0,0 +1,4 @@
+EBUILD openafs-legacy-0.1.ebuild 1664 SHA256 d189cfe577e9ae3afb84b7ff08c4de1f2f6bbaaa849bcdcfaf9dbdfd180dc1da SHA512 cf234b6d1bdaec912e8e17114dc83966d9bc6a20b4f4fb79a121b6a144e3bda9eb28a17019ba667a6e5fbb2389434220d70be6a4354890b7b5a2eb3819a02e6e WHIRLPOOL c998939a4381f3390d8066e85ade44defa2b52fabac57e61b4853304b71f12d48b8c7f16934905bbf89678559e31a500fa5e4af203b8a472e5fd28b2010c6834
+MISC ChangeLog 2471 SHA256 000963ab8ba3551f9adf4483c1c8f2f9c6ec49516f0cad4b221ee93ad7252187 SHA512 ecbe8d24d73b210a438589f3d35227b0ea0fcbc3f1f3a01d1368ae37599c87178063a2253cef420c216a5866f9058ab48fdb9610cbb296c532f5d4d163321a65 WHIRLPOOL c169aba67e0fa0fef535ef6fe1d38c3928683752d215e474c3730669b4eba3b75d11855af59f417f2ae2c1238493dd7044dd8508535712760659895143d66cb7
+MISC ChangeLog-2015 2113 SHA256 572eb2cda14a2a7b46374319d93bfc34c353cd3f1906b0890c41350d6dbd7cfc SHA512 5ffae9041a00fba488921ec29c4623a63c0e0c1efe720d198431509e5a86ca87f547f86fcafe138b3a96a28f2ef6406180525dd7a22c28ef14af82d0722c9269 WHIRLPOOL 522a2eabfae9dcb4f0e0469694ad5975cba50c9cf74e1907c43548ec82f9e7d713e61b8acb07378f29735818de9ba1e627e47d8e2392f5a5c4aad52fc271afc1
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/net-fs/openafs-legacy/metadata.xml b/net-fs/openafs-legacy/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/net-fs/openafs-legacy/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/net-fs/openafs-legacy/openafs-legacy-0.1.ebuild b/net-fs/openafs-legacy/openafs-legacy-0.1.ebuild
new file mode 100644
index 000000000000..5ad939b711b2
--- /dev/null
+++ b/net-fs/openafs-legacy/openafs-legacy-0.1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="Legacy path symlinks to access FHS-compliant OpenAFS installation"
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="sys-apps/baselayout"
+RDEPEND="${DEPEND}"
+PDEPEND="net-fs/openafs"
+
+S="${WORKDIR}"
+
+# As a guide for these links, acinclude.m4 from the openafs package was
+# used. A README file exists as well, but at the time of writing, the
+# afsbosserver-variable was inaccurately described.
+
+src_install() {
+ # some basenames for FHS paths
+ sysconfdir=/etc
+ libexecdir=/usr/libexec
+ localstatedir=/var/lib
+ sbindir=/usr/sbin
+
+ # create parent directories for Transarc mode
+ dodir /usr/{vice,afs}
+
+ # viceetcdir
+ viceetcdir=${sysconfdir}/openafs
+ dosym ${viceetcdir} /usr/vice/etc
+
+ # afssrvdir
+ afssrvbindir=${libexecdir}/openafs
+ dosym ${afssrvbindir} /usr/afs/bin
+
+ # afsconfdir
+ afsconfdir=${sysconfdir}/openafs/server
+ dosym ${afsconfdir} /usr/afs/etc
+
+ # afslocaldir
+ afslocaldir=${localstatedir}/openafs
+ dosym ${afslocaldir} /usr/afs/local
+
+ # afsdbdir
+ afsdbdir=${localstatedir}/openafs/db
+ dosym ${afsdbdir} /usr/afs/db
+
+ # afslogdir
+ afslogdir=${localstatedir}/openafs/logs
+ dosym ${afslogdir} /usr/afs/logs
+
+ # afsbosconfig
+ dodir ${afslocaldir}
+ dosym ${viceetcdir}/BosConfig ${afslocaldir}/BosConfig
+
+ # afsbosserver
+ dodir ${afssrvbindir}
+ dosym ${sbindir}/bosserver ${afssrvbindir}/bosserver
+}
+
+pkg_prerm() {
+ ewarn "It is recommended to remove this package AFTER removing openafs"
+ ewarn "This way there will be no dead links left lying around"
+}
diff --git a/net-fs/openafs/Manifest b/net-fs/openafs/Manifest
new file mode 100644
index 000000000000..dc8a20734155
--- /dev/null
+++ b/net-fs/openafs/Manifest
@@ -0,0 +1,17 @@
+DIST openafs-1.6.20.1-doc.tar.bz2 3533007 SHA256 2c4bf6f53030e8a9cf3460d9c9292bcdbfea356930ed1d436506e8dc60db0f1c SHA512 53d36ae28ce303fd397635f888ba5e7b1a74967072919bab44dc68858881e6b0586b1e2339dcfdfe1de3bf69591077e4c09ad0c0444eb1a1557a71b39b793da4 WHIRLPOOL 39e50d9af1acda7be5f508392eceac2caf6b13d03e825719d09de539d9080386ff82b3a0f5e8c489f3e0c2e9051a08623baa3176be61816a154ad734dcd03644
+DIST openafs-1.6.20.1-src.tar.bz2 14672548 SHA256 dc869eecf6c81949d3dd2021eaf87118ef9b90ec5012a35f64836a02a58a8826 SHA512 cd6a0cd5d48fffaf37d143a9f8f7cd84c78ada6a645ac1a6cd3cf5b4a8a5af602e84133506c797e62ef2e61180a1c89915ea8657ac95bb872ada018b1baf0d59 WHIRLPOOL e289125306024b5a4d651017f35c0b2a91cadfeecf5820298e5ecccebf8c94a8126f7b70c120a687c5edfc4ad769ecfe72f9597173c34fb0dec6e13a7619cf4c
+DIST openafs-1.6.20.2-doc.tar.bz2 3531309 SHA256 ec19f00594d8dd0b201aa8a2799ccab54994d8ca4ce621f843d8c4c2283f4259 SHA512 ff22960ce35e459acb04ca22a247d8199f81061498e0c4c3b83090200561199e1ae80152ab5c6b148983978ffed730c9efad8346bce289a6c5128d17510db772 WHIRLPOOL b3b3bfc23342fadb1f5baf72df0f716f0ec498f6521eb8e37f9a113dc14c6d3cf74c95c0f07141396eeb3e26f539d6aa7efe5fa2b609739cbabbd1152a618a53
+DIST openafs-1.6.20.2-src.tar.bz2 14676861 SHA256 50234820c3da9752d2ca05fb7e83b7dc5c96a0e96a0b875ebc7ae3c835607614 SHA512 74c50fa71a98e7ad8bfed0610ab1dbf5c6669cdbd1e240c7b155f345fc511d9e51b4d9caa8d235223ad929b711577a192ca0841c92279bf16991cace8f19a575 WHIRLPOOL af213b7bb94962dcf76d22cf2078c8cc02d435a22a26f14ca7113d3eafb4304823b9806ff4121e5c0ab4f9f4f665eed0910c08dd41f3f2de136e8818f7ed2b1e
+DIST openafs-1.6.21-doc.tar.bz2 3532948 SHA256 5bc07340fc6b6db12e92f88a33c70478d22c93de7ae1725c4b25ef43caac6e8c SHA512 37ee9a140e9f34145a020ee2ba06c8635a27c3329836dc379af2fcda9928182637b4ab3da303b4a54d8dde6df463e50481b9a970b1d07d180a78f8a9e46e0d96 WHIRLPOOL fbe089e6ec88babfb9865917a64cf711f952be20dc0079c4e31327bf7a0d2ee1ab10c77a531297a366402df6c5994411f1ae3ed99ea966feb64c5341e5d695bd
+DIST openafs-1.6.21-src.tar.bz2 14682997 SHA256 ba9c1f615edd53b64fc271ad369c49a816acedca70cdd090975033469a84118f SHA512 451c38ed5031b8a962da3276bf5d0f1b74c5956c2d10cdb8bbd22ea633880ebf35cf5fc71feb5d2eca4306762f6c2376a46f4522150291acfc469f8be2da757f WHIRLPOOL a643735720d8ab486fc32f0f21a1340792879e0648d0ffa72bfe7a10a4659f5c0f986d4b918bfc7810c2fe4fa0762a0c727c7fd8de5c179b14bdbdb56664c607
+DIST openafs-1.6.21.1-doc.tar.bz2 3532980 SHA256 a8b2482eaa3bd5a3521b8dfde69337e5e01b1b1626c0a2e0a489049834a2983a SHA512 97236d45153dd8f487caad2e5fff382dc63dd3c75270f58c8afd47145176255d1c7b454b366118543a168951066fd721c7dce506e123adf57d3db939129e6356 WHIRLPOOL 6a72623508a01f9cb8fd5ec33a7a407a3c813e24756ed88e45edf0cc9503135ac85a6fc78257d5ea91bdfa4cce4dd25b9a38a5a463a901bd665c1da85830a5be
+DIST openafs-1.6.21.1-src.tar.bz2 14679991 SHA256 aed896b0f598e3033e9ceb2a1eae24addff9ec0bb2d713ab63945a449ded3a5a SHA512 a8c496657a59ee00411717aac8b6c4ca64f7ffeef400ae84ff902c8b2d81d19a367f78fbe105512ec7ec7181e8b0158fc359565eb99e2beb39d6a93ed1b28f98 WHIRLPOOL 57919d0babfee0aca6659e0e036437b9f0d01d8798bdaf51200798dd47d08b706a078bdff055f0ac0f85cb4ee7cf3adc239feaf9bec19dfb268984b9fd47faca
+DIST openafs-patches-20170212.tar.xz 11008 SHA256 9e20ca0ce0af6178ba39e459e88ecf3da8e6d97947a8b77a65f3cb0e523f6b47 SHA512 13e525a3f612b43318ad2fefaa3edf15ad572153494e94826815400f90a253678d2ade44d6adae08b1cb0dc8f311f5407f5aa540ed0df7a2d2d6024695bd917f WHIRLPOOL 4f81b94ad5ae7aab8ab954a333aa5cf72692cf91784b441b16e55fd023e58b7fe575b0228073fbacb9036cd4a7bfccd7553795457872973d15bbe48b95ac4484
+DIST openafs-patches-20170822.tar.xz 11036 SHA256 970324fc50ee48bc6aa06bbe448c0aac5a398c38e196155924b85dc8ed36e649 SHA512 f4b574287bfe54881a70f3ccd4d4901b2f8f9ecbec7b3a4975b59050d5ef27c6de3da25f820b7b2b10f1a38034bb28e5c01ee094fb38cae80e244eeb04b29d0a WHIRLPOOL d9485c1d08f2346218cf1285d02ac5097bc283d4648ba9203d861162c259fa74ff749acb455e62eaa38a717cf253ed221c11f3ad0339600496b7da4929419e50
+EBUILD openafs-1.6.20.1.ebuild 7024 SHA256 a08327b1a4f4f3bce68cff9ea0df39ba46d8c7b13f560f98185ac03a02d7845e SHA512 32b95ec66b6eaf1e5c796e1f9d2b37822abfb760842f6d8d5ce44478f1938cd47c51ec190eaadab4d65025bafba35da63366935f8def30de23d35bc356e77d2e WHIRLPOOL ae547976f7eefa64ab61bcf8b489c955e21c4700adfbc1808a1c7a7f0eb60ff36ed6cef2c8b9e34f20de7dced1c8de48eaeee3cc379dffd536967f3e68ed872e
+EBUILD openafs-1.6.20.2-r1.ebuild 7027 SHA256 1664bc9de1fb556b7bc69629a7922352324e0d69bcec859723de9d138147b844 SHA512 bb058ead9fc46b8cfe19eaeff73bc1fe213e11ccfb0bb837753b3748810d72963925bcbdcf1c1311aef4992cbfe422d14a652273c5524bb4276b2969817a032a WHIRLPOOL b3e3a394d1ba94c14632971c716128bb051cfab5aaaf6a82467b9fc83ce020fbe69563082c5651f4ddc81333156a820a4c4df06dc679c1ec2876b8b513fc87c5
+EBUILD openafs-1.6.21-r1.ebuild 7025 SHA256 f2055c91f76ba796e84c1ffaa296342789ac4e574b60ddf19f07b3259a3b1060 SHA512 b635c9e39e1034f35ccf90e843ca8e61122e8a6692fe9a7074b0a16ad738c5160886209bcf362a3bbee673506395e3eefa95e70e3db82e662788eba22e4fd176 WHIRLPOOL ef021d51a37a8bef9f10a6f023e5f17129a19fadfb57356f64ea747ff2aab5ac5a5a2dfa8050aa37ec33284502beed1b4bfbe7d570e092991853af58bf4bbe8d
+EBUILD openafs-1.6.21.1.ebuild 7027 SHA256 1664bc9de1fb556b7bc69629a7922352324e0d69bcec859723de9d138147b844 SHA512 bb058ead9fc46b8cfe19eaeff73bc1fe213e11ccfb0bb837753b3748810d72963925bcbdcf1c1311aef4992cbfe422d14a652273c5524bb4276b2969817a032a WHIRLPOOL b3e3a394d1ba94c14632971c716128bb051cfab5aaaf6a82467b9fc83ce020fbe69563082c5651f4ddc81333156a820a4c4df06dc679c1ec2876b8b513fc87c5
+MISC ChangeLog 9965 SHA256 33525babae1c3e7bce50868fc94442bb1d58d2e3032a8824626bca8645010e2a SHA512 a67aef521490207fad6daec3d80082108198757fc2602c73451a66dd7429bf253cbe9060b1a67ea50a6a12697a42cc369ab05f87b6586c069c02f320f2c121fc WHIRLPOOL dc0dd5452e5bf6ddff75c954d67720f1c881ef4f81f844b607924971a427f415d6eb3cab72a0d5755b219ed110b4b88a076e64f79d226983b4cb442324e20668
+MISC ChangeLog-2015 33669 SHA256 3539de64902e3aac237f7fe68420761eaf5d75c6461ed517e8c00542f2b0ec5c SHA512 17a9562f2503cc0aded229cd52fd5d398516fd42e25c891c350356211862fa2bf05f8650617d46688578b6ba9f468b76a7e30e54565c6f804586404703aa7d7a WHIRLPOOL 32eebb47cbfa97526c3a1b2197c492476d83e1f366b8ff799460a865eddbe180cf69d896cfd5cbef567c2e8e8520a8e5491a73ec713ba4b2daa901e6f7fe4890
+MISC metadata.xml 895 SHA256 d28acb20b11582bf152c2abe2464fa8e2defca8b7dd5ce433c7fcb6660685fea SHA512 5117449a47343db76f8d88a91beb18a2aade828fcbef6133f2307225b8160418fa407faaa550728d8916a5ff06e610198ccdb6fec1f975e7cc892a38fc590534 WHIRLPOOL cc9459daf0be99c19abac29d369974ab891437f4992d5e6212102d3bbae1870090cd71a141ace06e65e657e3cbc0c7397079063670bbc0142670e39f5d460941
diff --git a/net-fs/openafs/metadata.xml b/net-fs/openafs/metadata.xml
new file mode 100644
index 000000000000..82ce0265d313
--- /dev/null
+++ b/net-fs/openafs/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>NP-Hardass@gentoo.org</email>
+ <description>please assign bugs to</description>
+</maintainer>
+<maintainer type="person">
+ <email>bircoph@gentoo.org</email>
+ <name>Andrew Savchenko</name>
+ <description>please CC on bugs</description>
+</maintainer>
+<use>
+ <flag name="bitmap-later">Enable fast startup of file server by
+ not reading bitmap till needed.</flag>
+ <flag name="fuse">Build fuse client.</flag>
+ <flag name="modules">Build libafs kernel module. Disable only if you know
+ what you're doing: without this module OpenAFS client will not work.</flag>
+ <flag name="pthreaded-ubik">Enable installation of pthreaded ubik applications.</flag>
+ <flag name="supergroups">Enable support for nested pts groups.</flag>
+</use>
+</pkgmetadata>
diff --git a/net-fs/openafs/openafs-1.6.20.1.ebuild b/net-fs/openafs/openafs-1.6.20.1.ebuild
new file mode 100644
index 000000000000..37fc178aa241
--- /dev/null
+++ b/net-fs/openafs/openafs-1.6.20.1.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools eutils flag-o-matic multilib pam systemd toolchain-funcs versionator
+
+MY_PV=$(delete_version_separator '_')
+MY_P="${PN}-${MY_PV}"
+PVER="20170212"
+
+DESCRIPTION="The OpenAFS distributed file system"
+HOMEPAGE="https://www.openafs.org/"
+# We always d/l the doc tarball as man pages are not USE=doc material
+[[ ${PV} == *_pre* ]] && MY_PRE="candidate/" || MY_PRE=""
+SRC_URI="
+ https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2
+ https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-doc.tar.bz2
+ https://dev.gentoo.org/~bircoph/afs/${PN}-patches-${PVER}.tar.xz
+"
+
+LICENSE="IBM BSD openafs-krb5-a APSL-2"
+SLOT="0"
+KEYWORDS="amd64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+
+IUSE="bitmap-later debug doc fuse kerberos +modules ncurses pam pthreaded-ubik +supergroups"
+
+CDEPEND="
+ virtual/libintl
+ fuse? ( sys-fs/fuse )
+ kerberos? ( virtual/krb5 )
+ ncurses? ( sys-libs/ncurses:0= )
+ pam? ( virtual/pam )"
+
+DEPEND="${CDEPEND}
+ virtual/yacc
+ doc? (
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ )"
+
+RDEPEND="${CDEPEND}
+ modules? ( ~net-fs/openafs-kernel-${PV} )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=( "${WORKDIR}/gentoo/patches" )
+
+src_prepare() {
+ default
+
+ # fixing 2-nd level makefiles to honor flags
+ sed -i -r 's/\<CFLAGS[[:space:]]*=/CFLAGS+=/; s/\<LDFLAGS[[:space:]]*=/LDFLAGS+=/' \
+ src/*/Makefile.in || die '*/Makefile.in sed failed'
+
+ # packaging is f-ed up, so we can't run eautoreconf
+ # run autotools commands based on what is listed in regen.sh
+ eaclocal -I src/cf
+ eautoconf
+ eautoconf -o configure-libafs configure-libafs.ac
+ eautoheader
+ einfo "Deleting autom4te.cache directory"
+ rm -rf autom4te.cache
+}
+
+src_configure() {
+ local myconf
+ use debug && use pam && myconf="--enable-debug-pam"
+
+ AFS_SYSKVERS=26 \
+ econf \
+ --disable-kernel-module \
+ --disable-strip-binaries \
+ $(use_enable bitmap-later) \
+ $(use_enable debug) \
+ $(use_enable debug debug-lwp) \
+ $(use_enable fuse fuse-client) \
+ $(use_enable ncurses gtx) \
+ $(use_enable pam) \
+ $(use_enable pthreaded-ubik) \
+ $(use_enable supergroups) \
+ $(use_with doc html-xsl /usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl) \
+ $(use_with kerberos krb5) \
+ "${myconf}"
+}
+
+src_compile() {
+ emake all_nolibafs
+ local d
+ if use doc; then
+ for d in doc/xml/{AdminGuide,QuickStartUnix,UserGuide}; do
+ emake -C "${d}" html;
+ done
+ fi
+}
+
+src_install() {
+ local OPENRCDIR="${WORKDIR}/gentoo/openrc"
+ local SYSTEMDDIR="${WORKDIR}/gentoo/systemd"
+
+ emake DESTDIR="${ED}" install_nolibafs
+
+ insinto /etc/openafs
+ doins src/afsd/CellServDB
+ echo "/afs:/var/cache/openafs:200000" > "${ED}"/etc/openafs/cacheinfo
+ echo "openafs.org" > "${ED}"/etc/openafs/ThisCell
+
+ # pam_afs and pam_afs.krb have been installed in irregular locations, fix
+ if use pam ; then
+ dopammod "${ED}"/usr/$(get_libdir)/pam_afs*
+ fi
+ rm -f "${ED}"/usr/$(get_libdir)/pam_afs* || die
+
+ # remove kdump stuff provided by kexec-tools #222455
+ rm -rf "${ED}"/usr/sbin/kdump*
+
+ # avoid collision with mit_krb5's version of kpasswd
+ mv "${ED}"/usr/bin/kpasswd{,_afs} || die
+ mv "${ED}"/usr/share/man/man1/kpasswd{,_afs}.1 || die
+
+ # move lwp stuff around #200674 #330061
+ mv "${ED}"/usr/include/{lwp,lock,timer}.h "${ED}"/usr/include/afs/ || die
+ mv "${ED}"/usr/$(get_libdir)/liblwp* "${ED}"/usr/$(get_libdir)/afs/ || die
+ # update paths to the relocated lwp headers
+ sed -ri \
+ -e '/^#include <(lwp|lock|timer).h>/s:<([^>]*)>:<afs/\1>:' \
+ "${ED}"/usr/include/*.h \
+ "${ED}"/usr/include/*/*.h \
+ || die
+
+ # minimal documentation
+ use pam && doman src/pam/pam_afs.5
+ DOCS=( "${WORKDIR}/gentoo/README.Gentoo"
+ src/afsd/CellServDB NEWS README )
+
+ # documentation package
+ if use doc ; then
+ DOCS+=( doc/{arch,examples,pdf,protocol,txt} )
+ dohtml -r doc/xml/
+ fi
+
+ einstalldocs
+
+ # Gentoo related scripts
+ newinitd "${OPENRCDIR}"/openafs-client.initd openafs-client
+ newconfd "${OPENRCDIR}"/openafs-client.confd openafs-client
+ newinitd "${OPENRCDIR}"/openafs-server.initd openafs-server
+ newconfd "${OPENRCDIR}"/openafs-server.confd openafs-server
+ systemd_dotmpfilesd "${SYSTEMDDIR}"/tmpfiles.d/openafs-client.conf
+ systemd_dounit "${SYSTEMDDIR}"/openafs-client.service
+ systemd_dounit "${SYSTEMDDIR}"/openafs-server.service
+ systemd_install_serviced "${SYSTEMDDIR}"/openafs-client.service.conf
+ systemd_install_serviced "${SYSTEMDDIR}"/openafs-server.service.conf
+
+ # used directories: client
+ keepdir /etc/openafs
+
+ # used directories: server
+ keepdir /etc/openafs/server
+ diropts -m0700
+ keepdir /var/lib/openafs
+ keepdir /var/lib/openafs/db
+ diropts -m0755
+ keepdir /var/lib/openafs/logs
+
+ # link logfiles to /var/log
+ dosym ../lib/openafs/logs /var/log/openafs
+}
+
+pkg_preinst() {
+ ## Somewhat intelligently install default configuration files
+ ## (when they are not present)
+ local x
+ for x in cacheinfo CellServDB ThisCell ; do
+ if [ -e "${EROOT}"/etc/openafs/${x} ] ; then
+ cp "${EROOT}"/etc/openafs/${x} "${ED}"/etc/openafs/
+ fi
+ done
+}
+
+pkg_postinst() {
+ elog "This installation should work out of the box (at least the"
+ elog "client part doing global afs-cell browsing, unless you had"
+ elog "a previous and different configuration). If you want to"
+ elog "set up your own cell or modify the standard config,"
+ elog "please have a look at the Gentoo OpenAFS documentation"
+ elog "(warning: it is not yet up to date wrt the new file locations)"
+ elog
+ elog "The documentation can be found at:"
+ elog " https://wiki.gentoo.org/wiki/OpenAFS"
+ elog
+ elog "Systemd users should run emerge --config ${CATEGORY}/${PN} before"
+ elog "first use and whenever ${EROOT}/etc/openafs/cacheinfo is edited."
+}
+
+pkg_config() {
+ elog "Setting cache options for systemd."
+
+ SERVICED_FILE="${EROOT}"/etc/systemd/system/openafs-client.service.d/00gentoo.conf
+ [ ! -e "${SERVICED_FILE}" ] && die "Systemd service.d file ${SERVICED_FILE} not found."
+
+ CACHESIZE=$(cut -d ':' -f 3 "${EROOT}"/etc/openafs/cacheinfo)
+ [ -z ${CACHESIZE} ] && die "Failed to parse ${EROOT}/etc/openafs/cacheinfo."
+
+ if [ ${CACHESIZE} -lt 131070 ]; then
+ AFSD_CACHE_ARGS="-stat 300 -dcache 100 -daemons 2 -volumes 50"
+ elif [ ${CACHESIZE} -lt 524288 ]; then
+ AFSD_CACHE_ARGS="-stat 2000 -dcache 800 -daemons 3 -volumes 70"
+ elif [ ${CACHESIZE} -lt 1048576 ]; then
+ AFSD_CACHE_ARGS="-stat 2800 -dcache 2400 -daemons 5 -volumes 128"
+ elif [ ${CACHESIZE} -lt 2209715 ]; then
+ AFSD_CACHE_ARGS="-stat 3600 -dcache 3600 -daemons 5 -volumes 196 -files 50000"
+ else
+ AFSD_CACHE_ARGS="-stat 4000 -dcache 4000 -daemons 6 -volumes 256 -files 50000"
+ fi
+
+ # Replace existing env var if exists, else append line
+ grep -q "^Environment=\"AFSD_CACHE_ARGS=" "${SERVICED_FILE}" && \
+ sed -i "s/^Environment=\"AFSD_CACHE_ARGS=.*/Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"/" "${SERVICED_FILE}" || \
+ sed -i "$ a\Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"" "${SERVICED_FILE}" || \
+ die "Updating ${SERVICED_FILE} failed."
+}
diff --git a/net-fs/openafs/openafs-1.6.20.2-r1.ebuild b/net-fs/openafs/openafs-1.6.20.2-r1.ebuild
new file mode 100644
index 000000000000..4ecf063fc89f
--- /dev/null
+++ b/net-fs/openafs/openafs-1.6.20.2-r1.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools eutils flag-o-matic multilib pam systemd toolchain-funcs versionator
+
+MY_PV=$(delete_version_separator '_')
+MY_P="${PN}-${MY_PV}"
+PVER="20170822"
+
+DESCRIPTION="The OpenAFS distributed file system"
+HOMEPAGE="https://www.openafs.org/"
+# We always d/l the doc tarball as man pages are not USE=doc material
+[[ ${PV} == *_pre* ]] && MY_PRE="candidate/" || MY_PRE=""
+SRC_URI="
+ https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2
+ https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-doc.tar.bz2
+ https://dev.gentoo.org/~bircoph/afs/${PN}-patches-${PVER}.tar.xz
+"
+
+LICENSE="IBM BSD openafs-krb5-a APSL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+
+IUSE="bitmap-later debug doc fuse kerberos +modules ncurses pam pthreaded-ubik +supergroups"
+
+CDEPEND="
+ virtual/libintl
+ fuse? ( sys-fs/fuse )
+ kerberos? ( virtual/krb5 )
+ ncurses? ( sys-libs/ncurses:0= )
+ pam? ( virtual/pam )"
+
+DEPEND="${CDEPEND}
+ virtual/yacc
+ doc? (
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ )"
+
+RDEPEND="${CDEPEND}
+ modules? ( ~net-fs/openafs-kernel-${PV} )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=( "${WORKDIR}/gentoo/patches" )
+
+src_prepare() {
+ default
+
+ # fixing 2-nd level makefiles to honor flags
+ sed -i -r 's/\<CFLAGS[[:space:]]*=/CFLAGS+=/; s/\<LDFLAGS[[:space:]]*=/LDFLAGS+=/' \
+ src/*/Makefile.in || die '*/Makefile.in sed failed'
+
+ # packaging is f-ed up, so we can't run eautoreconf
+ # run autotools commands based on what is listed in regen.sh
+ eaclocal -I src/cf
+ eautoconf
+ eautoconf -o configure-libafs configure-libafs.ac
+ eautoheader
+ einfo "Deleting autom4te.cache directory"
+ rm -rf autom4te.cache
+}
+
+src_configure() {
+ local myconf
+ use debug && use pam && myconf="--enable-debug-pam"
+
+ AFS_SYSKVERS=26 \
+ econf \
+ --disable-kernel-module \
+ --disable-strip-binaries \
+ $(use_enable bitmap-later) \
+ $(use_enable debug) \
+ $(use_enable debug debug-lwp) \
+ $(use_enable fuse fuse-client) \
+ $(use_enable ncurses gtx) \
+ $(use_enable pam) \
+ $(use_enable pthreaded-ubik) \
+ $(use_enable supergroups) \
+ $(use_with doc html-xsl /usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl) \
+ $(use_with kerberos krb5) \
+ "${myconf}"
+}
+
+src_compile() {
+ emake all_nolibafs
+ local d
+ if use doc; then
+ for d in doc/xml/{AdminGuide,QuickStartUnix,UserGuide}; do
+ emake -C "${d}" html;
+ done
+ fi
+}
+
+src_install() {
+ local OPENRCDIR="${WORKDIR}/gentoo/openrc"
+ local SYSTEMDDIR="${WORKDIR}/gentoo/systemd"
+
+ emake DESTDIR="${ED}" install_nolibafs
+
+ insinto /etc/openafs
+ doins src/afsd/CellServDB
+ echo "/afs:/var/cache/openafs:200000" > "${ED}"/etc/openafs/cacheinfo
+ echo "openafs.org" > "${ED}"/etc/openafs/ThisCell
+
+ # pam_afs and pam_afs.krb have been installed in irregular locations, fix
+ if use pam ; then
+ dopammod "${ED}"/usr/$(get_libdir)/pam_afs*
+ fi
+ rm -f "${ED}"/usr/$(get_libdir)/pam_afs* || die
+
+ # remove kdump stuff provided by kexec-tools #222455
+ rm -rf "${ED}"/usr/sbin/kdump*
+
+ # avoid collision with mit_krb5's version of kpasswd
+ mv "${ED}"/usr/bin/kpasswd{,_afs} || die
+ mv "${ED}"/usr/share/man/man1/kpasswd{,_afs}.1 || die
+
+ # move lwp stuff around #200674 #330061
+ mv "${ED}"/usr/include/{lwp,lock,timer}.h "${ED}"/usr/include/afs/ || die
+ mv "${ED}"/usr/$(get_libdir)/liblwp* "${ED}"/usr/$(get_libdir)/afs/ || die
+ # update paths to the relocated lwp headers
+ sed -ri \
+ -e '/^#include <(lwp|lock|timer).h>/s:<([^>]*)>:<afs/\1>:' \
+ "${ED}"/usr/include/*.h \
+ "${ED}"/usr/include/*/*.h \
+ || die
+
+ # minimal documentation
+ use pam && doman src/pam/pam_afs.5
+ DOCS=( "${WORKDIR}/gentoo/README.Gentoo"
+ src/afsd/CellServDB NEWS README )
+
+ # documentation package
+ if use doc ; then
+ DOCS+=( doc/{arch,examples,pdf,protocol,txt} )
+ dohtml -r doc/xml/
+ fi
+
+ einstalldocs
+
+ # Gentoo related scripts
+ newinitd "${OPENRCDIR}"/openafs-client.initd openafs-client
+ newconfd "${OPENRCDIR}"/openafs-client.confd openafs-client
+ newinitd "${OPENRCDIR}"/openafs-server.initd openafs-server
+ newconfd "${OPENRCDIR}"/openafs-server.confd openafs-server
+ systemd_dotmpfilesd "${SYSTEMDDIR}"/tmpfiles.d/openafs-client.conf
+ systemd_dounit "${SYSTEMDDIR}"/openafs-client.service
+ systemd_dounit "${SYSTEMDDIR}"/openafs-server.service
+ systemd_install_serviced "${SYSTEMDDIR}"/openafs-client.service.conf
+ systemd_install_serviced "${SYSTEMDDIR}"/openafs-server.service.conf
+
+ # used directories: client
+ keepdir /etc/openafs
+
+ # used directories: server
+ keepdir /etc/openafs/server
+ diropts -m0700
+ keepdir /var/lib/openafs
+ keepdir /var/lib/openafs/db
+ diropts -m0755
+ keepdir /var/lib/openafs/logs
+
+ # link logfiles to /var/log
+ dosym ../lib/openafs/logs /var/log/openafs
+}
+
+pkg_preinst() {
+ ## Somewhat intelligently install default configuration files
+ ## (when they are not present)
+ local x
+ for x in cacheinfo CellServDB ThisCell ; do
+ if [ -e "${EROOT}"/etc/openafs/${x} ] ; then
+ cp "${EROOT}"/etc/openafs/${x} "${ED}"/etc/openafs/
+ fi
+ done
+}
+
+pkg_postinst() {
+ elog "This installation should work out of the box (at least the"
+ elog "client part doing global afs-cell browsing, unless you had"
+ elog "a previous and different configuration). If you want to"
+ elog "set up your own cell or modify the standard config,"
+ elog "please have a look at the Gentoo OpenAFS documentation"
+ elog "(warning: it is not yet up to date wrt the new file locations)"
+ elog
+ elog "The documentation can be found at:"
+ elog " https://wiki.gentoo.org/wiki/OpenAFS"
+ elog
+ elog "Systemd users should run emerge --config ${CATEGORY}/${PN} before"
+ elog "first use and whenever ${EROOT}/etc/openafs/cacheinfo is edited."
+}
+
+pkg_config() {
+ elog "Setting cache options for systemd."
+
+ SERVICED_FILE="${EROOT}"/etc/systemd/system/openafs-client.service.d/00gentoo.conf
+ [ ! -e "${SERVICED_FILE}" ] && die "Systemd service.d file ${SERVICED_FILE} not found."
+
+ CACHESIZE=$(cut -d ':' -f 3 "${EROOT}"/etc/openafs/cacheinfo)
+ [ -z ${CACHESIZE} ] && die "Failed to parse ${EROOT}/etc/openafs/cacheinfo."
+
+ if [ ${CACHESIZE} -lt 131070 ]; then
+ AFSD_CACHE_ARGS="-stat 300 -dcache 100 -daemons 2 -volumes 50"
+ elif [ ${CACHESIZE} -lt 524288 ]; then
+ AFSD_CACHE_ARGS="-stat 2000 -dcache 800 -daemons 3 -volumes 70"
+ elif [ ${CACHESIZE} -lt 1048576 ]; then
+ AFSD_CACHE_ARGS="-stat 2800 -dcache 2400 -daemons 5 -volumes 128"
+ elif [ ${CACHESIZE} -lt 2209715 ]; then
+ AFSD_CACHE_ARGS="-stat 3600 -dcache 3600 -daemons 5 -volumes 196 -files 50000"
+ else
+ AFSD_CACHE_ARGS="-stat 4000 -dcache 4000 -daemons 6 -volumes 256 -files 50000"
+ fi
+
+ # Replace existing env var if exists, else append line
+ grep -q "^Environment=\"AFSD_CACHE_ARGS=" "${SERVICED_FILE}" && \
+ sed -i "s/^Environment=\"AFSD_CACHE_ARGS=.*/Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"/" "${SERVICED_FILE}" || \
+ sed -i "$ a\Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"" "${SERVICED_FILE}" || \
+ die "Updating ${SERVICED_FILE} failed."
+}
diff --git a/net-fs/openafs/openafs-1.6.21-r1.ebuild b/net-fs/openafs/openafs-1.6.21-r1.ebuild
new file mode 100644
index 000000000000..3c3aa6efbac9
--- /dev/null
+++ b/net-fs/openafs/openafs-1.6.21-r1.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools eutils flag-o-matic multilib pam systemd toolchain-funcs versionator
+
+MY_PV=$(delete_version_separator '_')
+MY_P="${PN}-${MY_PV}"
+PVER="20170822"
+
+DESCRIPTION="The OpenAFS distributed file system"
+HOMEPAGE="https://www.openafs.org/"
+# We always d/l the doc tarball as man pages are not USE=doc material
+[[ ${PV} == *_pre* ]] && MY_PRE="candidate/" || MY_PRE=""
+SRC_URI="
+ https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2
+ https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-doc.tar.bz2
+ https://dev.gentoo.org/~bircoph/afs/${PN}-patches-${PVER}.tar.xz
+"
+
+LICENSE="IBM BSD openafs-krb5-a APSL-2"
+SLOT="0"
+KEYWORDS="amd64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+
+IUSE="bitmap-later debug doc fuse kerberos +modules ncurses pam pthreaded-ubik +supergroups"
+
+CDEPEND="
+ virtual/libintl
+ fuse? ( sys-fs/fuse )
+ kerberos? ( virtual/krb5 )
+ ncurses? ( sys-libs/ncurses:0= )
+ pam? ( virtual/pam )"
+
+DEPEND="${CDEPEND}
+ virtual/yacc
+ doc? (
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ )"
+
+RDEPEND="${CDEPEND}
+ modules? ( ~net-fs/openafs-kernel-${PV} )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=( "${WORKDIR}/gentoo/patches" )
+
+src_prepare() {
+ default
+
+ # fixing 2-nd level makefiles to honor flags
+ sed -i -r 's/\<CFLAGS[[:space:]]*=/CFLAGS+=/; s/\<LDFLAGS[[:space:]]*=/LDFLAGS+=/' \
+ src/*/Makefile.in || die '*/Makefile.in sed failed'
+
+ # packaging is f-ed up, so we can't run eautoreconf
+ # run autotools commands based on what is listed in regen.sh
+ eaclocal -I src/cf
+ eautoconf
+ eautoconf -o configure-libafs configure-libafs.ac
+ eautoheader
+ einfo "Deleting autom4te.cache directory"
+ rm -rf autom4te.cache
+}
+
+src_configure() {
+ local myconf
+ use debug && use pam && myconf="--enable-debug-pam"
+
+ AFS_SYSKVERS=26 \
+ econf \
+ --disable-kernel-module \
+ --disable-strip-binaries \
+ $(use_enable bitmap-later) \
+ $(use_enable debug) \
+ $(use_enable debug debug-lwp) \
+ $(use_enable fuse fuse-client) \
+ $(use_enable ncurses gtx) \
+ $(use_enable pam) \
+ $(use_enable pthreaded-ubik) \
+ $(use_enable supergroups) \
+ $(use_with doc html-xsl /usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl) \
+ $(use_with kerberos krb5) \
+ "${myconf}"
+}
+
+src_compile() {
+ emake all_nolibafs
+ local d
+ if use doc; then
+ for d in doc/xml/{AdminGuide,QuickStartUnix,UserGuide}; do
+ emake -C "${d}" html;
+ done
+ fi
+}
+
+src_install() {
+ local OPENRCDIR="${WORKDIR}/gentoo/openrc"
+ local SYSTEMDDIR="${WORKDIR}/gentoo/systemd"
+
+ emake DESTDIR="${ED}" install_nolibafs
+
+ insinto /etc/openafs
+ doins src/afsd/CellServDB
+ echo "/afs:/var/cache/openafs:200000" > "${ED}"/etc/openafs/cacheinfo
+ echo "openafs.org" > "${ED}"/etc/openafs/ThisCell
+
+ # pam_afs and pam_afs.krb have been installed in irregular locations, fix
+ if use pam ; then
+ dopammod "${ED}"/usr/$(get_libdir)/pam_afs*
+ fi
+ rm -f "${ED}"/usr/$(get_libdir)/pam_afs* || die
+
+ # remove kdump stuff provided by kexec-tools #222455
+ rm -rf "${ED}"/usr/sbin/kdump*
+
+ # avoid collision with mit_krb5's version of kpasswd
+ mv "${ED}"/usr/bin/kpasswd{,_afs} || die
+ mv "${ED}"/usr/share/man/man1/kpasswd{,_afs}.1 || die
+
+ # move lwp stuff around #200674 #330061
+ mv "${ED}"/usr/include/{lwp,lock,timer}.h "${ED}"/usr/include/afs/ || die
+ mv "${ED}"/usr/$(get_libdir)/liblwp* "${ED}"/usr/$(get_libdir)/afs/ || die
+ # update paths to the relocated lwp headers
+ sed -ri \
+ -e '/^#include <(lwp|lock|timer).h>/s:<([^>]*)>:<afs/\1>:' \
+ "${ED}"/usr/include/*.h \
+ "${ED}"/usr/include/*/*.h \
+ || die
+
+ # minimal documentation
+ use pam && doman src/pam/pam_afs.5
+ DOCS=( "${WORKDIR}/gentoo/README.Gentoo"
+ src/afsd/CellServDB NEWS README )
+
+ # documentation package
+ if use doc ; then
+ DOCS+=( doc/{arch,examples,pdf,protocol,txt} )
+ dohtml -r doc/xml/
+ fi
+
+ einstalldocs
+
+ # Gentoo related scripts
+ newinitd "${OPENRCDIR}"/openafs-client.initd openafs-client
+ newconfd "${OPENRCDIR}"/openafs-client.confd openafs-client
+ newinitd "${OPENRCDIR}"/openafs-server.initd openafs-server
+ newconfd "${OPENRCDIR}"/openafs-server.confd openafs-server
+ systemd_dotmpfilesd "${SYSTEMDDIR}"/tmpfiles.d/openafs-client.conf
+ systemd_dounit "${SYSTEMDDIR}"/openafs-client.service
+ systemd_dounit "${SYSTEMDDIR}"/openafs-server.service
+ systemd_install_serviced "${SYSTEMDDIR}"/openafs-client.service.conf
+ systemd_install_serviced "${SYSTEMDDIR}"/openafs-server.service.conf
+
+ # used directories: client
+ keepdir /etc/openafs
+
+ # used directories: server
+ keepdir /etc/openafs/server
+ diropts -m0700
+ keepdir /var/lib/openafs
+ keepdir /var/lib/openafs/db
+ diropts -m0755
+ keepdir /var/lib/openafs/logs
+
+ # link logfiles to /var/log
+ dosym ../lib/openafs/logs /var/log/openafs
+}
+
+pkg_preinst() {
+ ## Somewhat intelligently install default configuration files
+ ## (when they are not present)
+ local x
+ for x in cacheinfo CellServDB ThisCell ; do
+ if [ -e "${EROOT}"/etc/openafs/${x} ] ; then
+ cp "${EROOT}"/etc/openafs/${x} "${ED}"/etc/openafs/
+ fi
+ done
+}
+
+pkg_postinst() {
+ elog "This installation should work out of the box (at least the"
+ elog "client part doing global afs-cell browsing, unless you had"
+ elog "a previous and different configuration). If you want to"
+ elog "set up your own cell or modify the standard config,"
+ elog "please have a look at the Gentoo OpenAFS documentation"
+ elog "(warning: it is not yet up to date wrt the new file locations)"
+ elog
+ elog "The documentation can be found at:"
+ elog " https://wiki.gentoo.org/wiki/OpenAFS"
+ elog
+ elog "Systemd users should run emerge --config ${CATEGORY}/${PN} before"
+ elog "first use and whenever ${EROOT}/etc/openafs/cacheinfo is edited."
+}
+
+pkg_config() {
+ elog "Setting cache options for systemd."
+
+ SERVICED_FILE="${EROOT}"/etc/systemd/system/openafs-client.service.d/00gentoo.conf
+ [ ! -e "${SERVICED_FILE}" ] && die "Systemd service.d file ${SERVICED_FILE} not found."
+
+ CACHESIZE=$(cut -d ':' -f 3 "${EROOT}"/etc/openafs/cacheinfo)
+ [ -z ${CACHESIZE} ] && die "Failed to parse ${EROOT}/etc/openafs/cacheinfo."
+
+ if [ ${CACHESIZE} -lt 131070 ]; then
+ AFSD_CACHE_ARGS="-stat 300 -dcache 100 -daemons 2 -volumes 50"
+ elif [ ${CACHESIZE} -lt 524288 ]; then
+ AFSD_CACHE_ARGS="-stat 2000 -dcache 800 -daemons 3 -volumes 70"
+ elif [ ${CACHESIZE} -lt 1048576 ]; then
+ AFSD_CACHE_ARGS="-stat 2800 -dcache 2400 -daemons 5 -volumes 128"
+ elif [ ${CACHESIZE} -lt 2209715 ]; then
+ AFSD_CACHE_ARGS="-stat 3600 -dcache 3600 -daemons 5 -volumes 196 -files 50000"
+ else
+ AFSD_CACHE_ARGS="-stat 4000 -dcache 4000 -daemons 6 -volumes 256 -files 50000"
+ fi
+
+ # Replace existing env var if exists, else append line
+ grep -q "^Environment=\"AFSD_CACHE_ARGS=" "${SERVICED_FILE}" && \
+ sed -i "s/^Environment=\"AFSD_CACHE_ARGS=.*/Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"/" "${SERVICED_FILE}" || \
+ sed -i "$ a\Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"" "${SERVICED_FILE}" || \
+ die "Updating ${SERVICED_FILE} failed."
+}
diff --git a/net-fs/openafs/openafs-1.6.21.1.ebuild b/net-fs/openafs/openafs-1.6.21.1.ebuild
new file mode 100644
index 000000000000..4ecf063fc89f
--- /dev/null
+++ b/net-fs/openafs/openafs-1.6.21.1.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools eutils flag-o-matic multilib pam systemd toolchain-funcs versionator
+
+MY_PV=$(delete_version_separator '_')
+MY_P="${PN}-${MY_PV}"
+PVER="20170822"
+
+DESCRIPTION="The OpenAFS distributed file system"
+HOMEPAGE="https://www.openafs.org/"
+# We always d/l the doc tarball as man pages are not USE=doc material
+[[ ${PV} == *_pre* ]] && MY_PRE="candidate/" || MY_PRE=""
+SRC_URI="
+ https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-src.tar.bz2
+ https://openafs.org/dl/openafs/${MY_PRE}${MY_PV}/${MY_P}-doc.tar.bz2
+ https://dev.gentoo.org/~bircoph/afs/${PN}-patches-${PVER}.tar.xz
+"
+
+LICENSE="IBM BSD openafs-krb5-a APSL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+
+IUSE="bitmap-later debug doc fuse kerberos +modules ncurses pam pthreaded-ubik +supergroups"
+
+CDEPEND="
+ virtual/libintl
+ fuse? ( sys-fs/fuse )
+ kerberos? ( virtual/krb5 )
+ ncurses? ( sys-libs/ncurses:0= )
+ pam? ( virtual/pam )"
+
+DEPEND="${CDEPEND}
+ virtual/yacc
+ doc? (
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ )"
+
+RDEPEND="${CDEPEND}
+ modules? ( ~net-fs/openafs-kernel-${PV} )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=( "${WORKDIR}/gentoo/patches" )
+
+src_prepare() {
+ default
+
+ # fixing 2-nd level makefiles to honor flags
+ sed -i -r 's/\<CFLAGS[[:space:]]*=/CFLAGS+=/; s/\<LDFLAGS[[:space:]]*=/LDFLAGS+=/' \
+ src/*/Makefile.in || die '*/Makefile.in sed failed'
+
+ # packaging is f-ed up, so we can't run eautoreconf
+ # run autotools commands based on what is listed in regen.sh
+ eaclocal -I src/cf
+ eautoconf
+ eautoconf -o configure-libafs configure-libafs.ac
+ eautoheader
+ einfo "Deleting autom4te.cache directory"
+ rm -rf autom4te.cache
+}
+
+src_configure() {
+ local myconf
+ use debug && use pam && myconf="--enable-debug-pam"
+
+ AFS_SYSKVERS=26 \
+ econf \
+ --disable-kernel-module \
+ --disable-strip-binaries \
+ $(use_enable bitmap-later) \
+ $(use_enable debug) \
+ $(use_enable debug debug-lwp) \
+ $(use_enable fuse fuse-client) \
+ $(use_enable ncurses gtx) \
+ $(use_enable pam) \
+ $(use_enable pthreaded-ubik) \
+ $(use_enable supergroups) \
+ $(use_with doc html-xsl /usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl) \
+ $(use_with kerberos krb5) \
+ "${myconf}"
+}
+
+src_compile() {
+ emake all_nolibafs
+ local d
+ if use doc; then
+ for d in doc/xml/{AdminGuide,QuickStartUnix,UserGuide}; do
+ emake -C "${d}" html;
+ done
+ fi
+}
+
+src_install() {
+ local OPENRCDIR="${WORKDIR}/gentoo/openrc"
+ local SYSTEMDDIR="${WORKDIR}/gentoo/systemd"
+
+ emake DESTDIR="${ED}" install_nolibafs
+
+ insinto /etc/openafs
+ doins src/afsd/CellServDB
+ echo "/afs:/var/cache/openafs:200000" > "${ED}"/etc/openafs/cacheinfo
+ echo "openafs.org" > "${ED}"/etc/openafs/ThisCell
+
+ # pam_afs and pam_afs.krb have been installed in irregular locations, fix
+ if use pam ; then
+ dopammod "${ED}"/usr/$(get_libdir)/pam_afs*
+ fi
+ rm -f "${ED}"/usr/$(get_libdir)/pam_afs* || die
+
+ # remove kdump stuff provided by kexec-tools #222455
+ rm -rf "${ED}"/usr/sbin/kdump*
+
+ # avoid collision with mit_krb5's version of kpasswd
+ mv "${ED}"/usr/bin/kpasswd{,_afs} || die
+ mv "${ED}"/usr/share/man/man1/kpasswd{,_afs}.1 || die
+
+ # move lwp stuff around #200674 #330061
+ mv "${ED}"/usr/include/{lwp,lock,timer}.h "${ED}"/usr/include/afs/ || die
+ mv "${ED}"/usr/$(get_libdir)/liblwp* "${ED}"/usr/$(get_libdir)/afs/ || die
+ # update paths to the relocated lwp headers
+ sed -ri \
+ -e '/^#include <(lwp|lock|timer).h>/s:<([^>]*)>:<afs/\1>:' \
+ "${ED}"/usr/include/*.h \
+ "${ED}"/usr/include/*/*.h \
+ || die
+
+ # minimal documentation
+ use pam && doman src/pam/pam_afs.5
+ DOCS=( "${WORKDIR}/gentoo/README.Gentoo"
+ src/afsd/CellServDB NEWS README )
+
+ # documentation package
+ if use doc ; then
+ DOCS+=( doc/{arch,examples,pdf,protocol,txt} )
+ dohtml -r doc/xml/
+ fi
+
+ einstalldocs
+
+ # Gentoo related scripts
+ newinitd "${OPENRCDIR}"/openafs-client.initd openafs-client
+ newconfd "${OPENRCDIR}"/openafs-client.confd openafs-client
+ newinitd "${OPENRCDIR}"/openafs-server.initd openafs-server
+ newconfd "${OPENRCDIR}"/openafs-server.confd openafs-server
+ systemd_dotmpfilesd "${SYSTEMDDIR}"/tmpfiles.d/openafs-client.conf
+ systemd_dounit "${SYSTEMDDIR}"/openafs-client.service
+ systemd_dounit "${SYSTEMDDIR}"/openafs-server.service
+ systemd_install_serviced "${SYSTEMDDIR}"/openafs-client.service.conf
+ systemd_install_serviced "${SYSTEMDDIR}"/openafs-server.service.conf
+
+ # used directories: client
+ keepdir /etc/openafs
+
+ # used directories: server
+ keepdir /etc/openafs/server
+ diropts -m0700
+ keepdir /var/lib/openafs
+ keepdir /var/lib/openafs/db
+ diropts -m0755
+ keepdir /var/lib/openafs/logs
+
+ # link logfiles to /var/log
+ dosym ../lib/openafs/logs /var/log/openafs
+}
+
+pkg_preinst() {
+ ## Somewhat intelligently install default configuration files
+ ## (when they are not present)
+ local x
+ for x in cacheinfo CellServDB ThisCell ; do
+ if [ -e "${EROOT}"/etc/openafs/${x} ] ; then
+ cp "${EROOT}"/etc/openafs/${x} "${ED}"/etc/openafs/
+ fi
+ done
+}
+
+pkg_postinst() {
+ elog "This installation should work out of the box (at least the"
+ elog "client part doing global afs-cell browsing, unless you had"
+ elog "a previous and different configuration). If you want to"
+ elog "set up your own cell or modify the standard config,"
+ elog "please have a look at the Gentoo OpenAFS documentation"
+ elog "(warning: it is not yet up to date wrt the new file locations)"
+ elog
+ elog "The documentation can be found at:"
+ elog " https://wiki.gentoo.org/wiki/OpenAFS"
+ elog
+ elog "Systemd users should run emerge --config ${CATEGORY}/${PN} before"
+ elog "first use and whenever ${EROOT}/etc/openafs/cacheinfo is edited."
+}
+
+pkg_config() {
+ elog "Setting cache options for systemd."
+
+ SERVICED_FILE="${EROOT}"/etc/systemd/system/openafs-client.service.d/00gentoo.conf
+ [ ! -e "${SERVICED_FILE}" ] && die "Systemd service.d file ${SERVICED_FILE} not found."
+
+ CACHESIZE=$(cut -d ':' -f 3 "${EROOT}"/etc/openafs/cacheinfo)
+ [ -z ${CACHESIZE} ] && die "Failed to parse ${EROOT}/etc/openafs/cacheinfo."
+
+ if [ ${CACHESIZE} -lt 131070 ]; then
+ AFSD_CACHE_ARGS="-stat 300 -dcache 100 -daemons 2 -volumes 50"
+ elif [ ${CACHESIZE} -lt 524288 ]; then
+ AFSD_CACHE_ARGS="-stat 2000 -dcache 800 -daemons 3 -volumes 70"
+ elif [ ${CACHESIZE} -lt 1048576 ]; then
+ AFSD_CACHE_ARGS="-stat 2800 -dcache 2400 -daemons 5 -volumes 128"
+ elif [ ${CACHESIZE} -lt 2209715 ]; then
+ AFSD_CACHE_ARGS="-stat 3600 -dcache 3600 -daemons 5 -volumes 196 -files 50000"
+ else
+ AFSD_CACHE_ARGS="-stat 4000 -dcache 4000 -daemons 6 -volumes 256 -files 50000"
+ fi
+
+ # Replace existing env var if exists, else append line
+ grep -q "^Environment=\"AFSD_CACHE_ARGS=" "${SERVICED_FILE}" && \
+ sed -i "s/^Environment=\"AFSD_CACHE_ARGS=.*/Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"/" "${SERVICED_FILE}" || \
+ sed -i "$ a\Environment=\"AFSD_CACHE_ARGS=${AFSD_CACHE_ARGS}\"" "${SERVICED_FILE}" || \
+ die "Updating ${SERVICED_FILE} failed."
+}
diff --git a/net-fs/s3backer/Manifest b/net-fs/s3backer/Manifest
new file mode 100644
index 000000000000..bcd3900783a4
--- /dev/null
+++ b/net-fs/s3backer/Manifest
@@ -0,0 +1,4 @@
+DIST s3backer-1.3.7.tar.gz 179068 SHA256 7a6f028d16301b0fd32679eebe34ff2d614f343979ee7a0fab0110b85934aaca SHA512 c3fae911e6b39cb211ac5d85c3d75cb6fd823243879d98d2a2b18644d22fe5a70a293d06c4e3c6559452d39cec80bbac9cea76965ead451bb0a145a61df8bc83 WHIRLPOOL 6906cb833deffb4218cfaca28f7f88116aff1dab7ddfd764452600b13b250da27ac672d98597f8f848b26bfcd70648291f97d2cd91155bb72c995792a6375bfe
+EBUILD s3backer-1.3.7.ebuild 651 SHA256 be46cebf1d73030925453028ca11babfd9716d5f85706f0c835ec08b0bdabfe0 SHA512 ea1cf13c4b181c7b9fc69ca787ac482736af9bf10effa7061b04f16bcdaa5efd7027f593dd4a8b4dcfcd25a79abf45703c86ca8f183b0de802b1a1d28d663bf3 WHIRLPOOL 03e29e5beace8d951aca847aefb199b92070c83e5c502720a1ceb014bf67088484d1622276a14a376b55c422cbad5fff8ddc5214b793c916288dc4e0b9fec3b7
+MISC ChangeLog 286 SHA256 dbad568634860c0c3a91b939b3771c23a2ae433c8b75ea9fbcdc3280cb908d5b SHA512 f92ac4cb62e2cb3a2fedea8100b5827b94d0ac9b1987a1b0d1906f89554639ae3393dbce2689b89d8af65fbd15ac71979c19cbb57425ca77e63a23463a9ffd04 WHIRLPOOL 0fe1a811b43ae73144ae356e02fb9497582a5d7847512726ecf7765ca457dc6a851e4b958e7fd56cdc4dca7c93bda6f99950c973a0a440d8b7f3d5d9c269643b
+MISC metadata.xml 305 SHA256 3ae817f27964790ac1bad8450f291d6c87d9eb74c78c47a4f0cebd263b6df46c SHA512 016508df31db9ca31cdd2921e5569a450388c321724c41feb868162fcac11af35de1eb174f996df1f9e0ba945f0f313389caa4a6a0164e803f1c9413f052c62d WHIRLPOOL 982670e18a9d3adad442e32e091c9b95b6dce7f49b8f66f5cc14ae6687527c26150abc9f3ae5e404170fd7c5336cb1c80532a17f8b32590cb225f759d1103f4f
diff --git a/net-fs/s3backer/metadata.xml b/net-fs/s3backer/metadata.xml
new file mode 100644
index 000000000000..a288d2e3b71d
--- /dev/null
+++ b/net-fs/s3backer/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="google-code">s3backer</remote-id>
+ <remote-id type="github">archiecobbs/s3backer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-fs/s3backer/s3backer-1.3.7.ebuild b/net-fs/s3backer/s3backer-1.3.7.ebuild
new file mode 100644
index 000000000000..0d2d6cb324a3
--- /dev/null
+++ b/net-fs/s3backer/s3backer-1.3.7.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools
+
+DESCRIPTION="FUSE-based single file backing store via Amazon S3"
+HOMEPAGE="https://github.com/archiecobbs/s3backer"
+SRC_URI="https://s3backer.googlecode.com/files/s3backer-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="net-misc/curl
+ sys-fs/fuse
+ sys-libs/zlib
+ dev-libs/expat
+ dev-libs/openssl"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -e "/docdir=/s:packages/\$(PACKAGE):${PF}:" \
+ -e "/doc_DATA=/d" \
+ -i Makefile.am || die
+
+ eautoreconf
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS}"
+}
diff --git a/net-fs/s3fs/Manifest b/net-fs/s3fs/Manifest
new file mode 100644
index 000000000000..234669dc64dc
--- /dev/null
+++ b/net-fs/s3fs/Manifest
@@ -0,0 +1,8 @@
+DIST s3fs-1.74.tar.gz 199120 SHA256 d77d540582fe8287354fd3637e48064f81f6fe80c5f0e0f8253221c56b892b88 SHA512 c9f6e2a113d2cfb9d6ac485d58ae8ebf317b9fc29b2fab34de427f206902eda22de056cbcdbc0e8cdebeff7900793e96a87f4ad8a3b1add85433a617ba53889d WHIRLPOOL 3572602fb3fe71e1e17d46925fc3459623fc7e9dcad1bfeee6120bba5d57005eacccbb87b786af74af62cc3f2ec87dce965a05a4c5645f6b5d035a578c617568
+DIST s3fs-1.78.tar.gz 99538 SHA256 36c0b00a294d9676c462985c0c3f1362540e8ebc61c15bacb45e28a2f00297f5 SHA512 ba0ad1ee5fc3c31d5b98dc7511abc8e74e91649af27aaaf5ecdca76cc7503bf66118638f983199bcdcaa51897f1bfa802310db9e2b72538d9f345f6942a3a8d0 WHIRLPOOL 1c9c5589475c0d545657973d638d51deac3266b0878fe27a114bd3da938455c56d941183783b264e226fa7c4976b357f4009063c985311bcf27749f7b454690f
+DIST s3fs-1.80.tar.gz 135891 SHA256 de8381c9bd73e491904e73561882dc91e5fad9c28fe88834a93d7b4fe12cbd35 SHA512 c98c61198a6c2132f98ef5a8c8f600787cf359c6f79010366f786a3758281257cbf79b4bb47892fd1e9e50d8e46a389125ea67f3828c1c8131cbee5462c74141 WHIRLPOOL 34d620211502ad83656ac2e623ee01bd74c3037e20c3a874ef6b7fba36dfba2e32906fb88a9e4486f781b14d37c8a731af2dda3da199a3cdf8241d6108032aa5
+EBUILD s3fs-1.74.ebuild 598 SHA256 99b0194a0fbd042abc0c43c9f21b0da9366dcb309254ed77e3e1e84538284b81 SHA512 3e9598678724a7729795d935fbbbcc5422f7974897e6757baa6cb2d5664aeb4d4e6ead00e3a28517afd2ce65b5577262bc4a141126f33b51ca71d9373f14051a WHIRLPOOL cce24d269c923944ad06ce283f7bc8ea40e18f73eb282b1d89b1b9d38c8684327fed0553bd96ba7d1228e2dc6ced99be1ae0e3a95a3727ec870cf68136fd6d0f
+EBUILD s3fs-1.78.ebuild 648 SHA256 7e738a6c7c650a89936f7966c203f420c40b55040e21467bd8e31ce27d08e201 SHA512 8c839df2fb5a0687ee0ff0892f7accdc9ad5cdbe7ce9407df6b973419ad2c8c79a87141c8cfb5e2326e00c7fb541c4f8e6b3d2687be14bf142bdc6d9698d6a77 WHIRLPOOL 8438642daaf62d53921e2d3814fd30585de22ed048274bddf82925114dba32b7b53c1ab3cc2def756e4869b42e1f2ecb3169196b3ad3fb35d06ff56a509e59e6
+EBUILD s3fs-1.80.ebuild 975 SHA256 90522edfd7f191730ecdef169d0013b541fb622ff9e171526d74e04eae555f6d SHA512 78e40951c4766934f3a5da327889e9795f06fa37c1f6609991dda2b0f95971ec4fe3119845517fc11885965e4b85dbab1015c63850d5d8fd71c9e0315571469f WHIRLPOOL 06b325f18eed447fa20cbc4b607d19fd4bddff788811efc457e8f35ae12a7e2d8efc4fc7114c9ff01f365062b3978d226e4eae507b69bda0da2a8b66b499f48d
+MISC ChangeLog 355 SHA256 c3008817ebb6f9125128f29e36bf4b1d4e9ef0cae32dde08ed7d82f3b396a67c SHA512 e019ef60c2d1e264d84c354f15e844f3731109edbe26e6ab7ea7a2688b0d5562a90896114d491a16e186516d56668bfe82550d3c86f12383c2d43a61a7af273d WHIRLPOOL 2ca8717a5ee965a2a71bdd58769197658755e5ff641ddec2fa2b923d75b9e5ca27347bfb4673a5008b08c6943a37448d31851504d7ee2ccc6ac6a9472bbe86e3
+MISC metadata.xml 951 SHA256 d0523b8963be205d221b7e756f881c3575e7472a465064be61182aaabc1a0c4f SHA512 cf4ff31547af4caa2e0a0e41d0d40beedfbed04a491b317dde79192c922174d00e913a2e7aa7afe1b2f5d68e19f5bf91860725180a7d874fdfeae66f24b2d13d WHIRLPOOL 3932fbf60d07a755ed25eafb2a68e3ace791fadbe1aaf6413be68534295703e45e4cac76a29607ba67f65cfe5096534c1fb776deefe6cb648a522391a56ac0bc
diff --git a/net-fs/s3fs/metadata.xml b/net-fs/s3fs/metadata.xml
new file mode 100644
index 000000000000..9c8e07564542
--- /dev/null
+++ b/net-fs/s3fs/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>rini17@gmail.com</email>
+ <name>Juraj Variny</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="openssl">Enable <pkg>dev-libs/openssl</pkg> crypto backend</flag>
+ <flag name="nss">Enable <pkg>dev-libs/nss</pkg> crypto backend</flag>
+ <flag name="gnutls">Enable <pkg>net-libs/gnutls</pkg> crypto backend</flag>
+ <flag name="nettle">Use <pkg>dev-libs/nettle</pkg> network functions with GnuTLS.</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">s3fs-fuse/s3fs-fuse</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-fs/s3fs/s3fs-1.74.ebuild b/net-fs/s3fs/s3fs-1.74.ebuild
new file mode 100644
index 000000000000..88bea69d2004
--- /dev/null
+++ b/net-fs/s3fs/s3fs-1.74.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit toolchain-funcs
+
+MY_PN=${PN}-fuse
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Amazon mounting S3 via fuse"
+HOMEPAGE="https://github.com/s3fs-fuse/s3fs-fuse/"
+SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+CDEPEND=">=dev-libs/libxml2-2.6:2
+ dev-libs/openssl
+ >=net-misc/curl-7.0
+ >=sys-fs/fuse-2.8.4"
+RDEPEND="${CDEPEND}
+ app-misc/mime-types"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+
+RESTRICT="test"
diff --git a/net-fs/s3fs/s3fs-1.78.ebuild b/net-fs/s3fs/s3fs-1.78.ebuild
new file mode 100644
index 000000000000..a60f9c0f267f
--- /dev/null
+++ b/net-fs/s3fs/s3fs-1.78.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools
+
+MY_PN=${PN}-fuse
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Amazon mounting S3 via fuse"
+HOMEPAGE="https://github.com/s3fs-fuse/s3fs-fuse/"
+SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+CDEPEND=">=dev-libs/libxml2-2.6:2
+ dev-libs/openssl
+ >=net-misc/curl-7.0
+ >=sys-fs/fuse-2.8.4"
+RDEPEND="${CDEPEND}
+ app-misc/mime-types"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+
+RESTRICT="test"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ eautoreconf
+}
diff --git a/net-fs/s3fs/s3fs-1.80.ebuild b/net-fs/s3fs/s3fs-1.80.ebuild
new file mode 100644
index 000000000000..e04bd356019f
--- /dev/null
+++ b/net-fs/s3fs/s3fs-1.80.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+MY_PN=${PN}-fuse
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Amazon S3 mounting via fuse"
+HOMEPAGE="https://github.com/s3fs-fuse/s3fs-fuse/"
+SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="openssl nss gnutls nettle"
+REQUIRED_USE="
+ ^^ ( openssl nss gnutls )
+ nettle? ( gnutls )"
+
+CDEPEND="
+ >=dev-libs/libxml2-2.6:2
+ openssl? ( dev-libs/openssl:0 )
+ nss? ( dev-libs/nss )
+ gnutls? ( net-libs/gnutls )
+ nettle? ( dev-libs/nettle )
+ >=net-misc/curl-7.0
+ >=sys-fs/fuse-2.8.4"
+
+RDEPEND="
+ ${CDEPEND}
+ app-misc/mime-types"
+
+DEPEND="
+ ${CDEPEND}
+ virtual/pkgconfig"
+
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with nss) \
+ $(use_with nettle) \
+ $(use_with gnutls) \
+ $(use_with openssl)
+}
diff --git a/net-fs/s3ql/Manifest b/net-fs/s3ql/Manifest
new file mode 100644
index 000000000000..33a1c3a4be53
--- /dev/null
+++ b/net-fs/s3ql/Manifest
@@ -0,0 +1,22 @@
+AUX s3ql-2.14-ceph.patch 3323 SHA256 5c8f108a2ede6c831687edcc6eb2fc205db0ab865d8c1dbfbcd3c271bf6bf240 SHA512 cead3e2ab677d25a892ba834a0f18162843849f623fbb9be67798059518b7984aa3abecd5572371a188fb6e00534c6d6006147b0f98c32025567f794510f5b37 WHIRLPOOL 80921c49a97cf97b3c88548a40dd85f8c1b641738852334f6e0fb2535e8dd9603324d8b6742c4be75723c1e363f6b490699def8cbfde0242ff3e176b6d824eca
+DIST s3ql-1.19.tar.bz2 641689 SHA256 280271c156d027583ba4aa94c2fd189c3d63dd833cd4fd3c5c84bf97cb2d96c7 SHA512 5751f4d21abdc3996d877785bb07752fca75ec60ad716a102f666b5329e9b225519c4365c93031e056db78e3bffc80a7a1afe227c375e1c19e35b8bdffe5a0bf WHIRLPOOL e7025a95cf9aaf48ec7a7091e0d91cca1f8d15cf62901cbf9fb853b4c3b09ffe9e4ca6b1added432825c3dccec398ff31c85fba9375a72fd489bffcbf0f3c399
+DIST s3ql-2.11.1.tar.bz2 897259 SHA256 15c09a7b733d2b7a0eced31f0bfc4b423f27c70b5f20ce47d2f2ab270a829560 SHA512 72e873f0d23dd86ca5f7a65809189225feff0f6f14bb046dcc8117f3eb725c3327408fe504ffd80566d70bad620b5f5c34174784f1d318bf1f7e6abf4edcb1a7 WHIRLPOOL a59c4c3735081e21dc103dbf531c162bfcaa7fae45b7d8ef81e5dadeaf24588fed1cfc913643c64bc39e52df47f1a21d2b8f4920cdb2632f1053ae4cc7ff9363
+DIST s3ql-2.11.tar.bz2 867710 SHA256 bfa893ffbe26f3b3480c6e60664ca33af3c3d65b05767b759d5ed6b580c57b3e SHA512 86f3cb3294f38ab25ddf593dae2ea36af6d4df8871e15b3c99bddd7c8c5c038ab5cd0adaf067afb508dd3f7e163e8b86ab7994f2401cf33543cdeb43bc9fdb9d WHIRLPOOL a4e01f0971e687da594d1c106866cf05b7010e56091c6ddad635039d455a7c8973a6fb37de1ffa71efd1b314cbd533ac380c8b508e7e4e9c752a40300f1d9126
+DIST s3ql-2.12.tar.bz2 906837 SHA256 1b8c727fe2490328ba880218c57e29b2c3376600e529f576629c443a5b7c8b81 SHA512 51c90a983a6b076fd70468406e6a1c74592b85458068bc07325d43b75d1ca50fb80694fcab83e6c41a1e3ac8209a203716624971be1cecc9cad75a8f3f4761d9 WHIRLPOOL d5225a104c7b02fe0a17a86ad6f48eeb17265aa74a2de793829b5a3b84a3d60ec5039839f801a1c8648f58e5007ba021ca949a7384842993f2b4a3e3e06f4393
+DIST s3ql-2.14.tar.bz2 907415 SHA256 2f4e4bb27b2ad5eb8d2f1ab8c7c5a643a031dee635b582bad77b4348f747098f SHA512 8ada75934e438928bca03f59fc6b08f013887dfc926bfe1069108cf9172c1fbf20229db4c6248022b9af1e7f52ec9cf1ab536acddcc8993ca55f59a7be43c218 WHIRLPOOL faa06a2b637f58167e810bbb4a61942cbecac83c741e2adbbc9ce728edf5f202e6d78565f5d2e4b9ebad90629c698db8a578049b174578401b6544e8d2c87c3b
+DIST s3ql-2.17.1.tar.bz2 957313 SHA256 fddd00f576048b25eb4263c6c07acb500f6203a0e2e59336d947453ff7be3b11 SHA512 dd2c16dd30c0f103e0cdd42329b2cf242dad7edf2aed773746a8e00cbfd3e4735174293347fa68bceacb2a8379099356b32b2c35e9f1c2524740e92929185611 WHIRLPOOL ab141c383b9ec933a14d49524586e3d45f3d9bb52396bd6b7ac43929d3ec6595afa642a94b8686170db7d8ceb55b816498098cae22121e963f4ec95a794a3241
+DIST s3ql-2.20.tar.bz2 726268 SHA256 08b7365cc2c0a7ff1f12c8a92aa71b9bd42a0af6d7f17e225f617b85f62e0692 SHA512 a5a25a7b02c3d7bf5f87ad0130d24b8e0b95f20a269d74b35edeaec1a47011e30a3d1416c3d8332075be82dc09733321da8e7e4200893d893f37d1e4970cf7fb WHIRLPOOL f87d49d466a4322ff42d8070063b46072b1878abccef934504f40ce9764f9061e8ff4eb6f8b7681423d47eeba68340e71b6cd0f7575c008bd12279af69f44006
+DIST s3ql-2.21.tar.bz2 726450 SHA256 6db886d9cd0fc54fb7aaf9f88241282097e6242b7a8bd97c6659b0ae57af2ed6 SHA512 2aa5324d529feb73d9c562f42d5bcb49e4c605315e032924bec8005ee6cba24b8bd100a8ca6ab559dde4e7d4b25db9458b49bd8421bfeb74609ce32a6cdf7055 WHIRLPOOL 220666e835650f6017bf275619755bbe7f0d503742a3fca09497a715b56f977d1451549f585fe0630410ea9c8f09181b420d2ae73c5a29736b825286ea133d27
+DIST s3ql-2.23.tar.bz2 770488 SHA256 d8785921d00a44e71bef1cb9b9d3102e3aa0a4f1998d929e364a44b255e9a930 SHA512 99863394002c5f941e1e8dabce606703a20a2614e316484c9d5b3de774ff2864284911283573dcebbcd10c4a3aefc1a3c12f1ae511af3f0c42be88ba8f6f1f7d WHIRLPOOL bb4269ddbb0e85f2979ab10f4186432549fbde19632722bcb95222ebae3705b4c9f897f24e156cff29ec22304835fa1381db75c56dc0fe7affdd636064fe396e
+EBUILD s3ql-1.19.ebuild 1350 SHA256 02d4c5de4f6f9b325a5ce1eeea35dc489e97f43043201f493bc6cd9765ed53cd SHA512 5be50b779d5ead6da27f1a4f268dc97436e2cbabc16e3623d382200a1d8dff80a4d2640c58e33951757b66f27af8d5c15c228b1727ea8eb5d49e4e60c86d9462 WHIRLPOOL 464c7c4bb62f21090c2048dabcc782f935b8e069f0f40f8089e20f50ad3d78ddd202e567eca6d4310bf42a353bc918a5f40fad95a9e0b5da5dd58b440397b644
+EBUILD s3ql-2.11.1.ebuild 1255 SHA256 edfa35d3a5270a950b66a72ddadd85dec7b6a13b22179ff0e0584c856afa457f SHA512 0075b0089fe1a778ba2d4d77f5c1ad9c69100c5dbad81ce7481e15f5bd00e6aad739a98bbb3ad123eb1ec30ac9c3c73b087d797d4753706c6aa9f798509e8d8d WHIRLPOOL 6db435a49cddf69e4f4f9095d666ad3cbf36c9ed07b4ce3b1d8dc2f9e41fd771f8da886e812cf305462af055595416dca9ac983750a971f90f3d2d9c4249ff2b
+EBUILD s3ql-2.11.ebuild 1255 SHA256 edfa35d3a5270a950b66a72ddadd85dec7b6a13b22179ff0e0584c856afa457f SHA512 0075b0089fe1a778ba2d4d77f5c1ad9c69100c5dbad81ce7481e15f5bd00e6aad739a98bbb3ad123eb1ec30ac9c3c73b087d797d4753706c6aa9f798509e8d8d WHIRLPOOL 6db435a49cddf69e4f4f9095d666ad3cbf36c9ed07b4ce3b1d8dc2f9e41fd771f8da886e812cf305462af055595416dca9ac983750a971f90f3d2d9c4249ff2b
+EBUILD s3ql-2.12.ebuild 1255 SHA256 edfa35d3a5270a950b66a72ddadd85dec7b6a13b22179ff0e0584c856afa457f SHA512 0075b0089fe1a778ba2d4d77f5c1ad9c69100c5dbad81ce7481e15f5bd00e6aad739a98bbb3ad123eb1ec30ac9c3c73b087d797d4753706c6aa9f798509e8d8d WHIRLPOOL 6db435a49cddf69e4f4f9095d666ad3cbf36c9ed07b4ce3b1d8dc2f9e41fd771f8da886e812cf305462af055595416dca9ac983750a971f90f3d2d9c4249ff2b
+EBUILD s3ql-2.14-r1.ebuild 1317 SHA256 9fd768cc122da5ed091f02d7ba4045af478ca4d5eca4287a48631b668e54c593 SHA512 c15832c2e13a945f06e59521b294a1c101daf3a4b9db1d95f6c915e19384a13525685fc4ac2394d0c157fae7521b5bb9a123da7ca74450fee9d67e55fe4a002a WHIRLPOOL 6cb844b70eb0c920d8294765ee798c5a70dacaf67adbbf049b4e8dd9c68cf798249a91d84645455212d5a244792345c84d714052ae49864f954a44c08fc22cc7
+EBUILD s3ql-2.14.ebuild 1255 SHA256 8deb0504d0620348de988970d16933616de1f3a6718c9de679947b017a9a47a2 SHA512 4cb03ba91c19233ea7bccf93c489f0aa047946ec714b6709a6ef99bbcedff242abf27dc0619e217e1168bf2aed0131e6eff4bdc43ee0083decae79918f2f82fd WHIRLPOOL 244140aa288011840eb5ed2913939f914fff3498e367bd38ad0fe27f8a3926fe23880f93419c3f9624dc2bb3c16f3d9379ce5fd6a433a011b0c8ca6a84b3cc44
+EBUILD s3ql-2.17.1.ebuild 1258 SHA256 1b2a9fa835f87dcffd220365299af4cf17a919bba1bb2a3ed9a1f37bf4aaabfa SHA512 4f6f6cbba1c77e225ee2cc188b91e6ef2a2b342ac716b8ce436fd6fcfbff1b323733a622d49fdf8edef2ba03923566f60f0067d79e668d7e3d162ca3827da2cb WHIRLPOOL 20e22d3ed983c28e66e308f8dd52d71dc3ef52d2abd22374576772057bb807f57f38698db4469c08ff5d3ad4b1c38f8deed84df634dbe5196671cb4c8af34656
+EBUILD s3ql-2.20.ebuild 1255 SHA256 2cf18833ee53c83dee3057f611e53ab216b1b609766d1c92a4ba6f9e8ebfcf51 SHA512 ba52467b66905b9bf3b0792b3a85a3a1bf64738d53ac989bf4b32d68051cfdd6a478f1f136b54e29db07433ca6a4036d795049aa6e47287f7cde578cc3f4607f WHIRLPOOL 3d7c30f3e7b569bed3128b6790c264e912618b4a8fd430519caf79eafaf9fcf8a21e6d16558d3ad4fa3e6ce542735fa02b2239b7f7597b6fd678d408dc1235d8
+EBUILD s3ql-2.21.ebuild 1257 SHA256 c05dc47f46dd7a6f6d0299602fbb5975eb7a2c40d85ab457173d0137d9e8bc9a SHA512 f136079f7cb351cd9bee25f9d78023e187c03dc696664fd66c13af27e33a65815d74744c23163638da7ccbe603621f99acd875dd3e75f32b0f07f0048600c2dc WHIRLPOOL 582417fe824e84be7face87131388776e40a99df9eb5ffd16dd11490b26e1074a65dd95afeeba834ec5e4b5df79533d619da12c0e2f47607b021e1a8a7943813
+EBUILD s3ql-2.23.ebuild 1257 SHA256 c05dc47f46dd7a6f6d0299602fbb5975eb7a2c40d85ab457173d0137d9e8bc9a SHA512 f136079f7cb351cd9bee25f9d78023e187c03dc696664fd66c13af27e33a65815d74744c23163638da7ccbe603621f99acd875dd3e75f32b0f07f0048600c2dc WHIRLPOOL 582417fe824e84be7face87131388776e40a99df9eb5ffd16dd11490b26e1074a65dd95afeeba834ec5e4b5df79533d619da12c0e2f47607b021e1a8a7943813
+MISC ChangeLog 984 SHA256 fd0857fe65a54f44da8ea8da84946e500f45f4a3958d3cb0c7f78c419895825a SHA512 e2b56f004716113127acc91315820ea5bf1f780456534f029605de749db4ff521f59c0f424c4b682260ff95466857963077ac2d2e86bd709869cff16b06df809 WHIRLPOOL e20c0d9a200cd84403fd98d9a114b6e453a8caabaaaea54d22a77772b5dd901f3df7f6a2d8c3df503e7009eade6cf834cd93217881e21e3be86656ea35dbb79e
+MISC metadata.xml 463 SHA256 851b066c2e9f94b2cfc5f46e35ee388505b22b441fa1c588dee570c4ad3da4b9 SHA512 7021866874fac865898c724916b0b455f3416351aba40ce8eeef55436e93c8616786be656101bcc693ec0762626e60b44814f9dba788ff5e17b2b22f3daf5f88 WHIRLPOOL d0a78b51376f254994ff331024044f6996a84c2c82fd671c918c9dce95a41b04032eef8f58d6d3b6a483197accfb37bfab5123b3784ff221d7cd0b1923363563
diff --git a/net-fs/s3ql/files/s3ql-2.14-ceph.patch b/net-fs/s3ql/files/s3ql-2.14-ceph.patch
new file mode 100644
index 000000000000..f5b4c3b123e5
--- /dev/null
+++ b/net-fs/s3ql/files/s3ql-2.14-ceph.patch
@@ -0,0 +1,75 @@
+https://bitbucket.org/nikratio/s3ql/issues/190/sq3l-should-not-rely-on-xmlns-declarations
+https://bitbucket.org/nikratio/s3ql/pull-requests/5/s3c-be-more-lenient-about-xml-namespaces
+
+--- s3ql-2.14/src/s3ql/backends/s3c.py 2015-07-20 19:41:07.000000000 -0700
++++ s3ql-2.14/src/s3ql/backends/s3c.py 2016-01-21 22:41:33.000000000 -0800
+@@ -126,6 +126,15 @@
+ conn.timeout = int(self.options.get('tcp-timeout', 20))
+ return conn
+
++ @staticmethod
++ def _tag_xmlns_uri(elem):
++ '''Extract the XML namespace (xmlns) URI from an element'''
++ if elem.tag[0] == '{':
++ uri, ignore, tag = elem.tag[1:].partition("}")
++ else:
++ uri = None
++ return uri
++
+ # This method is also used implicitly for the retry handling of
+ # `gs.Backend._get_access_token`. When modifying this method, do not forget
+ # to check if this makes it unsuitable for use by `_get_access_token` (in
+@@ -215,7 +224,6 @@
+ keys_remaining = True
+ marker = self.prefix + start_after
+ prefix = self.prefix + prefix
+- ns_p = self.xml_ns_prefix
+
+ while keys_remaining:
+ log.debug('requesting with marker=%s', marker)
+@@ -232,16 +240,27 @@
+ try:
+ itree = iter(ElementTree.iterparse(self.conn, events=("start", "end")))
+ (event, root) = next(itree)
++
++ root_xmlns_uri = self._tag_xmlns_uri(root)
++ if root_xmlns_uri is None:
++ root_xmlns_prefix = ''
++ else:
++ # Validate the XML namespace
++ root_xmlns_prefix = '{%s}' % (root_xmlns_uri, )
++ if root_xmlns_prefix != self.xml_ns_prefix:
++ log.error('Unexpected server reply to list operation:\n%s',
++ self._dump_response(resp, body=None))
++ raise RuntimeError('List response has %s as root tag, unknown namespace' % root.tag)
+
+ for (event, el) in itree:
+ if event != 'end':
+ continue
+
+- if el.tag == ns_p + 'IsTruncated':
++ if el.tag == root_xmlns_prefix + 'IsTruncated':
+ keys_remaining = (el.text == 'true')
+
+- elif el.tag == ns_p + 'Contents':
+- marker = el.findtext(ns_p + 'Key')
++ elif el.tag == root_xmlns_prefix + 'Contents':
++ marker = el.findtext(root_xmlns_prefix + 'Key')
+ yield marker[len(self.prefix):]
+ root.clear()
+
+@@ -404,9 +423,12 @@
+ return
+ body = self.conn.readall()
+ root = self._parse_xml_response(resp, body)
+- if root.tag == self.xml_ns_prefix + 'CopyObjectResult':
++
++ # Some S3 implemenentations do not have a namespace on
++ # CopyObjectResult.
++ if root.tag in [self.xml_ns_prefix + 'CopyObjectResult', 'CopyObjectResult']:
+ return
+- elif root.tag == 'Error':
++ elif root.tag in [self.xml_ns_prefix + 'Error', 'Error']:
+ raise get_S3Error(root.findtext('Code'), root.findtext('Message'),
+ resp.headers)
+ else:
diff --git a/net-fs/s3ql/metadata.xml b/net-fs/s3ql/metadata.xml
new file mode 100644
index 000000000000..38ca05fddf8f
--- /dev/null
+++ b/net-fs/s3ql/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>chutzpah@gentoo.org</email>
+ <name>Patrick McLean</name>
+ </maintainer>
+ <use>
+ <flag name="contrib">Install additional contributed scripts</flag>
+ </use>
+ <upstream>
+ <remote-id type="google-code">s3ql</remote-id>
+ <remote-id type="bitbucket">nikratio/s3ql</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-fs/s3ql/s3ql-1.19.ebuild b/net-fs/s3ql/s3ql-1.19.ebuild
new file mode 100644
index 000000000000..ba871ca91224
--- /dev/null
+++ b/net-fs/s3ql/s3ql-1.19.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="A full-featured file system for online data storage"
+HOMEPAGE="https://bitbucket.org/nikratio/s3ql/"
+SRC_URI="https://www.bitbucket.org/nikratio/s3ql/downloads/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="contrib doc test"
+
+RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/apsw-3.7.0[${PYTHON_USEDEP}]
+ >=dev-python/llfuse-0.37[${PYTHON_USEDEP}]
+ dev-python/pycryptopp[${PYTHON_USEDEP}]
+ dev-python/pyliblzma[${PYTHON_USEDEP}]
+ sys-fs/fuse"
+DEPEND="${RDEPEND}
+ test? (
+ dev-python/pytest[${PYTHON_USEDEP}]
+ net-misc/rsync[xattr]
+ )"
+
+python_prepare_all() {
+ # use system setuptools
+ sed -i '/use_setuptools/d' setup.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ if [[ ${EUID} -ne 0 ]] ; then
+ ewarn "Skipping tests: root privileges are required so userpriv must be disabled"
+ else
+ addwrite /dev/fuse
+ esetup.py test
+ fi
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ if use contrib ; then
+ exeinto /usr/share/doc/${PF}/contrib
+ docompress -x /usr/share/doc/${PF}/contrib
+ doexe contrib/*.{py,sh}
+ doman contrib/*.1
+ fi
+
+ if use doc ; then
+ dodoc doc/manual.pdf
+ dohtml -r doc/html/*
+ fi
+}
diff --git a/net-fs/s3ql/s3ql-2.11.1.ebuild b/net-fs/s3ql/s3ql-2.11.1.ebuild
new file mode 100644
index 000000000000..5ab6fccd8527
--- /dev/null
+++ b/net-fs/s3ql/s3ql-2.11.1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python3_4 )
+
+inherit distutils-r1
+
+DESCRIPTION="A full-featured file system for online data storage"
+HOMEPAGE="https://bitbucket.org/nikratio/s3ql/"
+SRC_URI="https://www.bitbucket.org/nikratio/s3ql/downloads/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="contrib doc test"
+
+RDEPEND=">=dev-db/sqlite-3.7.0:3
+ dev-python/defusedxml[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/apsw-3.7.0[${PYTHON_USEDEP}]
+ >=dev-python/dugong-3.2[${PYTHON_USEDEP}]
+ >=dev-python/llfuse-0.39[${PYTHON_USEDEP}]
+ dev-python/pycrypto[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ sys-fs/fuse"
+DEPEND="${RDEPEND}
+ test? (
+ dev-python/pytest[${PYTHON_USEDEP}]
+ net-misc/rsync[xattr]
+ )"
+
+RESTRICT="test"
+
+python_test() {
+ addwrite /dev/fuse
+ py.test -v tests || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ if use contrib ; then
+ exeinto /usr/share/doc/${PF}/contrib
+ docompress -x /usr/share/doc/${PF}/contrib
+ doexe contrib/*.{py,sh}
+ doman contrib/*.1
+ fi
+
+ if use doc ; then
+ dodoc doc/manual.pdf
+ dohtml -r doc/html/*
+ fi
+}
diff --git a/net-fs/s3ql/s3ql-2.11.ebuild b/net-fs/s3ql/s3ql-2.11.ebuild
new file mode 100644
index 000000000000..5ab6fccd8527
--- /dev/null
+++ b/net-fs/s3ql/s3ql-2.11.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python3_4 )
+
+inherit distutils-r1
+
+DESCRIPTION="A full-featured file system for online data storage"
+HOMEPAGE="https://bitbucket.org/nikratio/s3ql/"
+SRC_URI="https://www.bitbucket.org/nikratio/s3ql/downloads/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="contrib doc test"
+
+RDEPEND=">=dev-db/sqlite-3.7.0:3
+ dev-python/defusedxml[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/apsw-3.7.0[${PYTHON_USEDEP}]
+ >=dev-python/dugong-3.2[${PYTHON_USEDEP}]
+ >=dev-python/llfuse-0.39[${PYTHON_USEDEP}]
+ dev-python/pycrypto[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ sys-fs/fuse"
+DEPEND="${RDEPEND}
+ test? (
+ dev-python/pytest[${PYTHON_USEDEP}]
+ net-misc/rsync[xattr]
+ )"
+
+RESTRICT="test"
+
+python_test() {
+ addwrite /dev/fuse
+ py.test -v tests || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ if use contrib ; then
+ exeinto /usr/share/doc/${PF}/contrib
+ docompress -x /usr/share/doc/${PF}/contrib
+ doexe contrib/*.{py,sh}
+ doman contrib/*.1
+ fi
+
+ if use doc ; then
+ dodoc doc/manual.pdf
+ dohtml -r doc/html/*
+ fi
+}
diff --git a/net-fs/s3ql/s3ql-2.12.ebuild b/net-fs/s3ql/s3ql-2.12.ebuild
new file mode 100644
index 000000000000..5ab6fccd8527
--- /dev/null
+++ b/net-fs/s3ql/s3ql-2.12.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python3_4 )
+
+inherit distutils-r1
+
+DESCRIPTION="A full-featured file system for online data storage"
+HOMEPAGE="https://bitbucket.org/nikratio/s3ql/"
+SRC_URI="https://www.bitbucket.org/nikratio/s3ql/downloads/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="contrib doc test"
+
+RDEPEND=">=dev-db/sqlite-3.7.0:3
+ dev-python/defusedxml[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/apsw-3.7.0[${PYTHON_USEDEP}]
+ >=dev-python/dugong-3.2[${PYTHON_USEDEP}]
+ >=dev-python/llfuse-0.39[${PYTHON_USEDEP}]
+ dev-python/pycrypto[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ sys-fs/fuse"
+DEPEND="${RDEPEND}
+ test? (
+ dev-python/pytest[${PYTHON_USEDEP}]
+ net-misc/rsync[xattr]
+ )"
+
+RESTRICT="test"
+
+python_test() {
+ addwrite /dev/fuse
+ py.test -v tests || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ if use contrib ; then
+ exeinto /usr/share/doc/${PF}/contrib
+ docompress -x /usr/share/doc/${PF}/contrib
+ doexe contrib/*.{py,sh}
+ doman contrib/*.1
+ fi
+
+ if use doc ; then
+ dodoc doc/manual.pdf
+ dohtml -r doc/html/*
+ fi
+}
diff --git a/net-fs/s3ql/s3ql-2.14-r1.ebuild b/net-fs/s3ql/s3ql-2.14-r1.ebuild
new file mode 100644
index 000000000000..fac9efee1de3
--- /dev/null
+++ b/net-fs/s3ql/s3ql-2.14-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python3_4 )
+
+inherit distutils-r1
+
+DESCRIPTION="A full-featured file system for online data storage"
+HOMEPAGE="https://bitbucket.org/nikratio/s3ql/"
+SRC_URI="https://www.bitbucket.org/nikratio/s3ql/downloads/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="contrib doc test"
+
+RDEPEND=">=dev-db/sqlite-3.7.0:3
+ dev-python/defusedxml[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/apsw-3.7.0[${PYTHON_USEDEP}]
+ >=dev-python/dugong-3.4[${PYTHON_USEDEP}]
+ >=dev-python/llfuse-0.39[${PYTHON_USEDEP}]
+ dev-python/pycrypto[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ sys-fs/fuse"
+DEPEND="${RDEPEND}
+ test? (
+ dev-python/pytest[${PYTHON_USEDEP}]
+ net-misc/rsync[xattr]
+ )"
+
+RESTRICT="test"
+
+python_test() {
+ addwrite /dev/fuse
+ py.test -v tests || die "Tests fail with ${EPYTHON}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/s3ql-2.14-ceph.patch
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ if use contrib ; then
+ exeinto /usr/share/doc/${PF}/contrib
+ docompress -x /usr/share/doc/${PF}/contrib
+ doexe contrib/*.{py,sh}
+ doman contrib/*.1
+ fi
+
+ if use doc ; then
+ dodoc doc/manual.pdf
+ dohtml -r doc/html/*
+ fi
+}
diff --git a/net-fs/s3ql/s3ql-2.14.ebuild b/net-fs/s3ql/s3ql-2.14.ebuild
new file mode 100644
index 000000000000..e651e50c86e8
--- /dev/null
+++ b/net-fs/s3ql/s3ql-2.14.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python3_4 )
+
+inherit distutils-r1
+
+DESCRIPTION="A full-featured file system for online data storage"
+HOMEPAGE="https://bitbucket.org/nikratio/s3ql/"
+SRC_URI="https://www.bitbucket.org/nikratio/s3ql/downloads/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="contrib doc test"
+
+RDEPEND=">=dev-db/sqlite-3.7.0:3
+ dev-python/defusedxml[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/apsw-3.7.0[${PYTHON_USEDEP}]
+ >=dev-python/dugong-3.4[${PYTHON_USEDEP}]
+ >=dev-python/llfuse-0.39[${PYTHON_USEDEP}]
+ dev-python/pycrypto[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ sys-fs/fuse"
+DEPEND="${RDEPEND}
+ test? (
+ dev-python/pytest[${PYTHON_USEDEP}]
+ net-misc/rsync[xattr]
+ )"
+
+RESTRICT="test"
+
+python_test() {
+ addwrite /dev/fuse
+ py.test -v tests || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ if use contrib ; then
+ exeinto /usr/share/doc/${PF}/contrib
+ docompress -x /usr/share/doc/${PF}/contrib
+ doexe contrib/*.{py,sh}
+ doman contrib/*.1
+ fi
+
+ if use doc ; then
+ dodoc doc/manual.pdf
+ dohtml -r doc/html/*
+ fi
+}
diff --git a/net-fs/s3ql/s3ql-2.17.1.ebuild b/net-fs/s3ql/s3ql-2.17.1.ebuild
new file mode 100644
index 000000000000..d19cb3ff1f2d
--- /dev/null
+++ b/net-fs/s3ql/s3ql-2.17.1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python3_{4,5} )
+
+inherit distutils-r1
+
+DESCRIPTION="A full-featured file system for online data storage"
+HOMEPAGE="https://bitbucket.org/nikratio/s3ql/"
+SRC_URI="https://www.bitbucket.org/nikratio/s3ql/downloads/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="contrib doc test"
+
+RDEPEND=">=dev-db/sqlite-3.7.0:3
+ dev-python/defusedxml[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/apsw-3.7.0[${PYTHON_USEDEP}]
+ >=dev-python/dugong-3.4[${PYTHON_USEDEP}]
+ >=dev-python/llfuse-1.0[${PYTHON_USEDEP}]
+ dev-python/pycrypto[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ sys-fs/fuse"
+DEPEND="${RDEPEND}
+ test? (
+ dev-python/pytest[${PYTHON_USEDEP}]
+ net-misc/rsync[xattr]
+ )"
+
+RESTRICT="test"
+
+python_test() {
+ addwrite /dev/fuse
+ py.test -v tests || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ if use contrib ; then
+ exeinto /usr/share/doc/${PF}/contrib
+ docompress -x /usr/share/doc/${PF}/contrib
+ doexe contrib/*.{py,sh}
+ doman contrib/*.1
+ fi
+
+ if use doc ; then
+ dodoc doc/manual.pdf
+ dohtml -r doc/html/*
+ fi
+}
diff --git a/net-fs/s3ql/s3ql-2.20.ebuild b/net-fs/s3ql/s3ql-2.20.ebuild
new file mode 100644
index 000000000000..9c3d9019d5a6
--- /dev/null
+++ b/net-fs/s3ql/s3ql-2.20.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python3_{4,5} )
+
+inherit distutils-r1
+
+DESCRIPTION="A full-featured file system for online data storage"
+HOMEPAGE="https://bitbucket.org/nikratio/s3ql/"
+SRC_URI="https://www.bitbucket.org/nikratio/s3ql/downloads/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="contrib doc test"
+
+RDEPEND=">=dev-db/sqlite-3.7.0:3
+ dev-python/defusedxml[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/apsw-3.7.0[${PYTHON_USEDEP}]
+ >=dev-python/dugong-3.4[${PYTHON_USEDEP}]
+ >=dev-python/llfuse-1.0[${PYTHON_USEDEP}]
+ dev-python/pycrypto[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ sys-fs/fuse"
+DEPEND="${RDEPEND}
+ test? (
+ dev-python/pytest[${PYTHON_USEDEP}]
+ net-misc/rsync[xattr]
+ )"
+
+RESTRICT="test"
+
+python_test() {
+ addwrite /dev/fuse
+ py.test -v tests || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ if use contrib ; then
+ exeinto /usr/share/doc/${PF}/contrib
+ docompress -x /usr/share/doc/${PF}/contrib
+ doexe contrib/*.{py,sh}
+ doman contrib/*.1
+ fi
+
+ if use doc ; then
+ dodoc doc/manual.pdf
+ dodoc -r doc/html
+ fi
+}
diff --git a/net-fs/s3ql/s3ql-2.21.ebuild b/net-fs/s3ql/s3ql-2.21.ebuild
new file mode 100644
index 000000000000..e0e4b6b43963
--- /dev/null
+++ b/net-fs/s3ql/s3ql-2.21.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python3_{4,5,6} )
+
+inherit distutils-r1
+
+DESCRIPTION="A full-featured file system for online data storage"
+HOMEPAGE="https://bitbucket.org/nikratio/s3ql/"
+SRC_URI="https://www.bitbucket.org/nikratio/s3ql/downloads/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="contrib doc test"
+
+RDEPEND=">=dev-db/sqlite-3.7.0:3
+ dev-python/defusedxml[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/apsw-3.7.0[${PYTHON_USEDEP}]
+ >=dev-python/dugong-3.4[${PYTHON_USEDEP}]
+ >=dev-python/llfuse-1.0[${PYTHON_USEDEP}]
+ dev-python/pycrypto[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ sys-fs/fuse"
+DEPEND="${RDEPEND}
+ test? (
+ dev-python/pytest[${PYTHON_USEDEP}]
+ net-misc/rsync[xattr]
+ )"
+
+RESTRICT="test"
+
+python_test() {
+ addwrite /dev/fuse
+ py.test -v tests || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ if use contrib ; then
+ exeinto /usr/share/doc/${PF}/contrib
+ docompress -x /usr/share/doc/${PF}/contrib
+ doexe contrib/*.{py,sh}
+ doman contrib/*.1
+ fi
+
+ if use doc ; then
+ dodoc doc/manual.pdf
+ dodoc -r doc/html
+ fi
+}
diff --git a/net-fs/s3ql/s3ql-2.23.ebuild b/net-fs/s3ql/s3ql-2.23.ebuild
new file mode 100644
index 000000000000..e0e4b6b43963
--- /dev/null
+++ b/net-fs/s3ql/s3ql-2.23.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python3_{4,5,6} )
+
+inherit distutils-r1
+
+DESCRIPTION="A full-featured file system for online data storage"
+HOMEPAGE="https://bitbucket.org/nikratio/s3ql/"
+SRC_URI="https://www.bitbucket.org/nikratio/s3ql/downloads/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="contrib doc test"
+
+RDEPEND=">=dev-db/sqlite-3.7.0:3
+ dev-python/defusedxml[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/apsw-3.7.0[${PYTHON_USEDEP}]
+ >=dev-python/dugong-3.4[${PYTHON_USEDEP}]
+ >=dev-python/llfuse-1.0[${PYTHON_USEDEP}]
+ dev-python/pycrypto[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ sys-fs/fuse"
+DEPEND="${RDEPEND}
+ test? (
+ dev-python/pytest[${PYTHON_USEDEP}]
+ net-misc/rsync[xattr]
+ )"
+
+RESTRICT="test"
+
+python_test() {
+ addwrite /dev/fuse
+ py.test -v tests || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ if use contrib ; then
+ exeinto /usr/share/doc/${PF}/contrib
+ docompress -x /usr/share/doc/${PF}/contrib
+ doexe contrib/*.{py,sh}
+ doman contrib/*.1
+ fi
+
+ if use doc ; then
+ dodoc doc/manual.pdf
+ dodoc -r doc/html
+ fi
+}
diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest
new file mode 100644
index 000000000000..ad93e8fbc7fe
--- /dev/null
+++ b/net-fs/samba/Manifest
@@ -0,0 +1,36 @@
+AUX 4.2/samba4.confd 1783 SHA256 53755809cc27fdbaf98752cd3da45b5c2bda62dd46fcc37570c6e237f7954ffa SHA512 6fc7edf192957f97b171c97482317bf563385917cfdbf950ed28d9387961bd16f82844c6f9b5c430508ec6dc7331ecdf5f81fa3135663316061c1d0b1808f53d WHIRLPOOL 868539ecf658f9da3574847cb1447dafe422c60a9208de5580cf7f53e4346e9c7d1c6b3e7ea5c684b83e613dd912c5245ffce6a43bc8bd9bf8417a9c7a5f2557
+AUX 4.2/samba4.initd-r1 1103 SHA256 d40c512760bc0cc56629429219e1eadbcee23aa12ec5b3145f679ed644d0912c SHA512 8627b32446afed2cf1238eafc0f154ddb6c16857ee96f959e47f8d485b7317354afe59a08fcb3adbd17da087069cf2b94020a44b9190d597b40afd0b8aedf9a5 WHIRLPOOL 8f446f2f5302582e162c9eefc679b5037df33d988484aa1773eac732740dbed4e43f771ce9ab93c0a0427f9f90db9c760ab281427e229748640924f91eada32e
+AUX 4.4/samba4.confd 1783 SHA256 53755809cc27fdbaf98752cd3da45b5c2bda62dd46fcc37570c6e237f7954ffa SHA512 6fc7edf192957f97b171c97482317bf563385917cfdbf950ed28d9387961bd16f82844c6f9b5c430508ec6dc7331ecdf5f81fa3135663316061c1d0b1808f53d WHIRLPOOL 868539ecf658f9da3574847cb1447dafe422c60a9208de5580cf7f53e4346e9c7d1c6b3e7ea5c684b83e613dd912c5245ffce6a43bc8bd9bf8417a9c7a5f2557
+AUX 4.4/samba4.initd-r1 1103 SHA256 d40c512760bc0cc56629429219e1eadbcee23aa12ec5b3145f679ed644d0912c SHA512 8627b32446afed2cf1238eafc0f154ddb6c16857ee96f959e47f8d485b7317354afe59a08fcb3adbd17da087069cf2b94020a44b9190d597b40afd0b8aedf9a5 WHIRLPOOL 8f446f2f5302582e162c9eefc679b5037df33d988484aa1773eac732740dbed4e43f771ce9ab93c0a0427f9f90db9c760ab281427e229748640924f91eada32e
+AUX nmbd.service 224 SHA256 a5e25c11714206c4fb129333dd45152c5753716c6445cbe78c28275df1a1cb77 SHA512 098dfb270c5a5c29f59b4fd8d51b17931771e25e481124832f1a086677825527e2afa7276e8614e5007fbf044d253ce2eaf3a7caf7461ad5d90d0b1c7f157f9d WHIRLPOOL 2f7c342a60c09d5e40e968a026aa17d8c2fe3fd032331c7bb26599bb0f8ec8a77c2a3e329498ed16b1602451fd85a8ef076c436e8a092740cfbd01a82ca52e30
+AUX samba-4.2.3-heimdal_compilefix.patch 819 SHA256 6cf93d127aa900c1e9a4fb8a3bdff6054d78a7adb798c6f409feffc13c714ee9 SHA512 0f6ddbf58e5d5b83e3fb9738dd10c2ab0f1ed96fb62f9b4389a40729b3fe2d4af1a5c5bd2d44fa7d568136072b787b6358aeca3026f1acec4f5a6869e74f2536 WHIRLPOOL 882a52598013a40165d87616eaa016139fa89ff218dc43a6e6518123ccc18ca84e4ba275731e10ec762b22f26576eac56ad6b257cfae2e1cbc45f518a0d37007
+AUX samba-4.2.7-pam.patch 1273 SHA256 e1abd99fcf4ff721dafa64c77a60b07962e3e818eaf5d10fecead61a2af81e07 SHA512 5f900ebfdfb15af38814864f7ec8cd52d3525098d6f2017ab2f29d301e6a0e622d2ab37976fbd97180cbfe23c7853e91ab7966655eb46ebd9bdd2951205e46bc WHIRLPOOL 91e1fc2e49944d1ded93d902fc50437763388a12b8c2eab70e2dcd8124860746c71fa8b4c26e7b43e5ebc2c0fc94c4c005a2c1eb8b9af68e77c9c6cc1d92927c
+AUX samba-4.4.0-pam.patch 895 SHA256 a7f91da7da039346e9497addef7e644ef1290b5915a43fb9cc76200294022eb7 SHA512 5a00c6131c372fc1cc9e23e4a37314442bf9af8e420a040a7b20ec3d76a357959d456437ed13e2e17f938eb6dcb4e7c5d899ff3d670526b0a444f63e35d5262c WHIRLPOOL 48e4853bb284ba0bf54262a951ae8045075179c51dbb27689a31c0eba61f1ddb707e1adf62e5e67940c239ea7bc4d1691e6eb8d21781fd9fb30cb76a32cc229b
+AUX samba-4.5.1-compile_et_fix.patch 762 SHA256 49039beb8e96139b32c733e876f6dbdfb764dc51fc3b963d5485aad33641628b SHA512 9605751653dcbbce41be807a9b4f8e5f657db6622f843e91c4df9c4b3e4ad621b6e8e3891f2b970208d55a80801355988f253e3c844ca51a658cd6de8c373e24 WHIRLPOOL 93e57f6c5cff7a1b24a71cce6c584f2a12560b38a5841bf888e6f5d8323801b4aa7ac5fe1bf06cdd7739d284509c07f465c03a07de1b9aa03d7c9988a59cb4c2
+AUX samba.conf 61 SHA256 e4fc68bc14a44e3c452e767d996ff693d131da317eb513de10d752dd96cb6f12 SHA512 4a75185762c90d110c399215fbfc939d30804b558ffdb11cc68dee6f87a94c86cadbcd63935884db1266cf40fe24fefb75f9067fe4751ad9838d7a43e8973b9e WHIRLPOOL ad21bc3738c2ec721ad3be746c66719385390835c7f4da881fc0cc1c982bb6821a56300157b1169d1a35264e44dab1a0c29cd9919455a02a8f4c53c665a4bed3
+AUX samba.service 199 SHA256 0ae738fa2a15b476dbca016dfa4e1cf4b8c4a575e13edf518eb70b615c02a059 SHA512 eb277917f15de958f4a0404b66c6d2cc82ae4319b85f2f442489988d523bf92e2a9d23a6051ee693cd4bcfbc67947e8028c59906ad3e537578daf5caee8a6f16 WHIRLPOOL 1132081b63b1e0e1a9342d59493ebfe1d918133a4091e48c42dae7845dcaa24a0b8e7a1183d5a41b0173c3f6dbc17838a9b7a6297fc8ea0775ab150a22ae3151
+AUX smbd.service 250 SHA256 e1f5da902cd97891852f6463b2c7eddbc61e7fbd3e3c281028a806319627fc68 SHA512 a54e3c337f7c27766a81f68ad6d8f4eb6ddb1d1aec3303f274e419a49114755bc5dd711701d5e64954ae7153a8be4a7063371af286696c0b81d543b9276703c3 WHIRLPOOL 18b6a57603a41303d207249fdb46cb4f6e887f8b9bd4921dca6b4f28a59951368d6abead2dc9d3be2c09cb2c9f295087ef5f20d121a309791b9031e3fad28b13
+AUX smbd.socket 121 SHA256 d62a239cba39ae03dbb7a291843b2c202973341c85d93ffc87b4e78813be44c2 SHA512 2db4a707fcc6ef1928ac010e5e92cdaf0f6ff3ffa8aef918e0db1ce910abfb481d6a19082337f9c8444cd780d1d442fa8df2bb65e6142fc109d29657532572ed WHIRLPOOL aef792f27a7cd91ee258b6137015269cf2e6310c24a060acb7c6a97162aaebe37f32f66e46f4399cd1160bcc65e5608da7bc87bf933bccd2ffdfe51a6a7cdd8d
+AUX smbd_at.service 145 SHA256 909dddfd80982035739081d86d2c524f6a25440d9c10b8a80626d9b4eee424cd SHA512 e6486c35dfa6f77ad46547a78fcae55fb71e4dad7dc7b4580c2b8c1be232c0a870f56714b2b103a1fd8717298f41347d7178fbebb90f0f2d0324fe5233f0f9f3 WHIRLPOOL f5ac03a1e7b653458d49fa2c2afe674e9d8f1e5a81e72a5e49781de3e5111bbe23eedc38c78a6f5e7edc4c32300ddaf76caf889de256fc799cf117edcd6ce6fb
+AUX talloc-disable-python.patch 1706 SHA256 005dabcd79697577ea3ad0c5e65c0c0511492ba925c2af87b655acb91fbdcb2d SHA512 ac0bf82e8ed8b918a5efbdeb0a6cbaaef22bb72231abb09026637d62b8ce35b25212960d26c07abe63661328ab7ea8a82590cd93f04de583e23239211daf6efa WHIRLPOOL 9b18876c86af3d9211c87137ba628b0bb4f0b69cd961eb75b9ed1de461d9a157c75fc7605cba63f5024544d3bbb7270027894074a3d8cec03d99456153d1e9fb
+AUX winbindd.service 240 SHA256 755036bc419cce90200ac3c04986fbb7cf718c128c2a1288c634658bb779bf3a SHA512 f1ce6d035e8e0fcdc73f14e3b60c9647043777ff6b2a982a81ed07eb4df5ff245a9511e3e4a9d8163f9c8f3fb86d2a39a67621ace68392eb7c2f2e2a55d587f7 WHIRLPOOL eb4d7f30b4ce3341e3d24a6c05965bdce9ded78a7327b44d3d04d00837d6e8109857b1fb1b78c8325680588cf9abe94158755a962fb8f7e8dac04b336308c268
+DIST samba-4.2.14.tar.gz 20883281 SHA256 db820a9947e44f04b0eb25e4aa0c3db32c4042fca541775ee8e2905093e888e6 SHA512 269dd74ba788657434f51ac70953a293c94bcf98280eaa6f44634c5da54169a5ea7865d543a7c23860c4750a40cdee7caeaf5c7fc3dbc137f444e90f31a09890 WHIRLPOOL 925369c2f9c222d718bf4aacc7b1a83b8275acd96bbc1eca52ad96c86847327807560674ee9b180173d17a1e6109307ec4f70f1acbebe2efc8a9e67f2141e17d
+DIST samba-4.5.10.tar.gz 20989431 SHA256 7cb753f5f6d5527ef40d4c1f47dacafb7c876cb304b4906ccb390c6a18477714 SHA512 046bae9c66083a4fe656d6a7b02b64343c66e0ea4925193a898dbda107b5b158d1897f16c36f4c393a30457a49215fa6ef91720367f4946760ec48ce02a4a68a WHIRLPOOL 2359a40337c2a85c17e3c860a8531c21ec5cf3c180dfd5a1e554f2eb5e10576a8b706464d490e008af441d9ce6a14043112d621d8e140461806c97947362933a
+DIST samba-4.5.11-disable-python-patches.tar.xz 6292 SHA256 8db451910c3d46fc715203e0b674c49846528cf864c381520dc93de20a3637d3 SHA512 f0e3076e3e1ecaae3f06b3ef30efc81719fb3f63a1041dcbdae4b62ca4cf693732f9eb16f047d046d4930136fed82194e82b455ea888e12cf845b3e6a122d57d WHIRLPOOL 641d429fc4865e12e89bad28110b03ca87c6b658f59943f4d44c0b3a91fc49b5dc90e496a8a9d391c2897aec87fc43ea1c9a26084f3394b1883ad9755fd0eca3
+DIST samba-4.5.13.tar.gz 21013879 SHA256 5fc4762d2259469bfb0067c10f77378cb720f2ebdaf2f37b5ca1918dbe84d04d SHA512 c495dffeee4dd83d710182713c8a0e6730f250fab2d03b62cc0f5354497fbc41d5140d7dea5c4089c026a7e9b820e48c94806bbc44b6594c9e5bad977793eb4a WHIRLPOOL 9e720801f44ac7fab65c748dd24c52763b8568d1af73b64006d847c53604df0a7f3d4febeac2dd467c2fd1c3940b86253c37f99e2e2f39028d43acc4f99668ee
+DIST samba-4.5.14.tar.gz 21016317 SHA256 15dc04fd2b19081daf1118318f43f88ef7260b3fc6e4f86ee7c7913bb7c92ed9 SHA512 35b6ec38b6750ebdd387eade3c7a1f61c83a4d6642c9a2a8a811d84b506c9f20ed69fa1db9065852ce792fd769fe151177200cdd55de308017cd5416f80eb095 WHIRLPOOL b374abd1439072ab16d84f12b4876f4c44c8d34b734e3c4a0b909e685bb3eb1f02f5b58d9c8173909f2154e97d3e60743646252818a527358ba7316f5a348140
+DIST samba-4.6.7-disable-python-patches.tar.xz 8896 SHA256 33702adba80e9886625fda8cba46d4017ae603f5d9cf9d3dc78e5ef30ff6f5eb SHA512 c45e548a49735e17b568bebf07dc7409de3de0f93256d1dcf345d2723a27d22a51d860ed921785354fda691f83be4eca3b9d618d5c332438ebf97518a01983eb WHIRLPOOL 1cb176480b8583369e1085c8e122958112c0d13aa8ba78cd57dfd04b17c7d8f0a0664a43d277deba86775f1944eab052f4fb9459f64506215ae25184c86cbe40
+DIST samba-4.6.8.tar.gz 21139872 SHA256 581deeb2543f5cedcb556cb950d0e82690d9f0cd33811d76624502ca0c32575d SHA512 fb40144210361bdeab09007aa49fa85077fbc8eeae2c49bcdafb01d33ec40425160882979f0829005a89766ed4fd4e36d7f952f6dbf6e0178f5b0945dc8d8efb WHIRLPOOL d669df156dcae5846d814eb30f577b9df0513383be91a87886b91dff12451d82c236dd7c1fd996a378d90619aabee5adc33ecd488534b612b8f82b7b88d0840a
+DIST samba-4.7.0.tar.gz 16830569 SHA256 bd16d169988eb513e685a87e9964a5210482498fa9b3a22aaa8287a061e3c936 SHA512 c69da34566ec672ed17f86ecf793154374c71dd33b588adceed5fbd9345d978a4ffeced5d3a4033edb4daedac2294ed088beed8cdde19724f9d03da54e22e4ee WHIRLPOOL d2635df77e8dc82d0a6aeb345eebf5616fba1ab826b90aedac1f49669ff7faae8845737267c908956ade1904a2c85e918b6db678197e3a6c1f35f78ccc78021f
+DIST samba-disable-python-patches-4.2.12.tar.xz 6052 SHA256 8903eacbabdfaf7b64cbde03d7c367d1efdc92e54090f0f4b9ed5d2a462b1c18 SHA512 c527d0a052d3211e5b12c17bc94db56cc5e5545189ed65a760c0656c94c22e27a4b159e6439eb0370873e1619873a741f3b3bd10d3876b38eb3914a87eace372 WHIRLPOOL ad63db55d5dc96f56e6c9b30c2092e2f6e206b0ed5d13c249879d10753c8db2f475c5d4e651e2fc042ad992b648d3b4465f1b28c6b4bbf821cf503d27f741f7e
+DIST samba-disable-python-patches-4.5.0_rc1.tar.xz 6204 SHA256 fa0d776e04e3222c0dc4761e376717f4154937cdcb85f4117b8978dfb770a78e SHA512 920089ba3c6e8e7d913b1d7ef1017262a19d1af41215adb30cfc98a57556efc4b0116931d4ef774c01124149d8eca2be3a23814ce7e11daf0180d2c111799927 WHIRLPOOL 6d55710895435ad012e23f8c252e5276966241014710349ca7fa9cf037e8742030b8e053f7cb71309a0a45f48d2235d55393243bf4d19476a22dd39bb1b7748d
+EBUILD samba-4.2.14.ebuild 7041 SHA256 c5e6ea8d2e28ef6ee10976157d16c11c1f8708fc18b321ad1a39ea4e9c4a06e5 SHA512 26eaf948b1b631347434603d01cb727feb1b25e5e1cc936086a7790aaccabbc6d2e0e0c0dc4b6ee76beab6ee8ed959f9c875b2940c96c497ce300b4306eb23ff WHIRLPOOL ea78ed40e61c52258fc6a66468bfbf4b0c540d91a017b50bf858583448d650d5f042af2237368b629d50f82292b9b32f2cd43534a910b2fc3008cf475ee10bee
+EBUILD samba-4.5.10-r1.ebuild 7732 SHA256 25dca274a37d51734f784a3d619f452c661665912e0928ea9d8ef1ab60821472 SHA512 ec4cf6f818c64bda6458a3f21476d5c1511a3e2aaf26a637789775fd99f34486dadbec61e513f986d78b47445625b7ba79c1e6574b4b193bd377f5fe54813c6f WHIRLPOOL 775d59dd8059c8e93a3330da48fea13a5b655cdf5f4dc98aea81a58536d0ec8ee9e7074050dbb096de73f5a4d20e9bda1ca0c1a864859838c58c67086804a629
+EBUILD samba-4.5.13.ebuild 7797 SHA256 31b9e91ac0a2ef2711b17a346a5a43b32dd1116cf0ad5611668b997adb09adf2 SHA512 a45c3285315eb47503df08dd9c027f75b31c5450da026108487d24ea3cdae88129ea9f886fec716b6fbbc995ee32f83d78714b2494f75006979d01e0965a2076 WHIRLPOOL f75074ea63cc5fde0e167b046665df978439ef027df6c74f04395fa072b4af872139ba898fec9665dbc6fc7cdd051cef0af1cf9a847b09bdf234fabe11b66152
+EBUILD samba-4.5.14.ebuild 7797 SHA256 31b9e91ac0a2ef2711b17a346a5a43b32dd1116cf0ad5611668b997adb09adf2 SHA512 a45c3285315eb47503df08dd9c027f75b31c5450da026108487d24ea3cdae88129ea9f886fec716b6fbbc995ee32f83d78714b2494f75006979d01e0965a2076 WHIRLPOOL f75074ea63cc5fde0e167b046665df978439ef027df6c74f04395fa072b4af872139ba898fec9665dbc6fc7cdd051cef0af1cf9a847b09bdf234fabe11b66152
+EBUILD samba-4.6.8-r1.ebuild 8541 SHA256 44f5bc8303cd3530bd9d386f1ff949c7f0019f19d97ffa139787b07e3787a80b SHA512 c9a846198e58746952e74a619316757f8f40891570484cc4e2950a5ba28d91aff198c7de8161735a9239ed1dfc2e6c4d657e0db08d2a46f9ea95705e0910a16f WHIRLPOOL 4ee11b357f9a49fdcb69c64d241c5d3322bc28f331a695e0d9d58b7475b5aeb9e2c87ccb58e124db87b809a6ca9c926166a23cba2b614e7835ec866ae1cf4b22
+EBUILD samba-4.7.0-r1.ebuild 8353 SHA256 86810a734d6688cf2689d8223e4ca9d264ef74b5ce26d1618640448210a5301e SHA512 258f093ca130fdd1132a5aac3ed825e6e1e954490067d04df414061451198a5538112d9d1319c6b57d49bd10b2d7f106f14f82fbd8892670149b2562c12eca69 WHIRLPOOL d61ca69d1f4a7ef730cdd37e464403c38a55dab8e3ac543ab3e348d359f9622dba7f1ae6aa6b67b2da36eed80435570bba566056164d485d39cf70ca07b4ae6a
+MISC ChangeLog 29865 SHA256 9fdf9b583855db807230f491b4957583779bda1b46807e5a1f3fc3f16a584322 SHA512 6ac0456dcf57a73cb9ca984623b5fb4512b9cbcfd9189c3cbeeac5b2135aee2dbb99114e838c8f6438388d948da4ea7fe15712a38bcf834c75d414c538f460b4 WHIRLPOOL 271a5a1c45a6a6b5d41173c677e3c48053bf2aae078098ebdd8ab6de31defd2bbbc6679bbeca8f7a6426edeec9692ad2e86ff465ed7459f5800089ec1abc7a84
+MISC ChangeLog-2013 106689 SHA256 00ac832a137c7ce1d21be794b45339e1f4e9c51eb1b796cbcac90a03e1cf5453 SHA512 9dc4e4e22042db7f5ff3a474eb7a454044ea6958ffc3ba5c5de6f09608cfbbcaed8db00763a38995276de03a5f1c728fc783d4addaca7da16f4be76a4e49fd6f WHIRLPOOL 85a746ae34c0386ecb151f5f323b92615cce971b1e46f249cccfdc682bdddd7dad080dd4ffbe5748f093ee11db3f5182cae6d85191a37014639a56040eff9644
+MISC ChangeLog-2015 11570 SHA256 700ea64c0586d7957e3ef95425683f9bd711ae4311c7cd19575b6d1cdd814e94 SHA512 8d5d99a08a409db4cf8c8e9c3a82a080de66d9aac6ff39e53bb6eb5eeadb625d0ebd07c6fc81bce1755d2441ab91d96f90787d3975814f572e2ce2a366038299 WHIRLPOOL 340948bfd379c419985c93c21a543bb10d10a0c95c8ec2cf1d01697a3e47613b2b6e9f2292c1d03f353121a39b6be809ba432535ccab67b71adf333c69c5bc2e
+MISC metadata.xml 1535 SHA256 e52ce6fb55ee494bc4ed348148a75f496df1fcc5282795c58155d3d770816a4e SHA512 478534265c8b41cc907fd27b7bfdba056a5949d9a6d1c0dec16572eebd7c9eefed24cb625a15f36f457fad0bd321063f0ffe2ed764415f3c09c61458b0751baf WHIRLPOOL dd7e58a5eda413342d65e117d1020c2a11befe5b1577c0569a4c4749b0ca4592a6d086b03079f1e271b375f700868b57e5a9ed7d404e8d3201d1b73c558e7f76
diff --git a/net-fs/samba/files/4.2/samba4.confd b/net-fs/samba/files/4.2/samba4.confd
new file mode 100644
index 000000000000..58b2c7827bdf
--- /dev/null
+++ b/net-fs/samba/files/4.2/samba4.confd
@@ -0,0 +1,38 @@
+# Add "winbind" to the daemon_list if you also want winbind to start.
+# Replace "smbd nmbd" by "samba4" if you want the active directory domain controller part or the ntvfs
+# file server part or the rpc proxy to start.
+# Note that samba4 controls 'smbd' by itself, thus it can't be started manually. You can, however,
+# tweak the behaviour of a samba4-controlled smbd by modifying your '/etc/samba/smb.conf' file
+# accordingly.
+daemon_list="smbd nmbd"
+
+#----------------------------------------------------------------------------
+# Daemons calls: <daemon_name>_<command_option>
+#----------------------------------------------------------------------------
+my_service_name="samba"
+my_service_PRE="unset TMP TMPDIR"
+my_service_POST=""
+
+#----------------------------------------------------------------------------
+# Daemons calls: <daemon_name>_<command_option>
+#----------------------------------------------------------------------------
+smbd_start_options="-D"
+smbd_start="start-stop-daemon --start --exec /usr/sbin/smbd -- ${smbd_start_options}"
+smbd_stop="start-stop-daemon --stop --exec /usr/sbin/smbd"
+smbd_reload="killall -HUP smbd"
+
+nmbd_start_options="-D"
+nmbd_start="start-stop-daemon --start --exec /usr/sbin/nmbd -- ${nmbd_start_options}"
+nmbd_stop="start-stop-daemon --stop --exec /usr/sbin/nmbd"
+nmbd_reload="killall -HUP nmbd"
+
+samba4_start_options=""
+samba4_start="start-stop-daemon --start --exec /usr/sbin/samba -- ${samba4_start_options}"
+samba4_stop="start-stop-daemon --stop --exec /usr/sbin/samba"
+samba4_reload="killall -HUP samba"
+
+winbind_start_options=""
+winbind_start="start-stop-daemon --start --exec /usr/sbin/winbindd -- ${winbind_start_options}"
+winbind_stop="start-stop-daemon --stop --exec /usr/sbin/winbindd"
+winbind_reload="killall -HUP winbindd"
+
diff --git a/net-fs/samba/files/4.2/samba4.initd-r1 b/net-fs/samba/files/4.2/samba4.initd-r1
new file mode 100644
index 000000000000..52a9b68bba80
--- /dev/null
+++ b/net-fs/samba/files/4.2/samba4.initd-r1
@@ -0,0 +1,55 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+extra_started_commands="reload"
+piddir="/run/samba"
+
+depend() {
+ after slapd
+ need net
+ use cupsd
+}
+
+DAEMONNAME="${SVCNAME##samba.}"
+[ "${DAEMONNAME}" != "samba" ] && daemon_list=${DAEMONNAME}
+
+signal_do() {
+ local signal="$1"
+ [ -z "${signal}" ] && return 0
+
+ local result=0 last_result=0 daemon= cmd_exec=
+ for daemon in ${daemon_list} ; do
+ eval cmd_exec=\$${daemon}_${signal}
+ if [ -n "${cmd_exec}" ]; then
+ ebegin "${my_service_name} -> ${signal}: ${daemon}"
+ #echo ${cmd} '->' ${!cmd}
+ ${cmd_exec} > /dev/null
+ last_result=$?
+ eend ${last_result}
+ fi
+ result=$(( ${result} + ${last_result} ))
+ done
+ return ${result}
+}
+
+start() {
+ ${my_service_PRE}
+ [ -d "${piddir}" ] || mkdir -p "${piddir}"
+ signal_do start && return 0
+
+ eerror "Error: starting services (see system logs)"
+ signal_do stop
+ return 1
+}
+stop() {
+ ${my_service_PRE}
+ if signal_do stop ; then
+ ${my_service_POST}
+ return 0
+ fi
+}
+reload() {
+ ${my_service_PRE}
+ signal_do reload
+}
diff --git a/net-fs/samba/files/4.4/samba4.confd b/net-fs/samba/files/4.4/samba4.confd
new file mode 100644
index 000000000000..58b2c7827bdf
--- /dev/null
+++ b/net-fs/samba/files/4.4/samba4.confd
@@ -0,0 +1,38 @@
+# Add "winbind" to the daemon_list if you also want winbind to start.
+# Replace "smbd nmbd" by "samba4" if you want the active directory domain controller part or the ntvfs
+# file server part or the rpc proxy to start.
+# Note that samba4 controls 'smbd' by itself, thus it can't be started manually. You can, however,
+# tweak the behaviour of a samba4-controlled smbd by modifying your '/etc/samba/smb.conf' file
+# accordingly.
+daemon_list="smbd nmbd"
+
+#----------------------------------------------------------------------------
+# Daemons calls: <daemon_name>_<command_option>
+#----------------------------------------------------------------------------
+my_service_name="samba"
+my_service_PRE="unset TMP TMPDIR"
+my_service_POST=""
+
+#----------------------------------------------------------------------------
+# Daemons calls: <daemon_name>_<command_option>
+#----------------------------------------------------------------------------
+smbd_start_options="-D"
+smbd_start="start-stop-daemon --start --exec /usr/sbin/smbd -- ${smbd_start_options}"
+smbd_stop="start-stop-daemon --stop --exec /usr/sbin/smbd"
+smbd_reload="killall -HUP smbd"
+
+nmbd_start_options="-D"
+nmbd_start="start-stop-daemon --start --exec /usr/sbin/nmbd -- ${nmbd_start_options}"
+nmbd_stop="start-stop-daemon --stop --exec /usr/sbin/nmbd"
+nmbd_reload="killall -HUP nmbd"
+
+samba4_start_options=""
+samba4_start="start-stop-daemon --start --exec /usr/sbin/samba -- ${samba4_start_options}"
+samba4_stop="start-stop-daemon --stop --exec /usr/sbin/samba"
+samba4_reload="killall -HUP samba"
+
+winbind_start_options=""
+winbind_start="start-stop-daemon --start --exec /usr/sbin/winbindd -- ${winbind_start_options}"
+winbind_stop="start-stop-daemon --stop --exec /usr/sbin/winbindd"
+winbind_reload="killall -HUP winbindd"
+
diff --git a/net-fs/samba/files/4.4/samba4.initd-r1 b/net-fs/samba/files/4.4/samba4.initd-r1
new file mode 100644
index 000000000000..52a9b68bba80
--- /dev/null
+++ b/net-fs/samba/files/4.4/samba4.initd-r1
@@ -0,0 +1,55 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+extra_started_commands="reload"
+piddir="/run/samba"
+
+depend() {
+ after slapd
+ need net
+ use cupsd
+}
+
+DAEMONNAME="${SVCNAME##samba.}"
+[ "${DAEMONNAME}" != "samba" ] && daemon_list=${DAEMONNAME}
+
+signal_do() {
+ local signal="$1"
+ [ -z "${signal}" ] && return 0
+
+ local result=0 last_result=0 daemon= cmd_exec=
+ for daemon in ${daemon_list} ; do
+ eval cmd_exec=\$${daemon}_${signal}
+ if [ -n "${cmd_exec}" ]; then
+ ebegin "${my_service_name} -> ${signal}: ${daemon}"
+ #echo ${cmd} '->' ${!cmd}
+ ${cmd_exec} > /dev/null
+ last_result=$?
+ eend ${last_result}
+ fi
+ result=$(( ${result} + ${last_result} ))
+ done
+ return ${result}
+}
+
+start() {
+ ${my_service_PRE}
+ [ -d "${piddir}" ] || mkdir -p "${piddir}"
+ signal_do start && return 0
+
+ eerror "Error: starting services (see system logs)"
+ signal_do stop
+ return 1
+}
+stop() {
+ ${my_service_PRE}
+ if signal_do stop ; then
+ ${my_service_POST}
+ return 0
+ fi
+}
+reload() {
+ ${my_service_PRE}
+ signal_do reload
+}
diff --git a/net-fs/samba/files/nmbd.service b/net-fs/samba/files/nmbd.service
new file mode 100644
index 000000000000..44b4ffba1f7f
--- /dev/null
+++ b/net-fs/samba/files/nmbd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Samba NetBIOS name server
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/samba/nmbd.pid
+ExecStart=/usr/sbin/nmbd -D
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-fs/samba/files/samba-4.2.3-heimdal_compilefix.patch b/net-fs/samba/files/samba-4.2.3-heimdal_compilefix.patch
new file mode 100644
index 000000000000..c6f50073317a
--- /dev/null
+++ b/net-fs/samba/files/samba-4.2.3-heimdal_compilefix.patch
@@ -0,0 +1,22 @@
+https://bugs.gentoo.org/542638
+
+From: Stephan Wolf <stephan@letzte-bankreihe.de>
+
+Samba uses the build in implementation of heimdal from year 2011.
+The ebuild uses the portage version of heimdal.
+I got it fixed to patch samba kdc_init function.
+
+--- samba-4.2.3/source4/kdc/kdc.c
++++ samba-4.2.3/source4/kdc/kdc.c
+@@ -967,9 +967,9 @@
+ * The old behavior in the _kdc_get_preferred_key()
+ * function is use_strongest_server_key=TRUE.
+ */
+- kdc->config->as_use_strongest_session_key = false;
++ kdc->config->tgt_use_strongest_session_key = false;
+ kdc->config->preauth_use_strongest_session_key = false;
+- kdc->config->tgs_use_strongest_session_key = false;
++ kdc->config->svc_use_strongest_session_key = false;
+ kdc->config->use_strongest_server_key = true;
+
+ /* Register hdb-samba4 hooks for use as a keytab */
diff --git a/net-fs/samba/files/samba-4.2.7-pam.patch b/net-fs/samba/files/samba-4.2.7-pam.patch
new file mode 100644
index 000000000000..22b393e78677
--- /dev/null
+++ b/net-fs/samba/files/samba-4.2.7-pam.patch
@@ -0,0 +1,36 @@
+--- samba-4.2.7/source3/wscript
++++ samba-4.2.7/source3/wscript
+@@ -853,11 +853,11 @@
+ if not conf.CHECK_FUNCS_IN('iconv_open', 'iconv', headers='iconv.h'):
+ conf.env.with_iconv = False
+ if conf.env.with_iconv:
+ conf.DEFINE('HAVE_ICONV', 1)
+
+- if Options.options.with_pam:
++ if Options.options.with_pam != False:
+ use_pam=True
+ conf.CHECK_HEADERS('security/pam_appl.h pam/pam_appl.h')
+ if not conf.CONFIG_SET('HAVE_SECURITY_PAM_APPL_H') and not conf.CONFIG_SET('HAVE_PAM_PAM_APPL_H'):
+ Logs.warn("--with-pam=yes but pam_appl.h not found")
+ use_pam=False
+@@ -926,10 +926,20 @@
+ msg="Checking whether PAM_RADIO_TYPE is available");
+ if use_pam:
+ conf.DEFINE('WITH_PAM', 1)
+ conf.DEFINE('WITH_PAM_MODULES', 1)
+
++ else:
++ Logs.warn("PAM disabled")
++ use_pam=False
++ conf.undefine('WITH_PAM')
++ conf.undefine('WITH_PAM_MODULES')
++ conf.undefine('HAVE_SECURITY_PAM_APPL_H')
++ conf.undefine('PAM_RHOST')
++ conf.undefine('PAM_TTY')
++ conf.undefine('HAVE_PAM_PAM_APPL_H')
++
+ if Options.options.with_pam_smbpass:
+ conf.env.with_pam_smbpass = True
+
+ seteuid = False
+
diff --git a/net-fs/samba/files/samba-4.4.0-pam.patch b/net-fs/samba/files/samba-4.4.0-pam.patch
new file mode 100644
index 000000000000..451601383d4b
--- /dev/null
+++ b/net-fs/samba/files/samba-4.4.0-pam.patch
@@ -0,0 +1,29 @@
+--- samba-4.4.0rc2/source3/wscript
++++ samba-4.4.0rc2/source3/wscript
+@@ -870,7 +870,7 @@
+ if conf.env.with_iconv:
+ conf.DEFINE('HAVE_ICONV', 1)
+
+- if Options.options.with_pam:
++ if Options.options.with_pam != False:
+ use_pam=True
+ conf.CHECK_HEADERS('security/pam_appl.h pam/pam_appl.h')
+ if not conf.CONFIG_SET('HAVE_SECURITY_PAM_APPL_H') and not conf.CONFIG_SET('HAVE_PAM_PAM_APPL_H'):
+@@ -943,6 +943,17 @@
+ conf.DEFINE('WITH_PAM', 1)
+ conf.DEFINE('WITH_PAM_MODULES', 1)
+
++ else:
++ Logs.warn("PAM disabled")
++ use_pam=False
++ conf.undefine('WITH_PAM')
++ conf.undefine('WITH_PAM_MODULES')
++ conf.undefine('HAVE_SECURITY_PAM_APPL_H')
++ conf.undefine('PAM_RHOST')
++ conf.undefine('PAM_TTY')
++ conf.undefine('HAVE_PAM_PAM_APPL_H')
++
++
+ seteuid = False
+
+ #
diff --git a/net-fs/samba/files/samba-4.5.1-compile_et_fix.patch b/net-fs/samba/files/samba-4.5.1-compile_et_fix.patch
new file mode 100644
index 000000000000..463512f9a9c8
--- /dev/null
+++ b/net-fs/samba/files/samba-4.5.1-compile_et_fix.patch
@@ -0,0 +1,16 @@
+--- samba-4.5.1/source4/heimdal_build/wscript_configure
++++ samba-4.5.1/source4/heimdal_build/wscript_configure
+@@ -258,7 +258,11 @@
+
+ # With the proper checks in place we should be able to build against the system libtommath.
+ #if conf.CHECK_BUNDLED_SYSTEM('tommath', checkfunctions='mp_init', headers='tommath.h'):
+ # conf.define('USING_SYSTEM_TOMMATH', 1)
+
+-check_system_heimdal_binary("compile_et")
+-check_system_heimdal_binary("asn1_compile")
++# comment out next line to stop Gentoo Samba build from using the compile_et in e2fsprogs-libs
++# to compile the error tables. This produces a compile error later on.
++#check_system_heimdal_binary("compile_et")
++#
++# As a precaution do the same for asn1_compile
++#check_system_heimdal_binary("asn1_compile")
diff --git a/net-fs/samba/files/samba.conf b/net-fs/samba/files/samba.conf
new file mode 100644
index 000000000000..e0a6f325cf9a
--- /dev/null
+++ b/net-fs/samba/files/samba.conf
@@ -0,0 +1,2 @@
+D /run/samba 0755 root root
+D /run/lock/samba 0755 root root
diff --git a/net-fs/samba/files/samba.service b/net-fs/samba/files/samba.service
new file mode 100644
index 000000000000..8214ff863182
--- /dev/null
+++ b/net-fs/samba/files/samba.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Samba AD server
+After=network.target winbindd.service
+Conflicts=nmbd.service smbd.service
+
+[Service]
+ExecStart=/usr/sbin/samba --interactive
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-fs/samba/files/smbd.service b/net-fs/samba/files/smbd.service
new file mode 100644
index 000000000000..5c006a44edb6
--- /dev/null
+++ b/net-fs/samba/files/smbd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Samba SMB/CIFS server
+After=network.target nmbd.service winbindd.service
+
+[Service]
+Type=forking
+PIDFile=/var/run/samba/smbd.pid
+ExecStart=/usr/sbin/smbd -D
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-fs/samba/files/smbd.socket b/net-fs/samba/files/smbd.socket
new file mode 100644
index 000000000000..833bf438832f
--- /dev/null
+++ b/net-fs/samba/files/smbd.socket
@@ -0,0 +1,9 @@
+[Unit]
+Description=Samba SMB/CIFS server socket
+
+[Socket]
+ListenStream=445
+Accept=yes
+
+[Install]
+WantedBy=sockets.target
diff --git a/net-fs/samba/files/smbd_at.service b/net-fs/samba/files/smbd_at.service
new file mode 100644
index 000000000000..e1f71be3f7fa
--- /dev/null
+++ b/net-fs/samba/files/smbd_at.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=Samba SMB/CIFS server instance
+
+[Service]
+ExecStart=/usr/sbin/smbd -F
+ExecReload=/bin/kill -HUP $MAINPID
+StandardInput=socket
diff --git a/net-fs/samba/files/talloc-disable-python.patch b/net-fs/samba/files/talloc-disable-python.patch
new file mode 100644
index 000000000000..6ef45eb37fb8
--- /dev/null
+++ b/net-fs/samba/files/talloc-disable-python.patch
@@ -0,0 +1,34 @@
+--- a/lib/talloc/wscript 2017-04-28 04:57:26.000000000 -0400
++++ b/lib/talloc/wscript 2017-07-05 14:30:42.700580464 -0400
+@@ -74,19 +74,22 @@
+ implied_deps='replace'):
+ conf.define('USING_SYSTEM_TALLOC', 1)
+
+- using_system_pytalloc_util = True
+- if not conf.CHECK_BUNDLED_SYSTEM_PKG('pytalloc-util', minversion=VERSION,
+- implied_deps='talloc replace'):
++ if conf.env.disable_python:
+ using_system_pytalloc_util = False
+-
+- # We need to get a pytalloc-util for all the python versions
+- # we are building for
+- if conf.env['EXTRA_PYTHON']:
+- name = 'pytalloc-util' + conf.all_envs['extrapython']['PYTHON_SO_ABI_FLAG']
+- if not conf.CHECK_BUNDLED_SYSTEM_PKG(name, minversion=VERSION,
++ else:
++ using_system_pytalloc_util = True
++ if not conf.CHECK_BUNDLED_SYSTEM_PKG('pytalloc-util', minversion=VERSION,
+ implied_deps='talloc replace'):
+ using_system_pytalloc_util = False
+
++ # We need to get a pytalloc-util for all the python versions
++ # we are building for
++ if conf.env['EXTRA_PYTHON']:
++ name = 'pytalloc-util' + conf.all_envs['extrapython']['PYTHON_SO_ABI_FLAG']
++ if not conf.CHECK_BUNDLED_SYSTEM_PKG(name, minversion=VERSION,
++ implied_deps='talloc replace'):
++ using_system_pytalloc_util = False
++
+ if using_system_pytalloc_util:
+ conf.define('USING_SYSTEM_PYTALLOC_UTIL', 1)
+
diff --git a/net-fs/samba/files/winbindd.service b/net-fs/samba/files/winbindd.service
new file mode 100644
index 000000000000..67a778fc76c7
--- /dev/null
+++ b/net-fs/samba/files/winbindd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Samba Winbind daemon
+After=network.target nmbd.service
+
+[Service]
+Type=forking
+PIDFile=/var/run/samba/winbindd.pid
+ExecStart=/usr/sbin/winbindd -D
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-fs/samba/metadata.xml b/net-fs/samba/metadata.xml
new file mode 100644
index 000000000000..c6b9bbe87e47
--- /dev/null
+++ b/net-fs/samba/metadata.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>samba@gentoo.org</email>
+ <name>Samba Team</name>
+ </maintainer>
+ <longdescription>
+ Samba is an Open Source/Free Software suite that provides seamless file and print services to SMB/CIFS clients. Integration with various accounting and antivirus backends. License: GNU General Public License.
+ </longdescription>
+ <use>
+ <flag name="addc">Enable Active Directory Domain Controller support</flag>
+ <flag name="addns">Enable AD DNS integration</flag>
+ <flag name="ads">Enable Active Directory support</flag>
+ <flag name="aio">Enable asynchronous IO support</flag>
+ <flag name="client">Enables the client part</flag>
+ <flag name="cluster">Enable support for clustering</flag>
+ <flag name="dmapi">Enable support for DMAPI. This currently works only in combination with XFS.</flag>
+ <flag name="gpg">Use <pkg>app-crypt/gpgme</pkg> for AD DC</flag>
+ <flag name="iprint">Enabling iPrint technology by Novell</flag>
+ <flag name="quota">Enables support for user quotas</flag>
+ <flag name="system-heimdal">Use <pkg>app-crypt/heimdal</pkg> instead of
+ bundled heimdal.</flag>
+ <flag name="system-mitkrb5">Use <pkg>app-crypt/mit-krb5</pkg> instead of
+ <pkg>app-crypt/heimdal</pkg>.</flag>
+ <flag name="winbind">Enables support for the winbind auth daemon</flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:samba:samba</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-fs/samba/samba-4.2.14.ebuild b/net-fs/samba/samba-4.2.14.ebuild
new file mode 100644
index 000000000000..1bf4b2e16841
--- /dev/null
+++ b/net-fs/samba/samba-4.2.14.ebuild
@@ -0,0 +1,257 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='threads(+),xml(+)'
+
+inherit python-single-r1 waf-utils multilib-minimal linux-info systemd eutils
+
+MY_PV="${PV/_rc/rc}"
+MY_P="${PN}-${MY_PV}"
+
+SRC_PATH="stable"
+[[ ${PV} = *_rc* ]] && SRC_PATH="rc"
+
+SRC_URI="mirror://samba/${SRC_PATH}/${MY_P}.tar.gz
+ https://dev.gentoo.org/~polynomial-c/samba-disable-python-patches-4.2.12.tar.xz"
+[[ ${PV} = *_rc* ]] || \
+KEYWORDS="alpha amd64 arm hppa ~ia64 ppc ppc64 ~sparc ~x86"
+
+DESCRIPTION="Samba Suite Version 4"
+HOMEPAGE="http://www.samba.org/"
+LICENSE="GPL-3"
+
+SLOT="0"
+
+IUSE="acl addc addns ads aio avahi client cluster cups dmapi fam gnutls iprint
+ldap pam quota selinux syslog +system-mitkrb5 systemd test winbind"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/samba-4.0/policy.h
+ /usr/include/samba-4.0/dcerpc_server.h
+ /usr/include/samba-4.0/ctdb.h
+ /usr/include/samba-4.0/ctdb_client.h
+ /usr/include/samba-4.0/ctdb_protocol.h
+ /usr/include/samba-4.0/ctdb_private.h
+ /usr/include/samba-4.0/ctdb_typesafe_cb.h
+ /usr/include/samba-4.0/ctdb_version.h
+)
+
+# sys-apps/attr is an automagic dependency (see bug #489748)
+CDEPEND="${PYTHON_DEPS}
+ >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
+ dev-lang/perl:=
+ dev-libs/libbsd[${MULTILIB_USEDEP}]
+ dev-libs/iniparser:0
+ dev-libs/popt[${MULTILIB_USEDEP}]
+ sys-libs/readline:=
+ virtual/libiconv
+ dev-python/subunit[${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ >=net-libs/socket_wrapper-1.1.2[${MULTILIB_USEDEP}]
+ sys-apps/attr[${MULTILIB_USEDEP}]
+ sys-libs/libcap
+ >=sys-libs/ldb-1.1.24[ldap(+)?,${MULTILIB_USEDEP}]
+ sys-libs/ncurses:0=[${MULTILIB_USEDEP}]
+ >=sys-libs/nss_wrapper-1.0.2[${MULTILIB_USEDEP}]
+ >=sys-libs/ntdb-1.0[python,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ >=sys-libs/talloc-2.1.2[python,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ >=sys-libs/tdb-1.3.6[python,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ >=sys-libs/tevent-0.9.28[${MULTILIB_USEDEP}]
+ >=sys-libs/uid_wrapper-1.0.1[${MULTILIB_USEDEP}]
+ sys-libs/zlib[${MULTILIB_USEDEP}]
+ acl? ( virtual/acl )
+ addns? ( net-dns/bind-tools[gssapi] )
+ aio? ( dev-libs/libaio )
+ cluster? ( !dev-db/ctdb )
+ cups? ( net-print/cups )
+ dmapi? ( sys-apps/dmapi )
+ fam? ( virtual/fam )
+ gnutls? ( dev-libs/libgcrypt:0
+ >=net-libs/gnutls-1.4.0 )
+ ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] )
+ pam? ( virtual/pam )
+ system-mitkrb5? ( app-crypt/mit-krb5[${MULTILIB_USEDEP}] )
+ !system-mitkrb5? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] )
+ systemd? ( sys-apps/systemd:0= )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ client? ( net-fs/cifs-utils[ads?] )
+ selinux? ( sec-policy/selinux-samba )
+ !dev-perl/Parse-Yapp
+"
+
+REQUIRED_USE="addc? ( gnutls !system-mitkrb5 )
+ ads? ( acl gnutls ldap )
+ ${PYTHON_REQUIRED_USE}"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.2.3-heimdal_compilefix.patch"
+ "${FILESDIR}/${PN}-4.2.7-pam.patch"
+)
+
+CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
+
+WAF_BINARY="${S}/buildtools/bin/waf"
+
+SHAREDMODS=""
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+ if use aio ; then
+ if ! linux_config_exists || ! linux_chkconfig_present AIO; then
+ ewarn "You must enable AIO support in your kernel config, "
+ ewarn "to be able to support asynchronous I/O. "
+ ewarn "You can find it at"
+ ewarn
+ ewarn "General Support"
+ ewarn " Enable AIO support "
+ ewarn
+ ewarn "and recompile your kernel..."
+ fi
+ fi
+ if use cluster ; then
+ SHAREDMODS="${SHAREDMODS}idmap_rid,idmap_tdb2,idmap_ad"
+ fi
+}
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+
+ # install the patches from tarball(s)
+ EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" \
+ epatch "${WORKDIR}/patches"
+
+ # Allow user patches
+ epatch_user
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local myconf=()
+ myconf=(
+ --enable-fhs
+ --sysconfdir=/etc
+ --localstatedir=/var
+ --with-modulesdir=/usr/$(get_libdir)/samba
+ --with-piddir=/run/${PN}
+ --bundled-libraries=NONE
+ --builtin-libraries=NONE
+ --disable-rpath
+ --disable-rpath-install
+ --nopyc
+ --nopyo
+ )
+ if multilib_is_native_abi ; then
+ myconf+=(
+ $(use_with acl acl-support)
+ $(usex addc '' '--without-ad-dc')
+ $(use_with addns dnsupdate)
+ $(use_with ads)
+ $(usex ads '--with-shared-modules=idmap_ad' '')
+ $(use_with aio aio-support)
+ $(use_enable avahi)
+ $(use_with cluster cluster-support)
+ $(use_enable cups)
+ $(use_with dmapi)
+ $(use_with fam)
+ $(use_enable gnutls)
+ $(use_enable iprint)
+ $(use_with ldap)
+ $(use_with pam)
+ $(use_with pam pam_smbpass)
+ $(usex pam "--with-pammodulesdir=/$(get_libdir)/security" '')
+ $(use_with quota quotas)
+ $(use_with syslog)
+ $(use_with systemd)
+ $(usex system-mitkrb5 '--with-system-mitkrb5' '')
+ $(use_with winbind)
+ $(usex test '--enable-selftest' '')
+ --with-shared-modules=${SHAREDMODS}
+ )
+ else
+ myconf+=(
+ --without-acl-support
+ --without-ad-dc
+ --without-dnsupdate
+ --without-ads
+ --without-aio-support
+ --disable-avahi
+ --without-cluster-support
+ --disable-cups
+ --without-dmapi
+ --without-fam
+ --disable-gnutls
+ --disable-iprint
+ $(use_with ldap)
+ --without-pam
+ --without-pam_smbpass
+ --without-quotas
+ --without-syslog
+ --without-systemd
+ $(usex system-mitkrb5 '--with-system-mitkrb5' '')
+ --without-winbind
+ --disable-python
+ )
+ fi
+
+ CPPFLAGS="-I${SYSROOT}/usr/include/et ${CPPFLAGS}" \
+ waf-utils_src_configure ${myconf[@]}
+}
+
+multilib_src_install() {
+ waf-utils_src_install
+
+ # Make all .so files executable
+ find "${D}" -type f -name "*.so" -exec chmod +x {} +
+
+ if multilib_is_native_abi; then
+ # install ldap schema for server (bug #491002)
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins examples/LDAP/samba.schema
+ fi
+
+ # create symlink for cups (bug #552310)
+ if use cups ; then
+ dosym /usr/bin/smbspool /usr/libexec/cups/backend/smb
+ fi
+
+ # install example config file
+ insinto /etc/samba
+ doins examples/smb.conf.default
+
+ # Install init script and conf.d file
+ newinitd "${CONFDIR}/samba4.initd-r1" samba
+ newconfd "${CONFDIR}/samba4.confd" samba
+
+ systemd_dotmpfilesd "${FILESDIR}"/samba.conf
+ systemd_dounit "${FILESDIR}"/nmbd.service
+ systemd_dounit "${FILESDIR}"/smbd.{service,socket}
+ systemd_newunit "${FILESDIR}"/smbd_at.service 'smbd@.service'
+ systemd_dounit "${FILESDIR}"/winbindd.service
+ systemd_dounit "${FILESDIR}"/samba.service
+ fi
+}
+
+multilib_src_test() {
+ if multilib_is_native_abi ; then
+ "${WAF_BINARY}" test || die "test failed"
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Be aware the this release contains the best of all of Samba's"
+ ewarn "technology parts, both a file server (that you can reasonably expect"
+ ewarn "to upgrade existing Samba 3.x releases to) and the AD domain"
+ ewarn "controller work previously known as 'samba4'."
+
+ elog "For further information and migration steps make sure to read "
+ elog "http://samba.org/samba/history/${P}.html "
+ elog "http://samba.org/samba/history/${PN}-4.2.0.html and"
+ elog "http://wiki.samba.org/index.php/Samba4/HOWTO "
+}
diff --git a/net-fs/samba/samba-4.5.10-r1.ebuild b/net-fs/samba/samba-4.5.10-r1.ebuild
new file mode 100644
index 000000000000..bb4953a89c67
--- /dev/null
+++ b/net-fs/samba/samba-4.5.10-r1.ebuild
@@ -0,0 +1,281 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='threads(+),xml(+)'
+
+inherit python-single-r1 waf-utils multilib-minimal linux-info systemd eutils
+
+MY_PV="${PV/_rc/rc}"
+MY_P="${PN}-${MY_PV}"
+
+SRC_PATH="stable"
+[[ ${PV} = *_rc* ]] && SRC_PATH="rc"
+
+SRC_URI="mirror://samba/${SRC_PATH}/${MY_P}.tar.gz
+ https://dev.gentoo.org/~polynomial-c/samba-disable-python-patches-4.5.0_rc1.tar.xz"
+[[ ${PV} = *_rc* ]] || \
+KEYWORDS="alpha amd64 ~arm ~arm64 ia64 ppc ppc64 sparc x86"
+
+DESCRIPTION="Samba Suite Version 4"
+HOMEPAGE="http://www.samba.org/"
+LICENSE="GPL-3"
+
+SLOT="0"
+
+IUSE="acl addc addns ads client cluster cups dmapi fam gnutls gpg iprint ldap pam
+quota selinux syslog system-heimdal +system-mitkrb5 systemd test winbind zeroconf"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/samba-4.0/policy.h
+ /usr/include/samba-4.0/dcerpc_server.h
+ /usr/include/samba-4.0/ctdb.h
+ /usr/include/samba-4.0/ctdb_client.h
+ /usr/include/samba-4.0/ctdb_protocol.h
+ /usr/include/samba-4.0/ctdb_private.h
+ /usr/include/samba-4.0/ctdb_typesafe_cb.h
+ /usr/include/samba-4.0/ctdb_version.h
+)
+
+# sys-apps/attr is an automagic dependency (see bug #489748)
+CDEPEND="${PYTHON_DEPS}
+ >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
+ dev-lang/perl:=
+ dev-libs/libaio[${MULTILIB_USEDEP}]
+ dev-libs/libbsd[${MULTILIB_USEDEP}]
+ dev-libs/iniparser:0
+ dev-libs/popt[${MULTILIB_USEDEP}]
+ dev-python/subunit[${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ sys-apps/attr[${MULTILIB_USEDEP}]
+ >=sys-libs/ldb-1.1.27[ldap(+)?,python(+),${MULTILIB_USEDEP}]
+ sys-libs/libcap
+ sys-libs/ncurses:0=[${MULTILIB_USEDEP}]
+ sys-libs/readline:0=
+ >=sys-libs/talloc-2.1.8[python,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ >=sys-libs/tdb-1.3.10[python,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ >=sys-libs/tevent-0.9.31-r1[${MULTILIB_USEDEP}]
+ sys-libs/zlib[${MULTILIB_USEDEP}]
+ virtual/libiconv
+ pam? ( virtual/pam )
+ acl? ( virtual/acl )
+ addns? ( net-dns/bind-tools[gssapi] )
+ cluster? ( !dev-db/ctdb )
+ cups? ( net-print/cups )
+ dmapi? ( sys-apps/dmapi )
+ fam? ( virtual/fam )
+ gnutls? (
+ dev-libs/libgcrypt:0
+ >=net-libs/gnutls-1.4.0
+ )
+ gpg? ( app-crypt/gpgme )
+ ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] )
+ system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] )
+ system-mitkrb5? ( app-crypt/mit-krb5[${MULTILIB_USEDEP}] )
+ systemd? ( sys-apps/systemd:0= )"
+DEPEND="${CDEPEND}
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ virtual/pkgconfig
+ test? (
+ !system-mitkrb5? (
+ >=sys-libs/nss_wrapper-1.1.3
+ >=net-dns/resolv_wrapper-1.1.4
+ >=net-libs/socket_wrapper-1.1.7
+ >=sys-libs/uid_wrapper-1.2.1
+ )
+ )"
+RDEPEND="${CDEPEND}
+ client? ( net-fs/cifs-utils[ads?] )
+ selinux? ( sec-policy/selinux-samba )
+ !dev-perl/Parse-Yapp
+"
+
+REQUIRED_USE="addc? ( gnutls !system-mitkrb5 )
+ ads? ( acl gnutls ldap )
+ gpg? ( addc )
+ ?? ( system-heimdal system-mitkrb5 )
+ ${PYTHON_REQUIRED_USE}"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.4.0-pam.patch"
+ "${FILESDIR}/${PN}-4.5.1-compile_et_fix.patch"
+)
+
+#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
+CONFDIR="${FILESDIR}/4.4"
+
+WAF_BINARY="${S}/buildtools/bin/waf"
+
+SHAREDMODS=""
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+ if use cluster ; then
+ SHAREDMODS="idmap_rid,idmap_tdb2,idmap_ad"
+ elif use ads ; then
+ SHAREDMODS="idmap_ad"
+ fi
+}
+
+src_prepare() {
+ default
+
+ # install the patches from tarball(s)
+ eapply "${WORKDIR}/patches"
+
+ # ugly hackaround for bug #592502
+ cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
+
+ sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \
+ -i source4/dsdb/samdb/ldb_modules/password_hash.c \
+ || die
+
+ # Friggin' WAF shit
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ # when specifying libs for samba build you must append NONE to the end to
+ # stop it automatically including things
+ local bundled_libs="NONE"
+ if ! use system-heimdal && ! use system-mitkrb5 ; then
+ bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
+ fi
+
+ local myconf=()
+ myconf=(
+ --enable-fhs
+ --sysconfdir="${EPREFIX}/etc"
+ --localstatedir="${EPREFIX}/var"
+ --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
+ --with-piddir="${EPREFIX}/run/${PN}"
+ --without-lttng
+ --bundled-libraries="${bundled_libs}"
+ --builtin-libraries=NONE
+ --disable-rpath
+ --disable-rpath-install
+ --nopyc
+ --nopyo
+ )
+ if multilib_is_native_abi ; then
+ myconf+=(
+ $(use_with acl acl-support)
+ $(usex addc '' '--without-ad-dc')
+ $(use_with addns dnsupdate)
+ $(use_with ads)
+ $(use_with cluster cluster-support)
+ $(use_enable cups)
+ $(use_with dmapi)
+ $(use_with fam)
+ $(use_enable gnutls)
+ $(use_with gpg gpgme)
+ $(use_enable iprint)
+ $(use_with ldap)
+ $(use_with pam)
+ $(usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
+ $(use_with quota quotas)
+ $(use_with syslog)
+ $(use_with systemd)
+ $(usex system-mitkrb5 '--with-system-mitkrb5' '')
+ $(use_with winbind)
+ $(usex test '--enable-selftest' '')
+ $(use_enable zeroconf avahi)
+ --with-shared-modules=${SHAREDMODS}
+ )
+ else
+ myconf+=(
+ --without-acl-support
+ --without-ad-dc
+ --without-dnsupdate
+ --without-ads
+ --disable-avahi
+ --without-cluster-support
+ --disable-cups
+ --without-dmapi
+ --without-fam
+ --disable-gnutls
+ --without-gpgme
+ --disable-iprint
+ $(use_with ldap)
+ --without-pam
+ --without-quotas
+ --without-syslog
+ --without-systemd
+ $(usex system-mitkrb5 '--with-system-mitkrb5' '')
+ --without-winbind
+ --disable-python
+ )
+ fi
+
+ CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
+ waf-utils_src_configure ${myconf[@]}
+}
+
+multilib_src_compile() {
+ waf-utils_src_compile
+}
+
+multilib_src_install() {
+ waf-utils_src_install
+
+ # Make all .so files executable
+ find "${D}" -type f -name "*.so" -exec chmod +x {} +
+
+ if multilib_is_native_abi; then
+ # install ldap schema for server (bug #491002)
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins examples/LDAP/samba.schema
+ fi
+
+ # create symlink for cups (bug #552310)
+ if use cups ; then
+ dosym /usr/bin/smbspool /usr/libexec/cups/backend/smb
+ fi
+
+ # install example config file
+ insinto /etc/samba
+ doins examples/smb.conf.default
+
+ # Fix paths in example file (#603964)
+ sed \
+ -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \
+ -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \
+ -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \
+ -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \
+ -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \
+ -i "${ED%/}"/etc/samba/smb.conf.default || die
+
+ # Install init script and conf.d file
+ newinitd "${CONFDIR}/samba4.initd-r1" samba
+ newconfd "${CONFDIR}/samba4.confd" samba
+
+ systemd_dotmpfilesd "${FILESDIR}"/samba.conf
+ systemd_dounit "${FILESDIR}"/nmbd.service
+ systemd_dounit "${FILESDIR}"/smbd.{service,socket}
+ systemd_newunit "${FILESDIR}"/smbd_at.service 'smbd@.service'
+ systemd_dounit "${FILESDIR}"/winbindd.service
+ systemd_dounit "${FILESDIR}"/samba.service
+ fi
+}
+
+multilib_src_test() {
+ if multilib_is_native_abi ; then
+ "${WAF_BINARY}" test || die "test failed"
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Be aware the this release contains the best of all of Samba's"
+ ewarn "technology parts, both a file server (that you can reasonably expect"
+ ewarn "to upgrade existing Samba 3.x releases to) and the AD domain"
+ ewarn "controller work previously known as 'samba4'."
+
+ elog "For further information and migration steps make sure to read "
+ elog "http://samba.org/samba/history/${P}.html "
+ elog "http://samba.org/samba/history/${PN}-4.5.0.html and"
+ elog "http://wiki.samba.org/index.php/Samba4/HOWTO "
+}
diff --git a/net-fs/samba/samba-4.5.13.ebuild b/net-fs/samba/samba-4.5.13.ebuild
new file mode 100644
index 000000000000..cbf7ec7d4fc5
--- /dev/null
+++ b/net-fs/samba/samba-4.5.13.ebuild
@@ -0,0 +1,282 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='threads(+),xml(+)'
+
+inherit python-single-r1 waf-utils multilib-minimal linux-info systemd eutils
+
+MY_PV="${PV/_rc/rc}"
+MY_P="${PN}-${MY_PV}"
+
+SRC_PATH="stable"
+[[ ${PV} = *_rc* ]] && SRC_PATH="rc"
+
+SRC_URI="mirror://samba/${SRC_PATH}/${MY_P}.tar.gz
+ https://dev.gentoo.org/~polynomial-c/samba-4.5.11-disable-python-patches.tar.xz"
+[[ ${PV} = *_rc* ]] || \
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+
+DESCRIPTION="Samba Suite Version 4"
+HOMEPAGE="http://www.samba.org/"
+LICENSE="GPL-3"
+
+SLOT="0"
+
+IUSE="acl addc addns ads client cluster cups dmapi fam gnutls gpg iprint ldap pam
+quota selinux syslog system-heimdal +system-mitkrb5 systemd test winbind zeroconf"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/samba-4.0/policy.h
+ /usr/include/samba-4.0/dcerpc_server.h
+ /usr/include/samba-4.0/ctdb.h
+ /usr/include/samba-4.0/ctdb_client.h
+ /usr/include/samba-4.0/ctdb_protocol.h
+ /usr/include/samba-4.0/ctdb_private.h
+ /usr/include/samba-4.0/ctdb_typesafe_cb.h
+ /usr/include/samba-4.0/ctdb_version.h
+)
+
+# sys-apps/attr is an automagic dependency (see bug #489748)
+CDEPEND="${PYTHON_DEPS}
+ >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
+ dev-lang/perl:=
+ dev-libs/libaio[${MULTILIB_USEDEP}]
+ dev-libs/libbsd[${MULTILIB_USEDEP}]
+ dev-libs/iniparser:0
+ dev-libs/popt[${MULTILIB_USEDEP}]
+ dev-python/subunit[${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ sys-apps/attr[${MULTILIB_USEDEP}]
+ >=sys-libs/ldb-1.1.27[ldap(+)?,python(+),${MULTILIB_USEDEP}]
+ <sys-libs/ldb-1.1.30[ldap(+)?,python(+),${MULTILIB_USEDEP}]
+ sys-libs/libcap
+ sys-libs/ncurses:0=[${MULTILIB_USEDEP}]
+ sys-libs/readline:0=
+ >=sys-libs/talloc-2.1.8[python,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ >=sys-libs/tdb-1.3.10[python,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ >=sys-libs/tevent-0.9.31-r1[${MULTILIB_USEDEP}]
+ sys-libs/zlib[${MULTILIB_USEDEP}]
+ virtual/libiconv
+ pam? ( virtual/pam )
+ acl? ( virtual/acl )
+ addns? ( net-dns/bind-tools[gssapi] )
+ cluster? ( !dev-db/ctdb )
+ cups? ( net-print/cups )
+ dmapi? ( sys-apps/dmapi )
+ fam? ( virtual/fam )
+ gnutls? (
+ dev-libs/libgcrypt:0
+ >=net-libs/gnutls-1.4.0
+ )
+ gpg? ( app-crypt/gpgme )
+ ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] )
+ system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] )
+ system-mitkrb5? ( app-crypt/mit-krb5[${MULTILIB_USEDEP}] )
+ systemd? ( sys-apps/systemd:0= )"
+DEPEND="${CDEPEND}
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ virtual/pkgconfig
+ test? (
+ !system-mitkrb5? (
+ >=sys-libs/nss_wrapper-1.1.3
+ >=net-dns/resolv_wrapper-1.1.4
+ >=net-libs/socket_wrapper-1.1.7
+ >=sys-libs/uid_wrapper-1.2.1
+ )
+ )"
+RDEPEND="${CDEPEND}
+ client? ( net-fs/cifs-utils[ads?] )
+ selinux? ( sec-policy/selinux-samba )
+ !dev-perl/Parse-Yapp
+"
+
+REQUIRED_USE="addc? ( gnutls !system-mitkrb5 )
+ ads? ( acl gnutls ldap )
+ gpg? ( addc )
+ ?? ( system-heimdal system-mitkrb5 )
+ ${PYTHON_REQUIRED_USE}"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.4.0-pam.patch"
+ "${FILESDIR}/${PN}-4.5.1-compile_et_fix.patch"
+)
+
+#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
+CONFDIR="${FILESDIR}/4.4"
+
+WAF_BINARY="${S}/buildtools/bin/waf"
+
+SHAREDMODS=""
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+ if use cluster ; then
+ SHAREDMODS="idmap_rid,idmap_tdb2,idmap_ad"
+ elif use ads ; then
+ SHAREDMODS="idmap_ad"
+ fi
+}
+
+src_prepare() {
+ default
+
+ # install the patches from tarball(s)
+ eapply "${WORKDIR}/patches"
+
+ # ugly hackaround for bug #592502
+ cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
+
+ sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \
+ -i source4/dsdb/samdb/ldb_modules/password_hash.c \
+ || die
+
+ # Friggin' WAF shit
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ # when specifying libs for samba build you must append NONE to the end to
+ # stop it automatically including things
+ local bundled_libs="NONE"
+ if ! use system-heimdal && ! use system-mitkrb5 ; then
+ bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
+ fi
+
+ local myconf=()
+ myconf=(
+ --enable-fhs
+ --sysconfdir="${EPREFIX}/etc"
+ --localstatedir="${EPREFIX}/var"
+ --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
+ --with-piddir="${EPREFIX}/run/${PN}"
+ --without-lttng
+ --bundled-libraries="${bundled_libs}"
+ --builtin-libraries=NONE
+ --disable-rpath
+ --disable-rpath-install
+ --nopyc
+ --nopyo
+ )
+ if multilib_is_native_abi ; then
+ myconf+=(
+ $(use_with acl acl-support)
+ $(usex addc '' '--without-ad-dc')
+ $(use_with addns dnsupdate)
+ $(use_with ads)
+ $(use_with cluster cluster-support)
+ $(use_enable cups)
+ $(use_with dmapi)
+ $(use_with fam)
+ $(use_enable gnutls)
+ $(use_with gpg gpgme)
+ $(use_enable iprint)
+ $(use_with ldap)
+ $(use_with pam)
+ $(usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
+ $(use_with quota quotas)
+ $(use_with syslog)
+ $(use_with systemd)
+ $(usex system-mitkrb5 '--with-system-mitkrb5' '')
+ $(use_with winbind)
+ $(usex test '--enable-selftest' '')
+ $(use_enable zeroconf avahi)
+ --with-shared-modules=${SHAREDMODS}
+ )
+ else
+ myconf+=(
+ --without-acl-support
+ --without-ad-dc
+ --without-dnsupdate
+ --without-ads
+ --disable-avahi
+ --without-cluster-support
+ --disable-cups
+ --without-dmapi
+ --without-fam
+ --disable-gnutls
+ --without-gpgme
+ --disable-iprint
+ $(use_with ldap)
+ --without-pam
+ --without-quotas
+ --without-syslog
+ --without-systemd
+ $(usex system-mitkrb5 '--with-system-mitkrb5' '')
+ --without-winbind
+ --disable-python
+ )
+ fi
+
+ CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
+ waf-utils_src_configure ${myconf[@]}
+}
+
+multilib_src_compile() {
+ waf-utils_src_compile
+}
+
+multilib_src_install() {
+ waf-utils_src_install
+
+ # Make all .so files executable
+ find "${D}" -type f -name "*.so" -exec chmod +x {} +
+
+ if multilib_is_native_abi; then
+ # install ldap schema for server (bug #491002)
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins examples/LDAP/samba.schema
+ fi
+
+ # create symlink for cups (bug #552310)
+ if use cups ; then
+ dosym /usr/bin/smbspool /usr/libexec/cups/backend/smb
+ fi
+
+ # install example config file
+ insinto /etc/samba
+ doins examples/smb.conf.default
+
+ # Fix paths in example file (#603964)
+ sed \
+ -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \
+ -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \
+ -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \
+ -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \
+ -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \
+ -i "${ED%/}"/etc/samba/smb.conf.default || die
+
+ # Install init script and conf.d file
+ newinitd "${CONFDIR}/samba4.initd-r1" samba
+ newconfd "${CONFDIR}/samba4.confd" samba
+
+ systemd_dotmpfilesd "${FILESDIR}"/samba.conf
+ systemd_dounit "${FILESDIR}"/nmbd.service
+ systemd_dounit "${FILESDIR}"/smbd.{service,socket}
+ systemd_newunit "${FILESDIR}"/smbd_at.service 'smbd@.service'
+ systemd_dounit "${FILESDIR}"/winbindd.service
+ systemd_dounit "${FILESDIR}"/samba.service
+ fi
+}
+
+multilib_src_test() {
+ if multilib_is_native_abi ; then
+ "${WAF_BINARY}" test || die "test failed"
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Be aware the this release contains the best of all of Samba's"
+ ewarn "technology parts, both a file server (that you can reasonably expect"
+ ewarn "to upgrade existing Samba 3.x releases to) and the AD domain"
+ ewarn "controller work previously known as 'samba4'."
+
+ elog "For further information and migration steps make sure to read "
+ elog "http://samba.org/samba/history/${P}.html "
+ elog "http://samba.org/samba/history/${PN}-4.5.0.html and"
+ elog "http://wiki.samba.org/index.php/Samba4/HOWTO "
+}
diff --git a/net-fs/samba/samba-4.5.14.ebuild b/net-fs/samba/samba-4.5.14.ebuild
new file mode 100644
index 000000000000..cbf7ec7d4fc5
--- /dev/null
+++ b/net-fs/samba/samba-4.5.14.ebuild
@@ -0,0 +1,282 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='threads(+),xml(+)'
+
+inherit python-single-r1 waf-utils multilib-minimal linux-info systemd eutils
+
+MY_PV="${PV/_rc/rc}"
+MY_P="${PN}-${MY_PV}"
+
+SRC_PATH="stable"
+[[ ${PV} = *_rc* ]] && SRC_PATH="rc"
+
+SRC_URI="mirror://samba/${SRC_PATH}/${MY_P}.tar.gz
+ https://dev.gentoo.org/~polynomial-c/samba-4.5.11-disable-python-patches.tar.xz"
+[[ ${PV} = *_rc* ]] || \
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+
+DESCRIPTION="Samba Suite Version 4"
+HOMEPAGE="http://www.samba.org/"
+LICENSE="GPL-3"
+
+SLOT="0"
+
+IUSE="acl addc addns ads client cluster cups dmapi fam gnutls gpg iprint ldap pam
+quota selinux syslog system-heimdal +system-mitkrb5 systemd test winbind zeroconf"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/samba-4.0/policy.h
+ /usr/include/samba-4.0/dcerpc_server.h
+ /usr/include/samba-4.0/ctdb.h
+ /usr/include/samba-4.0/ctdb_client.h
+ /usr/include/samba-4.0/ctdb_protocol.h
+ /usr/include/samba-4.0/ctdb_private.h
+ /usr/include/samba-4.0/ctdb_typesafe_cb.h
+ /usr/include/samba-4.0/ctdb_version.h
+)
+
+# sys-apps/attr is an automagic dependency (see bug #489748)
+CDEPEND="${PYTHON_DEPS}
+ >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
+ dev-lang/perl:=
+ dev-libs/libaio[${MULTILIB_USEDEP}]
+ dev-libs/libbsd[${MULTILIB_USEDEP}]
+ dev-libs/iniparser:0
+ dev-libs/popt[${MULTILIB_USEDEP}]
+ dev-python/subunit[${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ sys-apps/attr[${MULTILIB_USEDEP}]
+ >=sys-libs/ldb-1.1.27[ldap(+)?,python(+),${MULTILIB_USEDEP}]
+ <sys-libs/ldb-1.1.30[ldap(+)?,python(+),${MULTILIB_USEDEP}]
+ sys-libs/libcap
+ sys-libs/ncurses:0=[${MULTILIB_USEDEP}]
+ sys-libs/readline:0=
+ >=sys-libs/talloc-2.1.8[python,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ >=sys-libs/tdb-1.3.10[python,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ >=sys-libs/tevent-0.9.31-r1[${MULTILIB_USEDEP}]
+ sys-libs/zlib[${MULTILIB_USEDEP}]
+ virtual/libiconv
+ pam? ( virtual/pam )
+ acl? ( virtual/acl )
+ addns? ( net-dns/bind-tools[gssapi] )
+ cluster? ( !dev-db/ctdb )
+ cups? ( net-print/cups )
+ dmapi? ( sys-apps/dmapi )
+ fam? ( virtual/fam )
+ gnutls? (
+ dev-libs/libgcrypt:0
+ >=net-libs/gnutls-1.4.0
+ )
+ gpg? ( app-crypt/gpgme )
+ ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] )
+ system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] )
+ system-mitkrb5? ( app-crypt/mit-krb5[${MULTILIB_USEDEP}] )
+ systemd? ( sys-apps/systemd:0= )"
+DEPEND="${CDEPEND}
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ virtual/pkgconfig
+ test? (
+ !system-mitkrb5? (
+ >=sys-libs/nss_wrapper-1.1.3
+ >=net-dns/resolv_wrapper-1.1.4
+ >=net-libs/socket_wrapper-1.1.7
+ >=sys-libs/uid_wrapper-1.2.1
+ )
+ )"
+RDEPEND="${CDEPEND}
+ client? ( net-fs/cifs-utils[ads?] )
+ selinux? ( sec-policy/selinux-samba )
+ !dev-perl/Parse-Yapp
+"
+
+REQUIRED_USE="addc? ( gnutls !system-mitkrb5 )
+ ads? ( acl gnutls ldap )
+ gpg? ( addc )
+ ?? ( system-heimdal system-mitkrb5 )
+ ${PYTHON_REQUIRED_USE}"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.4.0-pam.patch"
+ "${FILESDIR}/${PN}-4.5.1-compile_et_fix.patch"
+)
+
+#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
+CONFDIR="${FILESDIR}/4.4"
+
+WAF_BINARY="${S}/buildtools/bin/waf"
+
+SHAREDMODS=""
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+ if use cluster ; then
+ SHAREDMODS="idmap_rid,idmap_tdb2,idmap_ad"
+ elif use ads ; then
+ SHAREDMODS="idmap_ad"
+ fi
+}
+
+src_prepare() {
+ default
+
+ # install the patches from tarball(s)
+ eapply "${WORKDIR}/patches"
+
+ # ugly hackaround for bug #592502
+ cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
+
+ sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \
+ -i source4/dsdb/samdb/ldb_modules/password_hash.c \
+ || die
+
+ # Friggin' WAF shit
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ # when specifying libs for samba build you must append NONE to the end to
+ # stop it automatically including things
+ local bundled_libs="NONE"
+ if ! use system-heimdal && ! use system-mitkrb5 ; then
+ bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
+ fi
+
+ local myconf=()
+ myconf=(
+ --enable-fhs
+ --sysconfdir="${EPREFIX}/etc"
+ --localstatedir="${EPREFIX}/var"
+ --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
+ --with-piddir="${EPREFIX}/run/${PN}"
+ --without-lttng
+ --bundled-libraries="${bundled_libs}"
+ --builtin-libraries=NONE
+ --disable-rpath
+ --disable-rpath-install
+ --nopyc
+ --nopyo
+ )
+ if multilib_is_native_abi ; then
+ myconf+=(
+ $(use_with acl acl-support)
+ $(usex addc '' '--without-ad-dc')
+ $(use_with addns dnsupdate)
+ $(use_with ads)
+ $(use_with cluster cluster-support)
+ $(use_enable cups)
+ $(use_with dmapi)
+ $(use_with fam)
+ $(use_enable gnutls)
+ $(use_with gpg gpgme)
+ $(use_enable iprint)
+ $(use_with ldap)
+ $(use_with pam)
+ $(usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
+ $(use_with quota quotas)
+ $(use_with syslog)
+ $(use_with systemd)
+ $(usex system-mitkrb5 '--with-system-mitkrb5' '')
+ $(use_with winbind)
+ $(usex test '--enable-selftest' '')
+ $(use_enable zeroconf avahi)
+ --with-shared-modules=${SHAREDMODS}
+ )
+ else
+ myconf+=(
+ --without-acl-support
+ --without-ad-dc
+ --without-dnsupdate
+ --without-ads
+ --disable-avahi
+ --without-cluster-support
+ --disable-cups
+ --without-dmapi
+ --without-fam
+ --disable-gnutls
+ --without-gpgme
+ --disable-iprint
+ $(use_with ldap)
+ --without-pam
+ --without-quotas
+ --without-syslog
+ --without-systemd
+ $(usex system-mitkrb5 '--with-system-mitkrb5' '')
+ --without-winbind
+ --disable-python
+ )
+ fi
+
+ CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
+ waf-utils_src_configure ${myconf[@]}
+}
+
+multilib_src_compile() {
+ waf-utils_src_compile
+}
+
+multilib_src_install() {
+ waf-utils_src_install
+
+ # Make all .so files executable
+ find "${D}" -type f -name "*.so" -exec chmod +x {} +
+
+ if multilib_is_native_abi; then
+ # install ldap schema for server (bug #491002)
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins examples/LDAP/samba.schema
+ fi
+
+ # create symlink for cups (bug #552310)
+ if use cups ; then
+ dosym /usr/bin/smbspool /usr/libexec/cups/backend/smb
+ fi
+
+ # install example config file
+ insinto /etc/samba
+ doins examples/smb.conf.default
+
+ # Fix paths in example file (#603964)
+ sed \
+ -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \
+ -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \
+ -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \
+ -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \
+ -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \
+ -i "${ED%/}"/etc/samba/smb.conf.default || die
+
+ # Install init script and conf.d file
+ newinitd "${CONFDIR}/samba4.initd-r1" samba
+ newconfd "${CONFDIR}/samba4.confd" samba
+
+ systemd_dotmpfilesd "${FILESDIR}"/samba.conf
+ systemd_dounit "${FILESDIR}"/nmbd.service
+ systemd_dounit "${FILESDIR}"/smbd.{service,socket}
+ systemd_newunit "${FILESDIR}"/smbd_at.service 'smbd@.service'
+ systemd_dounit "${FILESDIR}"/winbindd.service
+ systemd_dounit "${FILESDIR}"/samba.service
+ fi
+}
+
+multilib_src_test() {
+ if multilib_is_native_abi ; then
+ "${WAF_BINARY}" test || die "test failed"
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Be aware the this release contains the best of all of Samba's"
+ ewarn "technology parts, both a file server (that you can reasonably expect"
+ ewarn "to upgrade existing Samba 3.x releases to) and the AD domain"
+ ewarn "controller work previously known as 'samba4'."
+
+ elog "For further information and migration steps make sure to read "
+ elog "http://samba.org/samba/history/${P}.html "
+ elog "http://samba.org/samba/history/${PN}-4.5.0.html and"
+ elog "http://wiki.samba.org/index.php/Samba4/HOWTO "
+}
diff --git a/net-fs/samba/samba-4.6.8-r1.ebuild b/net-fs/samba/samba-4.6.8-r1.ebuild
new file mode 100644
index 000000000000..b4690d4142ed
--- /dev/null
+++ b/net-fs/samba/samba-4.6.8-r1.ebuild
@@ -0,0 +1,305 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='threads(+),xml(+)'
+
+inherit python-single-r1 waf-utils multilib-minimal linux-info systemd eutils
+
+MY_PV="${PV/_rc/rc}"
+MY_P="${PN}-${MY_PV}"
+
+SRC_PATH="stable"
+[[ ${PV} = *_rc* ]] && SRC_PATH="rc"
+
+SRC_URI="mirror://samba/${SRC_PATH}/${MY_P}.tar.gz
+ https://dev.gentoo.org/~axs/samba-4.6.7-disable-python-patches.tar.xz"
+[[ ${PV} = *_rc* ]] || \
+KEYWORDS="~amd64 ~arm64 ~x86"
+
+DESCRIPTION="Samba Suite Version 4"
+HOMEPAGE="http://www.samba.org/"
+LICENSE="GPL-3"
+
+SLOT="0"
+
+IUSE="acl addc addns ads client cluster cups debug dmapi fam gnutls gpg iprint ldap pam python
+quota selinux syslog system-heimdal +system-mitkrb5 systemd test winbind zeroconf"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/samba-4.0/policy.h
+ /usr/include/samba-4.0/dcerpc_server.h
+ /usr/include/samba-4.0/ctdb.h
+ /usr/include/samba-4.0/ctdb_client.h
+ /usr/include/samba-4.0/ctdb_protocol.h
+ /usr/include/samba-4.0/ctdb_private.h
+ /usr/include/samba-4.0/ctdb_typesafe_cb.h
+ /usr/include/samba-4.0/ctdb_version.h
+)
+
+# sys-apps/attr is an automagic dependency (see bug #489748)
+CDEPEND="
+ >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
+ dev-lang/perl:=
+ dev-libs/libaio[${MULTILIB_USEDEP}]
+ dev-libs/libbsd[${MULTILIB_USEDEP}]
+ dev-libs/iniparser:0
+ dev-libs/popt[${MULTILIB_USEDEP}]
+ dev-python/subunit[${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ >=dev-util/cmocka-1.0.0[${MULTILIB_USEDEP}]
+ sys-apps/attr[${MULTILIB_USEDEP}]
+ >=sys-libs/ldb-1.1.29[ldap(+)?,python(+),${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ <sys-libs/ldb-1.1.31[ldap(+)?,python(+),${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ sys-libs/libcap
+ sys-libs/ncurses:0=[${MULTILIB_USEDEP}]
+ sys-libs/readline:0=
+ >=sys-libs/talloc-2.1.9[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ >=sys-libs/tdb-1.3.12[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ >=sys-libs/tevent-0.9.31-r1[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ sys-libs/zlib[${MULTILIB_USEDEP}]
+ virtual/libiconv
+ pam? ( virtual/pam )
+ acl? ( virtual/acl )
+ addns? (
+ net-dns/bind-tools[gssapi]
+ dev-python/dnspython:=[${PYTHON_USEDEP}]
+ )
+ cluster? ( !dev-db/ctdb )
+ cups? ( net-print/cups )
+ debug? ( dev-util/lttng-ust )
+ dmapi? ( sys-apps/dmapi )
+ fam? ( virtual/fam )
+ gnutls? (
+ dev-libs/libgcrypt:0
+ >=net-libs/gnutls-1.4.0
+ )
+ gpg? ( app-crypt/gpgme )
+ ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] )
+ system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] )
+ system-mitkrb5? ( app-crypt/mit-krb5[${MULTILIB_USEDEP}] )
+ systemd? ( sys-apps/systemd:0= )"
+DEPEND="${CDEPEND}
+ ${PYTHON_DEPS}
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ virtual/pkgconfig
+ test? (
+ !system-mitkrb5? (
+ >=sys-libs/nss_wrapper-1.1.3
+ >=net-dns/resolv_wrapper-1.1.4
+ >=net-libs/socket_wrapper-1.1.7
+ >=sys-libs/uid_wrapper-1.2.1
+ )
+ )"
+RDEPEND="${CDEPEND}
+ python? ( ${PYTHON_DEPS} )
+ client? ( net-fs/cifs-utils[ads?] )
+ selinux? ( sec-policy/selinux-samba )
+ !dev-perl/Parse-Yapp
+"
+
+REQUIRED_USE="addc? ( python gnutls !system-mitkrb5 )
+ test? ( python )
+ addns? ( python )
+ ads? ( acl gnutls ldap )
+ gpg? ( addc )
+ ?? ( system-heimdal system-mitkrb5 )
+ ${PYTHON_REQUIRED_USE}"
+
+# the test suite is messed, it uses system-installed samba
+# bits instead of what was built, tests things disabled via use
+# flags, and generally just fails to work in a way ebuilds could
+# rely on in its current state
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.4.0-pam.patch"
+ "${FILESDIR}/${PN}-4.5.1-compile_et_fix.patch"
+)
+
+#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
+CONFDIR="${FILESDIR}/4.4"
+
+WAF_BINARY="${S}/buildtools/bin/waf"
+
+SHAREDMODS=""
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+ if use cluster ; then
+ SHAREDMODS="idmap_rid,idmap_tdb2,idmap_ad"
+ elif use ads ; then
+ SHAREDMODS="idmap_ad"
+ fi
+}
+
+src_prepare() {
+ default
+
+ # install the patches from tarball(s)
+ eapply "${WORKDIR}/patches"
+
+ # un-bundle dnspython
+ sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die
+
+ # unbundle iso8601 unless tests are enabled
+ use test || sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die
+
+ # ugly hackaround for bug #592502
+ cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
+
+ sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \
+ -i source4/dsdb/samdb/ldb_modules/password_hash.c \
+ || die
+
+ # Friggin' WAF shit
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ # when specifying libs for samba build you must append NONE to the end to
+ # stop it automatically including things
+ local bundled_libs="NONE"
+ if ! use system-heimdal && ! use system-mitkrb5 ; then
+ bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
+ fi
+
+ local myconf=()
+ myconf=(
+ --enable-fhs
+ --sysconfdir="${EPREFIX}/etc"
+ --localstatedir="${EPREFIX}/var"
+ --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
+ --with-piddir="${EPREFIX}/run/${PN}"
+ --bundled-libraries="${bundled_libs}"
+ --builtin-libraries=NONE
+ --disable-rpath
+ --disable-rpath-install
+ --nopyc
+ --nopyo
+ )
+ if multilib_is_native_abi ; then
+ myconf+=(
+ $(use_with acl acl-support)
+ $(usex addc '' '--without-ad-dc')
+ $(use_with addns dnsupdate)
+ $(use_with ads)
+ $(use_with cluster cluster-support)
+ $(use_enable cups)
+ $(use_with debug lttng)
+ $(use_with dmapi)
+ $(use_with fam)
+ $(use_enable gnutls)
+ $(use_with gpg gpgme)
+ $(use_enable iprint)
+ $(use_with ldap)
+ $(use_with pam)
+ $(usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
+ $(use_with quota quotas)
+ $(use_with syslog)
+ $(use_with systemd)
+ $(usex system-mitkrb5 '--with-system-mitkrb5' '')
+ $(use_with winbind)
+ $(usex python '' '--disable-python')
+ $(usex test '--enable-selftest' '')
+ $(use_enable zeroconf avahi)
+ --with-shared-modules=${SHAREDMODS}
+ )
+ else
+ myconf+=(
+ --without-acl-support
+ --without-ad-dc
+ --without-dnsupdate
+ --without-ads
+ --disable-avahi
+ --without-cluster-support
+ --disable-cups
+ --without-dmapi
+ --without-fam
+ --disable-gnutls
+ --without-gpgme
+ --disable-iprint
+ $(use_with ldap)
+ $(use_with debug lttng)
+ --without-pam
+ --without-quotas
+ --without-syslog
+ --without-systemd
+ $(usex system-mitkrb5 '--with-system-mitkrb5' '')
+ --without-winbind
+ --disable-python
+ )
+ fi
+
+ CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
+ waf-utils_src_configure ${myconf[@]}
+}
+
+multilib_src_compile() {
+ waf-utils_src_compile
+}
+
+multilib_src_install() {
+ waf-utils_src_install
+
+ # Make all .so files executable
+ find "${D}" -type f -name "*.so" -exec chmod +x {} +
+
+ if multilib_is_native_abi; then
+ # install ldap schema for server (bug #491002)
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins examples/LDAP/samba.schema
+ fi
+
+ # create symlink for cups (bug #552310)
+ if use cups ; then
+ dosym /usr/bin/smbspool /usr/libexec/cups/backend/smb
+ fi
+
+ # install example config file
+ insinto /etc/samba
+ doins examples/smb.conf.default
+
+ # Fix paths in example file (#603964)
+ sed \
+ -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \
+ -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \
+ -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \
+ -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \
+ -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \
+ -i "${ED%/}"/etc/samba/smb.conf.default || die
+
+ # Install init script and conf.d file
+ newinitd "${CONFDIR}/samba4.initd-r1" samba
+ newconfd "${CONFDIR}/samba4.confd" samba
+
+ systemd_dotmpfilesd "${FILESDIR}"/samba.conf
+ systemd_dounit "${FILESDIR}"/nmbd.service
+ systemd_dounit "${FILESDIR}"/smbd.{service,socket}
+ systemd_newunit "${FILESDIR}"/smbd_at.service 'smbd@.service'
+ systemd_dounit "${FILESDIR}"/winbindd.service
+ systemd_dounit "${FILESDIR}"/samba.service
+ fi
+}
+
+multilib_src_test() {
+ if multilib_is_native_abi ; then
+ "${WAF_BINARY}" test || die "test failed"
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Be aware the this release contains the best of all of Samba's"
+ ewarn "technology parts, both a file server (that you can reasonably expect"
+ ewarn "to upgrade existing Samba 3.x releases to) and the AD domain"
+ ewarn "controller work previously known as 'samba4'."
+
+ elog "For further information and migration steps make sure to read "
+ elog "http://samba.org/samba/history/${P}.html "
+ elog "http://samba.org/samba/history/${PN}-4.5.0.html and"
+ elog "http://wiki.samba.org/index.php/Samba4/HOWTO "
+}
diff --git a/net-fs/samba/samba-4.7.0-r1.ebuild b/net-fs/samba/samba-4.7.0-r1.ebuild
new file mode 100644
index 000000000000..382862651762
--- /dev/null
+++ b/net-fs/samba/samba-4.7.0-r1.ebuild
@@ -0,0 +1,301 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='threads(+),xml(+)'
+
+inherit python-single-r1 waf-utils multilib-minimal linux-info systemd eutils
+
+MY_PV="${PV/_rc/rc}"
+MY_P="${PN}-${MY_PV}"
+
+SRC_PATH="stable"
+[[ ${PV} = *_rc* ]] && SRC_PATH="rc"
+
+SRC_URI="mirror://samba/${SRC_PATH}/${MY_P}.tar.gz"
+[[ ${PV} = *_rc* ]] || \
+KEYWORDS="~amd64 ~arm64 ~x86"
+
+DESCRIPTION="Samba Suite Version 4"
+HOMEPAGE="http://www.samba.org/"
+LICENSE="GPL-3"
+
+SLOT="0"
+
+IUSE="acl addc addns ads client cluster cups debug dmapi fam gnutls gpg iprint ldap pam python
+quota selinux syslog system-heimdal +system-mitkrb5 systemd test winbind zeroconf"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/samba-4.0/policy.h
+ /usr/include/samba-4.0/dcerpc_server.h
+ /usr/include/samba-4.0/ctdb.h
+ /usr/include/samba-4.0/ctdb_client.h
+ /usr/include/samba-4.0/ctdb_protocol.h
+ /usr/include/samba-4.0/ctdb_private.h
+ /usr/include/samba-4.0/ctdb_typesafe_cb.h
+ /usr/include/samba-4.0/ctdb_version.h
+)
+
+# sys-apps/attr is an automagic dependency (see bug #489748)
+CDEPEND="
+ >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
+ dev-lang/perl:=
+ dev-libs/libaio[${MULTILIB_USEDEP}]
+ dev-libs/libbsd[${MULTILIB_USEDEP}]
+ dev-libs/iniparser:0
+ dev-libs/popt[${MULTILIB_USEDEP}]
+ dev-python/subunit[${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ >=dev-util/cmocka-1.1.1[${MULTILIB_USEDEP}]
+ sys-apps/attr[${MULTILIB_USEDEP}]
+ >=sys-libs/ldb-1.2.2[ldap(+)?,python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ sys-libs/libcap
+ sys-libs/ncurses:0=[${MULTILIB_USEDEP}]
+ sys-libs/readline:0=
+ >=sys-libs/talloc-2.1.9[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ >=sys-libs/tdb-1.3.14[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ >=sys-libs/tevent-0.9.33[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+ sys-libs/zlib[${MULTILIB_USEDEP}]
+ virtual/libiconv
+ pam? ( virtual/pam )
+ acl? ( virtual/acl )
+ addns? (
+ net-dns/bind-tools[gssapi]
+ dev-python/dnspython:=[${PYTHON_USEDEP}]
+ )
+ cluster? ( !dev-db/ctdb )
+ cups? ( net-print/cups )
+ debug? ( dev-util/lttng-ust )
+ dmapi? ( sys-apps/dmapi )
+ fam? ( virtual/fam )
+ gnutls? (
+ dev-libs/libgcrypt:0
+ >=net-libs/gnutls-1.4.0
+ )
+ gpg? ( app-crypt/gpgme )
+ ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] )
+ system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] )
+ system-mitkrb5? ( >=app-crypt/mit-krb5-1.15.1[${MULTILIB_USEDEP}] )
+ systemd? ( sys-apps/systemd:0= )"
+DEPEND="${CDEPEND}
+ ${PYTHON_DEPS}
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ virtual/pkgconfig
+ test? (
+ !system-mitkrb5? (
+ >=sys-libs/nss_wrapper-1.1.3
+ >=net-dns/resolv_wrapper-1.1.4
+ >=net-libs/socket_wrapper-1.1.7
+ >=sys-libs/uid_wrapper-1.2.1
+ )
+ )"
+RDEPEND="${CDEPEND}
+ python? ( ${PYTHON_DEPS} )
+ client? ( net-fs/cifs-utils[ads?] )
+ selinux? ( sec-policy/selinux-samba )
+ !dev-perl/Parse-Yapp
+"
+
+REQUIRED_USE="addc? ( python gnutls )
+ test? ( python )
+ addns? ( python )
+ ads? ( acl gnutls ldap )
+ gpg? ( addc )
+ ?? ( system-heimdal system-mitkrb5 )
+ ${PYTHON_REQUIRED_USE}"
+
+# the test suite is messed, it uses system-installed samba
+# bits instead of what was built, tests things disabled via use
+# flags, and generally just fails to work in a way ebuilds could
+# rely on in its current state
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.4.0-pam.patch"
+ "${FILESDIR}/${PN}-4.5.1-compile_et_fix.patch"
+ "${FILESDIR}"/talloc-disable-python.patch
+)
+
+#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
+CONFDIR="${FILESDIR}/4.4"
+
+WAF_BINARY="${S}/buildtools/bin/waf"
+
+SHAREDMODS=""
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+ if use cluster ; then
+ SHAREDMODS="idmap_rid,idmap_tdb2,idmap_ad"
+ elif use ads ; then
+ SHAREDMODS="idmap_ad"
+ fi
+}
+
+src_prepare() {
+ default
+
+ # un-bundle dnspython
+ sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die
+
+ # unbundle iso8601 unless tests are enabled
+ use test || sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die
+
+ # ugly hackaround for bug #592502
+ cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
+
+ sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \
+ -i source4/dsdb/samdb/ldb_modules/password_hash.c \
+ || die
+
+ # Friggin' WAF shit
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ # when specifying libs for samba build you must append NONE to the end to
+ # stop it automatically including things
+ local bundled_libs="NONE"
+ if ! use system-heimdal && ! use system-mitkrb5 ; then
+ bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
+ fi
+
+ local myconf=()
+ myconf=(
+ --enable-fhs
+ --sysconfdir="${EPREFIX}/etc"
+ --localstatedir="${EPREFIX}/var"
+ --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
+ --with-piddir="${EPREFIX}/run/${PN}"
+ --bundled-libraries="${bundled_libs}"
+ --builtin-libraries=NONE
+ --disable-rpath
+ --disable-rpath-install
+ --nopyc
+ --nopyo
+ )
+ if multilib_is_native_abi ; then
+ myconf+=(
+ $(use_with acl acl-support)
+ $(usex addc '' '--without-ad-dc')
+ $(use_with addns dnsupdate)
+ $(use_with ads)
+ $(use_with cluster cluster-support)
+ $(use_enable cups)
+ $(use_with debug lttng)
+ $(use_with dmapi)
+ $(use_with fam)
+ $(use_enable gnutls)
+ $(use_with gpg gpgme)
+ $(use_enable iprint)
+ $(use_with ldap)
+ $(use_with pam)
+ $(usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
+ $(use_with quota quotas)
+ $(use_with syslog)
+ $(use_with systemd)
+ $(usex system-mitkrb5 '--with-system-mitkrb5' '')
+ $(use_with winbind)
+ $(usex python '' '--disable-python')
+ $(usex test '--enable-selftest' '')
+ $(use_enable zeroconf avahi)
+ --with-shared-modules=${SHAREDMODS}
+ )
+ else
+ myconf+=(
+ --without-acl-support
+ --without-ad-dc
+ --without-dnsupdate
+ --without-ads
+ --disable-avahi
+ --without-cluster-support
+ --disable-cups
+ --without-dmapi
+ --without-fam
+ --disable-gnutls
+ --without-gpgme
+ --disable-iprint
+ $(use_with ldap)
+ $(use_with debug lttng)
+ --without-pam
+ --without-quotas
+ --without-syslog
+ --without-systemd
+ $(usex system-mitkrb5 '--with-system-mitkrb5' '')
+ --without-winbind
+ --disable-python
+ )
+ fi
+
+ CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
+ waf-utils_src_configure ${myconf[@]}
+}
+
+multilib_src_compile() {
+ waf-utils_src_compile
+}
+
+multilib_src_install() {
+ waf-utils_src_install
+
+ # Make all .so files executable
+ find "${D}" -type f -name "*.so" -exec chmod +x {} +
+
+ if multilib_is_native_abi; then
+ # install ldap schema for server (bug #491002)
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins examples/LDAP/samba.schema
+ fi
+
+ # create symlink for cups (bug #552310)
+ if use cups ; then
+ dosym /usr/bin/smbspool /usr/libexec/cups/backend/smb
+ fi
+
+ # install example config file
+ insinto /etc/samba
+ doins examples/smb.conf.default
+
+ # Fix paths in example file (#603964)
+ sed \
+ -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \
+ -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \
+ -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \
+ -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \
+ -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \
+ -i "${ED%/}"/etc/samba/smb.conf.default || die
+
+ # Install init script and conf.d file
+ newinitd "${CONFDIR}/samba4.initd-r1" samba
+ newconfd "${CONFDIR}/samba4.confd" samba
+
+ systemd_dotmpfilesd "${FILESDIR}"/samba.conf
+ systemd_dounit "${FILESDIR}"/nmbd.service
+ systemd_dounit "${FILESDIR}"/smbd.{service,socket}
+ systemd_newunit "${FILESDIR}"/smbd_at.service 'smbd@.service'
+ systemd_dounit "${FILESDIR}"/winbindd.service
+ systemd_dounit "${FILESDIR}"/samba.service
+ fi
+}
+
+multilib_src_test() {
+ if multilib_is_native_abi ; then
+ "${WAF_BINARY}" test || die "test failed"
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Be aware the this release contains the best of all of Samba's"
+ ewarn "technology parts, both a file server (that you can reasonably expect"
+ ewarn "to upgrade existing Samba 3.x releases to) and the AD domain"
+ ewarn "controller work previously known as 'samba4'."
+
+ elog "For further information and migration steps make sure to read "
+ elog "http://samba.org/samba/history/${P}.html "
+ elog "http://samba.org/samba/history/${PN}-4.5.0.html and"
+ elog "http://wiki.samba.org/index.php/Samba4/HOWTO "
+}
diff --git a/net-fs/smbnetfs/Manifest b/net-fs/smbnetfs/Manifest
new file mode 100644
index 000000000000..f645ece5f3a1
--- /dev/null
+++ b/net-fs/smbnetfs/Manifest
@@ -0,0 +1,5 @@
+DIST smbnetfs-0.6.0.tar.bz2 147946 SHA256 6dd20bf01201f8be4b5d20cfbfba627f6825bcb60fe71f54d8c8de18509e519b SHA512 5bc5327b1087d051cbedda40ea1183c2515e3a42b2027812c6528bbbcb736b7f92f95b3c7b9cc53da99c2138c945ceb517042359029cbe0ab8cd887839711ced WHIRLPOOL d6cce90507de276169bdbb1ce9c3579bc08713dd0df1020a58cbced0989a115124988f05317a7907aab98b391fd78f8d3aea3861960db7e4f5db4e4ae76894df
+EBUILD smbnetfs-0.6.0-r1.ebuild 790 SHA256 7aba273284b231c4a61943ff873d41bab41274d86e3aec74cf0ee95263e4b5e2 SHA512 d0c7bc5c5933e7f007b4e873696c8d029ae775ac4fa3e9babe7080f8a821113b005e6e9fee5c2d3ad2d7cd7ff914aae16c10ca7e8f2cf36d1bbd39a405a7ca5f WHIRLPOOL bcdc37d8ba02c8b50fbbb157e55276ee5175ffe05884cd1f7ef0bdabf8c8cd95553250d2d5caedfaa12f92b499c681616445d03f5796157ae94ea4246280e398
+MISC ChangeLog 2846 SHA256 e9c5ffcec955ca151cfdafc10e801b02c9679b63ec2d62b073473ad70465b4c9 SHA512 cbebb1cfe94c9a32d096fd0d22cfecc91d21fcd75e1a096c813d5b1118a9e05f7c3c874dfd5cce1a844fc408460e0b96792ebbbbc3ef916c060281dcadad17fd WHIRLPOOL 9a4b3373aba5a3e044065b04a525e5afa5643b3c2ad87448f81e08931acf21d518f8f6b9702a92fe6ec0d9c44fcde103e1cbc8c6529996de9e989c22ffb89174
+MISC ChangeLog-2015 2204 SHA256 743325eb1cac7fb27d1910fd578dbaf50358b558b40bedbda58226af4a00a2c1 SHA512 1e1931838c1e1be393c78e4d70341dd3b9cb87e673508c3e54d49d6d81457aa4086c6a067c7dc6b52a2e2c0679006fb8eccad92b6f1482799fbb7cbc00be6187 WHIRLPOOL 71d6bbd806ee9cc62edfb8d1a5c66427270d43932207953fc92ae05b06244a39265b57c1d63bb26d08f76a68f442423b4ba2fa4231f7a48d87375422cc9ebeec
+MISC metadata.xml 1455 SHA256 9973869a00407a2b026ab389f7b4f56a07e2917e45ce333d1008339e2b0bd10f SHA512 918e726a9369b531385f53649de0f413df1185ecbbe3d4dd66b2a5e531d97b79327b657679125c11474913ad6fe12ea7fe16d5df6313654294a151b85597a3fd WHIRLPOOL b7c3c8787037e04ad6d6c1727e8b400d6c9355121318ea20e61957a2bfa8d60f46557751c2b55dda434c9973a9d1fb4f6a053857729988d307e84c9f4a3a9ce3
diff --git a/net-fs/smbnetfs/metadata.xml b/net-fs/smbnetfs/metadata.xml
new file mode 100644
index 000000000000..a9595027206b
--- /dev/null
+++ b/net-fs/smbnetfs/metadata.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>slyfox@gentoo.org</email>
+ <name>Sergei Trofimovich</name>
+ <description>Primary Maintainer</description>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription>
+ SMBNetFS is a Linux/FreeBSD FUSE filesystem that allow you to use samba/microsoft network.
+
+ Features:
+ - Linux-2.6 and FreeBSD &gt;= 6.0 are supported (Linux-2.4 is not tested)
+ - you can use Samba/Microsoft network as a regular unix filesystem
+ - workgroup/computer/share entries are dynamically created
+ - windows domain supported
+ - user defined workgroup/link/hosts are supported
+ - national character supported
+ - in config files you can specify different user/password to access different
+ network shares
+ - command "cd mountpoint/username:password@computer_or_ip" allows you to
+ access "computer_or_ip" as user "username" with password "password"
+ (this is insecure, but usefull)
+ - the program is multithreaded, so simultaneous access to a file/share
+ is possible
+ </longdescription>
+ <use>
+ <flag name="gnome">Use the <pkg>gnome-base/gnome-keyring</pkg> for password management.</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">smbnetfs</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-fs/smbnetfs/smbnetfs-0.6.0-r1.ebuild b/net-fs/smbnetfs/smbnetfs-0.6.0-r1.ebuild
new file mode 100644
index 000000000000..36bdd3335968
--- /dev/null
+++ b/net-fs/smbnetfs/smbnetfs-0.6.0-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils readme.gentoo
+
+DESCRIPTION="FUSE filesystem for SMB shares"
+HOMEPAGE="https://sourceforge.net/projects/smbnetfs"
+SRC_URI="mirror://sourceforge/smbnetfs/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64 ~arm-linux ~x86-linux"
+IUSE="gnome"
+
+RDEPEND=">=sys-fs/fuse-2.3
+ >=net-fs/samba-4.2
+ >=dev-libs/glib-2.30
+ gnome? ( gnome-base/libgnome-keyring )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DISABLE_AUTOFORMATTING=yes
+DOC_CONTENTS="
+For quick usage, exec:
+'modprobe fuse'
+'smbnetfs -oallow_other /mnt/samba'
+"
+
+src_configure() {
+ econf $(use_with gnome gnome-keyring)
+}
+
+src_install() {
+ default
+ readme.gentoo_create_doc
+ dodoc AUTHORS ChangeLog
+}
diff --git a/net-fs/smbtad/Manifest b/net-fs/smbtad/Manifest
new file mode 100644
index 000000000000..4ea0ba4f0a75
--- /dev/null
+++ b/net-fs/smbtad/Manifest
@@ -0,0 +1,6 @@
+AUX smbtad.rc 493 SHA256 83e8b9b3a8286615bdff4dfade849fbbb8bf77934308959d81464c761ad93ec7 SHA512 8b5d8d717740692baf7f713b2e1d71d87bd0ef906269daf9c9ae78b010470b56495d8b3e756b95ad00055ef9cd6747fe9439750658de13e12e0c344038caf35f WHIRLPOOL f9e9d31c337f19c320c709e5643ad00db7e80a853a5d914b7afea51985bd693989db56fe48ac39a27bfe607f331e1c9e001da8ff70a2fda092165ec1cbf65be4
+DIST smbtad-1.2.6.tar.bz2 82062 SHA256 0f641a7cb9f98d6ea28f52bca5055eebec74fa6d3e5fe32236afa3770ea26d48 SHA512 fd3b370d973a42fb2dee48d2fec08e20af32386893ee67bc407decd001a76c944f3a17b3251e9d8d746feb1e87c69776986d600fd108450113835823f6313e2c WHIRLPOOL 697199a30217e5f1c4dd0ce1754b4542725d9e8aa96c8fd78f354a50324518a8bcb6e03bbfe8a789531b5ef02846cb553527d08a25f8297937a2fa511d80376b
+EBUILD smbtad-1.2.6.ebuild 761 SHA256 d1e79cf21c7e5f0e1883257737237ff7b8e93083cc9ac006567805e28a5cc242 SHA512 c5c13920c69ae52afe4ba27f1488fbb0f45bf69206b7b80a5e045ae15c45811cfe000ca4a930a7abeccc35da05c80b01bcf130eda44c8575935df7306ecca97b WHIRLPOOL ecde06517e7c3001aeb37b49c25eab5a4913568bb43c488552e14561d8a6e135bf08c794c710ace9b6417922e7cca3a10dce6e7a0dfcc282934a51378eecf2a7
+MISC ChangeLog 3024 SHA256 0a5a6c9e2734e009b19c50b9447f483acdae091f19823a8f84bd7a9610d5a5b0 SHA512 e05e7ecb1b1339fda81f040e152699f35e34db761a3ea1188eac74ed6c3a7bbc0b3d7c46d62ca3a10258506e5923b8374a346ed8c155ef506d69a979360b13bc WHIRLPOOL 54ba7b35e4af79ca6cc8d72ad9c3cddca0e8b6419c59a8d20d1772dd45d057db278592e1b46528f0c1679613104861a46595191899f68c08f50b04ded01af1be
+MISC ChangeLog-2015 897 SHA256 578bae63da8325ce5a2648bc65c4037e42ef165da5d8334c518e8f40fc08bc84 SHA512 0043588ad71479116f4911d75e2d54d8e0c435ee7dc49c14a9416b379219e02e660c768eeb54e0bf9e92b46f7d591980ea83fc4cc20571d72cd67f0fc62b9fb0 WHIRLPOOL 8cf983079a992730f1b4a3b002fcf2b51e2ad6fadd786a3ecd19960bdb47de0c333b7a71064de723ec31eecfd43b249a129f5d753e2900bd16d1ad65b95e5687
+MISC metadata.xml 332 SHA256 9564acc9494f6a6a4fe4731e5ba96f9b8565a784f7783e745caff58d7ca787f1 SHA512 14edfec96bfbb5118d3b7b8e6ec58c7015bcd26f7c2f19b603557bc1849511f73e84cdd0b200bd782279aff282dcd01896abfda253ce71744cc9f859e6e0198e WHIRLPOOL 88db9632c201e534d829cc6bb2c816b0877da59477199916f042247a8db2c6f0b9e1a8eb6f6185d1fda28ffcba5a96267371493e42b32426e432e798a616c905
diff --git a/net-fs/smbtad/files/smbtad.rc b/net-fs/smbtad/files/smbtad.rc
new file mode 100644
index 000000000000..afc3e3c13617
--- /dev/null
+++ b/net-fs/smbtad/files/smbtad.rc
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CONFFILE=/etc/conf.d/${SVCNAME}.conf
+PIDFILE=/var/run/${SVCNAME}.pid
+
+depend() {
+ before samba
+ use dns logger
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --quiet \
+ --exec /usr/bin/"${SVCNAME}" \
+ -- -c "${CONFFILE}"
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --name "${SVCNAME}"
+ eend ${?}
+}
diff --git a/net-fs/smbtad/metadata.xml b/net-fs/smbtad/metadata.xml
new file mode 100644
index 000000000000..2ada94ef8a16
--- /dev/null
+++ b/net-fs/smbtad/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>samba@gentoo.org</email>
+ <name>Samba Team</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">hhetter/smbtad</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-fs/smbtad/smbtad-1.2.6.ebuild b/net-fs/smbtad/smbtad-1.2.6.ebuild
new file mode 100644
index 000000000000..75980db51f3a
--- /dev/null
+++ b/net-fs/smbtad/smbtad-1.2.6.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+DESCRIPTION="Data receiver of the SMB Traffic Analyzer project"
+HOMEPAGE="https://github.com/hhetter/smbtad"
+SRC_URI="http://morelias.org/smbta/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ dev-db/libdbi
+ dev-libs/iniparser:0
+ sys-libs/talloc
+"
+RDEPEND="${DEPEND}
+ || (
+ <net-fs/samba-3.6[smbtav2]
+ >=net-fs/samba-3.6
+ )
+"
+
+DOCS=( README AUTHORS )
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ sed -i \
+ -e '/CMAKE_C_FLAGS/d' \
+ CMakeLists.txt || die
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ newinitd "${FILESDIR}"/smbtad.rc smbtad
+ newconfd dist/smbtad.conf_example smbtad.conf
+}
diff --git a/net-fs/smbtatools/Manifest b/net-fs/smbtatools/Manifest
new file mode 100644
index 000000000000..5f8203ef5048
--- /dev/null
+++ b/net-fs/smbtatools/Manifest
@@ -0,0 +1,6 @@
+AUX smbtatools-1.2.6-fix-cmake.patch 1136 SHA256 490c7791b111609d264ec4f7a01c38e6871e35bca7627951ff913a5de4c0bdf4 SHA512 bf5b6ed457fc99959f0424f62b7b0b8565ad436d3d70303ce1e51560ad653d5907dbcc9a477ee8c2c86d07807eec54920beee57b2d6b80a709acbc579a08373e WHIRLPOOL ec544c7c28559d338d0cec6864b8a5acc6ff4de93daae9c07d09e9f45968a728d7115922834feecd9d2dac16c817897eac0200144b0d2d3024725207b0d8e6da
+DIST smbtatools-1.2.6.tar.bz2 2235106 SHA256 be03ebb24bed338cd2cc1e38bc112eb52c0b7c9f2154b3c1c9d195fd7245e667 SHA512 0dc25d8eb65151cb7216b2c417054259a0f415af5857e59239ae90aee93a8a3a43a7a74f5f9d8b2200a47e0c6fc92ac6c58308452075020c35ee6ebcb71dbfcf WHIRLPOOL f3f840fcbd54406d5f1e170ff397b723c1ef308413a6b04d029ac63b2689eb4d996ba383cbef4a9e93870e48b66bedd89f4e64edf23b5d7bfd8b192e9c403dc4
+EBUILD smbtatools-1.2.6-r1.ebuild 990 SHA256 2054a50a8fb5f5bddd89bf3cc6038b7806ab4bfad4b09f5be3e56a4166c03ad1 SHA512 81ad76d38f23021affbdc7e0c74964b61b260506d6b95bfcdf057374f32e56798a987c9f270a2cbeeaf493f4567ea77a44a27dab451432f9b06cb779da56ea43 WHIRLPOOL d89851e781095ccb9b82d4cc91a5b3c9aabc4c88ba3c8b0a31a49bfcef73da874f84a48eb776a9387ecc68f8dc6e9ddac46badc2b4a9edaea7b81aea5b7ab7d9
+MISC ChangeLog 3210 SHA256 c27624de2c9770cdc40fc931cffe4a337685dd2a0a32cc09b8f37a47344e8461 SHA512 b8d2c7d896c12c814b7b3de4ee8209ec91378b59c5ef54ba4e7e9a3fe49961035a8f0d8e63896a14868906acfc9ac15e015516433fb0b37ca57b0421cd9970b8 WHIRLPOOL 03b3d827cc67b08957df52d71242c27b0bc3282a7fcd7b478154296ea4ae231c3972bb1e714d4a0350661f1964d3f710f7d8c140391303f1c224c6916742dedf
+MISC ChangeLog-2015 1202 SHA256 e0bffee0ab3230f1e6a322d391d78ad44cf7ff9b8cff9ceb81216654749af213 SHA512 6aa7ff5f8cfeb5b8978688a88076ff6ae771ccb16d4fee7fbd7e9e5e255dd9d819a96eb34c6aad77a28508a223ed192cd133221017419cdaa0bb2452885becef WHIRLPOOL 3bc64d6b9e9c85a35c02a1650e107058eb4bea4109495c6db82258228fa468ba918a9594876d28f73d9806059e4333a910720532f8503b4927eb9b9840fbf475
+MISC metadata.xml 336 SHA256 aaddd1a9bb3fde7191df48541e5402b5c7e95d151fe1741447c8aa706bdfd3f6 SHA512 78846c13ad7a2424bd941b511800b89758527a4de48aff85e0b522eb2125b013de28bf87ef7b95b27adadca7fdedec30c0a2fa6b0a37809d00a35b0e62183a2a WHIRLPOOL 2895384ebf8bb021b33705438e52f4b4cc410529a794cf20b97bd07131700540f963f96574384f7cdff75d225b70ef0794301a415f50db7c672823add66f0267
diff --git a/net-fs/smbtatools/files/smbtatools-1.2.6-fix-cmake.patch b/net-fs/smbtatools/files/smbtatools-1.2.6-fix-cmake.patch
new file mode 100644
index 000000000000..2b8979b5a380
--- /dev/null
+++ b/net-fs/smbtatools/files/smbtatools-1.2.6-fix-cmake.patch
@@ -0,0 +1,38 @@
+--- a/CMakeLists.txt 2016-03-31 11:14:33.462962843 -0400
++++ b/CMakeLists.txt 2016-03-31 11:53:16.319234121 -0400
+@@ -30,7 +30,7 @@
+ MESSAGE( FATAL_ERROR "ERROR: you need the qt development files and library installed.")
+ ENDIF()
+ IF (QT_INCLUDE_DIR)
+- INCLUDE_DIRECTORIES($QT_INCLUDE_DIR)
++ INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR})
+ ENDIF()
+
+
+@@ -42,7 +42,7 @@
+ MESSAGE( FATAL_ERROR "ERROR: you need the pango library and headers installed.")
+ ENDIF()
+ IF (LIBPANGO_INCLUDE_DIRS)
+- INCLUDE_DIRECTORIES($LIBPANGO_INCLUDE_DIRS)
++ INCLUDE_DIRECTORIES(${LIBPANGO_INCLUDE_DIRS})
+ ENDIF()
+
+ #
+@@ -53,7 +53,7 @@
+ MESSAGE( FATAL_ERROR "ERROR: you need the cairo library and headers installed.")
+ ENDIF()
+ IF (LIBCAIRO_INCLUDE_DIRS)
+- INCLUDE_DIRECTORIES($LIBCAIRO_INCLUDE_DIRS)
++ INCLUDE_DIRECTORIES(${LIBCAIRO_INCLUDE_DIRS})
+ ENDIF()
+
+
+@@ -65,7 +65,7 @@
+ MESSAGE( FATAL_ERROR "ERROR: you will need curl development files installed.")
+ ENDIF()
+ if (CURL_INCLUDE_DIRS)
+- INCLUDE_DIRECTORIES($CURL_INCLUDE_DIRS)
++ INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS})
+ ENDIF()
+
+ # compile on SunOS
diff --git a/net-fs/smbtatools/metadata.xml b/net-fs/smbtatools/metadata.xml
new file mode 100644
index 000000000000..e7f0687d05b1
--- /dev/null
+++ b/net-fs/smbtatools/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>samba@gentoo.org</email>
+ <name>Samba Team</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">hhetter/smbtatools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-fs/smbtatools/smbtatools-1.2.6-r1.ebuild b/net-fs/smbtatools/smbtatools-1.2.6-r1.ebuild
new file mode 100644
index 000000000000..1e062b23524e
--- /dev/null
+++ b/net-fs/smbtatools/smbtatools-1.2.6-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs cmake-utils
+
+DESCRIPTION="Tools for configuration and query of SMB Traffic Analyzer"
+HOMEPAGE="https://github.com/hhetter/smbtatools"
+SRC_URI="http://morelias.org/smbta/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+RDEPEND="
+ dev-db/libdbi
+ >=dev-db/sqlite-3.7.0:3
+ net-fs/samba
+ net-misc/curl
+ sys-libs/ncurses:0=
+ sys-libs/talloc
+ x11-libs/cairo
+ x11-libs/pango
+ dev-qt/qtgui:4
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+RDEPEND+="
+ net-fs/smbtad
+"
+
+DOCS="doc/smbta-guide.html doc/gfx/*.png"
+PATCHES=( "${FILESDIR}"/${P}-fix-cmake.patch )
+
+src_configure() {
+ local PKG_CONFIG=$(tc-getPKG_CONFIG)
+ local mycmakeargs=(
+ -Ddebug=$(usex debug)
+ -DLIBSMBCLIENT_LIBRARIES="$(${PKG_CONFIG} --libs smbclient)"
+ -DLIBSMBCLIENT_INCLUDE_DIRS="$(${PKG_CONFIG} --variable includedir smbclient)"
+ )
+
+ cmake-utils_src_configure
+}
diff --git a/net-fs/sshfs/Manifest b/net-fs/sshfs/Manifest
new file mode 100644
index 000000000000..986916bf16fa
--- /dev/null
+++ b/net-fs/sshfs/Manifest
@@ -0,0 +1,8 @@
+DIST sshfs-2.10.tar.gz 163076 SHA256 70845dde2d70606aa207db5edfe878e266f9c193f1956dd10ba1b7e9a3c8d101 SHA512 8887eb634edc4c64cf7a0c1a1be4d9ef72d5080eec687d187898dc31bb841ed730850bae8467247a05e56c2b4ef7e9d02fdc0812d48876e145c9826a7406d9ff WHIRLPOOL f1748018d97800d037715cfe5f0f7ce9bae14bb08d5ffb981e4685776043245a507f140b949e5c64b9804841bc76bfb2ccc6fb1566e38a78610c6819954e79bc
+DIST sshfs-2.8.tar.gz 153230 SHA256 7f689174d02e6b7e2631306fda4fb8e6b4483102d1bce82b3cdafba33369ad22 SHA512 a3c6a75137a4410a0c4e049ffdb6e219319add9673de32cf32a74c12ff4bb80f92a6e75088417a180a4dd01957deec39bd780a02140e8b0348f5868c92d67cfd WHIRLPOOL b48b6586e85292079dd51505c3c11b4c8b563a6e858362d8863239672e1446e06bef8c6c3dbfc70756e452672e8416980024b557a3923dbf5ffeef62911b2c65
+DIST sshfs-2.9.tar.gz 154423 SHA256 46d1e1287ce97255fcb50010355184d8c5585329f73ab1e755217419a8e6e5de SHA512 e7ddd4ed116287d5b6e67caaf87f7dedaec8c370c9641749c6b0adf493ff4e9b1e79a68c0abe8f081a4bd68d6706a770c384a1abfbe22aba494af3e6fb792a42 WHIRLPOOL e7f93fe85746ead60ab4301716f57a04f72c7eab756c86d031475c7d5adeebd2e90331e229deaaf64818a843ea09cef22c89c5df19dc1efbc85ec0224e35def9
+EBUILD sshfs-2.10.ebuild 555 SHA256 5aa88dfc740d19b4628f7944707e2d46933b31615583371e86cdd2a5ae0353e3 SHA512 44c98dd1515155c7c307c60c0e127f0d9ce80bb6f1f7ec40e2d7be507025f6646a437c306f5012b0dadf7d20ae120dc412367811d936dc48db3ae2ff202932c4 WHIRLPOOL 873428419b96852553669deb372928f7c517348fdd5652e4cb204a7c390163c0f1873d2ec7ad692a18be4f805ef6a68c88d7d7fd07b13034ae501ee5e3a7532a
+EBUILD sshfs-2.8.ebuild 586 SHA256 5c1fb3a4e511589bee6fe46e684e82c4c2640dd91c5bd2f635c7e3906dccb560 SHA512 236e68382702733eb3fa109f12a4d2626065340a3ae9bf7d0fb954dd4f76d08a77772101e9807118061c5311c8b8b41db194dff7c55a7dda5293b5cf76b624f6 WHIRLPOOL 28d2130939e2db541c9147a67c26b971669963f84e3487d4d867e12b2502b487288c8474d01ebffed23a129c0dd0e13930b5c6a0bf409cef0aed44a871fbd9fe
+EBUILD sshfs-2.9.ebuild 583 SHA256 aca16c639de42658a02a01d58de526c449f7a73cc450d7e450de498a995a0e4e SHA512 f21b00034ca56ff57f5d1e3b21eb190ce8b9ad3795cb469ce352b83fd0a781fe119733969476a1d3d648fa5891a7899962f2400c8e5f6d13514ec8a6980542e6 WHIRLPOOL 4ef93ea9f36098d1e8b4b017f3db03d98fdef0063ccf49981b7e9ecb08050516df86388524d843df9c311145e33071f1b111c327ccdcb035b21b579623bdcdbf
+MISC ChangeLog 1119 SHA256 bd6ca9f256b809c89cbe3e8558b3d51d9db8dab1267de5ec755db18ba6486862 SHA512 d5104b4c3db8860bc1919e6792369b9da6715d385f7c36052a9d24e807e2437c9ecdfa7545d91379cb95529a5c61b6cba2afabf04ba7f4efee6190e297c33afb WHIRLPOOL ec4193513535aa9c5d59781aea9bbd0af0a295ff7d904556c8232744c9bf775d627cba776e0784ac9d4536d0d95dd812f20af5b832d9e38fbb69b6d0510c9e0b
+MISC metadata.xml 334 SHA256 abb347ba42455f80bc973091940fd5995b71efedc26cc6232de5dcdd24f957e9 SHA512 17d120fe909408832fcfcae2cc074316fb1c1952f92b8ad1d395ac2b44f99a38cee499116b976b2326cea3778e01c2cd7b31dd82d05a11d97b95585a32071cec WHIRLPOOL 1cd937a9d601ccd4ff12898f0237078afcd0a15833c5cdf9a435f19c63733e02c8f108a98958e2e685c7258ed9ac00db91cedf38ae3c3af0dc264c695eb73260
diff --git a/net-fs/sshfs/metadata.xml b/net-fs/sshfs/metadata.xml
new file mode 100644
index 000000000000..1dde05c3d522
--- /dev/null
+++ b/net-fs/sshfs/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">libfuse/sshfs</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-fs/sshfs/sshfs-2.10.ebuild b/net-fs/sshfs/sshfs-2.10.ebuild
new file mode 100644
index 000000000000..085c0eecfed8
--- /dev/null
+++ b/net-fs/sshfs/sshfs-2.10.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Fuse-filesystem utilizing the sftp service"
+HOMEPAGE="https://github.com/libfuse/sshfs"
+SRC_URI="https://github.com/libfuse/${PN}/releases/download/${P}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+SLOT="0"
+
+CDEPEND=">=sys-fs/fuse-2.6.0_pre3
+ >=dev-libs/glib-2.4.2"
+RDEPEND="${CDEPEND}
+ >=net-misc/openssh-4.4"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
diff --git a/net-fs/sshfs/sshfs-2.8.ebuild b/net-fs/sshfs/sshfs-2.8.ebuild
new file mode 100644
index 000000000000..6971113c325e
--- /dev/null
+++ b/net-fs/sshfs/sshfs-2.8.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Fuse-filesystem utilizing the sftp service"
+HOMEPAGE="https://github.com/libfuse/sshfs"
+SRC_URI="https://github.com/libfuse/${PN}/releases/download/${PN}_${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="amd64 arm hppa ~ppc ~ppc64 x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+SLOT="0"
+
+CDEPEND=">=sys-fs/fuse-2.6.0_pre3
+ >=dev-libs/glib-2.4.2"
+RDEPEND="${CDEPEND}
+ >=net-misc/openssh-4.4"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( ChangeLog AUTHORS )
diff --git a/net-fs/sshfs/sshfs-2.9.ebuild b/net-fs/sshfs/sshfs-2.9.ebuild
new file mode 100644
index 000000000000..1b02e48401b4
--- /dev/null
+++ b/net-fs/sshfs/sshfs-2.9.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Fuse-filesystem utilizing the sftp service"
+HOMEPAGE="https://github.com/libfuse/sshfs"
+SRC_URI="https://github.com/libfuse/${PN}/releases/download/${P}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+SLOT="0"
+
+CDEPEND=">=sys-fs/fuse-2.6.0_pre3
+ >=dev-libs/glib-2.4.2"
+RDEPEND="${CDEPEND}
+ >=net-misc/openssh-4.4"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( ChangeLog AUTHORS )
diff --git a/net-fs/tahoe-lafs/Manifest b/net-fs/tahoe-lafs/Manifest
new file mode 100644
index 000000000000..a1911fc561ae
--- /dev/null
+++ b/net-fs/tahoe-lafs/Manifest
@@ -0,0 +1,5 @@
+DIST allmydata-tahoe-1.10.2.tar.bz2 1378204 SHA256 fed5d719c966d9528a45e8ad66e6c8ff3dcb3c06db94775194c7c75566047be7 SHA512 79d4e3395aa7ef8e1e7c97eebdfcb75b3b36edb75aa5d5f805c568b842b9b2f4ea5f8529dbf32fbdd9cc467cf82f153aca09310bc3b69fa00efae7be8a7bc198 WHIRLPOOL d38a362105118113aaaf34c429c4b611e37ebf10d983dff1a4a117f6802671df78805ac1950b1c01279d36d1c87bc3976fec498580117d6f9bc46912a00b792f
+EBUILD tahoe-lafs-1.10.2.ebuild 1472 SHA256 31d9031f74ea7759e1cb1aac09e36d4813c44a0a16a52c6c444ade11d1218300 SHA512 ff60f3d9eb3bd32ad4da06ad0d5e0d4fd035fd1eec4c8fc06bedd491ebf0df697cf44b703eee41dba6e06fcb5a5506aa52b26fc41fc9edb7d1ab43686c17eb5d WHIRLPOOL 4dff1e002fdc866dc0a361dd48ed5c0219b8be824c6ba6c11c8138573d6bd43475e1f5a8be41082e83e9c7b7b5d3a4f68000a83663426e6696e0ab9a8da426c5
+MISC ChangeLog 2985 SHA256 65e998e60cd71d4386362727455b28e89d5f1928fc6a313e039240a0dfb22d4f SHA512 47b6bc9d18949cd53f1828246b055fcdaa8734928d1567e75e3ea9ba729a89cf76f41967d647697b3ee3c9537865692d18e0a42a850804da47c574a978f79489 WHIRLPOOL 9c372d141d965bf928f2fbd98f3b235319857b12daea27851215e75f1dea67fad02d2578a21e9dd13446813857488375b1166b85d04203d3a08d1bb3384d9978
+MISC ChangeLog-2015 1985 SHA256 914b6a55120fe330557739d21e002400005df68b3b05734ab5c27574ae4fd9c0 SHA512 d0e232a5c2bf1a8f8da26e53ea5bfefcec473753f59ce05ffd2db6f38609bac3ca5f66bf70eca1639662d6d3308a45c4d1a7a7940a431b211abf977a627ff856 WHIRLPOOL f4af61400aa5144b34c81ffff74539e580e5cf4ab986d2e9a2c55b4ae8ebedd8926285d1bf328f075563d7487ff6aad1b6dd265acc154d8b661a2ae15a7d8a08
+MISC metadata.xml 736 SHA256 04fd5a0173634cca87057c75d2d55c66422bb3c429adbc03af54e73ca2b85d40 SHA512 52ad1244425d834c155be80945160903a0ed07d580be29fa31414edc0e53f9271c49eb32f864d07073e6870bc8f9a30db19f270d716387e0ed2faaef5a3285e2 WHIRLPOOL e6300855bca1fc8975dfb37738c9c72577b5e2915264b6398a78ce0dfb2b90feeeed092f4fc6ee89991278c72b64936860e8cf97d8254aa0761b3f717d2a14d4
diff --git a/net-fs/tahoe-lafs/metadata.xml b/net-fs/tahoe-lafs/metadata.xml
new file mode 100644
index 000000000000..28b6d980aad7
--- /dev/null
+++ b/net-fs/tahoe-lafs/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription lang="en">
+ Tahoe-LAFS is a Free and Open cloud storage system. It
+ distributes your data across multiple servers. Even if some
+ of the servers fail or are taken over by an attacker, the
+ entire filesystem continues to function correctly, preserving
+ your privacy and security.
+ </longdescription>
+ <upstream>
+ <bugs-to>
+ https://tahoe-lafs.org/trac/tahoe-lafs/wiki/ViewTickets
+ </bugs-to>
+ <doc lang="en">
+ https://tahoe-lafs.org/trac/tahoe-lafs/wiki/Doc
+ </doc>
+ <remote-id type="github">tahoe-lafs/tahoe-lafs</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-fs/tahoe-lafs/tahoe-lafs-1.10.2.ebuild b/net-fs/tahoe-lafs/tahoe-lafs-1.10.2.ebuild
new file mode 100644
index 000000000000..a22f0f145c18
--- /dev/null
+++ b/net-fs/tahoe-lafs/tahoe-lafs-1.10.2.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite"
+
+inherit distutils-r1
+
+MY_PN="allmydata-tahoe"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Secure, decentralized, data store"
+HOMEPAGE="http://tahoe-lafs.org/trac/tahoe-lafs"
+SRC_URI="http://tahoe-lafs.org/source/tahoe-lafs/releases/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+RDEPEND="
+ >=dev-python/characteristic-14.0.0[${PYTHON_USEDEP}]
+ >=dev-python/foolscap-0.8.0[${PYTHON_USEDEP}]
+ dev-python/nevow[${PYTHON_USEDEP}]
+ >=dev-python/pyasn1-0.1.8[${PYTHON_USEDEP}]
+ dev-python/pyasn1-modules[${PYTHON_USEDEP}]
+ dev-python/pycrypto[${PYTHON_USEDEP}]
+ dev-python/pycryptopp[${PYTHON_USEDEP}]
+ >=dev-python/pyopenssl-0.14[${PYTHON_USEDEP}]
+ dev-python/pyutil[${PYTHON_USEDEP}]
+ dev-python/service_identity[${PYTHON_USEDEP}]
+ dev-python/simplejson[${PYTHON_USEDEP}]
+ >=dev-python/twisted-core-13.0.0[${PYTHON_USEDEP}]
+ dev-python/zbase32[${PYTHON_USEDEP}]
+ dev-python/zfec[${PYTHON_USEDEP}]
+ dev-python/zope-interface[${PYTHON_USEDEP}]"
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ rm -r setuptools* setup.cfg || die
+ distutils-r1_src_prepare
+}
+
+src_install() {
+ distutils-r1_src_install
+ use doc && dodoc -r docs/*
+}
+
+pkg_postinst() {
+ elog
+ elog "optional dependencies:"
+ elog " dev-python/twisted-conch (for sftp access)"
+ elog
+}
diff --git a/net-fs/torus/Manifest b/net-fs/torus/Manifest
new file mode 100644
index 000000000000..c7a27b287b84
--- /dev/null
+++ b/net-fs/torus/Manifest
@@ -0,0 +1,6 @@
+DIST glide-0.10.2.tar.gz 204775 SHA256 f0153d88f12fb36419cb616d9922ae95b274ac7c9ed9b043701f187da5834eac SHA512 5e8ecf20de7ce53236d16e52e98acf46f4611d84b742665009d4aea44efe9ba09344f9fe5a6d3f6d6b67ba168ac0f825f620ea419a24ddd826a3ecd83aeea320 WHIRLPOOL 5ea7e59e06cb88c080fcd11af090188a1df8c1dfc8503c0a7c70cc57522b8cedcddc9f1a8fba5ad0c1236f3635d4a8038121f038674f840e44e22d3fe8bbccb2
+DIST gogo-protobuf-0.3.tar.gz 2116795 SHA256 82222a5ad3bdc53fb60851df05acc16e7578932984c78e32abd05cb610127308 SHA512 57e1b1715d4811800da8cf9f2c72d202deae622d89715d7eff2ff0c406a0ea3778c187443abb17b072ae6fe57382844807f103837032759dab5420c860b99fb8 WHIRLPOOL 2c900a93d698d946949e8ef830c9940ea43c8faaf667eec7ec99ad58f46e5de9e59e43182d675f419196caacb08af2a49e63146998c5ccbef379c3920997511f
+DIST torus-0.1.2.tar.gz 8319943 SHA256 1639ff6dc739daa44259bf8fe7573301702fae86d136a89e00401122d37f9018 SHA512 46d56f560d92cf0b0c357d57d5249584f9a8444dc6bb0c3e00db3a288eea496fbc19c73be87ac9d534a4707ed74769e91354c95bac4b354fc62104a006239912 WHIRLPOOL c12151246943d25304e3074baa4616d478626ff9a0a092dbbf31ba35e2ca265257f2ef6438d64c4e65535b61d32b7b9c5a65b41209c0683f2e8f95aef50b0258
+EBUILD torus-0.1.2.ebuild 1888 SHA256 2587f3bcf1805d1087e96debd19ec80d9372b8610cee02c14151f63d4eab1a2b SHA512 71b436bcd39ecae80ac03713b92bcb29bce90f66f059dc8aca5bd35a29d1ef01caccaab165cd71f73f9382d51c322825e029ab51a17e0deec86b8d24259110b9 WHIRLPOOL 681c538e96c04ca98c7f94d4e52d108f05cae1649b5e942e8f0843809ce326cf5a94ceffe2ec333c4781f49dec5635cdca42c4a12c16dedc044986fa9ea0ecff
+MISC ChangeLog 410 SHA256 6701c6026e935201e62fea22e258d6d5ef0424374aacdcb553f19fc57a69de66 SHA512 d8888ae327e08a794e44731312e031f63116a899f2397a680218751838c5b2b9172f35558350ea1a6a140e21f444ff84822ef27c422ba0b29eb26a09a7de3606 WHIRLPOOL 78a0a37202704a8af47e2151dc8d09367cf839126158fbf88ee90b8df17e64479f770dc9ae396222727cd01b142b1b6e74e5dea341c290f2228e3f75165a2388
+MISC metadata.xml 321 SHA256 3a2a89d82dac8b33c2b24ebbcbf60e777afaba6522e78b214f91018d7baa05e1 SHA512 680b29d5bde635b912df18de8f34e021bcd37907d9f7990166b3d787a7466f20737f7190391baf4d322e6f928dba22b5dc036655b5e61466d5bf39c1728b5d94 WHIRLPOOL 943cb8730cf984b44dd5f8cd930b2e223f7e4cec551bdfcf51472b81fc95fc1f2dda16feada142fcaa9a422b438db6f437d62b1f4e6fb2448b5789b21c421377
diff --git a/net-fs/torus/metadata.xml b/net-fs/torus/metadata.xml
new file mode 100644
index 000000000000..d39e23bd6dca
--- /dev/null
+++ b/net-fs/torus/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>zmedico@gentoo.org</email>
+ <name>Zac Medico</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">coreos/torus</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-fs/torus/torus-0.1.2.ebuild b/net-fs/torus/torus-0.1.2.ebuild
new file mode 100644
index 000000000000..0c209a63b960
--- /dev/null
+++ b/net-fs/torus/torus-0.1.2.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGO_PN="github.com/coreos/${PN}/..."
+SRC_URI="https://${EGO_PN%/*}/releases/download/v${PV}/${PN}_v${PV}_src.tar.gz -> ${P}.tar.gz
+ https://github.com/Masterminds/glide/archive/0.10.2.tar.gz -> glide-0.10.2.tar.gz
+ test? ( https://github.com/gogo/protobuf/archive/v0.3.tar.gz -> gogo-protobuf-0.3.tar.gz )"
+
+DESCRIPTION="A distributed storage system coordinated through etcd"
+HOMEPAGE="https://${EGO_PN%/*}"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc test"
+
+DEPEND=">=dev-lang/go-1.6:="
+RDEPEND=""
+
+get_archive_go_package() {
+ local archive=${1} uri x
+ for x in ${SRC_URI}; do
+ if [[ ${x} == http* ]]; then
+ uri=${x}
+ elif [[ ${x} == ${archive} ]]; then
+ break
+ fi
+ done
+ uri=${uri#https://}
+ uri=${uri%/archive/*}
+ case ${uri} in
+ ${EGO_PN%/*}*)
+ echo "${EGO_PN%/*}|${PN}_*"
+ ;;
+ *)
+ echo "${uri}|${uri##*/}-*"
+ ;;
+ esac
+}
+
+unpack_go_packages() {
+ local go_package x
+ # Unpack packages to appropriate locations for GOPATH
+ for x in ${A}; do
+ unpack ${x}
+ if [[ ${x} == *.tar.gz ]]; then
+ go_package=$(get_archive_go_package ${x})
+ x=${go_package#*|}
+ go_package=${go_package%|*}
+ mkdir -p src/${go_package%/*}
+ mv ${x} src/${go_package} || die
+ fi
+ done
+}
+
+src_unpack() {
+ mkdir "${S}" || die
+ cd "${S}" || die
+ unpack_go_packages
+}
+
+src_compile() {
+ GOPATH="${S}" go install -v -work -x github.com/Masterminds/glide/... || die
+ mkdir -p "${S}/src/${EGO_PN%/*}/tools" || die
+ mv "${S}/bin/glide" "${S}/src/${EGO_PN%/*}/tools/glide" || die
+ GOPATH="${S}" \
+ emake -C "${S}/src/${EGO_PN%/*}" VERSION=v${PV} build
+}
+
+src_test() {
+ GOPATH="${S}" \
+ emake -C "${S}/src/${EGO_PN%/*}" VERSION=v${PV} test
+}
+
+src_install() {
+ cd "${S}/src/${EGO_PN%/*}"|| die
+ dobin bin/${PN}*
+ dodoc README.md
+ use doc && dodoc -r Documentation
+}
diff --git a/net-fs/wdfs/Manifest b/net-fs/wdfs/Manifest
new file mode 100644
index 000000000000..a2051ce031fc
--- /dev/null
+++ b/net-fs/wdfs/Manifest
@@ -0,0 +1,6 @@
+AUX wdfs-1.4.2-fix-Waddress.patch 1269 SHA256 8625a8b938e5f8698e0c3d7bf3d42f21621ec65b70e609952219fb15ca50d959 SHA512 e01f9a45cd045edf05b19ddd3b3a04bbf9a03dac4e032709a98396b024079bfb4856b91aa1c0aba8b1c3ce765ce9499f46102fafc87776ae5e0d57f8b71bc0e5 WHIRLPOOL 8016fa0e9ba39d9c59f43d057c4bb6f55af34c5d87e65f1259516b945215c7f6832601938aaf9ace35ddb570850d5e111f31bb864d1d5c9642978d214ef17438
+DIST wdfs-1.4.2.tar.gz 109315 SHA256 fcf2e1584568b07c7f3683a983a9be26fae6534b8109e09167e5dff9114ba2e5 SHA512 da7e16ed86cbe4746fabe5fce44c83b1d0cd0fbc19994eefe0ce2a75f3d8c77c3c341a76409150a3509be08f8c0d28b8a9650037edcbbf2aa60f4c8ea5407004 WHIRLPOOL 0306bc45e174a627bf9b728a631e3e34135ccd2773b22ff0f9fde1342a03b724bdcc97b5c60ff55ed47337df0099ff62083d90828583e27519af96ebbd2efc1a
+EBUILD wdfs-1.4.2-r1.ebuild 537 SHA256 d45e4672c3d8208a38c6928f952ba3e4cc589ab5dc4b1987497a48f2abf4032d SHA512 a1dc12bfdf86b98892862fadccaea957b733d28cd0553c75af3ca40710e9f8038cc0c1e6629316922595855dbb0ee4601f9e622bd3d62ee0d25ba91a9cbc2a14 WHIRLPOOL 0992ea663e07142ec8be6c3847bce20c6f2eb1d87aaa36d96df8ff2f3df8b3a57163fd2c798c0ea9ca458c83926fb61d37bef0f0460813e99c965438e3ed535c
+MISC ChangeLog 2374 SHA256 93acf48faef1dc93ddf146674b51e799ec09f8cc3e1e96b901449cc3b16702d5 SHA512 215111776f11cbeb07ea24e4a61185ddeda7268b953580076f35aaffcb3bea5621d2ef69061a8e45268cf91c2a3b70f42c386dc62c72f1fa30d631ddf4c19260 WHIRLPOOL 4b6a538669f3d58acb7772349846a1c116c77c09fa8620efd5b57e724391ea44d4c20b34280c1a44875fefe27a79f297926ad2e0151bd675e4f3607b7acabd06
+MISC ChangeLog-2015 1580 SHA256 cbe201deb2e14125908eff2166c382dcaf09336f5a0cc96971adf257550481fb SHA512 6b5d628b620c2fc6815462d048a28c8dc040eb9c4ec4e0ddd83eb3f5d7e700ee88d2b8630b9eb5bad84268b7531bd3e81b9077c8001c8d4fb048a10e13915d72 WHIRLPOOL 8de343188bf91a14924b98dcfe55284cd16914469fc78dcea7721bc7ead89a949a94c2291a773c5c481bcd7dd8a3758a6067e9ee61ef9bb5e356537f2b248a54
+MISC metadata.xml 492 SHA256 fd586991f1136664e15bdc8aeeaf2582a3d5c55f3c3ed85706fdad6259570a9b SHA512 23ca1d71257b7163f4c22ad9422b5f756e54e750a47f03b2fc576141e7cc3462a5f7f229eecb649666fff94af8af54540ff065e17c00f92f724352904c85d272 WHIRLPOOL 04200856024087cce85e4fbc9467173da7e2d7bcd9f26d3e3d5a7a7893d86a1115a37999cafb6c1c10608b612fafbf7b5d4190900250c9a67bdef430255b29ac
diff --git a/net-fs/wdfs/files/wdfs-1.4.2-fix-Waddress.patch b/net-fs/wdfs/files/wdfs-1.4.2-fix-Waddress.patch
new file mode 100644
index 000000000000..0f35776bdebc
--- /dev/null
+++ b/net-fs/wdfs/files/wdfs-1.4.2-fix-Waddress.patch
@@ -0,0 +1,40 @@
+diff --git a/src/wdfs-main.c b/src/wdfs-main.c
+index 9bd5244..a9917b7 100644
+--- a/src/wdfs-main.c
++++ b/src/wdfs-main.c
+@@ -697,7 +697,7 @@ static int wdfs_open(const char *localpath, struct fuse_file_info *fi)
+ ">> %s() by PID %d\n", __func__, fuse_get_context()->pid);
+ }
+
+- assert(localpath && &fi);
++ assert(localpath && fi);
+
+ struct open_file *file = g_new0(struct open_file, 1);
+ file->modified = false;
+@@ -763,7 +763,7 @@ static int wdfs_read(
+ if (wdfs.debug == true)
+ print_debug_infos(__func__, localpath);
+
+- assert(localpath && buf && &fi);
++ assert(localpath && buf && fi);
+
+ struct open_file *file = (struct open_file*)(uintptr_t)fi->fh;
+
+@@ -785,7 +785,7 @@ static int wdfs_write(
+ if (wdfs.debug == true)
+ print_debug_infos(__func__, localpath);
+
+- assert(localpath && buf && &fi);
++ assert(localpath && buf && fi);
+
+ /* data below svn_basedir is read-only */
+ if (wdfs.svn_mode == true && g_str_has_prefix(localpath, svn_basedir))
+@@ -961,7 +961,7 @@ static int wdfs_ftruncate(
+ if (wdfs.debug == true)
+ print_debug_infos(__func__, localpath);
+
+- assert(localpath && &fi);
++ assert(localpath && fi);
+
+ /* data below svn_basedir is read-only */
+ if (wdfs.svn_mode == true && g_str_has_prefix(localpath, svn_basedir))
diff --git a/net-fs/wdfs/metadata.xml b/net-fs/wdfs/metadata.xml
new file mode 100644
index 000000000000..59ebf8dba9c7
--- /dev/null
+++ b/net-fs/wdfs/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>dev-zero@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ wdfs is a webdav filesystem that makes it possible to mount a webdav
+ share under linux, freebsd and apple mac os x. wdfs has some special
+ features for accessing subversion repositories via webdav. it's based on
+ fuse and neon.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-fs/wdfs/wdfs-1.4.2-r1.ebuild b/net-fs/wdfs/wdfs-1.4.2-r1.ebuild
new file mode 100644
index 000000000000..5de6083daed2
--- /dev/null
+++ b/net-fs/wdfs/wdfs-1.4.2-r1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils
+
+DESCRIPTION="WebDAV filesystem with special features for accessing subversion repositories"
+HOMEPAGE="http://noedler.de/projekte/wdfs/"
+SRC_URI="http://noedler.de/projekte/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND=">=net-libs/neon-0.24.7
+ >=sys-fs/fuse-2.5
+ dev-libs/glib:2"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-fix-Waddress.patch"
+}