Bugfix/rpmlint-error (#1160)

* Correction of the missing package expect error

* Correction of summary-ended-with-dot error

* Correction of description-line-too-long error and change to the current text

* Correction of non-executable-script error and dangerous-command-in-%post error

* Correction of unstripped-binary-or-object error

* Correction of non-standard-executable-perm error

* Fix creation of libraries to support arm

* Fix packaging of unnecessary configuration files

* Correction of setup-not-quiet error

* Correction of mixed-use-of-spaces-and-tabs error

* Correction of no-cleaning-of-buildroot error

* Correction of no-buildroot-tag error

* Correction of no-changelogname-tag error

* Temporary сorrection of summary-not-capitalized error

* Temporary correction of no-description-tag error

* Remove unused code

* Disable packaging of debug information

* Remove package_sysname

* Add documentation packaging

* Add rpmlintrc packaging

* Fix documentation packaging

* Correction of the hardcoded-packager-tag error

* Change the substitution of version and release
This commit is contained in:
Evgeniy Antonyuk 2023-02-01 11:09:31 +03:00 committed by GitHub
parent 66ed2b6372
commit 2801e07035
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 124 additions and 57 deletions

View File

@ -123,9 +123,9 @@ elif [ "$UPDATE" = "true" ] && [ "$DOCUMENT_SERVER_INSTALLED" = "true" ]; then
${package_manager} -y update ${package_sysname}-documentserver
fi
{ ${package_manager} check-update ${package_sysname}-${product}; PRODUCT_CHECK_UPDATE=$?; } || true
{ ${package_manager} check-update ${product}; PRODUCT_CHECK_UPDATE=$?; } || true
if [ "$PRODUCT_INSTALLED" = "false" ]; then
${package_manager} install -y ${package_sysname}-${product}
${package_manager} install -y ${product}
${product}-configuration \
-mysqlh ${MYSQL_SERVER_HOST} \
-mysqld ${MYSQL_SERVER_DB_NAME} \
@ -140,7 +140,7 @@ elif [[ $PRODUCT_CHECK_UPDATE -eq $UPDATE_AVAILABLE_CODE ]]; then
MYSQL_SERVER_PORT=$(echo $USER_CONNECTIONSTRING | grep -oP 'Port=\K.*' | grep -o '^[^;]*')
MYSQL_ROOT_PASS=$(echo $USER_CONNECTIONSTRING | grep -oP 'Password=\K.*' | grep -o '^[^;]*')
${package_manager} -y update ${package_sysname}-${product}
${package_manager} -y update ${product}
${product}-configuration \
-e ${ENVIRONMENT} \
-mysqlh ${MYSQL_SERVER_HOST} \

View File

@ -118,7 +118,8 @@ ${package_manager} -y install epel-release \
postgresql-server \
rabbitmq-server$rabbitmq_version \
redis --enablerepo=remi \
SDL2 $POWERTOOLS_REPO
SDL2 $POWERTOOLS_REPO \
expect
py3_version=$(python3 -c 'import sys; print(sys.version_info.minor)')
if [[ $py3_version -lt 6 ]]; then

View File

@ -0,0 +1,44 @@
# Ignoring node_modules errors due to lack of ability to influence them
addFilter(r'node_modules')
# Packages use a non-standard user and group for our project directories, but the user and group are created in %pre common
addFilter(r' W: non-standard-(uid|gid)')
# This is necessary to ensure that all child packages are updated correctly
addFilter(r'W: requires-on-release')
# The signature of packages occurs in further stages
addFilter(r'E: no-signature')
# The basic documentation comes with the common package
addFilter(r'W: no-documentation')
# The directory is needed to keep the required data
addFilter(r'W: hidden-file-or-dir')
# Some packages do not need scriptlets
addFilter(r'W: empty-(%preun|%pre|%postun|%post)')
# This is implemented for easier updating of the config, in case of adding new data or correcting errors.
addFilter(r'W: conffile-without-noreplace-flag')
# In our packaging libraries are stored in the catalog of services
addFilter(r'E: binary-or-shlib-defines-rpath')
# The directory is used to store systemd files
addFilter(r'W: only-non-binary-in-usr-lib')
# Rpmbuild does not support different architectures for child packages
addFilter(r'E: no-binary')
# There is no manual page for {{product}}-configuration.sh
addFilter(r'W: no-manual-page-for-binary')
# Dependency on a non-existent package
addFilter(r'E: no-dependency-on locales-api')
# Scripts are not designed to be run manually
addFilter(r'E: non-executable-script')
# docspace-configuration.sh has a permission of 744, so that users do not have the opportunity to run the script
addFilter(r'non-standard-executable-perm')

View File

@ -4,7 +4,7 @@ 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}
bash build/install/common/publish-backend.sh --srcpath %{_builddir}/%{sourcename} -ar "-r linux-x64"
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
@ -14,3 +14,11 @@ sed -i "s@var/www@var/www/%{product}@g" config/nginx/*.conf && sed -i "s@var/www
json -I -f %{_builddir}/%{sourcename}/config/appsettings.services.json -e "this.logPath=\"/var/log/onlyoffice/%{product}\"" -e "this.socket={ 'path': '../ASC.Socket.IO/' }" \
-e "this.ssoauth={ 'path': '../ASC.SsoAuth/' }" -e "this.core={ 'products': { 'folder': '%{buildpath}/products', 'subfolder': 'server'} }"
find %{_builddir}/%{sourcename}/publish/ \
%{_builddir}/%{sourcename}/ASC.Migration.Runner \
-depth -type f -regex '.*\(dll\|dylib\|so\)$' -exec chmod 755 {} \;
find %{_builddir}/%{sourcename}/publish/ \
%{_builddir}/%{sourcename}/ASC.Migration.Runner \
-depth -type f -regex '.*\(so\)$' -exec strip {} \;

View File

@ -1,11 +1,9 @@
%files
%config %attr(644, root, root) %{_bindir}/*
%attr(744, root, root) %{_bindir}/*
%files api
%defattr(-, onlyoffice, onlyoffice, -)
%{buildpath}/studio/ASC.Web.Api/
%{buildpath}/products/ASC.People/server/ASC.People.dll
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
/usr/lib/systemd/system/%{product}-api.service
%dir %{buildpath}/studio/
%dir %{buildpath}/products/ASC.People/
@ -22,8 +20,6 @@
%files backup
%defattr(-, onlyoffice, onlyoffice, -)
%{buildpath}/services/ASC.Data.Backup/
%{buildpath}/products/ASC.People/server/ASC.People.dll
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
/usr/lib/systemd/system/%{product}-backup.service
%dir %{buildpath}/services/
%dir %{buildpath}/products/
@ -35,6 +31,8 @@
%files common
%defattr(-, onlyoffice, onlyoffice, -)
%config %{_sysconfdir}/onlyoffice/%{product}/
%exclude %{_sysconfdir}/onlyoffice/%{product}/nginx
%{_docdir}/%{name}-%{version}-%{release}/
%config %{_sysconfdir}/logrotate.d/%{product}-common
%{_var}/log/onlyoffice/%{product}/
%dir %{_sysconfdir}/onlyoffice/
@ -43,8 +41,6 @@
%files files-services
%defattr(-, onlyoffice, onlyoffice, -)
%{buildpath}/products/ASC.Files/service/
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
%{buildpath}/products/ASC.People/server/ASC.People*.dll
/usr/lib/systemd/system/%{product}-files-services.service
%dir %{buildpath}/products/
%dir %{buildpath}/products/ASC.People/
@ -55,8 +51,6 @@
%files notify
%defattr(-, onlyoffice, onlyoffice, -)
%{buildpath}/services/ASC.Notify/
%{buildpath}/products/ASC.People/server/ASC.People.dll
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
/usr/lib/systemd/system/%{product}-notify.service
%dir %{buildpath}/services/
%dir %{buildpath}/products/
@ -68,7 +62,6 @@
%files files
%defattr(-, onlyoffice, onlyoffice, -)
%{buildpath}/products/ASC.Files/server/
%{buildpath}/products/ASC.People/server/ASC.People.dll
/usr/lib/systemd/system/%{product}-files.service
%dir %{buildpath}/products/
%dir %{buildpath}/products/ASC.Files/
@ -77,16 +70,14 @@
%files proxy
%defattr(-, onlyoffice, onlyoffice, -)
%{_sysconfdir}/nginx/includes/*
%{_sysconfdir}/nginx/conf.d/*
%config %{_sysconfdir}/nginx/includes/*
%config %{_sysconfdir}/nginx/conf.d/*
%{buildpath}/public/
%{buildpath}/client/
%files studio-notify
%defattr(-, onlyoffice, onlyoffice, -)
%{buildpath}/services/ASC.Studio.Notify/
%{buildpath}/products/ASC.People/server/ASC.People.dll
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
/usr/lib/systemd/system/%{product}-studio-notify.service
%dir %{buildpath}/services/
%dir %{buildpath}/products/
@ -98,7 +89,6 @@
%files people-server
%defattr(-, onlyoffice, onlyoffice, -)
%{buildpath}/products/ASC.People/server/
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
/usr/lib/systemd/system/%{product}-people-server.service
%dir %{buildpath}/products/
%dir %{buildpath}/products/ASC.People/
@ -108,8 +98,6 @@
%files socket
%defattr(-, onlyoffice, onlyoffice, -)
%{buildpath}/services/ASC.Socket.IO/
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
%{buildpath}/products/ASC.People/server/ASC.People.dll
/usr/lib/systemd/system/%{product}-socket.service
%dir %{buildpath}/services/
%dir %{buildpath}/products/
@ -119,8 +107,6 @@
%files studio
%defattr(-, onlyoffice, onlyoffice, -)
%{buildpath}/studio/ASC.Web.Studio/
%{buildpath}/products/ASC.People/server/ASC.People.dll
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
/usr/lib/systemd/system/%{product}-studio.service
%dir %{buildpath}/studio/
%dir %{buildpath}/products/

View File

@ -1,9 +1,10 @@
%install
rm -rf %{buildroot}
mkdir -p "%{buildroot}%{_bindir}/"
mkdir -p "%{buildroot}%{_docdir}/%{name}-%{version}-%{release}/"
mkdir -p "%{buildroot}%{_sysconfdir}/logrotate.d"
mkdir -p "%{buildroot}%{_sysconfdir}/nginx/conf.d/"
mkdir -p "%{buildroot}%{_sysconfdir}/nginx/includes/"
mkdir -p "%{buildroot}%{_sysconfdir}/onlyoffice/%{product}/"
mkdir -p "%{buildroot}%{_sysconfdir}/onlyoffice/%{product}/.private/"
mkdir -p "%{buildroot}%{_sysconfdir}/onlyoffice/%{product}/data/"
mkdir -p "%{buildroot}%{_var}/log/onlyoffice/%{product}/"
@ -30,6 +31,8 @@ mkdir -p "%{buildroot}%{buildpath}/public/"
mkdir -p "%{buildroot}%{buildpath}/client/"
mkdir -p "%{buildroot}%{buildpath}/products/ASC.Login/login/"
mkdir -p "%{buildroot}/usr/lib/systemd/system/"
cp -rf %{_builddir}/%{sourcename}/LICENSE "%{buildroot}%{_docdir}/%{name}-%{version}-%{release}/"
cp -rf %{_builddir}/%{sourcename}/README.md "%{buildroot}%{_docdir}/%{name}-%{version}-%{release}/"
cp -rf %{_builddir}/%{sourcename}/ASC.Migration.Runner/service/* "%{buildroot}%{buildpath}/services/ASC.Migration.Runner/"
cp -rf %{_builddir}/%{sourcename}/build/deploy/editor/* "%{buildroot}%{buildpath}/products/ASC.Files/editor/"
cp -rf %{_builddir}/%{sourcename}/build/deploy/public/* "%{buildroot}%{buildpath}/public/"

View File

@ -1,153 +1,172 @@
%package backup
Summary: backup
Summary: Backup
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
AutoReqProv: no
%description backup
Backup
%package common
Summary: common
Summary: Common
Group: Applications/Internet
Requires: logrotate
%description common
Common
%package files-services
Summary: files-services
Summary: Files-services
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
AutoReqProv: no
%description files-services
Files-services
%package notify
Summary: notify
Summary: Notify
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
AutoReqProv: no
%description notify
Notify
%package files
Summary: files
Summary: Files
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
AutoReqProv: no
%description files
Files
%package proxy
Summary: proxy
Summary: Proxy
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: nginx >= 1.9.5
Requires: mysql-community-client >= 5.7.0
AutoReqProv: no
%description proxy
Proxy
%package studio-notify
Summary: studio-notify
Summary: Studio-notify
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
AutoReqProv: no
%description studio-notify
Studio-notify
%package people-server
Summary: people-server
Summary: People-server
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
AutoReqProv: no
%description people-server
People-server
%package socket
Summary: socket
Summary: Socket
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: nodejs >= 16.0
AutoReqProv: no
%description socket
Socket
%package studio
Summary: studio
Summary: Studio
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
AutoReqProv: no
%description studio
Studio
%package api
Summary: api
Summary: Api
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
AutoReqProv: no
%description api
Api
%package api-system
Summary: api-system
Summary: Api-system
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
AutoReqProv: no
%description api-system
Api-system
%package ssoauth
Summary: ssoauth
Summary: Ssoauth
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: nodejs >= 16.0
AutoReqProv: no
%description ssoauth
Ssoauth
%package clear-events
Summary: clear-events
Summary: Clear-events
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
AutoReqProv: no
%description clear-events
Clear-events
%package backup-background
Summary: backup-background
Summary: Backup-background
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
AutoReqProv: no
%description backup-background
Backup-background
%package radicale
Summary: radicale
Summary: Radicale
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: python3 >= 3.6
AutoReqProv: no
%description radicale
Radicale
%package doceditor
Summary: doceditor
Summary: Doceditor
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: nodejs >= 16.0
AutoReqProv: no
%description doceditor
Doceditor
%package migration-runner
Summary: migration-runner
Summary: Migration-runner
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
AutoReqProv: no
%description migration-runner
Migration-runner
%package login
Summary: login
Summary: Login
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: nodejs >= 16.0
AutoReqProv: no
%description login
Login
%package healthchecks
Summary: Healthchecks

View File

@ -1,28 +1,32 @@
%define _build_id_links none
%global product docspace
%global buildpath %{_var}/www/%{product}
%global sourcename DocSpace-%GIT_BRANCH
Name: onlyoffice-docspace
Summary: Business productivity tools.
Name: %{product}
Summary: Business productivity tools
Group: Applications/Internet
Version: %version
Release: %release
ExclusiveArch: x86_64
Version: %{version}
Release: %{release}
AutoReqProv: no
URL: http://onlyoffice.com
Vendor: Ascensio System SIA
Packager: Ascensio System SIA <support@onlyoffice.com>
License: AGPLv3
Source0: https://github.com/ONLYOFFICE/%{product}/archive/%GIT_BRANCH.tar.gz#/%{sourcename}.tar.gz
Source1: https://github.com/ONLYOFFICE/document-templates/archive/main/community-server.tar.gz#/document-templates-main-community-server.tar.gz
Source2: https://github.com/ONLYOFFICE/dictionaries/archive/master.tar.gz#/dictionaries-master.tar.gz
Source3: %{product}.rpmlintrc
BuildRequires: nodejs >= 18.0
BuildRequires: yarn
BuildRequires: dotnet-sdk-7.0
BuildRoot: %_tmppath/%name-%version-%release.%arch
Requires: %name-api = %version-%release
Requires: %name-backup = %version-%release
Requires: %name-backup-background = %version-%release
@ -43,14 +47,16 @@ Requires: %name-studio = %version-%release
Requires: %name-studio-notify = %version-%release
%description
App Server is a platform for building your own online office by connecting ONLYOFFICE modules packed as separate apps.
ONLYOFFICE DocSpace is a new way to collaborate on documents with teams,
clients, partners, etc., based on the concept of rooms - special spaces with
predefined permissions.
%include package.spec
%prep
rm -rf %{_rpmdir}/%{_arch}/%{name}-*
%setup -b1 -b2 -n %{sourcename}
%setup -b1 -b2 -n %{sourcename} -q
mv -f %{_builddir}/document-templates-main-community-server/* %{_builddir}/%{sourcename}/products/ASC.Files/Server/DocStore/
mv -f %{_builddir}/dictionaries-master/* %{_builddir}/%{sourcename}/common/Tests/Frontend.Translations.Tests/dictionaries/
@ -69,8 +75,6 @@ getent passwd onlyoffice >/dev/null || useradd -r -g onlyoffice -s /sbin/nologin
%post
chmod +x %{_bindir}/%{product}-configuration
%preun
%postun
@ -80,13 +84,15 @@ chmod +x %{_bindir}/%{product}-configuration
rm -rf %{_builddir} %{buildroot}
%changelog
*Mon Jan 16 2023 %{packager} - %{version}-%{release}
- Initial build.
%triggerin radicale -- python3, python36
if ! which python3; then
if rpm -q python36; then
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1
fi
if rpm -q python36; then
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1
fi
fi
python3 -m pip install --upgrade pip