net-fs/ncpfs: EAPI 6 bump.
authorPatrice Clement <monsieurp@gentoo.org>
Sat, 21 Jan 2017 21:12:24 +0000 (22:12 +0100)
committerPatrice Clement <monsieurp@gentoo.org>
Sat, 21 Jan 2017 21:12:44 +0000 (22:12 +0100)
Package-Manager: portage-2.3.0

net-fs/ncpfs/files/ncpfs-2.2.5-php.patch
net-fs/ncpfs/files/ncpfs-2.2.6-align-fix.patch
net-fs/ncpfs/files/ncpfs-2.2.6-drop-kernel-check.patch
net-fs/ncpfs/files/ncpfs-2.2.6-drop-mtab-support.patch
net-fs/ncpfs/files/ncpfs-2.2.6-gcc4.patch
net-fs/ncpfs/files/ncpfs-2.2.6-getuid-fix.patch
net-fs/ncpfs/files/ncpfs-2.2.6-ldflags-support.patch
net-fs/ncpfs/files/ncpfs-2.2.6-makefile-fix-soname-link.patch
net-fs/ncpfs/files/ncpfs-2.2.6-missing-includes.patch
net-fs/ncpfs/files/ncpfs-2.2.6-multiple-vulns.patch
net-fs/ncpfs/ncpfs-2.2.6-r4.ebuild [new file with mode: 0644]

index f0143b2ceebc3788523ec26f1d540bd0d107c3f7..81908acd6c0bd209cf32dfa930325771c6421f04 100644 (file)
@@ -1,5 +1,5 @@
---- contrib/php/build/rules.mk.orig    2004-12-09 13:01:04.417854240 +0000
-+++ contrib/php/build/rules.mk 2004-12-09 13:01:42.460070944 +0000
+--- 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:
index 2ec8f29e946e7e0f4e170ba55d54eed5bbd13991..49d3c386d5a1c70cccf182a3eb9ccab2c2f0e0dc 100644 (file)
@@ -1,6 +1,6 @@
 diff -Naurp ncpfs-2.2.6.orig/lib/ndslib.c ncpfs-2.2.6/lib/ndslib.c
---- ncpfs-2.2.6.orig/lib/ndslib.c      2005-01-27 12:35:59.000000000 -0500
-+++ ncpfs-2.2.6/lib/ndslib.c   2014-08-12 21:07:35.559190454 -0400
+--- 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;
index 9e42f79fe1628dbb34e3a9acca9fc837584cee97..9348c08536e4e0c7baeb2ee287fad675e7117ec1 100644 (file)
@@ -2,8 +2,8 @@ Description: Drop kernel version check
 Author: Bastian Blank <waldi@debian.org>
 Bug-Debian: http://bugs.debian.org/692472
 
---- ncpfs-2.2.6.orig/sutil/ncpm_common.c
-+++ ncpfs-2.2.6/sutil/ncpm_common.c
+--- a/sutil/ncpm_common.c.orig
++++ b/sutil/ncpm_common.c
 @@ -243,23 +243,6 @@ static int load_ncpfs(void)
  #endif        /* MOUNT2 */
  
index c4588371afa9896b26fcc10398ebf1ed44085d95..b9c39f51e4ed627202086d96eb8fe595fe92c9d9 100644 (file)
@@ -1,6 +1,6 @@
 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  2014-08-13 02:52:56.859067273 -0400
-+++ ncpfs-2.2.6/sutil/ncplogin.c       2014-08-13 02:53:42.699067001 -0400
+--- 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>
index 7223b232c60a92b5cfc6b019b4599baad4175e56..793aca6cbccd7f0a1be045e2de85893a6a187602 100644 (file)
@@ -1,6 +1,6 @@
 diff -ur ncpfs-2.2.6-orig/lib/ncplib.c ncpfs-2.2.6/lib/ncplib.c
---- ncpfs-2.2.6-orig/lib/ncplib.c      2006-01-13 16:55:05.000000000 -0500
-+++ ncpfs-2.2.6/lib/ncplib.c   2006-01-13 16:56:08.000000000 -0500
+--- 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;
index 8b58a1375d936e5bbeba28ae9c715c922f033809..64193c22d052e4c2499af9aff98c240660da2446 100644 (file)
@@ -1,6 +1,6 @@
 diff -Naurp ncpfs-2.2.6.orig/contrib/tcl-utils/chgpwd.c ncpfs-2.2.6/contrib/tcl-utils/chgpwd.c
---- ncpfs-2.2.6.orig/contrib/tcl-utils/chgpwd.c        2005-01-27 12:35:59.000000000 -0500
-+++ ncpfs-2.2.6/contrib/tcl-utils/chgpwd.c     2014-08-12 21:08:25.779190155 -0400
+--- 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 {
index 613fd120f0704f5689bc5cb33c00c51533f56554..111e780ff520c68638455b4063bf170db2df55ef 100644 (file)
@@ -1,6 +1,6 @@
 diff -Naurp ncpfs-2.2.6.orig/contrib/pam/Makefile.in ncpfs-2.2.6/contrib/pam/Makefile.in
---- ncpfs-2.2.6.orig/contrib/pam/Makefile.in   2005-01-27 12:35:59.000000000 -0500
-+++ ncpfs-2.2.6/contrib/pam/Makefile.in        2014-08-12 21:06:42.369190770 -0400
+--- 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
  
index 240c91424766ac41835a2a3f8acc579093f7803d..ece9fc720db69e7662eaaf7348448b9c5040d864 100644 (file)
@@ -1,6 +1,6 @@
 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   2014-08-12 23:23:27.149141996 -0400
-+++ ncpfs-2.2.6/lib/Makefile.in        2014-08-12 23:23:55.969141824 -0400
+--- 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)
index 11a4f87add483fc4a4c66548ec30599cc5f8cae9..11258253af918d804c2a89c84321c0acd16eb850 100644 (file)
@@ -1,6 +1,6 @@
 diff -ruN ncpfs-2.2.6/contrib/pam/pam_ncp_auth.c ncpfs-2.2.6-fixed/contrib/pam/pam_ncp_auth.c
---- ncpfs-2.2.6/contrib/pam/pam_ncp_auth.c     2005-01-27 18:35:59.000000000 +0100
-+++ ncpfs-2.2.6-fixed/contrib/pam/pam_ncp_auth.c       2007-05-11 21:38:05.143474750 +0200
+--- 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>
index a43c6ea00548a5899f9fdabd82431287c2d66f2a..def49a5fad65b6a89e36444987f026b085c2b3e7 100644 (file)
@@ -63,8 +63,8 @@ http://seclists.org/fulldisclosure/2010/Mar/122
 
 
 diff -ur ncpfs-2.2.6.orig/sutil/ncplogin.c ncpfs-2.2.6/sutil/ncplogin.c
---- ncpfs-2.2.6.orig/sutil/ncplogin.c  2010-03-03 16:18:59.000000000 -0500
-+++ ncpfs-2.2.6/sutil/ncplogin.c       2010-03-03 16:17:41.000000000 -0500
+--- 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 */
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 (file)
index 0000000..5bd1c35
--- /dev/null
@@ -0,0 +1,96 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+}