From c450bff96048b70f9718efb55c41133fb63fd6ca Mon Sep 17 00:00:00 2001 From: Douglas Cerna Date: Thu, 4 Apr 2024 15:33:04 -0600 Subject: [PATCH] AM 1.16.0 + SS 0.22.0 * Upgrade pre-commit dependencies * Upgrade test workflow dependencies * debs: Use dbconfig in jammy SS packages and others * Update debhelper compat to 10 * Allow to use external database server in AM and SS * Update 1.15 references * Update 0.21 references * Update RPM testing script * Update DEB testing script * Add GitHub workflows for AM packages Co-authored-by: Miguel Medinilla --- .github/workflows/lint.yml | 2 +- .github/workflows/test-am-debs.yml | 145 +++++++++++++++++ .github/workflows/test-am-rpms.yml | 147 ++++++++++++++++++ .pre-commit-config.yaml | 2 +- README.md | 2 +- debs/focal/.Jenkinsci | 2 +- debs/jammy-testing/Vagrantfile | 22 ++- debs/jammy-testing/install.sh | 66 ++++++-- debs/jammy/.Jenkinsci | 2 +- .../archivematica-storage-service/Makefile | 2 +- .../archivematica-storage-service.default | 5 +- .../debian-storage-service/compat | 2 +- .../debian-storage-service/config | 17 ++ .../debian-storage-service/control | 5 +- .../debian-storage-service/postinst | 24 ++- .../debian-storage-service/postrm | 9 ++ debs/jammy/archivematica/Makefile | 2 +- .../archivematica-mcp-client.default | 1 + .../archivematica/debian-MCPClient/compat | 2 +- .../archivematica/debian-MCPClient/control | 2 +- .../archivematica/debian-MCPClient/postinst | 6 + .../archivematica-mcp-server.default | 1 + .../archivematica/debian-MCPServer/compat | 2 +- .../archivematica/debian-MCPServer/config | 2 + .../archivematica/debian-MCPServer/control | 2 +- .../archivematica/debian-MCPServer/postinst | 17 +- .../archivematica/debian-archivematica/compat | 2 +- .../debian-archivematicaCommon/compat | 2 +- .../debian-archivematicaCommon/control | 2 +- .../archivematica-dashboard.default | 1 + .../archivematica/debian-dashboard/compat | 2 +- .../archivematica/debian-dashboard/control | 2 +- .../archivematica/debian-dashboard/postinst | 6 + rpms/EL9-testing/Vagrantfile | 22 ++- rpms/EL9-testing/install.sh | 47 +++++- rpms/EL9/.Jenkinsci | 2 +- .../archivematica-storage-service/Makefile | 2 +- rpms/EL9/archivematica/Makefile | 2 +- 38 files changed, 513 insertions(+), 70 deletions(-) create mode 100644 .github/workflows/test-am-debs.yml create mode 100644 .github/workflows/test-am-rpms.yml create mode 100644 debs/jammy/archivematica-storage-service/debian-storage-service/config diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 76a3dfd7..d65a16ff 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -17,4 +17,4 @@ jobs: with: python-version: "3.x" - name: "Run pre-commit" - uses: "pre-commit/action@v3.0.0" + uses: "pre-commit/action@v3.0.1" diff --git a/.github/workflows/test-am-debs.yml b/.github/workflows/test-am-debs.yml new file mode 100644 index 00000000..8c38c83e --- /dev/null +++ b/.github/workflows/test-am-debs.yml @@ -0,0 +1,145 @@ +name: Archivematica DEB Packages Test +on: + pull_request: + paths: + - "debs/jammy/archivematica/**" + - "debs/jammy/archivematica-storage-service/**" + - "debs/jammy-testing/**" + push: + branches: + - "stable/**" + - "qa/**" + paths: + - "debs/jammy/archivematica/**" + - "debs/jammy/archivematica-storage-service/**" + - "debs/jammy-testing/**" +jobs: + build-am-deb: + name: Build Archivematica Debian packages + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Build + run: | + make -C ${{ github.workspace }}/debs/jammy/archivematica + - name: Save artifacts + uses: actions/upload-artifact@v4 + with: + name: archivematica-deb + path: | + ${{ github.workspace }}/debs/jammy/archivematica/repo + build-ss-deb: + name: Build Storage Service Debian package + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Build + run: | + make -C ${{ github.workspace }}/debs/jammy/archivematica-storage-service + - name: Save artifacts + uses: actions/upload-artifact@v4 + with: + name: archivematica-storage-service-deb + path: | + ${{ github.workspace }}/debs/jammy/archivematica-storage-service/repo + create-deb-repo: + name: Create Debian repository + runs-on: ubuntu-latest + needs: + - build-am-deb + - build-ss-deb + steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Restore Archivematica packages + uses: actions/download-artifact@v4 + with: + name: archivematica-deb + path: | + ${{ github.workspace }}/debs/jammy/archivematica/repo + - name: Restore Storage Service package + uses: actions/download-artifact@v4 + with: + name: archivematica-storage-service-deb + path: | + ${{ github.workspace }}/debs/jammy/archivematica-storage-service/repo + - name: Create repository + run: | + make -C ${{ github.workspace }}/debs/jammy createrepo + - name: Save package repository + uses: actions/upload-artifact@v4 + with: + name: repository-deb + path: | + ${{ github.workspace }}/debs/jammy/_deb_repository + test-deb: + name: Test Debian packages + needs: create-deb-repo + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Restore package repository + uses: actions/download-artifact@v4 + with: + name: repository-deb + path: ${{ github.workspace }}/debs/jammy/_deb_repository + - name: Install Vagrant + run: | + wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg + echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list + sudo apt update && sudo apt install vagrant + - name: Install VirtualBox + run: | + wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg --dearmor + echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian jammy contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list + sudo apt update && sudo apt install virtualbox-7.0 + - name: Install the vagrant-vbguest plugin + run: | + vagrant plugin install vagrant-vbguest + - name: Update vbox networks + run: | + sudo mkdir -p /etc/vbox/ + echo "* 192.168.33.0/24" | sudo tee -a /etc/vbox/networks.conf + - name: Start + run: | + vagrant up --no-provision + working-directory: ${{ github.workspace }}/debs/jammy-testing + - name: Install Guest Additions build dependencies + run: | + vagrant ssh -c 'sudo apt-get update -y' + vagrant ssh -c 'sudo apt-get install -y linux-headers-$(uname -r) build-essential dkms' + working-directory: ${{ github.workspace }}/debs/jammy-testing + - name: Stop + run: | + vagrant halt + working-directory: ${{ github.workspace }}/debs/jammy-testing + - name: Start and provision + run: | + vagrant up + working-directory: ${{ github.workspace }}/debs/jammy-testing + env: + PROVISION: yes + LOCAL_REPOSITORY: yes + - name: Test AM API - Get processing configurations + run: | + test $( \ + curl \ + --silent \ + --header 'Authorization: ApiKey admin:apikey' \ + --header 'Content-Type: application/json' \ + 'http://192.168.33.2/api/processing-configuration/' \ + | jq -r '.processing_configurations == ["automated", "default"]' \ + ) == true + - name: Test SS API - Get pipeline count + run: | + test $( \ + curl \ + --silent \ + --header 'Authorization: ApiKey admin:apikey' \ + --header 'Content-Type: application/json' \ + 'http://192.168.33.2:8000/api/v2/pipeline/' \ + | jq -r '.meta.total_count == 1' \ + ) == true diff --git a/.github/workflows/test-am-rpms.yml b/.github/workflows/test-am-rpms.yml new file mode 100644 index 00000000..e373b977 --- /dev/null +++ b/.github/workflows/test-am-rpms.yml @@ -0,0 +1,147 @@ +name: Archivematica RPM Packages Test +on: + pull_request: + paths: + - "rpms/EL9/archivematica/**" + - "rpms/EL9/archivematica-storage-service/**" + - "rpms/EL9-testing/**" + push: + branches: + - "stable/**" + - "qa/**" + paths: + - "rpms/EL9/archivematica/**" + - "rpms/EL9/archivematica-storage-service/**" + - "rpms/EL9-testing/**" +jobs: + build-am-rpm: + name: Build Archivematica RPM packages + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Build + run: | + make -C ${{ github.workspace }}/rpms/EL9/archivematica + - name: Save artifacts + uses: actions/upload-artifact@v4 + with: + name: archivematica-rpm + path: | + ${{ github.workspace }}/rpms/EL9/archivematica/*.rpm + build-ss-rpm: + name: Build Storage Service RPM package + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Build + run: | + make -C ${{ github.workspace }}/rpms/EL9/archivematica-storage-service + - name: Save artifacts + uses: actions/upload-artifact@v4 + with: + name: archivematica-storage-service-rpm + path: | + ${{ github.workspace }}/rpms/EL9/archivematica-storage-service/*.rpm + create-rpm-repo: + name: Create RPM repository + runs-on: ubuntu-latest + needs: + - build-am-rpm + - build-ss-rpm + steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Restore Archivematica packages + uses: actions/download-artifact@v4 + with: + name: archivematica-rpm + path: | + ${{ github.workspace }}/rpms/EL9/archivematica/ + - name: Restore Storage Service package + uses: actions/download-artifact@v4 + with: + name: archivematica-storage-service-rpm + path: | + ${{ github.workspace }}/rpms/EL9/archivematica-storage-service + - name: Create repository + run: | + make -C ${{ github.workspace }}/rpms/EL9 createrepo + - name: Save package repository + uses: actions/upload-artifact@v4 + with: + name: repository-rpm + path: | + ${{ github.workspace }}/rpms/EL9/_yum_repository + test-rpm: + name: Test RPM packages + needs: create-rpm-repo + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Restore package repository + uses: actions/download-artifact@v4 + with: + name: repository-rpm + path: ${{ github.workspace }}/rpms/EL9/_yum_repository + - name: Install Vagrant + run: | + wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg + echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list + sudo apt update && sudo apt install vagrant + - name: Install VirtualBox + run: | + wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg --dearmor + echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian jammy contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list + sudo apt update && sudo apt install virtualbox-7.0 + - name: Install the vagrant-vbguest plugin + run: | + vagrant plugin install vagrant-vbguest + - name: Update vbox networks + run: | + sudo mkdir -p /etc/vbox/ + echo "* 192.168.33.0/24" | sudo tee -a /etc/vbox/networks.conf + - name: Start + run: | + vagrant up --no-provision + working-directory: ${{ github.workspace }}/rpms/EL9-testing + - name: Install Guest Additions build dependencies + run: | + vagrant ssh -c 'sudo yum update -y && sudo yum upgrade -y' + vagrant ssh -c 'sudo yum install -y epel-release yum-utils' + vagrant ssh -c 'sudo yum-config-manager --enable crb' + vagrant ssh -c 'sudo yum install -y kernel-devel' + working-directory: ${{ github.workspace }}/rpms/EL9-testing + - name: Stop + run: | + vagrant halt + working-directory: ${{ github.workspace }}/rpms/EL9-testing + - name: Start and provision + run: | + vagrant up + working-directory: ${{ github.workspace }}/rpms/EL9-testing + env: + PROVISION: yes + LOCAL_REPOSITORY: yes + - name: Test AM API - Get processing configurations + run: | + test $( \ + curl \ + --silent \ + --header 'Authorization: ApiKey admin:apikey' \ + --header 'Content-Type: application/json' \ + 'http://192.168.33.2:81/api/processing-configuration/' \ + | jq -r '.processing_configurations == ["automated", "default"]' \ + ) == true + - name: Test SS API - Get pipeline count + run: | + test $( \ + curl \ + --silent \ + --header 'Authorization: ApiKey admin:apikey' \ + --header 'Content-Type: application/json' \ + 'http://192.168.33.2:8001/api/v2/pipeline/' \ + | jq -r '.meta.total_count == 1' \ + ) == true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c930cae7..10157b06 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,6 +7,6 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.38.0 + rev: v0.39.0 hooks: - id: markdownlint diff --git a/README.md b/README.md index 5d506d86..c4f2cdbd 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ may be a bit different between packages, but the most common are `BRANCH`, So in order to build a specific branch or version, this command can be used from the folder of the package we want to build: - make BRANCH=qa/1.x VERSION=1.15.0 RELEASE=rc5 + make BRANCH=qa/1.x VERSION=1.16.0 RELEASE=rc5 Keep in mind that the makefiles are a bit recursive, they will invoke Docker, mount the current folder, and run the deb-build target. diff --git a/debs/focal/.Jenkinsci b/debs/focal/.Jenkinsci index 5c50711e..2ff60362 100644 --- a/debs/focal/.Jenkinsci +++ b/debs/focal/.Jenkinsci @@ -5,7 +5,7 @@ pipeline { string(defaultValue: 'qa/1.x', description: '', name: 'BRANCH') string(defaultValue: '', description: '', name: 'GIT_REPO') string(defaultValue: '0F4A4D31', description: 'For production packages, use production key', name: 'GPG_ID') - string(defaultValue: '1.15.0', description: '', name: 'VERSION') + string(defaultValue: '1.16.0', description: '', name: 'VERSION') string(defaultValue: '-beta1', description: '', name: 'RELEASE') string(defaultValue: 'qa/1.x', description: '', name: 'PACKBUILD_BRANCH') string(defaultValue: 'jenkinsci', description: '', name: 'REPOSITORY') diff --git a/debs/jammy-testing/Vagrantfile b/debs/jammy-testing/Vagrantfile index b7e1ac03..a3685022 100644 --- a/debs/jammy-testing/Vagrantfile +++ b/debs/jammy-testing/Vagrantfile @@ -4,16 +4,22 @@ Vagrant.configure(2) do |config| config.vm.box = "ubuntu/jammy64" config.vm.network "private_network", ip: "192.168.33.2" - config.vm.synced_folder ".", "/vagrant" - config.vm.synced_folder "../../", "/am-packbuild" config.vm.provider "virtualbox" do |vb| vb.memory = "4096" vb.cpus = "2" end - config.vm.provision "shell", - inline: "/am-packbuild/debs/jammy-testing/install.sh", - env: { - "LOCAL_REPOSITORY" => ENV.fetch('LOCAL_REPOSITORY', 'no'), - "SEARCH_ENABLED" => ENV.fetch('SEARCH_ENABLED', 'no'), - } + if ENV.key?("PROVISION") + config.vm.synced_folder ".", "/vagrant" + config.vm.synced_folder "../../", "/am-packbuild" + config.vm.provision "shell", + inline: "/am-packbuild/debs/jammy-testing/install.sh", + env: { + "LOCAL_REPOSITORY" => ENV.fetch('LOCAL_REPOSITORY', 'no'), + "SEARCH_ENABLED" => ENV.fetch('SEARCH_ENABLED', 'no'), + } + else + config.vbguest.auto_update = false + config.vm.synced_folder ".", "/vagrant", disabled: true + config.vm.synced_folder "../../", "/am-packbuild", disabled: true + end end diff --git a/debs/jammy-testing/install.sh b/debs/jammy-testing/install.sh index 7634c9cb..4365bdc4 100755 --- a/debs/jammy-testing/install.sh +++ b/debs/jammy-testing/install.sh @@ -30,25 +30,34 @@ while read -r line; do echo "$line=${!line}"; done < <(compgen -v | grep -v '[^[ echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" export DEBIAN_FRONTEND=noninteractive - -sudo wget -O - https://packages.archivematica.org/1.15.x/key.asc | sudo apt-key add - -sudo sh -c 'echo "deb [arch=amd64] http://packages.archivematica.org/1.15.x/ubuntu-externals jammy main" >> /etc/apt/sources.list' +sudo debconf-set-selections <<< "postfix postfix/mailname string your.hostname.com" +sudo debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'" +sudo debconf-set-selections <<< "archivematica-storage-service archivematica-storage-service/dbconfig-install boolean true" +sudo debconf-set-selections <<< "archivematica-storage-service archivematica-storage-service/mysql/app-pass password demo-ss" +sudo debconf-set-selections <<< "archivematica-storage-service archivematica-storage-service/app-password-confirm password demo-ss" +sudo debconf-set-selections <<< "archivematica-mcp-server archivematica-mcp-server/dbconfig-install boolean true" +sudo debconf-set-selections <<< "archivematica-mcp-server archivematica-mcp-server/mysql/app-pass password demo-am" +sudo debconf-set-selections <<< "archivematica-mcp-server archivematica-mcp-server/app-password-confirm password demo-am" + +curl -fsSL https://packages.archivematica.org/1.16.x/key.asc | sudo gpg --dearmor -o /etc/apt/keyrings/archivematica-1.16.x.gpg +sudo sh -c 'echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/archivematica-1.16.x.gpg] http://packages.archivematica.org/1.16.x/ubuntu-externals jammy main" > /etc/apt/sources.list.d/archivematica-externals.list' if [ "${local_repository}" == "true" ] ; then sudo -u root bash -c 'cat << EOF > /etc/apt/sources.list.d/archivematica.list deb file:/am-packbuild/debs/jammy/_deb_repository ./ EOF' else - sudo sh -c 'echo "deb [arch=amd64] http://packages.archivematica.org/1.15.x/ubuntu jammy main" >> /etc/apt/sources.list' + sudo sh -c 'echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/archivematica-1.16.x.gpg] http://packages.archivematica.org/1.16.x/ubuntu jammy main" > /etc/apt/sources.list.d/archivematica.list' fi sudo apt-get -o Acquire::AllowInsecureRepositories=true update sudo apt-get -y upgrade -sudo apt-get install -y htop ntp apt-transport-https unzip openjdk-8-jre-headless mysql-server python3-mysqldb + +sudo apt-get install -y openjdk-8-jre-headless mysql-server if [ "${search_enabled}" == "true" ] ; then - wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - - echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list + curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /etc/apt/keyrings/elasticsearch-6.x.gpg + echo "deb [signed-by=/etc/apt/keyrings/elasticsearch-6.x.gpg] https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list sudo apt-get -o Acquire::AllowInsecureRepositories=true update sudo apt-get install -y elasticsearch sudo systemctl daemon-reload @@ -56,21 +65,11 @@ if [ "${search_enabled}" == "true" ] ; then sudo systemctl enable elasticsearch fi -sudo -H -u root mysql -hlocalhost -uroot -e "DROP DATABASE IF EXISTS SS; CREATE DATABASE SS CHARACTER SET utf8 COLLATE utf8_unicode_ci;" -sudo -H -u root mysql -hlocalhost -uroot -e "CREATE USER 'archivematica'@'localhost' IDENTIFIED BY 'demo';" -sudo -H -u root mysql -hlocalhost -uroot -e "GRANT ALL ON SS.* TO 'archivematica'@'localhost';" - sudo apt-get install -y --allow-unauthenticated archivematica-storage-service sudo rm -f /etc/nginx/sites-enabled/default sudo ln -sf /etc/nginx/sites-available/storage /etc/nginx/sites-enabled/storage -sudo -H -u root mysql -hlocalhost -uroot -e "DROP DATABASE IF EXISTS MCP; CREATE DATABASE MCP CHARACTER SET utf8 COLLATE utf8_unicode_ci;" -sudo -H -u root mysql -hlocalhost -uroot -e "GRANT ALL ON MCP.* TO 'archivematica'@'localhost';" - -echo archivematica-mcp-server archivematica-mcp-server/dbconfig-install boolean false | sudo debconf-set-selections -echo postfix postfix/main_mailer_type select No configuration | sudo debconf-set-selections - sudo apt-get install -y --allow-unauthenticated archivematica-mcp-server sudo apt-get install -y --allow-unauthenticated archivematica-dashboard sudo apt-get install -y --allow-unauthenticated archivematica-mcp-client @@ -94,3 +93,36 @@ sudo service archivematica-dashboard restart sudo service nginx restart sudo systemctl enable fits-nailgun sudo service fits-nailgun start + +sudo -u archivematica bash -c " \ + set -a -e -x + source /etc/default/archivematica-storage-service || \ + source /etc/sysconfig/archivematica-storage-service \ + || (echo 'Environment file not found'; exit 1) + cd /usr/lib/archivematica/storage-service + /usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python manage.py create_user \ + --username=admin \ + --password=archivematica \ + --email="example@example.com" \ + --api-key="apikey" \ + --superuser +"; + +sudo -u archivematica bash -c " \ + set -a -e -x + source /etc/default/archivematica-dashboard || \ + source /etc/sysconfig/archivematica-dashboard \ + || (echo 'Environment file not found'; exit 1) + cd /usr/share/archivematica/dashboard + /usr/share/archivematica/virtualenvs/archivematica/bin/python manage.py install \ + --username="admin" \ + --password="archivematica" \ + --email="example@example.com" \ + --org-name="test" \ + --org-id="test" \ + --api-key="apikey" \ + --ss-url="http://localhost:8000" \ + --ss-user="admin" \ + --ss-api-key="apikey" \ + --site-url="http://localhost" +"; diff --git a/debs/jammy/.Jenkinsci b/debs/jammy/.Jenkinsci index d341ea96..bb8bafe8 100644 --- a/debs/jammy/.Jenkinsci +++ b/debs/jammy/.Jenkinsci @@ -5,7 +5,7 @@ pipeline { string(defaultValue: 'qa/1.x', description: '', name: 'BRANCH') string(defaultValue: '', description: '', name: 'GIT_REPO') string(defaultValue: '0F4A4D31', description: 'For production packages, use production key', name: 'GPG_ID') - string(defaultValue: '1.15.0', description: '', name: 'VERSION') + string(defaultValue: '1.16.0', description: '', name: 'VERSION') string(defaultValue: '-beta1', description: '', name: 'RELEASE') string(defaultValue: 'qa/1.x', description: '', name: 'PACKBUILD_BRANCH') string(defaultValue: 'jenkinsci', description: '', name: 'REPOSITORY') diff --git a/debs/jammy/archivematica-storage-service/Makefile b/debs/jammy/archivematica-storage-service/Makefile index 9bf7ef81..5b48185e 100644 --- a/debs/jammy/archivematica-storage-service/Makefile +++ b/debs/jammy/archivematica-storage-service/Makefile @@ -5,7 +5,7 @@ DOCKER_VOLUME = "/src" DOCKER_IMAGE = "debbuild-$(NAME)-$(PACKAGE)-$(VERSION)" GPG_ID ?= 0F4A4D31 BRANCH ?= qa/0.x -VERSION ?= 0.21.0 +VERSION ?= 0.22.0 RELEASE ?= -1 GIT_REPO = "https://github.com/artefactual/archivematica-storage-service" diff --git a/debs/jammy/archivematica-storage-service/debian-storage-service/archivematica-storage-service.default b/debs/jammy/archivematica-storage-service/debian-storage-service/archivematica-storage-service.default index d5316ea5..29e9b9a0 100644 --- a/debs/jammy/archivematica-storage-service/debian-storage-service/archivematica-storage-service.default +++ b/debs/jammy/archivematica-storage-service/debian-storage-service/archivematica-storage-service.default @@ -3,11 +3,8 @@ LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" LC_LANG="en_US.UTF-8" -SS_DB_URL=mysql://archivematica:demo@localhost:3306/SS +SS_DB_URL=mysql://ss:demo@localhost:3306/SS DJANGO_ALLOWED_HOSTS=* -SS_DB_PASSWORD= -SS_DB_USER= -SS_DB_HOST= DJANGO_SETTINGS_MODULE=storage_service.settings.production DJANGO_SECRET_KEY=CHANGE_ME_WITH_A_SECRET_KEY SS_GUNICORN_BIND=127.0.0.1:8001 diff --git a/debs/jammy/archivematica-storage-service/debian-storage-service/compat b/debs/jammy/archivematica-storage-service/debian-storage-service/compat index ec635144..f599e28b 100644 --- a/debs/jammy/archivematica-storage-service/debian-storage-service/compat +++ b/debs/jammy/archivematica-storage-service/debian-storage-service/compat @@ -1 +1 @@ -9 +10 diff --git a/debs/jammy/archivematica-storage-service/debian-storage-service/config b/debs/jammy/archivematica-storage-service/debian-storage-service/config new file mode 100644 index 00000000..b3c8d803 --- /dev/null +++ b/debs/jammy/archivematica-storage-service/debian-storage-service/config @@ -0,0 +1,17 @@ +#!/bin/sh +# config maintainer script for archivematica-storage-service + +# source debconf stuff +. /usr/share/debconf/confmodule + +dbc_dbname=SS +dbc_dbuser=ss +dbc_dbpass=demo +dbc_dbserver=localhost +dbc_dbport=3306 + +# source dbconfig-common shell library, and call the hook function +if [ -f /usr/share/dbconfig-common/dpkg/config.mysql ]; then + . /usr/share/dbconfig-common/dpkg/config.mysql + dbc_go archivematica-storage-service $@ +fi diff --git a/debs/jammy/archivematica-storage-service/debian-storage-service/control b/debs/jammy/archivematica-storage-service/debian-storage-service/control index ef5300a3..c4b5d3ee 100644 --- a/debs/jammy/archivematica-storage-service/debian-storage-service/control +++ b/debs/jammy/archivematica-storage-service/debian-storage-service/control @@ -30,7 +30,10 @@ Depends: rng-tools, gnupg1, gettext, - libmysqlclient-dev + libmysqlclient-dev, + dbconfig-common, + dbconfig-mysql, + mysql-server Description: Django webapp for managing storage in an Archivematica installation. Homepage: http://archivematica.org diff --git a/debs/jammy/archivematica-storage-service/debian-storage-service/postinst b/debs/jammy/archivematica-storage-service/debian-storage-service/postinst index 239559c9..4fd13aca 100644 --- a/debs/jammy/archivematica-storage-service/debian-storage-service/postinst +++ b/debs/jammy/archivematica-storage-service/debian-storage-service/postinst @@ -1,5 +1,18 @@ #!/usr/bin/env bash + +# source debconf stuff +. /usr/share/debconf/confmodule + +# Set the default database encoding to utf8mb4 +dbc_mysql_createdb_encoding="utf8mb4" + +# source dbconfig-common shell library, and call the hook function +if [ -f /usr/share/dbconfig-common/dpkg/postinst.mysql ]; then + . /usr/share/dbconfig-common/dpkg/postinst.mysql + dbc_go archivematica-storage-service $@ +fi + SS_ENV_DIR="/usr/share/archivematica/virtualenvs/archivematica-storage-service" echo "postinst called with:" $1 $2 @@ -13,6 +26,15 @@ else adduser --uid 333 --group --system --home /var/lib/archivematica/ archivematica fi + +# Populate default mysql config +DBPASS=$(grep "dbc_dbpass=" /etc/dbconfig-common/archivematica-storage-service.conf| cut -d\= -f2- | tr -d \') +DBUSER=$(grep "dbc_dbuser=" /etc/dbconfig-common/archivematica-storage-service.conf| cut -d\= -f2- | tr -d \') +DBSERVER=$(grep "dbc_dbserver=" /etc/dbconfig-common/archivematica-storage-service.conf| cut -d\= -f2- | tr -d \') +DBPORT=$(grep "dbc_dbport=" /etc/dbconfig-common/archivematica-storage-service.conf| cut -d\= -f2- | tr -d \') +DBNAME=$(grep "dbc_dbname=" /etc/dbconfig-common/archivematica-storage-service.conf| cut -d\= -f2- | tr -d \') +sed -i "s/^\(SS_DB_URL\=mysql\:\/\/\).*/\1${DBUSER}:${DBPASS}\@${DBSERVER}\:${DBPORT}\/${DBNAME}/g" /etc/default/archivematica-storage-service + echo "creating django secret key" KEY=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 50 | head -n 1) sed -i "s/CHANGE_ME_WITH_A_SECRET_KEY/\"$KEY\"/g" /etc/default/archivematica-storage-service @@ -24,8 +46,6 @@ ucf --debconf-ok /etc/default/archivematica-storage-service /etc/default/archive set -a source /etc/default/archivematica-storage-service set +a -echo "creating symlink in /usr/lib/archivematica" -rm -f /usr/lib/archivematica/storage-service find /usr/lib/archivematica/storage-service/ -name '*.pyc' -delete diff --git a/debs/jammy/archivematica-storage-service/debian-storage-service/postrm b/debs/jammy/archivematica-storage-service/debian-storage-service/postrm index 7ce495c2..11fea797 100644 --- a/debs/jammy/archivematica-storage-service/debian-storage-service/postrm +++ b/debs/jammy/archivematica-storage-service/debian-storage-service/postrm @@ -2,6 +2,15 @@ echo "postrm" $1 +# source debconf stuff +. /usr/share/debconf/confmodule + +# source dbconfig-common shell library, and call the hook function +if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then + . /usr/share/dbconfig-common/dpkg/postrm.mysql + dbc_go archivematica-storage-service $@ +fi + if [ $1 = "remove" ]; then rm -rf /usr/share/python/archivematica-storage-service rm -rf /usr/share/archivematica/virtualenvs/archivematica-storage-service diff --git a/debs/jammy/archivematica/Makefile b/debs/jammy/archivematica/Makefile index f9435162..ea2cfe6f 100644 --- a/debs/jammy/archivematica/Makefile +++ b/debs/jammy/archivematica/Makefile @@ -5,7 +5,7 @@ DOCKER_VOLUME = "/src" DOCKER_IMAGE = "debbuild-$(NAME)-$(PACKAGE)-$(VERSION)" GPG_ID ?= 0F4A4D31 BRANCH ?= qa/1.x -VERSION ?= 1.15.0 +VERSION ?= 1.16.0 RELEASE ?= -1 GIT_REPO ?= "https://github.com/artefactual" diff --git a/debs/jammy/archivematica/debian-MCPClient/archivematica-mcp-client.default b/debs/jammy/archivematica/debian-MCPClient/archivematica-mcp-client.default index b3c31bad..dfecb43d 100644 --- a/debs/jammy/archivematica/debian-MCPClient/archivematica-mcp-client.default +++ b/debs/jammy/archivematica/debian-MCPClient/archivematica-mcp-client.default @@ -7,6 +7,7 @@ LC_LANG="en_US.UTF-8" DJANGO_SETTINGS_MODULE=settings.common ARCHIVEMATICA_MCPCLIENT_CLIENT_HOST=localhost +ARCHIVEMATICA_MCPCLIENT_CLIENT_PORT=3306 ARCHIVEMATICA_MCPCLIENT_CLIENT_DATABASE= ARCHIVEMATICA_MCPCLIENT_CLIENT_USER= ARCHIVEMATICA_MCPCLIENT_CLIENT_PASSWORD= diff --git a/debs/jammy/archivematica/debian-MCPClient/compat b/debs/jammy/archivematica/debian-MCPClient/compat index ec635144..f599e28b 100644 --- a/debs/jammy/archivematica/debian-MCPClient/compat +++ b/debs/jammy/archivematica/debian-MCPClient/compat @@ -1 +1 @@ -9 +10 diff --git a/debs/jammy/archivematica/debian-MCPClient/control b/debs/jammy/archivematica/debian-MCPClient/control index 681d4151..4e7edc1e 100644 --- a/debs/jammy/archivematica/debian-MCPClient/control +++ b/debs/jammy/archivematica/debian-MCPClient/control @@ -11,7 +11,7 @@ Package: archivematica-mcp-client Architecture: amd64 Depends: ${misc:Depends}, - archivematica-common (>= 1.15.0), + archivematica-common (>= 1.16.0), atool, bulk-extractor, clamav, diff --git a/debs/jammy/archivematica/debian-MCPClient/postinst b/debs/jammy/archivematica/debian-MCPClient/postinst index be5a732b..82097386 100755 --- a/debs/jammy/archivematica/debian-MCPClient/postinst +++ b/debs/jammy/archivematica/debian-MCPClient/postinst @@ -15,6 +15,12 @@ sed -i "s/^\(ARCHIVEMATICA_MCPCLIENT_CLIENT_USER=\).*/\1$DBUSER/g" /etc/default/ DBNAME=$(grep "dbc_dbname=" /etc/dbconfig-common/archivematica-mcp-server.conf| cut -d\= -f2- | tr -d \') sed -i "s/^\(ARCHIVEMATICA_MCPCLIENT_CLIENT_DATABASE=\).*/\1$DBNAME/g" /etc/default/archivematica-mcp-client +DBSERVER=$(grep "dbc_dbserver=" /etc/dbconfig-common/archivematica-mcp-server.conf| cut -d\= -f2- | tr -d \') +sed -i "s/^\(ARCHIVEMATICA_MCPCLIENT_CLIENT_HOST=\).*/\1$DBSERVER/g" /etc/default/archivematica-mcp-client + +DBPORT=$(grep "dbc_dbport=" /etc/dbconfig-common/archivematica-mcp-server.conf| cut -d\= -f2- | tr -d \') +sed -i "s/^\(ARCHIVEMATICA_MCPCLIENT_CLIENT_PORT=\).*/\1$DBPORT/g" /etc/default/archivematica-mcp-client + # Use ucf to preserve user changes in the default file ucfr archivematica-mcp-client /etc/default/archivematica-mcp-client ucf --debconf-ok /etc/default/archivematica-mcp-client /etc/default/archivematica-mcp-client diff --git a/debs/jammy/archivematica/debian-MCPServer/archivematica-mcp-server.default b/debs/jammy/archivematica/debian-MCPServer/archivematica-mcp-server.default index 4db7864e..3b4d6d4f 100644 --- a/debs/jammy/archivematica/debian-MCPServer/archivematica-mcp-server.default +++ b/debs/jammy/archivematica/debian-MCPServer/archivematica-mcp-server.default @@ -5,6 +5,7 @@ LC_LANG="en_US.UTF-8" DJANGO_SETTINGS_MODULE=settings.common ARCHIVEMATICA_MCPSERVER_CLIENT_HOST=localhost +ARCHIVEMATICA_MCPSERVER_CLIENT_PORT=3306 ARCHIVEMATICA_MCPSERVER_CLIENT_DATABASE= ARCHIVEMATICA_MCPSERVER_CLIENT_USER= ARCHIVEMATICA_MCPSERVER_CLIENT_PASSWORD= diff --git a/debs/jammy/archivematica/debian-MCPServer/compat b/debs/jammy/archivematica/debian-MCPServer/compat index ec635144..f599e28b 100644 --- a/debs/jammy/archivematica/debian-MCPServer/compat +++ b/debs/jammy/archivematica/debian-MCPServer/compat @@ -1 +1 @@ -9 +10 diff --git a/debs/jammy/archivematica/debian-MCPServer/config b/debs/jammy/archivematica/debian-MCPServer/config index bbb37a81..193cf68b 100644 --- a/debs/jammy/archivematica/debian-MCPServer/config +++ b/debs/jammy/archivematica/debian-MCPServer/config @@ -7,6 +7,8 @@ dbc_dbname=MCP dbc_dbuser=archivematica dbc_dbpass=demo +dbc_dbserver=localhost +dbc_dbport=3306 # source dbconfig-common shell library, and call the hook function if [ -f /usr/share/dbconfig-common/dpkg/config.mysql ]; then diff --git a/debs/jammy/archivematica/debian-MCPServer/control b/debs/jammy/archivematica/debian-MCPServer/control index a785a635..a4a4c9b7 100644 --- a/debs/jammy/archivematica/debian-MCPServer/control +++ b/debs/jammy/archivematica/debian-MCPServer/control @@ -11,7 +11,7 @@ Package: archivematica-mcp-server Architecture: amd64 Depends: ${misc:Depends}, - archivematica-common (>= 1.15.0), + archivematica-common (>= 1.16.0), dbconfig-common, dbconfig-mysql, mysql-server, diff --git a/debs/jammy/archivematica/debian-MCPServer/postinst b/debs/jammy/archivematica/debian-MCPServer/postinst index 4b56f411..5ca85cb9 100755 --- a/debs/jammy/archivematica/debian-MCPServer/postinst +++ b/debs/jammy/archivematica/debian-MCPServer/postinst @@ -1,13 +1,18 @@ #!/bin/sh # source debconf stuff . /usr/share/debconf/confmodule -. /usr/share/dbconfig-common/dpkg/postinst.mysql -# Set the default database encoding to UTF8 -dbc_mysql_createdb_encoding="UTF8" +# Set the default database encoding to utf8mb4 +dbc_mysql_createdb_encoding="utf8mb4" dbc_go archivematica-mcp-server $@ +# source dbconfig-common shell library, and call the hook function +if [ -f /usr/share/dbconfig-common/dpkg/postinst.mysql ]; then + . /usr/share/dbconfig-common/dpkg/postinst.mysql + dbc_go archivematica-mcp-server $@ +fi + # Create sharedDirectory and rsync content mkdir -p /var/archivematica/sharedDirectory/ chown -R archivematica:archivematica /var/archivematica/ @@ -28,6 +33,12 @@ sed -i "s/^\(ARCHIVEMATICA_MCPSERVER_CLIENT_USER=\).*/\1$DBUSER/g" /etc/default/ DBNAME=$(grep "dbc_dbname=" /etc/dbconfig-common/archivematica-mcp-server.conf| cut -d\= -f2- | tr -d \') sed -i "s/^\(ARCHIVEMATICA_MCPSERVER_CLIENT_DATABASE=\).*/\1$DBNAME/g" /etc/default/archivematica-mcp-server +DBSERVER=$(grep "dbc_dbserver=" /etc/dbconfig-common/archivematica-mcp-server.conf| cut -d\= -f2- | tr -d \') +sed -i "s/^\(ARCHIVEMATICA_MCPSERVER_CLIENT_HOST=\).*/\1$DBSERVER/g" /etc/default/archivematica-mcp-server + +DBPORT=$(grep "dbc_dbport=" /etc/dbconfig-common/archivematica-mcp-server.conf| cut -d\= -f2- | tr -d \') +sed -i "s/^\(ARCHIVEMATICA_MCPSERVER_CLIENT_PORT=\).*/\1$DBPORT/g" /etc/default/archivematica-mcp-server + # Use ucf to preserve user changes in the default file ucfr archivematica-mcp-server /etc/default/archivematica-mcp-server ucf --debconf-ok /etc/default/archivematica-mcp-server /etc/default/archivematica-mcp-server diff --git a/debs/jammy/archivematica/debian-archivematica/compat b/debs/jammy/archivematica/debian-archivematica/compat index ec635144..f599e28b 100644 --- a/debs/jammy/archivematica/debian-archivematica/compat +++ b/debs/jammy/archivematica/debian-archivematica/compat @@ -1 +1 @@ -9 +10 diff --git a/debs/jammy/archivematica/debian-archivematicaCommon/compat b/debs/jammy/archivematica/debian-archivematicaCommon/compat index ec635144..f599e28b 100644 --- a/debs/jammy/archivematica/debian-archivematicaCommon/compat +++ b/debs/jammy/archivematica/debian-archivematicaCommon/compat @@ -1 +1 @@ -9 +10 diff --git a/debs/jammy/archivematica/debian-archivematicaCommon/control b/debs/jammy/archivematica/debian-archivematicaCommon/control index 3e5b5a48..4fbe73d7 100644 --- a/debs/jammy/archivematica/debian-archivematicaCommon/control +++ b/debs/jammy/archivematica/debian-archivematicaCommon/control @@ -13,6 +13,6 @@ Depends: ${misc:Depends}, python3, python3-distutils, - archivematica (>= 1.15.0) + archivematica (>= 1.16.0) Description: Archivematica shared libraries. Homepage: https://www.archivematica.org diff --git a/debs/jammy/archivematica/debian-dashboard/archivematica-dashboard.default b/debs/jammy/archivematica/debian-dashboard/archivematica-dashboard.default index 46dc889d..cd7b48ce 100644 --- a/debs/jammy/archivematica/debian-dashboard/archivematica-dashboard.default +++ b/debs/jammy/archivematica/debian-dashboard/archivematica-dashboard.default @@ -9,6 +9,7 @@ DJANGO_SETTINGS_MODULE=settings.production ARCHIVEMATICA_DASHBOARD_DASHBOARD_DJANGO_ALLOWED_HOSTS=* ARCHIVEMATICA_DASHBOARD_DASHBOARD_DJANGO_SECRET_KEY=CHANGE_ME_WITH_A_SECRET_KEY ARCHIVEMATICA_DASHBOARD_CLIENT_HOST=localhost +ARCHIVEMATICA_DASHBOARD_CLIENT_PORT=3306 ARCHIVEMATICA_DASHBOARD_CLIENT_DATABASE= ARCHIVEMATICA_DASHBOARD_CLIENT_USER= ARCHIVEMATICA_DASHBOARD_CLIENT_PASSWORD= diff --git a/debs/jammy/archivematica/debian-dashboard/compat b/debs/jammy/archivematica/debian-dashboard/compat index ec635144..f599e28b 100644 --- a/debs/jammy/archivematica/debian-dashboard/compat +++ b/debs/jammy/archivematica/debian-dashboard/compat @@ -1 +1 @@ -9 +10 diff --git a/debs/jammy/archivematica/debian-dashboard/control b/debs/jammy/archivematica/debian-dashboard/control index d7ca9fc3..bb2222b0 100644 --- a/debs/jammy/archivematica/debian-dashboard/control +++ b/debs/jammy/archivematica/debian-dashboard/control @@ -12,7 +12,7 @@ Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, - archivematica-common (>= 1.15.0), + archivematica-common (>= 1.16.0), git, nginx, gettext diff --git a/debs/jammy/archivematica/debian-dashboard/postinst b/debs/jammy/archivematica/debian-dashboard/postinst index 3d161915..7edeb27e 100755 --- a/debs/jammy/archivematica/debian-dashboard/postinst +++ b/debs/jammy/archivematica/debian-dashboard/postinst @@ -29,6 +29,12 @@ sed -i "s/^\(ARCHIVEMATICA_DASHBOARD_CLIENT_USER=\).*/\1$DBUSER/g" /etc/default/ DBNAME=$(grep "dbc_dbname=" /etc/dbconfig-common/archivematica-mcp-server.conf| cut -d\= -f2- | tr -d \') sed -i "s/^\(ARCHIVEMATICA_DASHBOARD_CLIENT_DATABASE=\).*/\1$DBNAME/g" /etc/default/archivematica-dashboard +DBSERVER=$(grep "dbc_dbserver=" /etc/dbconfig-common/archivematica-mcp-server.conf| cut -d\= -f2- | tr -d \') +sed -i "s/^\(ARCHIVEMATICA_DASHBOARD_CLIENT_HOST=\).*/\1$DBSERVER/g" /etc/default/archivematica-dashboard + +DBPORT=$(grep "dbc_dbport=" /etc/dbconfig-common/archivematica-mcp-server.conf| cut -d\= -f2- | tr -d \') +sed -i "s/^\(ARCHIVEMATICA_DASHBOARD_CLIENT_PORT=\).*/\1$DBPORT/g" /etc/default/archivematica-dashboard + # Use ucf to preserve user changes in the default file ucfr archivematica-dashboard /etc/default/archivematica-dashboard ucf --debconf-ok /etc/default/archivematica-dashboard /etc/default/archivematica-dashboard diff --git a/rpms/EL9-testing/Vagrantfile b/rpms/EL9-testing/Vagrantfile index 7083f5c3..60ae24d7 100644 --- a/rpms/EL9-testing/Vagrantfile +++ b/rpms/EL9-testing/Vagrantfile @@ -4,16 +4,22 @@ Vagrant.configure(2) do |config| config.vm.box = "rockylinux/9" config.vm.network "private_network", ip: "192.168.33.2" - config.vm.synced_folder ".", "/vagrant" - config.vm.synced_folder "../../", "/am-packbuild" config.vm.provider "virtualbox" do |vb| vb.memory = "4096" vb.cpus = "2" end - config.vm.provision "shell", - inline: "/am-packbuild/rpms/EL9-testing/install.sh", - env: { - "LOCAL_REPOSITORY" => ENV.fetch('LOCAL_REPOSITORY', 'no'), - "SEARCH_ENABLED" => ENV.fetch('SEARCH_ENABLED', 'no'), - } + if ENV.key?("PROVISION") + config.vm.synced_folder ".", "/vagrant" + config.vm.synced_folder "../../", "/am-packbuild" + config.vm.provision "shell", + inline: "/am-packbuild/rpms/EL9-testing/install.sh", + env: { + "LOCAL_REPOSITORY" => ENV.fetch('LOCAL_REPOSITORY', 'no'), + "SEARCH_ENABLED" => ENV.fetch('SEARCH_ENABLED', 'no'), + } + else + config.vbguest.auto_update = false + config.vm.synced_folder ".", "/vagrant", disabled: true + config.vm.synced_folder "../../", "/am-packbuild", disabled: true + end end diff --git a/rpms/EL9-testing/install.sh b/rpms/EL9-testing/install.sh index 61f6d8be..c39bbb9b 100755 --- a/rpms/EL9-testing/install.sh +++ b/rpms/EL9-testing/install.sh @@ -46,19 +46,19 @@ else sudo -u root bash -c 'cat << EOF > /etc/yum.repos.d/archivematica.repo [archivematica] name=archivematica -baseurl=https://packages.archivematica.org/1.15.x/rocky9 +baseurl=https://packages.archivematica.org/1.16.x/rocky9 gpgcheck=1 -gpgkey=https://packages.archivematica.org/1.15.x/key.asc +gpgkey=https://packages.archivematica.org/1.16.x/key.asc enabled=1 EOF' fi -sudo -u root bash -c 'cat << EOF >> /etc/yum.repos.d/archivematica.repo +sudo -u root bash -c 'cat << EOF >> /etc/yum.repos.d/archivematica-extras.repo [archivematica-extras] name=archivematica-extras -baseurl=https://packages.archivematica.org/1.15.x/rocky9-extras +baseurl=https://packages.archivematica.org/1.16.x/rocky9-extras gpgcheck=1 -gpgkey=https://packages.archivematica.org/1.15.x/key.asc +gpgkey=https://packages.archivematica.org/GPG-KEY-archivematica-sha512 enabled=1 EOF' @@ -111,7 +111,7 @@ fi # Archivematica Storage Service # -sudo -H -u root mysql -hlocalhost -uroot -e "DROP DATABASE IF EXISTS SS; CREATE DATABASE SS CHARACTER SET utf8 COLLATE utf8_unicode_ci;" +sudo -H -u root mysql -hlocalhost -uroot -e "DROP DATABASE IF EXISTS SS; CREATE DATABASE SS CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;" sudo -H -u root mysql -hlocalhost -uroot -e "CREATE USER 'archivematica'@'localhost' IDENTIFIED BY 'demo';" sudo -H -u root mysql -hlocalhost -uroot -e "GRANT ALL ON SS.* TO 'archivematica'@'localhost';" @@ -138,7 +138,7 @@ sudo -u root systemctl start rngd sudo -u root yum clean all sudo -u root yum install -y archivematica-common archivematica-mcp-server archivematica-dashboard -sudo -H -u root mysql -hlocalhost -uroot -e "DROP DATABASE IF EXISTS MCP; CREATE DATABASE MCP CHARACTER SET utf8 COLLATE utf8_unicode_ci;" +sudo -H -u root mysql -hlocalhost -uroot -e "DROP DATABASE IF EXISTS MCP; CREATE DATABASE MCP CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;" sudo -H -u root mysql -hlocalhost -uroot -e "GRANT ALL ON MCP.* TO 'archivematica'@'localhost';" sudo -u archivematica bash -c " \ @@ -188,3 +188,36 @@ if [ ${rc1} -eq 0 ] && [ ${rc2} -eq 0 ]; then sudo firewall-cmd --zone=public --add-port=8001/tcp --permanent sudo systemctl restart firewalld || true fi + +sudo -u archivematica bash -c " \ + set -a -e -x + source /etc/default/archivematica-storage-service || \ + source /etc/sysconfig/archivematica-storage-service \ + || (echo 'Environment file not found'; exit 1) + cd /usr/lib/archivematica/storage-service + /usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python manage.py create_user \ + --username=admin \ + --password=archivematica \ + --email="example@example.com" \ + --api-key="apikey" \ + --superuser +"; + +sudo -u archivematica bash -c " \ + set -a -e -x + source /etc/default/archivematica-dashboard || \ + source /etc/sysconfig/archivematica-dashboard \ + || (echo 'Environment file not found'; exit 1) + cd /usr/share/archivematica/dashboard + /usr/share/archivematica/virtualenvs/archivematica/bin/python manage.py install \ + --username="admin" \ + --password="archivematica" \ + --email="example@example.com" \ + --org-name="test" \ + --org-id="test" \ + --api-key="apikey" \ + --ss-url="http://localhost:8001" \ + --ss-user="admin" \ + --ss-api-key="apikey" \ + --site-url="http://localhost:81" +"; diff --git a/rpms/EL9/.Jenkinsci b/rpms/EL9/.Jenkinsci index f102def6..396842e8 100644 --- a/rpms/EL9/.Jenkinsci +++ b/rpms/EL9/.Jenkinsci @@ -4,7 +4,7 @@ pipeline { string(defaultValue: 'archivematica', description: '', name: 'PACKAGE') string(defaultValue: 'qa/1.x', description: '', name: 'BRANCH') string(defaultValue: '0F4A4D31', description: 'For production packages, use production key', name: 'GPG_ID') - string(defaultValue: '1.15.0', description: '', name: 'VERSION') + string(defaultValue: '1.16.0', description: '', name: 'VERSION') string(defaultValue: 'beta1', description: '', name: 'RELEASE') string(defaultValue: '', description: '', name: 'GIT_REPO') string(defaultValue: 'qa/1.x', description: '', name: 'PACKBUILD_BRANCH') diff --git a/rpms/EL9/archivematica-storage-service/Makefile b/rpms/EL9/archivematica-storage-service/Makefile index 7fa2852c..b0cb5110 100644 --- a/rpms/EL9/archivematica-storage-service/Makefile +++ b/rpms/EL9/archivematica-storage-service/Makefile @@ -1,6 +1,6 @@ NAME = archivematica-storage-service BRANCH ?= qa/0.x -VERSION ?= 0.21.0 +VERSION ?= 0.22.0 RELEASE ?= 1 RPM_TOPDIR = "/rpmbuild" DOCKER_VOLUME = "/src" diff --git a/rpms/EL9/archivematica/Makefile b/rpms/EL9/archivematica/Makefile index 7d8af08a..d6110f6d 100644 --- a/rpms/EL9/archivematica/Makefile +++ b/rpms/EL9/archivematica/Makefile @@ -1,6 +1,6 @@ PACKAGE ?= archivematica BRANCH ?= qa/1.x -VERSION ?= 1.15.0 +VERSION ?= 1.16.0 RELEASE ?= 1 RPM_TOPDIR = "/rpmbuild" DOCKER_VOLUME = "/src"