cgspace-notes/docs/2020-04/index.html

493 lines
25 KiB
HTML
Raw Normal View History

2020-04-02 09:54:46 +02:00
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta property="og:title" content="April, 2020" />
<meta property="og:description" content="2020-04-02
Maria asked me to update Charles Staver&rsquo;s ORCID iD in the submission template and on CGSpace, as his name was lower case before, and now he has corrected it
2020-04-02 11:33:41 +02:00
I updated the fifty-eight existing items on CGSpace
Looking into the items Udana had asked about last week that were missing Altmetric donuts:
2020-04-02 15:30:44 +02:00
The first is still missing its DOI, so I added it and tweeted its handle (after a few hours there was a donut with score 222)
2020-04-02 11:33:41 +02:00
The second item now has a donut with score 2 since I tweeted its handle last week
The third item now has a donut with score 1 since I tweeted it last week
On the same note, the one item Abenet pointed out last week now has a donut with score of 104 after I tweeted it last week
2020-04-02 09:54:46 +02:00
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://alanorth.github.io/cgspace-notes/2020-04/" />
<meta property="article:published_time" content="2020-04-02T10:53:24+03:00" />
2020-04-27 15:39:04 +02:00
<meta property="article:modified_time" content="2020-04-27T09:17:08+03:00" />
2020-04-02 09:54:46 +02:00
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="April, 2020"/>
<meta name="twitter:description" content="2020-04-02
Maria asked me to update Charles Staver&rsquo;s ORCID iD in the submission template and on CGSpace, as his name was lower case before, and now he has corrected it
2020-04-02 11:33:41 +02:00
I updated the fifty-eight existing items on CGSpace
Looking into the items Udana had asked about last week that were missing Altmetric donuts:
2020-04-02 15:30:44 +02:00
The first is still missing its DOI, so I added it and tweeted its handle (after a few hours there was a donut with score 222)
2020-04-02 11:33:41 +02:00
The second item now has a donut with score 2 since I tweeted its handle last week
The third item now has a donut with score 1 since I tweeted it last week
On the same note, the one item Abenet pointed out last week now has a donut with score of 104 after I tweeted it last week
2020-04-02 09:54:46 +02:00
"/>
2020-04-27 08:17:08 +02:00
<meta name="generator" content="Hugo 0.69.2" />
2020-04-02 09:54:46 +02:00
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "BlogPosting",
"headline": "April, 2020",
2020-04-02 09:55:42 +02:00
"url": "https://alanorth.github.io/cgspace-notes/2020-04/",
2020-04-27 15:39:04 +02:00
"wordCount": "2222",
2020-04-02 09:54:46 +02:00
"datePublished": "2020-04-02T10:53:24+03:00",
2020-04-27 15:39:04 +02:00
"dateModified": "2020-04-27T09:17:08+03:00",
2020-04-02 09:54:46 +02:00
"author": {
"@type": "Person",
"name": "Alan Orth"
},
"keywords": "Notes"
}
</script>
<link rel="canonical" href="https://alanorth.github.io/cgspace-notes/2020-04/">
<title>April, 2020 | CGSpace Notes</title>
<!-- combined, minified CSS -->
<link href="https://alanorth.github.io/cgspace-notes/css/style.6da5c906cc7a8fbb93f31cd2316c5dbe3f19ac4aa6bfb066f1243045b8f6061e.css" rel="stylesheet" integrity="sha256-baXJBsx6j7uT8xzSMWxdvj8ZrEqmv7Bm8SQwRbj2Bh4=" crossorigin="anonymous">
<!-- minified Font Awesome for SVG icons -->
2020-04-02 09:55:42 +02:00
<script defer src="https://alanorth.github.io/cgspace-notes/js/fontawesome.min.f3d2a1f5980bab30ddd0d8cadbd496475309fc48e2b1d052c5c09e6facffcb0f.js" integrity="sha256-89Kh9ZgLqzDd0NjK29SWR1MJ/EjisdBSxcCeb6z/yw8=" crossorigin="anonymous"></script>
2020-04-02 09:54:46 +02:00
<!-- RSS 2.0 feed -->
</head>
<body>
<div class="blog-masthead">
<div class="container">
<nav class="nav blog-nav">
<a class="nav-link " href="https://alanorth.github.io/cgspace-notes/">Home</a>
</nav>
</div>
</div>
<header class="blog-header">
<div class="container">
<h1 class="blog-title" dir="auto"><a href="https://alanorth.github.io/cgspace-notes/" rel="home">CGSpace Notes</a></h1>
<p class="lead blog-description" dir="auto">Documenting day-to-day work on the <a href="https://cgspace.cgiar.org">CGSpace</a> repository.</p>
</div>
</header>
<div class="container">
<div class="row">
<div class="col-sm-8 blog-main">
<article class="blog-post">
<header>
<h2 class="blog-post-title" dir="auto"><a href="https://alanorth.github.io/cgspace-notes/2020-04/">April, 2020</a></h2>
2020-04-02 09:55:42 +02:00
<p class="blog-post-meta"><time datetime="2020-04-02T10:53:24+03:00">Thu Apr 02, 2020</time> by Alan Orth in
2020-04-02 09:54:46 +02:00
<span class="fas fa-folder" aria-hidden="true"></span>&nbsp;<a href="/cgspace-notes/categories/notes/" rel="category tag">Notes</a>
</p>
</header>
<h2 id="2020-04-02">2020-04-02</h2>
<ul>
2020-04-02 11:33:41 +02:00
<li>Maria asked me to update Charles Staver&rsquo;s ORCID iD in the submission template and on CGSpace, as his name was lower case before, and now he has corrected it
<ul>
<li>I updated the fifty-eight existing items on CGSpace</li>
</ul>
</li>
<li>Looking into the items Udana had asked about last week that were missing Altmetric donuts:
<ul>
2020-04-02 15:30:44 +02:00
<li><a href="https://hdl.handle.net/10568/103225">The first</a> is still missing its DOI, so I added it and <a href="https://twitter.com/mralanorth/status/1245632619661766657">tweeted its handle</a> (after a few hours there was a donut with score 222)</li>
2020-04-02 11:33:41 +02:00
<li><a href="https://hdl.handle.net/10568/106899">The second item</a> now has a donut with score 2 since I <a href="https://twitter.com/mralanorth/status/1243158045540134913">tweeted its handle</a> last week</li>
<li><a href="https://hdl.handle.net/10568/107258">The third item</a> now has a donut with score 1 since I <a href="https://twitter.com/mralanorth/status/1243158786392625153">tweeted it</a> last week</li>
</ul>
</li>
<li>On the same note, the <a href="https://hdl.handle.net/10568/106573">one item</a> Abenet pointed out last week now has a donut with score of 104 after I <a href="https://twitter.com/mralanorth/status/1243163710241345536">tweeted it</a> last week</li>
2020-04-02 09:54:46 +02:00
</ul>
2020-04-02 15:30:44 +02:00
<ul>
<li>Altmetric responded about <a href="https://hdl.handle.net/10568/101286">one item</a> that had no donut since at least 2019-12 and said they fixed some problems with their bot&rsquo;s user agent
<ul>
<li>I decided to <a href="https://twitter.com/mralanorth/status/1245703049445851140">tweet the item</a>, as I can&rsquo;t remember if I ever did it before</li>
</ul>
</li>
</ul>
2020-04-07 09:37:48 +02:00
<h2 id="2020-04-05">2020-04-05</h2>
<ul>
<li>Update PostgreSQL JDBC driver to version 42.2.12</li>
</ul>
<h2 id="2020-04-07">2020-04-07</h2>
<ul>
<li>Yesterday Atmire sent me their <a href="https://github.com/ilri/DSpace/pull/445">pull request for DSpace 6 modules</a></li>
<li>Peter pointed out that some items have his ORCID identifier (<code>cg.creator.id</code>) twice
<ul>
<li>I think this is because my early <code>add-orcid-identifiers.py</code> script was adding identifiers to existing records without properly checking if there was already one present (at first it only checked if there was one with the exact <code>place</code> value)</li>
<li>As a test I dropped all his ORCID identifiers and added them back with the <code>add-orcid-identifiers.py</code> script:</li>
</ul>
</li>
</ul>
<pre><code>$ psql -h localhost -U postgres dspace -c &quot;DELETE FROM metadatavalue WHERE resource_type_id=2 AND metadata_field_id=240 AND text_value LIKE '%Ballantyne%';&quot;
DELETE 97
$ ./add-orcid-identifiers-csv.py -i 2020-04-07-peter-orcids.csv -db dspace -u dspace -p 'fuuu' -d
</code></pre><ul>
<li>I used this CSV with the script (all records with his name have the name standardized like this):</li>
</ul>
<pre><code>dc.contributor.author,cg.creator.id
&quot;Ballantyne, Peter G.&quot;,&quot;Peter G. Ballantyne: 0000-0001-9346-2893&quot;
</code></pre><ul>
<li>Then I tried another way, to identify all duplicate ORCID identifiers for a given resource ID and group them so I can see if count is greater than 1:</li>
</ul>
<pre><code>dspace=# \COPY (SELECT DISTINCT(resource_id, text_value) as distinct_orcid, COUNT(*) FROM metadatavalue WHERE resource_type_id = 2 AND metadata_field_id = 240 GROUP BY distinct_orcid ORDER BY count DESC) TO /tmp/2020-04-07-duplicate-orcids.csv WITH CSV HEADER;
COPY 15209
</code></pre><ul>
<li>Of those, about nine authors had duplicate ORCID identifiers over about thirty records, so I created a CSV with all their name variations and ORCID identifiers:</li>
</ul>
<pre><code>dc.contributor.author,cg.creator.id
&quot;Ballantyne, Peter G.&quot;,&quot;Peter G. Ballantyne: 0000-0001-9346-2893&quot;
&quot;Ramirez-Villegas, Julian&quot;,&quot;Julian Ramirez-Villegas: 0000-0002-8044-583X&quot;
&quot;Villegas-Ramirez, J&quot;,&quot;Julian Ramirez-Villegas: 0000-0002-8044-583X&quot;
&quot;Ishitani, Manabu&quot;,&quot;Manabu Ishitani: 0000-0002-6950-4018&quot;
&quot;Manabu, Ishitani&quot;,&quot;Manabu Ishitani: 0000-0002-6950-4018&quot;
&quot;Ishitani, M.&quot;,&quot;Manabu Ishitani: 0000-0002-6950-4018&quot;
&quot;Ishitani, M.&quot;,&quot;Manabu Ishitani: 0000-0002-6950-4018&quot;
&quot;Buruchara, Robin A.&quot;,&quot;Robin Buruchara: 0000-0003-0934-1218&quot;
&quot;Buruchara, Robin&quot;,&quot;Robin Buruchara: 0000-0003-0934-1218&quot;
&quot;Jarvis, Andy&quot;,&quot;Andy Jarvis: 0000-0001-6543-0798&quot;
&quot;Jarvis, Andrew&quot;,&quot;Andy Jarvis: 0000-0001-6543-0798&quot;
&quot;Jarvis, A.&quot;,&quot;Andy Jarvis: 0000-0001-6543-0798&quot;
&quot;Tohme, Joseph M.&quot;,&quot;Joe Tohme: 0000-0003-2765-7101&quot;
&quot;Hansen, James&quot;,&quot;James Hansen: 0000-0002-8599-7895&quot;
&quot;Hansen, James W.&quot;,&quot;James Hansen: 0000-0002-8599-7895&quot;
&quot;Asseng, Senthold&quot;,&quot;Senthold Asseng: 0000-0002-7583-3811&quot;
</code></pre><ul>
<li>Then I deleted <em>all</em> their existing ORCID identifier records:</li>
</ul>
<pre><code>dspace=# DELETE FROM metadatavalue WHERE resource_type_id=2 AND metadata_field_id=240 AND text_value SIMILAR TO '%(0000-0001-6543-0798|0000-0001-9346-2893|0000-0002-6950-4018|0000-0002-7583-3811|0000-0002-8044-583X|0000-0002-8599-7895|0000-0003-0934-1218|0000-0003-2765-7101)%';
DELETE 994
</code></pre><ul>
<li>And then I added them again using the <code>add-orcid-identifiers</code> records:</li>
</ul>
<pre><code>$ ./add-orcid-identifiers-csv.py -i 2020-04-07-fix-duplicate-orcids.csv -db dspace -u dspace -p 'fuuu' -d
</code></pre><ul>
<li>I ran the fixes on DSpace Test and CGSpace as well</li>
2020-04-07 15:32:02 +02:00
<li>I started testing the <a href="https://github.com/ilri/DSpace/pull/445">pull request</a> sent by Atmire yesterday
<ul>
<li>I notice that we now need <code>yarn</code> to build, and I need to bump the Node.js <code>engine</code> version in our Mirage 2 theme in order to get it to build on Node.js 10.x</li>
2020-04-12 16:09:14 +02:00
<li>Font Awesome icons for GitHub etc weren&rsquo;t loading, and after a bit of troubleshooting I replaced version 4.5.0 with 5.13.0 and to my surprise they now include Mendeley and ORCID so we can get rid of the Academicons dependency</li>
</ul>
</li>
</ul>
<h2 id="2020-04-12">2020-04-12</h2>
<ul>
<li>Testing the Atmire DSpace 6.3 code with a clean CGSpace DSpace 5.8 database snapshot
<ul>
<li>One Flyway migration failed so I had to manually remove it (and of course create the pgcrypto extension):</li>
</ul>
</li>
</ul>
<pre><code>dspace63=# DELETE FROM schema_version WHERE version IN ('5.8.2015.12.03.3');
dspace63=# CREATE EXTENSION pgcrypto;
</code></pre><ul>
<li>Then DSpace 6.3 started up OK and I was able to see some statistics in the Content and Usage Analysis (CUA) module, but not on community, collection, or item pages
<ul>
<li>I also noticed at least one of these errors in the DSpace log:</li>
</ul>
</li>
</ul>
<pre><code>2020-04-12 16:34:33,363 ERROR com.atmire.dspace.app.xmlui.aspect.statistics.editorparts.DataTableTransformer @ java.lang.IllegalArgumentException: Invalid UUID string: 1
</code></pre><ul>
<li>And I remembered I actually need to run the DSpace 6.4 Solr UUID migrations:</li>
</ul>
<pre><code>$ export JAVA_OPTS=&quot;-Xmx1024m -Dfile.encoding=UTF-8&quot;
$ ~/dspace63/bin/dspace solr-upgrade-statistics-6x
</code></pre><ul>
<li>Run system updates on DSpace Test (linode26) and reboot it</li>
<li>More work on the DSpace 6.3 stuff, improving the GDPR consent logic to use <a href="https://github.com/chiiya/haven">haven</a> instead of cookieconsent
<ul>
<li>It works better by injecting the Google Analytics script after the user clicks agree, and it also has a preferences section that gets automatically injected on the privacy page!</li>
2020-04-07 15:32:02 +02:00
</ul>
</li>
2020-04-07 09:37:48 +02:00
</ul>
2020-04-13 16:24:05 +02:00
<h2 id="2020-04-13">2020-04-13</h2>
<ul>
<li>I realized that <code>solr-upgrade-statistics-6x</code> only processes 100,000 records by default so I think we actually need to finish running it for all legacy Solr records before asking Atmire why CUA statlets and detailed statistics aren&rsquo;t working</li>
<li>For now I am just doing 250,000 records at a time on my local environment:</li>
</ul>
<pre><code>$ export JAVA_OPTS=&quot;-Xmx2000m -Dfile.encoding=UTF-8&quot;
$ ~/dspace63/bin/dspace solr-upgrade-statistics-6x -n 250000
</code></pre><ul>
<li>Despite running the migration for all of my local 1.5 million Solr records, I still see a few hundred thousand like <code>-1</code> and <code>0-unmigrated</code>
<ul>
<li>I will purge them all and try to import only a subset&hellip;</li>
<li>After importing again I see there are indeed tens of thousands of these documents with IDs &ldquo;-1&rdquo; and &ldquo;0&rdquo;</li>
<li>They are all <code>type: 5</code>, which is &ldquo;SITE&rdquo; according to <code>Constants.java</code>:</li>
</ul>
</li>
</ul>
<pre><code>/** DSpace site type */
public static final int SITE = 5;
</code></pre><ul>
<li>Even after deleting those documents and re-running <code>solr-upgrade-statistics-6x</code> I still get the UUID errors when using CUA and the statlets</li>
<li>I have sent some feedback and questions to Atmire (including about the  issue with glypicons in the header trail)</li>
<li>In other news, my local Artifactory container stopped working for some reason so I re-created it and it seems some things have changed upstream (port 8082 for web UI?):</li>
</ul>
<pre><code>$ podman rm artifactory
$ podman pull docker.bintray.io/jfrog/artifactory-oss:latest
$ podman create --ulimit nofile=32000:32000 --name artifactory -v artifactory_data:/var/opt/jfrog/artifactory -p 8081-8082:8081-8082 docker.bintray.io/jfrog/artifactory-oss
$ podman start artifactory
2020-04-14 19:01:06 +02:00
</code></pre><h2 id="2020-04-14">2020-04-14</h2>
<ul>
<li>A few days ago Peter asked me to update an author&rsquo;s name on CGSpace and in the controlled vocabularies:</li>
</ul>
<pre><code>dspace=# UPDATE metadatavalue SET text_value='Knight-Jones, Theodore J.D.' WHERE resource_type_id=2 AND metadata_field_id=3 AND text_value='Knight-Jones, T.J.D.';
</code></pre><ul>
<li>I updated his existing records on CGSpace, changed the controlled lists, added his ORCID identifier to the controlled list, and tagged his thirty-nine items with the ORCID iD</li>
<li>The new DSpace 6 stuff that Atmire sent modifies the Mirage 2&rsquo;s <code>pom.xml</code> to copy the each theme&rsquo;s resulting <code>node_modules</code> to each theme after building and installing with <code>ant update</code> because they moved some packages from bower to npm and now reference them in <code>page-structure.xsl</code>
<ul>
<li>This is a good idea, because bower is no longer supported, and npm has gotten a lot better, but it causes an extra 200,000 files to get copied!</li>
<li>Most scripts are concatenated into <code>theme.js</code> during build, so we don&rsquo;t need the <code>node_modules</code> after that, but there are three scripts in <code>page-structure.xsl</code> that are not included there</li>
<li>The scripts are a very old version of modernizr which is not even available on npm, html5shiv, and respond.js</li>
<li>For modernizr I can simply download a static copy and put it in <code>0_CGIAR/scripts</code> and concatenate it into <code>theme.js</code></li>
<li>For the others, I can revert to using them from bower&rsquo;s <code>vendor</code> directory, which is installed by the parent XMLUI Mirage 2 theme</li>
<li>During this process I also realized that <code>mvn clean</code> doesn&rsquo;t actually clean everything, and <code>dspace/modules/xmlui-mirage2/target</code> is remaining from previous builds and contains a bunch of shit from previous builds (including all the themes which I was trying to build without!)
<ul>
<li>This must be a DSpace bug, but I should theoretically check on vanilla DSpace and then file a bug&hellip;</li>
</ul>
</li>
</ul>
</li>
</ul>
2020-04-17 18:40:30 +02:00
<h2 id="2020-04-17">2020-04-17</h2>
<ul>
<li>Atmire responded to some of the issues I raised earlier this week about the DSpace 6 pull request
<ul>
<li>They said they don&rsquo;t think the glyphicon encoding issue is due to their changes, but I built a new clean version of the vanilla <code>6_x-dev</code> branch from before their pull request and it <em>does not</em> have the encoding issue in the Mirage 2 header trails</li>
<li>Also, they said we need to use something called <code>AtomicStatisticsUpdateCLI</code> to do the Solr legacy integer ID to UUID conversion so I asked for more information about that workflow</li>
</ul>
</li>
</ul>
2020-04-20 11:41:21 +02:00
<h2 id="2020-04-20">2020-04-20</h2>
<ul>
<li>Looking into a high rate of outgoing bandwidth from yesterday on CGSpace (linode18):</li>
</ul>
<pre><code># cat /var/log/nginx/*.log /var/log/nginx/*.log.1 | grep -E &quot;19/Apr/2020:0[6789]&quot; | goaccess --log-format=COMBINED -
</code></pre><ul>
<li>One host in Russia (91.241.19.70) download 23GiB over those few hours in the morning
<ul>
<li>It looks like all the requests were for one single item&rsquo;s bitstreams:</li>
</ul>
</li>
</ul>
<pre><code># grep -c 91.241.19.70 /var/log/nginx/access.log.1
8900
# grep 91.241.19.70 /var/log/nginx/access.log.1 | grep -c '10568/35187'
8900
</code></pre><ul>
<li>I thought the host might have been Yandex misbehaving, but its user agent is:</li>
</ul>
<pre><code>Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_3; nl-nl) AppleWebKit/527 (KHTML, like Gecko) Version/3.1.1 Safari/525.20
</code></pre><ul>
<li>I will purge that IP from the Solr statistics using my <code>check-spider-ip-hits.sh</code> script:</li>
</ul>
<pre><code>$ ./check-spider-ip-hits.sh -d -f /tmp/ip -p
(DEBUG) Using spider IPs file: /tmp/ip
(DEBUG) Checking for hits from spider IP: 91.241.19.70
Purging 8909 hits from 91.241.19.70 in statistics
Total number of bot hits purged: 8909
</code></pre><ul>
<li>While investigating that I noticed ORCID identifiers missing from a few authors names, so I added them with my <code>add-orcid-identifiers.py</code> script:</li>
</ul>
<pre><code>$ ./add-orcid-identifiers-csv.py -i 2020-04-20-add-orcids.csv -db dspace -u dspace -p 'fuuu' -d
</code></pre><ul>
<li>The contents of <code>2020-04-20-add-orcids.csv</code> was:</li>
</ul>
<pre><code>dc.contributor.author,cg.creator.id
&quot;Schut, Marc&quot;,&quot;Marc Schut: 0000-0002-3361-4581&quot;
&quot;Schut, M.&quot;,&quot;Marc Schut: 0000-0002-3361-4581&quot;
&quot;Kamau, G.&quot;,&quot;Geoffrey Kamau: 0000-0002-6995-4801&quot;
&quot;Kamau, G&quot;,&quot;Geoffrey Kamau: 0000-0002-6995-4801&quot;
&quot;Triomphe, Bernard&quot;,&quot;Bernard Triomphe: 0000-0001-6657-3002&quot;
&quot;Waters-Bayer, Ann&quot;,&quot;Ann Waters-Bayer: 0000-0003-1887-7903&quot;
&quot;Klerkx, Laurens&quot;,&quot;Laurens Klerkx: 0000-0002-1664-886X&quot;
</code></pre><ul>
<li>I confirmed some of the authors&rsquo; names from the report itself, then by looking at their profiles on ORCID.org</li>
<li>Add new ILRI subject &ldquo;COVID19&rdquo; to the <code>5_x-prod</code> branch</li>
<li>Add new CCAFS Phase II project tags to the <code>5_x-prod</code> branch</li>
<li>I will deploy these to CGSpace in the next few days</li>
</ul>
2020-04-24 20:36:23 +02:00
<h2 id="2020-04-24">2020-04-24</h2>
<ul>
<li>Atmire responded to my ticket about the  issue with glypicons and said their test server does not show this same issue
<ul>
<li>They asked if I am using the <code>JAVA_OPTS=-Dfile.encoding=UTF-8</code> when building DSpace and running Tomcat</li>
<li>I set it explicitly for Maven and Ant just now (and cleared all XMLUI caches) but the issue is still there</li>
<li>I asked them if they are building on macOS or Linux, and which Node.js version (I&rsquo;m using 10.20.1, which is the current LTS branch).</li>
</ul>
</li>
</ul>
2020-04-26 09:41:27 +02:00
<h2 id="2020-04-25">2020-04-25</h2>
<ul>
<li>I researched a bit more about the  issue with glypicons and realized it&rsquo;s due to <a href="https://github.com/twbs/bootstrap-sass/issues/919">a bug in libsass</a>
<ul>
<li>I have Ruby sass version 3.4.25 installed in my local environment, but DSpace Mirage 2 is supposed to build with 3.3.14</li>
<li>Downgrading the version fixes it, though I wonder: why did I not have this issue on the <code>6.x-dev</code> branch before Atmire&rsquo;s pull request, and also on <code>5_x-prod</code> where I&rsquo;ve been building for a few months here&hellip;</li>
</ul>
</li>
<li>I deployed the latest <code>5_x-prod</code> branch on CGSpace (linode18), ran all updates, and rebooted the server
<ul>
<li>This includes the &ldquo;COVID19&rdquo; ILRI subject, the new CCAFS Phase II project tags, and the changes to an ILRI author name</li>
<li>After restarting the server I had to restart Tomcat three times before all Solr statistics cores loaded properly.</li>
<li>After that I started a full Discovery reindexing to pick up some author changes I made last week:</li>
</ul>
</li>
</ul>
<pre><code>$ export JAVA_OPTS=&quot;-Dfile.encoding=UTF-8 -Xmx1024m&quot;
$ time chrt -i 0 ionice -c2 -n7 nice -n19 dspace index-discovery -b
</code></pre><ul>
<li>I ran the <code>dspace cleanup -v</code> process on CGSpace and got an error:</li>
</ul>
<pre><code>Error: ERROR: update or delete on table &quot;bitstream&quot; violates foreign key constraint &quot;bundle_primary_bitstream_id_fkey&quot; on table &quot;bundle&quot;
Detail: Key (bitstream_id)=(184980) is still referenced from table &quot;bundle&quot;.
</code></pre><ul>
<li>The solution is, as always:</li>
</ul>
<pre><code>$ psql -d dspace -U dspace -c 'update bundle set primary_bitstream_id=NULL where primary_bitstream_id in (183996);'
UPDATE 1
2020-04-27 08:17:08 +02:00
</code></pre><ul>
<li>I spent some time working on the XMLUI themes in DSpace 6
<ul>
<li>Atmire&rsquo;s pull request modifies <code>pom.xml</code> to <em>not</em> exclude <code>node_modules</code>, which means an extra ~260,000 files get copied to our installation folder because of all the themes</li>
<li>I worked on the <code>Gruntfile.js</code> to copy Font Awesome and Bootstrap glyphicon fonts out of <code>node_modules</code> and into <code>fonts</code> at build time, but still <code>jquery-ui.min.css</code> was being referenced as a <code>url()</code> in CSS</li>
<li>SASS can include imported CSS in your compiled CSS—instead of including an <code>@import url(..)</code> if you import it without the &ldquo;.css&rdquo;, but our version of Ruby SASS doesn&rsquo;t support that</li>
<li>I hacked <code>Gruntfile.js</code> to use <code>dart-sass</code> instead of Ruby <code>compass</code> (including installing compass&rsquo;s mixins via npm!) but then <a href="https://github.com/sass/dart-sass/issues/345">dart-sass converts all the glyphicon ASCII escape codes to Unicode literals</a> and they show up garbled in Firefox</li>
<li>I tried to use <code>node-sass</code> instead of dart-sass and it doesn&rsquo;t replace the ASCII escapes with literals, but then I get the the  issue with the glyphicon in the header trail again! Back to square one!</li>
<li>So that was a waste of five hours&hellip;</li>
<li>I might just leave this <a href="https://github.com/twbs/bootstrap-sass/issues/919">tiny hack</a> in <code>0_CGIAR/styles/_style.scss</code> to override this and be done with it:</li>
</ul>
</li>
</ul>
<pre><code>.breadcrumb &gt; li + li:before {
content: &quot;/\00a0&quot;;
}
2020-04-27 15:39:04 +02:00
</code></pre><h2 id="2020-04-27">2020-04-27</h2>
<ul>
<li>File an issue on DSpace Jira about the <a href="https://jira.lyrasis.org/browse/DS-4492"><code>mvn clean</code> task not removing the Mirage 2 target directory</a></li>
<li>My changes to DSpace XMLUI Mirage 2 build process mean that we don&rsquo;t need Ruby gems at all anymore! We can completely build without them!</li>
</ul>
<!-- raw HTML omitted -->
2020-04-02 09:54:46 +02:00
</article>
</div> <!-- /.blog-main -->
<aside class="col-sm-3 ml-auto blog-sidebar">
<section class="sidebar-module">
<h4>Recent Posts</h4>
<ol class="list-unstyled">
<li><a href="/cgspace-notes/2020-04/">April, 2020</a></li>
<li><a href="/cgspace-notes/2020-03/">March, 2020</a></li>
<li><a href="/cgspace-notes/2020-02/">February, 2020</a></li>
<li><a href="/cgspace-notes/2020-01/">January, 2020</a></li>
<li><a href="/cgspace-notes/2019-12/">December, 2019</a></li>
</ol>
</section>
<section class="sidebar-module">
<h4>Links</h4>
<ol class="list-unstyled">
<li><a href="https://cgspace.cgiar.org">CGSpace</a></li>
<li><a href="https://dspacetest.cgiar.org">DSpace Test</a></li>
<li><a href="https://github.com/ilri/DSpace">CGSpace @ GitHub</a></li>
</ol>
</section>
</aside>
</div> <!-- /.row -->
</div> <!-- /.container -->
<footer class="blog-footer">
<p dir="auto">
Blog template created by <a href="https://twitter.com/mdo">@mdo</a>, ported to Hugo by <a href='https://twitter.com/mralanorth'>@mralanorth</a>.
</p>
<p>
<a href="#">Back to top</a>
</p>
</footer>
</body>
</html>