Skip to content

Commit

Permalink
Merge branch 'develop' into 8184-preview-url-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sekmiller committed Nov 19, 2024
2 parents 18db323 + c814ee7 commit 79c9ebe
Show file tree
Hide file tree
Showing 18 changed files with 525 additions and 386 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/deploy_beta_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
Expand All @@ -32,7 +32,7 @@ jobs:
run: echo "war_file=$(ls *.war | head -1)">> $GITHUB_ENV

- name: Upload war artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: built-app
path: ./target/${{ env.war_file }}
Expand All @@ -42,10 +42,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Download war artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: built-app
path: ./
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/maven_unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ jobs:
steps:
# TODO: As part of #10618 change to setup-maven custom action
# Basic setup chores
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.jdk }}
distribution: temurin
Expand All @@ -57,7 +57,7 @@ jobs:

# Upload the built war file. For download, it will be wrapped in a ZIP by GitHub.
# See also https://github.com/actions/upload-artifact#zipped-artifact-downloads
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: dataverse-java${{ matrix.jdk }}.war
path: target/dataverse*.war
Expand All @@ -67,7 +67,7 @@ jobs:
- run: |
tar -cvf java-builddir.tar target
tar -cvf java-m2-selection.tar ~/.m2/repository/io/gdcc/dataverse-*
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: java-artifacts
path: |
Expand Down Expand Up @@ -98,16 +98,16 @@ jobs:
steps:
# TODO: As part of #10618 change to setup-maven custom action
# Basic setup chores
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.jdk }}
distribution: temurin
cache: maven

# Get the build output from the unit test job
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: java-artifacts
- run: |
Expand All @@ -119,7 +119,7 @@ jobs:

# Wrap up and send to coverage job
- run: tar -cvf java-reportdir.tar target/site
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: java-reportdir
path: java-reportdir.tar
Expand All @@ -132,15 +132,15 @@ jobs:
steps:
# TODO: As part of #10618 change to setup-maven custom action
# Basic setup chores
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: temurin
cache: maven

# Get the build output from the integration test job
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: java-reportdir
- run: tar -xvf java-reportdir.tar
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Custom questions in Guestbooks can now be more than 255 characters and the bug causing a silent failure when questions were longer than this limit has been fixed.
4 changes: 4 additions & 0 deletions doc/release-notes/10661-guestbook-email-bug-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

### Guestbook Email Validation Bug fix

Guestbook UI Form: Email address is now checked for valid email format
3 changes: 3 additions & 0 deletions doc/release-notes/10814-Differencing improvement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### More Scalable Dataset Version Differencing

Differencing between dataset versions, which is done during dataset edit operations and to populate the dataset page versions table has been made signficantly more scalable.
3 changes: 2 additions & 1 deletion doc/sphinx-guides/source/api/native-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3618,7 +3618,8 @@ The fully expanded example above (without environment variables) looks like this
Currently the following methods are used to detect file types:
- The file type detected by the browser (or sent via API).
- JHOVE: https://jhove.openpreservation.org
- Custom code that reads the first few bytes. As explained at :ref:`s3-direct-upload-features-disabled`, this method of file type detection is not utilized during direct upload to S3, since by nature of direct upload Dataverse never sees the contents of the file. However, this code is utilized when the "redetect" API is used.
- JHOVE: https://jhove.openpreservation.org . Note that the same applies about direct upload to S3 and the "redetect" API.
- The file extension (e.g. ".ipybn") is used, defined in a file called ``MimeTypeDetectionByFileExtension.properties``.
- The file name (e.g. "Dockerfile") is used, defined in a file called ``MimeTypeDetectionByFileName.properties``.
Expand Down
1 change: 1 addition & 0 deletions doc/sphinx-guides/source/developers/big-data-support.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Features that are Disabled if S3 Direct Upload is Enabled
The following features are disabled when S3 direct upload is enabled.

- Unzipping of zip files. (See :ref:`compressed-files`.)
- Detection of file type based on JHOVE and custom code that reads the first few bytes. (See :ref:`redetect-file-type`.)
- Extraction of metadata from FITS files. (See :ref:`fits`.)
- Creation of NcML auxiliary files (See :ref:`netcdf-and-hdf5`.)
- Extraction of a geospatial bounding box from NetCDF and HDF5 files (see :ref:`netcdf-and-hdf5`) unless :ref:`dataverse.netcdf.geo-extract-s3-direct-upload` is set to true.
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinx-guides/source/developers/selinux.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SELinux
Introduction
------------

