Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 24576 Details for
Bug 32963
Portage needs a 64-bit and 32-bit libsandbox.so
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
working libsandbox 32/64 patch
sandbox-amd64.patch (text/plain), 4.05 KB, created by
Brad House
on 2004-01-28 21:27:18 UTC
(
hide
)
Description:
working libsandbox 32/64 patch
Filename:
MIME Type:
Creator:
Brad House
Created:
2004-01-28 21:27:18 UTC
Size:
4.05 KB
patch
obsolete
>diff -ruN portage-2.0.50_pre20/src/sandbox-1.1/Makefile portage-2.0.50_pre20-sandbox/src/sandbox-1.1/Makefile >--- portage-2.0.50_pre20/src/sandbox-1.1/Makefile 2003-07-27 08:31:06.000000000 -0400 >+++ portage-2.0.50_pre20-sandbox/src/sandbox-1.1/Makefile 2004-01-29 00:10:12.533136168 -0500 >@@ -15,29 +15,47 @@ > CC = gcc > LD = ld > CFLAGS = >-OBJ_DEFINES = -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT >+ARCH_CFLAGS = >+OBJ_CFLAGS = -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT > LIBS = > LDFLAGS = > DESTDIR = > >-TARGETS = libsandbox.so sandbox >+HAVE_64BIT_ARCH = >+ >+ifneq ($(HAVE_64BIT_ARCH),) >+ TARGETS = libsandbox.so libsandbox32.so sandbox >+ ARCH_CFLAGS += -m64 >+ OBJ_CFLAGS += -DSB_HAVE_64BIT_ARCH >+else >+ TARGETS = libsandbox.so sandbox >+endif > > all: $(TARGETS) > > sandbox: sandbox.o sandbox_futils.o getcwd.c >- $(CC) $^ -ldl -lc -o $@ >+ $(CC) $(CFLAGS) $(ARCH_CFLAGS) $(OBJ_CFLAGS) -Wall $^ -ldl -lc -o $@ > > sandbox.o: sandbox.c sandbox.h >- $(CC) $(CFLAGS) -Wall -c sandbox.c >+ $(CC) $(CFLAGS) $(ARCH_CFLAGS) $(OBJ_CFLAGS) -Wall -c sandbox.c -o $@ > > sandbox_futils.o: sandbox_futils.c sandbox.h >- $(CC) $(CFLAGS) -Wall -c $(OBJ_DEFINES) sandbox_futils.c >+ $(CC) $(CFLAGS) $(ARCH_CFLAGS) $(OBJ_CFLAGS) -Wall -c sandbox_futils.c -o $@ > > libsandbox.so: libsandbox.o sandbox_futils.o >- $(CC) $^ -shared -fPIC -ldl -lc -o $@ -nostdlib -lgcc >+ $(CC) $^ -shared $(ARCH_CFLAGS) -fPIC -ldl -lc -nostdlib -lgcc -o $@ > > libsandbox.o: libsandbox.c localdecls.h canonicalize.c getcwd.c >- $(CC) $(CFLAGS) -Wall -c $(OBJ_DEFINES) libsandbox.c >+ $(CC) $(CFLAGS) $(ARCH_CFLAGS) $(OBJ_CFLAGS) -Wall -c libsandbox.c >+ >+sandbox_futils32.o: sandbox_futils.c sandbox.h >+ $(CC) $(CFLAGS) -m32 $(OBJ_CFLAGS) -Wall -c sandbox_futils.c -o $@ >+ >+libsandbox32.so: libsandbox32.o sandbox_futils32.o >+ $(CC) $^ -shared -m32 -fPIC -ldl -lc -nostdlib -lgcc -o $@ >+ >+libsandbox32.o: libsandbox.c localdecls.h canonicalize.c getcwd.c >+ $(CC) $(CFLAGS) -m32 $(OBJ_CFLAGS) -Wall -c libsandbox.c -o $@ > > localdecls.h: create-localdecls libctest.c > ./create-localdecls >@@ -45,9 +63,11 @@ > > install: all > install -d -m 0755 $(DESTDIR)/lib >+ $(if $(HAVE_64BIT_ARCH),install -d -m 0755 $(DESTDIR)/lib32) > install -d -m 0755 $(DESTDIR)/usr/lib/portage/bin > install -d -m 0755 $(DESTDIR)/usr/lib/portage/lib > install -m 0755 libsandbox.so $(DESTDIR)/lib >+ $(if $(HAVE_64BIT_ARCH),install -m 0755 libsandbox32.so $(DESTDIR)/lib32/libsandbox.so) > install -m 0755 sandbox $(DESTDIR)/usr/lib/portage/bin > install -m 0644 sandbox.bashrc $(DESTDIR)/usr/lib/portage/lib > >diff -ruN portage-2.0.50_pre20/src/sandbox-1.1/sandbox.c portage-2.0.50_pre20-sandbox/src/sandbox-1.1/sandbox.c >--- portage-2.0.50_pre20/src/sandbox-1.1/sandbox.c 2004-01-12 16:11:46.000000000 -0500 >+++ portage-2.0.50_pre20-sandbox/src/sandbox-1.1/sandbox.c 2004-01-29 00:17:45.395290656 -0500 >@@ -14,7 +14,7 @@ > ** $Header: /home/cvsroot/gentoo-src/portage/src/sandbox-1.1/sandbox.c,v 1.13 2004/01/12 21:11:46 carpaski Exp $ > */ > >-#define _GNU_SOURCE >+/* #define _GNU_SOURCE */ > > #include <errno.h> > #include <fcntl.h> >@@ -585,11 +585,14 @@ > if (print_debug) > printf("Verification of the required files.\n"); > >+#ifndef SB_HAVE_64BIT_ARCH > if (file_exist(sandbox_lib, 0) <= 0) { > fprintf(stderr, "Could not open the sandbox library at '%s'.\n", > sandbox_lib); > return -1; >- } else if (file_exist(sandbox_rc, 0) <= 0) { >+ } >+#endif >+ if (file_exist(sandbox_rc, 0) <= 0) { > fprintf(stderr, "Could not open the sandbox rc file at '%s'.\n", > sandbox_rc); > return -1; >diff -ruN portage-2.0.50_pre20/src/sandbox-1.1/sandbox_futils.c portage-2.0.50_pre20-sandbox/src/sandbox-1.1/sandbox_futils.c >--- portage-2.0.50_pre20/src/sandbox-1.1/sandbox_futils.c 2004-01-23 16:19:30.000000000 -0500 >+++ portage-2.0.50_pre20-sandbox/src/sandbox-1.1/sandbox_futils.c 2004-01-29 00:10:13.056056672 -0500 >@@ -57,10 +57,14 @@ > { > char path[255]; > >+#ifdef SB_HAVE_64BIT_ARCH >+ snprintf(path, 254, "%s", LIB_NAME); >+#else > snprintf(path, 254, "/lib/%s", LIB_NAME); > if (file_exist(path, 0) <= 0) { > snprintf(path, 254, "%s%s", sb_path, LIB_NAME); > } >+#endif > return (strdup(path)); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 32963
:
20394
|
20395
|
20396
|
20480
|
20620
|
20621
|
20625
|
20646
|
22217
| 24576 |
24577
|
31753
|
31881