From owner-svn-ports-head@FreeBSD.ORG Fri May 23 02:06:10 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C30A05A5; Fri, 23 May 2014 02:06:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B06EF231D; Fri, 23 May 2014 02:06:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4N26A1e034873; Fri, 23 May 2014 02:06:10 GMT (envelope-from kuriyama@svn.freebsd.org) Received: (from kuriyama@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4N26AN5034870; Fri, 23 May 2014 02:06:10 GMT (envelope-from kuriyama@svn.freebsd.org) Message-Id: <201405230206.s4N26AN5034870@svn.freebsd.org> From: Jun Kuriyama Date: Fri, 23 May 2014 02:06:10 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r354903 - in head/devel/p5-Test-OpenLDAP: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2014 02:06:10 -0000 Author: kuriyama Date: Fri May 23 02:06:09 2014 New Revision: 354903 URL: http://svnweb.freebsd.org/changeset/ports/354903 QAT: https://qat.redports.org/buildarchive/r354903/ Log: Fix to use out of the box, and adjust PATH for FreeBSD. Added: head/devel/p5-Test-OpenLDAP/files/ head/devel/p5-Test-OpenLDAP/files/patch-OpenLDAP.pm (contents, props changed) Modified: head/devel/p5-Test-OpenLDAP/Makefile Modified: head/devel/p5-Test-OpenLDAP/Makefile ============================================================================== --- head/devel/p5-Test-OpenLDAP/Makefile Fri May 23 01:56:39 2014 (r354902) +++ head/devel/p5-Test-OpenLDAP/Makefile Fri May 23 02:06:09 2014 (r354903) @@ -2,6 +2,7 @@ PORTNAME= Test-OpenLDAP PORTVERSION= 0.05 +PORTREVISION= 1 CATEGORIES= devel perl5 MASTER_SITES= CPAN PKGNAMEPREFIX= p5- @@ -23,10 +24,13 @@ USES= perl5 USE_PERL5= configure USE_OPENLDAP= yes -#MAKE_ENV= PATH=${PATH}:${PREFIX}/libexec CONFIGURE_ENV= PATH=${PATH}:${PREFIX}/libexec -pre-configure: - printenv +post-patch: + ${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ + -e 's|/usr/lib/openldap|${LOCALBASE}/libexec|' \ + ${WRKSRC}/lib/Test/OpenLDAP.pm + ${RM} ${WRKSRC}/lib/Test/OpenLDAP.pm.bak \ + ${WRKSRC}/lib/Test/OpenLDAP.pm.orig .include Added: head/devel/p5-Test-OpenLDAP/files/patch-OpenLDAP.pm ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/p5-Test-OpenLDAP/files/patch-OpenLDAP.pm Fri May 23 02:06:09 2014 (r354903) @@ -0,0 +1,65 @@ +--- lib/Test/OpenLDAP.pm.orig 2013-03-13 19:05:02.000000000 +0900 ++++ lib/Test/OpenLDAP.pm 2014-05-23 00:01:21.347461487 +0900 +@@ -95,6 +95,8 @@ + File::Spec->catdir( $self->{slapd_d_directory}, 'cn=config' ); + $self->{cn_schema_directory} = + File::Spec->catdir( $self->{cn_config_directory}, 'cn=schema' ); ++ $self->{cn_module_ldif_path} = ++ File::Spec->catfile( $self->{cn_config_directory}, 'cn=module{0}.ldif' ); + $self->{cn_schema_ldif_path} = + File::Spec->catfile( $self->{cn_config_directory}, 'cn=schema.ldif' ); + $self->{cn_schema_core_ldif_path} = +@@ -123,6 +125,7 @@ + mkdir $self->{db_directory}, oct USER_READ_WRITE_EXECUTE_PERMISSIONS() + or Carp::croak("Failed to mkdir $self->{db_directory}:$OS_ERROR"); + $self->_create_config_ldif(); ++ $self->_create_module_ldif(); + $self->_create_schema_ldif(); + $self->_create_schema_core_ldif(); + $self->{olc_database_for_config} = '{0}config'; +@@ -372,6 +375,34 @@ + return; + } + ++sub _create_module_ldif { ++ my ($self) = @_; ++ my $write_flags = Fcntl::O_WRONLY() | Fcntl::O_CREAT() | Fcntl::O_EXCL(); ++ my $uuid = lc $self->_uuid(); ++ my $entry_csn = $self->_entry_csn(); ++ my $create_timestamp = POSIX::strftime( '%Y%m%d%H%M%SZ', gmtime time ); ++ my $handle = FileHandle->new( $self->{cn_module_ldif_path}, ++ $write_flags, oct USER_READ_WRITE_PERMISSIONS() ) ++ or Carp::croak( ++ "Failed to open '$self->{cn_module_ldif_path}' for writing:$OS_ERROR"); ++ $handle->print( ++ <<"__MODULE_LDIF__") or Carp::croak("Failed to write to '$self->{cn_module_ldif_path}':$OS_ERROR"); ++dn: cn=module{0} ++objectClass: olcModuleList ++cn: module{0} ++olcModulePath: %%LOCALBASE%%/libexec/openldap ++olcModuleLoad: {0}back_bdb ++olcModuleLoad: {1}back_hdb ++structuralObjectClass: olcModuleList ++entryUUID: $uuid ++creatorsName: cn=config ++createTimestamp: $create_timestamp ++entryCSN: $entry_csn ++modifiersName: cn=config ++modifyTimestamp: $create_timestamp ++__MODULE_LDIF__ ++} ++ + sub _create_schema_ldif { + my ($self) = @_; + my $write_flags = Fcntl::O_WRONLY() | Fcntl::O_CREAT() | Fcntl::O_EXCL(); +@@ -1697,6 +1728,10 @@ + or Carp::croak( + "Failed to unlink '$self->{olc_database_config_path}':$OS_ERROR"); + $self->_remove_cn_schema_directory(); ++ unlink $self->{cn_module_ldif_path} ++ or ( $OS_ERROR == POSIX::ENOENT() ) ++ or Carp::croak( ++ "Failed to unlink '$self->{cn_module_ldif_path}':$OS_ERROR"); + rmdir $self->{cn_config_directory} + or ( $OS_ERROR == POSIX::ENOENT() ) + or