SHA256
1
0
forked from pool/coreutils

- Hardcode the name passed to find_lang so that it works for

coreutils-testsuite too.

- Don't call autoreconf on distributions older then 12.0
  because their autoconf is too old.

- Update default posix version to 200112 (bnc#783352).
- Add coreutils-df-always-hide-rootfs.patch:
  Hide rootfs in df (df not using yet /proc/self/mountinfo).

- Statically link to gmp otherwise expr depends on gmp and gmp
  configure script depends on expr which creates a build cycle.

- Add the missing parts in coreutil.spec so that the testsuite is
  only run when coreutils-testsuite is built. Also add additional
  BuildRequires for the testsuite.

- Hardcode the name passed to find_lang so that it works for
  coreutils-testsuite too.

- Don't call autoreconf on distributions older then 12.0
  because their autoconf is too old.

OBS-URL: https://build.opensuse.org/package/show/Base:System/coreutils?expand=0&rev=171
This commit is contained in:
Philipp Thomas 2013-01-10 20:37:13 +00:00 committed by Git OBS Bridge
parent cb29fee732
commit 1e206d4651
6 changed files with 93 additions and 22 deletions

View File

@ -6,12 +6,12 @@ Subject: [PATCH 7/7] compile su with -fpie
---
lib/Makefile.am | 2 +-
src/Makefile.am | 5 +++++
2 files changed, 6 insertions(+), 1 deletions(-)
2 files changed, 6 insertions(+), 1 deletion(-)
Index: lib/Makefile.am
===================================================================
--- lib/Makefile.am.orig 2012-04-16 13:18:02.444819167 +0200
+++ lib/Makefile.am 2012-04-16 13:18:07.729692419 +0200
--- lib/Makefile.am.orig 2012-03-24 19:22:13.000000000 +0100
+++ lib/Makefile.am 2013-01-10 13:24:08.147010847 +0100
@@ -28,7 +28,7 @@ noinst_LIBRARIES =
include gnulib.mk
@ -23,8 +23,8 @@ Index: lib/Makefile.am
buffer-lcm.c buffer-lcm.h
Index: src/Makefile.am
===================================================================
--- src/Makefile.am.orig 2012-04-16 13:18:07.714692779 +0200
+++ src/Makefile.am 2012-04-16 13:18:07.730692395 +0200
--- src/Makefile.am.orig 2013-01-10 13:18:47.278685407 +0100
+++ src/Makefile.am 2013-01-10 13:24:08.148010823 +0100
@@ -361,6 +361,11 @@ uptime_LDADD += $(GETLOADAVG_LIBS)
su_SOURCES = su.c getdef.c
su_LDADD += $(LIB_CRYPT) $(PAM_LIBS)

View File

@ -4,18 +4,19 @@ Date: Mon, 9 Aug 2010 16:03:12 +0200
Subject: [PATCH 5/7] honor settings in /etc/default/su resp /etc/login.defs
---
src/Makefile.am | 1 +
src/getdef.c | 259 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/Makefile.am | 1
src/Makefile.in | 4
src/getdef.c | 259 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/getdef.h | 29 ++++++
src/su.c | 13 +++-
4 files changed, 300 insertions(+), 2 deletions(-)
src/su.c | 13 ++
5 files changed, 302 insertions(+), 4 deletions(-)
create mode 100644 src/getdef.c
create mode 100644 src/getdef.h
Index: src/Makefile.am
===================================================================
--- src/Makefile.am.orig 2012-04-16 13:18:07.682693547 +0200
+++ src/Makefile.am 2012-04-16 13:18:34.609047413 +0200
--- src/Makefile.am.orig 2013-01-10 13:18:47.251686056 +0100
+++ src/Makefile.am 2013-01-10 13:18:47.278685407 +0100
@@ -358,6 +358,7 @@ factor_LDADD += $(LIB_GMP)
uptime_LDADD += $(GETLOADAVG_LIBS)
@ -24,10 +25,25 @@ Index: src/Makefile.am
su_LDADD += $(LIB_CRYPT) $(PAM_LIBS)
# for various ACL functions
Index: src/Makefile.in
===================================================================
--- src/Makefile.in.orig 2012-05-10 19:42:28.000000000 +0200
+++ src/Makefile.in 2013-01-10 13:20:27.447278185 +0100
@@ -592,8 +592,8 @@ stdbuf_DEPENDENCIES = $(am__DEPENDENCIES
stty_SOURCES = stty.c
stty_OBJECTS = stty.$(OBJEXT)
stty_DEPENDENCIES = $(am__DEPENDENCIES_2)
-su_SOURCES = su.c
-su_OBJECTS = su.$(OBJEXT)
+su_SOURCES = su.c getdef.c
+su_OBJECTS = su.$(OBJEXT) getdef.$(OBJEXT)
su_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
sum_SOURCES = sum.c
sum_OBJECTS = sum.$(OBJEXT)
Index: src/getdef.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ src/getdef.c 2012-04-16 13:18:07.714692779 +0200
+++ src/getdef.c 2013-01-10 13:18:47.279685382 +0100
@@ -0,0 +1,259 @@
+/* Copyright (C) 2003, 2004, 2005 Thorsten Kukuk
+ Author: Thorsten Kukuk <kukuk@suse.de>
@ -291,7 +307,7 @@ Index: src/getdef.c
Index: src/getdef.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ src/getdef.h 2012-04-16 13:18:07.714692779 +0200
+++ src/getdef.h 2013-01-10 13:18:47.279685382 +0100
@@ -0,0 +1,29 @@
+/* Copyright (C) 2003, 2005 Thorsten Kukuk
+ Author: Thorsten Kukuk <kukuk@suse.de>
@ -324,8 +340,8 @@ Index: src/getdef.h
+#endif /* _GETDEF_H_ */
Index: src/su.c
===================================================================
--- src/su.c.orig 2012-04-16 13:18:07.706692971 +0200
+++ src/su.c 2012-04-16 13:18:34.630046909 +0200
--- src/su.c.orig 2013-01-10 13:18:47.272685552 +0100
+++ src/su.c 2013-01-10 13:18:47.279685382 +0100
@@ -111,6 +111,8 @@
# include <paths.h>
#endif

View File

@ -1,3 +1,36 @@
-------------------------------------------------------------------
Thu Jan 10 21:18:52 CET 2013 - phisama@suse.de
- Hardcode the name passed to find_lang so that it works for
coreutils-testsuite too.
-------------------------------------------------------------------
Thu Jan 10 11:58:17 CET 2013 - pth@suse.de
- Don't call autoreconf on distributions older then 12.0
because their autoconf is too old, so also patch Makefile.in
in addition to Makefile.am where needed.
-------------------------------------------------------------------
Tue Dec 4 08:16:35 UTC 2012 - mail@bernhard-voelker.de
- Update default posix version to 200112 (bnc#783352).
- Add coreutils-df-always-hide-rootfs.patch:
Hide rootfs in df (df not using yet /proc/self/mountinfo).
-------------------------------------------------------------------
Mon Nov 19 13:04:44 UTC 2012 - idonmez@suse.com
- Statically link to gmp otherwise expr depends on gmp and gmp
configure script depends on expr which creates a build cycle.
-------------------------------------------------------------------
Thu Nov 8 13:12:25 CET 2012 - pth@suse.de
- Add the missing parts in coreutil.spec so that the testsuite is
only run when coreutils-testsuite is built. Also add additional
BuildRequires for the testsuite.
-------------------------------------------------------------------
Tue Nov 6 13:23:45 CET 2012 - pth@suse.de

View File

@ -1,7 +1,7 @@
#
# spec file for package coreutils-testsuite
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -82,6 +82,7 @@ Patch36: coreutils-basename_documentation.patch
Patch37: coreutils-bnc#697897-setsid.patch
Patch38: coreutils-cp-corrupt-fragmented-sparse.patch
Patch39: coreutils-no_silent-rule.patch
Patch40: coreutils-df-always-hide-rootfs.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# this will create a cycle, broken up randomly - coreutils is just too core to have other
# prerequires
@ -129,17 +130,23 @@ uname unexpand uniq unlink uptime users vdir wc who whoami yes
%if 0%{suse_version} < 1200
%patch39
%endif
%patch40 -p1
xz -dc %{S:4} >po/de.po
# We need to statically link to gmp, otherwise we have a build loop
sed -i s,'$(LIB_GMP)',%{_libdir}/libgmp.a,g src/Makefile.am
%build
%if 0%{suse_version} >= 1200
AUTOPOINT=true autoreconf -fi
%endif
export CFLAGS="%optflags -Wall"
%configure --libexecdir=%{_libdir} --without-included-regex \
--enable-install-program=arch,su \
gl_cv_func_printf_directive_n=yes \
gl_cv_func_isnanl_works=yes \
DEFAULT_POSIX2_VERSION=199209
DEFAULT_POSIX2_VERSION=200112 alternative=199209
make -C po update-po
make %{?_smp_mflags} V=1
@ -166,7 +173,7 @@ install -m 644 %{S:1} %{buildroot}/etc/pam.d/su-l
install -d -m 755 %{buildroot}/etc/default
install -m 644 %{S:2} %{buildroot}/etc/default/su
echo '.so man1/test.1' > %{buildroot}/%{_mandir}/man1/\[.1
%find_lang %name
%find_lang coreutils
%post
%install_info --info-dir=%{_infodir} %{_infodir}/coreutils.info.gz
@ -195,7 +202,7 @@ echo '.so man1/test.1' > %{buildroot}/%{_mandir}/man1/\[.1
%doc %{_mandir}/man1/*.1.gz
%dir %{_prefix}/share/locale/*/LC_TIME
%files lang -f %name.lang
%files lang -f coreutils.lang
%defattr(-,root,root)
%changelog

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Thu Jan 10 21:18:52 CET 2013 - phisama@suse.de
- Hardcode the name passed to find_lang so that it works for
coreutils-testsuite too.
-------------------------------------------------------------------
Thu Jan 10 11:58:17 CET 2013 - pth@suse.de
- Don't call autoreconf on distributions older then 12.0
because their autoconf is too old, so also patch Makefile.in
in addition to Makefile.am where needed.
-------------------------------------------------------------------
Tue Dec 4 08:16:35 UTC 2012 - mail@bernhard-voelker.de

View File

@ -1,7 +1,7 @@
#
# spec file for package coreutils
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -138,7 +138,9 @@ xz -dc %{S:4} >po/de.po
sed -i s,'$(LIB_GMP)',%{_libdir}/libgmp.a,g src/Makefile.am
%build
%if 0%{suse_version} >= 1200
AUTOPOINT=true autoreconf -fi
%endif
export CFLAGS="%optflags -Wall"
%configure --libexecdir=%{_libdir} --without-included-regex \
--enable-install-program=arch,su \
@ -171,7 +173,7 @@ install -m 644 %{S:1} %{buildroot}/etc/pam.d/su-l
install -d -m 755 %{buildroot}/etc/default
install -m 644 %{S:2} %{buildroot}/etc/default/su
echo '.so man1/test.1' > %{buildroot}/%{_mandir}/man1/\[.1
%find_lang %name
%find_lang coreutils
%post
%install_info --info-dir=%{_infodir} %{_infodir}/coreutils.info.gz
@ -200,7 +202,7 @@ echo '.so man1/test.1' > %{buildroot}/%{_mandir}/man1/\[.1
%doc %{_mandir}/man1/*.1.gz
%dir %{_prefix}/share/locale/*/LC_TIME
%files lang -f %name.lang
%files lang -f coreutils.lang
%defattr(-,root,root)
%changelog