diff --git a/metacat/Dockerfile b/metacat/Dockerfile index 749ab46..40d15a0 100644 --- a/metacat/Dockerfile +++ b/metacat/Dockerfile @@ -16,6 +16,7 @@ ADD metacat-bin-${METACAT_VERSION}.tar.gz /tmp/ ADD metacat/catalina.properties /tmp/ ADD metacat/server.xml.patch /tmp/ ADD metacat/skins /tmp/skins +ADD metacat/files /tmp/files ADD image_version.yml image_version.yml @@ -31,11 +32,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ procps \ logrotate \ rsync \ - && rm -rf /var/lib/apt/lists/* \ + && rm -rfv /var/lib/apt/lists/* \ && unzip /tmp/metacat-index.war -d /usr/local/tomcat/webapps/metacat-index \ && unzip /tmp/metacat.war -d /usr/local/tomcat/webapps/metacat \ + && rm -rfv /usr/local/tomcat/webapps/metacat/WEB-INF/lib/osti-elink-*.jar \ + && rsync -auv /tmp/files/ /usr/local/tomcat/webapps/metacat/ \ && cat /tmp/catalina.properties >> /usr/local/tomcat/conf/catalina.properties \ - && rm -rf /tmp/*.war + && rm -rvf /tmp/*.war /tmp/files /tmp/catalina.properties ADD metacat/metacat.conf /etc/logrotate.d/ diff --git a/metacat/docker-entrypoint.sh b/metacat/docker-entrypoint.sh index d3e9209..89157a5 100755 --- a/metacat/docker-entrypoint.sh +++ b/metacat/docker-entrypoint.sh @@ -53,7 +53,6 @@ if [ "$1" = 'bin/catalina.sh' ]; then mv $METACAT_DEFAULT_DIR $METACAT_DIR fi - # change the context in the web.xml file apply_context.py metacat ${METACAT_APP_CONTEXT} @@ -197,7 +196,6 @@ if [ "$1" = 'bin/catalina.sh' ]; then echo "cd ${METACAT_DIR}/WEB-INF/scripts/bash" cd ${METACAT_DIR}/WEB-INF/scripts/bash - ## Note: the Java bcrypt library only supports '2a' format hashes, so override the default python behavior ## so that the hases created start with '2a' rather than '2b' bash ./authFileManager.sh useradd \ @@ -254,13 +252,17 @@ if [ "$1" = 'bin/catalina.sh' ]; then echo # Login to Metacat Admin and start a session (cookie.txt) - curl -v -X POST \ - --data "loginAction=Login&configureType=login&processForm=true&password=${ADMINPASS}&username=${ADMIN}" \ + curl -v --data "loginAction=Login&configureType=login&processForm=true&password=${ADMINPASS}&username=${ADMIN}" \ --cookie-jar /tmp/cookie.txt http://localhost:8080/${METACAT_APP_CONTEXT}/admin > /tmp/login_result.txt 2>&1 - # Test the the admin logged in successfully - [ -f /tmp/login_result.txt ] && [ $(grep "User logged in as:" /tmp/login_result.txt| wc -l) -eq 1 ] || (echo "Administrator not logged in!!" && grep "" /tmp/login_result.txt && exit -4) + if [ -f /tmp/login_result.txt ] && [ $(grep "User logged in as:" /tmp/login_result.txt| wc -l) -eq 1 ]; then + echo "Administrator logged in successfully" + else + echo "ERROR: Administrator not logged in!!" + grep "" /tmp/login_result.txt || cat /tmp/login_result.txt + exit 4 + fi echo echo '**************************************' diff --git a/metacat/files/WEB-INF/lib/osti-elink-2.0.0.jar b/metacat/files/WEB-INF/lib/osti-elink-2.0.0.jar new file mode 100644 index 0000000..dd88e33 Binary files /dev/null and b/metacat/files/WEB-INF/lib/osti-elink-2.0.0.jar differ diff --git a/metacat/files/style/common/osti/eml2osti.xsl b/metacat/files/style/common/osti/eml2osti.xsl new file mode 100644 index 0000000..68d19f4 --- /dev/null +++ b/metacat/files/style/common/osti/eml2osti.xsl @@ -0,0 +1,353 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <xsl:value-of select="title"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file