rpms/jsl/EL-5 jsl-0.3.0-smash.patch, NONE, 1.1 jsl-0.3.0-tests.patch, NONE, 1.1 jsl.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Lubomir Rintel lkundrak at fedoraproject.org
Thu Apr 16 05:29:45 UTC 2009


Author: lkundrak

Update of /cvs/pkgs/rpms/jsl/EL-5
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2600/EL-5

Modified Files:
	.cvsignore sources 
Added Files:
	jsl-0.3.0-smash.patch jsl-0.3.0-tests.patch jsl.spec 
Log Message:
Import jsl

jsl-0.3.0-smash.patch:

--- NEW FILE jsl-0.3.0-smash.patch ---
Fix stack smashing... triggered by the stack overflow test (doh!)

Lubomir Rintel <lkundrak at v3.sk>

diff -urp jsl-0.3.0/src/jsl.c jsl-0.3.0.smash/src/jsl.c
--- jsl-0.3.0/src/jsl.c	2006-11-03 20:20:24.000000000 +0100
+++ jsl-0.3.0.smash/src/jsl.c	2009-04-14 23:03:37.528221874 +0200
@@ -91,7 +91,12 @@
 #define EXITCODE_FILE_ERROR 4
 
 /* file constants */
-#define MAXPATHLEN 1024
+#ifdef PATH_MAX
+#define MAXPATHLEN PATH_MAX
+#else
+#warning "MAXPATHLEN can overflow if PATH_MAX is too big"
+#define MAXPATHLEN 65536
+#endif
 
 #ifdef WIN32
 #define DEFAULT_DIRECTORY_SEPARATOR '\\'

jsl-0.3.0-tests.patch:

--- NEW FILE jsl-0.3.0-tests.patch ---
Fail if tests fail.

Lubomir Rintel <lkundrak at v3.sk>

diff -up jsl-0.3.0/tests/run_tests.pl.tests jsl-0.3.0/tests/run_tests.pl
--- jsl-0.3.0/tests/run_tests.pl.tests	2009-04-14 23:05:50.287206494 +0200
+++ jsl-0.3.0/tests/run_tests.pl	2009-04-14 23:06:13.605209095 +0200
@@ -69,3 +69,4 @@ print "Searching $FindBin::Bin...\n";
 find( sub{TestFile}, '.');
 
 print "Passed $num_passed of $num_tests tests\n";
+die "FAIL" unless $num_passed == $num_tests;


--- NEW FILE jsl.spec ---
Name:           jsl
Version:        0.3.0
Release:        1%{?dist}
Summary:        Check JavaScript code for common mistakes

Group:          Development/Tools
License:        MPLv1.1
URL:            http://javascriptlint.com/
Source0:        http://javascriptlint.com/download/%{name}-%{version}-src.tar.gz
Patch0:         jsl-0.3.0-smash.patch
Patch1:         jsl-0.3.0-tests.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%description
With JavaScript Lint, you can check all your JavaScript source code for
common mistakes without actually running the script or opening the web page.

JavaScript Lint holds an advantage over competing lints because it is based
on the JavaScript engine for the Firefox browser. This provides a robust
framework that can not only check JavaScript syntax but also examine the
coding techniques used in the script and warn against questionable
practices.


%prep
%setup -q
%patch0 -p1 -b .smash
%patch1 -p1 -b .tests


%build
# Fix DOS-y EOL encoding and permissions
find . -type f |xargs sed -i 's/\r//' $FILES
find . -type f |xargs chmod 644 $FILES

# Dependencies dealt with poorly -- no _smp_mflags
make -C src -f Makefile.ref SHARED_LIBRARY= \
        OBJDIR=. JS_EDITLINE=1 XCFLAGS="%{optflags}" \
        OS_CFLAGS="-DXP_UNIX -DHAVE_VA_COPY -DVA_COPY=va_copy"


%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_bindir}
install src/jsl $RPM_BUILD_ROOT%{_bindir}


%clean
rm -rf $RPM_BUILD_ROOT


%check
cd tests
perl run_tests.pl ../src/jsl


%files
%defattr(-,root,root,-)
%{_bindir}/jsl


%changelog
* Tue Apr 14 2009 Lubomir Rintel (Good Data) <lubo.rintel at gooddata.com> - 0.3.0-1
- Initial packaging


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/jsl/EL-5/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	16 Apr 2009 04:33:19 -0000	1.1
+++ .cvsignore	16 Apr 2009 05:29:15 -0000	1.2
@@ -0,0 +1 @@
+jsl-0.3.0-src.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/jsl/EL-5/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	16 Apr 2009 04:33:19 -0000	1.1
+++ sources	16 Apr 2009 05:29:15 -0000	1.2
@@ -0,0 +1 @@
+2b94ffa4fab07acabe0c5e73cd49bcdf  jsl-0.3.0-src.tar.gz




More information about the fedora-extras-commits mailing list