Sophie

Sophie

distrib > Mageia > cauldron > i586 > by-pkgid > 1ddfe4a48b2b559a00dbca912106d555 > files > 17

dietlibc-0.34-4.mga9.src.rpm

%global _smp_ncpus_max 8
%define _enable_debug_packages %{nil}
%define debug_package          %{nil}

#define snap 20170317
%global pkglibdir	%{_prefix}/lib/dietlibc

%define rel 4

%ifarch %ix86 x86_64 aarch64
%bcond_without		ssp
%else
%bcond_with		ssp
%endif

%global myarch `uname -m | sed -e 's/i[4-9]86/i386/' -e 's/armv.*/arm/' -e 's!mips!%{_arch}!g'`

# This is eventually a biarch package, so no %%_lib for diethome
%define diethome %{_prefix}/lib/dietlibc

# Enable builds without testing (default shall always be testing)
%ifnarch aarch64
%define build_check		1
%else
%define build_check		0
%endif
%{expand: %{?_with_CHECK:	%%global build_check 1}}
%{expand: %{?_without_CHECK:	%%global build_check 0}}

Summary:	C library optimized for size
Name:		dietlibc
Version:	0.34
Release:	%mkrel %rel
License:	GPLv2
Group:		Development/Other
URL:		http://www.fefe.de/dietlibc/
Source0:	https://www.fefe.de/dietlibc/%{name}-%{version}.tar.xz
# all in one from RH:
Patch0:         dietlibc-insecure-defpath.patch
Patch1:		dietlibc-0.34-path.patch
Patch5:		dietlibc-0.22-net-ethernet.patch
Patch6:		dietlibc-0.24-rpc-types.patch
Patch17:	dietlibc-0.34-x86_64-stat64.patch
Patch18:	dietlibc-0.27-x86_64-lseek64.diff
Patch23:	dietlibc-0.33-biarch.patch
Patch26:	dietlibc-0.27-kernel2.6-types.patch
# (UPSTREAMED differently)
Patch33:	dietlibc-0.34-fix-strncmp.patch
# (cjw) from PLD, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26374
Patch34:	dietlibc-0.29-ppc-gcc-ldbl128.patch
Patch113:	dietlibc-0.34-i386-types.patch

# (UPSTREAMED)
Patch300:	diet_arm_eabi_time.patch
Patch301:	diet_arm_create_module.patch
# (tv) add string.h's basename (prevent libkmod to segfault in basebame())
Patch322:	basename.diff
Patch323:	fix-test.patch

# From Debian
Patch400:	aarch64-define-__clone.diff

# (wally) fix test failures on aarch64
Patch500:	dummy-RDTSC-implementation.patch


%description
Small libc for building embedded applications.

%package	devel
Group:          Development/C
Summary:        Development files for dietlibc
Obsoletes:	%{name}
Provides:	%{name} = %{version}-%{release}

%description	devel
Small libc for building embedded applications.

%prep

%setup -q

find . -type d -perm 0700 -exec chmod 755 {} \;
find . -type f -perm 0555 -exec chmod 755 {} \;
find . -type f -perm 0444 -exec chmod 644 {} \;

for i in `find . -type d -name CVS` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do
    if [ -e "$i" ]; then rm -rf $i; fi >&/dev/null
done

# P9999 is from fedora 
%patch0 -p0 -b .rh
%patch1 -p0 -b .mdkconfig
%patch5 -p1 -b .net-ethernet
%patch6 -p1 -b .rpc-types
%patch17 -p1 -b .x86_64-stat64
#patch18 -p0 -b .x86_64-lseek64
#patch23 -p1 -b .biarch
#patch26 -p1 -b .kernel2.6-types
%patch33 -p1 -b .fix-strncmp

%patch300 -p1 -b .arm_time
%patch301 -p1 -b .arm_create_module
%patch322 -p1 -b .readdir_r
%patch323 -p1 -b .test

%patch400 -p1 -b .__clone

%patch500 -p1 -b .rdtsc

%patch113 -p0 -b .386_types