The ``shibboleth.te`` file below that is mentioned in the :doc:`/installation/shibboleth` section of the Installation Guide was created on CentOS 6 as part of https://github.com/IQSS/dataverse/issues/3406 but may need to be revised for future versions of RHEL/CentOS (pull requests welcome!). The file is versioned with the docs and can be found in the following location:
The ``shibboleth.te`` file below that was mentioned in the :doc:`/installation/shibboleth` section of the Installation Guide was created on CentOS 6 as part of https://github.com/IQSS/dataverse/issues/3406 but may need to be revised for future versions of RHEL/CentOS (pull requests welcome!). The file is versioned with the docs and can be found in the following location:

``doc/sphinx-guides/source/_static/installation/files/etc/selinux/targeted/src/policy/domains/misc/shibboleth.te``

Expand Down
44 changes: 11 additions & 33 deletions doc/sphinx-guides/source/installation/shibboleth.rst
Original file line number Diff line number Diff line change
Expand Up @@ -205,43 +205,21 @@ The first and easiest option is to set ``SELINUX=permisive`` in ``/etc/selinux/c
Reconfigure SELinux to Accommodate Shibboleth
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The second (more involved) option is to use the ``checkmodule``, ``semodule_package``, and ``semodule`` tools to apply a local policy to make Shibboleth work with SELinux. Let's get started.
Issue the following commands to allow Shibboleth to function when SELinux is enabled:

Put Type Enforcement (TE) File in misc directory
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Copy and paste or download the :download:`shibboleth.te <../_static/installation/files/etc/selinux/targeted/src/policy/domains/misc/shibboleth.te>` Type Enforcement (TE) file below and put it at ``/etc/selinux/targeted/src/policy/domains/misc/shibboleth.te``.

.. literalinclude:: ../_static/installation/files/etc/selinux/targeted/src/policy/domains/misc/shibboleth.te
:language: text

(If you would like to know where the ``shibboleth.te`` came from and how to hack on it, please see the :doc:`/developers/selinux` section of the Developer Guide. Pull requests are welcome!)

Navigate to misc directory
^^^^^^^^^^^^^^^^^^^^^^^^^^

``cd /etc/selinux/targeted/src/policy/domains/misc``

Run checkmodule
^^^^^^^^^^^^^^^

``checkmodule -M -m -o shibboleth.mod shibboleth.te``

Run semodule_package
^^^^^^^^^^^^^^^^^^^^

``semodule_package -o shibboleth.pp -m shibboleth.mod``

Silent is golden. No output is expected.

Run semodule
^^^^^^^^^^^^
.. code-block:: none
``semodule -i shibboleth.pp``
# Allow httpd to connect to network and read content
sudo /usr/sbin/setsebool -P httpd_can_network_connect 1
sudo /usr/sbin/setsebool -P httpd_read_user_content 1
Silent is golden. No output is expected. This will place a file in ``/etc/selinux/targeted/modules/active/modules/shibboleth.pp`` and include "shibboleth" in the output of ``semodule -l``. See the ``semodule`` man page if you ever want to remove or disable the module you just added.
# Allow httpd to connect to Shib socket
sudo grep httpd_t /var/log/audit/audit.log |/usr/bin/audit2allow -M allow_httpd_shibd_sock
sudo /usr/sbin/semodule -i allow_httpd_shibd_sock.pp
Congrats! You've made the creator of https://stopdisablingselinux.com proud. :)
# Allow httpd to read /var/cache/shibboleth
sudo /usr/sbin/semanage fcontext -a -t httpd_sys_content_t "/var/cache/shibboleth(/.*)?"
sudo /usr/sbin/restorecon -vR /var/cache/shibboleth
Restart Apache and Shibboleth
-----------------------------
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/edu/harvard/iq/dataverse/CustomQuestion.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import java.io.Serializable;
import java.util.List;
import jakarta.persistence.*;
import org.hibernate.validator.constraints.NotBlank;
import jakarta.validation.constraints.NotBlank;

/**
*
Expand Down Expand Up @@ -41,7 +41,7 @@ public void setId(Long id) {
private String questionType;

@NotBlank(message = "{custom.questiontext}")
@Column( nullable = false )
@Column( nullable = false, columnDefinition = "TEXT")
private String questionString;
private boolean required;

Expand Down
Loading

0 comments on commit 79c9ebe

Please sign in to comment.