rpms/setarch/devel setarch-sparc32bash.patch, NONE, 1.1 setarch.spec, 1.17, 1.18
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Fri Jan 12 15:00:23 UTC 2007
Author: jnovy
Update of /cvs/dist/rpms/setarch/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv10089
Modified Files:
setarch.spec
Added Files:
setarch-sparc32bash.patch
Log Message:
- add sparc32bash alias to keep compatibility with sparc32 which
is obsoleted by setarch for some time (#221976),
thanks to Dennis Gilmore
setarch-sparc32bash.patch:
setarch.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletion(-)
--- NEW FILE setarch-sparc32bash.patch ---
--- setarch-2.0/setarch.c.sparc32bash 2006-04-07 14:35:49.000000000 +0200
+++ setarch-2.0/setarch.c 2007-01-12 15:37:53.000000000 +0100
@@ -113,6 +113,7 @@
#endif
#if defined(__sparc64__) || defined(__sparc__)
{PER_LINUX32, "sparc", "sparc"},
+ {PER_LINUX32, "sparc32bash", "sparc"},
{PER_LINUX32, "sparc32", "sparc"},
{PER_LINUX, "sparc64", "sparc64"},
#endif
@@ -170,7 +171,14 @@
if (!strcmp(p, "-h") || !strcmp(p, "--help"))
show_help();
}
-
+#if defined(__sparc64__) || defined(__sparc__)
+ if (!strcmp(p, "sparc32bash")) {
+ if (set_arch(p, NULL))
+ error(EXIT_FAILURE, errno, "Failed to set personality to %s", p);
+ execl("/bin/bash", NULL);
+ error(EXIT_FAILURE, errno, "/bin/bash");
+ }
+#endif
for (argv++, argc--; argc && argv[0][0] == '-'; argv++, argc--) {
int n, unknown = 1;
const char *arg = argv[0];
Index: setarch.spec
===================================================================
RCS file: /cvs/dist/rpms/setarch/devel/setarch.spec,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- setarch.spec 7 Nov 2006 18:59:48 -0000 1.17
+++ setarch.spec 12 Jan 2007 15:00:21 -0000 1.18
@@ -1,8 +1,9 @@
Summary: Personality setter
Name: setarch
Version: 2.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Source0: %{name}-%{version}.tar.gz
+Patch0: setarch-sparc32bash.patch
License: GPL
Group: System Environment/Kernel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -17,6 +18,7 @@
%prep
%setup -q
+%patch0 -p1 -b .sparc32bash
%build
%{__cc} -o setarch setarch.c $RPM_OPT_FLAGS -Wall
@@ -38,7 +40,7 @@
LINKS="$LINKS ppc ppc64 ppc32"
%endif
%ifarch sparc sparc64
-LINKS="$LINKS sparc sparc64 sparc32"
+LINKS="$LINKS sparc sparc64 sparc32 sparc32bash"
%endif
%ifarch mips mips64
LINKS="$LINKS mips mips64 mips32"
@@ -60,6 +62,11 @@
%{_mandir}/man8/*.8*
%changelog
+* Fri Jan 12 2007 Jindrich Novy <jnovy at redhat.com> 2.0-3
+- add sparc32bash alias to keep compatibility with sparc32 which
+ is obsoleted by setarch for some time (#221976),
+ thanks to Dennis Gilmore
+
* Tue Nov 7 2006 Jindrich Novy <jnovy at redhat.com> 2.0-2
- use dist tag
- fix BuildRoot
More information about the fedora-cvs-commits
mailing list