From 44061c3b491c0f93a8357effe435cb72d9b9ca6a Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 23 Dec 2022 18:36:43 +0100 Subject: [PATCH 01/12] C99 compatibility fixes (#2156074) Related to: --- dietlibc-c99.patch | 33 +++++++++++++++++++++++++++++++++ dietlibc.spec | 7 ++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 dietlibc-c99.patch diff --git a/dietlibc-c99.patch b/dietlibc-c99.patch new file mode 100644 index 0000000..218c679 --- /dev/null +++ b/dietlibc-c99.patch @@ -0,0 +1,33 @@ +Changes to avoid implicit function declarations: +provides a declaration of noths. -D_BSD_SOURCE enables declarations +of random, srandom. + +diff -ur dietlibc-0.34.orig/test/getservbyname.c dietlibc-0.34/test/getservbyname.c +--- dietlibc-0.34.orig/test/getservbyname.c 2003-12-15 14:07:42.000000000 +0100 ++++ dietlibc-0.34/test/getservbyname.c 2022-12-23 18:17:26.645479365 +0100 +@@ -1,5 +1,6 @@ + #include + #include ++#include + + int main(int argc,char *argv[]) { + struct servent* se; +diff -ur dietlibc-0.34.orig/test/stdlib/testsort.c dietlibc-0.34/test/stdlib/testsort.c +--- dietlibc-0.34.orig/test/stdlib/testsort.c 2003-12-15 14:07:42.000000000 +0100 ++++ dietlibc-0.34/test/stdlib/testsort.c 2022-12-23 18:16:33.758018509 +0100 +@@ -1,3 +1,4 @@ ++#define _BSD_SOURCE + #include + #include + #include +diff -ur dietlibc-0.34.orig/test/stdlib/tst-calloc.c dietlibc-0.34/test/stdlib/tst-calloc.c +--- dietlibc-0.34.orig/test/stdlib/tst-calloc.c 2003-12-15 14:07:42.000000000 +0100 ++++ dietlibc-0.34/test/stdlib/tst-calloc.c 2022-12-23 18:16:49.272860349 +0100 +@@ -17,6 +17,7 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#define _BSD_SOURCE + #include + #include + #include diff --git a/dietlibc.spec b/dietlibc.spec index 5c4881c..68de74d 100644 --- a/dietlibc.spec +++ b/dietlibc.spec @@ -24,7 +24,7 @@ Summary: Small libc implementation Name: dietlibc Version: 0.34 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv2 URL: http://www.fefe.de/dietlibc/ %if !0%{?prerelease:1} @@ -37,6 +37,7 @@ Source0: %{name}-%{version}.%prerelease.tar.xz ## CVS..master diff from https://github.com/ensc/dietlibc #Patch0: dietlibc-github-%%githubref.patch.gz Patch1: dietlibc-insecure-defpath.patch +Patch2: dietlibc-c99.patch #Requires: dietlibc-lib = %%{version}-%%{release}} Obsoletes: dietlibc-lib < %{version}-%{release} @@ -83,6 +84,7 @@ This package contains the dynamic libraries for dietlibc. #%apply -n0 -p1 %patch1 -p0 +%patch2 -p1 %if %{without ssp} sed -i -e 's!^#define WANT_SSP$!// \0!g; @@ -153,6 +155,9 @@ ulimit -m $[ 128*1024 ] -v $[ 256*1024 ] -d $[ 128*1024 ] -s 512 %pkglibdir %changelog +* Fri Dec 23 2022 Florian Weimer - 0.34-11 +- C99 compatibility fixes (#2156074) + * Thu Jul 21 2022 Fedora Release Engineering - 0.34-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From e8ece41b1b740618478f4805622b1b531f09f36c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 01:23:49 +0000 Subject: [PATCH 02/12] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- dietlibc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dietlibc.spec b/dietlibc.spec index 68de74d..2fbd2c1 100644 --- a/dietlibc.spec +++ b/dietlibc.spec @@ -24,7 +24,7 @@ Summary: Small libc implementation Name: dietlibc Version: 0.34 -Release: 11%{?dist} +Release: 12%{?dist} License: GPLv2 URL: http://www.fefe.de/dietlibc/ %if !0%{?prerelease:1} @@ -155,6 +155,9 @@ ulimit -m $[ 128*1024 ] -v $[ 256*1024 ] -d $[ 128*1024 ] -s 512 %pkglibdir %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 0.34-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Fri Dec 23 2022 Florian Weimer - 0.34-11 - C99 compatibility fixes (#2156074) From 0292476790823724d0c16a4b14849b6aca47e77a Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Tue, 7 Mar 2023 15:38:18 -0600 Subject: [PATCH 03/12] migrated to SPDX license --- dietlibc.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dietlibc.spec b/dietlibc.spec index 2fbd2c1..76f12a1 100644 --- a/dietlibc.spec +++ b/dietlibc.spec @@ -24,8 +24,8 @@ Summary: Small libc implementation Name: dietlibc Version: 0.34 -Release: 12%{?dist} -License: GPLv2 +Release: 13%{?dist} +License: GPL-2.0-only URL: http://www.fefe.de/dietlibc/ %if !0%{?prerelease:1} Source0: https://www.fefe.de/dietlibc/%{name}-%{version}.tar.xz @@ -155,6 +155,9 @@ ulimit -m $[ 128*1024 ] -v $[ 256*1024 ] -d $[ 128*1024 ] -s 512 %pkglibdir %changelog +* Tue Mar 07 2023 Gwyn Ciesla - 0.34-13 +- migrated to SPDX license + * Thu Jan 19 2023 Fedora Release Engineering - 0.34-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 0fa1d76227b6d162c08dcfc134f13652a6a39df3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jul 2023 17:27:23 +0000 Subject: [PATCH 04/12] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- dietlibc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dietlibc.spec b/dietlibc.spec index 76f12a1..ef44ca3 100644 --- a/dietlibc.spec +++ b/dietlibc.spec @@ -24,7 +24,7 @@ Summary: Small libc implementation Name: dietlibc Version: 0.34 -Release: 13%{?dist} +Release: 14%{?dist} License: GPL-2.0-only URL: http://www.fefe.de/dietlibc/ %if !0%{?prerelease:1} @@ -155,6 +155,9 @@ ulimit -m $[ 128*1024 ] -v $[ 256*1024 ] -d $[ 128*1024 ] -s 512 %pkglibdir %changelog +* Wed Jul 19 2023 Fedora Release Engineering - 0.34-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Tue Mar 07 2023 Gwyn Ciesla - 0.34-13 - migrated to SPDX license From a202e428764d1868dbe4832101ac3eeb3d70bec8 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Thu, 24 Aug 2023 11:43:07 -0500 Subject: [PATCH 05/12] Fix FTBFS --- dietlibc.spec | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dietlibc.spec b/dietlibc.spec index ef44ca3..229bfba 100644 --- a/dietlibc.spec +++ b/dietlibc.spec @@ -2,6 +2,9 @@ ## --with[out] ssp ... enable/disable SSP; default depends ## on target architecture +# Disabled per upstream to fix FTBFS. +%undefine _hardened_build + #%%global prerelease 20170317 #%%global githubref c3f1cf67fcc186bb859e64a085bf98aaa6182a82 %global pkglibdir %{_prefix}/lib/dietlibc @@ -24,7 +27,7 @@ Summary: Small libc implementation Name: dietlibc Version: 0.34 -Release: 14%{?dist} +Release: 15%{?dist} License: GPL-2.0-only URL: http://www.fefe.de/dietlibc/ %if !0%{?prerelease:1} @@ -83,8 +86,8 @@ This package contains the dynamic libraries for dietlibc. #%setup -qn dietlibc #%apply -n0 -p1 -%patch1 -p0 -%patch2 -p1 +%patch -P 1 -p0 +%patch -P 2 -p1 %if %{without ssp} sed -i -e 's!^#define WANT_SSP$!// \0!g; @@ -155,6 +158,9 @@ ulimit -m $[ 128*1024 ] -v $[ 256*1024 ] -d $[ 128*1024 ] -s 512 %pkglibdir %changelog +* Thu Aug 24 2023 Gwyn Ciesla - 0.34-15 +- Fix FTBFS + * Wed Jul 19 2023 Fedora Release Engineering - 0.34-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 7fba8dced8108b29ee04b17996a90adccc5a9e36 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 17:09:33 +0000 Subject: [PATCH 06/12] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- dietlibc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dietlibc.spec b/dietlibc.spec index 229bfba..010b39f 100644 --- a/dietlibc.spec +++ b/dietlibc.spec @@ -27,7 +27,7 @@ Summary: Small libc implementation Name: dietlibc Version: 0.34 -Release: 15%{?dist} +Release: 16%{?dist} License: GPL-2.0-only URL: http://www.fefe.de/dietlibc/ %if !0%{?prerelease:1} @@ -158,6 +158,9 @@ ulimit -m $[ 128*1024 ] -v $[ 256*1024 ] -d $[ 128*1024 ] -s 512 %pkglibdir %changelog +* Fri Jan 19 2024 Fedora Release Engineering - 0.34-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Thu Aug 24 2023 Gwyn Ciesla - 0.34-15 - Fix FTBFS From 8b585bcf2f5407f06b5b2017d486730f63eb53cd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jan 2024 09:26:16 +0000 Subject: [PATCH 07/12] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- dietlibc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dietlibc.spec b/dietlibc.spec index 010b39f..7e246fd 100644 --- a/dietlibc.spec +++ b/dietlibc.spec @@ -27,7 +27,7 @@ Summary: Small libc implementation Name: dietlibc Version: 0.34 -Release: 16%{?dist} +Release: 17%{?dist} License: GPL-2.0-only URL: http://www.fefe.de/dietlibc/ %if !0%{?prerelease:1} @@ -158,6 +158,9 @@ ulimit -m $[ 128*1024 ] -v $[ 256*1024 ] -d $[ 128*1024 ] -s 512 %pkglibdir %changelog +* Wed Jan 24 2024 Fedora Release Engineering - 0.34-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 19 2024 Fedora Release Engineering - 0.34-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 054a3b9eb7336186e6f3e537bfd065ca7120fd55 Mon Sep 17 00:00:00 2001 From: Michal Domonkos Date: Fri, 31 May 2024 13:33:10 +0200 Subject: [PATCH 08/12] Fix improperly commented out macros in %prep Since RPM 4.20, %prep is no longer implemented as a special "hack" [1] but is now a regular build scriptlet, meaning that %setup or %patch are now treated as regular macros and thus will be expanded even in comments (as documented in [2]). Our spec has these so fix them up to unbreak the build on F41. [1] https://github.com/rpm-software-management/rpm/issues/2205 [2] https://rpm-software-management.github.io/rpm/manual/spec.html --- dietlibc.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dietlibc.spec b/dietlibc.spec index 7e246fd..06ca234 100644 --- a/dietlibc.spec +++ b/dietlibc.spec @@ -83,9 +83,9 @@ This package contains the dynamic libraries for dietlibc. %prep %setup -q %{?prerelease:-n %{name}-%{version}.%prerelease} -#%setup -qn dietlibc +%dnl %setup -qn dietlibc -#%apply -n0 -p1 +%dnl %apply -n0 -p1 %patch -P 1 -p0 %patch -P 2 -p1 From e396f8ce414519a2f062c70bdd82132da341b7c9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 20:58:15 +0000 Subject: [PATCH 09/12] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- dietlibc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dietlibc.spec b/dietlibc.spec index 06ca234..4c9d37f 100644 --- a/dietlibc.spec +++ b/dietlibc.spec @@ -27,7 +27,7 @@ Summary: Small libc implementation Name: dietlibc Version: 0.34 -Release: 17%{?dist} +Release: 18%{?dist} License: GPL-2.0-only URL: http://www.fefe.de/dietlibc/ %if !0%{?prerelease:1} @@ -158,6 +158,9 @@ ulimit -m $[ 128*1024 ] -v $[ 256*1024 ] -d $[ 128*1024 ] -s 512 %pkglibdir %changelog +* Wed Jul 17 2024 Fedora Release Engineering - 0.34-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Wed Jan 24 2024 Fedora Release Engineering - 0.34-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From caa2e140a781548bd1a4497ebaecd18212aa63bc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 15:45:00 +0000 Subject: [PATCH 10/12] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- dietlibc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dietlibc.spec b/dietlibc.spec index 4c9d37f..0821b32 100644 --- a/dietlibc.spec +++ b/dietlibc.spec @@ -27,7 +27,7 @@ Summary: Small libc implementation Name: dietlibc Version: 0.34 -Release: 18%{?dist} +Release: 19%{?dist} License: GPL-2.0-only URL: http://www.fefe.de/dietlibc/ %if !0%{?prerelease:1} @@ -158,6 +158,9 @@ ulimit -m $[ 128*1024 ] -v $[ 256*1024 ] -d $[ 128*1024 ] -s 512 %pkglibdir %changelog +* Thu Jan 16 2025 Fedora Release Engineering - 0.34-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Wed Jul 17 2024 Fedora Release Engineering - 0.34-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From d48a6a0274454b4e78505999d9dd6c3cfedce97f Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Mon, 3 Feb 2025 11:35:11 -0600 Subject: [PATCH 11/12] Fix FTBFS --- dietlibc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietlibc.spec b/dietlibc.spec index 0821b32..de5daa6 100644 --- a/dietlibc.spec +++ b/dietlibc.spec @@ -109,7 +109,7 @@ sed -i \ dietfeatures.h %endif -%global fixcflags -fomit-frame-pointer -fno-exceptions -fno-asynchronous-unwind-tables %xtra_fixcflags -Os -g3 -Werror-implicit-function-declaration -Wno-unused -Wno-switch +%global fixcflags -fomit-frame-pointer -fno-exceptions -fno-asynchronous-unwind-tables %xtra_fixcflags -Os -g3 -Werror-implicit-function-declaration -Wno-unused -Wno-switch -std=gnu17 %global basemakeflags prefix=%pkglibdir BINDIR=%{_bindir} MAN1DIR=%{_mandir}/man1 CFLAGS="$RPM_OPT_FLAGS %fixcflags $XTRA_CFLAGS" PDIET=%pkglibdir STRIP=: %global makeflags %basemakeflags From 30bc22cffeb998867faba7a476c9286f5b748e89 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 19:16:41 +0000 Subject: [PATCH 12/12] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- dietlibc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dietlibc.spec b/dietlibc.spec index de5daa6..37aa2d9 100644 --- a/dietlibc.spec +++ b/dietlibc.spec @@ -27,7 +27,7 @@ Summary: Small libc implementation Name: dietlibc Version: 0.34 -Release: 19%{?dist} +Release: 20%{?dist} License: GPL-2.0-only URL: http://www.fefe.de/dietlibc/ %if !0%{?prerelease:1} @@ -158,6 +158,9 @@ ulimit -m $[ 128*1024 ] -v $[ 256*1024 ] -d $[ 128*1024 ] -s 512 %pkglibdir %changelog +* Wed Jul 23 2025 Fedora Release Engineering - 0.34-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Thu Jan 16 2025 Fedora Release Engineering - 0.34-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild