Add multiarch build for DocSpace packages (#1539)

* Add arm libraries for build

* Add Multi-Arch field, fix Architecture with all

* Add build trigger on path

* Update control just to trigger workflow

* Add arm dependencies

* Add BuildArch:      noarch

* Update product.spec

* Define binaries_in_noarch_packages_terminate_build

* Add upload noarch packages

* Add noarch build for docspace

* Fix versioning of rpm packages

* Remove extra & useless functionality
This commit is contained in:
Elbakyan Shirak 2023-07-13 06:16:39 -04:00 committed by GitHub
parent dc59259fd0
commit a62ef6e548
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 72 additions and 30 deletions

View File

@ -115,7 +115,7 @@ jobs:
sudo npm install -g json
sudo pip install rpmlint
echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
echo "VERSION=$(echo "${ GITHUB_REF##*/ }" | grep -oP '\d+\.\d+\.\d+' || echo "1.0.0")" >> $GITHUB_OUTPUT
echo "VERSION=$(echo "${ GITHUB_REF##*/ }" | grep -oP '\d+\.\d+\.\d+' || echo "1.1.0")" >> $GITHUB_OUTPUT
- name: Build
run: |
@ -142,18 +142,18 @@ jobs:
EOF
gpg --export --armor --output onlyoffice-gpgkey.pub
rpm --import onlyoffice-gpgkey.pub
rpm --addsign /home/runner/work/${{ env.PRODUCT }}/${{ env.PRODUCT }}/build/install/rpm/SPECS/RPMS/x86_64/*.rpm
rpm --addsign /home/runner/work/${{ env.PRODUCT }}/${{ env.PRODUCT }}/build/install/rpm/SPECS/RPMS/noarch/*.rpm
- name: Upload
run: |
for file in /home/runner/work/${{ env.PRODUCT }}/${{ env.PRODUCT }}/build/install/rpm/SPECS/RPMS/x86_64/*.rpm; do
for file in /home/runner/work/${{ env.PRODUCT }}/${{ env.PRODUCT }}/build/install/rpm/SPECS/RPMS/noarch/*.rpm; do
curl --verbose --user ${{ secrets.REPO_LOGIN }}:${{ secrets.REPO_PASS }} \
--upload-file "$file" ${{ secrets.REPO_URL_4TESTING_RPM }}
done
- name: Rpmlint
run: |
for package in /home/runner/work/${{ env.PRODUCT }}/${{ env.PRODUCT }}/build/install/rpm/SPECS/RPMS/x86_64/*.rpm
for package in /home/runner/work/${{ env.PRODUCT }}/${{ env.PRODUCT }}/build/install/rpm/SPECS/RPMS/noarch/*.rpm
do rpmlint --ignore-unused-rpmlintrc --rpmlintrc \
/home/runner/work/${{ env.PRODUCT }}/${{ env.PRODUCT }}/build/install/rpm/SPECS/SOURCES/${{ env.PRODUCT_LOW }}.rpmlintrc $package \
| tee -a file2

View File

@ -5,10 +5,12 @@ Maintainer: Ascensio System SIA <support@onlyoffice.com>
Build-Depends: debhelper (>= 10), po-debconf, nodejs (>=18), dotnet-sdk-7.0, yarn
Standards-Version: {{package_header_tag_version}}
Homepage: https://www.onlyoffice.com/
Architecture: any
Architecture: all
Multi-Arch: foreign
Package: {{product}}
Architecture: any
Architecture: all
Multi-Arch: foreign
Depends: debconf,
${misc:Depends}, ${shlibs:Depends},
{{product}}-api (= {{package_header_tag_version}}),
@ -36,20 +38,23 @@ Description: {{product}}
predefined permissions. Dependency package.
Package: {{product}}-common
Architecture: any
Architecture: all
Multi-Arch: foreign
Depends: adduser, logrotate, ${misc:Depends}, ${shlibs:Depends}
Recommends: default-mysql-client
Description: {{product}}-common
A package containing configs and scripts
Package: {{product}}-backup
Architecture: any
Architecture: all
Multi-Arch: foreign
Depends: {{product}}-common (= {{package_header_tag_version}}), dotnet-sdk-7.0, ${misc:Depends}, ${shlibs:Depends}
Description: {{product}}-backup
The service which handles API requests related to backup
Package: {{product}}-files
Architecture: any
Architecture: all
Multi-Arch: foreign
Depends: {{product}}-common (= {{package_header_tag_version}}), dotnet-sdk-7.0, ${misc:Depends}, ${shlibs:Depends}
Recommends: elasticsearch (= 7.10.0)
Description: {{product}}-files
@ -57,7 +62,8 @@ Description: {{product}}-files
documents and launches the OFormService service
Package: {{product}}-files-services
Architecture: any
Architecture: all
Multi-Arch: foreign
Depends: {{product}}-common (= {{package_header_tag_version}}), dotnet-sdk-7.0, ${misc:Depends}, ${shlibs:Depends}
Recommends: ffmpeg, elasticsearch (= 7.10.0)
Description: {{product}}-files-services
@ -70,7 +76,8 @@ Description: {{product}}-files-services
- Launcher - removes outdated files from Trash;
Package: {{product}}-notify
Architecture: any
Architecture: all
Multi-Arch: foreign
Depends: {{product}}-common (= {{package_header_tag_version}}), dotnet-sdk-7.0, ${misc:Depends}, ${shlibs:Depends}
Recommends: ffmpeg, elasticsearch (= 7.10.0)
Description: {{product}}-notify
@ -80,27 +87,31 @@ Description: {{product}}-notify
and NotifyCleanerService which removes messages
Package: {{product}}-people-server
Architecture: any
Architecture: all
Multi-Arch: foreign
Depends: {{product}}-common (= {{package_header_tag_version}}), dotnet-sdk-7.0, ${misc:Depends}, ${shlibs:Depends}
Description: {{product}}-people-server
The service which handles API requests related to the People module
Package: {{product}}-socket
Architecture: any
Architecture: all
Multi-Arch: foreign
Depends: {{product}}-common (= {{package_header_tag_version}}), nodejs (>= 16), ${misc:Depends}, ${shlibs:Depends}
Recommends: redis-server
Description: {{product}}-socket
The service which provides two-way communication between a client and a server
Package: {{product}}-studio-notify
Architecture: any
Architecture: all
Multi-Arch: foreign
Depends: {{product}}-common (= {{package_header_tag_version}}), dotnet-sdk-7.0, ${misc:Depends}, ${shlibs:Depends}
Description: {{product}}-studio-notify
The service responsible for creating notifications and
sending them to other services, for example, TelegramService and NotifyService
Package: {{product}}-api
Architecture: any
Architecture: all
Multi-Arch: foreign
Depends: {{product}}-common (= {{package_header_tag_version}}), dotnet-sdk-7.0, ${misc:Depends}, ${shlibs:Depends}
Recommends: rabbitmq-server, apache-activemq, redis-server
Description: {{product}}-api
@ -109,19 +120,22 @@ Description: {{product}}-api
module, for example, requests related to settings, audit, authentication, etc.
Package: {{product}}-api-system
Architecture: any
Architecture: all
Multi-Arch: foreign
Depends: {{product}}-common (= {{package_header_tag_version}}), dotnet-sdk-7.0, ${misc:Depends}, ${shlibs:Depends}
Description: {{product}}-api-system
The service which is used for working with portals (creating, removing, etc.)
Package: {{product}}-studio
Architecture: any
Architecture: all
Multi-Arch: foreign
Depends: {{product}}-common (= {{package_header_tag_version}}), dotnet-sdk-7.0, ${misc:Depends}, ${shlibs:Depends}
Description: {{product}}-studio
The service which processes storage handlers and authorization pages
Package: {{product}}-proxy
Architecture: any
Architecture: all
Multi-Arch: foreign
Depends: {{product}}-common (= {{package_header_tag_version}}), nginx-extras (>= 1.9.5), ${misc:Depends}, ${shlibs:Depends}
Description: {{product}}-proxy
The service which is used as a web server and reverse proxy,
@ -129,7 +143,8 @@ Description: {{product}}-proxy
receives a response from them and returns it to the client
Package: {{product}}-ssoauth
Architecture: any
Architecture: all
Multi-Arch: foreign
Depends: {{product}}-common (= {{package_header_tag_version}}), nodejs (>= 16), ${misc:Depends}, ${shlibs:Depends}
Description: {{product}}-ssoauth
The service responsible for enabling and configuring
@ -137,7 +152,8 @@ Description: {{product}}-ssoauth
easy and secure way to access DocSpace for users
Package: {{product}}-backup-background
Architecture: any
Architecture: all
Multi-Arch: foreign
Depends: {{product}}-common (= {{package_header_tag_version}}), dotnet-sdk-7.0, ${misc:Depends}, ${shlibs:Depends}
Description: {{product}}-backup-background
The service which launches additional services related to backup creation:
@ -148,14 +164,16 @@ Description: {{product}}-backup-background
- BackupSchedulerService - runs backup according to a schedule;
Package: {{product}}-clear-events
Architecture: any
Architecture: all
Multi-Arch: foreign
Depends: {{product}}-common (= {{package_header_tag_version}}), dotnet-sdk-7.0, ${misc:Depends}, ${shlibs:Depends}
Description: {{product}}-clear-events
The service responsible for clearing the login_events and audit_events tables
by LoginHistoryLifeTime and AuditTrailLifeTime to log out users after a timeout
Package: {{product}}-migration-runner
Architecture: any
Architecture: all
Multi-Arch: foreign
Depends: {{product}}-common (= {{package_header_tag_version}}), dotnet-sdk-7.0, ${misc:Depends}, ${shlibs:Depends}
Description: {{product}}-migration-runner
The service responsible for the database creation.
@ -163,7 +181,8 @@ Description: {{product}}-migration-runner
the service creates tables and populates them with values
Package: {{product}}-radicale
Architecture: any
Architecture: all
Multi-Arch: foreign
Depends: {{product}}-common (= {{package_header_tag_version}}), python3-pip, python3-requests, python3-setuptools, ${misc:Depends}, ${shlibs:Depends}
Description: {{product}}-radicale
Radicale is a server designed to support the CalDav and CardDav protocols.
@ -171,19 +190,22 @@ Description: {{product}}-radicale
or can be integrated with an existing webserver
Package: {{product}}-doceditor
Architecture: any
Architecture: all
Multi-Arch: foreign
Depends: {{product}}-common (= {{package_header_tag_version}}), nodejs (>= 16), ${misc:Depends}, ${shlibs:Depends}
Description: {{product}}-doceditor
The service which allows interaction with documentserver
Package: {{product}}-login
Architecture: any
Architecture: all
Multi-Arch: foreign
Depends: {{product}}-common (= {{package_header_tag_version}}), nodejs (>= 16), ${misc:Depends}, ${shlibs:Depends}
Description: {{product}}-login
The service which is used for logging users and displaying the wizard
Package: {{product}}-healthchecks
Architecture: any
Architecture: all
Multi-Arch: foreign
Depends: {{product}}-common (= {{package_header_tag_version}}), dotnet-sdk-7.0, ${misc:Depends}, ${shlibs:Depends}
Description: {{product}}-healthchecks
The service which displays launched services

View File

@ -32,12 +32,11 @@ override_dh_auto_build:
cd ${SRC_PATH}/${SCRIPT_PATH}; \
bash build-frontend.sh -sp ${SRC_PATH}; \
bash build-backend.sh -sp ${SRC_PATH}; \
bash publish-backend.sh -sp ${SRC_PATH} -ar "-r linux-x64"
bash publish-backend.sh -sp ${SRC_PATH}
find ${SRC_PATH}/publish/ \
-depth -type f -regex '.*\(eslintrc.*\|npmignore\|gitignore\|gitattributes\|gitmodules\|un~\|DS_Store\)' -exec rm -f {} \;
rm -rf ${SRC_PATH}/ASC.Migration.Runner/service/runtimes/linux-arm*
rm -f ${SRC_PATH}/config/nginx/onlyoffice-login.conf
if ! grep -q 'var/www/${PRODUCT}' ${SRC_PATH}/config/nginx/*.conf; then find ${SRC_PATH}/config/nginx/ -name "*.conf" -exec sed -i "s@\(var/www/\)@\1${PRODUCT}/@" {} +; fi

View File

@ -4,11 +4,10 @@ bash build/install/common/systemd/build.sh
bash build/install/common/build-frontend.sh --srcpath %{_builddir}/%{sourcename}
bash build/install/common/build-backend.sh --srcpath %{_builddir}/%{sourcename}
bash build/install/common/publish-backend.sh --srcpath %{_builddir}/%{sourcename} -ar "-r linux-x64"
bash build/install/common/publish-backend.sh --srcpath %{_builddir}/%{sourcename}
rename -f -v "s/product([^\/]*)$/%{product}\$1/g" build/install/common/*
sed -i "s/{{product}}/%{product}/g" %{_builddir}/%{sourcename}/build/install/common/logrotate/product-common
rm -rf %{_builddir}/%{sourcename}/ASC.Migration.Runner/service/runtimes/linux-arm*
rm -f %{_builddir}/%{sourcename}/config/nginx/onlyoffice-login.conf
if ! grep -q 'var/www/%{product}' config/nginx/*.conf; then find config/nginx/ -name "*.conf" -exec sed -i "s@\(var/www/\)@\1%{product}/@" {} +; fi

View File

@ -5,6 +5,7 @@ Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
AutoReqProv: no
BuildArch: noarch
%description backup
The service which handles API requests related to backup
@ -13,6 +14,7 @@ Packager: %{packager}
Summary: Common
Group: Applications/Internet
Requires: logrotate
BuildArch: noarch
%description common
A package containing configure and scripts
@ -24,6 +26,7 @@ Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
Requires: ffmpeg
AutoReqProv: no
BuildArch: noarch
%description files-services
The service which launches additional services related to file management:
- ElasticSearchIndexService - indexes documents using Elasticsearch;
@ -40,6 +43,7 @@ Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
AutoReqProv: no
BuildArch: noarch
%description notify
The service which launches additional services
related to notifications about DocSpace events:
@ -53,6 +57,7 @@ Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
AutoReqProv: no
BuildArch: noarch
%description files
The service which handles API requests related to
documents and launches the OFormService service
@ -65,6 +70,7 @@ Requires: %name-common = %version-%release
Requires: nginx >= 1.9.5
Requires: mysql-community-client >= 5.7.0
AutoReqProv: no
BuildArch: noarch
%description proxy
The service which is used as a web server and reverse proxy,
it receives and handles requests, transmits them to other services,
@ -77,6 +83,7 @@ Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
AutoReqProv: no
BuildArch: noarch
%description studio-notify
The service responsible for creating notifications and
sending them to other services, for example, TelegramService and NotifyService
@ -88,6 +95,7 @@ Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
AutoReqProv: no
BuildArch: noarch
%description people-server
The service which handles API requests related to the People module
@ -98,6 +106,7 @@ Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: nodejs >= 16.0
AutoReqProv: no
BuildArch: noarch
%description socket
The service which provides two-way communication between a client and a server
@ -108,6 +117,7 @@ Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
AutoReqProv: no
BuildArch: noarch
%description studio
The service which processes storage handlers and authorization pages
@ -118,6 +128,7 @@ Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
AutoReqProv: no
BuildArch: noarch
%description api
The service which is used for working with a certain portal. This service
handles API requests not related to backup, documents, and the People
@ -130,6 +141,7 @@ Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
AutoReqProv: no
BuildArch: noarch
%description api-system
The service which is used for working with portals (creating, removing, etc.)
@ -140,6 +152,7 @@ Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: nodejs >= 16.0
AutoReqProv: no
BuildArch: noarch
%description ssoauth
The service responsible for enabling and configuring
SAML-based single sign-on (SSO) authentication to provide a more quick,
@ -152,6 +165,7 @@ Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
AutoReqProv: no
BuildArch: noarch
%description clear-events
The service responsible for clearing the login_events and audit_events tables
by LoginHistoryLifeTime and AuditTrailLifeTime to log out users after a timeout
@ -163,6 +177,7 @@ Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
AutoReqProv: no
BuildArch: noarch
%description backup-background
The service which launches additional services related to backup creation:
- BackupWorkerService - launches WorkerService which runs backup/restore, etc;
@ -181,6 +196,7 @@ Requires: python3-pip
Requires: python3-requests
Requires: python3-setuptools
AutoReqProv: no
BuildArch: noarch
%description radicale
Radicale is a server designed to support the CalDav and CardDav protocols.
It operates either as a standalone package using its own internal HTTP server
@ -193,6 +209,7 @@ Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: nodejs >= 16.0
AutoReqProv: no
BuildArch: noarch
%description doceditor
The service which allows interaction with document-server
@ -203,6 +220,7 @@ Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
AutoReqProv: no
BuildArch: noarch
%description migration-runner
The service responsible for the database creation.
A database connection is transferred to the service and
@ -215,6 +233,7 @@ Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: nodejs >= 16.0
AutoReqProv: no
BuildArch: noarch
%description login
The service which is used for logging users and displaying the wizard
@ -225,5 +244,6 @@ Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
AutoReqProv: no
BuildArch: noarch
%description healthchecks
The service which displays launched services

View File

@ -1,3 +1,4 @@
%define _binaries_in_noarch_packages_terminate_build 0
%define _build_id_links none
%global product docspace
@ -12,6 +13,7 @@ Release: %{release}
AutoReqProv: no
BuildArch: noarch
URL: http://onlyoffice.com
Vendor: Ascensio System SIA
Packager: %{packager}