%if %{without ssp}
sed -i -e 's!^#define WANT_SSP$!// \0!g;
	   s!.*\(#define WANT_STACKGAP\).*!\1!g' dietfeatures.h
%global xtra_fixcflags	-fno-stack-protector
%else
%global xtra_fixcflags	%nil
%endif

rm -f x86_64/getpriority.S

#WANT_VALGRIND_SUPPORT
# disable unwanted features
cp dietfeatures.h{,.tv}
sed -i \
    -e '/#define WANT_\(LARGEFILE_BACKCOMPAT\|\LINKER_WARNINGS\|IPV6_DNS\|HIGH_PRECISION_MATH\|SAFEGUARDNT_LINKER_WARNINGS\|PLUGPLAY_DNS\|SAFEGUARD\)/d' \
    dietfeatures.h
 
# fix execute permission on test scripts
chmod a+x test/{dirent,inet,stdio,string,stdlib,time}/runtests.sh

%global fixcflags	-fomit-frame-pointer -fno-exceptions -fno-asynchronous-unwind-tables %xtra_fixcflags -Os -g3 -Werror-implicit-function-declaration -Wno-unused -Wno-switch
%global basemakeflags	prefix=%_prefix BINDIR=%{_bindir} MAN1DIR=%{_mandir}/man1 CFLAGS="$RPM_OPT_FLAGS %fixcflags $XTRA_CFLAGS" PDIET=%pkglibdir STRIP=: MYARCH=%{myarch}
%global makeflags	%basemakeflags

%build
%make_build %makeflags DEBUG=1

%check
# make and run the tests
%if %{build_check}
cd test; rm *.c.* || :
%ifarch %mips %arm
sed -i -e 's!cycles empty!empty!' Makefile
%endif
# fix build in chroot:
export DIETHOME="%{_builddir}/%{name}-%{version}"

find -name "Makefile" | xargs perl -pi -e "s|^DIET.*|DIET=\"${DIETHOME}/bin-%{myarch}/diet\"|g" 	 
# compile test suite:
%make_build %makeflags all DEBUG=1
%make_build %makeflags -C inet all DEBUG=1

# run the tests
# getpass requires user input
perl -pi -e "s|^PASS.*|PASS=\"\"|g" runtests.sh
sh ./runtests.sh
cd ..
%endif

%install
make %makeflags DEBUG=1 DESTDIR=%{buildroot} install

%files devel
%doc AUTHOR BUGS CAVEAT CHANGES README THANKS TODO FAQ
%{_bindir}/diet
%{_bindir}/dnsd
%{_bindir}/elftrunc
%{_mandir}/man*/*
%dir %{diethome}
%dir %{diethome}/include
%{diethome}/include/*
%dir %{diethome}/lib-*
%{diethome}/lib-*/*




%changelog
* Tue Mar 15 2022 umeabot <umeabot> 0.34-4.mga9
+ Revision: 1793356
- Mageia 9 Mass Rebuild

* Mon Jan 25 2021 pterjan <pterjan> 0.34-3.mga8
+ Revision: 1673282
- Fix path for tests
- Fix release
- Try to fix build on arm

* Sat Jan 23 2021 daviddavid <daviddavid> 0.34-2.mga8
+ Revision: 1672935
- disable tests on aarch64 for now
+ neoclust <neoclust>
- Rebuild on mageia 8
+ umeabot <umeabot>
- Mageia 8 Mass Rebuild

* Thu Sep 27 2018 tv <tv> 0.34-1.mga7
+ Revision: 1308401
- new release

* Sun Sep 23 2018 umeabot <umeabot> 0.34-0.20170317.4.mga7
+ Revision: 1297441
- Mageia 7 Mass Rebuild

* Sat Jun 23 2018 wally <wally> 0.34-0.20170317.3.mga7
+ Revision: 1239227
- aarch64: define __clone, make clone a weak alias to it (from Debian)

* Sun Jun 03 2018 wally <wally> 0.34-0.20170317.2.mga7
+ Revision: 1234060
- add aarch64 support

* Tue Jan 09 2018 tv <tv> 0.34-0.20170317.1.mga7
+ Revision: 1191956
- new snapshot
- drop merged patch
- disable patches 23 & 26
- fix testsuite
- replace part of mdkconfig patch by flags

* Wed Sep 20 2017 tv <tv> 0.33-4.20120825.10.mga7
+ Revision: 1156290
- reduce max cpu to 8 as this works locally whereas -j12 fails on BS
- replace patch 37 & part of mdkconfig patch by flags
- drop mips patches

* Thu Feb 04 2016 umeabot <umeabot> 0.33-4.20120825.8.mga6
+ Revision: 935624
- Mageia 6 Mass Rebuild

* Wed Oct 15 2014 umeabot <umeabot> 0.33-4.20120825.7.mga5
+ Revision: 739638
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 0.33-4.20120825.6.mga5
+ Revision: 678738
- Mageia 5 Mass Rebuild

* Sat Oct 19 2013 umeabot <umeabot> 0.33-4.20120825.5.mga4
+ Revision: 523357
- Mageia 4 Mass Rebuild

* Sun Apr 07 2013 rtp <rtp> 0.33-4.20120825.4.mga3
+ Revision: 408939
- fix MYARCH variable to properly be set to 'arm' on 'arm'

* Fri Jan 11 2013 umeabot <umeabot> 0.33-4.20120825.3.mga3
+ Revision: 348767
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Wed Sep 26 2012 tv <tv> 0.33-4.20120825.2.mga3
+ Revision: 297917
- new snapshot
- rediff patches 23 & 305

* Sat Jul 28 2012 tv <tv> 0.33-4.20120330.2.mga3
+ Revision: 275162
- rebuild for new gcc

* Mon Jun 04 2012 tv <tv> 0.33-4.20120330.1.mga3
+ Revision: 254066
- new snapshot

* Mon Feb 27 2012 tv <tv> 0.33-4.20120224.1.mga2
+ Revision: 215630
- new snapshot
- rediff patch 33 (only keep the test) & 200
- drop patches 16, 24, 36, 112, 304, 306-308, 320 (merged) & 3 (useless)
- fix & run test suite

* Sat Feb 25 2012 tv <tv> 0.33-4.20111222.1.mga2
+ Revision: 214700
- new snapshot
- rediff patch 200
- drop patches 40x (merged)

* Sun Feb 19 2012 bertl <bertl> 0.33-4.20110311.3.mga2
+ Revision: 210721
- added various fixes from the ensc branch
- updated clone prototype
- fix off by one in memchr
- ensure max bytes in strftime
- lseek64 for 64-bit (=lseek)
- fix posix_fadvise() implementation

* Mon Jan 23 2012 tv <tv> 0.33-4.20110311.2.mga2
+ Revision: 200128
- bump release
- switch to 0.33 branch
- annotate patches upstreamed


* Thu Dec 02 2010 Oden Eriksson <oeriksson@mandriva.com> 0.32-4.20090113.6mdv2011.0
+ Revision: 604789
- rebuild

* Fri May 21 2010 Pascal Terjan <pterjan@mandriva.org> 0.32-4.20090113.5mdv2010.1
+ Revision: 545621
- Fix dev_t (and others) size on ix86, stat would need to be fixed too

* Mon Mar 15 2010 Oden Eriksson <oeriksson@mandriva.com> 0.32-4.20090113.4mdv2010.1
+ Revision: 520080
- rebuilt for 2010.1

* Fri Oct 09 2009 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 0.32-4.20090113.3mdv2010.0
+ Revision: 456249
- Fix broken getpriority (#53430).

* Sun Aug 09 2009 Oden Eriksson <oeriksson@mandriva.com> 0.32-4.20090113.2mdv2010.0
+ Revision: 413354
- rebuild

* Fri Feb 13 2009 Pascal Terjan <pterjan@mandriva.org> 0.32-4.20090113.1mdv2009.1
+ Revision: 339959
- Add upstream fix on fgetc, fixes stage 1 looking ugly

* Wed Jan 28 2009 Oden Eriksson <oeriksson@mandriva.com> 0.32-3.20090113.1mdv2009.1
+ Revision: 335015
- new cvs snap (20090113)
- rediff patches

* Wed Aug 06 2008 Thierry Vignaud <tv@mandriva.org> 0.32-3.20080509.2mdv2009.0
+ Revision: 264403
- rebuild early 2009.0 package (before pixel changes)

* Tue Jun 10 2008 Oden Eriksson <oeriksson@mandriva.com> 0.32-0.20080509.2mdv2009.0
+ Revision: 217518
- rebuild
- drop the fix-getpriority patch (fixes #41386)

* Sun Jun 08 2008 Oden Eriksson <oeriksson@mandriva.com> 0.32-0.20080509.1mdv2009.0
+ Revision: 216900
- 0.32 (actually a cvs snap 20080509)
- rediffed the mdv patches (P1,P23,P27,P33)
- added fedora patches (P100 - P111)

* Mon Dec 31 2007 Pascal Terjan <pterjan@mandriva.org> 0.31-5mdv2008.1
+ Revision: 139897
- Commit the correct stat64 fix

* Fri Dec 21 2007 Olivier Blin <oblin@mandriva.com> 0.31-4mdv2008.1
+ Revision: 136466
- revert commit 102905 (which removed __NO_STAT64), it breaks stage1 build and does not fix dash
- restore BuildRoot

  + Thierry Vignaud <tv@mandriva.org>
    - kill re-definition of %%buildroot on Pixel's request

* Sat Nov 17 2007 Funda Wang <fwang@mandriva.org> 0.31-3mdv2008.1
+ Revision: 109297
- rebuild for new lzma

* Mon Nov 05 2007 Pascal Terjan <pterjan@mandriva.org> 0.31-2mdv2008.1
+ Revision: 106080
- Add back x86_64-lseek64 patch

* Sun Oct 28 2007 Pascal Terjan <pterjan@mandriva.org> 0.31-1mdv2008.1
+ Revision: 102905
- Try again to fix stat64
- 0.31

* Sun Oct 28 2007 Pascal Terjan <pterjan@mandriva.org> 0.30-4mdv2008.1
+ Revision: 102886
- Put back patch17 not that it is fixed
- Synchronize stat and stat64
- Disable P17, it breaks dash on x86_64

* Fri Aug 24 2007 Pixel <pixel@mandriva.com> 0.30-3mdv2008.0
+ Revision: 70836
- add -fno-stack-protector to override default %%{optflags}

* Sat Aug 11 2007 Andrey Borzenkov <arvidjaar@mandriva.org> 0.30-2mdv2008.0
+ Revision: 61994
- add MS_RELATIME definition

* Tue Jul 17 2007 Olivier Blin <oblin@mandriva.com> 0.30-1mdv2008.0
+ Revision: 53058
- 0.30
- rediff mdk patch
- drop 64bit-size_t patch (merged upstream)
- fix build of fstatfs64 (from Alt Linux)

* Sun May 06 2007 Christiaan Welvaart <spturtle@mandriva.org> 0.29-7mdv2008.0
+ Revision: 23754
- patch34: fix build on ppc

* Fri May 04 2007 Gwenole Beauchesne <gbeauchesne@mandriva.org> 0.29-6mdv2008.0
+ Revision: 22461
- fix strncmp() (nano)
- fix *printf("%%u") for 64-bit platforms (dmraid)


* Thu Oct 12 2006 Oden Eriksson <oeriksson@mandriva.com>
+ 2006-10-11 11:46:17 (63424)
- bunzip patches

* Thu Oct 12 2006 Oden Eriksson <oeriksson@mandriva.com>
+ 2006-10-11 11:43:34 (63423)
Import dietlibc

* Sat Jul 22 2006 Per Øyvind Karlsen <pkarlsen@mandriva.com> 0.29-4mdv2007.0
- srpm got lost, might as well rebuild for new release tag too..

* Thu May 04 2006 Per Øyvind Karlsen <pkarlsen@mandriva.com> 0.29-3mdk
- fix typo in P23 to fix build on x86_64
- fix rdtsc sparc hack (P29) for sparcv9

* Fri Apr 21 2006 Per Øyvind Karlsen <pkarlsen@mandriva.com> 0.29-2mdk
- add missing sparc .weak asm (P31 from ROCK Linux)
- reenable glob test for sparc again as we no now have asm inst (drops P30)

* Fri Apr 21 2006 Per Øyvind Karlsen <pkarlsen@mandriva.com> 0.29-1mdk
- 0.29
- update P0 to disable zeroconf
- regenerate P23 & P27
- drop broken contrapolice (P14)
- reenable test on sparc as things should be working again now :)
- disable P22 (fixed upstream? someone please verify!)
- versioned provides
- move checks to %%check
- hack rdtsc for sparc testsuite
- disable glob test for sparc testsuite

* Thu Dec 15 2005 Gwenole Beauchesne <gbeauchesne@mandriva.com> 0.28-3mdk
- remove merged patches that 0.28-1mdk uploader forgot about

* Wed Aug 31 2005 Gwenole Beauchesne <gbeauchesne@mandriva.com> 0.28-2mdk
- fix <asm/types.h> size_t definition for 64-bit platforms

* Sat May 07 2005 Rafael Garcia-Suarez <rgarciasuarez@mandriva.com> 0.28-1mdk
- New version 0.28
- Remove patches 7, 8, 10, 11, 12, 19, 20
- Adapt patch 14

* Sat Apr 23 2005 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 0.27-14mdk
- don't do check on sparc

* Wed Mar 30 2005 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.27-13mdk
- always prototype lseek64(), aka fix mdassemble though they should
  not use *64() functions directly

* Tue Mar 08 2005 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.27-12mdk
- cross compilation support

* Sat Jan 29 2005 Luca Berra <bluca@vodka.it> 0.27-11mdk 
- added pgoff_t to kernel 2.6.10 types definitions

* Wed Jan 26 2005 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.27-10mdk
- provide some kernel 2.6.10 types definitions

* Tue Jan 18 2005 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.27-9mdk
- fix getpriority() as the return value from the syscall is biased
- add nice() implementation from glibc, make it use the fixed getpriority()

* Wed Dec 15 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.27-8mdk
- fix ppc select()
- quiet test bsearch

* Tue Dec 14 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.27-7mdk
- biarch builds on x86_64 and ppc64

* Tue Dec 14 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.27-6mdk
- ppc64 fixes: umount, setjmp, __WORDSIZE, select, stat64, rdtsc

* Wed Dec 08 2004 Luca Berra <bluca@vodka.it> 0.27-5mdk 
- added struct stat64 as struct stat and fstat64() as fstat()
  on x86_64, so test suite builds

* Fri Nov 26 2004 Christiaan Welvaart <cjw@daneel.dyndns.org> 0.27-4mdk
- add RDTSC in testsuite for ppc
- remove patch9 - fixed upstream
- fix permissions on test scripts in subdirs
- Patch16: build inet tests

* Tue Nov 09 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.27-3mdk
- added the contrapolice patch (P14)
- make and run the test suite

* Wed Oct 27 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.27-2mdk
- implement lseek64() as lseek() on x86_64

* Fri Aug 06 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.27-1mdk
- 0.27
- deactivated P9 as it won't apply

* Fri Jul 23 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.26-4mdk
- fix rdtsc in testsuite for amd64
- fix tzfile() for 64-bit architectures, aka. fix mktime()

* Fri Jul 23 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.26-3mdk
- Patch10: ISO C defines LC_ macros (7.11 [#3])

* Sat Jul 10 2004 Christiaan Welvaart <cjw@daneel.dyndns.org> 0.26-2mdk
- Patch9: fix ppc build

* Tue Jun 29 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.26-1mdk
- 0.26
- merge P2 and P4 into P1 (ppc64asppc and lib64 fixes are now in P1)

* Fri May 07 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.25-1mdk
- 0.25
- drop the sprinf() patch, it's included

* Wed Apr 07 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.24-2mdk
- sprinf() fixes from CVS

* Mon Feb 09 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.24-1mdk
- 0.24
- Patch8: Fix strtol() + testcase on 64-bit platforms

* Wed Oct 29 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.22-7mdk
- Patch18: Enable inb() and friends in <sys/io.h> on AMD64 too