<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div><span>I guess I was complicating things just because something didn't work when I started.</span></div><div><span>At first I tried to copy the whole release to /usr/lib/myserver with the following line in the debian/install script:</span></div><div><span>../../myserver/rel/myserver/lib/ /usr/lib/myserver/lib<br></span></div><div><span>but when creating the deb package with debuild</span><span> I got errors related to crypto and ssl.</span></div><div>Is it possible to fix the errors?<br></div><div>Please note that the dev and production machine will be identical.<br><span></span></div><div><br></div><div>The second question (which might deserve a separate thread) is about upgrade vs a new release.</div><div>When you install a deb package, it is smart enough to handle a fresh install or to upgrade a previous version.</div><div>Erlang
 release seem to distinguish between the two scenarios so you can't just have a single deb that handle both cases.<br></div><div>Someone suggested that the first release will be an upgrade of a bare runtime which might be an option:</div><div>http://engineering.yakaz.com/erlang-packaging-on-debian-and-live-upgrade.html</div><div><br><span></span></div><div><span>The debuild errors:<br></span></div><div><span>objdump: debian/myserver/usr/lib/myserver/lib/lib/crypto-2.0.2/priv/obj/crypto.o: not a dynamic object<br>objdump: debian/myserver/usr/lib/myserver/lib/lib/crypto-2.0.2/priv/obj/crypto.o: Invalid operation<br>dpkg-shlibdeps: warning: Couldn't parse dynamic symbol definition: no symbols<br>dpkg-shlibdeps: warning: dependency on libdl.so.2 could be avoided if "debian/myserver/usr/lib/myserver/lib/lib/runtime_tools-1.8.4.1/priv/lib/trace_file_drv.so debian/myserver/usr/lib/myserver/lib/lib/runtime_tools-1.8.4.1/priv/lib/trace_ip_drv.so
 debian/myserver/usr/lib/myserver/lib/lib/ssl-4.1.1/priv/bin/ssl_esock" were not uselessly linked against it (they use none of its symbols).<br>dpkg-shlibdeps: warning: dependency on libm.so.6 could be avoided if "debian/myserver/usr/lib/myserver/lib/lib/runtime_tools-1.8.4.1/priv/lib/trace_file_drv.so debian/myserver/usr/lib/myserver/lib/lib/runtime_tools-1.8.4.1/priv/lib/trace_ip_drv.so debian/myserver/usr/lib/myserver/lib/lib/ssl-4.1.1/priv/bin/ssl_esock" were not uselessly linked against it (they use none of its symbols).<br>dpkg-shlibdeps: warning: dependency on libutil.so.1 could be avoided if "debian/myserver/usr/lib/myserver/lib/lib/runtime_tools-1.8.4.1/priv/lib/trace_file_drv.so debian/myserver/usr/lib/myserver/lib/lib/runtime_tools-1.8.4.1/priv/lib/trace_ip_drv.so debian/myserver/usr/lib/myserver/lib/lib/ssl-4.1.1/priv/bin/ssl_esock" were not uselessly linked against it (they use none of its symbols).<br>...<br><br>E: myserver:
 possible-gpl-code-linked-with-openssl<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/crypto-2.0.2/priv/lib/crypto.so /usr/ssl/lib<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/crypto-2.0.2/priv/lib/crypto.so /usr/local/lib<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/crypto-2.0.2/priv/lib/crypto.so /usr/local/openssl/lib64<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/crypto-2.0.2/priv/lib/crypto.so /usr/lib/ssl/lib<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/crypto-2.0.2/priv/lib/crypto.so /usr/openssl/lib<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/crypto-2.0.2/priv/lib/crypto.so /usr/pkg/lib64<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/crypto-2.0.2/priv/lib/crypto.so /usr/local/ssl/lib64<br>E: myserver: binary-or-shlib-defines-rpath
 ./usr/lib/myserver/lib/lib/crypto-2.0.2/priv/lib/crypto.so /usr/local/openssl/lib<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/crypto-2.0.2/priv/lib/crypto.so /usr/local/ssl/lib<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/crypto-2.0.2/priv/lib/crypto.so /usr/sfw/lib<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/crypto-2.0.2/priv/lib/crypto.so /usr/lib<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/crypto-2.0.2/priv/lib/crypto.so /opt/local/lib<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/crypto-2.0.2/priv/lib/crypto.so /usr/lib64<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/crypto-2.0.2/priv/lib/crypto.so /usr/lib/ssl/lib64<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/crypto-2.0.2/priv/lib/crypto.so /usr/lib/openssl/lib64<br>E: myserver:
 binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/crypto-2.0.2/priv/lib/crypto.so /usr/local/lib64<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/crypto-2.0.2/priv/lib/crypto.so /usr/openssl/lib64<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/crypto-2.0.2/priv/lib/crypto.so /opt/local/lib64<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/crypto-2.0.2/priv/lib/crypto.so /usr/pkg/lib<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/crypto-2.0.2/priv/lib/crypto.so /usr/sfw/lib64<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/crypto-2.0.2/priv/lib/crypto.so /usr/ssl/lib64<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/crypto-2.0.2/priv/lib/crypto.so /usr/lib/openssl/lib<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/ssl-4.1.1/priv/bin/ssl_esock /usr/ssl/lib<br>E: myserver:
 binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/ssl-4.1.1/priv/bin/ssl_esock /usr/local/lib<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/ssl-4.1.1/priv/bin/ssl_esock /usr/local/openssl/lib64<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/ssl-4.1.1/priv/bin/ssl_esock /usr/lib/ssl/lib<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/ssl-4.1.1/priv/bin/ssl_esock /usr/openssl/lib<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/ssl-4.1.1/priv/bin/ssl_esock /usr/pkg/lib64<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/ssl-4.1.1/priv/bin/ssl_esock /usr/local/ssl/lib64<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/ssl-4.1.1/priv/bin/ssl_esock /usr/local/openssl/lib<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/ssl-4.1.1/priv/bin/ssl_esock /usr/local/ssl/lib<br>E: myserver:
 binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/ssl-4.1.1/priv/bin/ssl_esock /usr/sfw/lib<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/ssl-4.1.1/priv/bin/ssl_esock /usr/lib<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/ssl-4.1.1/priv/bin/ssl_esock /opt/local/lib<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/ssl-4.1.1/priv/bin/ssl_esock /usr/lib64<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/ssl-4.1.1/priv/bin/ssl_esock /usr/lib/ssl/lib64<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/ssl-4.1.1/priv/bin/ssl_esock /usr/lib/openssl/lib64<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/ssl-4.1.1/priv/bin/ssl_esock /usr/local/lib64<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/ssl-4.1.1/priv/bin/ssl_esock /usr/openssl/lib64<br>E: myserver:
 binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/ssl-4.1.1/priv/bin/ssl_esock /opt/local/lib64<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/ssl-4.1.1/priv/bin/ssl_esock /usr/pkg/lib<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/ssl-4.1.1/priv/bin/ssl_esock /usr/sfw/lib64<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/ssl-4.1.1/priv/bin/ssl_esock /usr/ssl/lib64<br>E: myserver: binary-or-shlib-defines-rpath ./usr/lib/myserver/lib/lib/ssl-4.1.1/priv/bin/ssl_esock /usr/lib/openssl/lib<br></span></div><div><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><font face="Arial" size="2"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Per Melin <per.melin@gmail.com><br><b><span style="font-weight: bold;">To:</span></b> Ulf Wiger
 <ulf.wiger@erlang-solutions.com><br><b><span style="font-weight: bold;">Cc:</span></b> Pablo Platt <pablo.platt@yahoo.com>; erlang-questions <erlang-questions@erlang.org><br><b><span style="font-weight: bold;">Sent:</span></b> Sunday, April 24, 2011 3:39 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [erlang-questions] use only parts of a release<br></font><br>
