rpms/php-pear-Crypt-CHAP/FC-6 php-pear-Crypt-CHAP-1.0.0-test.patch, NONE, 1.1 php-pear-Crypt-CHAP.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Christopher Stone (xulchris) fedora-extras-commits at redhat.com
Tue Mar 13 18:58:09 UTC 2007


Author: xulchris

Update of /cvs/extras/rpms/php-pear-Crypt-CHAP/FC-6
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21335/FC-6

Modified Files:
	.cvsignore sources 
Added Files:
	php-pear-Crypt-CHAP-1.0.0-test.patch php-pear-Crypt-CHAP.spec 
Log Message:
auto-import php-pear-Crypt-CHAP-1.0.0-2 on branch FC-6 from php-pear-Crypt-CHAP-1.0.0-2.src.rpm

php-pear-Crypt-CHAP-1.0.0-test.patch:

--- NEW FILE php-pear-Crypt-CHAP-1.0.0-test.patch ---
--- Crypt_CHAP/tests/chaptest.php.orig	2007-03-11 18:59:25.000000000 +0100
+++ Crypt_CHAP/tests/chaptest.php	2007-03-11 18:59:47.000000000 +0100
@@ -31,8 +31,7 @@
 
     $Id: chaptest.php,v 1.6 2004/03/25 15:39:32 mbretter Exp $
 */
-
-if ($argv[1] == 'pearcvs') {
+if ($_SERVER["argc"]>1 && $_SERVER["argv"][1] == 'pearcvs') {
     ini_set('include_path', '..:' . ini_get('include_path'));
     require_once 'CHAP.php';
 } else {
@@ -63,7 +62,7 @@
 echo "MS-CHAPv1 TEST\n";
 $crpt->password = 'MyPw';
 $crpt->challenge = pack('H*', '102DB5DF085D3041');
-$unipw = $crpt->str2unicode($pass);
+$unipw = $crpt->str2unicode($crpt->password);
 printf ("Unicode PW: %s\nexpected  : 4d00790050007700\n", bin2hex($unipw));
 printf ("NT HASH   : %s\nexpected  : fc156af7edcd6c0edde3337d427f4eac\n", bin2hex($crpt->ntPasswordHash()));
 printf ("NT Resp   : %s\nexpected  : 4e9d3c8f9cfd385d5bf4d3246791956ca4c351ab409a3d61\n", bin2hex($crpt->challengeResponse()));


--- NEW FILE php-pear-Crypt-CHAP.spec ---
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
%define pear_name Crypt_CHAP

Name:           php-pear-Crypt-CHAP
Version:        1.0.0
Release:        2%{?dist}
Summary:        Class to generate CHAP packets

Group:          Development/Languages
License:        BSD
URL:            http://pear.php.net/package/Crypt_CHAP
Source0:        http://pear.php.net/get/%{pear_name}-%{version}.tgz
Patch0:         %{name}-1.0.0-test.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
BuildRequires:  php-pear >= 1:1.4.9-1.2
Requires:       php-pear(PEAR) php-mhash php-mcrypt
Requires(post): %{__pear}
Requires(postun): %{__pear}
Provides:       php-pear(%{pear_name}) = %{version}

%description
This package provides Classes for generating CHAP packets.  Currently these
types of CHAP are supported: CHAP-MD5, MS-CHAPv1, MS-CHAPv2. For MS-CHAP the
mhash and mcrypt extensions must be loaded.


%prep
%setup -qc
[ -f package2.xml ] || mv package.xml package2.xml
mv package2.xml %{pear_name}-%{version}/%{pear_name}.xml
cd %{pear_name}-%{version}


%build
cd %{pear_name}-%{version}
# Empty build section, most likely nothing required.


%install
cd %{pear_name}-%{version}
rm -rf $RPM_BUILD_ROOT docdir
%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{pear_name}.xml

pushd $RPM_BUILD_ROOT%{pear_testdir}
patch -p0 < %{PATCH0}
popd


# Clean up unnecessary files
rm -rf $RPM_BUILD_ROOT%{pear_phpdir}/.??*

# Install XML package description
mkdir -p $RPM_BUILD_ROOT%{pear_xmldir}
install -pm 644 %{pear_name}.xml $RPM_BUILD_ROOT%{pear_xmldir}


%clean
rm -rf $RPM_BUILD_ROOT


%post
%{__pear} install --nodeps --soft --force --register-only \
    %{pear_xmldir}/%{pear_name}.xml >/dev/null || :

%postun
if [ $1 -eq 0 ] ; then
    %{__pear} uninstall --nodeps --ignore-errors --register-only \
        %{pear_name} >/dev/null || :
fi


%files
%defattr(-,root,root,-)
%{pear_xmldir}/%{pear_name}.xml
%{pear_testdir}/%{pear_name}
%{pear_phpdir}/Crypt


%changelog
* Tue Mar 13 2007 Christopher Stone <chris.stone at gmail.com> 1.0.0-2
- Apply patch to fix warnings/errors on test scripts (bz #222597)

* Sun Jan 14 2007 Christopher Stone <chris.stone at gmail.com> 1.0.0-1
- Initial Fedora release


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/php-pear-Crypt-CHAP/FC-6/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	13 Mar 2007 03:30:57 -0000	1.1
+++ .cvsignore	13 Mar 2007 18:57:37 -0000	1.2
@@ -0,0 +1 @@
+Crypt_CHAP-1.0.0.tgz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/php-pear-Crypt-CHAP/FC-6/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	13 Mar 2007 03:30:57 -0000	1.1
+++ sources	13 Mar 2007 18:57:37 -0000	1.2
@@ -0,0 +1 @@
+b09ba7b851f85528638d9a9dae67b1c9  Crypt_CHAP-1.0.0.tgz




More information about the fedora-extras-commits mailing list