On Saturday, September 20, 2014 23:45 CEST, Jeremy Evans <jer...@openbsd.org> 
wrote: 
 
> On 09/20 11:13, Sebastian Reitenbach wrote:
> > 
> > On Saturday, September 20, 2014 20:53 CEST, Jeremy Evans 
> > <jer...@openbsd.org> wrote:
> > 
> > > On 09/20 07:30, Sebastian Reitenbach wrote:
> > > > Hi,
> > > >
> > > > upgraded my puppet server from short before mysql->mariadb switch, 
> > > > running on i386,, and there I have to run:
> > > >
> > > > I'm having puppet-dashboard running on that host, which uses mysql 
> > > > database.
> > > > cd /var/www/puppet-dashboard && sudo -u _puppet-dashboard rake18 
> > > > RAILS_ENV=production db:migrate --trace
> > >
> > > If I had to guess, this is because in the change from mysql -> mariadb,
> > > libmysqlclient now depends on libpthread.  As ruby 1.8 doesn't link with
> > > libpthread, you need to use LD_PRELOAD=libpthread.so when running ruby
> > > 1.8 if you want to load any ruby extension that links with
> > > libmysqlclient.
> > 
> > You seem to be right, using LD_PRELOAD indeed helps.
> > Now is the question, how this is fixed best, generally in ruby18,
> > or would it be enough to link ruby-mysql against libpthread?
> 
> If you want to not have to use LD_PRELOAD, you have to link the
> executable against libpthread, not the extension file.  I don't think
> that's appropriate, considering the current status of ruby 1.8.  A
> better fix to your issue is upgrading puppet-dashboard to support
> ruby 1.9+.  A fork exists that supposedly has ruby 1.9+ compatibility:
> 
> https://github.com/sodabrew/puppet-dashboard

Thanks for that link, that's already where the HOMEPAGE of the port
referrs to. I was already looking at the 2.0 beta version before, but ran 
into a bit of trouble. Before I take a look again, below a temporary 
quicker fix, for the time being.

OK?

Sebastian


> 
> Thanks,
> Jeremy
 
 
 Index: Makefile
===================================================================
RCS file: /cvs/ports/www/puppet-dashboard/Makefile,v
retrieving revision 1.34
diff -u -r1.34 Makefile
--- Makefile    14 Sep 2014 05:58:07 -0000      1.34
+++ Makefile    21 Sep 2014 11:09:18 -0000
@@ -3,7 +3,7 @@
 COMMENT=       overview of your Puppet ecosystem
 
 DISTNAME=      puppet-dashboard-1.2.23
-REVISION=      11
+REVISION=      12
 CATEGORIES=    www sysutils
 
 HOMEPAGE=      https://github.com/sodabrew/puppet-dashboard/
Index: pkg/README
===================================================================
RCS file: /cvs/ports/www/puppet-dashboard/pkg/README,v
retrieving revision 1.15
diff -u -r1.15 README
--- pkg/README  14 Sep 2014 05:58:07 -0000      1.15
+++ pkg/README  21 Sep 2014 11:09:18 -0000
@@ -30,7 +30,7 @@
 
 Once the database has been setup and MariaDB is up and running, the
 following command must be run to create the tables:
-    # cd ${INSTDIR} && sudo -u _puppet-dashboard rake${MODRUBY_BINREV} 
RAILS_ENV=production db:migrate
+    # cd ${INSTDIR} && sudo -u _puppet-dashboard rake${MODRUBY_BINREV} 
LD_PRELOAD=libpthread.so RAILS_ENV=production db:migrate
 
 Puppet Configuration
 ====================
@@ -69,18 +69,18 @@
 ---------
 The MariaDB database should be optimized on a montly basis. This can be
 done by adding the following entry to the root's crontab(5):
-0      0       1       *       *       cd ${INSTDIR} && sudo -u 
_puppet-dashboard ${LOCALBASE}/bin/rake${MODRUBY_BINREV} RAILS_ENV=production 
db:raw:optimize
+0      0       1       *       *       cd ${INSTDIR} && sudo -u 
_puppet-dashboard ${LOCALBASE}/bin/rake${MODRUBY_BINREV} 
LD_PRELOAD=libpthread.so RAILS_ENV=production db:raw:optimize
 
 Over time, old reports will start to accumulate which can slow down the
 Dashboard. Adding the following line to the root's crontab(5) will clean
 up reports older than 1 month and will run every night:
-0      0       *       *       *       cd ${INSTDIR} && sudo -u 
_puppet-dashboard ${LOCALBASE}/bin/rake${MODRUBY_BINREV} RAILS_ENV=production 
reports:prune upto=1 unit=mon
+0      0       *       *       *       cd ${INSTDIR} && sudo -u 
_puppet-dashboard ${LOCALBASE}/bin/rake${MODRUBY_BINREV} 
LD_PRELOAD=libpthread.so RAILS_ENV=production reports:prune upto=1 unit=mon
 
 Upgrade
 -------
 After updating the Dashboard to a new release, the following command
 needs to be run to update database schemas:
-    # cd ${INSTDIR} && sudo -u _puppet-dashboard rake${MODRUBY_BINREV} 
RAILS_ENV=production db:migrate
+    # cd ${INSTDIR} && sudo -u _puppet-dashboard rake${MODRUBY_BINREV} 
LD_PRELOAD=libpthread.so RAILS_ENV=production db:migrate
 
 Phusion Passenger Integration (i.e. mod_rails)
 ==============================================
Index: pkg/puppet_dashboard.rc
===================================================================
RCS file: /cvs/ports/www/puppet-dashboard/pkg/puppet_dashboard.rc,v
retrieving revision 1.2
diff -u -r1.2 puppet_dashboard.rc
--- pkg/puppet_dashboard.rc     18 Mar 2013 14:25:41 -0000      1.2
+++ pkg/puppet_dashboard.rc     21 Sep 2014 11:09:18 -0000
@@ -12,7 +12,7 @@
 rc_reload=NO
 
 rc_start() {
-       ${rcexec} "cd ${INSTDIR} && ${daemon} ${daemon_flags}"
+       ${rcexec} "cd ${INSTDIR} && env LD_PRELOAD=libpthread.so ${daemon} 
${daemon_flags}"
 }
 
 rc_stop() {
Index: pkg/puppet_dashboard_workers.rc
===================================================================
RCS file: /cvs/ports/www/puppet-dashboard/pkg/puppet_dashboard_workers.rc,v
retrieving revision 1.1
diff -u -r1.1 puppet_dashboard_workers.rc
--- pkg/puppet_dashboard_workers.rc     18 Mar 2013 14:25:41 -0000      1.1
+++ pkg/puppet_dashboard_workers.rc     21 Sep 2014 11:09:18 -0000
@@ -17,7 +17,7 @@
 
 rc_start() {
        ${rcexec} "cd ${INSTDIR} && \
-               env RAILS_ENV=production ${daemon} ${daemon_flags} start"
+               env RAILS_ENV=production LD_PRELOAD=libpthread.so ${daemon} 
${daemon_flags} start"
 }
 
 rc_stop() {

 


Reply via email to