diff --git a/.gitattributes b/.gitattributes index 03b42152e9..c00b03e686 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,6 +1,12 @@ # Auto detect text files and perform LF normalization * text=auto +# Ensure Unix files always keep Unix line endings +*.sh text eol=lf + +# Ensure Windows files always keep Windows line endings +*.bat text eol=crlf + # Standard to msysgit *.doc diff=astextplain *.DOC diff=astextplain diff --git a/Dockerfile.cli.jdk8 b/Dockerfile.cli.jdk8 new file mode 100644 index 0000000000..f541fdc177 --- /dev/null +++ b/Dockerfile.cli.jdk8 @@ -0,0 +1,60 @@ +# This image will be published as dspace/dspace +# See https://dspace-labs.github.io/DSpace-Docker-Images/ for usage details +# +# This version is JDK8 compatible +# - openjdk:8-jdk +# - ANT 1.10.7 +# - maven:3-jdk-8 +# - note: +# - default tag for branch: dspace/dspace-cli: dspace/dspace-cli:dspace-5_x + +# Step 1 - Run Maven Build +FROM dspace/dspace-dependencies:dspace-5_x-jdk8 as build +ARG TARGET_DIR=dspace-installer +WORKDIR /app + +# The dspace-install directory will be written to /install +RUN mkdir /install \ + && chown -Rv dspace: /install + +USER dspace + +# Copy the DSpace source code into the workdir (excluding .dockerignore contents) +ADD --chown=dspace . /app/ +COPY --chown=dspace dspace/src/main/docker/build.properties /app/build.properties + +# Build DSpace. Copy the dspace-install directory to /install. Clean up the build to keep the docker image small +RUN mvn package -P'!dspace-solr,!dspace-jspui,!dspace-xmlui,!dspace-rest,!dspace-xmlui-mirage2,!dspace-rdf,!dspace-sword,!dspace-swordv2' && \ + mv /app/dspace/target/${TARGET_DIR}/* /install && \ + mvn clean + +# Step 2 - Run Ant Deploy +FROM openjdk:8-jdk as ant_build +ARG TARGET_DIR=dspace-installer +COPY --from=build /install /dspace-src +WORKDIR /dspace-src + +# Create the initial install deployment using ANT +ENV ANT_VERSION 1.10.7 +ENV ANT_HOME /tmp/ant-$ANT_VERSION +ENV PATH $ANT_HOME/bin:$PATH + +RUN mkdir $ANT_HOME && \ + wget -qO- "https://archive.apache.org/dist/ant/binaries/apache-ant-$ANT_VERSION-bin.tar.gz" | tar -zx --strip-components=1 -C $ANT_HOME + +RUN ant init_installation update_configs update_code + +# Step 3 - Run jdk +# Create a new jdk image that does not retain the the build directory contents +FROM openjdk:8-jdk +ENV DSPACE_INSTALL=/dspace +COPY --from=ant_build /dspace $DSPACE_INSTALL + +ENV JAVA_OPTS=-Xmx1000m + +# This script is used to parse environment variables to configs in dspace.cfg +# It is not executed in this Docker file, so it's up to docker-compose to call it. +COPY dspace/src/main/docker/parse_env_to_configs.sh $DSPACE_INSTALL/bin/parse_env_to_configs.sh + +# Ensure all scripts are executable +RUN chmod +x $DSPACE_INSTALL/bin/* \ No newline at end of file diff --git a/Dockerfile.jdk8 b/Dockerfile.jdk8 index be9fb30b4a..05e7aac31a 100644 --- a/Dockerfile.jdk8 +++ b/Dockerfile.jdk8 @@ -60,4 +60,13 @@ RUN ln -s $DSPACE_INSTALL/webapps/solr /usr/local/tomcat/webapps/solr && \ ln -s $DSPACE_INSTALL/webapps/oai /usr/local/tomcat/webapps/oai && \ ln -s $DSPACE_INSTALL/webapps/rdf /usr/local/tomcat/webapps/rdf && \ ln -s $DSPACE_INSTALL/webapps/sword /usr/local/tomcat/webapps/sword && \ - ln -s $DSPACE_INSTALL/webapps/swordv2 /usr/local/tomcat/webapps/swordv2 \ No newline at end of file + ln -s $DSPACE_INSTALL/webapps/swordv2 /usr/local/tomcat/webapps/swordv2 + +COPY dspace/src/main/docker/parse_env_to_configs.sh $DSPACE_INSTALL/bin/parse_env_to_configs.sh + +# Ensure all scripts are executable +RUN chmod +x $DSPACE_INSTALL/bin/* + +# On startup run this command to parse environment variables to configs in dspace.cfg +# Then start Tomcat +CMD ["sh", "-c", "$DSPACE_INSTALL/bin/parse_env_to_configs.sh && catalina.sh run"] \ No newline at end of file diff --git a/Dockerfile.jdk8-test b/Dockerfile.jdk8-test index f12bc8e3ee..83fa8ef827 100644 --- a/Dockerfile.jdk8-test +++ b/Dockerfile.jdk8-test @@ -66,4 +66,13 @@ COPY dspace/src/main/docker/test/solr_web.xml $DSPACE_INSTALL/webapps/solr/WEB-I COPY dspace/src/main/docker/test/rest_web.xml $DSPACE_INSTALL/webapps/rest/WEB-INF/web.xml RUN sed -i -e "s|\${dspace.dir}|$DSPACE_INSTALL|" $DSPACE_INSTALL/webapps/solr/WEB-INF/web.xml && \ - sed -i -e "s|\${dspace.dir}|$DSPACE_INSTALL|" $DSPACE_INSTALL/webapps/rest/WEB-INF/web.xml \ No newline at end of file + sed -i -e "s|\${dspace.dir}|$DSPACE_INSTALL|" $DSPACE_INSTALL/webapps/rest/WEB-INF/web.xml + +COPY dspace/src/main/docker/parse_env_to_configs.sh $DSPACE_INSTALL/bin/parse_env_to_configs.sh + +# Ensure all scripts are executable +RUN chmod +x $DSPACE_INSTALL/bin/* + +# On startup run this command to parse environment variables to configs in dspace.cfg +# Then start Tomcat +CMD ["sh", "-c", "$DSPACE_INSTALL/bin/parse_env_to_configs.sh && catalina.sh run"] \ No newline at end of file diff --git a/LICENSE b/LICENSE index b7cb98fe83..9972d8b086 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ -DSpace source code BSD License: +BSD 3-Clause License -Copyright (c) 2002-2020, LYRASIS. All rights reserved. +Copyright (c) 2002-2022, LYRASIS. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -13,13 +13,12 @@ notice, this list of conditions and the following disclaimer. notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name DuraSpace nor the name of the DSpace Foundation -nor the names of its contributors may be used to endorse or promote -products derived from this software without specific prior written -permission. +- Neither the name of the copyright holder nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, @@ -29,11 +28,4 @@ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - - -DSpace uses third-party libraries which may be distributed under -different licenses to the above. Information about these licenses -is detailed in the LICENSES_THIRD_PARTY file at the root of the source -tree. You must agree to the terms of these licenses, in addition to -the above DSpace source code license, in order to use this software. +DAMAGE. \ No newline at end of file diff --git a/NOTICE b/NOTICE index 6743fea511..010c89a4bb 100644 --- a/NOTICE +++ b/NOTICE @@ -1,3 +1,13 @@ +Licenses of Third-Party Libraries +================================= + +DSpace uses third-party libraries which may be distributed under +different licenses than specified in our LICENSE file. Information +about these licenses is detailed in the LICENSES_THIRD_PARTY file at +the root of the source tree. You must agree to the terms of these +licenses, in addition to the DSpace source code license, in order to +use this software. + Licensing Notices ================= diff --git a/README b/README index 5b57b13934..7cfae051ab 100644 --- a/README +++ b/README @@ -1,18 +1,16 @@ DSpace version information can be viewed online at - - https://wiki.duraspace.org/display/DSDOC/ + - https://wiki.lyrasis.org/display/DSDOC/ Documentation for the most recent stable release(s) may be downloaded or viewed online at - http://www.dspace.org/latest-release/ - - https://wiki.duraspace.org/display/DSDOC/ - - http://sourceforge.net/projects/dspace/files/DSpace%20Stable/ - (select a version and read DSpace-Manual.pdf) + - https://wiki.lyrasis.org/display/DSDOC/ Installation instructions are to be found in that documentation. In addition, a listing of all known contributors to DSpace software can be found online at: -https://wiki.duraspace.org/display/DSPACE/DSpaceContributors +https://wiki.lyrasis.org/display/DSPACE/DSpaceContributors Installation instructions for other versions may be different, so you are encouraged to obtain the appropriate version of the Documentation @@ -26,20 +24,20 @@ or just: - git clone git://github.com/DSpace/DSpace.git -Please refer any further problems to the dspace-tech@lists.sourceforge.net +Please refer any further problems to the dspace-tech@googlegroups.com mailing list. - - http://sourceforge.net/mail/?group_id=19984 + - https://groups.google.com/d/forum/dspace-tech -Detailed Issue Tracking for DSpace is done on our JIRA Issue Tracker +Detailed Issue Tracking for DSpace is done in GitHub issues - - https://jira.duraspace.org/browse/DS + - https://github.com/DSpace/DSpace/issues To contribute to DSpace, please see: - - https://wiki.duraspace.org/display/DSPACE/How+to+Contribute+to+DSpace + - https://wiki.lyrasis.org/display/DSPACE/How+to+Contribute+to+DSpace For more details about DSpace, including a list of service providers, @@ -47,8 +45,5 @@ places to seek help, news articles and lists of other users, please see: - http://www.dspace.org/ - -DSpace source code licensing information available online at: - - http://www.dspace.org/license/ - -Copyright (c) 2002-2015, DuraSpace. All rights reserved. +DSpace source code is freely available under a standard [BSD 3-Clause license](https://opensource.org/licenses/BSD-3-Clause). +The full license is available at http://www.dspace.org/license/ diff --git a/docker-compose-cli.yml b/docker-compose-cli.yml new file mode 100644 index 0000000000..7a18edb241 --- /dev/null +++ b/docker-compose-cli.yml @@ -0,0 +1,43 @@ +# +# The contents of this file are subject to the license and copyright +# detailed in the LICENSE and NOTICE files at the root of the source +# tree and available online at +# +# http://www.dspace.org/license/ +# + +version: "3.7" + +services: + dspace-cli: + image: "dspace/dspace-cli:${DSPACE_VER:-dspace-5_x}" + container_name: dspace-cli + build: + context: . + dockerfile: Dockerfile.cli.jdk8 + environment: + # Env vars with double underbars in names will be replaced with periods and written to dspace.cfg + # The defaul values for dspace.cfg will be provided here + # __D__ -> - + # __P__ -> . + - dspace__P__dir=/dspace + - db__P__url=jdbc:postgresql://dspacedb:5432/dspace + - dspace__P__hostname=localhost + - dspace__P__baseUrl=http://localhost:8080 + - dspace__P__name=DSpace Started with Docker Compose + - solr__P__server=http://dspace:8080/solr + volumes: + - assetstore:/dspace/assetstore + entrypoint: /dspace/bin/parse_env_to_configs.sh + # Any commands passed here will be forwarded to /dspace/bin/dspace by parse_env_to_configs.sh (see its code) + command: help + networks: + - dspacenet + tty: true + stdin_open: true + +volumes: + assetstore: + +networks: + dspacenet: \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000000..ed62365e2e --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,64 @@ +# +# The contents of this file are subject to the license and copyright +# detailed in the LICENSE and NOTICE files at the root of the source +# tree and available online at +# +# http://www.dspace.org/license/ +# + +version: '3.7' +networks: + dspacenet: +services: + dspace: + container_name: dspace + depends_on: + - dspacedb + image: "${DOCKER_OWNER:-dspace}/dspace:${DSPACE_VER:-dspace-5_x-jdk8-test}" + environment: + # Env vars with double underbars in names will be replaced with periods and written to dspace.cfg + # The defaul values for dspace.cfg will be provided here + # __D__ -> - + # __P__ -> . + - dspace__P__dir=/dspace + - db__P__url=jdbc:postgresql://dspacedb:5432/dspace + - dspace__P__hostname=localhost + - dspace__P__baseUrl=http://localhost:8080 + - dspace__P__name=DSpace Started with Docker Compose + - solr__P__server=http://localhost:8080/solr + build: + context: . + dockerfile: Dockerfile.jdk8-test + networks: + dspacenet: + ports: + - published: 8080 + target: 8080 + stdin_open: true + tty: true + volumes: + - ./dspace/src/main/docker-compose/xmlui.xconf:/dspace/config/xmlui.xconf + - ./dspace/src/main/docker-compose/parse_configs.sh:/dspace/bin/parse_configs.sh + - assetstore:/dspace/assetstore + - solr_authority:/dspace/solr/authority/data + - solr_oai:/dspace/solr/oai/data + - solr_search:/dspace/solr/search/data + - solr_statistics:/dspace/solr/statistics/data + dspacedb: + container_name: dspacedb + environment: + PGDATA: /pgdata + image: dspace/dspace-postgres-pgcrypto + networks: + dspacenet: + stdin_open: true + tty: true + volumes: + - pgdata:/pgdata +volumes: + assetstore: + pgdata: + solr_authority: + solr_oai: + solr_search: + solr_statistics: \ No newline at end of file diff --git a/dspace-api/src/main/resources/Messages.properties b/dspace-api/src/main/resources/Messages.properties index 20dbf786a7..d23e13f024 100644 --- a/dspace-api/src/main/resources/Messages.properties +++ b/dspace-api/src/main/resources/Messages.properties @@ -599,7 +599,7 @@ jsp.home.search1 = Search jsp.home.search2 = Enter some text in the box below to search DSpace. jsp.home.title = Home jsp.layout.footer-default.feedback = Feedback -jsp.layout.footer-default.text = DSpace Software Copyright © 2002-2013  Duraspace +jsp.layout.footer-default.text = DSpace Software Copyright © 2002-2022  LYRASIS jsp.layout.footer-default.theme-by = Theme by jsp.layout.header-default.about = About DSpace Software jsp.layout.header-default.alt = DSpace diff --git a/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/README.md b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/README.md index 21c0b231fd..146a0754b5 100644 --- a/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/README.md +++ b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/README.md @@ -76,14 +76,14 @@ to upper case. Oracle complains with ORA-01408 if you attempt to create an index on a column which has already had the UNIQUE contraint added (such an index is implicit in maintaining the uniqueness -of the column). See [DS-1370](https://jira.duraspace.org/browse/DS-1370) for details. +of the column). See [DS-1370](https://github.com/DSpace/DSpace/issues/4739) for details. ## Using the update-sequences.sql script The `update-sequences.sql` script in this directory may still be used to update your internal database counts if you feel they have gotten out of "sync". This may sometimes occur after large restores of content (e.g. when using the DSpace -[AIP Backup and Restore](https://wiki.duraspace.org/display/DSDOC5x/AIP+Backup+and+Restore) +[AIP Backup and Restore](https://wiki.lyrasis.org/display/DSDOC5x/AIP+Backup+and+Restore) feature). This `update-sequences.sql` script can be executed by running diff --git a/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/README.md b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/README.md index 1b87efbd3f..cc8d0ae85e 100644 --- a/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/README.md +++ b/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/README.md @@ -22,7 +22,7 @@ Please see the Flyway Documentation for more information: http://flywaydb.org/ The `update-sequences.sql` script in this directory may still be used to update your internal database counts if you feel they have gotten out of "sync". This may sometimes occur after large restores of content (e.g. when using the DSpace -[AIP Backup and Restore](https://wiki.duraspace.org/display/DSDOC5x/AIP+Backup+and+Restore) +[AIP Backup and Restore](https://wiki.lyrasis.org/display/DSDOC5x/AIP+Backup+and+Restore) feature). This `update-sequences.sql` script can be executed by running diff --git a/dspace-xmlui-mirage2/src/main/webapp/xsl/core/page-structure.xsl b/dspace-xmlui-mirage2/src/main/webapp/xsl/core/page-structure.xsl index 85ecd49637..040bac45de 100644 --- a/dspace-xmlui-mirage2/src/main/webapp/xsl/core/page-structure.xsl +++ b/dspace-xmlui-mirage2/src/main/webapp/xsl/core/page-structure.xsl @@ -695,7 +695,7 @@
- DSpace software copyright © 2002-2015  DuraSpace + DSpace software copyright © 2002-2022  LYRASIS
diff --git a/dspace-xmlui/src/main/webapp/themes/Mirage/lib/xsl/core/page-structure.xsl b/dspace-xmlui/src/main/webapp/themes/Mirage/lib/xsl/core/page-structure.xsl index 34bd2e3f46..8fc18b02c3 100644 --- a/dspace-xmlui/src/main/webapp/themes/Mirage/lib/xsl/core/page-structure.xsl +++ b/dspace-xmlui/src/main/webapp/themes/Mirage/lib/xsl/core/page-structure.xsl @@ -584,7 +584,7 @@