mirage2 build problems

97 views
Skip to first unread message

Bill Tantzen

unread,
May 12, 2022, 9:56:08 AM5/12/22
to DSpace Technical Support
I am recently required to rebuild my v5.10 instance with mirage2, and I'm encountering the same problems as many others here since torquebox.org is out of action.

Does anybody have any tips?

One major problem is that I cannot install rvm as root -- can I use rbenv as an alternative?  Following the instructions in the mirage2 readme (and the url below), here is what I have done:

https://github.com/DSpace/DSpace/tree/dspace-5_x/dspace-xmlui-mirage2

curl https://raw.githubusercontent.com/creationix/nvm/v0.5.1/install.sh | sh
nvm install 0.10.31
nvm alias default 0.10.31
npm install -g bower
npm install -g grunt && npm install -g grunt-cli

now, I break away and use rbenv instead of rvm…

git clone https://github.com/rbenv/rbenv.git ~/.rbenv
mkdir -p "$(rbenv root)"/plugins
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
rbenv install 3.1.2
rbenv global 3.1.2

The first error I am encountering is:
...
...
> Mir...@0.1.1 postinstall /swadm/dspace/projects/bill/dspace/modules/xmlui-mirage2/target/themes/Main
> bower install

[INFO] ------ (Main) org.codehaus.mojo:exec-maven-plugin:1.3.1:exec

/home/dspace/.nvm/v0.10.31/lib/node_modules/grunt/node_modules/grunt-cli/node_modules/liftup/node_modules/findup-sync/node_modules/micromatch/index.js:3
const util = require('util');
^^^^^
SyntaxError: Use of const in strict mode.
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/dspace/.nvm/v0.10.31/lib/node_modules/grunt/node_modules/grunt-cli/node_modules/liftup/node_modules/findup-sync/index.js:12:10)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
...
...

Any suggestions on the right cocktail of versions and software I need to get this to build?

Thanks all,
~~Bill

--
Human wheels spin round and round
While the clock keeps the pace... -- John Mellencamp
________________________________________________________________
Bill Tantzen    University of Minnesota Libraries
612-626-9949 (U of M)    612-325-1777 (cell)

Jose Blanco

unread,
May 12, 2022, 11:06:27 AM5/12/22
to Bill Tantzen, DSpace Technical Support
Hi Bill,

I had the same problem.  Take a look at last message in this thread:


I have not tried the patch yet.  What I did is, since I had a successful Mirage2 build from a previous build in the webapp directory, copy it to 

dspace-xmlui/src/main/webapp/themes/Mirage2


And then build it using:
> mvn clean package

From now on, if I need to make any changes to Mirage2, I will do it from:

dspace-xmlui/src/main/webapp/themes/Mirage2


That got me over the issue.

-Jose

--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/CADgrb7E3YVEmw12XQxkdssj9VHeHJFQTc%2BDAnK_YCj9V7FXwpA%40mail.gmail.com.

Bill Tantzen

unread,
May 12, 2022, 11:14:58 AM5/12/22
to Jose Blanco, DSpace Technical Support
Thanks Jose!
I leveraged the instructions at https://github.com/DSpace/DSpace/tree/dspace-6_x/dspace-xmlui-mirage2#installation and a single user installation of rvm to finally get my build to work.  Here's what finally did it for me:

## grab rvm and install for the dspace user only:
curl -sSL https://get.rvm.io | bash -s stable
source /home/dspace/.rvm/scripts/rvm

## install a newish version of ruby (I did need to install a couple RHEL packages, for which I have sudo)
rvm install 3.1.2
rvm use 3.1.2

## install nvm, node, bower, grunt, sass and compass
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install 12
nvm alias default 12

npm install -g bower
npm install -g grunt && npm install -g grunt-cli
gem install sass -v 3.3.14
gem install compass -v 1.0.1 (compass install actually upgrades sass to 3.4.25)

That's it, I was able to build successfully by setting -Dmirage2.deps.included=false which I think is the default anyway.

~~Bill

Alan Orth

unread,
May 13, 2022, 4:13:50 AM5/13/22
to Bill Tantzen, Jose Blanco, DSpace Technical Support
Hi,

Yes you're right that Mirage 2 build issues will be the same for DSpace 5.x and 6.x, and the solution would be similar as what I proposed here:


Basically, we can remove the dependency on Ruby and bower *completely*, moving entirely to npm for dependencies and node-sass (via npm) for Sass processing. In addition this means we can build with newer versions of Node.js (for example, the instructions say to use 0.10.31 but that is beyond ancient!). I am currently building Mirage 2 successfully with Node.js 10, 12, and even 14.

I won't have time to look at a DSpace 5.x port of this Mirage 2 pull request for some time, but you might be able to draw some inspiration from the changes there on your own in the meantime...

Regards,



--

Bill Tantzen

unread,
May 13, 2022, 8:16:39 AM5/13/22
to Alan Orth, Jose Blanco, DSpace Technical Support
Alan,
Cool, if I can take ruby and bower out of the mix, so much the better!  I think this should work just fine with 5.x with maybe a little tweak here and there.
~~Bill

Alan Orth

unread,
Jun 7, 2022, 2:50:28 AM6/7/22
to Bill Tantzen, Jose Blanco, DSpace Technical Support
BTW this has been merged in to the 6.x branch that will soon become DSpace 6.4:


Also note that Mirage 2 builds fine with Node.js 14, so I've sent another pull request to update that as well:


This is important because Node.js 12 is no longer supported by the upstream Node.js project and this might be the last DSpace 6.x release so we don't want it shipping with dependencies that are dead on arrival (within reason, given that DSpace 6 is soon EOL). I would appreciate any feedback here or on GitHub for this pull request too.

Regards,

al...@vt.edu

unread,
Jun 7, 2022, 11:49:24 AM6/7/22
to DSpace Technical Support
Alan,

What is the plan for DSpace 6.4?

Thanks,

Anne

Alan Orth

unread,
Jun 7, 2022, 1:25:51 PM6/7/22
to al...@vt.edu, DSpace Technical Support
Dear Anne,

DSpace 6.4 will be released "soon". ;) We (a group of volunteers) have been doing preparations in the last few weeks, for example collating the list of changes and contributors for the release notes, updating the DSpace wiki, etc. DSpace 6.4 will be a massive bug fix release, an accumulation of years of pull requests from members of the community, but it will likely be the last DSpace 6.x release so we want to make sure it doesn't have any show-stopping bugs that cause us more work immediately after. Now it's essentially upon a few of us to see if it's in our schedules to actually do the release (tag the commit in git, push to Maven central, etc).

If you are technical and adventurous I would highly recommend jumping on DSpace 6.4-SNAPSHOT now using a source build. It's totally stable and has a metric tonne of bug, security, and performance fixes, and then it will become DSpace 6.4 in the near future.

Regards,

Anne Lawrence

unread,
Jun 7, 2022, 1:52:14 PM6/7/22
to Alan Orth, DSpace Technical Support
Alan,

Thank you and the DSpace 6.4 team very much for pulling this release together. We have already patched our 6.3 deployment with some of the fixes. We will add DSpace 6.4 testing to our backlog and look forward to upgrading when the release is ready.

Anne
--

Anne Lawrence

Repository Application Administrator

Virginia Tech | University Libraries (0434)

Newman Library, Room 420

560 Drillfield Drive

Blacksburg, VA  24061

(540) 231-9320 | annela...@vt.edu

Reply all
Reply to author
Forward
0 new messages