DocSpace-buildtools/install/deb/debian/rules

83 lines
3.8 KiB
Plaintext
Raw Normal View History

2021-09-30 12:05:43 +00:00
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
export DH_OPTIONS=-v
%:
dh $@ --with=systemd
PRODUCT={{product}}
2021-09-30 12:05:43 +00:00
CURRENT_PATH=${CURDIR}
SRC_PATH=$(shell cd ../../../; pwd)
2023-10-02 15:09:10 +00:00
SCRIPT_PATH=buildtools/install/common
2021-09-30 12:05:43 +00:00
override_dh_auto_clean:
@echo "RULES.$@"
dh_testdir
rm -rf ${CURRENT_PATH}/debian/*.service
Bugfix/lintian error (#1158) * Correction of systemd-service-file-references-to-obsolete-target error * Correction of the changelog format * Correction of package-uses-deprecated-debhelper-compat-version * Correction of maintainer-script-needs-depends-on-adduser * Correction of missing-debconf-dependency * Correction of extended-description-is-probably-too-short * Correction of various license format errors * Correction of maintainer-script-lacks-home-in-adduser error * Correction of duplicate-updaterc.d-calls-in-postinst error * Correction of init.d-script-not-included-in-package error * Correction of the error of missing the onlyoffice-login.conf file * Correction of binary-from-other-architecture error * Correction of missing-debian-source-format error * Temporarily correct descriptions * Correction of debhelper-but-no-misc-depends error * Correct of missing-dependency-on-line error * Correct of unstripped-binary-or-object error * Correct of maintainer-script-lacks-debhelper-token error * Change templates description * Correction of untranslatable-debconf-templates error * Fix configuration according to po-debconf recommendations * Fix configuration according to po-debconf recommendations * Fix condition for detecting existence of file * Correct of script-with-language-extension error * Correct of script-with-language-extension error * Remove linux-arm runtimes packaging * Add lintian-overrides * Fix lintian-overrides creation condition * Fix lintian-overrides creation condition * Add overrides for the main package * Add ignoring untranslatable-debconf-templates errors * Errors correction: package-contains-eslint-config-file, package-contains-npm-ignore-file, package-contains-vcs-control-file * Correction of node_modules error output * Fix backup-file-in-package and macos-ds-store-file-in-package errors * Add a override of the unusual-interpreter error * Fix removing files that cause errors
2023-02-01 08:06:03 +00:00
rm -rf ${CURRENT_PATH}/debian/*.lintian-overrides
2023-10-02 15:09:10 +00:00
rm -rf ${SRC_PATH}/buildtools/install/${PRODUCT}*
2021-09-30 12:05:43 +00:00
override_dh_auto_configure:
@echo "RULES.$@"
dh_testdir
dh_auto_configure
Bugfix/lintian error (#1158) * Correction of systemd-service-file-references-to-obsolete-target error * Correction of the changelog format * Correction of package-uses-deprecated-debhelper-compat-version * Correction of maintainer-script-needs-depends-on-adduser * Correction of missing-debconf-dependency * Correction of extended-description-is-probably-too-short * Correction of various license format errors * Correction of maintainer-script-lacks-home-in-adduser error * Correction of duplicate-updaterc.d-calls-in-postinst error * Correction of init.d-script-not-included-in-package error * Correction of the error of missing the onlyoffice-login.conf file * Correction of binary-from-other-architecture error * Correction of missing-debian-source-format error * Temporarily correct descriptions * Correction of debhelper-but-no-misc-depends error * Correct of missing-dependency-on-line error * Correct of unstripped-binary-or-object error * Correct of maintainer-script-lacks-debhelper-token error * Change templates description * Correction of untranslatable-debconf-templates error * Fix configuration according to po-debconf recommendations * Fix configuration according to po-debconf recommendations * Fix condition for detecting existence of file * Correct of script-with-language-extension error * Correct of script-with-language-extension error * Remove linux-arm runtimes packaging * Add lintian-overrides * Fix lintian-overrides creation condition * Fix lintian-overrides creation condition * Add overrides for the main package * Add ignoring untranslatable-debconf-templates errors * Errors correction: package-contains-eslint-config-file, package-contains-npm-ignore-file, package-contains-vcs-control-file * Correction of node_modules error output * Fix backup-file-in-package and macos-ds-store-file-in-package errors * Add a override of the unusual-interpreter error * Fix removing files that cause errors
2023-02-01 08:06:03 +00:00
dh_lintian
2021-09-30 12:05:43 +00:00
override_dh_auto_build:
cd ${SRC_PATH}/${SCRIPT_PATH}/systemd; \
bash build.sh -bp "${CURRENT_PATH}/debian/"; \
cd ${SRC_PATH}/${SCRIPT_PATH}; \
bash build-frontend.sh -sp ${SRC_PATH} -di "false"; \
2021-09-30 12:05:43 +00:00
bash build-backend.sh -sp ${SRC_PATH}; \
bash publish-backend.sh -sp ${SRC_PATH}/server
2021-09-30 12:05:43 +00:00
find ${SRC_PATH}/**/publish/ \
Bugfix/lintian error (#1158) * Correction of systemd-service-file-references-to-obsolete-target error * Correction of the changelog format * Correction of package-uses-deprecated-debhelper-compat-version * Correction of maintainer-script-needs-depends-on-adduser * Correction of missing-debconf-dependency * Correction of extended-description-is-probably-too-short * Correction of various license format errors * Correction of maintainer-script-lacks-home-in-adduser error * Correction of duplicate-updaterc.d-calls-in-postinst error * Correction of init.d-script-not-included-in-package error * Correction of the error of missing the onlyoffice-login.conf file * Correction of binary-from-other-architecture error * Correction of missing-debian-source-format error * Temporarily correct descriptions * Correction of debhelper-but-no-misc-depends error * Correct of missing-dependency-on-line error * Correct of unstripped-binary-or-object error * Correct of maintainer-script-lacks-debhelper-token error * Change templates description * Correction of untranslatable-debconf-templates error * Fix configuration according to po-debconf recommendations * Fix configuration according to po-debconf recommendations * Fix condition for detecting existence of file * Correct of script-with-language-extension error * Correct of script-with-language-extension error * Remove linux-arm runtimes packaging * Add lintian-overrides * Fix lintian-overrides creation condition * Fix lintian-overrides creation condition * Add overrides for the main package * Add ignoring untranslatable-debconf-templates errors * Errors correction: package-contains-eslint-config-file, package-contains-npm-ignore-file, package-contains-vcs-control-file * Correction of node_modules error output * Fix backup-file-in-package and macos-ds-store-file-in-package errors * Add a override of the unusual-interpreter error * Fix removing files that cause errors
2023-02-01 08:06:03 +00:00
-depth -type f -regex '.*\(eslintrc.*\|npmignore\|gitignore\|gitattributes\|gitmodules\|un~\|DS_Store\)' -exec rm -f {} \;
rm -f ${SRC_PATH}/buildtools/config/nginx/onlyoffice-login.conf
2023-07-05 10:23:56 +00:00
if ! grep -q 'var/www/${PRODUCT}' ${SRC_PATH}/buildtools/config/nginx/*.conf; then find ${SRC_PATH}/buildtools/config/nginx/ -name "*.conf" -exec sed -i "s@\(var/www/\)@\1${PRODUCT}/@" {} +; fi
json -I -f ${SRC_PATH}/buildtools/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.logLevel=\"warning\"" -e "this.core={ 'products': { 'folder': '/var/www/${PRODUCT}/products', 'subfolder': 'server'} }"
Bugfix/lintian error (#1158) * Correction of systemd-service-file-references-to-obsolete-target error * Correction of the changelog format * Correction of package-uses-deprecated-debhelper-compat-version * Correction of maintainer-script-needs-depends-on-adduser * Correction of missing-debconf-dependency * Correction of extended-description-is-probably-too-short * Correction of various license format errors * Correction of maintainer-script-lacks-home-in-adduser error * Correction of duplicate-updaterc.d-calls-in-postinst error * Correction of init.d-script-not-included-in-package error * Correction of the error of missing the onlyoffice-login.conf file * Correction of binary-from-other-architecture error * Correction of missing-debian-source-format error * Temporarily correct descriptions * Correction of debhelper-but-no-misc-depends error * Correct of missing-dependency-on-line error * Correct of unstripped-binary-or-object error * Correct of maintainer-script-lacks-debhelper-token error * Change templates description * Correction of untranslatable-debconf-templates error * Fix configuration according to po-debconf recommendations * Fix configuration according to po-debconf recommendations * Fix condition for detecting existence of file * Correct of script-with-language-extension error * Correct of script-with-language-extension error * Remove linux-arm runtimes packaging * Add lintian-overrides * Fix lintian-overrides creation condition * Fix lintian-overrides creation condition * Add overrides for the main package * Add ignoring untranslatable-debconf-templates errors * Errors correction: package-contains-eslint-config-file, package-contains-npm-ignore-file, package-contains-vcs-control-file * Correction of node_modules error output * Fix backup-file-in-package and macos-ds-store-file-in-package errors * Add a override of the unusual-interpreter error * Fix removing files that cause errors
2023-02-01 08:06:03 +00:00
find ${SRC_PATH}/buildtools/config/ -type f -regex '.*\.\(test\|dev\).*' -delete
json -I -f ${SRC_PATH}/buildtools/config/appsettings.json -e "this.core.notify.postman=\"services\"" -e "this['debug-info'].enabled=\"false\"" -e "this.web.samesite=\"None\""
json -I -f ${SRC_PATH}/buildtools/config/apisystem.json -e "this.core.notify.postman=\"services\""
sed 's_\(minlevel=\)"[^"]*"_\1"Warn"_g' -i ${SRC_PATH}/buildtools/config/nlog.config
sed 's_etc/nginx_etc/openresty_g' -i ${SRC_PATH}/buildtools/config/nginx/*.conf
sed -i "s#\$$public_root#/var/www/${PRODUCT}/public/#g" ${SRC_PATH}/buildtools/config/nginx/onlyoffice.conf
sed 's/teamlab.info/onlyoffice.com/g' -i ${SRC_PATH}/buildtools/config/autofac.consumers.json
2023-10-03 15:13:51 +00:00
json -I -f ${SRC_PATH}/client/public/scripts/config.json -e "this.wrongPortalNameUrl=\"\""
2023-10-02 15:09:10 +00:00
sed -e 's/$$router_host/127.0.0.1/g' -e 's/the_host/host/g' -e 's/the_scheme/scheme/g' -e 's_includes_/etc/openresty/includes_g' -i ${SRC_PATH}/buildtools/install/docker/config/nginx/onlyoffice-proxy*.conf
sed "s_\(.*root\).*;_\1 \"/var/www/${PRODUCT}\";_g" -i ${SRC_PATH}/buildtools/install/docker/config/nginx/letsencrypt.conf
sed -e '/.pid/d' -e '/temp_path/d' -e 's_etc/nginx_etc/openresty_g' -e 's/\.log/-openresty.log/g' -i ${SRC_PATH}/buildtools/install/docker/config/nginx/templates/nginx.conf.template
2023-10-02 15:09:10 +00:00
mv -f ${SRC_PATH}/buildtools/install/docker/config/nginx/onlyoffice-proxy-ssl.conf ${SRC_PATH}/buildtools/install/docker/config/nginx/onlyoffice-proxy-ssl.conf.template
Bugfix/lintian error (#1158) * Correction of systemd-service-file-references-to-obsolete-target error * Correction of the changelog format * Correction of package-uses-deprecated-debhelper-compat-version * Correction of maintainer-script-needs-depends-on-adduser * Correction of missing-debconf-dependency * Correction of extended-description-is-probably-too-short * Correction of various license format errors * Correction of maintainer-script-lacks-home-in-adduser error * Correction of duplicate-updaterc.d-calls-in-postinst error * Correction of init.d-script-not-included-in-package error * Correction of the error of missing the onlyoffice-login.conf file * Correction of binary-from-other-architecture error * Correction of missing-debian-source-format error * Temporarily correct descriptions * Correction of debhelper-but-no-misc-depends error * Correct of missing-dependency-on-line error * Correct of unstripped-binary-or-object error * Correct of maintainer-script-lacks-debhelper-token error * Change templates description * Correction of untranslatable-debconf-templates error * Fix configuration according to po-debconf recommendations * Fix configuration according to po-debconf recommendations * Fix condition for detecting existence of file * Correct of script-with-language-extension error * Correct of script-with-language-extension error * Remove linux-arm runtimes packaging * Add lintian-overrides * Fix lintian-overrides creation condition * Fix lintian-overrides creation condition * Add overrides for the main package * Add ignoring untranslatable-debconf-templates errors * Errors correction: package-contains-eslint-config-file, package-contains-npm-ignore-file, package-contains-vcs-control-file * Correction of node_modules error output * Fix backup-file-in-package and macos-ds-store-file-in-package errors * Add a override of the unusual-interpreter error * Fix removing files that cause errors
2023-02-01 08:06:03 +00:00
for i in ${PRODUCT} $$(ls ${CURRENT_PATH}/debian/*.install | grep -oP 'debian/\K.*' | grep -o '^[^.]*'); do \
cp ${CURRENT_PATH}/debian/source/lintian-overrides ${CURRENT_PATH}/debian/$$i.lintian-overrides; \
done
execute_after_dh_fixperms:
chmod o-rwx debian/${PRODUCT}-common/etc/onlyoffice/${PRODUCT}/*
2021-09-30 12:05:43 +00:00
override_dh_auto_install:
dh_systemd_enable --no-enable
dh_systemd_start --no-start
2021-09-30 12:05:43 +00:00
override_dh_strip:
Bugfix/lintian error (#1158) * Correction of systemd-service-file-references-to-obsolete-target error * Correction of the changelog format * Correction of package-uses-deprecated-debhelper-compat-version * Correction of maintainer-script-needs-depends-on-adduser * Correction of missing-debconf-dependency * Correction of extended-description-is-probably-too-short * Correction of various license format errors * Correction of maintainer-script-lacks-home-in-adduser error * Correction of duplicate-updaterc.d-calls-in-postinst error * Correction of init.d-script-not-included-in-package error * Correction of the error of missing the onlyoffice-login.conf file * Correction of binary-from-other-architecture error * Correction of missing-debian-source-format error * Temporarily correct descriptions * Correction of debhelper-but-no-misc-depends error * Correct of missing-dependency-on-line error * Correct of unstripped-binary-or-object error * Correct of maintainer-script-lacks-debhelper-token error * Change templates description * Correction of untranslatable-debconf-templates error * Fix configuration according to po-debconf recommendations * Fix configuration according to po-debconf recommendations * Fix condition for detecting existence of file * Correct of script-with-language-extension error * Correct of script-with-language-extension error * Remove linux-arm runtimes packaging * Add lintian-overrides * Fix lintian-overrides creation condition * Fix lintian-overrides creation condition * Add overrides for the main package * Add ignoring untranslatable-debconf-templates errors * Errors correction: package-contains-eslint-config-file, package-contains-npm-ignore-file, package-contains-vcs-control-file * Correction of node_modules error output * Fix backup-file-in-package and macos-ds-store-file-in-package errors * Add a override of the unusual-interpreter error * Fix removing files that cause errors
2023-02-01 08:06:03 +00:00
dh_strip -Xarm --no-automatic-dbgsym
2021-09-30 12:05:43 +00:00
override_dh_shlibdeps:
dh_shlibdeps -Xarm -Xkafka -- -xlibgcc-s1 --ignore-missing-info -xlibgcc1
override_dh_builddeb:
dh_builddeb -- -Zxz
Bugfix/lintian error (#1158) * Correction of systemd-service-file-references-to-obsolete-target error * Correction of the changelog format * Correction of package-uses-deprecated-debhelper-compat-version * Correction of maintainer-script-needs-depends-on-adduser * Correction of missing-debconf-dependency * Correction of extended-description-is-probably-too-short * Correction of various license format errors * Correction of maintainer-script-lacks-home-in-adduser error * Correction of duplicate-updaterc.d-calls-in-postinst error * Correction of init.d-script-not-included-in-package error * Correction of the error of missing the onlyoffice-login.conf file * Correction of binary-from-other-architecture error * Correction of missing-debian-source-format error * Temporarily correct descriptions * Correction of debhelper-but-no-misc-depends error * Correct of missing-dependency-on-line error * Correct of unstripped-binary-or-object error * Correct of maintainer-script-lacks-debhelper-token error * Change templates description * Correction of untranslatable-debconf-templates error * Fix configuration according to po-debconf recommendations * Fix configuration according to po-debconf recommendations * Fix condition for detecting existence of file * Correct of script-with-language-extension error * Correct of script-with-language-extension error * Remove linux-arm runtimes packaging * Add lintian-overrides * Fix lintian-overrides creation condition * Fix lintian-overrides creation condition * Add overrides for the main package * Add ignoring untranslatable-debconf-templates errors * Errors correction: package-contains-eslint-config-file, package-contains-npm-ignore-file, package-contains-vcs-control-file * Correction of node_modules error output * Fix backup-file-in-package and macos-ds-store-file-in-package errors * Add a override of the unusual-interpreter error * Fix removing files that cause errors
2023-02-01 08:06:03 +00:00
override_dh_installinit:
# don't do anything, silences lintian warnings "init.d-script-not-included-in-package"