diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1ddab56 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/pth-2.0.7.tar.gz diff --git a/.pth.metadata b/.pth.metadata new file mode 100644 index 0000000..9287708 --- /dev/null +++ b/.pth.metadata @@ -0,0 +1 @@ +9a71915c89ff2414de69fe104ae1016d513afeee SOURCES/pth-2.0.7.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/pth-2.0.7-config-script.patch b/SOURCES/pth-2.0.7-config-script.patch new file mode 100644 index 0000000..3d5cec0 --- /dev/null +++ b/SOURCES/pth-2.0.7-config-script.patch @@ -0,0 +1,41 @@ +diff -Nur pth-2.0.7-orig/pth-config.in pth-2.0.7/pth-config.in +--- pth-2.0.7-orig/pth-config.in 2006-06-08 19:54:02.000000000 +0200 ++++ pth-2.0.7/pth-config.in 2007-10-21 14:06:45.000000000 +0200 +@@ -46,6 +46,19 @@ + help=no + version=no + ++arch=$(uname -i) ++case $arch in ++ x86_64 | ppc64 | ppc64le | ia64 | s390x | sparc64 | aarch64) ++ pth_ldlibdir="/usr/lib64" ++ if [ "$pth_libdir" == "/usr/lib" ] ; then ++ pth_libdir=${pth_libdir}64 ++ fi ++ ;; ++ * ) ++ pth_ldlibdir="/usr/lib" ++ ;; ++esac ++ + usage="pth-config" + usage="$usage [--help] [--version] [--all]" + usage="$usage [--prefix] [--exec-prefix] [--bindir] [--libdir] [--includedir] [--mandir] [--datadir] [--acdir]" +@@ -109,11 +122,15 @@ + output="$output $pth_acdir" + ;; + --cflags) +- output="$output -I$pth_includedir" ++ if [ "$pth_includedir" != "/usr/include" ] ; then ++ output="$output -I$pth_includedir" ++ fi + output_extra="$output_extra $pth_cflags" + ;; + --ldflags) +- output="$output -L$pth_libdir" ++ if [ "$pth_libdir" != "$pth_ldlibdir" ] ; then ++ output="$output -L$pth_libdir" ++ fi + output_extra="$output_extra $pth_ldflags" + ;; + --libs) diff --git a/SOURCES/pth-2.0.7-dont-remove-gcc-g.patch b/SOURCES/pth-2.0.7-dont-remove-gcc-g.patch new file mode 100644 index 0000000..9a29c10 --- /dev/null +++ b/SOURCES/pth-2.0.7-dont-remove-gcc-g.patch @@ -0,0 +1,18 @@ +diff -Nur pth-2.0.7-orig/configure pth-2.0.7/configure +--- pth-2.0.7-orig/configure 2006-06-08 20:14:48.000000000 +0200 ++++ pth-2.0.7/configure 2007-10-21 12:30:48.000000000 +0200 +@@ -3054,14 +3054,6 @@ + ;; + esac + fi +-case "$CFLAGS" in +- *-g* ) CFLAGS=`echo "$CFLAGS" |\ +- sed -e 's/ -g / /g' -e 's/ -g$//' -e 's/^-g //g' -e 's/^-g$//'` ;; +-esac +-case "$CXXFLAGS" in +- *-g* ) CXXFLAGS=`echo "$CXXFLAGS" |\ +- sed -e 's/ -g / /g' -e 's/ -g$//' -e 's/^-g //g' -e 's/^-g$//'` ;; +-esac + msg="disabled" + + fi; echo "$as_me:$LINENO: checking for compilation debug mode" >&5 diff --git a/SOURCES/pth-2.0.7-linux3.patch b/SOURCES/pth-2.0.7-linux3.patch new file mode 100644 index 0000000..0710a85 --- /dev/null +++ b/SOURCES/pth-2.0.7-linux3.patch @@ -0,0 +1,103 @@ +To: bug-pth@gnu.org +Subject: [PATCH] fix pth for makecontext-less glibc on Linux 3.x kernels +Cc: pth-users@gnu.org + +Attempting to build pth-2.0.7 on arm-linux-gnueabi, running a 3.x +kernel, and with a glibc that doesn't yet have makecontext et al +(glibc-2.14.1 in my case) results in the following during configure: + +Machine Context Implementation: +checking for ucontext.h... yes +checking for makecontext... no +checking for swapcontext... no +checking for getcontext... no +checking for setcontext... no +checking for usable SVR4/SUSv2 makecontext(2)/swapcontext(2)... no +checking for signal.h... (cached) yes +checking for sigsetjmp... no +checking for siglongjmp... yes +checking for setjmp... yes +checking for longjmp... yes +checking for _setjmp... yes +checking for _longjmp... yes +checking for sigaltstack... yes +checking for sigstack... yes +checking for signal-mask aware setjmp(3)/longjmp(3)... yes: sjljlx +checking for typedef stack_t... (cached) yes +checking for direction of stack growth... down +checking for makecontext... (cached) no +checking for stack setup via makecontext... N.A. +checking for sigaltstack... (cached) yes +checking for typedef stack_t... (cached) yes +checking for stack setup via sigaltstack... ok +checking for sigstack... (cached) yes +checking for stack setup via sigstack... guessed +decision on mctx implementation... sjlj/sjljlx/none + +Note the "sjljlx", that's bogus since sjljlx is a fallback for +truly ancient systems; the correct choice is ssjlj. + +Configure succeeds, but 'make' then results in: + +./shtool scpp -o pth_p.h -t pth_p.h.in -Dcpp -Cintern -M '==#==' pth_compat.c pth_debug.c pth_syscall.c pth_errno.c pth_ring.c pth_mctx.c pth_uctx.c pth_clean.c pth_time.c pth_tcb.c pth_util.c pth_pqueue.c pth_event.c pth_sched.c pth_data.c pth_msg.c pth_cancel.c pth_sync.c pth_attr.c pth_lib.c pth_fork.c pth_high.c pth_ext.c pth_string.c pthread.c +./libtool --mode=compile --quiet gcc -c -I. -O2 -pipe pth_debug.c +./libtool --mode=compile --quiet gcc -c -I. -O2 -pipe pth_ring.c +./libtool --mode=compile --quiet gcc -c -I. -O2 -pipe pth_pqueue.c +./libtool --mode=compile --quiet gcc -c -I. -O2 -pipe pth_time.c +./libtool --mode=compile --quiet gcc -c -I. -O2 -pipe pth_errno.c +./libtool --mode=compile --quiet gcc -c -I. -O2 -pipe pth_mctx.c +pth_mctx.c: In function '__pth_mctx_set': +pth_mctx.c:480:2: error: #error "Unsupported Linux (g)libc version and/or platform" +make: *** [pth_mctx.lo] Error 1 + +This happens because there's a Linux kernel version check that +unfortunately only recognises 2.x versions, so it classifies a +3.x kernel as "braindead", which selects sjljlx and causes the +breakage. + +The fix is to expand the kernel version regexp in aclocal.m4 to +also accept 3.x kernels; with that fix configure says: + +checking for signal-mask aware setjmp(3)/longjmp(3)... yes: ssjlj +checking for typedef stack_t... (cached) yes +checking for direction of stack growth... down +checking for makecontext... (cached) no +checking for stack setup via makecontext... N.A. +checking for sigaltstack... (cached) yes +checking for typedef stack_t... (cached) yes +checking for stack setup via sigaltstack... ok +checking for sigstack... (cached) yes +checking for stack setup via sigstack... guessed +decision on mctx implementation... sjlj/ssjlj/sas + +Both 'make' and 'make test' then succeed. + +m68k-linux' glibc also lacks makecontext() et al, so it too is sensitive +to the kernel version check. For m68k there is some specific support +in the sjljlx fallback code which appears to work, but with the fix +m68k too gets to use sjlj/ssjlj/sas (which works fine btw). + +Signed-off-by: Mikael Pettersson +--- +--- pth-2.0.7/aclocal.m4.~1~ 2006-06-08 19:54:01.000000000 +0200 ++++ pth-2.0.7/aclocal.m4 2012-05-30 18:44:42.000000000 +0200 +@@ -1074,7 +1074,7 @@ case $PLATFORM in + braindead=no + case "x`uname -r`" in + changequote(, )dnl +- x2.[23456789]* ) ;; ++ x2.[23456789]* | x3.[0-9]* ) ;; + changequote([, ]) + * ) braindead=yes ;; + esac +--- pth-2.0.7/configure.~1~ 2006-06-08 20:14:48.000000000 +0200 ++++ pth-2.0.7/configure 2012-05-30 18:45:03.000000000 +0200 +@@ -22512,7 +22512,7 @@ case $PLATFORM in + *-*-linux* ) + braindead=no + case "x`uname -r`" in +- x2.[23456789]* ) ;; ++ x2.[23456789]* | x3.[0-9]* ) ;; + + * ) braindead=yes ;; + esac diff --git a/SOURCES/pth-2.0.7-test_std.patch b/SOURCES/pth-2.0.7-test_std.patch new file mode 100644 index 0000000..2668db9 --- /dev/null +++ b/SOURCES/pth-2.0.7-test_std.patch @@ -0,0 +1,12 @@ +diff -Nur pth-2.0.7-orig/Makefile.in pth-2.0.7/Makefile.in +--- pth-2.0.7-orig/Makefile.in 2006-06-08 19:54:01.000000000 +0200 ++++ pth-2.0.7/Makefile.in 2011-10-31 22:36:22.784082615 +0100 +@@ -340,7 +340,7 @@ + # execute and debug one of the test programs + test: test-std + test-std: test_std +- -@./test_std; \ ++ @./test_std; \ + if [ $$? -eq 0 ]; then \ + touch .done-test >/dev/null 2>&1 || $(TRUE); \ + if [ ".`grep $(PLATFORM) $(S)PORTING`" = . ]; then \ diff --git a/SOURCES/pth-2.0.7.tar.gz.sig b/SOURCES/pth-2.0.7.tar.gz.sig new file mode 100644 index 0000000..bd6eec5 Binary files /dev/null and b/SOURCES/pth-2.0.7.tar.gz.sig differ diff --git a/SPECS/pth.spec b/SPECS/pth.spec new file mode 100644 index 0000000..6aa06a8 --- /dev/null +++ b/SPECS/pth.spec @@ -0,0 +1,240 @@ +Summary: The GNU Portable Threads library +Name: pth +Version: 2.0.7 +Release: 23%{?dist} +License: LGPLv2+ +Group: System Environment/Libraries +URL: http://www.gnu.org/software/pth/ +Source: ftp://ftp.gnu.org/gnu/pth/pth-%{version}.tar.gz +Source1: ftp://ftp.gnu.org/gnu/pth/pth-%{version}.tar.gz.sig +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +# Fedora customization, keep -g in the compiler options +Patch1: pth-2.0.7-dont-remove-gcc-g.patch +# Fedora customization, fix arch-dependent conflicts in pth-config script +Patch2: pth-2.0.7-config-script.patch +# Fedora customization, let build fail if running test_std fails +Patch3: pth-2.0.7-test_std.patch +# bz 744740 / patch from Mikael Pettersson +Patch4: pth-2.0.7-linux3.patch + +%description +Pth is a very portable POSIX/ANSI-C based library for Unix platforms +which provides non-preemptive priority-based scheduling for multiple +threads of execution ("multithreading") inside server applications. +All threads run in the same address space of the server application, +but each thread has it's own individual program-counter, run-time +stack, signal mask and errno variable. + +%package devel +Summary: Development headers and libraries for GNU Pth +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +Development headers and libraries for GNU Pth. + + +%prep +%setup -q +%patch1 -p1 -b .dont-remove-gcc-g +%patch2 -p1 -b .config-script +%patch3 -p1 -b .test_std +%patch4 -p1 -b .no-linux3 + + +%build +OUR_CFLAGS="${RPM_OPT_FLAGS} -D_FILE_OFFSET_BITS=64" + +%ifarch %{arm} +OUR_CFLAGS=$(echo "${OUR_CFLAGS}" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2/-D_FORTIFY_SOURCE=0/g') +# guard +echo "${OUR_CFLAGS}" | grep FORTIFY_SOURCE=0 +%endif + +CFLAGS="${OUR_CFLAGS}" +%configure --disable-static ac_cv_func_sigstack='no' + +# Work around multiarch conflicts in the pth-config script in order +# to complete patch2. Make the script choose between /usr/lib and +# /usr/lib64 at run-time. +if [ "%_libdir" == "/usr/lib64" ] ; then + if grep -e '^pth_libdir="/usr/lib64"' pth-config ; then + sed -i -e 's!^pth_libdir="/usr/lib64"!pth_libdir="/usr/lib"!' pth-config + else + echo "ERROR: Revisit the multiarch pth_libdir fixes for pth-config!" + exit 1 + fi +fi +if [ -v OUR_CFLAGS ] && grep -e "${OUR_CFLAGS}" pth-config ; then + # Remove our extra CFLAGS from the pth-config script, since they + # don't belong in there. + [ -n "${OUR_CFLAGS}" ] && sed -i -e "s!${OUR_CFLAGS}!!g" pth-config +else + echo "ERROR: Revisit the multiarch CFLAGS fix for pth-config!" + exit 1 +fi + +# this is necessary; without it make -j fails +make pth_p.h +make %{?_smp_mflags} + + +%check +make test +l=$($(pwd)/pth-config --libdir) +if [ "%{_libdir}" == "/usr/lib64" ]; then + [ "$l" == "/usr/lib64" ] +fi + + +%install +rm -rf $RPM_BUILD_ROOT +make DESTDIR=${RPM_BUILD_ROOT} install +rm -f $RPM_BUILD_ROOT%{_libdir}/*.la + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + + +%files +%defattr(-,root,root,-) +%doc ANNOUNCE AUTHORS COPYING ChangeLog HISTORY NEWS PORTING README +%doc SUPPORT TESTS THANKS USERS +%{_libdir}/*.so.* + +%files devel +%defattr(-,root,root,-) +%doc HACKING +%{_bindir}/* +%{_includedir}/* +%{_libdir}/*.so +%{_mandir}/*/* +%{_datadir}/aclocal/* + + +%changelog +* Fri Aug 1 2014 Jeff Law - 2.0.7-23 +- update pth-config for ppc64le + +* Fri Jan 24 2014 Daniel Mach - 2.0.7-22 +- Mass rebuild 2014-01-24 + +* Fri Dec 27 2013 Daniel Mach - 2.0.7-21 +- Mass rebuild 2013-12-27 + +* Thu Nov 14 2013 Jeff Law - 2.0.7-20 +- update pth-config for Aarch64 + +* Wed Feb 20 2013 Michael Schwendt - 2.0.7-19 +- Build with -D_FILE_OFFSET_BITS=64 to get stat64 in pth_high.c +- Guard the ARM CFLAGS sed substitution. + +* Thu Feb 14 2013 Fedora Release Engineering - 2.0.7-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sat Jul 21 2012 Fedora Release Engineering - 2.0.7-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jun 16 2012 Michael Schwendt - 2.0.7-16 +- Apply Linux 3 configure check patch from Mikael Pettersson (#744740). + +* Wed Jan 4 2012 Michael Schwendt - 2.0.7-15 +- rebuild for GCC 4.7 as requested + +* Wed Nov 16 2011 Dan Horák - 2.0.7-14 +- update pth-config for s390x and sparc64 + +* Mon Oct 31 2011 Michael Schwendt - 2.0.7-13 +- Let build fail if test_std fails. +- Fix previous commit, so pth-config CFLAGS check passes again. + +* Mon Oct 31 2011 Chris Tyler - 2.0.7-12 +- Removed FORTIFY_SOURCE for %%{arm} archs per Ajay Ramaswamy +- See https://bugzilla.redhat.com/show_bug.cgi?id=750243 + +* Fri Sep 16 2011 Michael Schwendt - 2.0.7-11 +- Use %%_isa in -devel package dependency. +- Use %%_libdir not %%ifarch in %%check section. + +* Wed Feb 09 2011 Fedora Release Engineering - 2.0.7-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sun Jul 26 2009 Fedora Release Engineering - 2.0.7-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Thu Feb 26 2009 Fedora Release Engineering - 2.0.7-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Sat May 31 2008 Michael Schwendt - 2.0.7-7 +- Drop "|| :" from check section. It failed to build for mdomsch + in Rawhide today. + +* Fri Feb 08 2008 Michael Schwendt - 2.0.7-6 +- rebuilt for GCC 4.3 as requested by Fedora Release Engineering + +* Sun Oct 21 2007 Michael Schwendt - 2.0.7-5 +- Patch pth-config. + This shall fix the multiarch conflict in pth-devel (#342961). + It must not return -I/usr/include and -L/usr/{lib,lib64} either, + since these are default search paths already. +- Replace the config.status CFLAGS sed expr with a patch. + +* Tue Aug 21 2007 Michael Schwendt +- rebuilt + +* Thu Aug 2 2007 Michael Schwendt - 2.0.7-2 +- Clarify licence (LGPLv2+). + +* Sat Nov 25 2006 Michael Schwendt - 2.0.7-1 +- Update to 2.0.7 (very minor maintenance updates only). + +* Mon Aug 28 2006 Michael Schwendt - 2.0.6-3 +- rebuilt + +* Mon May 22 2006 Michael Schwendt - 2.0.6-2 +- Insert -g into CFLAGS after configure script removes it. +- Disable configure check for obsolete sigstack(), which segfaults. + +* Thu Feb 16 2006 Michael Schwendt - 2.0.6-1 +- Update to 2.0.6. + +* Fri Oct 7 2005 Michael Schwendt - 2.0.5-1 +- Update to 2.0.5. +- Don't build static archive. + +* Fri May 13 2005 Michael Schwendt - 2.0.4-3 +- rebuilt + +* Thu Apr 7 2005 Michael Schwendt - 2.0.4-2 +- rebuilt + +* Thu Feb 24 2005 Michael Schwendt - 0:2.0.4-1 +- Update to 2.0.4. +- Remove ancient changelog entries which even pre-date Fedora. + +* Tue Dec 14 2004 Michael Schwendt - 0:2.0.3-1 +- Update to 2.0.3, minor and common spec adjustments + LGPL, %%check, + use URLs for official GNU companion sites. + +* Thu Oct 07 2004 Adrian Reber - 0:2.0.2-0.fdr.2 +- iconv-ing spec to utf8 + +* Wed Oct 06 2004 Adrian Reber - 0:2.0.2-0.fdr.1 +- Update to 2.0.2 and current Fedora guidelines. +- added workaround for make -j problem + +* Sat Mar 22 2003 Ville Skyttä - 0:2.0.0-0.fdr.1 +- Update to 2.0.0 and current Fedora guidelines. +- Exclude %%{_libdir}/*.la + +* Fri Feb 7 2003 Ville Skyttä - 1.4.1-1.fedora.1 +- First Fedora release, based on Ryan Weaver's work. +- Move (most of) docs to main package. +