summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman <saurik@saurik.com>2008-02-03 13:20:05 +0000
committerJay Freeman <saurik@saurik.com>2008-02-03 13:20:05 +0000
commitf648dabb05b3e53cc68ef896a08d39da19d8972c (patch)
tree57939c497bd79b94841329a8de69c4b7d257bade
parent0d6804844ad63c28476609d396162a4ea25ac6d2 (diff)
Fixed the install_name on libapt-pkg to make setuid installation software work.
git-svn-id: http://svn.telesphoreo.org/trunk@64 514c082c-b64e-11dc-b46d-3d985efe055d
-rw-r--r--data/apt/dylib.diff55
-rw-r--r--data/apt/port.diff55
2 files changed, 55 insertions, 55 deletions
diff --git a/data/apt/dylib.diff b/data/apt/dylib.diff
new file mode 100644
index 000000000..b9b87d3a7
--- /dev/null
+++ b/data/apt/dylib.diff
@@ -0,0 +1,55 @@
+diff -ru apt-0.6.46.4.1/buildlib/library.mak apt-0.6.46.4.1+iPhone/buildlib/library.mak
+--- apt-0.6.46.4.1/buildlib/library.mak 2006-12-04 14:37:35.000000000 +0000
++++ apt-0.6.46.4.1+iPhone/buildlib/library.mak 2008-01-30 17:05:02.000000000 +0000
+@@ -16,11 +16,11 @@
+ # See defaults.mak for information about LOCAL
+
+ # Some local definitions
+-LOCAL := lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR)
++LOCAL := lib$(LIBRARY)$(LIBEXT).dylib.$(MAJOR).$(MINOR)
+ $(LOCAL)-OBJS := $(addprefix $(OBJ)/,$(addsuffix .opic,$(notdir $(basename $(SOURCE)))))
+ $(LOCAL)-DEP := $(addprefix $(DEP)/,$(addsuffix .opic.d,$(notdir $(basename $(SOURCE)))))
+ $(LOCAL)-HEADERS := $(addprefix $(INCLUDE)/,$(HEADERS))
+-$(LOCAL)-SONAME := lib$(LIBRARY)$(LIBEXT).so.$(MAJOR)
++$(LOCAL)-SONAME := lib$(LIBRARY)$(LIBEXT).dylib.$(MAJOR)
+ $(LOCAL)-SLIBS := $(SLIBS)
+ $(LOCAL)-LIBRARY := $(LIBRARY)
+
+@@ -29,7 +29,7 @@
+
+ # Install the command hooks
+ headers: $($(LOCAL)-HEADERS)
+-library: $(LIB)/lib$(LIBRARY).so $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR)
++library: $(LIB)/lib$(LIBRARY).dylib $(LIB)/lib$(LIBRARY)$(LIBEXT).dylib.$(MAJOR)
+ clean: clean/$(LOCAL)
+ veryclean: veryclean/$(LOCAL)
+
+@@ -41,21 +41,21 @@
+ clean/$(LOCAL):
+ -rm -f $($(@F)-OBJS) $($(@F)-DEP)
+ veryclean/$(LOCAL): clean/$(LOCAL)
+- -rm -f $($(@F)-HEADERS) $(LIB)/lib$($(@F)-LIBRARY)*.so*
++ -rm -f $($(@F)-HEADERS) $(LIB)/lib$($(@F)-LIBRARY)*.dylib*
+
+ # Build rules for the two symlinks
+-.PHONY: $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR) $(LIB)/lib$(LIBRARY).so
+-$(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR): $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR)
++.PHONY: $(LIB)/lib$(LIBRARY)$(LIBEXT).dylib.$(MAJOR) $(LIB)/lib$(LIBRARY).dylib
++$(LIB)/lib$(LIBRARY)$(LIBEXT).dylib.$(MAJOR): $(LIB)/lib$(LIBRARY)$(LIBEXT).dylib.$(MAJOR).$(MINOR)
+ ln -sf $(<F) $@
+-$(LIB)/lib$(LIBRARY).so: $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR)
++$(LIB)/lib$(LIBRARY).dylib: $(LIB)/lib$(LIBRARY)$(LIBEXT).dylib.$(MAJOR).$(MINOR)
+ ln -sf $(<F) $@
+
+ # The binary build rule
+-$(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS)
+- -rm -f $(LIB)/lib$($(@F)-LIBRARY)*.so* 2> /dev/null
++$(LIB)/lib$(LIBRARY)$(LIBEXT).dylib.$(MAJOR).$(MINOR): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS)
++ -rm -f $(LIB)/lib$($(@F)-LIBRARY)*.dylib* 2> /dev/null
+ echo Building shared library $@
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) $(PICFLAGS) $(LFLAGS) $(LFLAGS_SO)\
+- -o $@ $(SONAME_MAGIC)$($(@F)-SONAME) -shared \
++ -o $@ -Wl,-dylib_install_name,$(patsubst $(LIB)/%,/usr/lib/%,$@) -dynamiclib \
+ $(filter %.opic,$^) \
+ $($(@F)-SLIBS)
+
diff --git a/data/apt/port.diff b/data/apt/port.diff
index 28e69180d..46584b41a 100644
--- a/data/apt/port.diff
+++ b/data/apt/port.diff
@@ -85,61 +85,6 @@ diff -r -u apt-0.6.46.4/apt-pkg/makefile apt-0.6.46.4.1+iPhone/apt-pkg/makefile
MAJOR=3.11
MINOR=0
SLIBS=$(PTHREADLIB) $(INTLLIBS)
-diff -r -u apt-0.6.46.4/buildlib/library.mak apt-0.6.46.4.1+iPhone/buildlib/library.mak
---- apt-0.6.46.4/buildlib/library.mak 2006-12-04 14:37:35.000000000 +0000
-+++ apt-0.6.46.4.1+iPhone/buildlib/library.mak 2007-12-25 05:46:57.000000000 +0000
-@@ -16,11 +16,11 @@
- # See defaults.mak for information about LOCAL
-
- # Some local definitions
--LOCAL := lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR)
-+LOCAL := lib$(LIBRARY)$(LIBEXT).dylib.$(MAJOR).$(MINOR)
- $(LOCAL)-OBJS := $(addprefix $(OBJ)/,$(addsuffix .opic,$(notdir $(basename $(SOURCE)))))
- $(LOCAL)-DEP := $(addprefix $(DEP)/,$(addsuffix .opic.d,$(notdir $(basename $(SOURCE)))))
- $(LOCAL)-HEADERS := $(addprefix $(INCLUDE)/,$(HEADERS))
--$(LOCAL)-SONAME := lib$(LIBRARY)$(LIBEXT).so.$(MAJOR)
-+$(LOCAL)-SONAME := lib$(LIBRARY)$(LIBEXT).dylib.$(MAJOR)
- $(LOCAL)-SLIBS := $(SLIBS)
- $(LOCAL)-LIBRARY := $(LIBRARY)
-
-@@ -29,7 +29,7 @@
-
- # Install the command hooks
- headers: $($(LOCAL)-HEADERS)
--library: $(LIB)/lib$(LIBRARY).so $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR)
-+library: $(LIB)/lib$(LIBRARY).dylib $(LIB)/lib$(LIBRARY)$(LIBEXT).dylib.$(MAJOR)
- clean: clean/$(LOCAL)
- veryclean: veryclean/$(LOCAL)
-
-@@ -41,21 +41,21 @@
- clean/$(LOCAL):
- -rm -f $($(@F)-OBJS) $($(@F)-DEP)
- veryclean/$(LOCAL): clean/$(LOCAL)
-- -rm -f $($(@F)-HEADERS) $(LIB)/lib$($(@F)-LIBRARY)*.so*
-+ -rm -f $($(@F)-HEADERS) $(LIB)/lib$($(@F)-LIBRARY)*.dylib*
-
- # Build rules for the two symlinks
--.PHONY: $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR) $(LIB)/lib$(LIBRARY).so
--$(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR): $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR)
-+.PHONY: $(LIB)/lib$(LIBRARY)$(LIBEXT).dylib.$(MAJOR) $(LIB)/lib$(LIBRARY).dylib
-+$(LIB)/lib$(LIBRARY)$(LIBEXT).dylib.$(MAJOR): $(LIB)/lib$(LIBRARY)$(LIBEXT).dylib.$(MAJOR).$(MINOR)
- ln -sf $(<F) $@
--$(LIB)/lib$(LIBRARY).so: $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR)
-+$(LIB)/lib$(LIBRARY).dylib: $(LIB)/lib$(LIBRARY)$(LIBEXT).dylib.$(MAJOR).$(MINOR)
- ln -sf $(<F) $@
-
- # The binary build rule
--$(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS)
-- -rm -f $(LIB)/lib$($(@F)-LIBRARY)*.so* 2> /dev/null
-+$(LIB)/lib$(LIBRARY)$(LIBEXT).dylib.$(MAJOR).$(MINOR): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS)
-+ -rm -f $(LIB)/lib$($(@F)-LIBRARY)*.dylib* 2> /dev/null
- echo Building shared library $@
- $(CXX) $(CXXFLAGS) $(LDFLAGS) $(PICFLAGS) $(LFLAGS) $(LFLAGS_SO)\
-- -o $@ $(SONAME_MAGIC)$($(@F)-SONAME) -shared \
-+ -o $@ -dynamiclib \
- $(filter %.opic,$^) \
- $($(@F)-SLIBS)
-
diff -r -u apt-0.6.46.4/buildlib/podomain.mak apt-0.6.46.4.1+iPhone/buildlib/podomain.mak
--- apt-0.6.46.4/buildlib/podomain.mak 2006-12-04 14:37:35.000000000 +0000
+++ apt-0.6.46.4.1+iPhone/buildlib/podomain.mak 2007-12-25 06:41:16.000000000 +0000