--- config.orig/Make.common.rules 2013-05-20 22:21:58.666286011 +0000 +++ config/Make.common.rules 2013-05-20 22:20:50.897196090 +0000 @@ -19,7 +19,7 @@ SHORT_VERSION = 3.4 SOVERSION = 34 -INSTALL = cp -fp +INSTALL = %%INSTALL_PROGRAM%% INSTALL_PROGRAM = ${INSTALL} INSTALL_LIBRARY = ${INSTALL} INSTALL_DATA = ${INSTALL} @@ -386,11 +386,15 @@ then \ echo "Creating $(DESTDIR)$(install_slicedir)..." ; \ $(call mkdir, $(DESTDIR)$(install_slicedir), -p) ; \ + fi + + @if test -d $(DESTDIR)$(install_slicedir) ; \ + then \ cd $(top_srcdir)/../slice ; \ for subdir in * ; \ do \ echo "Copying slice/$$subdir to $(DESTDIR)$(install_slicedir)..." ; \ cp -fpr $$subdir $(DESTDIR)$(install_slicedir) ; \ done ; \ - fi + fi @@ -410,12 +410,12 @@ fi - @if test ! -f $(DESTDIR)$(prefix)/CHANGES$(TEXT_EXTENSION) ; \ + @if test ! -f $(DESTDIR)$(install_slicedir)/CHANGES$(TEXT_EXTENSION) ; \ then \ - $(call installdata,$(top_srcdir)/../CHANGES$(TEXT_EXTENSION),$(DESTDIR)$(prefix)) ; \ + $(call installdata,$(top_srcdir)/../CHANGES$(TEXT_EXTENSION),$(DESTDIR)$(install_slicedir)) ; \ fi - @if test ! -f $(DESTDIR)$(prefix)/RELEASE_NOTES$(TEXT_EXTENSION) ; \ + @if test ! -f $(DESTDIR)$(install_slicedir)/RELEASE_NOTES$(TEXT_EXTENSION) ; \ then \ - $(call installdata,$(top_srcdir)/../RELEASE_NOTES$(TEXT_EXTENSION),$(DESTDIR)$(prefix)) ; \ + $(call installdata,$(top_srcdir)/../RELEASE_NOTES$(TEXT_EXTENSION),$(DESTDIR)$(install_slicedir)) ; \ fi --- cpp.orig/Makefile 2013-03-11 15:19:46.000000000 +0000 +++ cpp/Makefile 2013-05-19 22:06:57.713280491 +0000 @@ -11,11 +11,22 @@ include $(top_srcdir)/config/Make.rules -SUBDIRS = config src include test +SUBDIRS = config src include + +ifeq ($(NOTESTS),) +SUBDIRS := $(SUBDIRS) test +endif ifeq ($(shell uname | grep MINGW),) +ifeq ($(NODEMOS),) SUBDIRS := $(SUBDIRS) demo endif +endif + +ifeq ($(NOICEDOCS),) +SUBDIRS := $(SUBDIRS) doc +endif + INSTALL_SUBDIRS = $(install_bindir) $(install_libdir) $(install_includedir) $(install_configdir) --- cpp.orig/allTests.py 2013-03-11 15:19:58.000000000 +0000 +++ cpp/allTests.py 2013-05-19 22:25:00.000000000 +0000 @@ -62,7 +63,7 @@ ("Ice/servantLocator", ["core"]), ("Ice/interceptor", ["core"]), ("Ice/stringConverter", ["core"]), - ("Ice/udp", ["core"]), + ("Ice/udp", ["core", "nofreebsdjail"]), ("Ice/defaultServant", ["core"]), ("Ice/defaultValue", ["core"]), ("Ice/invoke", ["core", "novc6"]), @@ -85,7 +85,7 @@ ("IceStorm/federation2", ["service", "novc90", "nomingw"]), ("IceStorm/stress", ["service", "stress", "novc90", "noappverifier", "nomingw"]), # Too slow with appverifier. ("IceStorm/rep1", ["service", "novc90", "nomingw"]), - ("IceStorm/repgrid", ["service", "novc90", "nomingw"]), + ("IceStorm/repgrid", ["service", "novc90", "nomingw", "nofreebsd"]), ("IceStorm/repstress", ["service", "noipv6", "stress", "novc90", "nomingw"]), ("FreezeScript/dbmap", ["once", "novc90", "nomingw"]), ("FreezeScript/evictor", ["once", "novc90", "nomingw"]), @@ -106,8 +107,8 @@ # if TestUtil.isWin32() or os.getuid() == 0: tests += [ - ("IceUtil/priority", ["core", "nodarwin"]), - ("Ice/threadPoolPriority", ["core", "nodarwin", "nomx"]) + ("IceUtil/priority", ["core", "nodarwin", "nofreebsd"]), + ("Ice/threadPoolPriority", ["core", "nodarwin", "nofreebsd", "nomx"]) ] if __name__ == "__main__": --- cpp.orig/config/Make.rules Fri Mar 11 16:19:00 2013 +++ cpp/config/Make.rules Fri May 19 22:00:09 2013 @@ -233,7 +233,9 @@ DB_FLAGS = -I/usr/local/include/db53 DB_LIBS = -L/usr/local/$(libsubdir)/db53 -ldb_cxx else - DB_LIBS = -ldb_cxx + DB_FLAGS = -I%%BDB_INCLUDE_DIR%% + DB_LIBS = -L%%BDB_LIB_DIR%% -l%%BDB_LIB_CXX_NAME%% + DB_RPATH_LINK = $(call rpathlink,%%BDB_LIB_DIR%%) endif endif endif --- cpp.orig/src/Ice/.depend 2013-05-21 00:29:56.146194325 +0000 +++ cpp/src/Ice/.depend 2013-05-21 00:42:56.956197313 +0000 @@ -1,5 +1,5 @@ -Acceptor$(OBJEXT): Acceptor.cpp ../Ice/Acceptor.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h ../Ice/AcceptorF.h $(includedir)/Ice/Handle.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Ice/Config.h ../Ice/TransceiverF.h ../Ice/Network.h $(includedir)/Ice/PropertiesF.h $(includedir)/Ice/ProxyF.h $(includedir)/Ice/ProxyHandle.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/Exception.h $(includedir)/Ice/Format.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/LocalObject.h $(includedir)/Ice/LocalObjectF.h $(includedir)/Ice/StreamHelpers.h $(includedir)/IceUtil/ScopedArray.h $(includedir)/IceUtil/Iterator.h $(includedir)/IceUtil/Optional.h $(includedir)/Ice/UndefSysMacros.h $(includedir)/Ice/LoggerF.h $(includedir)/Ice/Protocol.h $(includedir)/Ice/Version.h $(includedir)/Ice/EndpointTypes.h +Acceptor$(OBJEXT): Acceptor.cpp ../Ice/Acceptor.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h ../Ice/AcceptorF.h $(includedir)/Ice/Handle.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Ice/Config.h ../Ice/TransceiverF.h ../Ice/Network.h $(includedir)/Ice/CommunicatorF.h $(includedir)/Ice/ConnectionF.h $(includedir)/Ice/ObjectFactoryF.h $(includedir)/Ice/EndpointF.h $(includedir)/Ice/ObjectAdapterF.h $(includedir)/Ice/PropertiesF.h $(includedir)/Ice/ProxyF.h $(includedir)/Ice/ProxyHandle.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/Exception.h $(includedir)/Ice/Format.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/LocalObject.h $(includedir)/Ice/LocalObjectF.h $(includedir)/Ice/StreamHelpers.h $(includedir)/IceUtil/ScopedArray.h $(includedir)/IceUtil/Iterator.h $(includedir)/IceUtil/Optional.h $(includedir)/Ice/UndefSysMacros.h $(includedir)/Ice/LoggerF.h $(includedir)/Ice/Protocol.h $(includedir)/Ice/Version.h $(includedir)/Ice/EndpointTypes.h Application$(OBJEXT): Application.cpp $(includedir)/Ice/Application.h $(includedir)/Ice/Ice.h $(includedir)/IceUtil/Config.h $(includedir)/Ice/Initialize.h $(includedir)/Ice/CommunicatorF.h $(includedir)/Ice/ProxyF.h $(includedir)/IceUtil/Shared.h $(includedir)/Ice/Config.h $(includedir)/Ice/ProxyHandle.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/Handle.h $(includedir)/Ice/Exception.h $(includedir)/Ice/Format.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/LocalObject.h $(includedir)/Ice/LocalObjectF.h $(includedir)/Ice/StreamHelpers.h $(includedir)/IceUtil/ScopedArray.h $(includedir)/IceUtil/Iterator.h $(includedir)/IceUtil/Optional.h $(includedir)/Ice/UndefSysMacros.h $(includedir)/Ice/PropertiesF.h $(includedir)/Ice/InstanceF.h $(includedir)/Ice/LoggerF.h $(includedir)/Ice/StatsF.h $(includedir)/Ice/InstrumentationF.h $(includedir)/Ice/Dispatcher.h $(includedir)/Ice/ConnectionF.h $(includedir)/Ice/StringConverter.h $(includedir)/Ice/Plugin.h $(includedir)/Ice/BuiltinSequences.h $(includedir)/IceUtil/Unicode.h $(includedir)/Ice/FactoryTable.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/Ice/UserExceptionFactory.h $(includedir)/Ice/ObjectFactoryF.h $(includedir)/Ice/Version.h $(includedir)/Ice/LocalException.h $(includedir)/Ice/Identity.h $(includedir)/Ice/Properties.h $(includedir)/Ice/Proxy.h $(includedir)/Ice/ProxyFactoryF.h $(includedir)/Ice/ConnectionIF.h $(includedir)/Ice/RequestHandlerF.h $(includedir)/Ice/EndpointIF.h $(includedir)/Ice/EndpointF.h $(includedir)/Ice/EndpointTypes.h $(includedir)/Ice/ObjectAdapterF.h $(includedir)/Ice/ReferenceF.h $(includedir)/Ice/OutgoingAsync.h $(includedir)/IceUtil/Monitor.h $(includedir)/IceUtil/Cond.h $(includedir)/IceUtil/Timer.h $(includedir)/IceUtil/Thread.h $(includedir)/IceUtil/UniquePtr.h $(includedir)/Ice/OutgoingAsyncF.h $(includedir)/Ice/Current.h $(includedir)/Ice/BasicStream.h $(includedir)/Ice/Object.h $(includedir)/Ice/GCShared.h $(includedir)/Ice/GCCountMap.h $(includedir)/Ice/IncomingAsyncF.h $(includedir)/Ice/ObjectFactoryManagerF.h $(includedir)/Ice/Buffer.h $(includedir)/Ice/Protocol.h $(includedir)/Ice/SlicedDataF.h $(includedir)/Ice/ObserverHelper.h $(includedir)/Ice/Instrumentation.h $(includedir)/Ice/Outgoing.h $(includedir)/Ice/Incoming.h $(includedir)/Ice/ServantLocatorF.h $(includedir)/Ice/ServantManagerF.h $(includedir)/Ice/IncomingAsync.h $(includedir)/Ice/Direct.h $(includedir)/Ice/Logger.h $(includedir)/Ice/LoggerUtil.h $(includedir)/Ice/Stats.h $(includedir)/Ice/Communicator.h $(includedir)/Ice/RouterF.h $(includedir)/Ice/LocatorF.h $(includedir)/Ice/PluginF.h $(includedir)/Ice/ImplicitContextF.h $(includedir)/Ice/CommunicatorAsync.h $(includedir)/Ice/ObjectFactory.h $(includedir)/Ice/ObjectAdapter.h $(includedir)/Ice/FacetMap.h $(includedir)/Ice/Endpoint.h $(includedir)/Ice/ServantLocator.h $(includedir)/Ice/SlicedData.h $(includedir)/Ice/Process.h $(includedir)/Ice/Connection.h $(includedir)/Ice/ConnectionAsync.h $(includedir)/Ice/Functional.h $(includedir)/IceUtil/Functional.h $(includedir)/Ice/Stream.h $(includedir)/Ice/ImplicitContext.h $(includedir)/Ice/Locator.h $(includedir)/Ice/FactoryTableInit.h $(includedir)/Ice/ProcessF.h $(includedir)/Ice/Router.h $(includedir)/Ice/DispatchInterceptor.h $(includedir)/Ice/PropertiesAdmin.h $(includedir)/Ice/Metrics.h $(includedir)/Ice/Service.h $(includedir)/Ice/IconvStringConverter.h ../Ice/LoggerI.h $(includedir)/IceUtil/FileUtil.h $(includedir)/IceUtil/CtrlCHandler.h $(includedir)/IceUtil/ArgVector.h ../Ice/GC.h Base64$(OBJEXT): Base64.cpp ../Ice/Base64.h $(includedir)/Ice/Config.h $(includedir)/IceUtil/Config.h Buffer$(OBJEXT): Buffer.cpp $(includedir)/Ice/Buffer.h $(includedir)/Ice/Config.h $(includedir)/IceUtil/Config.h $(includedir)/Ice/LocalException.h $(includedir)/Ice/ProxyF.h $(includedir)/IceUtil/Shared.h $(includedir)/Ice/ProxyHandle.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/Handle.h $(includedir)/Ice/Exception.h $(includedir)/Ice/Format.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/LocalObject.h $(includedir)/Ice/LocalObjectF.h $(includedir)/Ice/StreamHelpers.h $(includedir)/IceUtil/ScopedArray.h $(includedir)/IceUtil/Iterator.h $(includedir)/IceUtil/Optional.h $(includedir)/Ice/Identity.h $(includedir)/Ice/UndefSysMacros.h $(includedir)/Ice/Version.h $(includedir)/Ice/BuiltinSequences.h --- cpp.orig/src/Ice/Network.cpp 2013-03-11 15:19:46.000000000 +0000 +++ cpp/src/Ice/Network.cpp 2013-05-19 22:55:40.257195813 +0000 @@ -936,7 +936,11 @@ WSASetLastError(error); #else int error = errno; - if(close(fd) == SOCKET_ERROR) + if(close(fd) == SOCKET_ERROR +# if defined(__FreeBSD__) + && getSocketErrno() != ECONNRESET +# endif + ) { SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); --- cpp.orig/src/Ice/ProxyFactory.cpp 2011-06-15 21:43:59.000000000 +0200 +++ cpp/src/Ice/ProxyFactory.cpp 2012-03-04 20:14:53.000000000 +0100 @@ -229,6 +229,7 @@ } else if(cnt > static_cast(_retryIntervals.size())) { + interval = 0; // apeace compiler if(traceLevels->retry >= 1) { Trace out(logger, traceLevels->retryCat); --- cpp.orig/src/slice2cpp/Gen.cpp 2013-03-11 15:19:46.000000000 +0000 +++ cpp/src/slice2cpp/Gen.cpp 2013-05-20 19:51:48.109197053 +0000 @@ -756,10 +756,11 @@ C << sp << nl << "class " << factoryName << "__Init"; C << sb; + C << nl << "IceInternal::FactoryTableInit* _ftableinit;"; C.dec(); C << nl << "public:"; C.inc(); - C << sp << nl << factoryName << "__Init()"; + C << sp << nl << factoryName << "__Init(): _ftableinit(new IceInternal::FactoryTableInit)"; C << sb; C << nl << "::IceInternal::factoryTable->addExceptionFactory(\"" << p->scoped() << "\", new " << factoryName << ");"; @@ -767,6 +768,7 @@ C << sp << nl << "~" << factoryName << "__Init()"; C << sb; C << nl << "::IceInternal::factoryTable->removeExceptionFactory(\"" << p->scoped() << "\");"; + C << nl << "delete _ftableinit;"; C << eb; C << eb << ';'; @@ -3976,10 +3978,11 @@ C << sp; C << nl << "class " << factoryName << "__Init"; C << sb; + C << nl << "IceInternal::FactoryTableInit* _ftableinit;"; C.dec(); C << nl << "public:"; C.inc(); - C << sp << nl << factoryName << "__Init()"; + C << sp << nl << factoryName << "__Init(): _ftableinit(new IceInternal::FactoryTableInit)"; C << sb; if(!p->isAbstract()) { @@ -4002,6 +4005,7 @@ { C << nl << "::IceInternal::factoryTable->removeTypeId(" << p->compactId() << ");"; } + C << nl << "delete _ftableinit;"; C << eb; C << eb << ';'; --- cpp.orig/test/Glacier2/ssl/Server.cpp 2011-06-15 21:43:59.000000000 +0200 +++ cpp/test/Glacier2/ssl/Server.cpp 2012-03-04 20:14:53.000000000 +0100 @@ -31,9 +31,15 @@ test(ctx["_con.type"] == "ssl"); test(ctx["_con.localPort"] == "12348"); } - test(ctx["_con.localAddress"] == "127.0.0.1"); + if (!inFreeBSDJail()) + { + test(ctx["_con.localAddress"] == "127.0.0.1"); + } test(ctx["_con.remotePort"] != ""); - test(ctx["_con.remoteAddress"] == "127.0.0.1"); + if (!inFreeBSDJail()) + { + test(ctx["_con.remoteAddress"] == "127.0.0.1"); + } } } @@ -133,8 +139,11 @@ { testContext(true, current.ctx); - test(info.remoteHost == "127.0.0.1"); - test(info.localHost == "127.0.0.1"); + if (!inFreeBSDJail()) + { + test(info.remoteHost == "127.0.0.1"); + test(info.localHost == "127.0.0.1"); + } test(info.localPort == 12348); try --- cpp.orig/test/Ice/info/AllTests.cpp 2011-06-15 21:43:59.000000000 +0200 +++ cpp/test/Ice/info/AllTests.cpp 2012-03-04 20:14:53.000000000 +0100 @@ -141,9 +141,11 @@ test(info->adapterName.empty()); test(info->localPort > 0); test(info->remotePort == 12010); - test(info->remoteAddress == defaultHost); - test(info->localAddress == defaultHost); - + if (!inFreeBSDJail()) + { + test(info->remoteAddress == defaultHost); + test(info->localAddress == defaultHost); + } ostringstream os; Ice::Context ctx = testIntf->getConnectionInfoAsContext(); @@ -163,8 +165,11 @@ test(info->adapterName.empty()); test(info->localPort > 0); test(info->remotePort == 12010); - test(info->remoteAddress ==defaultHost); - test(info->localAddress == defaultHost); + if (!inFreeBSDJail()) + { + test(info->remoteAddress == defaultHost); + test(info->localAddress == defaultHost); + } } cout << "ok" << endl; --- cpp.orig/test/Ice/metrics/AllTests.cpp 2013-03-11 15:19:47.000000000 +0000 +++ cpp/test/Ice/metrics/AllTests.cpp 2013-05-20 02:11:00.939194168 +0000 @@ -597,9 +597,12 @@ testAttribute(clientMetrics, clientProps, update, "Connection", "incoming", "false"); testAttribute(clientMetrics, clientProps, update, "Connection", "adapterName", ""); testAttribute(clientMetrics, clientProps, update, "Connection", "connectionId", "Con1"); - testAttribute(clientMetrics, clientProps, update, "Connection", "localHost", "127.0.0.1"); + if (!inFreeBSDJail()) + { + testAttribute(clientMetrics, clientProps, update, "Connection", "localHost", "127.0.0.1"); + testAttribute(clientMetrics, clientProps, update, "Connection", "remoteHost", "127.0.0.1"); + } //testAttribute(clientMetrics, clientProps, update, "Connection", "localPort", ""); - testAttribute(clientMetrics, clientProps, update, "Connection", "remoteHost", "127.0.0.1"); testAttribute(clientMetrics, clientProps, update, "Connection", "remotePort", "12010"); testAttribute(clientMetrics, clientProps, update, "Connection", "mcastHost", ""); testAttribute(clientMetrics, clientProps, update, "Connection", "mcastPort", ""); @@ -814,9 +817,12 @@ testAttribute(serverMetrics, serverProps, update, "Dispatch", "incoming", "true", op); testAttribute(serverMetrics, serverProps, update, "Dispatch", "adapterName", "TestAdapter", op); testAttribute(serverMetrics, serverProps, update, "Dispatch", "connectionId", "", op); - testAttribute(serverMetrics, serverProps, update, "Dispatch", "localHost", "127.0.0.1", op); + if (!inFreeBSDJail()) + { + testAttribute(serverMetrics, serverProps, update, "Dispatch", "localHost", "127.0.0.1", op); + testAttribute(serverMetrics, serverProps, update, "Dispatch", "remoteHost", "127.0.0.1", op); + } testAttribute(serverMetrics, serverProps, update, "Dispatch", "localPort", "12010", op); - testAttribute(serverMetrics, serverProps, update, "Dispatch", "remoteHost", "127.0.0.1", op); //testAttribute(serverMetrics, serverProps, update, "Dispatch", "remotePort", "12010", op); testAttribute(serverMetrics, serverProps, update, "Dispatch", "mcastHost", "", op); testAttribute(serverMetrics, serverProps, update, "Dispatch", "mcastPort", "", op); --- cpp.orig/test/include/TestCommon.h 2011-06-15 21:43:59.000000000 +0200 +++ cpp/test/include/TestCommon.h 2012-03-04 20:14:53.000000000 +0100 @@ -17,6 +17,22 @@ #include #endif +#if defined(__FreeBSD__) +# include +# include +inline bool inFreeBSDJail() +{ + int jailed; + size_t size = sizeof(jailed); + return (sysctlbyname("security.jail.jailed", &jailed, &size, NULL, 0) != -1 || jailed); +} +#else +inline bool inFreeBSDJail() +{ + return false; +} +#endif + void inline testFailed(const char* expr, const char* file, unsigned int line) { --- php/Makefile.orig 2013-10-04 15:48:15.000000000 +0000 +++ php/Makefile 2013-12-01 21:19:31.863489109 +0000 @@ -14,7 +14,7 @@ SUBDIRS = src lib demo test INSTALL_SUBDIRS = $(install_phpdir) $(install_libdir) -install:: install-common +install:: @for subdir in $(INSTALL_SUBDIRS); \ do \ if test ! -d $(DESTDIR)$$subdir ; \ --- php/config/Make.rules.php.orig 2013-03-11 15:19:47.000000000 +0000 +++ php/config/Make.rules.php 2013-06-02 14:36:13.744196194 +0000 @@ -100,8 +100,8 @@ endif libdir = $(top_srcdir)/lib ifneq ($(prefix), /usr) -install_phpdir = $(prefix)/php -install_libdir = $(prefix)/php +install_phpdir = $(prefix)/share/pear +install_libdir = $(prefix)/lib/php/$(PHP_EXT_DIR) else @@ -155,7 +155,8 @@ endif ifeq ($(installphplib),) - installphplib = $(INSTALL) $(1) $(2); \ + installphplib = mkdir -p $(2) ; \ + $(INSTALL) $(1) $(2); \ chmod a+rx $(2)/$(notdir $(1)) endif --- php/lib/Makefile.orig 2013-06-02 12:11:06.451195440 +0000 +++ php/lib/Makefile 2013-06-02 12:16:29.249191742 +0000 @@ -167,7 +167,8 @@ @echo "Installing generated code" @for i in $(MODULES) ; \ do \ - $(INSTALL_DATA) -r $$i $(DESTDIR)$(install_phpdir) ; \ + mkdir -p $(DESTDIR)$(install_phpdir)/$$i ; \ + $(INSTALL_DATA) $$i/*.php $(DESTDIR)$(install_phpdir)/$$i ; \ done @for i in $(MODULE_SRCS) ; \ do \ --- py/Makefile.orig 2013-10-04 15:48:15.000000000 +0000 +++ py/Makefile 2013-12-01 16:37:09.381657035 +0000 @@ -15,7 +15,7 @@ INSTALL_SUBDIRS = $(install_pythondir) $(install_libdir) -install:: install-common +install:: @for subdir in $(INSTALL_SUBDIRS); \ do \ if test ! -d $(DESTDIR)$$subdir ; \ --- py/config/Make.rules.orig 2013-03-11 15:19:47.000000000 +0000 +++ py/config/Make.rules 2013-05-20 14:21:13.335195726 +0000 @@ -12,7 +12,8 @@ # if it does not exist. # -prefix ?= /opt/Ice-$(VERSION) +ICE_HOME = %%LOCALBASE%% +prefix ?= %%PREFIX%% # # The "root directory" for runpath embedded in executables. Can be unset @@ -96,8 +97,8 @@ libdir = $(top_srcdir)/python ifneq ($(prefix), /usr) -install_pythondir = $(prefix)/python -install_libdir = $(prefix)/python +install_pythondir = %%PYTHON_SITELIBDIR%%/Ice +install_libdir = %%PYTHON_SITELIBDIR%%/Ice else ifeq ($(shell test -d $(prefix)/$(libsubdir)/$(PYTHON_VERSION)/dist-packages && echo 0),0) install_pythondir = $(prefix)/$(libsubdir)/$(PYTHON_VERSION)/dist-packages @@ -128,7 +129,7 @@ ICE_LIB_DIR = -L$(ice_dir)/$(libsubdir) ICE_FLAGS = -I$(ice_dir)/include endif -ICE_LIBS = $(ICE_LIB_DIR) -lIce -lSlice -lIceUtil +ICE_LIBS = $(ICE_LIB_DIR) -lIce -lSlice -lIceUtil %%ICONV_LIB%% ifneq ($(embedded_runpath_prefix),) runpath_libdir := $(embedded_runpath_prefix)/$(libsubdir) @@ -167,7 +167,7 @@ all:: $(SRCS) -%_ice.py: $(slicedir)/%.ice +%_ice.py: $(ICE_HOME)/%.ice rm -f $(*F).py $(SLICE2PY) $(SLICE2PYFLAGS) $< --- py/python/Makefile.orig 2010-07-11 13:05:38.000000000 +1000 +++ py/python/Makefile 2012-09-11 00:09:09.000000000 +2000 @@ -118,10 +118,11 @@ install:: $(ALL_SRCS) @echo "Installing generated code" - $(INSTALL_DATA) *.py $(DESTDIR)$(install_pythondir) + $(INSTALL_DATA) *.py* $(DESTDIR)$(install_pythondir) @for i in $(PACKAGES) ; \ do \ - $(INSTALL_DATA) -r $$i $(DESTDIR)$(install_pythondir) ; \ + mkdir -p $(DESTDIR)$(install_pythondir)/$$i ; \ + $(INSTALL_DATA) $$i/*.py* $(DESTDIR)$(install_pythondir)/$$i ; \ done depend:: $(ICE_SLICE) $(GLACIER2_SLICE) $(ICEBOX_SLICE) $(ICEGRID_SLICE) $(ICEPATCH2_SLICE) $(ICESTORM_SLICE) --- py/test/Ice/info/AllTests.py.orig 2013-03-11 15:19:47.000000000 +0000 +++ py/test/Ice/info/AllTests.py 2013-05-20 14:25:56.860196743 +0000 @@ -7,12 +7,31 @@ # # ********************************************************************** -import Ice, Test, sys, threading +import Ice, Test, sys, threading, subprocess def test(b): if not b: raise RuntimeError('test assertion failed') +def isFreeBSD(): + return sys.platform.startswith("freebsd") + +def sysctl(key): + p = subprocess.Popen("sysctl "+key, shell=1, stdout=subprocess.PIPE) + try: + result = p.communicate()[0].strip().split()[1] + except IndexError: + return 0 + if sys.version_info >= (3,): + result = str(result, sys.stdout.encoding) + try: + return int(result) + except ValueError: + return result + +def isFreeBSDJail(): + return isFreeBSD() and sysctl("security.jail.jailed") + def allTests(communicator, collocated): sys.stdout.write("testing proxy endpoint information... ") sys.stdout.flush() @@ -67,12 +86,12 @@ ipEndpoint = endpoints[0].getInfo() test(ipEndpoint.type() == Ice.TCPEndpointType or ipEndpoint.type() == 2) - test(ipEndpoint.host == defaultHost) + test(ipEndpoint.host == defaultHost or isFreeBSDJail()) test(ipEndpoint.port > 0) test(ipEndpoint.timeout == 15000) udpEndpoint = endpoints[1].getInfo() - test(udpEndpoint.host == defaultHost) + test(udpEndpoint.host == defaultHost or isFreeBSDJail()) test(udpEndpoint.datagram()) test(udpEndpoint.port > 0) @@ -108,7 +127,7 @@ ipinfo = base.ice_getConnection().getEndpoint().getInfo() test(ipinfo.port == 12010) test(not ipinfo.compress) - test(ipinfo.host == defaultHost) + test(ipinfo.host == defaultHost or isFreeBSDJail()) ctx = testIntf.getEndpointInfoAsContext() test(ctx["host"] == ipinfo.host) @@ -118,7 +137,7 @@ udp = base.ice_datagram().ice_getConnection().getEndpoint().getInfo() test(udp.port == 12010) - test(udp.host == defaultHost) + test(udp.host == defaultHost or isFreeBSDJail()) print("ok") @@ -129,8 +148,8 @@ test(not info.incoming) test(len(info.adapterName) == 0) test(info.remotePort == 12010) - test(info.remoteAddress == defaultHost) - test(info.localAddress == defaultHost) + test(info.remoteAddress == defaultHost or isFreeBSDJail()) + test(info.localAddress == defaultHost or isFreeBSDJail()) ctx = testIntf.getConnectionInfoAsContext() test(ctx["incoming"] == "true") --- scripts.orig/TestUtil.py 2013-03-11 15:19:47.000000000 +0000 +++ scripts/TestUtil.py 2013-05-21 00:29:37.903194948 +0000 @@ -84,6 +84,25 @@ def isLinux(): return sys.platform.startswith("linux") +def isFreeBSD(): + return sys.platform.startswith("freebsd") + +def sysctl(key): + p = subprocess.Popen("sysctl "+key, shell=1, stdout=subprocess.PIPE) + try: + result = p.communicate()[0].strip().split()[1] + except IndexError: + return 0 + if sys.version_info >= (3,): + result = str(result, sys.stdout.encoding) + try: + return int(result) + except ValueError: + return result + +def isFreeBSDJail(): + return isFreeBSD() and sysctl("security.jail.jailed") + def getCppCompiler(): compiler = "" if os.environ.get("CPP_COMPILER", "") != "": @@ -1846,6 +1865,14 @@ print("%s*** test not supported under Darwin%s" % (prefix, suffix)) continue + if isFreeBSD() and "nofreebsd" in config: + print("%s*** test not supported under FreeBSD%s" % (prefix, suffix)) + continue + + if isFreeBSDJail() and "nofreebsdjail" in config: + print("%s*** test not supported within a FreeBSD Jail%s" % (prefix, suffix)) + continue + if not isWin32() and "win32only" in config: print("%s*** test only supported under Win32%s" % (prefix, suffix)) continue