From 2bc5884ec3473c039254286d5d33fca59f473491 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 31 Oct 2008 10:41:10 +0000 Subject: do not use builrequires dash-static, use gcc to build a special binary, so that we are less mandriva centered --- t/data/SPECS/ordering-scriptlets/a_1.spec | 40 ++++++++++++++++++++++ t/data/SPECS/ordering-scriptlets/a_2.spec | 13 +++++++ t/data/SPECS/ordering-scriptlets/ash_1.spec | 24 ------------- t/data/SPECS/ordering-scriptlets/ash_2.spec | 13 ------- .../SPECS/ordering-scriptlets/requires_post_1.spec | 4 +-- .../ordering-scriptlets/requires_postun_1.spec | 4 +-- .../SPECS/ordering-scriptlets/requires_pre_1.spec | 4 +-- .../ordering-scriptlets/requires_preun_1.spec | 4 +-- 8 files changed, 61 insertions(+), 45 deletions(-) create mode 100644 t/data/SPECS/ordering-scriptlets/a_1.spec create mode 100644 t/data/SPECS/ordering-scriptlets/a_2.spec delete mode 100644 t/data/SPECS/ordering-scriptlets/ash_1.spec delete mode 100644 t/data/SPECS/ordering-scriptlets/ash_2.spec (limited to 't/data/SPECS') diff --git a/t/data/SPECS/ordering-scriptlets/a_1.spec b/t/data/SPECS/ordering-scriptlets/a_1.spec new file mode 100644 index 00000000..f1ec3ea7 --- /dev/null +++ b/t/data/SPECS/ordering-scriptlets/a_1.spec @@ -0,0 +1,40 @@ +Summary: x +Name: a +Version: 1 +Release: 1 +License: x +Group: x +Url: x +Provides: /bin/a +BuildRequires: gcc +BuildRoot: %{_tmppath}/%{name} + +%prep +%setup -c -T +cat < a.c +#include +int main(int argc, char **argv) { + FILE *f = fopen(argv[1], "r"); + int c; + while ((c = getc(f)) > 0) putchar(c); + putchar('\n'); + return 0; +} +EOF + +%build +gcc -Wall -static -o a a.c + +%install +rm -rf $RPM_BUILD_ROOT +install -D a $RPM_BUILD_ROOT/bin/a + +%clean +rm -rf $RPM_BUILD_ROOT + +%description +x + +%files +%defattr(-,root,root) +/bin/* diff --git a/t/data/SPECS/ordering-scriptlets/a_2.spec b/t/data/SPECS/ordering-scriptlets/a_2.spec new file mode 100644 index 00000000..0cd2afc8 --- /dev/null +++ b/t/data/SPECS/ordering-scriptlets/a_2.spec @@ -0,0 +1,13 @@ +Summary: x +Name: a +Version: 2 +Release: 1 +License: x +Group: x +Url: x +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/data/SPECS/ordering-scriptlets/ash_1.spec b/t/data/SPECS/ordering-scriptlets/ash_1.spec deleted file mode 100644 index 7b6e1ab8..00000000 --- a/t/data/SPECS/ordering-scriptlets/ash_1.spec +++ /dev/null @@ -1,24 +0,0 @@ -Summary: ordering_ash -Name: ordering_ash -Version: 1 -Release: 1 -License: x -Group: x -Url: x -Provides: /bin/ash -BuildRequires: dash-static -BuildRoot: %{_tmppath}/%{name} - -%install -rm -rf $RPM_BUILD_ROOT -install -D /bin/dash.static $RPM_BUILD_ROOT/bin/ash - -%clean -rm -rf $RPM_BUILD_ROOT - -%description -x - -%files -%defattr(-,root,root) -/bin/* diff --git a/t/data/SPECS/ordering-scriptlets/ash_2.spec b/t/data/SPECS/ordering-scriptlets/ash_2.spec deleted file mode 100644 index a6dbebad..00000000 --- a/t/data/SPECS/ordering-scriptlets/ash_2.spec +++ /dev/null @@ -1,13 +0,0 @@ -Summary: ordering_ash -Name: ordering_ash -Version: 2 -Release: 1 -License: x -Group: x -Url: x -BuildRoot: %{_tmppath}/%{name} - -%description -x - -%files diff --git a/t/data/SPECS/ordering-scriptlets/requires_post_1.spec b/t/data/SPECS/ordering-scriptlets/requires_post_1.spec index 3603f6a6..052d09fb 100644 --- a/t/data/SPECS/ordering-scriptlets/requires_post_1.spec +++ b/t/data/SPECS/ordering-scriptlets/requires_post_1.spec @@ -10,7 +10,7 @@ BuildRoot: %{_tmppath}/%{name} %description x -%post -p /bin/ash -echo "%post is running ok" +%post -p /bin/a +post is running ok %files diff --git a/t/data/SPECS/ordering-scriptlets/requires_postun_1.spec b/t/data/SPECS/ordering-scriptlets/requires_postun_1.spec index 8a9dc0fb..f7fd871c 100644 --- a/t/data/SPECS/ordering-scriptlets/requires_postun_1.spec +++ b/t/data/SPECS/ordering-scriptlets/requires_postun_1.spec @@ -10,7 +10,7 @@ BuildRoot: %{_tmppath}/%{name} %description x -%postun -p /bin/ash -echo "%postun is running ok" +%postun -p /bin/a +postun is running ok %files diff --git a/t/data/SPECS/ordering-scriptlets/requires_pre_1.spec b/t/data/SPECS/ordering-scriptlets/requires_pre_1.spec index cc5e9430..0783397e 100644 --- a/t/data/SPECS/ordering-scriptlets/requires_pre_1.spec +++ b/t/data/SPECS/ordering-scriptlets/requires_pre_1.spec @@ -10,7 +10,7 @@ BuildRoot: %{_tmppath}/%{name} %description x -%pre -p /bin/ash -echo "%pre is running ok" +%pre -p /bin/a +pre is running ok %files diff --git a/t/data/SPECS/ordering-scriptlets/requires_preun_1.spec b/t/data/SPECS/ordering-scriptlets/requires_preun_1.spec index 9b0d6d90..9df5135c 100644 --- a/t/data/SPECS/ordering-scriptlets/requires_preun_1.spec +++ b/t/data/SPECS/ordering-scriptlets/requires_preun_1.spec @@ -10,7 +10,7 @@ BuildRoot: %{_tmppath}/%{name} %description x -%preun -p /bin/ash -echo "%preun is running ok" +%preun -p /bin/a +preun is running ok %files -- cgit v1.2.1