On Sat, Apr 23, 2011 at 9:27 PM, Ulf Wiger<br><<a ymailto="mailto:ulf.wiger@erlang-solutions.com" href="mailto:ulf.wiger@erlang-solutions.com">ulf.wiger@erlang-solutions.com</a>> wrote:<br>> I will admit that I haven't been following this thread - apologies. Also, I<br>> have yet to update my old knowledge of how to do this to understand how it's<br>> done using reltool et al.<br>> You can use a releases/ directory outside the OTP root.<br><br>Thanks. I was confused about the role of the -root flag.<br><br>It is used in three places that I can find:<br>- init uses it to locate stuff and to replace the default variable<br>$ROOT in the boot script.<br>- code_server uses it (in interactive mode only) as one of the<br>starting points to search for modules.<br>- release_handler uses it as the top directory of the installed release.<br><br>> When you build the boot script, use the {variables, Vars} option, and when<br>> starting, define
 the variables using the -boot_var command-line option.<br>> http://www.erlang.org/doc/man/systools.html#make_script-2<br>> E.g. {variables, [{"MYROOT", PathToMyRoot}, {"OTP_ROOT", ERL_TOP}]}<br>> init:get_argument(root) should point to the place where you have your .rel<br>> and .boot files etc. This can be entirely separate from where you keep your<br>> lib/ roots.<br><br>Pablo is using rebar. He would need to drop down a few levels to use<br>systools instead.<br><br>I can't find any support for boot variables in the doc for reltool. It<br>does look to me like reltool_target:gen_script/4 do support them, but<br>that is an internal function and is always called with a hardcoded<br>empty list of variables.<br><br>I guess one could let rebar generate the release and then use<br>systools:make_script/2 to rebuild the boot script with variables.<br><br><br></div></div></div></body></html>