diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e0b489a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/Judy-1.0.5.tar.gz diff --git a/.rh-mariadb105-Judy.metadata b/.rh-mariadb105-Judy.metadata new file mode 100644 index 0000000..634056f --- /dev/null +++ b/.rh-mariadb105-Judy.metadata @@ -0,0 +1 @@ +3540f003509acac3b1260424380ddf97914f7745 SOURCES/Judy-1.0.5.tar.gz diff --git a/SOURCES/Judy-1.0.4-fix-Judy1-mans.patch b/SOURCES/Judy-1.0.4-fix-Judy1-mans.patch new file mode 100644 index 0000000..06ab742 --- /dev/null +++ b/SOURCES/Judy-1.0.4-fix-Judy1-mans.patch @@ -0,0 +1,80 @@ +diff -up Judy-1.0.4/doc/Makefile.am.fix-Judy1-mans Judy-1.0.4/doc/Makefile.am +--- Judy-1.0.4/doc/Makefile.am.fix-Judy1-mans 2006-01-18 16:56:43.000000000 -0500 ++++ Judy-1.0.4/doc/Makefile.am 2008-11-27 14:08:53.000000000 -0500 +@@ -100,21 +100,21 @@ man/man3/Judy: + + man/man3/Judy1: + ../tool/jhton ext/Judy1_3.htm | grep -v '^[ ]*$$' | sed -e 's/\.C//' > man/man3/Judy1 +- cd man/man3; ln -s Judy J1T +- cd man/man3; ln -s Judy J1S +- cd man/man3; ln -s Judy J1U +- cd man/man3; ln -s Judy J1F +- cd man/man3; ln -s Judy J1N +- cd man/man3; ln -s Judy J1L +- cd man/man3; ln -s Judy J1P +- cd man/man3; ln -s Judy J1FE +- cd man/man3; ln -s Judy J1NE +- cd man/man3; ln -s Judy J1LE +- cd man/man3; ln -s Judy J1PE +- cd man/man3; ln -s Judy J1C +- cd man/man3; ln -s Judy J1BC +- cd man/man3; ln -s Judy J1FA +- cd man/man3; ln -s Judy J1MU ++ cd man/man3; ln -s Judy1 J1T ++ cd man/man3; ln -s Judy1 J1S ++ cd man/man3; ln -s Judy1 J1U ++ cd man/man3; ln -s Judy1 J1F ++ cd man/man3; ln -s Judy1 J1N ++ cd man/man3; ln -s Judy1 J1L ++ cd man/man3; ln -s Judy1 J1P ++ cd man/man3; ln -s Judy1 J1FE ++ cd man/man3; ln -s Judy1 J1NE ++ cd man/man3; ln -s Judy1 J1LE ++ cd man/man3; ln -s Judy1 J1PE ++ cd man/man3; ln -s Judy1 J1C ++ cd man/man3; ln -s Judy1 J1BC ++ cd man/man3; ln -s Judy1 J1FA ++ cd man/man3; ln -s Judy1 J1MU + + man/man3/Judy1_funcs: + ../tool/jhton ext/Judy1_funcs_3.htm | grep -v '^[ ]*$$' | sed -e 's/\.C//' > man/man3/Judy1_funcs +diff -up Judy-1.0.4/doc/Makefile.in.fix-Judy1-mans Judy-1.0.4/doc/Makefile.in +--- Judy-1.0.4/doc/Makefile.in.fix-Judy1-mans 2007-05-14 17:10:55.000000000 -0400 ++++ Judy-1.0.4/doc/Makefile.in 2008-12-13 12:55:14.000000000 -0500 +@@ -471,21 +479,21 @@ man/man3/Judy: + + man/man3/Judy1: + ../tool/jhton ext/Judy1_3.htm | grep -v '^[ ]*$$' | sed -e 's/\.C//' > man/man3/Judy1 +- cd man/man3; ln -s Judy J1T +- cd man/man3; ln -s Judy J1S +- cd man/man3; ln -s Judy J1U +- cd man/man3; ln -s Judy J1F +- cd man/man3; ln -s Judy J1N +- cd man/man3; ln -s Judy J1L +- cd man/man3; ln -s Judy J1P +- cd man/man3; ln -s Judy J1FE +- cd man/man3; ln -s Judy J1NE +- cd man/man3; ln -s Judy J1LE +- cd man/man3; ln -s Judy J1PE +- cd man/man3; ln -s Judy J1C +- cd man/man3; ln -s Judy J1BC +- cd man/man3; ln -s Judy J1FA +- cd man/man3; ln -s Judy J1MU ++ cd man/man3; ln -s Judy1 J1T ++ cd man/man3; ln -s Judy1 J1S ++ cd man/man3; ln -s Judy1 J1U ++ cd man/man3; ln -s Judy1 J1F ++ cd man/man3; ln -s Judy1 J1N ++ cd man/man3; ln -s Judy1 J1L ++ cd man/man3; ln -s Judy1 J1P ++ cd man/man3; ln -s Judy1 J1FE ++ cd man/man3; ln -s Judy1 J1NE ++ cd man/man3; ln -s Judy1 J1LE ++ cd man/man3; ln -s Judy1 J1PE ++ cd man/man3; ln -s Judy1 J1C ++ cd man/man3; ln -s Judy1 J1BC ++ cd man/man3; ln -s Judy1 J1FA ++ cd man/man3; ln -s Judy1 J1MU + + man/man3/Judy1_funcs: + ../tool/jhton ext/Judy1_funcs_3.htm | grep -v '^[ ]*$$' | sed -e 's/\.C//' > man/man3/Judy1_funcs diff --git a/SOURCES/Judy-1.0.4-test-shared.patch b/SOURCES/Judy-1.0.4-test-shared.patch new file mode 100644 index 0000000..28d8a59 --- /dev/null +++ b/SOURCES/Judy-1.0.4-test-shared.patch @@ -0,0 +1,14 @@ +diff -up Judy-1.0.4/test/Checkit.test-shared Judy-1.0.4/test/Checkit +--- Judy-1.0.4/test/Checkit.test-shared 2007-05-14 13:02:16.000000000 -0400 ++++ Judy-1.0.4/test/Checkit 2008-11-27 12:56:28.000000000 -0500 +@@ -4,8 +4,9 @@ CC=${CC:-cc} + echo + echo "=== +++++++++ This test runs in 15 seconds on a PIII 750Mhz +++++++" + +-LIBJUDY=`find ../ -name libJudy.a` ++LIBJUDY=`find ../ -name libJudy.so` + JUDY_H=`find ../ -name Judy.h` ++export LD_LIBRARY_PATH=`dirname $LIBJUDY` + + echo "$CC -O SLcompare.c -DHASHMETHOD -o SL_Hash" + $CC -O SLcompare.c -DHASHMETHOD -o SL_Hash diff --git a/SOURCES/Judy-1.0.5-undefined-behavior.patch b/SOURCES/Judy-1.0.5-undefined-behavior.patch new file mode 100644 index 0000000..e8741d0 --- /dev/null +++ b/SOURCES/Judy-1.0.5-undefined-behavior.patch @@ -0,0 +1,120 @@ +diff -crb judy-1.0.5-orig/src/JudyCommon/JudyByCount.c judy-1.0.5/src/JudyCommon/JudyByCount.c +*** judy-1.0.5-orig/src/JudyCommon/JudyByCount.c 2005-02-15 15:06:07.000000000 -0600 +--- judy-1.0.5/src/JudyCommon/JudyByCount.c 2014-02-18 13:45:35.225145230 -0600 +*************** +*** 817,823 **** + // Shorthand for where to find start of Index bytes array: + + #ifdef JUDY1 +! #define PJI (Pjp->jp_1Index) + #else + #define PJI (Pjp->jp_LIndex) + #endif +--- 817,823 ---- + // Shorthand for where to find start of Index bytes array: + + #ifdef JUDY1 +! #define PJI (Pjp->jp_2Index) + #else + #define PJI (Pjp->jp_LIndex) + #endif +diff -crb judy-1.0.5-orig/src/JudyCommon/JudyGet.c judy-1.0.5/src/JudyCommon/JudyGet.c +*** judy-1.0.5-orig/src/JudyCommon/JudyGet.c 2005-02-15 15:06:07.000000000 -0600 +--- judy-1.0.5/src/JudyCommon/JudyGet.c 2014-02-18 13:49:50.840632644 -0600 +*************** +*** 630,636 **** + #ifdef JUDY1 + + #define CHECKINDEXNATIVE(LEAF_T, PJP, IDX, INDEX) \ +! if (((LEAF_T *)((PJP)->jp_1Index))[(IDX) - 1] == (LEAF_T)(INDEX)) \ + return(1) + + #define CHECKLEAFNONNAT(LFBTS, PJP, INDEX, IDX, COPY) \ +--- 630,636 ---- + #ifdef JUDY1 + + #define CHECKINDEXNATIVE(LEAF_T, PJP, IDX, INDEX) \ +! if (((LEAF_T *)((PJP)->jp_2Index))[(IDX) - 1] == (LEAF_T)(INDEX)) \ + return(1) + + #define CHECKLEAFNONNAT(LFBTS, PJP, INDEX, IDX, COPY) \ +diff -crb judy-1.0.5-orig/src/JudyCommon/JudyIns.c judy-1.0.5/src/JudyCommon/JudyIns.c +*** judy-1.0.5-orig/src/JudyCommon/JudyIns.c 2005-02-15 15:06:07.000000000 -0600 +--- judy-1.0.5/src/JudyCommon/JudyIns.c 2014-02-18 13:00:49.871850635 -0600 +*************** +*** 1503,1509 **** + JU_BITMAPSETL(Pjlb, Index); + + for (offset = 0; offset < 15; ++offset) +! JU_BITMAPSETL(Pjlb, Pjp->jp_1Index[offset]); + + // Set jp_DcdPopO including the current pop0; incremented later: + DcdP0 = (Index & cJU_DCDMASK(1)) + 15 - 1; +--- 1503,1510 ---- + JU_BITMAPSETL(Pjlb, Index); + + for (offset = 0; offset < 15; ++offset) +! // JU_BITMAPSETL(Pjlb, Pjp->jp_1Index[offset]); // elements 8..15 are optimized out by gcc, so need to do the following +! JU_BITMAPSETL(Pjlb, Pjp->jp_2Index[offset]); + + // Set jp_DcdPopO including the current pop0; incremented later: + DcdP0 = (Index & cJU_DCDMASK(1)) + 15 - 1; +diff -crb judy-1.0.5-orig/src/JudyCommon/JudyPrevNext.c judy-1.0.5/src/JudyCommon/JudyPrevNext.c +*** judy-1.0.5-orig/src/JudyCommon/JudyPrevNext.c 2005-02-15 15:06:07.000000000 -0600 +--- judy-1.0.5/src/JudyCommon/JudyPrevNext.c 2014-02-18 13:45:40.972875737 -0600 +*************** +*** 907,913 **** + // Shorthand for where to find start of Index bytes array: + + #ifdef JUDY1 +! #define PJI (Pjp->jp_1Index) + #else + #define PJI (Pjp->jp_LIndex) + #endif +--- 907,913 ---- + // Shorthand for where to find start of Index bytes array: + + #ifdef JUDY1 +! #define PJI (Pjp->jp_2Index) + #else + #define PJI (Pjp->jp_LIndex) + #endif +diff -crb judy-1.0.5-orig/src/JudyCommon/JudyPrivateBranch.h judy-1.0.5/src/JudyCommon/JudyPrivateBranch.h +*** judy-1.0.5-orig/src/JudyCommon/JudyPrivateBranch.h 2005-02-15 15:06:07.000000000 -0600 +--- judy-1.0.5/src/JudyCommon/JudyPrivateBranch.h 2014-02-18 13:00:39.510533765 -0600 +*************** +*** 86,91 **** +--- 86,98 ---- + } jpi_t; + + ++ typedef struct _JUDY_POINTER_IMMED2 // JPI2. ++ { ++ uint8_t j_pi_2Index[2 * sizeof(Word_t) - 1]; // see above. ++ uint8_t j_pi_Type; // JP type, 1 of cJ*_JPIMMED*. ++ } jpi2_t; ++ ++ + // UNION OF JP TYPES: + // + // A branch is an array of cJU_BRANCHUNUMJPS (256) of this object, or an +*************** +*** 97,102 **** +--- 104,110 ---- + { + jpo_t j_po; // other than immediate indexes. + jpi_t j_pi; // immediate indexes. ++ jpi2_t j_pi2; // immediate indexes using j_pi_LIndex as well + } jp_t, *Pjp_t; + + // For coding convenience: +*************** +*** 105,110 **** +--- 113,119 ---- + + #define jp_1Index j_pi.j_pi_1Index // for storing Indexes in first word. + #define jp_LIndex j_pi.j_pi_LIndex // for storing Indexes in second word. ++ #define jp_2Index j_pi2.j_pi_2Index // for storing Indexes spanning both words. + #define jp_Addr j_po.j_po_Addr + //#define jp_DcdPop0 j_po.jpo_u.j_po_DcdPop0 + #define jp_Type j_po.jpo_u.j_po_Bytes[sizeof(Word_t) - 1] diff --git a/SOURCES/README.distro b/SOURCES/README.distro new file mode 100644 index 0000000..1397bfb --- /dev/null +++ b/SOURCES/README.distro @@ -0,0 +1,23 @@ +Regarding the license, upstream has confirmed that the current license is LGPL +v2.1 or later. Also, the source code is really the final say on this, and it +says "GNU Lesser General Public License as published by the Free Software +Foundation; either version 2 of the License, or (at your option) any later +version." Either way, Fedora spec files don't distinguish between v2.1 and v2, +so this is specified as LGPLv2+ for the spec file. + +"From dougbaskins@yahoo.com Thu Nov 27 21:45:54 2008 +From: Doug Baskins +To: Chuck Anderson +Cc: judy-devel@lists.sourceforge.net +Date: Thu, 27 Nov 2008 18:45:47 -0800 (PST) +Subject: Re: Judy license confusion - (LGPL v2.1 or later applies) +Reply-To: Doug Baskins + +Chuck: + +I did not know a new version of LGPL existed. You are correct, +the COPYING file is correct (LGPL v2.1 or later applies). I will +change the README file to reflect that in the next release of Judy. +..." + +- Chuck Anderson diff --git a/SPECS/Judy.spec b/SPECS/Judy.spec new file mode 100644 index 0000000..23b3006 --- /dev/null +++ b/SPECS/Judy.spec @@ -0,0 +1,166 @@ +%{?scl:%scl_package Judy} +%{!?scl:%global pkg_name %{name}} + +Name: %{?scl_prefix}Judy +Version: 1.0.5 +Release: 14%{?dist} +Summary: General purpose dynamic array +Group: System Environment/Libraries +License: LGPLv2+ +URL: http://sourceforge.net/projects/judy/ +Source0: http://downloads.sf.net/judy/Judy-%{version}.tar.gz +Source1: README.distro +# Make tests use shared instead of static libJudy +Patch0: Judy-1.0.4-test-shared.patch +# The J1* man pages were incorrectly being symlinked to Judy, rather than Judy1 +# This patch corrects that; submitted upstream 2008/11/27 +Patch1: Judy-1.0.4-fix-Judy1-mans.patch +# Fix some code with undefined behavior, commented on and removed by gcc +Patch2: Judy-1.0.5-undefined-behavior.patch +%{?scl:Requires:%scl_runtime} + +%description +Judy is a C library that provides a state-of-the-art core technology +that implements a sparse dynamic array. Judy arrays are declared +simply with a null pointer. A Judy array consumes memory only when it +is populated, yet can grow to take advantage of all available memory +if desired. Judy's key benefits are scalability, high performance, and +memory efficiency. A Judy array is extensible and can scale up to a +very large number of elements, bounded only by machine memory. Since +Judy is designed as an unbounded array, the size of a Judy array is +not pre-allocated but grows and shrinks dynamically with the array +population. + +%package devel +Summary: Development libraries and headers for Judy +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +%{?scl:Requires:%scl_runtime} + +%description devel +This package contains the development libraries and header files +for developing applications that use the Judy library. + +%prep +%setup -q -n judy-%{version} +%patch0 -p1 -b .test-shared +%patch1 -p1 -b .fix-Judy1-mans +%patch2 -p1 -b .behavior +cp -p %{SOURCE1} . + +# make libtool able to handle soname in format sclname-1 +sed -i -r 's|(major=\.)(`expr)|\1$verstring_prefix\2|' ltmain.sh + +%build +export CFLAGS="%{optflags} -fno-strict-aliasing -fno-tree-ccp -fno-tree-dominator-opts -fno-tree-copy-prop -fno-tree-vrp" +%configure --disable-static +%{?scl_prefix:export verstring_prefix="%{scl_prefix}"} +make +#%{?_smp_mflags} +# fails to compile properly with parallel make: +# http://sourceforge.net/tracker/index.php?func=detail&aid=2129019&group_id=55753&atid=478138 + +%install +make install DESTDIR=%{buildroot} INSTALL="install -p" +# get rid of static libs and libtool archives +rm -f %{buildroot}%{_libdir}/*.{a,la} +# clean out zero length and generated files from doc tree +rm -rf doc/man +rm -f doc/Makefile* doc/ext/README_deliver +[ -s doc/ext/COPYRIGHT ] || rm -f doc/ext/COPYRIGHT +[ -s doc/ext/LICENSE ] || rm -f doc/ext/LICENSE + +%check +cd test +./Checkit +cd - + +%files +%doc AUTHORS ChangeLog COPYING README README.distro examples/ +%{_libdir}/libJudy.so.* + +%files devel +%doc doc +%{_includedir}/Judy.h +%{_libdir}/libJudy.so +%{_mandir}/man3/J*.3* + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%changelog +* Tue Jan 08 2019 Honza Horak - 1.0.5-14 +- Rebuild for buildroot change + +* Thu Sep 21 2017 Honza Horak - 1.0.5-13 +- Fix uninstalled directories + Resolves: #1487292 + +* Tue Jan 27 2015 Honza Horak - 1.0.5-12 +- Rename README.Fedora to README.distro + +* Sun Jan 25 2015 Honza Horak - 1.0.5-11 +- Convert to SCL package + +* Fri Aug 15 2014 Fedora Release Engineering - 1.0.5-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Fri Jun 06 2014 Fedora Release Engineering - 1.0.5-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue Feb 18 2014 Paul Howarth - 1.0.5-8 +- Fix some code with undefined behavior +- Build with -fno-strict-aliasing +- Disable various compiler tree optimizations that trigger reproducible + crashes in gtkwave without generating compiler warnings (#1064090) + +* Fri Aug 02 2013 Fedora Release Engineering - 1.0.5-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Feb 13 2013 Fedora Release Engineering - 1.0.5-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Jul 18 2012 Fedora Release Engineering - 1.0.5-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Thu Jan 12 2012 Fedora Release Engineering - 1.0.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Fri Jan 6 2012 Paul Howarth - 1.0.5-3 +- Rebuilt for gcc 4.7 + +* Mon Feb 7 2011 Fedora Release Engineering - 1.0.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sun Jul 18 2010 Paul Howarth - 1.0.5-1 +- Update to 1.0.5 + - Added proper clean targets to enable multiple builds + - Added examples directory + - Correctly detects 32/64-bit build environment + - Allow explicit configure for 32/64-bit environment +- Cosmetic spec file clean-ups + +* Fri Jul 24 2009 Fedora Release Engineering - 1.0.4-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Mon Feb 23 2009 Fedora Release Engineering - 1.0.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Sat Dec 13 2008 Charles R. Anderson - 1.0.4-4 +- For Judy1 man page fix, patch Makefile.{am,in} instead of + relying on autotools to regenerate the latter +- Add README.Fedora with upstream's license explanation + +* Sun Nov 30 2008 Charles R. Anderson - 1.0.4-3 +- Fix Judy1 man page symlinks +- Use valid tag License: LGPLv2+ confirmed with upstream +- Use version macro in Source0 +- Remove Makefiles from installed doc tree + +* Thu Nov 27 2008 Charles R. Anderson - 1.0.4-2 +- Patch tests to run with shared library +- Run tests in check section + +* Sun Oct 05 2008 Charles R. Anderson - 1.0.4-1 +- Initial package for Fedora