forked from pool/linux32
This commit is contained in:
commit
f318205163
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
3
konsole-linux32.png
Normal file
3
konsole-linux32.png
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:213dbebb98ea38fa11917615de247e6f46e8c6082b3563dfdbec9e1c2dc5c41a
|
||||
size 1734
|
55
linux32.1
Normal file
55
linux32.1
Normal file
@ -0,0 +1,55 @@
|
||||
.TH LINUX32 1 "May 2002" "SuSE Labs" "Linux User's Manual"
|
||||
.SH NAME
|
||||
linux32 \- Set i686 uname emulation processes.
|
||||
linux64 \- Reset uname emulation
|
||||
.SH SYNOPSIS
|
||||
.B linux32
|
||||
[
|
||||
.B \-\-3gb
|
||||
]
|
||||
[
|
||||
.B \-\-4gb
|
||||
]
|
||||
command arguments...
|
||||
.br
|
||||
.B linux64
|
||||
command arguments...
|
||||
.br
|
||||
.SH DESCRIPTION
|
||||
.I linux32
|
||||
changes the personality of command and all its children to
|
||||
return
|
||||
.I i686
|
||||
instead of
|
||||
.I x86_64
|
||||
in
|
||||
.I uname -a.
|
||||
This is useful to fool shell scripts or programs that check for the architecture
|
||||
explicitely into believing that they run on a true
|
||||
.I i686
|
||||
system.
|
||||
In addition it moves the top of stack of the 32bit child processes to
|
||||
.I 0xc0000000.
|
||||
This is useful to execute some broken applications that break when
|
||||
the stack top is at 4GB. On the other hand it limits the usable heap
|
||||
memory more than necessary.
|
||||
When
|
||||
.I --4gb
|
||||
is specified this is not done.
|
||||
|
||||
.I linux64
|
||||
resets the uname personality to default.
|
||||
.SH SEE ALSO
|
||||
.I uname(1)
|
||||
|
||||
.I uname(2)
|
||||
|
||||
.I personality(2)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
50
linux32.c
Normal file
50
linux32.c
Normal file
@ -0,0 +1,50 @@
|
||||
/* Written 2002 by Andi Kleen */
|
||||
#include <linux/personality.h>
|
||||
#undef personality
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/* Make --3gb the default for buggy Java */
|
||||
#define STUPID_DEFAULT 1
|
||||
|
||||
#ifdef STUPID_DEFAULT
|
||||
#define DFL_PER PER_LINUX32_3GB
|
||||
#else
|
||||
#define DFL_PER PER_LINUX32
|
||||
#endif
|
||||
|
||||
#define ADDR_LIMIT_3GB 0x8000000
|
||||
#define PER_LINUX32_3GB (0x0008 | ADDR_LIMIT_3GB)
|
||||
|
||||
int main(int ac, char **av)
|
||||
{
|
||||
int pers = DFL_PER;
|
||||
if (!av[1]) {
|
||||
fprintf(stderr, "usage: %s [--3gb] [--4gb] program args ...\n", av[0]);
|
||||
#if DFL_PER == PER_LINUX32_3GB
|
||||
fprintf(stderr, "Default is --3gb to limit the address space of the 32bit children to 3GB\n");
|
||||
#endif
|
||||
exit(1);
|
||||
}
|
||||
if (!strcmp(av[0],"linux64")) pers= PER_LINUX;
|
||||
else if (!strcmp(av[0],"linux32")) pers = DFL_PER;
|
||||
|
||||
if (!strcmp(av[1], "--3gb")) {
|
||||
pers = PER_LINUX32_3GB;
|
||||
av++;
|
||||
}
|
||||
if (!strcmp(av[1], "--4gb")) {
|
||||
pers = PER_LINUX32;
|
||||
av++;
|
||||
}
|
||||
|
||||
if (personality(pers) < 0) {
|
||||
fprintf(stderr, "Cannot set %x personality: %s\n", pers,
|
||||
strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
execvp(av[1],av+1);
|
||||
fprintf(stderr, "Cannot execute %s: %s\n", av[1], strerror(errno));
|
||||
exit(1);
|
||||
}
|
55
linux32.changes
Normal file
55
linux32.changes
Normal file
@ -0,0 +1,55 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 1 11:19:34 CET 2006 - sf@suse.de
|
||||
|
||||
- added -32bit to name and generics name in .desktop file (#52279)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 25 21:45:03 CET 2006 - mls@suse.de
|
||||
|
||||
- converted neededforbuild to BuildRequires
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 23 11:07:18 CET 2004 - adrian@suse.de
|
||||
|
||||
- install icon file for desktop entry
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Aug 3 14:38:17 CEST 2003 - adrian@suse.de
|
||||
|
||||
- install the desktop file according to XDG instead of susewm
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 20 12:05:35 CEST 2003 - ak@suse.de
|
||||
|
||||
- add linux32.1 as Source
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 19 20:35:12 CEST 2003 - ak@suse.de
|
||||
|
||||
- eliminate README.linux32
|
||||
- use RPM_OPT_FLAGS
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 19 19:09:49 CEST 2003 - ak@suse.de
|
||||
|
||||
- fix neededforbuild
|
||||
- make --3gb the default
|
||||
- add manpage
|
||||
- use hardlink for linux64
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 5 23:25:19 CEST 2003 - ak@suse.de
|
||||
|
||||
- add --3gb support (needs kernel patch)
|
||||
- fix error handling
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 20 13:31:07 CET 2003 - adrian@suse.de
|
||||
|
||||
- add menu entry for 32 bit shell in System/Terminals/
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 10 11:41:22 CEST 2002 - stepan@suse.de
|
||||
|
||||
- initial version
|
||||
|
63
linux32.desktop
Normal file
63
linux32.desktop
Normal file
@ -0,0 +1,63 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Type=Application
|
||||
Exec=konsole -e linux32 $SHELL
|
||||
Icon=konsole-linux32
|
||||
DocPath=konsole/index.html
|
||||
Terminal=0
|
||||
X-KDE-StartupNotify=true
|
||||
|
||||
Name=Linux 32-bit Konsole
|
||||
|
||||
GenericName=32-bit Terminal Program
|
||||
GenericName[af]=Terminaal Program
|
||||
GenericName[be]=Тэрмінал
|
||||
GenericName[bg]=Терминална програма
|
||||
GenericName[bs]=Terminalni program
|
||||
GenericName[ca]=Programa de terminal
|
||||
GenericName[cs]=Terminálový program
|
||||
GenericName[da]=Terminalprogram
|
||||
GenericName[de]=Terminal-Programm
|
||||
GenericName[el]=Πρόγραμμα τερματικού
|
||||
GenericName[eo]=Terminalimitaĵo
|
||||
GenericName[es]=Programa de terminal
|
||||
GenericName[et]=Terminali emulaator
|
||||
GenericName[eu]=Terminala Programa
|
||||
GenericName[fa]=برنامهی پایانه
|
||||
GenericName[fi]=Terminaaliohjelma
|
||||
GenericName[fr]=Terminal
|
||||
GenericName[he]=תוכנית מסוף
|
||||
GenericName[hr]=Terminal program
|
||||
GenericName[hu]=parancsértelmező
|
||||
GenericName[it]=Programma terminale
|
||||
GenericName[ja]=ターミナルプログラム
|
||||
GenericName[lt]=Terminalo programa
|
||||
GenericName[lv]=Termināla Programma
|
||||
GenericName[mt]=Programm ta' terminal
|
||||
GenericName[nb]=Terminalprogram
|
||||
GenericName[nl]=terminalprogramma
|
||||
GenericName[nn]=Terminalprogram
|
||||
GenericName[nso]=Lenaneo la Terminal
|
||||
GenericName[pl]=Program terminala
|
||||
GenericName[pt]=Programa de Terminal
|
||||
GenericName[pt_BR]=Terminal
|
||||
GenericName[ro]=Program terminal
|
||||
GenericName[ru]=Терминал
|
||||
GenericName[sk]=Terminál
|
||||
GenericName[sl]=Terminalski program
|
||||
GenericName[ss]=Luhlelo lwesikhungo
|
||||
GenericName[sv]=Terminalprogram
|
||||
GenericName[ta]=Өɠ¿¢Ãø
|
||||
GenericName[th]=แอพพลิเคชันเทอร์มินอล
|
||||
GenericName[tr]=Terminal Programı
|
||||
GenericName[uk]=Програма терміналу
|
||||
GenericName[ven]=Mbekanyamushumo ya Mafhedziselo
|
||||
GenericName[vi]=Trình đầu cuối
|
||||
GenericName[xh]=Inkqubo Yesixhobo sangaphandle sekhompyutha
|
||||
GenericName[zh_CN]=终端程序
|
||||
GenericName[zh_TW]=終端機程式
|
||||
GenericName[zu]=Uhlelo lwemisebenzi lwangaohandle
|
||||
X-DCOP-ServiceType=Multi
|
||||
X-KDE-AuthorizeAction=shell_access
|
||||
|
||||
|
94
linux32.spec
Normal file
94
linux32.spec
Normal file
@ -0,0 +1,94 @@
|
||||
#
|
||||
# spec file for package linux32 (Version 1.0)
|
||||
#
|
||||
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: linux32
|
||||
BuildRequires: update-desktop-files
|
||||
URL: ftp://ftp.x86-64.org/pub/linux/tools/linux32/
|
||||
License: GPL
|
||||
Group: System/Kernel
|
||||
Summary: 32-Bit Emulation Utility for x86-64
|
||||
Version: 1.0
|
||||
Release: 347
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
#Recommends: kdebase3
|
||||
Source0: linux32.c
|
||||
Source1: linux32.1
|
||||
Source2: %name.desktop
|
||||
Source3: konsole-linux32.png
|
||||
|
||||
%description
|
||||
This is a small tool for 32-bit emulation in Linux/x86-64. It allows
|
||||
you to execute programs that need a uname -m of i386 with uname
|
||||
emulation. The uname -m is inherited by all child programs, but does
|
||||
not affect the current shell or processes above it in the process
|
||||
hierarchy.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Andi Kleen <ak@suse.de>
|
||||
|
||||
%prep
|
||||
mkdir -p linux32
|
||||
cd linux32
|
||||
cp $RPM_SOURCE_DIR/linux32.c .
|
||||
cp $RPM_SOURCE_DIR/linux32.1 .
|
||||
|
||||
%build
|
||||
cd linux32
|
||||
gcc $RPM_OPT_FLAGS -o linux32 linux32.c
|
||||
|
||||
%install
|
||||
cd linux32
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/bin $RPM_BUILD_ROOT/usr/share/man/man1
|
||||
cp linux32 $RPM_BUILD_ROOT/usr/bin
|
||||
cp linux32.1 $RPM_BUILD_ROOT/usr/share/man/man1
|
||||
( cd $RPM_BUILD_ROOT/usr/share/man/man1 ; ln -s linux32.1.gz linux64.1.gz )
|
||||
cd $RPM_BUILD_ROOT/usr/bin
|
||||
ln linux32 linux64
|
||||
%suse_update_desktop_file -i %name TerminalEmulator
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
/usr/bin/linux32
|
||||
/usr/bin/linux64
|
||||
/usr/share/man/man1/linux32.1.gz
|
||||
/usr/share/man/man1/linux64.1.gz
|
||||
/usr/share/applications/*
|
||||
/usr/share/pixmaps/*
|
||||
|
||||
%changelog -n linux32
|
||||
* Wed Mar 01 2006 - sf@suse.de
|
||||
- added -32bit to name and generics name in .desktop file (#52279)
|
||||
* Wed Jan 25 2006 - mls@suse.de
|
||||
- converted neededforbuild to BuildRequires
|
||||
* Tue Nov 23 2004 - adrian@suse.de
|
||||
- install icon file for desktop entry
|
||||
* Sun Aug 03 2003 - adrian@suse.de
|
||||
- install the desktop file according to XDG instead of susewm
|
||||
* Fri Jun 20 2003 - ak@suse.de
|
||||
- add linux32.1 as Source
|
||||
* Thu Jun 19 2003 - ak@suse.de
|
||||
- eliminate README.linux32
|
||||
- use RPM_OPT_FLAGS
|
||||
* Thu Jun 19 2003 - ak@suse.de
|
||||
- fix neededforbuild
|
||||
- make --3gb the default
|
||||
- add manpage
|
||||
- use hardlink for linux64
|
||||
* Thu Jun 05 2003 - ak@suse.de
|
||||
- add --3gb support (needs kernel patch)
|
||||
- fix error handling
|
||||
* Thu Feb 20 2003 - adrian@suse.de
|
||||
- add menu entry for 32 bit shell in System/Terminals/
|
||||
* Fri May 10 2002 - stepan@suse.de
|
||||
- initial version
|
Loading…
Reference in New Issue
Block a user